0b78f43f88f2e1d9a7c99167681ed8d44503b0f1
[gnulib.git] / ChangeLog
1 2007-07-18  Bruno Haible  <bruno@clisp.org>
2
3         * gnulib-tool: New options --po-base, --po-domain.
4         (func_usage): Document them.
5         (pobase, po_domain): New variables.
6         (func_emit_lib_Makefile_am): Augment AM_CPPFLAGS, defining
7         DEFAULT_TEXT_DOMAIN.
8         (func_emit_po_Makevars, func_emit_po_POTFILES_in): New functions.
9         (func_import): Consider pobase and po_domain. Create a po/ directory.
10         (func_create_testdir): Set pobase and po_domain to empty.
11
12 2007-07-18  Bruno Haible  <bruno@clisp.org>
13
14         * gnulib-tool (func_get_automake_snippet): Synthesize also an
15         EXTRA_DIST augmentation for files in build-aux/.
16
17 2007-07-16  Bruno Haible  <bruno@clisp.org>
18
19         * modules/lseek (License): Use the synonymous term "LGPLv2+".
20         * modules/getdelim (License): Likewise.
21
22 2007-07-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
23
24         * modules/arpa_inet (License): Use the synonymous term LGPLv2+.
25         * modules/d-type (License): Likewise.
26         * modules/extensions (License): Likewise.
27         * modules/fnmatch (License): Likewise.
28         * modules/fseeko (License): Likewise.
29         * modules/getaddrinfo (License): Likewise.
30         * modules/getline (License): Likewise.
31         * modules/getlogin_r (License): Likewise.
32         * modules/getpass (License): Likewise.
33         * modules/gettimeofday (License): Likewise.
34         * modules/glob (License): Likewise.
35         * modules/inet_ntop (License): Likewise.
36         * modules/malloc (License): Likewise.
37         * modules/malloca (License): Likewise.
38         * modules/memmem (License): Likewise.
39         * modules/mempcpy (License): Likewise.
40         * modules/memset (License): Likewise.
41         * modules/minmax (License): Likewise.
42         * modules/mktime (License): Likewise.
43         * modules/netinet_in (License): Likewise.
44         * modules/pathmax (License): Likewise.
45         * modules/poll (License): Likewise.
46         * modules/regex (License): Likewise.
47         * modules/snprintf (License): Likewise.
48         * modules/stdbool (License): Likewise.
49         * modules/stdint (License): Likewise.
50         * modules/stdio (License): Likewise.
51         * modules/strcase (License): Likewise.
52         * modules/strcasestr (License): Likewise.
53         * modules/strdup (License): Likewise.
54         * modules/string (License): Likewise.
55         * modules/strndup (License): Likewise.
56         * modules/strnlen (License): Likewise.
57         * modules/strpbrk (License): Likewise.
58         * modules/strptime (License): Likewise.
59         * modules/strsep (License): Likewise.
60         * modules/sys_select (License): Likewise.
61         * modules/sys_socket (License): Likewise.
62         * modules/sys_stat (License): Likewise.
63         * modules/sys_time (License): Likewise.
64         * modules/time (License): Likewise.
65         * modules/time_r (License): Likewise.
66         * modules/timegm (License): Likewise.
67         * modules/unistd (License): Likewise.
68         * modules/vsnprintf (License): Likewise.
69         * modules/wctype (License): Likewise.
70
71 2007-07-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
72
73         * modules/argz (License): LGPLv2+.
74
75 2007-07-15  Karl Berry  <karl@gnu.org>
76
77         * doc/gnulib.texi: revise node structure per new fdl.texi.
78
79 2007-07-14  Bruno Haible  <bruno@clisp.org>
80
81         * lib/uniname/gen-uninames.lisp (main): Emit a "do not edit" line to
82         the output file.
83         * lib/uniname/uninames.h: Regenerated.
84
85 2007-07-14  Karl Berry  <karl@gnu.org>
86
87         * doc/*gpl*.texi, doc/fdl.texi: new versions, consistently
88         omitting sectioning and index commands.
89
90 2007-07-13  Bruno Haible  <bruno@clisp.org>
91
92         New gnulib-tool option --more-symlinks.
93         * gnulib-tool (func_usage): Document --more-symlinks.
94         (do_copyrights): New variable.
95         Recognize option --more-symlinks.
96         (func_import): Don't add a copyright notice transform to
97         sed_transform_lib_file if do_copyrights is empty.
98
99 2007-07-13  Bruno Haible  <bruno@clisp.org>
100
101         * lib/vasnprintf.c (decimal_point_char): Define also if
102         (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE)
103         && !NEED_PRINTF_DIRECTIVE_A.
104         Reported by Clemens Koller <clemens.koller@anagramm.de> via
105         Gary V. Vaughan <gary@gnu.org>.
106
107 2007-07-13  Paul Eggert  <eggert@cs.ucla.edu>
108
109         * lib/inttypes_.h: Undo previous change, since it was fixed
110         in a different way in the 2007-07-02 fix to m4/inttypes.m4.
111
112 2007-07-13  Bruno Haible  <bruno@clisp.org>
113
114         * lib/stdint_.h: Fix typo: _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H was
115         misspelled as _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H.
116
117 2007-07-13  Jim Meyering  <jim@meyering.net>
118
119         df: Don't fail for Tru64's "file-on-file mount".
120         * m4/fsusage.m4 (gl_FSUSAGE): Reject Tru64's buggy statvfs,
121         so we fall through and use statfs instead.  Details here:
122         <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/10878>
123         Reported by Albert Chin.
124
125 2007-07-13  Bruno Haible  <bruno@clisp.org>
126
127         * modules/alloca-opt (License): Use the synonymous term "LGPLv2+".
128         * modules/configmake (License): Likewise.
129         * modules/gettext (License): Likewise.
130         * modules/gettext-h (License): Likewise.
131         * modules/include_next (License): Likewise.
132         * modules/link-warning (License): Likewise.
133         * modules/localcharset (License): Likewise.
134         * modules/localename (License): Likewise.
135         * modules/lock (License): Likewise.
136         * modules/relocatable-lib-lgpl (License): Likewise.
137         * modules/size_max (License): Likewise.
138         * modules/vasnprintf (License): Likewise.
139         * modules/wchar (License): Likewise.
140         * modules/xsize (License): Likewise.
141
142 2007-07-13  Bruno Haible  <bruno@clisp.org>
143
144         * gnulib-tool (func_import): Treat LGPLv2 as synonymous to LGPL.
145         (func_create_testdir): Handle copying terms "GPLv2+" and "LGPLv2+".
146
147 2007-07-12  Bruno Haible  <bruno@clisp.org>
148
149         * doc/gnulib-intro.texi (Copyright): Clarify the license abbreviations
150         in the modules files.
151
152 2007-07-11  Karl Berry  <karl@gnu.org>
153
154         * MODULES.html.sh (func_module): use
155          sed -e '\|^'"${includefile}"'$|d'
156          instead of /.../d, to avoid errors on $includefile's containing /.
157
158 2007-07-10  Sergey Poznyakoff  <gray@gnu.org.ua>
159
160         * gnulib-tool (func_import): Avoid duplication of --avoid
161         statements
162         (func_dest_tmpfilename,func_create_testdir): Translate `-' in file
163         names to `_' in variable names.
164
165 2007-07-10  Eric Blake  <ebb9@byu.net>
166
167         * lib/version-etc.c (version_etc_va): Default to GPLv3+.
168         * NEWS: Document this change.
169
170 2007-07-08  Bruno Haible  <bruno@clisp.org>
171
172         Update to Unicode 5.0.
173         * lib/uniwidth/width.c (nonspacing_table_data): Add U+00AD,
174         U+0350..U+035F, U+05A2, U+05BA, U+05C5, U+05C7, U+0600..U+0603,
175         U+0610..U+0615, U+0656..U+065E, U+07EB..U+07F3, U+0A01, U+0AE2..U+0AE3,
176         U+0CBC. Remove U+0CBF, U+0CC6. Add U+0CE2..U+0CE3, U+135F,
177         U+17B4..U+17B5, U+17DD. Remove U+180E. Add U+1920..U+1922,
178         U+1927..U+192B, U+1932, U+1939..U+193B, U+1A17..U+1A18, U+1B00..U+1B03,
179         U+1B34, U+1B36..U+1B3A, U+1B3C, U+1B42, U+1B6B..U+1B73, U+1DC0..U+1DCA,
180         U+1DFE..U+1DFF, U+20EB..U+20EF, U+A802, U+A806, U+A80B, U+A825..U+A826,
181         U+10A01..U+10A03, U+10A05..U+10A06, U+10A0C..U+10A0F, U+10A38..U+10A3A,
182         U+10A3F, U+1D242..U+1D244.
183         (nonspacing_table_ind): Update.
184         (uc_width): Assign width 0 to U+E0100..U+E01EF. Assign width 1 to
185         U+4DC0..U+4DFF. Assign width 2 to U+2329..U+232A, U+FE10..U+FE1F.
186
187 2007-07-08  Bruno Haible  <bruno@clisp.org>
188
189         Update to Unicode 5.0.
190         * lib/uniname/gen-uninames.lisp (main): Add the range 0x12xxx to the
191         code transform. Extend the name index field of unicode_name_to_code and
192         unicode_code_to_name from 16 to 24 bits.
193         * lib/uniname/uniname.c (unicode_character_name,
194         unicode_name_character): Add the range 0x12xxx to the code transform.
195         * lib/uniname/uninames.h: Regenerated.
196         * tests/uniname/UnicodeDataNames.txt: Update to Unicode 5.0.
197
198 2007-07-07  Bruno Haible  <bruno@clisp.org>
199
200         * modules/wcwidth-tests: New file.
201         * tests/test-wcwidth.c: New file.
202
203         Work around MacOS X wcwidth() bug.
204         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Test against MacOS X 10.3 bug.
205         * lib/wcwidth.c: Include localcharset.h, streq.h, uniwidth.h.
206         (rpl_wcwidth): Special-case the UTF-8 locales. Fall back to the
207         original wcwidth in non-UTF-8 locales.
208         * modules/wcwidth (Depends-on): Add localcharset, streq,
209         uniwidth/width.
210         * doc/functions/wcwidth.texi: Update.
211
212 2007-07-07  Bruno Haible  <bruno@clisp.org>
213
214         * lib/wchar_.h: Include the GL_LINK_WARNING macro.
215         (wcwidth): New declaration.
216         * m4/wchar.m4 (gl_WCHAR_MODULE_INDICATOR, gl_WCHAR_H_DEFAULTS): New
217         macros.
218         (gl_WCHAR_H): Require gl_WCHAR_H_DEFAULTS. Don't set WCHAR_H to empty
219         here. Prepare for creating <wchar.h> unconditionally.
220         * modules/wchar (Depends-on): Add link-warning.
221         (Makefile.am): Substitute also GNULIB_WCWIDTH, HAVE_DECL_WCWIDTH,
222         REPLACE_WCWIDTH, and GL_LINK_WARNING.
223         * lib/wcwidth.h: Remove file.
224         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gl_WCHAR_H_DEFAULTS. Set
225         HAVE_DECL_WCWIDTH, REPLACE_WCWIDTH, WCHAR_H.
226         * modules/wcwidth (Files): Remove lib/wcwidth.h.
227         (configure.ac): Invoke gl_WCHAR_MODULE_INDICATOR.
228         (Include): Replace wcwidth.h with <wchar.h>.
229         * lib/wcwidth.c: Include <wchar.h> instead of wcwidth.h.
230         * lib/mbchar.h: Don't include wcwidth.h.
231         * lib/mbswidth.c: Likewise.
232         * NEWS: Mention the change.
233
234 2007-07-07  Bruno Haible  <bruno@clisp.org>
235
236         * lib/wcwidth.c: New file, extracted from lib/wcwidth.h.
237         * lib/wcwidth.h: Don't include wctype.h. Replace inline function
238         definition with an external declaration.
239         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Use wcwidth.c when wcwidth is not
240         defined as a function. Remove AC_C_INLINE requirement.
241         * modules/wcwidth (Files): Add lib/wcwidth.c.
242         (Makefile.am): Remove redundant statement.
243
244 2007-07-07  Bruno Haible  <bruno@clisp.org>
245
246         * MODULES.html.sh (Unicode string functions): Add the new modules.
247
248         * tests/uniwidth/test-u32-strwidth.c: New file.
249         * modules/uniwidth/u32-strwidth-tests: New file.
250
251         * lib/uniwidth/u32-strwidth.c: New file.
252         * modules/uniwidth/u32-strwidth: New file.
253
254         * tests/uniwidth/test-u16-strwidth.c: New file.
255         * modules/uniwidth/u16-strwidth-tests: New file.
256
257         * lib/uniwidth/u16-strwidth.c: New file.
258         * modules/uniwidth/u16-strwidth: New file.
259
260         * tests/uniwidth/test-u8-strwidth.c: New file.
261         * modules/uniwidth/u8-strwidth-tests: New file.
262
263         * lib/uniwidth/u8-strwidth.c: New file.
264         * modules/uniwidth/u8-strwidth: New file.
265
266         * tests/uniwidth/test-u32-width.c: New file.
267         * modules/uniwidth/u32-width-tests: New file.
268
269         * lib/uniwidth/u32-width.c: New file.
270         * modules/uniwidth/u32-width: New file.
271
272         * tests/uniwidth/test-u16-width.c: New file.
273         * modules/uniwidth/u16-width-tests: New file.
274
275         * lib/uniwidth/u16-width.c: New file.
276         * modules/uniwidth/u16-width: New file.
277
278         * tests/uniwidth/test-u8-width.c: New file.
279         * modules/uniwidth/u8-width-tests: New file.
280
281         * lib/uniwidth/u8-width.c: New file.
282         * modules/uniwidth/u8-width: New file.
283
284         * tests/uniwidth/test-uc_width.c: New file.
285         * modules/uniwidth/width-tests: New file.
286
287         * lib/uniwidth/width.c: New file, from GNU libiconv.
288         * lib/uniwidth/cjk.h: New file, from GNU libiconv.
289         * modules/uniwidth/width: New file.
290
291         * lib/uniwidth.h: New file, from GNU libiconv.
292         * modules/uniwidth/base: New file.
293
294 2007-07-07  Bruno Haible  <bruno@clisp.org>
295
296         * lib/uniname.h: New file, from GNU gettext.
297         * lib/uniname/gen-uninames.lisp: New file, from GNU gettext.
298         * lib/uniname/uninames.h: New file, from GNU gettext.
299         * lib/uniname/uniname.c: New file, from GNU gettext.
300         * tests/uniname/test-uninames.sh: New file.
301         * tests/uniname/test-uninames.c: New file, from GNU gettext.
302         * tests/uniname/UnicodeDataNames.txt: New file, from GNU gettext.
303         * modules/uniname/base: New file.
304         * modules/uniname/uniname: New file.
305         * modules/uniname/uniname-tests: New file.
306         * MODULES.html.sh (Unicode string functions): Add the new modules.
307
308 2007-07-06  Bruno Haible  <bruno@clisp.org>
309
310         * doc/Makefile (TEXI2HTML): Specify a --reference-limit.
311
312 2007-07-06  Bruno Haible  <bruno@clisp.org>
313
314         * lib/sys_time_.h: Use a recursion-safe inclusion guard rather than
315         a split double-inclusion guard. Needed for cygwin, where <sys/time.h>
316         includes <cygwin/sys_time.h> which includes <sys/select.h> which
317         include <sys/time.h>.
318         Reported by Eric Blake.
319
320 2007-07-06  Eric Blake  <ebb9@byu.net>
321
322         Fix testing canonicalize on cygwin.
323         * modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
324         Revert patch from 2007-06-19.
325         * tests/test-canonicalize-lgpl.c (main): Instead, skip test when
326         canonicalize module is also in use.
327         * tests/test-canonicalize.c: New file.
328         * tests/test-canonicalize.sh: Likewise.
329         * modules/canonicalize-tests: Likewise.
330
331 2007-07-06  Jim Meyering  <jim@meyering.net>
332
333         * lib/getugroups.c (getugroups): Detect getgrent failure.
334         Adjust comment to reflect reality: this function may return -1.
335
336 2007-07-05  Sergey Poznyakoff  <gray@gnu.org.ua>
337
338         * build-aux/bootstrap (TP_URL,get_translations): Update to use
339         the new TP address.
340         (usage): Fix typo
341         (gnulib_mk): New variable.
342
343 2007-07-05  Jim Meyering  <jim@meyering.net>
344
345         Don't let endgrent clobber errno, no matter how improbable.
346         * lib/getugroups.c (getugroups): Save and restore errno around
347         endgrent call.
348
349         Close the group DB even when failing with 2^31 or more members.
350         * lib/getugroups.c (getugroups): Don't return without calling endgrent.
351
352 2007-07-04  Jim Meyering  <jim@meyering.net>
353
354         * lib/getugroups.h: New file.
355         * lib/getugroups.c: Include "getugroups.h".
356         Remove uses of "register" keyword.
357         Move local variable, "cp", down into scope where used.
358         Give "username" parameter the "const" attribute.
359         * modules/getugroups (Files): Add lib/getugroups.h
360
361 2007-07-04  Karl Berry  <karl@gnu.org>
362
363         * MODULES.html.sh (func_all_modules): Complete rename of
364         gpl/lgpl to gpl-2.0 and lgpl-2.1, and add gpl-3.0.
365
366 2007-07-02  Bruno Haible  <bruno@clisp.org>
367
368         * m4/inttypes.m4 (gl_INTTYPES_H): Define __STDC_LIMIT_MACROS in C++
369         mode, when inttypes.h comes from gnulib.
370         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
371
372 2007-07-02  Simon Josefsson  <simon@josefsson.org>
373
374         * NEWS: Mention lgpl module name change.
375
376         * modules/lgpl-2.1: Renamed from lgpl.
377
378         * NEWS: Mention gpl module name change.
379
380         * modules/gpl-3.0: New file, based on gpl-2.0.
381
382         * modules/gpl-2.0: Renamed from gpl.
383
384         * modules/gpl: Fix filename, doc/gpl.texi is now found at
385         doc/gpl-2.0.texi.
386
387 2007-07-02  Paul Eggert  <eggert@cs.ucla.edu>
388
389         * lib/inttypes_.h [defined __cplusplus&&!defined __STDC_LIMIT_MACROS]:
390         #define __STDC_LIMIT_MACROS temporarily while including
391         <stdint.h>, so that __STDC_LIMIT_MACROS is defined.
392         Problem reported by Joel E. Denny in
393         <http://lists.gnu.org/archive/html/bug-gnulib/2007-07/msg00008.html>.
394
395 2007-07-01  Bruno Haible  <bruno@clisp.org>
396
397         * lib/unistdio.h: New file.
398         * lib/unistdio/u-asnprintf.h: New file.
399         * lib/unistdio/u-asprintf.h: New file.
400         * lib/unistdio/u-printf-args.c: New file.
401         * lib/unistdio/u-printf-args.h: New file.
402         * lib/unistdio/u-printf-parse.h: New file.
403         * lib/unistdio/u-snprintf.h: New file.
404         * lib/unistdio/u-sprintf.h: New file.
405         * lib/unistdio/u-vasprintf.h: New file.
406         * lib/unistdio/u-vsnprintf.h: New file.
407         * lib/unistdio/u-vsprintf.h: New file.
408         * lib/unistdio/ulc-asnprintf.c: New file.
409         * lib/unistdio/ulc-asprintf.c: New file.
410         * lib/unistdio/ulc-fprintf.c: New file, based on lib/fprintf.c.
411         * lib/unistdio/ulc-printf-parse.c: New file.
412         * lib/unistdio/ulc-snprintf.c: New file.
413         * lib/unistdio/ulc-sprintf.c: New file.
414         * lib/unistdio/ulc-vasnprintf.c: New file.
415         * lib/unistdio/ulc-vasprintf.c: New file.
416         * lib/unistdio/ulc-vfprintf.c: New file, based on lib/vfprintf.c.
417         * lib/unistdio/ulc-vsnprintf.c: New file.
418         * lib/unistdio/ulc-vsprintf.c: New file.
419         * lib/unistdio/u8-asnprintf.c: New file.
420         * lib/unistdio/u8-asprintf.c: New file.
421         * lib/unistdio/u8-printf-parse.c: New file.
422         * lib/unistdio/u8-snprintf.c: New file.
423         * lib/unistdio/u8-sprintf.c: New file.
424         * lib/unistdio/u8-vasnprintf.c: New file.
425         * lib/unistdio/u8-vasprintf.c: New file.
426         * lib/unistdio/u8-vsnprintf.c: New file.
427         * lib/unistdio/u8-vsprintf.c: New file.
428         * lib/unistdio/u8-u8-asnprintf.c: New file.
429         * lib/unistdio/u8-u8-asprintf.c: New file.
430         * lib/unistdio/u8-u8-snprintf.c: New file.
431         * lib/unistdio/u8-u8-sprintf.c: New file.
432         * lib/unistdio/u8-u8-vasnprintf.c: New file.
433         * lib/unistdio/u8-u8-vasprintf.c: New file.
434         * lib/unistdio/u8-u8-vsnprintf.c: New file.
435         * lib/unistdio/u8-u8-vsprintf.c: New file.
436         * lib/unistdio/u16-asnprintf.c: New file.
437         * lib/unistdio/u16-asprintf.c: New file.
438         * lib/unistdio/u16-printf-parse.c: New file.
439         * lib/unistdio/u16-snprintf.c: New file.
440         * lib/unistdio/u16-sprintf.c: New file.
441         * lib/unistdio/u16-vasnprintf.c: New file.
442         * lib/unistdio/u16-vasprintf.c: New file.
443         * lib/unistdio/u16-vsnprintf.c: New file.
444         * lib/unistdio/u16-vsprintf.c: New file.
445         * lib/unistdio/u16-u16-asnprintf.c: New file.
446         * lib/unistdio/u16-u16-asprintf.c: New file.
447         * lib/unistdio/u16-u16-snprintf.c: New file.
448         * lib/unistdio/u16-u16-sprintf.c: New file.
449         * lib/unistdio/u16-u16-vasnprintf.c: New file.
450         * lib/unistdio/u16-u16-vasprintf.c: New file.
451         * lib/unistdio/u16-u16-vsnprintf.c: New file.
452         * lib/unistdio/u16-u16-vsprintf.c: New file.
453         * lib/unistdio/u32-asnprintf.c: New file.
454         * lib/unistdio/u32-asprintf.c: New file.
455         * lib/unistdio/u32-printf-parse.c: New file.
456         * lib/unistdio/u32-snprintf.c: New file.
457         * lib/unistdio/u32-sprintf.c: New file.
458         * lib/unistdio/u32-vasnprintf.c: New file.
459         * lib/unistdio/u32-vasprintf.c: New file.
460         * lib/unistdio/u32-vsnprintf.c: New file.
461         * lib/unistdio/u32-vsprintf.c: New file.
462         * lib/unistdio/u32-u32-asnprintf.c: New file.
463         * lib/unistdio/u32-u32-asprintf.c: New file.
464         * lib/unistdio/u32-u32-snprintf.c: New file.
465         * lib/unistdio/u32-u32-sprintf.c: New file.
466         * lib/unistdio/u32-u32-vasnprintf.c: New file.
467         * lib/unistdio/u32-u32-vasprintf.c: New file.
468         * lib/unistdio/u32-u32-vsnprintf.c: New file.
469         * lib/unistdio/u32-u32-vsprintf.c: New file.
470         * tests/unistdio/test-ulc-asnprintf1.c: New file.
471         * tests/unistdio/test-ulc-asnprintf1.h: New file.
472         * tests/unistdio/test-ulc-printf1.h: New file.
473         * tests/unistdio/test-ulc-vasnprintf1.c: New file.
474         * tests/unistdio/test-ulc-vasnprintf2.c: New file.
475         * tests/unistdio/test-ulc-vasnprintf2.sh: New file.
476         * tests/unistdio/test-ulc-vasnprintf3.c: New file.
477         * tests/unistdio/test-ulc-vasnprintf3.sh: New file.
478         * tests/unistdio/test-ulc-vasprintf1.c: New file.
479         * tests/unistdio/test-ulc-vsnprintf1.c: New file.
480         * tests/unistdio/test-ulc-vsprintf1.c: New file.
481         * tests/unistdio/test-u8-asnprintf1.c: New file.
482         * tests/unistdio/test-u8-asnprintf1.h: New file.
483         * tests/unistdio/test-u8-printf1.h: New file.
484         * tests/unistdio/test-u8-vasnprintf1.c: New file.
485         * tests/unistdio/test-u8-vasnprintf2.c: New file.
486         * tests/unistdio/test-u8-vasnprintf2.sh: New file.
487         * tests/unistdio/test-u8-vasnprintf3.c: New file.
488         * tests/unistdio/test-u8-vasnprintf3.sh: New file.
489         * tests/unistdio/test-u8-vasprintf1.c: New file.
490         * tests/unistdio/test-u8-vsnprintf1.c: New file.
491         * tests/unistdio/test-u8-vsprintf1.c: New file.
492         * tests/unistdio/test-u16-asnprintf1.c: New file.
493         * tests/unistdio/test-u16-asnprintf1.h: New file.
494         * tests/unistdio/test-u16-printf1.h: New file.
495         * tests/unistdio/test-u16-vasnprintf1.c: New file.
496         * tests/unistdio/test-u16-vasnprintf2.c: New file.
497         * tests/unistdio/test-u16-vasnprintf2.sh: New file.
498         * tests/unistdio/test-u16-vasnprintf3.c: New file.
499         * tests/unistdio/test-u16-vasnprintf3.sh: New file.
500         * tests/unistdio/test-u16-vasprintf1.c: New file.
501         * tests/unistdio/test-u16-vsnprintf1.c: New file.
502         * tests/unistdio/test-u16-vsprintf1.c: New file.
503         * tests/unistdio/test-u32-asnprintf1.c: New file.
504         * tests/unistdio/test-u32-asnprintf1.h: New file.
505         * tests/unistdio/test-u32-printf1.h: New file.
506         * tests/unistdio/test-u32-vasnprintf1.c: New file.
507         * tests/unistdio/test-u32-vasnprintf2.c: New file.
508         * tests/unistdio/test-u32-vasnprintf2.sh: New file.
509         * tests/unistdio/test-u32-vasnprintf3.c: New file.
510         * tests/unistdio/test-u32-vasnprintf3.sh: New file.
511         * tests/unistdio/test-u32-vasprintf1.c: New file.
512         * tests/unistdio/test-u32-vsnprintf1.c: New file.
513         * tests/unistdio/test-u32-vsprintf1.c: New file.
514         * modules/unistdio/base: New file.
515         * modules/unistdio/u-printf-args: New file.
516         * modules/unistdio/ulc-asnprintf: New file.
517         * modules/unistdio/ulc-asprintf: New file.
518         * modules/unistdio/ulc-fprintf: New file.
519         * modules/unistdio/ulc-printf-parse: New file.
520         * modules/unistdio/ulc-snprintf: New file.
521         * modules/unistdio/ulc-sprintf: New file.
522         * modules/unistdio/ulc-vasnprintf: New file.
523         * modules/unistdio/ulc-vasprintf: New file.
524         * modules/unistdio/ulc-vfprintf: New file.
525         * modules/unistdio/ulc-vsnprintf: New file.
526         * modules/unistdio/ulc-vsprintf: New file.
527         * modules/unistdio/u8-asnprintf: New file.
528         * modules/unistdio/u8-asprintf: New file.
529         * modules/unistdio/u8-printf-parse: New file.
530         * modules/unistdio/u8-snprintf: New file.
531         * modules/unistdio/u8-sprintf: New file.
532         * modules/unistdio/u8-vasnprintf: New file.
533         * modules/unistdio/u8-vasprintf: New file.
534         * modules/unistdio/u8-vsnprintf: New file.
535         * modules/unistdio/u8-vsprintf: New file.
536         * modules/unistdio/u8-u8-asnprintf: New file.
537         * modules/unistdio/u8-u8-asprintf: New file.
538         * modules/unistdio/u8-u8-snprintf: New file.
539         * modules/unistdio/u8-u8-sprintf: New file.
540         * modules/unistdio/u8-u8-vasnprintf: New file.
541         * modules/unistdio/u8-u8-vasprintf: New file.
542         * modules/unistdio/u8-u8-vsnprintf: New file.
543         * modules/unistdio/u8-u8-vsprintf: New file.
544         * modules/unistdio/u16-asnprintf: New file.
545         * modules/unistdio/u16-asprintf: New file.
546         * modules/unistdio/u16-printf-parse: New file.
547         * modules/unistdio/u16-snprintf: New file.
548         * modules/unistdio/u16-sprintf: New file.
549         * modules/unistdio/u16-vasnprintf: New file.
550         * modules/unistdio/u16-vasprintf: New file.
551         * modules/unistdio/u16-vsnprintf: New file.
552         * modules/unistdio/u16-vsprintf: New file.
553         * modules/unistdio/u16-u16-asnprintf: New file.
554         * modules/unistdio/u16-u16-asprintf: New file.
555         * modules/unistdio/u16-u16-snprintf: New file.
556         * modules/unistdio/u16-u16-sprintf: New file.
557         * modules/unistdio/u16-u16-vasnprintf: New file.
558         * modules/unistdio/u16-u16-vasprintf: New file.
559         * modules/unistdio/u16-u16-vsnprintf: New file.
560         * modules/unistdio/u16-u16-vsprintf: New file.
561         * modules/unistdio/u32-asnprintf: New file.
562         * modules/unistdio/u32-asprintf: New file.
563         * modules/unistdio/u32-printf-parse: New file.
564         * modules/unistdio/u32-snprintf: New file.
565         * modules/unistdio/u32-sprintf: New file.
566         * modules/unistdio/u32-vasnprintf: New file.
567         * modules/unistdio/u32-vasprintf: New file.
568         * modules/unistdio/u32-vsnprintf: New file.
569         * modules/unistdio/u32-vsprintf: New file.
570         * modules/unistdio/u32-u32-asnprintf: New file.
571         * modules/unistdio/u32-u32-asprintf: New file.
572         * modules/unistdio/u32-u32-snprintf: New file.
573         * modules/unistdio/u32-u32-sprintf: New file.
574         * modules/unistdio/u32-u32-vasnprintf: New file.
575         * modules/unistdio/u32-u32-vasprintf: New file.
576         * modules/unistdio/u32-u32-vsnprintf: New file.
577         * modules/unistdio/u32-u32-vsprintf: New file.
578         * modules/unistdio/ulc-asnprintf-tests: New file.
579         * modules/unistdio/ulc-vasnprintf-tests: New file.
580         * modules/unistdio/ulc-vasprintf-tests: New file.
581         * modules/unistdio/ulc-vsnprintf-tests: New file.
582         * modules/unistdio/ulc-vsprintf-tests: New file.
583         * modules/unistdio/u8-asnprintf-tests: New file.
584         * modules/unistdio/u8-vasnprintf-tests: New file.
585         * modules/unistdio/u8-vasprintf-tests: New file.
586         * modules/unistdio/u8-vsnprintf-tests: New file.
587         * modules/unistdio/u8-vsprintf-tests: New file.
588         * modules/unistdio/u16-asnprintf-tests: New file.
589         * modules/unistdio/u16-vasnprintf-tests: New file.
590         * modules/unistdio/u16-vasprintf-tests: New file.
591         * modules/unistdio/u16-vsnprintf-tests: New file.
592         * modules/unistdio/u16-vsprintf-tests: New file.
593         * modules/unistdio/u32-asnprintf-tests: New file.
594         * modules/unistdio/u32-vasnprintf-tests: New file.
595         * modules/unistdio/u32-vasprintf-tests: New file.
596         * modules/unistdio/u32-vsnprintf-tests: New file.
597         * modules/unistdio/u32-vsprintf-tests: New file.
598         * MODULES.html.sh (Unicode string functions): Add the new modules.
599
600 2007-07-01  Bruno Haible  <bruno@clisp.org>
601
602         * lib/sprintf.c (sprintf): Limit the available length estimation,
603         to avoid address wraparound.
604         * lib/vsprintf.c (vsprintf): Likewise.
605         * modules/sprintf-posix (Dependencies): Add stdint.
606         * modules/vsprintf-posix (Dependencies): Likewise.
607
608 2007-07-01  Bruno Haible <bruno@clisp.org>
609
610         * gnulib-tool (self_abspathname): Determine PATH_SEPARATOR and handle
611         Windows PATH as well. Conservative double-quoting. Comments.
612
613 2007-07-01  Bruno Haible <bruno@clisp.org>
614             Eric Blake  <ebb9@byu.net>
615             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
616
617         * gnulib-tool (self_abspathname): Fix algorithm to cope with
618         empty components in $PATH, denoting '.'.
619
620 2007-07-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
621
622         * gnulib-tool: Fix indentation.
623         (func_create_megatestdir): Likewise.
624         Report by Bruno Haible.
625
626 2007-06-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
627
628         Sync from Automake.
629         * build-aux/gnupload: Fix shell portability issues with for loops.
630         Report by Karl Berry.
631
632 2007-06-29  Simon Josefsson  <simon@josefsson.org>
633
634         * build-aux/maint.mk (POURL): Use translationproject.org.
635
636 2007-06-27  Simon Josefsson  <simon@josefsson.org>
637             Bruno Haible  <bruno@clisp.org>
638
639         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Require gl_HEADER_SYS_SOCKET
640         before using HAVE_WS2TCPIP_H. Check for gai_strerror through an
641         explicit link test, rather than AC_REPLACE_FUNCS - for mingw.
642         (gl_PREREQ_GETADDRINFO): Require gl_HEADER_SYS_SOCKET before using
643         HAVE_SYS_SOCKET_H and HAVE_WS2TCPIP_H.
644
645 2007-06-27  Bruno Haible  <bruno@clisp.org>
646
647         * build-aux/config.rpath: Upgrade to libtool-1.5.24.
648         * build-aux/config.libpath: Upgrade to libtool-1.5.24.
649
650 2007-06-26  Karl Berry  <karl@gnu.org>
651
652         * MODULES.html.sh: remove xreadlink-with-size.
653
654 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
655
656         * lib/time_.h: Port to Solaris 8 with Sun Studio 11, using a
657         method that I hope also handles the double-include problem noted
658         by Bruno Haible in
659         <http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00186.html>.
660
661 2007-06-23  Bruno Haible  <bruno@clisp.org>
662
663         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
664         Don't let the 'mostlyclean' target fail if the last subdirectory could
665         not be removed.
666         Reported by Karl Berry.
667
668 2007-06-23  Bruno Haible  <bruno@clisp.org>
669
670         * gnulib-tool (echo): Add a speedier workaround for ksh.
671         * tests/test-echo.sh: Likewise.
672
673 2007-06-23  Bruno Haible  <bruno@clisp.org>
674
675         * gnulib-tool (echo): Add workarounds also for bash versions < 2.04.
676         * tests/test-echo.sh: Likewise.
677
678 2007-06-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
679
680         * gnulib-tool (IFS): Initialize early, so we don't set it to
681         empty later.
682         (self_abspathname): Rewrite algorithm to set it, reindent.
683         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am)
684         (func_create_megatestdir): Merge some sed scripts.
685
686 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
687
688         * m4/include_next.m4 (gl_CHECK_NEXT_HEADERS): Check some typos
689         exposed by Sun Studio 11 cc on Solaris 8.
690
691 2007-06-22  Bruno Haible  <bruno@clisp.org>
692
693         * gnulib-tool (echo): Ensure the echo primitive does not interpret
694         backslashes.
695         * tests/test-echo.sh: New file.
696
697 2007-06-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
698
699         * gnulib-tool (func_add_or_update, func_create_testdir): Do not
700         simplify `sed_replace_build_aux' scripts, they are portable but
701         echoing them with `echo' is not.
702         Report and analysis by Fernando Ferreira <fernando.prog@netcabo.pt>.
703
704 2007-06-21  Karl Berry  <karl@gnu.org>
705
706         * config/srclist.txt: guess we can't handle the licenses via
707         srclist at the moment.
708
709 2007-06-21  Paul Eggert  <eggert@cs.ucla.edu>
710
711         * MODULES.html.sh: Add include_next.
712         * modules/include_next: New file.
713
714 2007-06-20  Paul Eggert  <eggert@cs.ucla.edu>
715
716         * m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
717         INCLUDE_NEXT.
718         (gl_CHECK_NEXT_HEADERS): New macro.
719         * m4/fcntl_h.m4 (gl_FCNTL_H): use gl_CHECK_NEXT_HEADERS instead of
720         the obsolescent gl_ABSOLUTE_HEADER.
721         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise.
722         * m4/float_h.m4 (gl_FLOAT_H): Likewise.
723         * m4/iconv_h.m4 (gl_ICONV_H): Likewise.
724         * m4/inttypes.m4 (gl_INTTYPES_H): Likewise.
725         * m4/locale_h.m4 (gl_LOCALE_H): Likewise.
726         * m4/math_h.m4 (gl_MATH_H): Likewise.
727         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Likewise.
728         * m4/search_h.m4 (gl_SEARCH_H): Likewise.
729         * m4/signal_h.m4 (gl_SIGNAL_H): Likewise.
730         * m4/stdint.m4 (gl_STDINT_H): Likewise.
731         * m4/stdio_h.m4 (gl_STDIO_H): Likewise.
732         * m4/stdlib_h.m4 (gl_STDLIB_H): Likewise.
733         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Likewise.
734         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
735         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise.
736         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise.
737         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Likewise.
738         * m4/sysexits.m4 (gl_SYSEXITS): Likewise.
739         * m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Likewise.
740         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
741         * m4/wchar.m4 (gl_WCHAR_H): Likewise.
742         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
743         * m4/inttypes.m4 (gl_INTTYPES_H): Define
744         _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H to avoid the problem of unclean
745         builds, since ABSOLUTE_INTTYPES_H is no longer being defined.
746         * m4/stdint.m4 (gl_STDINT_H): Likewise, for
747         _GL_JUST_INCLUDE_SYSTEM_STDINT_H.
748         * lib/fcntl_.h: Use @INCLUDE_NEXT@ @NEXT_foo_H@
749         rather than @HAVE_INCLUDE_NEXT@ and @ABSOLUTE_foo_H@.
750         * lib/float_.h: Likewise.
751         * lib/inttypes_.h: Likewise.
752         * lib/math_.h: Likewise.
753         * lib/search_.h: Likewise.
754         * lib/signal_.h: Likewise.
755         * lib/stdint_.h: Likewise.
756         * lib/stdio_.h: Likewise.
757         * lib/stdlib_.h: Likewise.
758         * lib/string_.h: Likewise.
759         * lib/sys_stat_.h: Likewise.
760         * lib/sys_time_.h: Likewise.
761         * lib/time_.h: Likewise.
762         * lib/unistd_.h: Likewise.
763         * lib/wchar_.h: Likewise.
764         * lib/wctype_.h: Likewise.
765         * lib/dirent_.h: Likewise.
766         * lib/iconv_.h: Likewise.
767         * lib/locale_.h: Likewise.
768         * lib/netinet_in_.h: Likewise.
769         * lib/sys_select_.h: Likewise.
770         * lib/sys_socket_.h: Likewise.
771         * lib/sysexits_.h: Likewise.
772         * modules/fcntl (Depends-on): Depend on include_next, not
773         absolute_header.
774         (Makefile): Substitute INCLUDE_NEXT and NEXT_foo_H, not
775         HAVE_INCLUDE_NEXT and ABSOLUTE_foo_H.
776         * modules/fchdir: Likewise.
777         * modules/float: Likewise.
778         * modules/iconv_open: Likewise.
779         * modules/inttypes: Likewise.
780         * modules/locale: Likewise.
781         * modules/math: Likewise.
782         * modules/netinet_in: Likewise.
783         * modules/search: Likewise.
784         * modules/signal: Likewise.
785         * modules/stdint: Likewise.
786         * modules/stdio: Likewise.
787         * modules/stdlib: Likewise.
788         * modules/string: Likewise.
789         * modules/sys_select: Likewise.
790         * modules/sys_socket: Likewise.
791         * modules/sys_stat: Likewise.
792         * modules/sys_time: Likewise.
793         * modules/sysexits: Likewise.
794         * modules/time: Likewise.
795         * modules/unistd: Likewise.
796         * modules/wchar: Likewise.
797         * modules/wctype: Likewise.
798         * modules/sys_stat: Change maintainer to "all".
799         * modules/unistd: Likewise.
800
801 2007-06-20  Karl Berry  <karl@gnu.org>
802
803         * config/srclist.txt: track www changes in license files.
804
805 2007-06-20  Sergey Poznyakoff  <gray@gnu.org.ua>
806
807         * build-aux/bootstrap: Remove stray dot.
808         Make sure build_aux settings are honored when linking
809         gnulib_extra_files.
810
811 2007-06-19  Eric Blake  <ebb9@byu.net>
812
813         * modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
814         Allow compilation on cygwin.
815
816 2007-06-19  Jim Meyering  <jim@meyering.net>
817
818         xreadlink-with-size: Remove module.  No longer used.
819         Ex-callers now use xreadlink or mreadlink-with-size.
820         * modules/xreadlink-with-size: Remove module.
821         * lib/xreadlink-with-size.c: Remove file.
822         * lib/xreadlink.h (xreadlink_with_size): Remove prototype.
823         (xreadlink): Remove inaccurate comment.  The one in xreadlink.c,
824         just before the function definition *is* accurate.
825
826         Eliminate one way canonicalize_filename_mode could exit.
827         * lib/canonicalize.c (canonicalize_filename_mode):
828         Use mreadlink_with_size, not xreadlink_with_size.
829
830 2007-06-18  Paul Eggert  <eggert@cs.ucla.edu>
831
832         Detect porting problems to FreeBSD/arm, which has time_t wider than
833         long int.  Original problem reported for GNU diff by Xin Li in
834         <http://lists.gnu.org/archive/html/bug-gnu-utils/2007-06/msg00091.html>.
835         * modules/getdate (Depends-on): Add intprops, verify.
836         * lib/getdate.y: Include intprops.h, verify.h.  Verify that time_t
837         is an integer type no wider than long int.
838
839 2007-06-18  Jim Meyering  <jim@meyering.net>
840
841         New module: mreadlink-with-size.
842         * MODULES.html.sh: Add mreadlink-with-size.
843         * modules/mreadlink-with-size: New module
844         * modules/canonicalize (Depends-on): Depend on mreadlink-with-size,
845         not xreadlink-with-size.
846         * lib/mreadlink-with-size.c, lib/mreadlink.h: New files.
847
848 2007-06-16  Bruno Haible  <bruno@clisp.org>
849
850         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Catch the MacOS X 10.4 bug.
851         * doc/functions/frexpl.texi: Document the MacOS X 10.4 bug.
852         Reported by Gary V. Vaughan <gary@gnu.org>.
853
854 2007-06-15  Paul Eggert  <eggert@cs.ucla.edu>
855
856         Revamp lchown so that it lives in unistd.h where it belongs.
857         * lib/lchown.h: Remove.
858         * lib/dirchownmod.c: Don't include lib/lchown.h.
859         * lib/fchownat.c: Likewise.
860         * lib/openat.c: Likewise.
861         * lib/lchown.c (REPLACE_CHOWN): Define to 0 if the system chown
862         does not follow symlinks.
863         (EOPNOTSUPP): Define if not defined.
864         * lib/unistd_.h (chown): Do not replace if REPLADE_CHOWN
865         is defined to 0.
866         (lchown): New decl.
867         * m4/lchown.m4 (gl_FUNC_LCHOWN): Require gl_UNISTD_H_DEFAULTS.
868         Do not check for lchown decl.
869         Set REPLACE_LCHOWN.
870         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Set GNULIB_LCHOWN,
871         REPLACE_LCHOWN.
872         * modules/chown: Make it clear it follows symlinks.
873         * modules/lchown: Make it clear it doesn't follow symlinks.
874         (Files): Remove lib/lchown.h
875         (Depends-on): Add unistd.
876         (configure.ac): Add gl_UNISTD_MODULE_INDICATOR([lchown]).
877         (Include): Include <unistd.h>, not "lchown.h".
878         * modules/unistd (unistd.h): Substitude GNULIB_LCHOWN and
879         REPLACE_LCHOWN.
880
881 2007-06-15  Jim Meyering  <jim@meyering.net>
882
883         Change license (GPL to LGPL) of fsusage and dependents.
884         * modules/fsusage (License): Change to LGPL.
885         * modules/full-read (License): Likewise.
886         * modules/full-write (License): Likewise.
887         * modules/safe-read (License): Likewise.
888         * modules/safe-write (License): Likewise.
889
890 2007-06-14  Ben Pfaff  <blp@gnu.org>
891
892         Missing part of allocsa -> malloca transition.
893         * modules/relocatable-prog-wrapper: gl_ALLOCSA should be
894         gl_MALLOCA.
895
896 2007-06-12  Bruno Haible  <bruno@clisp.org>
897
898         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Guess no when cross-compiling
899         to ia64, x86_64, i386.
900         Reported by Eric Blake.
901
902 2007-06-12  Bruno Haible  <bruno@clisp.org>
903
904         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Guess no also when
905         cross-compiling to x86_64.
906
907 2007-06-12  Paul Eggert  <eggert@cs.ucla.edu>
908
909         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Fix POSIX sed portability
910         glitch reported by Ralf Wildenhues in
911         <http://lists.gnu.org/archive/html/bug-gnulib/2007-06/msg00114.html>.
912
913         * m4/regex.m4 (gl_REGEX): Catch a bug with [[:alnum:]_-] reported by
914         Vin Shelton.
915
916 2007-06-11  Bruno Haible  <bruno@clisp.org>
917
918         * lib/printf-args.c (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Fix NULL
919         replacement string.
920         Reported by Eric Blake.
921
922 2007-06-10  Bruno Haible  <bruno@clisp.org>
923
924         Prepare vasnprintf code for use with Unicode strings.
925         * lib/printf-args.h (PRINTF_FETCHARGS): New macro.
926         (arg_type) [ENABLE_UNISTDIO]: Define TYPE_U8_STRING, TYPE_U16_STRING,
927         TYPE_U32_STRING.
928         (argument) [ENABLE_UNISTDIO]: Add a_u8_string, a_u16_string,
929         a_u32_string variants.
930         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
931         * lib/printf-args.c: Don't include config.h and the specification
932         header if PRINTF_FETCHARGS is already defined.
933         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
934         (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Add code for TYPE_U8_STRING,
935         TYPE_U16_STRING, TYPE_U32_STRING.
936         * lib/printf-parse.h [ENABLE_UNISTDIO] (u8_directive, u8_directives,
937         u16_directive, u16_directives, u32_directive, u32_directives): New
938         types.
939         (ulc_printf_parse, u8_printf_parse, u16_printf_parse, u32_printf_parse):
940         New declarations.
941         * lib/printf-parse.c: Don't include config.h and the specification
942         header if PRINTF_PARSE is already defined. Eliminate the set of
943         parameters for WIDE_CHAR_VERSION; the user of this file must provide
944         them now. Include c-ctype.h.
945         (PRINTF_PARSE) [ENABLE_UNISTDIO]: Add code implementing the 'U'
946         directive and CHAR_T_ONLY_ASCII.
947         * lib/vasnprintf.c: Don't include config.h and the specification header
948         if VASNPRINTF is already defined.
949         (DCHAR_IS_TCHAR, DCHAR_CPY): New macros.
950         (VASNPRINTF): Use PRINTF_FETCHARGS instead of printf_fetchargs. Use
951         DCHAR_CPY. Handle the case that DCHAR_T and FCHAR_T are not the same
952         type. Handle the case that TCHAR_T and FCHAR_T are not of the same
953         size. Handle the case that DCHAR_T and TCHAR_T are not the same type,
954         add a conversion from TCHAR_T[] to DCHAR_T[], and rework the padding
955         code accordingly.
956         (VASNPRINTF) [ENABLE_UNISTDIO]: Implement the 'U' directive. Enable
957         pad_ourselves also in this case, with the 'c' and 's' directives, and
958         with a different notion of "width".
959         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): New macros.
960
961 2007-06-10  Bruno Haible  <bruno@clisp.org>
962
963         * modules/unistr/u32-mbsnlen: New file.
964         * lib/unistr/u32-mbsnlen.c: New file.
965
966         * modules/unistr/u16-mbsnlen: New file.
967         * lib/unistr/u16-mbsnlen.c: New file.
968
969         * modules/unistr/u8-mbsnlen: New file.
970         * lib/unistr/u8-mbsnlen.c: New file.
971
972         * lib/unistr.h (u8_mbsnlen, u16_mbsnlen, u32_mbsnlen): New
973         declarations.
974
975 2007-06-10  Bruno Haible  <bruno@clisp.org>
976
977         * lib/string_.h (mbsnlen): New declaration.
978         * lib/mbsnlen.c: New file.
979         * m4/mbsnlen.m4: New file.
980         * modules/mbsnlen: New file.
981         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Set GNULIB_MBSNLEN.
982         * modules/string (string.h): Substitute GNULIB_MBSNLEN.
983         * MODULES.html.sh (Internationalization functions): Add mbsnlen.
984
985 2007-06-10  Bruno Haible  <bruno@clisp.org>
986
987         * lib/mbslen.c: Include <stdlib.h>, needed for MB_CUR_MAX.
988
989 2007-06-10  Bruno Haible  <bruno@clisp.org>
990
991         * lib/mbiter.h: Include <stddef.h>, needed for ptrdiff_t.
992         * lib/mbuiter.h: Likewise.
993
994 2007-06-10  Bruno Haible  <bruno@clisp.org>
995
996         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Check for _snprintf
997         declaration.
998
999 2007-06-10  Karl Berry  <karl@gnu.org>
1000
1001         * config/srclist.txt: remove gettext entries, Bruno prefers
1002         to update individually.
1003
1004 2007-06-10  Bruno Haible  <bruno@clisp.org>
1005
1006         * lib/vasnprintf.c (VASNPRINTF) [!USE_SNPRINTF]: Remove variable
1007         'maxlen'. Ensure only length + width bytes are allocated, not
1008         length + 1 + width.
1009
1010 2007-06-09  Bruno Haible  <bruno@clisp.org>
1011
1012         * lib/vasnprintf.c (FCHAR_T, DCHAR_T, TCHAR_T): New macros.
1013         (CHAR_T): Remove macro.
1014         (VASNPRINTF): Update.
1015
1016 2007-06-09  Bruno Haible  <bruno@clisp.org>
1017
1018         * MODULES.html.sh (Unicode string functions): Add the new modules.
1019
1020         * modules/uniconv/u32-conv-to-enc: New file.
1021         * lib/uniconv/u32-conv-to-enc.c: New file.
1022         * modules/uniconv/u32-conv-to-enc-tests: New file.
1023         * tests/uniconv/test-u32-conv-to-enc.c: New file.
1024
1025         * modules/uniconv/u16-conv-to-enc: New file.
1026         * lib/uniconv/u16-conv-to-enc.c: New file.
1027         * lib/uniconv/u-conv-to-enc.h: New file.
1028         * modules/uniconv/u16-conv-to-enc-tests: New file.
1029         * tests/uniconv/test-u16-conv-to-enc.c: New file.
1030
1031         * modules/uniconv/u8-conv-to-enc: New file.
1032         * lib/uniconv/u8-conv-to-enc.c: New file.
1033         * modules/uniconv/u8-conv-to-enc-tests: New file.
1034         * tests/uniconv/test-u8-conv-to-enc.c: New file.
1035
1036         * lib/uniconv.h (u8_conv_to_encoding, u16_conv_to_encoding,
1037         u32_conv_to_encoding): New declarations.
1038
1039 2007-06-09  Bruno Haible  <bruno@clisp.org>
1040
1041         * tests/uniconv/test-u32-strconv-to-enc.c (main): Remove unused code.
1042
1043 2007-06-09  Bruno Haible  <bruno@clisp.org>
1044
1045         Rename 'allocsa' -> 'malloca', 'freesa' -> 'freea'.
1046         * modules/malloca: Renamed from modules/allocsa, updated.
1047         * lib/malloca.h: Renamed from lib/allocsa.h, updated.
1048         * lib/malloca.c: Renamed from lib/allocsa.c, updated.
1049         * lib/malloca.valgrind: Renamed from lib/allocsa.valgrind, updated.
1050         * m4/malloca.m4: Renamed from m4/allocsa.m4, updated.
1051         * modules/malloca-tests: Renamed from modules/allocsa-tests, updated.
1052         * tests/test-malloca.c: Renamed from tests/test-allocsa.c, updated.
1053         * modules/xmalloca: Renamed from modules/xallocsa, updated.
1054         * lib/xmalloca.h: Renamed from lib/xallocsa.h, updated.
1055         * lib/xmalloca.c: Renamed from lib/xallocsa.c, updated.
1056         * modules/c-strcasestr (Depends-on): Update.
1057         * lib/c-strcasestr.c: Update.
1058         * modules/c-strstr (Depends-on): Update.
1059         * lib/c-strstr.c: Update.
1060         * modules/canonicalize-lgpl (Depends-on): Update.
1061         * lib/canonicalize-lgpl.c: Update.
1062         * modules/clean-temp (Depends-on): Update.
1063         * lib/clean-temp.c: Update.
1064         * modules/csharpcomp (Depends-on): Update.
1065         * lib/csharpcomp.c: Update.
1066         * modules/csharpexec (Depends-on): Update.
1067         * lib/csharpexec.c: Update.
1068         * modules/javacomp (Depends-on): Update.
1069         * lib/javacomp.c: Update.
1070         * modules/javaexec (Depends-on): Update.
1071         * lib/javaexec.c: Update.
1072         * modules/mbscasestr (Depends-on): Update.
1073         * lib/mbscasestr.c: Update.
1074         * modules/mbsstr (Depends-on): Update.
1075         * lib/mbsstr.c: Update.
1076         * modules/setenv (Depends-on): Update.
1077         * lib/setenv.c: Update.
1078         * modules/strcasestr (Depends-on): Update.
1079         * lib/strcasestr.c: Update.
1080         * modules/striconveha (Depends-on): Update.
1081         * lib/striconveha.c: Update.
1082         * modules/relocatable-prog-wrapper (Files): Update.
1083         * lib/relocwrapper.c: Update.
1084         * build-aux/install-reloc: Update.
1085         * MODULES.html.sh (Memory management functions <stdlib.h>): Update.
1086
1087 2007-06-08  Bruno Haible  <bruno@clisp.org>
1088
1089         Port to uClibc.
1090         * lib/fbufmode.c (fbufmode): Add special code for uClibc.
1091         * lib/fpurge.c (fpurge): Likewise.
1092         * lib/freading.c (freading): Likewise.
1093         * lib/fseeko.c (rpl_fseeko): Likewise.
1094         * lib/fseterr.c (fseterr): Likewise.
1095         * lib/fwriting.c (fwriting): Likewise.
1096         * tests/test-fflush.c (main): Avoid a failure on uClibc.
1097
1098 2007-06-08  Bruno Haible  <bruno@clisp.org>
1099
1100         * m4/intlmacosx.m4: New file, extracted from gettext.m4.
1101         * m4/gettext.m4 (gt_INTL_MACOSX): Remove macro, moved to intlmacosx.m4.
1102         * modules/gettext (Files): Add m4/intlmacosx.m4.
1103
1104 2007-06-07  Bruno Haible  <bruno@clisp.org>
1105
1106         * modules/localename-tests: New file.
1107         * tests/test-localename.c: New file.
1108
1109         New module 'localename'.
1110         * lib/localename.h: New file.
1111         * lib/localename.c: New file, from GNU gettext.
1112         * m4/localename.m4: New file.
1113         * modules/localename: New file.
1114
1115 2007-06-07  Bruno Haible  <bruno@clisp.org>
1116
1117         Work around the lack of <wchar.h> on some builds of uClibc.
1118         * doc/headers/wchar.texi: Update.
1119         * lib/wchar_.h: Include <wchar.h> only if it exists.
1120         * m4/wchar.m4 (gl_WCHAR_H): Check for <wchar.h>. Set HAVE_WCHAR_H.
1121         * m4/stdint.m4 (gl_STDINT_H): Check for <wchar.h>.
1122         (gl_STDINT_TYPE_PROPERTIES): Don't try to include <wchar.h> if it
1123         doesn't exist.
1124         * modules/wchar (wchar.h): Substitute HAVE_WCHAR_H.
1125         * modules/mbfile (Depends-on): Add wchar.
1126         * modules/mbiter (Depends-on): Likewise.
1127         * modules/mbuiter (Depends-on): Likewise.
1128         Reported by Simon Josefsson.
1129
1130 2007-06-06  Paul Eggert  <eggert@cs.ucla.edu>
1131
1132         Work around problem reported by Steven M. Schweda in
1133         <http://lists.gnu.org/archive/html/bug-tar/2007-06/msg00002.html>:
1134         Tru64 5.1B with the Compaq compiler environment installed declares
1135         an 'isblank' function but does not define it in the C library.
1136         * lib/fnmatch.c (isblank): Check for HAVE_ISBLANK, too.
1137         * lib/regex_internal.h (isblank): Likewise.
1138         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for isblank existence.
1139         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
1140
1141 2007-06-05  Bruno Haible  <bruno@clisp.org>
1142
1143         Fix *printf so that it recognizes non-IEEE numbers on i386, x86_64,
1144         ia64.
1145         * modules/printf-safe: New file.
1146         * modules/fprintf-posix (Depends-on): Add printf-safe.
1147         * modules/printf-posix (Depends-on): Likewise.
1148         * modules/snprintf-posix (Depends-on): Likewise.
1149         * modules/sprintf-posix (Depends-on): Likewise.
1150         * modules/vasnprintf-posix (Depends-on): Likewise.
1151         * modules/vasprintf-posix (Depends-on): Likewise.
1152         * modules/vfprintf-posix (Depends-on): Likewise.
1153         * modules/vprintf-posix (Depends-on): Likewise.
1154         * modules/vsnprintf-posix (Depends-on): Likewise.
1155         * modules/vsprintf-posix (Depends-on): Likewise.
1156         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Require
1157         AC_C_BIGENDIAN. Define CHECK_PRINTF_SAFE if printf-safe is used. Test
1158         non-IEEE numbers on i386, x86_64, ia64. When cross-compiling, guess
1159         "no" on i386, x86_64, ia64.
1160         * tests/test-snprintf-posix.h (LDBL80_WORDS): New macro.
1161         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
1162         on i386, x86_64, ia64.
1163         * tests/test-sprintf-posix.h (LDBL80_WORDS): New macro.
1164         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
1165         on i386, x86_64, ia64.
1166         * tests/test-vasnprintf-posix.c: Include float.h.
1167         (LDBL80_WORDS): New macro.
1168         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
1169         on i386, x86_64, ia64.
1170         * tests/test-vasprintf-posix.c: Include float.h.
1171         (LDBL80_WORDS): New macro.
1172         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
1173         on i386, x86_64, ia64.
1174         * tests/test-snprintf-posix.c: Include float.h.
1175         * tests/test-sprintf-posix.c: Likewise.
1176         * tests/test-vsnprintf-posix.c: Likewise.
1177         * tests/test-vsprintf-posix.c: Likewise.
1178
1179 2007-06-05  Bruno Haible  <bruno@clisp.org>
1180
1181         Fix isnanl so that it recognizes non-IEEE numbers on i386, x86_64, ia64.
1182         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Require AC_C_BIGENDIAN. Test
1183         non-IEEE numbers on i386, x86_64, ia64.
1184         (gl_LONG_DOUBLE_EXPONENT_LOCATION): Require AC_C_BIGENDIAN.
1185         * lib/isnan.c (FUNC): Add special code for i386, x86_64, ia64.
1186         * tests/test-isnanl.h: Include float.h.
1187         (main): Check also non-IEEE numbers on i386, x86_64, ia64.
1188
1189 2007-06-05  Bruno Haible  <bruno@clisp.org>
1190
1191         * lib/vasnprintf.c (VASNPRINTF): Do the extra handling of NaN and Inf
1192         also the %a / %A. Handle the %a / %A code before this extra handling.
1193
1194 2007-06-05  Bruno Haible  <bruno@clisp.org>
1195
1196         * lib/vasnprintf.c [NEED_PRINTF_LONG_DOUBLE ||
1197         NEED_PRINTF_INFINITE_LONG_DOUBLE]: Include fpucw.h.
1198
1199 2007-06-05  Bruno Haible  <bruno@clisp.org>
1200
1201         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): Fix
1202         typo in variable name.
1203
1204 2007-06-05  Eric Blake  <ebb9@byu.net>
1205
1206         * m4/lseek.m4 (gl_FUNC_LSEEK): Work when cross-compiling.
1207         Reported by Simon Josefsson.
1208
1209 2007-06-04  Bruno Haible  <bruno@clisp.org>
1210
1211         Avoid test failures on some PowerPC platforms.
1212         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP):
1213         Define differently for PowerPC.
1214         * tests/test-frexpl.c (MIN_NORMAL_EXP): Likewise.
1215         Reported by Gary V. Vaughan <gary@gnu.org>.
1216
1217 2007-06-02  Bruno Haible  <bruno@clisp.org>
1218
1219         Fix test-stdint failure on FreeBSD/ia64.
1220         * m4/stdint.m4 (gl_STDINT_H): Check the values of PTRDIFF_MIN,
1221         PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN,
1222         WCHAR_MAX, WINT_MIN, WINT_MAX entirely, not only for plausibility.
1223         * doc/headers/stdint.texi: Update.
1224
1225 2007-06-01  Bruno Haible  <bruno@clisp.org>
1226
1227         * tests/test-binary-io.c (main): Pass a third argument to open().
1228         Reported by Gary V. Vaughan <gary@gnu.org>.
1229
1230 2007-06-01  Bruno Haible  <bruno@clisp.org>
1231
1232         * doc/functions/frexpl.texi: Update for mingw.
1233
1234 2007-06-01  Bruno Haible  <bruno@clisp.org>
1235
1236         * tests/test-lseek.c (main): Disable test of errno for invalid third
1237         argument.
1238         * doc/functions/lseek.texi: Update.
1239         Reported by Gary V. Vaughan <gary@gnu.org>.
1240
1241 2007-05-28  Bruno Haible  <bruno@clisp.org>
1242
1243         * m4/intl.m4 (AM_INTL_SUBDIR): Substitute variables WOE32, WINDRES.
1244
1245 2007-05-31  Eric Blake  <ebb9@byu.net>
1246
1247         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Guess no on mingw when
1248         cross compiling.
1249
1250 2007-05-30  Eric Blake  <ebb9@byu.net>
1251         and Bruno Haible  <bruno@clisp.org>
1252
1253         Work around mingw test failures exposed by m4-1.4.9b.
1254         * m4/stdint.m4 (gl_STDINT_H): Detect mingw bug.
1255         * tests/test-unistd.c: Disable uid_t and git_t tests for the
1256         moment.
1257
1258 2007-05-30  Bruno Haible  <bruno@clisp.org>
1259
1260         * tests/test-lseek.c: Explicitly close file descriptors 0 and 1 before
1261         assuming that they are closed. Needed on HP-UX 11.
1262
1263 2007-05-29  Bruno Haible  <bruno@clisp.org>
1264
1265         Fix a problem with #include_next.
1266         * lib/dirent_.h: Split the double-inclusion guard.
1267         * lib/fcntl_.h: Likewise.
1268         * lib/float_.h: Likewise.
1269         * lib/iconv_.h: Likewise.
1270         * lib/inttypes_.h: Likewise.
1271         * lib/locale_.h: Likewise.
1272         * lib/math_.h: Likewise.
1273         * lib/netinet_in_.h: Likewise.
1274         * lib/search_.h: Likewise.
1275         * lib/signal_.h: Likewise.
1276         * lib/stdint_.h: Likewise.
1277         * lib/stdio_.h: Likewise.
1278         * lib/stdlib_.h: Likewise.
1279         * lib/string_.h: Likewise.
1280         * lib/sys_select_.h: Likewise.
1281         * lib/sys_socket_.h: Likewise.
1282         * lib/sys_stat_.h: Likewise.
1283         * lib/sys_time_.h: Likewise.
1284         * lib/sysexits_.h: Likewise.
1285         * lib/time_.h: Likewise.
1286         * lib/unistd_.h: Likewise.
1287         * lib/wchar_.h: Likewise.
1288         * lib/wctype_.h: Likewise.
1289
1290 2007-05-29  Bruno Haible  <bruno@clisp.org>
1291
1292         * tests/test-unistd.c: Disable the tests for useconds_t and intptr_t
1293         for the moment.
1294
1295 2007-05-29  Bruno Haible  <bruno@clisp.org>
1296
1297         * m4/isnan.m4 (gl_DOUBLE_EXPONENT_LOCATION): Silence the AC_C_BIGENDIAN
1298         invocation.
1299         Reported by Eric Blake.
1300
1301 2007-05-29  Bruno Haible  <bruno@clisp.org>
1302
1303         * m4/isnanf.m4 (gl_FLOAT_EXPONENT_LOCATION): Fix typo in cross-
1304         compiling case.
1305
1306 2007-05-29  Eric Blake  <ebb9@byu.net>
1307             Bruno Haible  <bruno@clisp.org>
1308
1309         * m4/isnanf.m4 (gl_FUNC_ISNANF_NO_LIBM): Avoid syntax error on
1310         cross compiles.
1311
1312 2007-05-28  Eric Blake  <ebb9@byu.net>
1313
1314         * modules/closein-tests (test_closein_LDADD): Support test on
1315         cygwin with libtool.
1316
1317 2007-05-28  Bruno Haible  <bruno@clisp.org>
1318
1319         * tests/uniconv/test-u16-conv-from-enc.c: Remove #ifdef HAVE_CONFIG_H.
1320         * tests/uniconv/test-u16-strconv-from-enc.c: Likewise.
1321         * tests/uniconv/test-u16-strconv-to-enc.c: Likewise.
1322         * tests/uniconv/test-u32-conv-from-enc.c: Likewise.
1323         * tests/uniconv/test-u32-strconv-from-enc.c: Likewise.
1324         * tests/uniconv/test-u32-strconv-to-enc.c: Likewise.
1325         * tests/uniconv/test-u8-conv-from-enc.c: Likewise.
1326         * tests/uniconv/test-u8-strconv-from-enc.c: Likewise.
1327         * tests/uniconv/test-u8-strconv-to-enc.c: Likewise.
1328
1329 2007-05-28  Eric Blake  <ebb9@byu.net>
1330
1331         Unconditionally include <config.h> in unit tests.
1332         * tests/test-alloca-opt.c: Remove #ifdef HAVE_CONFIG_H.
1333         * tests/test-allocsa.c, tests/test-arcfour.c,
1334         tests/test-arctwo.c, tests/test-argmatch.c, tests/test-argp.c,
1335         tests/test-array_list.c, tests/test-array_oset.c,
1336         tests/test-atexit.c, test-avltree_list.c, test-avltree_oset.c,
1337         test-avltreehash_list.c, test-base64.c, test-binary-io.c,
1338         test-c-ctype.c, test-c-strcasecmp.c, test-c-strcasestr.c,
1339         test-c-strncasecmp.c, test-c-strstr.c, test-canonicalize-lgpl.c,
1340         test-carray_list.c, test-crc.c, test-des.c, test-dirname.c,
1341         test-fflush.c, test-fprintf-posix.c, test-gc-arcfour.c,
1342         test-gc-arctwo.c, test-gc-des.c, test-gc-hmac-md5.c,
1343         test-gc-hmac-sha1.c, test-gc-md2.c, test-gc-md4.c, test-gc-md5.c,
1344         test-gc-pbkdf2-sha1.c, test-gc-rijndael.c, test-gc-sha1.c,
1345         test-gc.c, test-getpass.c, test-hmac-md5.c, test-hmac-sha1.c,
1346         test-iconv.c, test-linked_list.c, test-linkedhash_list.c,
1347         test-lock.c, test-mbscasecmp.c, test-mbscasestr1.c,
1348         test-mbscasestr2.c, test-mbscasestr3.c, test-mbscasestr4.c,
1349         test-mbschr.c, test-mbscspn.c, test-mbsncasecmp.c, test-mbspbrk.c,
1350         test-mbspcasecmp.c, test-mbsrchr.c, test-mbsspn.c, test-mbsstr1.c,
1351         test-mbsstr2.c, test-mbsstr3.c, test-md2.c, test-md4.c,
1352         test-md5.c, test-memmem.c, test-printf-posix.c,
1353         test-rbtree_list.c, test-rbtree_oset.c, test-rbtreehash_list.c,
1354         test-read-file.c, test-rijndael.c, test-snprintf-posix.c,
1355         test-snprintf.c, test-sprintf-posix.c, test-stdint.c,
1356         test-strcasestr.c, test-striconv.c, test-striconveh.c,
1357         test-striconveha.c, test-tls.c, test-vasnprintf-posix.c,
1358         test-vasnprintf-posix2.c, test-vasnprintf.c,
1359         test-vasprintf-posix.c, test-vasprintf.c, test-verify.c,
1360         test-vfprintf-posix.c, test-vprintf-posix.c,
1361         test-vsnprintf-posix.c, test-vsnprintf.c, test-vsprintf-posix.c,
1362         test-xvasprintf.c: Likewise.
1363
1364 2007-05-28  Bruno Haible  <bruno@clisp.org>
1365
1366         * gnulib-tool (func_import): Remember the --with-tests command-line
1367         option through the macro gl_WITH_TESTS in the gnulib-cache.m4.
1368         Reported by Eric Blake.
1369
1370 2007-05-28  Bruno Haible  <bruno@clisp.org>
1371
1372         * modules/ftell-tests: New file.
1373         * tests/test-ftell.c: New file, based on tests/test-ftello.c.
1374         * tests/test-ftell.sh: New file, based on tests/test-ftello.sh.
1375
1376         * lib/ftell.c: New file.
1377         * modules/ftell: New file.
1378         * m4/ftell.m4: New file.
1379         * doc/functions/ftell.texi: Update.
1380         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELL,
1381         REPLACE_FTELL.
1382         * lib/stdio_.h (rpl_ftell): New declaration.
1383         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELL,
1384         REPLACE_FTELL.
1385
1386 2007-05-28  Eric Blake  <ebb9@byu.net>
1387
1388         * lib/allocsa.h (safe_alloca): Avoid compiler warning.
1389
1390 2007-05-28  Bruno Haible  <bruno@clisp.org>
1391
1392         * modules/fseek-tests: New file.
1393         * tests/test-fseek.c: New file, based on tests/test-fseeko.c.
1394         * tests/test-fseek.sh: New file, based on tests/test-fseeko.sh.
1395
1396         * lib/fseek.c: New file.
1397         * modules/fseek: New file.
1398         * m4/fseek.m4: New file.
1399         * doc/functions/fseek.texi: Update.
1400         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEK,
1401         REPLACE_FSEEK.
1402         * lib/stdio_.h (rpl_fseek): New declaration.
1403         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEK,
1404         REPLACE_FSEEK.
1405
1406 2007-05-28  Bruno Haible  <bruno@clisp.org>
1407
1408         * lib/stdio_.h (fflush): More comments.
1409
1410 2007-05-28  Bruno Haible  <bruno@clisp.org>
1411
1412         * m4/lseek.m4 (gl_FUNC_LSEEK): When not cross-compiling, perform a real
1413         runtime test.
1414
1415 2007-05-28  Eric Blake  <ebb9@byu.net>
1416
1417         Improve lseek module.
1418         * lib/lseek.c (rpl_lseek): Detect EBADF on mingw.
1419         * lib/unistd_.h (lseek): Scale back link warning message.
1420         * tests/test-lseek.c: Beef up test.
1421         * tests/test-lseek.sh: Exercise more facets of lseek.
1422         Reported by Bruno Haible.
1423
1424 2007-05-28  Bruno Haible  <bruno@clisp.org>
1425
1426         * tests/test-unistd.c: Test all the types that <unistd.h> is expected
1427         to define.
1428
1429 2007-05-27  Bruno Haible  <bruno@clisp.org>
1430
1431         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-31 patch.
1432
1433 2007-05-27  Bruno Haible  <bruno@clisp.org>
1434
1435         * modules/openmp: New file.
1436         * m4/openmp.m4: New file, taken from autoconf's CVS with changes by
1437         Noah Misch.
1438
1439 2007-05-26  Bruno Haible  <bruno@clisp.org>
1440
1441         * modules/chdir-long (Depends-on): Add fchdir.
1442         * modules/chdir-safer (Depends-on): Likewise.
1443         * modules/fts (Depends-on): Likewise.
1444         * modules/fts-lgpl (Depends-on): Likewise.
1445         * modules/openat (Depends-on): Likewise.
1446         * modules/savewd (Depends-on): Likewise.
1447
1448 2007-05-24  Eric Blake  <ebb9@byu.net>
1449
1450         Fix lseek on mingw.
1451         * modules/lseek: New module.
1452         * m4/lseek.m4: New file.
1453         * lib/lseek.c: New file.
1454         * modules/lseek-tests: New file.
1455         * tests/test-lseek.c: New file.
1456         * tests/test-lseek.sh: New file.
1457         * MODULES.html.sh: Document lseek module.
1458         * modules/fflush (Depends-on): Add lseek, fseeko.
1459         * modules/fseeko (Depends-on): Likewise.
1460         * modules/ftello (Depends-on): Likewise.
1461         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Replace fseek[o] if lseek is
1462         broken.
1463         * m4/ftello.m4 (gl_FUNC_FTELLO): Replace ftell[o] if lseek is
1464         broken.
1465         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Trigger fseeko module.
1466         * lib/fseeko.c (rpl_fseeko): Quit early on non-seekable files.
1467         * lib/ftello.c (rpl_ftello): Likewise.
1468         * tests/test-fseeko.c (main): Test this.
1469         * tests/test-fseeko.sh: Likewise.
1470         * tests/test-ftello.c (main): Likewise.
1471         * tests/test-ftello.sh: Likewise.
1472         * lib/stdio_.h (fseek, ftell): Simplify, since missing fseeko now
1473         implies replacing fseek.
1474         * modules/stdio (Makefile.am): No longer need HAVE_FSEEKO,
1475         HAVE_FTELLO.
1476         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add lseek info.
1477         * modules/unistd (Makefile.am): Likewise.
1478         * lib/unistd_.h (lseek): Declare a replacement.
1479         * doc/functions/lseek.texi (lseek): Document this fix.
1480         * doc/functions/fseek.texi (fseek): Likewise.
1481         * doc/functions/ftell.texi (ftell): Likewise.
1482
1483 2007-05-24  Bruno Haible  <bruno@clisp.org>
1484
1485         * tests/test-vasnprintf-posix.c (test_function): Allow up to 50 bytes
1486         in the printed representation of a NaN.
1487         * tests/test-vasprintf-posix.c (test_function): Likewise.
1488         * tests/test-snprintf-posix.h (test_function): Likewise.
1489         * tests/test-sprintf-posix.h (test_function): Likewise.
1490         Reported by Eric Blake.
1491
1492 2007-05-23  Eric Blake  <ebb9@byu.net>
1493
1494         Fix fseeko/ftello on cygwin 1.5.24.
1495         * doc/functions/fseeko.texi (fseeko): Document the fix.
1496         * doc/functions/ftello.texi (ftello): Document the fix.
1497         * doc/functions/stdin.texi (stdin): Document the cygwin bug.
1498         * doc/functions/stdout.text (stdout): New file.
1499         * doc/functions/stderr.text (stderr): New file.
1500         * doc/gnulib.texi (Function Substitutes): Use new files.
1501         * tests/test-fseeko.c (main): Check for broken fseeko on cygwin
1502         prior to 1.7.0.
1503         * tests/test-ftello.c (main): Likewise for ftello.
1504         * tests/test-fseeko.sh: New file.
1505         * tests/test-ftello.sh: New file.
1506         * modules/fseeko-tests (Makefile.am): Ensure test-fseeko is run
1507         with seekable stdin.
1508         * modules/ftello-tests (Makefile.am): Likewise for test-ftello.
1509         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Detect the cygwin bug.
1510         (gl_REPLACE_FSEEKO): New macro.
1511         * m4/ftello.m4 (gl_FUNC_FTELLO, gl_REPLACE_FTELLO): Likewise.
1512         * modules/fseeko (Files): Distribute fseeko.c.
1513         * modules/ftello (Files): Distribute ftello.c.
1514         * lib/fseeko.c (rpl_fseeko) [__CYGWIN__]: Convert stdin to 64-bit
1515         mode.
1516         * lib/ftello.c (rpl_ftello): New file.
1517         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Allow replacement of
1518         fseeko, ftello.
1519         (gl_STDIN_LARGE_OFFSET): New macro.
1520         * modules/stdio (Makefile.am): Perform the replacement.
1521         * lib/stdio_.h (rpl_fseeko, rpl_ftello): Define when needed.
1522
1523 2007-05-23  Bruno Haible  <bruno@clisp.org>
1524
1525         * lib/stdio_.h (fseeko, ftello): Provide a link warning only if
1526         GNULIB_POSIXCHECK is defined.
1527
1528 2007-05-21  Bruno Haible  <bruno@clisp.org>
1529
1530         * m4/printf.m4 (gl_PRINTF_INFINITE, gl_PRINTF_INFINITE_LONG_DOUBLE):
1531         Check also the output for NaN arguments. When cross-compiling, guess
1532         no on IRIX.
1533         * lib/vasnprintf.c: Update comments.
1534         * tests/test-vasnprintf-posix.c (strisnan): New function.
1535         (test_function): Use it.
1536         * tests/test-vasprintf-posix.c (strisnan): New function.
1537         (test_function): Use it.
1538         * tests/test-snprintf-posix.h (strisnan): New function.
1539         (test_function): Use it.
1540         * tests/test-sprintf-posix.h (strisnan): New function.
1541         (test_function): Use it.
1542         Reported by Eric Blake.
1543
1544 2007-05-20  Bruno Haible  <bruno@clisp.org>
1545
1546         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Add test for large finite
1547         numbers that fails on BeOS.
1548         * doc/functions/frexpl.texi: Update.
1549
1550 2007-05-20  Jim Meyering  <jim@meyering.net>
1551
1552         * NEWS: Mention the incompatible change (s/futimens/gl_futimens/)
1553         forced upon us by glibc-2.6.
1554
1555 2007-05-20  Bruno Haible  <bruno@clisp.org>
1556
1557         Fix *printf result for NaN, Inf on AIX, Solaris, OSF/1.
1558         * m4/printf.m4 (gl_PRINTF_INFINITE): Update cross-compiling guesses.
1559         (gl_PRINTF_INFINITE_LONG_DOUBLE): New macro.
1560         * lib/vasnprintf.c: Use NEED_PRINTF_INFINITE_DOUBLE instead of
1561         NEED_PRINTF_INFINITE.
1562         (is_infinitel): New function.
1563         (VASNPRINTF): Handle NEED_PRINTF_INFINITE_LONG_DOUBLE case.
1564         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE): Renamed from
1565         gl_PREREQ_VASNPRINTF_INFINITE.
1566         (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): New macro.
1567         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
1568         gl_PRINTF_INFINITE_LONG_DOUBLE and test its result. Invoke
1569         gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE and
1570         gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE instead of
1571         gl_PREREQ_VASNPRINTF_INFINITE.
1572         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
1573         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1574         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1575         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1576         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
1577         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1578         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1579         * doc/functions/fprintf.texi: Update.
1580         * doc/functions/printf.texi: Update.
1581         * doc/functions/snprintf.texi: Update.
1582         * doc/functions/sprintf.texi: Update.
1583         * doc/functions/vfprintf.texi: Update.
1584         * doc/functions/vprintf.texi: Update.
1585         * doc/functions/vsnprintf.texi: Update.
1586         * doc/functions/vsprintf.texi: Update.
1587
1588 2007-05-20  Bruno Haible  <bruno@clisp.org>
1589
1590         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): Set REPLACE_FREXPL if frexpl
1591         was not found in libc.
1592         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Likewise.
1593
1594 2007-05-20  Bruno Haible  <bruno@clisp.org>
1595
1596         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
1597         printed as "-nan" instead of "nan".
1598         * tests/test-vasprintf-posix.c (test_function): Likewise.
1599         * tests/test-snprintf-posix.h (test_function): Likewise.
1600         * tests/test-sprintf-posix.h (test_function): Likewise.
1601         Needed for HP-UX 11.
1602
1603 2007-05-20  Jim Meyering  <jim@meyering.net>
1604
1605         Fix buggy test for the fchownat-deref bug.
1606         * m4/openat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Create the dangling
1607         symlink required for the run-test.  Without it, this test would
1608         always declare that fchownat doesn't work, and client code would
1609         unnecessarily use the replacement function with fixed libc.
1610         (gl_FUNC_FCHOWNAT): Eliminate a variable that wasn't initialized.
1611         Reported by Greg Schafer.
1612
1613 2007-05-19  Bruno Haible  <bruno@clisp.org>
1614
1615         * m4/isnanf.m4 (gl_ISNANF_WORKS): New macro.
1616         (gl_FUNC_ISNANF_NO_LIBM): Invoke it.
1617         * lib/isnan.c (FUNC): Use run-time expressions for SGI compiler.
1618         Needed for IRIX 6.5 and Solaris 2.5.1.
1619
1620 2007-05-19  Bruno Haible  <bruno@clisp.org>
1621
1622         * tests/test-vasnprintf-posix.c (have_minus_zero): New function.
1623         (test_function): Skip tests involving -0.0 on platforms where
1624         -0.0 = 0.0.
1625         * tests/test-vasprintf-posix.c (have_minus_zero): New function.
1626         (test_function): Skip tests involving -0.0 on platforms where
1627         -0.0 = 0.0.
1628         * tests/test-snprintf-posix.h (have_minus_zero): New function.
1629         (test_function): Skip tests involving -0.0 on platforms where
1630         -0.0 = 0.0.
1631         * tests/test-sprintf-posix.h (have_minus_zero): New function.
1632         (test_function): Skip tests involving -0.0 on platforms where
1633         -0.0 = 0.0.
1634         * tests/test-fprintf-posix.h (test_function): Remove all -0.0 related
1635         tests.
1636         * tests/test-printf-posix.h (test_function): Likewise.
1637         * tests/test-printf-posix.output: Remove all -0.0 related results.
1638         Needed for IRIX 6.5.
1639
1640 2007-05-19  Bruno Haible  <bruno@clisp.org>
1641
1642         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
1643         printed as "nan0x7fffffff" instead of "nan".
1644         * tests/test-vasprintf-posix.c (test_function): Likewise.
1645         * tests/test-snprintf-posix.h (test_function): Likewise.
1646         * tests/test-sprintf-posix.h (test_function): Likewise.
1647         * tests/test-fprintf-posix.h (NaN): Remove macro.
1648         (test_function): Remove all NaN related tests.
1649         * tests/test-printf-posix.h (NaN): Remove macro.
1650         (test_function): Remove all NaN related tests.
1651         * tests/test-printf-posix.output: Remove all NaN related results.
1652         Needed for IRIX 6.5.
1653
1654 2007-05-19  Bruno Haible  <bruno@clisp.org>
1655
1656         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Fix C89 syntax error in test code.
1657         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Likewise.
1658
1659 2007-05-19  Bruno Haible  <bruno@clisp.org>
1660
1661         * lib/float_.h: New file.
1662         * m4/float_h.m4: New file.
1663         * modules/float: New file.
1664         * modules/isnanl (Dependencies): Add float.
1665         * modules/isnanl-nolibm (Dependencies): Likewise.
1666         * modules/mathl (Dependencies): Likewise.
1667         * modules/printf-frexpl (Dependencies): Likewise.
1668         * modules/signbit (Dependencies): Likewise.
1669         * modules/vasnprintf (Dependencies): Likewise.
1670         * doc/headers/float.texi: Update.
1671
1672 2007-05-19  Jim Meyering  <jim@meyering.net>
1673
1674         * lib/utimens.c (gl_futimens): Rename from futimens,
1675         now that glibc-2.6 declares futimens.
1676         * lib/utimens.h: Likewise.
1677
1678 2007-05-19  Bruno Haible  <bruno@clisp.org>
1679
1680         Avoid test failures on mingw.
1681         * tests/test-fprintf-posix.sh: Convert CR/LF to LF in output.
1682         * tests/test-printf-posix.sh: Likewise.
1683         * tests/test-vfprintf-posix.sh: Likewise.
1684         * tests/test-vprintf-posix.sh: Likewise.
1685
1686 2007-05-19  Bruno Haible  <bruno@clisp.org>
1687
1688         Fix *printf result for NaN, Inf, -0.0 on mingw.
1689         * m4/printf.m4 (gl_PRINTF_INFINITE): New macro.
1690         * lib/vasnprintf.c: Include math.h and isnan.h.
1691         (is_infinite_or_zero): New function.
1692         (VASNPRINTF): Fix also the handling of infinite or zero 'double'
1693         values in the %f, %F, %e, %E, %g, %G directives.
1694         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE): New macro.
1695         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
1696         gl_PRINTF_INFINITE and test its result. Invoke
1697         gl_PREREQ_VASNPRINTF_INFINITE.
1698         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
1699         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1700         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1701         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1702         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
1703         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1704         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1705         * doc/functions/fprintf.texi: Update.
1706         * doc/functions/printf.texi: Update.
1707         * doc/functions/snprintf.texi: Update.
1708         * doc/functions/sprintf.texi: Update.
1709         * doc/functions/vfprintf.texi: Update.
1710         * doc/functions/vprintf.texi: Update.
1711         * doc/functions/vsnprintf.texi: Update.
1712         * doc/functions/vsprintf.texi: Update.
1713
1714 2007-05-19  Bruno Haible  <bruno@clisp.org>
1715
1716         * lib/vasnprintf.c (convert_to_decimal): Add an extra_zeroes argument.
1717         (scale10_round_decimal_long_double): Inline scale10_round_long_double.
1718         Instead of multiplying with 10^k, set extra_zeroes to k.
1719         (scale10_round_long_double): Remove function.
1720
1721 2007-05-18  Bruno Haible  <bruno@clisp.org>
1722
1723         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Fix logic bug
1724         introduced on 2007-05-06.
1725
1726 2007-05-18  Bruno Haible  <bruno@clisp.org>
1727
1728         * tests/test-vasnprintf-posix.c (test_function): Also test the %e and
1729         %g directives.
1730         * tests/test-vasprintf-posix.c (test_function): Likewise.
1731         * tests/test-snprintf-posix.h (test_function): Likewise.
1732         * tests/test-sprintf-posix.h (test_function): Likewise.
1733
1734 2007-05-18  Bruno Haible  <bruno@clisp.org>
1735
1736         * tests/test-vasnprintf-posix.c (SIZEOF): New macro.
1737         (strmatch): New function.
1738         (test_function): Test the %f directive on numbers of various exponents.
1739         * tests/test-vasprintf-posix.c (SIZEOF): New macro.
1740         (strmatch): New function.
1741         (test_function): Test the %f directive on numbers of various exponents.
1742         * tests/test-snprintf-posix.h (strmatch): New function.
1743         (test_function): Test the %f directive on numbers of various exponents.
1744         * tests/test-sprintf-posix.h (strmatch): New function.
1745         (test_function): Test the %f directive on numbers of various exponents.
1746         * tests/test-snprintf-posix.c (SIZEOF): New macro.
1747         * tests/test-sprintf-posix.c (SIZEOF): New macro.
1748         * tests/test-vsnprintf-posix.c (SIZEOF): New macro.
1749         * tests/test-vsprintf-posix.c (SIZEOF): New macro.
1750
1751 2007-05-18  Bruno Haible  <bruno@clisp.org>
1752
1753         Add support for 'long double' number output.
1754         * m4/printf.m4 (gl_PRINTF_LONG_DOUBLE): New macro.
1755         * lib/vasnprintf.c: Include math.h and float+.h.
1756         (mp_limb_t): New type.
1757         (GMP_LIMB_BITS): New macro.
1758         (mp_twolimb_t): New type.
1759         (GMP_TWOLIMB_BITS): New macro.
1760         (mpn_t): New type.
1761         (multiply, divide, convert_to_decimal, decode_long_double,
1762         scale10_round_long_double, scale10_round_decimal_long_double,
1763         floorlog10l): New functions.
1764         (VASNPRINTF) [NEED_PRINTF_LONG_DOUBLE]: Implement 'long double' support
1765         for the %f, %F, %e, %E, %g, %G directives.
1766         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_LONG_DOUBLE): New macro.
1767         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
1768         gl_PRINTF_LONG_DOUBLE and test its result. Invoke
1769         gl_PREREQ_VASNPRINTF_LONG_DOUBLE.
1770         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
1771         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1772         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1773         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1774         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
1775         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1776         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1777         * modules/fprintf-posix (Depends-on): Add frexpl-nolibm.
1778         * modules/snprintf-posix (Depends-on): Likewise.
1779         * modules/sprintf-posix (Depends-on): Likewise.
1780         * modules/vasnprintf-posix (Depends-on): Likewise.
1781         * modules/vasprintf-posix (Depends-on): Likewise.
1782         * modules/vfprintf-posix (Depends-on): Likewise.
1783         * modules/vsnprintf-posix (Depends-on): Likewise.
1784         * modules/vsprintf-posix (Depends-on): Likewise.
1785         * modules/vasnprintf (Files): Add lib/float+.h.
1786         * doc/functions/fprintf.texi: Update.
1787         * doc/functions/printf.texi: Update.
1788         * doc/functions/snprintf.texi: Update.
1789         * doc/functions/sprintf.texi: Update.
1790         * doc/functions/vfprintf.texi: Update.
1791         * doc/functions/vprintf.texi: Update.
1792         * doc/functions/vsnprintf.texi: Update.
1793         * doc/functions/vsprintf.texi: Update.
1794
1795 2007-05-18  Bruno Haible  <bruno@clisp.org>
1796
1797         * lib/vasnprintf.c (USE_SNPRINTF): Define to 0 on BeOS.
1798
1799 2007-05-18  Bruno Haible  <bruno@clisp.org>
1800
1801         * lib/vasnprintf.c (VASNPRINTF) [WIN32]: Use %I64d instead of %lld
1802         for printing 64-bit integers. Needed for mingw.
1803
1804 2007-05-18  Bruno Haible  <bruno@clisp.org>
1805
1806         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
1807         gl_FUNC_FREXPL_WORKS.
1808         * modules/printf-frexpl (Files): Add m4/frexpl.m4.
1809
1810 2007-05-18  Bruno Haible  <bruno@clisp.org>
1811
1812         * modules/frexpl-nolibm-tests: New file.
1813
1814         * modules/frexpl-nolibm: New file.
1815         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): New macro.
1816
1817 2007-05-17  Paul Eggert  <eggert@cs.ucla.edu>
1818
1819         * lib/dirent_.h: Prefer #include_next <foo.h> to #include
1820         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
1821         GCC 4.2, which otherwise issues a lot of warnings.
1822         * lib/iconv_.h, lib/locale_.h, lib/netinet_in_.h, lib/sys_select_.h:
1823         * lib/sys_socket_.h, lib/sys_stat_.h, lib/sysexits_.h, lib/unistd_.h:
1824         Likewise.
1825         * modules/fchdir (dirent.h): Substitute @HAVE_INCLUDE_NEXT@.
1826         * modules/iconv_open (iconv.h): Likewise.
1827         * modules/locale (locale.h): Likewise.
1828         * modules/netinet_in (netinet/in.h): Likewise.
1829         * modules/sys_select (sys_select.h): Likewise.
1830         * modules/sys_socket (sys/socket.h): Likewise.
1831         * modules/sys_stat (sys/stat.h): Likewise.
1832         * modules/sysexits (sysexits.h): Likewise.
1833         * modules/unistd (unistd.h): Likewise.
1834
1835 2007-05-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1836
1837         * modules/closein-tests (Makefile.am): Distribute
1838         `test-closein.sh'.
1839
1840 2007-05-17  Bruno Haible  <bruno@clisp.org>
1841
1842         * tests/test-printf-posix.output: Renamed from
1843         tests/test-fprintf-posix.out.
1844         * modules/fprintf-posix-tests: Update.
1845         * modules/printf-posix-tests: Update.
1846         * modules/vfprintf-posix-tests: Update.
1847         * modules/vprintf-posix-tests: Update.
1848         * tests/test-fprintf-posix.sh: Update.
1849         * tests/test-printf-posix.sh: Update.
1850         * tests/test-vfprintf-posix.sh: Update.
1851         * tests/test-vprintf-posix.sh: Update.
1852         Reported by Ralf Wildenhues.
1853
1854 2007-05-16  Paul Eggert  <eggert@cs.ucla.edu>
1855
1856         * lib/fcntl_.h: Prefer #include_next <foo.h> to #include
1857         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
1858         GCC 4.2, which otherwise issues a lot of warnings.
1859         * lib/inttypes_.h, lib/math_.h, lib/search_.h, lib/signal_.h:
1860         * lib/stdint_.h, lib/stdio_.h, lib/stdlib_.h, lib/string_.h:
1861         * lib/sys_time_.h, lib/time_.h, lib/wchar_.h, lib/wctype_.h: Likewise.
1862         * lib/stdlib_.h: Don't bother with #pragma GCC system_header, as
1863         it should no longer be needed.
1864         * lib/string_.h: Likewise.
1865         * modules/absolute-header (HAVE_INCLUDE_NEXT): New 'make' define.
1866         * modules/fcntl (fcntl.h): Substitute @HAVE_INCLUDE_NEXT@.
1867         * modules/inttypes (inttypes.h): Likewise.
1868         * modules/math (math.h): Likewise.
1869         * modules/search (search.h): Likewise.
1870         * modules/signal (signal.h): Likewise.
1871         * modules/stdint (stdint.h): Likewise.
1872         * modules/stdio (stdio.h): Likewise.
1873         * modules/stdlib (stdlib.h): Likewise.
1874         * modules/string (string.h): Likewise.
1875         * modules/sys_time (sys/time.h): Likewise.
1876         * modules/time (time.h): Likewise.
1877         * modules/wchar (wchar.h): Likewise.
1878         * modules/wctype (wtype.h): Likewise.
1879
1880 2007-05-16  Thien-Thi Nguyen  <ttn@gnuvola.org>  (tiny change)
1881
1882         * doc/gnulib-tool.texi (CVS Issues): Fix typo.
1883
1884 2007-05-13  Bruno Haible  <bruno@clisp.org>
1885
1886         * stpcpy.m4 (gl_FUNC_STPCPY): Require AC_C_RESTRICT.
1887         * stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
1888         * strsep.m4 (gl_FUNC_STRSEP): Likewise.
1889         * strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
1890         (gl_PREREQ_STRTOK_R): Don't require it here.
1891
1892 2007-05-13  Bruno Haible  <bruno@clisp.org>
1893
1894         * lib/stdlib_.h (mkdtemp, mkstemp): Comment out argument name. Needed
1895         when used in C++ mode.
1896
1897 2007-05-12  Bruno Haible  <bruno@clisp.org>
1898
1899         * lib/linebuffer.h: Tweak doc.
1900         * lib/linebuffer.c: Likewise.
1901
1902 2007-05-12  James Youngman  <jay@gnu.org>
1903
1904         * lib/linebuffer.c (readlinebuffer_delim): New function,
1905         like readlinebuffer, but use a caller-specified delimiter.
1906         (readlinebuffer): Just call readlinebuffer_delim with '\n'
1907         as the delimiter.
1908         * lib/linebuffer.h (readlinebuffer_delim): Declare it.
1909
1910 2007-05-12  Sergey Poznyakoff  <gray@gnu.org.ua>
1911
1912         * m4/openat.m4 (gl_FUNC_OPENAT): Do not require openat-die.
1913         * modules/openat (Files): Remove openat-die.c.
1914         (Depends-on): Add openat-die.
1915         * modules/openat-die: New module.
1916
1917 2007-05-06  Bruno Haible  <bruno@clisp.org>
1918
1919         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING, gl_VSNPRINTF_ZEROSIZE_C99):
1920         Update with info about Cygwin.
1921         * doc/functions/fprintf.texi: Update.
1922         * doc/functions/printf.texi: Update.
1923         * doc/functions/snprintf.texi: Update.
1924         * doc/functions/sprintf.texi: Update.
1925         * doc/functions/vfprintf.texi: Update.
1926         * doc/functions/vprintf.texi: Update.
1927         * doc/functions/vsnprintf.texi: Update.
1928         * doc/functions/vsprintf.texi: Update.
1929         Reported by Eric Blake.
1930
1931 2007-05-06  Bruno Haible  <bruno@clisp.org>
1932
1933         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Perform the
1934         padding ourselves for the floating-point directives.
1935         * m4/printf.m4 (gl_PRINTF_FLAG_ZERO): New macro.
1936         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_ZERO): New macro.
1937         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
1938         gl_PRINTF_FLAG_ZERO and test its result. Invoke
1939         gl_PREREQ_VASNPRINTF_FLAG_ZERO.
1940         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1941         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
1942         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1943         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1944         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
1945         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1946         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1947         * tests/test-snprintf-posix.h (test_function): Also check the width
1948         and some flags in the %f directive.
1949         * tests/test-sprintf-posix.h (test_function): Likewise.
1950         * tests/test-vasnprintf-posix.c (test_function): Likewise.
1951         * tests/test-vasprintf-posix.c (test_function): Likewise.
1952         * doc/functions/fprintf.texi: Update.
1953         * doc/functions/printf.texi: Update.
1954         * doc/functions/snprintf.texi: Update.
1955         * doc/functions/sprintf.texi: Update.
1956         * doc/functions/vfprintf.texi: Update.
1957         * doc/functions/vprintf.texi: Update.
1958         * doc/functions/vsnprintf.texi: Update.
1959         * doc/functions/vsprintf.texi: Update.
1960
1961 2007-05-06  Bruno Haible  <bruno@clisp.org>
1962
1963         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_GROUPING]: Don't
1964         pass the ' flag character to sprintf or snprintf.
1965         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING): New macro.
1966         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_GROUPING): New macro.
1967         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
1968         gl_PRINTF_FLAG_GROUPING and test its result. Invoke
1969         gl_PREREQ_VASNPRINTF_FLAG_GROUPING.
1970         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1971         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
1972         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1973         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1974         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
1975         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1976         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1977         * tests/test-snprintf-posix.h (test_function): Also check the grouping
1978         flag.
1979         * tests/test-sprintf-posix.h (test_function): Likewise.
1980         * tests/test-vasnprintf-posix.c (test_function): Likewise.
1981         * tests/test-vasprintf-posix.c (test_function): Likewise.
1982         * doc/functions/fprintf.texi: Update.
1983         * doc/functions/printf.texi: Update.
1984         * doc/functions/snprintf.texi: Update.
1985         * doc/functions/sprintf.texi: Update.
1986         * doc/functions/vfprintf.texi: Update.
1987         * doc/functions/vprintf.texi: Update.
1988         * doc/functions/vsnprintf.texi: Update.
1989         * doc/functions/vsprintf.texi: Update.
1990
1991 2007-05-01  Bruno Haible  <bruno@clisp.org>
1992
1993         * tests/test-argp-2.sh (func_compare): Drop .exe suffix.
1994
1995 2007-05-03  Paul Eggert  <eggert@cs.ucla.edu>
1996
1997         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Use better
1998         comment for D_INO_IN_DIRENT.  Problem reported by James Youngman.
1999
2000 2007-05-02  Paul Eggert  <eggert@cs.ucla.edu>
2001
2002         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Test whether
2003         readdir returns garbage in d_ino.  Problem reported by Kaz Sasayama in
2004         <http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00021.html>.
2005
2006 2007-05-02  Sergey Poznyakoff  <gray@gnu.org.ua>
2007
2008         * lib/argp-help.c (struct hol_entry): New member `ord'.
2009         (HOL_ENTRY_PTRCMP): Use ord for comparison
2010         (hol_sort): Initialize ord.
2011
2012 2007-05-01  Bruno Haible  <bruno@clisp.org>
2013
2014         * doc/functions/_Exit_C99.texi: Renamed from doc/functions/_Exit.texi.
2015         Reported by Eric Blake.
2016         * doc/gnulib.texi (Function Substitutes): Update.
2017
2018 2007-05-01  Bruno Haible  <bruno@clisp.org>
2019
2020         * doc/functions.texi: Remove file, now redundant through
2021         doc/functions/*.texi.
2022
2023 2007-05-01  Bruno Haible  <bruno@clisp.org>
2024
2025         * modules/argp (Depends-on): Add sleep.
2026
2027 2007-05-01  Bruno Haible  <bruno@clisp.org>
2028
2029         * modules/sleep-tests: New file.
2030         * tests/test-sleep.c: New file.
2031
2032         * modules/sleep: New file.
2033         * lib/sleep.c: New file.
2034         * m4/sleep.m4: New file.
2035         * lib/unistd_.h (sleep): New declaration.
2036         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_SLEEP,
2037         HAVE_SLEEP.
2038         * modules/unistd (Makefile.am): Substitute GNULIB_SLEEP, HAVE_SLEEP.
2039         * doc/functions/sleep.texi: Document the sleep module.
2040
2041 2007-05-01  Bruno Haible  <bruno@clisp.org>
2042
2043         * lib/sigprocmask.h: Remove file.
2044         * lib/signal_.h: Incorporate the previous contents of sigprocmask.h.
2045         * lib/sigprocmask.c: Include <signal.h> instead of sigprocmask.h.
2046         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Substitute GNULIB_SIGPROCMASK,
2047         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T.
2048         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Require
2049         gl_SIGNAL_H_DEFAULTS. Set HAVE_POSIX_SIGNALBLOCKING as a shell variable.
2050         (gl_PREREQ_SIGPROCMASK): Require gl_SIGNAL_H_DEFAULTS. Set
2051         HAVE_SIGSET_T as a shell variable.
2052         * modules/signal (Makefile.am): Substitute GNULIB_SIGPROCMASK,
2053         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T into signal.h.
2054         * modules/sigprocmask (Files): Remove lib/sigprocmask.h.
2055         (Depends-on): Add signal. Remove verify.
2056         (configure.ac): Invoke gl_SIGNAL_MODULE_INDICATOR.
2057         (Include): Mention <signal.h> instead of sigprocmask.h.
2058         * NEWS: Mention the change.
2059         * lib/fatal-signal.c: Don't include sigprocmask.h.
2060
2061 2007-05-01  Bruno Haible  <bruno@clisp.org>
2062
2063         * modules/signal: New file.
2064         * lib/signal_.h: New file.
2065         * m4/signal_h.m4: New file.
2066
2067 2007-05-01  Bruno Haible  <bruno@clisp.org>
2068
2069         * lib/wctype_.h: Test HAVE_ISWCNTRL at configure time.
2070         * m4/wctype.m4 (gl_WCTYPE_H): Substitute HAVE_ISWCNTRL.
2071         * modules/wctype (Makefile.am): Substitute HAVE_ISWCNTRL instead of
2072         HAVE_WCTYPE_CTMP_BUG into wctype.h.
2073
2074 2007-05-01  Bruno Haible  <bruno@clisp.org>
2075
2076         * lib/sys_stat_.h: Test HAVE_LSTAT, HAVE_DECL_MKDIR, HAVE_IO_H at
2077         configure time.
2078         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Substitute HAVE_LSTAT,
2079         HAVE_DECL_MKDIR, HAVE_IO_H via AC_SUBST.
2080         * modules/sys_stat (Makefile.am): Substitute their values into
2081         sys/stat.h.
2082
2083 2007-05-01  Bruno Haible  <bruno@clisp.org>
2084
2085         * lib/glob_.h: Test HAVE_SYS_CDEFS_H at configure time.
2086         * m4/glob.m4 (gl_PREREQ_GLOB): Substitute HAVE_SYS_CDEFS_H via AC_SUBST.
2087         * modules/glob (Makefile.am): Put HAVE_SYS_CDEFS_H value into glob.h.
2088
2089 2007-05-01  Bruno Haible  <bruno@clisp.org>
2090
2091         * doc/header/assert.texi: Undo last change: don't mention the gnulib
2092         'assert' module here.
2093
2094 2007-05-01  Bruno Haible  <bruno@clisp.org>
2095
2096         * doc/functions/*.texi: New files.
2097         * doc/functions/google-ranking.txt: New file.
2098         * doc/gnulib.texi (Function Substitutes): New chapter.
2099         (ctime, inet_ntoa): Remove sections.
2100         * doc/ctime.texi: Remove file.
2101         * doc/inet_ntoa.texi: Remove file.
2102         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Update
2103         dependencies.
2104         (%.info): New rule, specifying a --reference-limit.
2105
2106 2007-05-01  Bruno Haible  <bruno@clisp.org>
2107
2108         * MODULES.html.sh (posix_functions): Remove 'exec', 'toc'.
2109
2110 2007-05-01  Bruno Haible  <bruno@clisp.org>
2111
2112         * modules/mkdir (Depends-on): Add sys_stat, because sys_stat provides
2113         the portability of 'mkdir' to mingw systems.
2114
2115 2007-05-01  Bruno Haible  <bruno@clisp.org>
2116
2117         * doc/headers/google-ranking.txt: New file.
2118
2119 2007-04-30  Eric Blake  <ebb9@byu.net>
2120
2121         Prefer fseeko to fseek.
2122         * modules/getpass (Depends-on): Add fseeko.
2123         * lib/getpass.c (getpass): Use fseeko, not fseek.
2124
2125 2007-04-30  Sergey Poznyakoff  <gray@gnu.org.ua>
2126
2127         * lib/argp-help.c (hol_entry_cmp): Option sorting algorithm
2128         assumes the sorting is stable, while most qsort implementations
2129         are not.  Use argument addresses to ensure they never compare as
2130         equal.
2131
2132         * tests/test-argp-2.sh (usage-indent test): Fix output
2133         (func_compare): Restore diff options
2134         * tests/test-argp.c: Restore #include "progname.h"
2135
2136 2007-04-29  Bruno Haible  <bruno@clisp.org>
2137
2138         * m4/printf.m4 (gl_VSNPRINTF_ZEROSIZE_C99): New macro.
2139         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
2140         gl_VSNPRINTF_ZEROSIZE_C99. Test gl_cv_func_vsnprintf_zerosize_c99.
2141         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2142         * modules/snprintf-posix-tests (Files): Add tests/test-snprintf.c.
2143         (configure.ac): Define CHECK_SNPRINTF_POSIX.
2144         (TESTS, check_PROGRAMS): Add test-snprintf.
2145         * modules/vsnprintf-posix-tests (Files): Add tests/test-vsnprintf.c.
2146         (configure.ac): Define CHECK_VSNPRINTF_POSIX.
2147         (TESTS, check_PROGRAMS): Add test-vsnprintf.
2148         * tests/test-snprintf.c (main) [!CHECK_SNPRINTF_POSIX]: Disable
2149         assertions that fail on HP-UX, OSF/1, or IRIX.
2150         * tests/test-vsnprintf.c (main) [!CHECK_VSNPRINTF_POSIX]: Likewise.
2151
2152 2007-04-29  Bruno Haible  <bruno@clisp.org>
2153
2154         * MODULES.html.sh (posix_functions): Remove 'contents'.
2155
2156 2007-04-29  Karl Berry  <karl@gnu.org>
2157
2158         * config/srclist.txt (gendocs_template_min): new entry.
2159
2160 2007-04-29  Bruno Haible  <bruno@clisp.org>
2161
2162         Work around fpurge bug on BSD systems.
2163         * modules/fpurge (Makefile.am): Compile fpurge.c unconditionally.
2164         * m4/fpurge.m4 (gl_FUNC_FPURGE): Don't invoke AC_LIBOBJ.
2165         * lib/fpurge.h (fpurge): Don't handle __fpurge wrapper here. Define
2166         fpurge to rpl_fpurge if the system already has this function.
2167         * lib/fpurge.c (fpurge): Handle also the __fpurge wrapper case and
2168         the case where the system already has this function. Correct invariants
2169         on BSD systems.
2170         * lib/fseeko.c (rpl_fseeko): Update recognition of preceding fflush on
2171         BSD systems.
2172
2173 2007-04-29  Sergey Poznyakoff  <gray@gnu.org.ua>
2174
2175         * lib/argp-help.c (hol_cluster_cmp): Reverse comparison.  Change
2176         proposed by Sven Verdoolaege.
2177
2178         * tests/test-argp.c: Fix option ordering.  Test deeply clustered
2179         options.
2180         * tests/test-argp-2.sh (func_compare): Use diff instead of cmp.
2181         (usage and help tests): Update
2182
2183 2007-04-29  Bruno Haible  <bruno@clisp.org>
2184
2185         * tests/test-fflush.c (main): Use a file of size 17, not 10.
2186         Print more information in case of failure. Disable a test on BeOS.
2187
2188 2007-04-29  Bruno Haible  <bruno@clisp.org>
2189
2190         * tests/**/test-*.[hc] (ASSERT): Use fprintf to show the line number.
2191         This helps debugging on systems on which no gdb is available.
2192
2193 2007-04-29  Bruno Haible  <bruno@clisp.org>
2194
2195         * lib/freading.h: Improve comments.
2196         * lib/fwriting.h: Likewise.
2197         * tests/test-freading.c (main): Don't check freading immediately after
2198         repositioning. Needed for glibc.
2199
2200 2007-04-29  Bruno Haible  <bruno@clisp.org>
2201
2202         * lib/freading.c (freading): Trivial simplification.
2203
2204 2007-04-28  Bruno Haible  <bruno@clisp.org>
2205
2206         * tests/test-fwriting.c (main): Also test the interaction between
2207         fflush and fwriting.
2208         * modules/fwriting-tests (Depends-on): Add fflush.
2209
2210         * tests/test-freading.c (main): Also test the interaction between
2211         fflush and freading.
2212         * modules/freading-tests (Depends-on): Add fflush.
2213
2214 2007-04-28  Bruno Haible  <bruno@clisp.org>
2215
2216         * lib/stdio_.h (fseek, ftell): Provide link warnings suggesting to use
2217         fseeko and ftello.
2218         Suggested by Eric Blake.
2219
2220 2007-04-28  Jim Meyering  <jim@meyering.net>
2221
2222         Avoid false-negative in gl_STDINT_H's C99 conformance test.
2223         * m4/stdint.m4 (gl_STDINT_H): When checking whether stdint.h conforms
2224         to C99, include all of gl_STDINT_INCLUDES, not just <stddef.h>.
2225
2226 2007-04-27  Eric Blake  <ebb9@byu.net>
2227
2228         * doc/headers/assert.texi (assert.h): Document assert module use.
2229
2230 2007-04-27  Bruno Haible  <bruno@clisp.org>
2231
2232         * doc/headers/*.texi: New files.
2233         * doc/gnulib.texi (Header File Substitutes): New chapter.
2234         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Specify
2235         dependencies.
2236         (standards.info ,standards.html, standards.dvi): Update dependencies.
2237         (mostlyclean, clean): New targets.
2238
2239 2007-04-27  Bruno Haible  <bruno@clisp.org>
2240
2241         * lib/sysexits_.h: Renamed from lib/sysexit_.h.
2242         * modules/sysexits (Files, Makefile.am): Update.
2243
2244         * lib/sys_socket_.h: Renamed from lib/socket_.h.
2245         * modules/sys_socket (Files, Makefile.am): Update.
2246
2247         * lib/sys_stat_.h: Renamed from lib/stat_.h.
2248         * modules/sys_stat (Files, Makefile.am): Update.
2249
2250 2007-04-27  Eric Blake  <ebb9@byu.net>
2251
2252         * lib/freading.h: Improve comments.
2253         * lib/fwriting.h: Likewise.
2254         * lib/fflush.c: Likewise.
2255
2256         Fix closein for mingw.
2257         * modules/closein-tests: Add tests for closein.
2258         * tests/test-closein.c: New file.
2259         * tests/test-closein.sh: Likewise.
2260         * lib/unistd_.h [!SEEK_CUR]: Mingw also needs stdlib.h for _exit.
2261         * lib/closein.c (close_stdin): Don't fflush non-seekable streams.
2262
2263 2007-04-27  Bruno Haible  <bruno@clisp.org>
2264
2265         * lib/inttypes_.h [_DECC]: Don't use #include_next if the compiler
2266         version is < 6.
2267         * lib/math_.h [__DECC]: Likewise.
2268         * lib/stdio_.h [__DECC]: Likewise.
2269         * lib/stdlib_.h [__DECC]: Likewise.
2270         * lib/string_.h [__DECC]: Likewise.
2271         * lib/time_.h [__DECC]: Likewise.
2272         * lib/wchar_.h [__DECC]: Likewise.
2273         * lib/wctype_.h [__DECC]: Likewise.
2274
2275 2007-04-27  Bruno Haible  <bruno@clisp.org>
2276
2277         * tests/test-fbufmode.c (main): Relax test, to avoid failure on mingw.
2278
2279 2007-04-27  Bruno Haible  <bruno@clisp.org>
2280
2281         * lib/fflush.c: Add comments.
2282         * modules/fpurge-tests (Depends-on): Add fflush.
2283         * modules/freadable-tests (Depends-on): Likewise.
2284         * modules/fwritable-tests (Depends-on): Likewise.
2285
2286 2007-04-27  Charles Wilson  <libtool@cwilson.fastmail.fm>
2287
2288         * m4/argz.m4 (gl_FUNC_ARGZ): Use !HAVE_WORKING_ARGZ instead of
2289         SYSTEM_ARGZ_IS_BROKEN.  Also, minor stylistic improvements.
2290         Report by Bruno Haible <bruno@clisp.org>.
2291
2292 2007-04-26  Eric Blake  <ebb9@byu.net>
2293
2294         Fix fflush on mingw.
2295         * modules/fflush (Depends-on): Add freading.
2296         * lib/fflush.c (rpl_fflush): Use freading to avoid losing buffered
2297         but unread data.
2298
2299 2007-04-26  Eric Blake  <ebb9@byu.net>
2300         and Bruno Haible  <bruno@clisp.org>
2301
2302         Implement freading and fwriting.
2303         * lib/freading.c: New file.
2304         * lib/freading.h: Likewise.
2305         * m4/freading.m4: Likewise.
2306         * modules/freading: Likewise.
2307         * modules/freading-tests: Likewise.
2308         * tests/test-freading.c: Likewise.
2309         * lib/fwriting.c: New file.
2310         * lib/fwriting.h: Likewise.
2311         * m4/fwriting.m4: Likewise.
2312         * modules/fwriting: Likewise.
2313         * modules/fwriting-tests: Likewise.
2314         * tests/test-fwriting.c: Likewise.
2315         * MODULES.html.sh (File stream based Input/Output): Mention them.
2316
2317 2007-04-26  Bruno Haible  <bruno@clisp.org>
2318
2319         * lib/stdio_.h (fseeko, ftello): Check that off_t has the same size as
2320         'long' when we assume it.
2321         Suggested by Eric Blake.
2322
2323 2007-04-26  Bruno Haible  <bruno@clisp.org>
2324
2325         Ensure fseeko, ftello are declared on glibc systems.
2326         * modules/fflush (configure.ac-early): Require AC_FUNC_FSEEKO.
2327         * modules/fseeko (configure.ac-early): Likewise.
2328         * modules/ftello (configure.ac-early): Likewise.
2329         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Don't define HAVE_FSEEKO, rely on
2330         AC_FUNC_FSEEKO for this.
2331         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Inline gl_CHECK_FSEEKO.
2332         (gl_CHECK_FSEEKO): Remove macro.
2333
2334 2007-04-26  Bruno Haible  <bruno@clisp.org>
2335
2336         * tests/test-fflush.c (main): Also check the ftell result after
2337         fflush and fseek/fseeko.
2338         * lib/fflush.c (rpl_fflush): For BSD implementations, update the
2339         file descriptor position cache in the stream.
2340         * lib/fseeko.c (rpl_fseeko): Likewise.
2341
2342 2007-04-26  Bruno Haible  <bruno@clisp.org>
2343
2344         * modules/fflush-tests (Depends-on): Add fseeko.
2345
2346 2007-04-25  Charles Wilson  <libtool@cwilson.fastmail.fm>
2347             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2348
2349         * lib/argz_.h: ensure error_t definition is obtained in same
2350         mechanism system argz.h would have.
2351         * m4/argz.m4 (gl_FUNC_ARGZ): add new test to check if $host's
2352         argz facilities are known bad.  Err on the side of caution if
2353         cross-compiling.
2354
2355 2007-04-25  Eric Blake  <ebb9@byu.net>
2356
2357         * lib/fpurge.c (includes): Use stdlib.h for free.
2358         * tests/test-fflush.c (main): Also test fflush-fseeko.
2359
2360 2007-04-25  Bruno Haible  <bruno@clisp.org>
2361
2362         Make fflush+fseek POSIX-compliant on FreeBSD and MacOS X.
2363         * lib/fseeko.c: New file.
2364         * lib/stdio_.h: Include <sys/types.h> when off_t is needed.
2365         (fseeko, fseek): Define to replacements if REPLACE_FFLUSH.
2366         * m4/fseeko.m4 (gl_CHECK_FSEEKO): New macro, extracted from
2367         gl_FUNC_FSEEKO.
2368         (gl_FUNC_FSEEKO): Invoke it.
2369         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Arrange to compile fseeko.c. Invoke
2370         gl_CHECK_FSEEKO. Define HAVE_FSEEKO.
2371         * modules/fflush (Files): Add lib/fseeko.c, m4/fseeko.m4.
2372
2373 2007-04-25  Bruno Haible  <bruno@clisp.org>
2374
2375         * modules/fflush (Depends-on): Add ftello.
2376
2377 2007-04-25  Bruno Haible  <bruno@clisp.org>
2378
2379         * modules/ftello-tests: New file.
2380         * tests/test-ftello.c: New file.
2381
2382         * modules/ftello: New file.
2383         * m4/ftello.m4: New file.
2384         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELLO,
2385         HAVE_FTELLO.
2386         * lib/stdio_.h (ftello): New declaration.
2387         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELLO,
2388         HAVE_FTELLO.
2389
2390 2007-04-25  Bruno Haible  <bruno@clisp.org>
2391
2392         * modules/fseeko-tests: New file.
2393         * tests/test-fseeko.c: New file.
2394
2395         * modules/fseeko: New file.
2396         * m4/fseeko.m4: New file.
2397         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEKO,
2398         HAVE_FSEEKO.
2399         * lib/stdio_.h (fseeko): New declaration.
2400         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEKO,
2401         HAVE_FSEEKO.
2402
2403 2007-04-25  Bruno Haible  <bruno@clisp.org>
2404
2405         * lib/stdio_.h (fflush): Add support for GNULIB_POSIXCHECK.
2406
2407 2007-04-25  Bruno Haible  <bruno@clisp.org>
2408
2409         * lib/unistd_.h: Include <stdio.h> if needed to get the SEEK_* macros.
2410         * tests/test-stdio.c: Check that the various SEEK_* macros are defined.
2411         * tests/test-unistd.c: Likewise.
2412         * tests/test-fcntl.c: Likewise.
2413
2414 2007-04-23  Eric Blake  <ebb9@byu.net>
2415
2416         * lib/fflush.c: Fix missing include.
2417         Reported by Bruno Haible.
2418
2419 2007-04-23  Bruno Haible  <bruno@clisp.org>
2420
2421         * lib/fpurge.c (fpurge) [glibc, BSD]: Free a malloc()ed ungetc buffer.
2422         Reported by Eric Blake.
2423
2424 2007-04-23  Bruno Haible  <bruno@clisp.org>
2425
2426         * lib/fbufmode.c (fbufmode): Port to Solaris/SPARC64.
2427
2428 2007-04-23  Bruno Haible  <bruno@clisp.org>
2429
2430         * lib/fseterr.c (fseterr): Don't hardcode the value of _IOERR.
2431
2432 2007-04-23  Bruno Haible  <bruno@clisp.org>
2433
2434         * tests/test-fbufmode.c (main): Be prepared to a failure of setvbuf.
2435         Needed on HP-UX 11.
2436
2437 2007-04-16  Eric Blake  <ebb9@byu.net>
2438
2439         Make fflush rely on fpurge.
2440         * lib/fflush.c (rpl_fflush): Rely on fpurge module, rather than
2441         open coding all variants.
2442         * modules/fflush (Depends-on): Add fpurge and unistd.
2443         * modules/fflush-tests (Depends-on): Unistd is no longer extra.
2444         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Simplify.
2445
2446         Fix --with-tests compilation on cygwin.
2447         * modules/argmatch-tests (Makefile.am): List gnulib library first
2448         in LDADD.
2449         * modules/argp-tests (Makefile.am): Likewise.
2450         * modules/array-list-tests (Makefile.am): Likewise.
2451         * modules/array-oset-tests (Makefile.am): Likewise.
2452         * modules/avltree-list-tests (Makefile.am): Likewise.
2453         * modules/avltree-oset-tests (Makefile.am): Likewise.
2454         * modules/avltreehash-list-tests (Makefile.am): Likewise.
2455         * modules/carray-list-tests (Makefile.am): Likewise.
2456         * modules/dirname-tests (Makefile.am): Likewise.
2457         * modules/frexp-tests (Makefile.am): Likewise.
2458         * modules/isnanl-tests (Makefile.am): Likewise.
2459         * modules/linked-list-tests (Makefile.am): Likewise.
2460         * modules/linkedhash-list-tests (Makefile.am): Likewise.
2461         * modules/lock-tests (Makefile.am): Likewise.
2462         * modules/rbtree-list-tests (Makefile.am): Likewise.
2463         * modules/rbtree-oset-tests (Makefile.am): Likewise.
2464         * modules/rbtreehash-list-tests (Makefile.am): Likewise.
2465         * modules/tls-tests (Makefile.am): Likewise.
2466         * modules/tsearch-tests (Makefile.am): Likewise.
2467         * modules/xvasprintf-tests (Makefile.am): Likewise.
2468
2469         Fix fpurge for cygwin.
2470         * lib/fpurge.c (fpurge): Fix order of operation flub, and return a
2471         value.
2472         * modules/fpurge-tests (Depends-on): Clean up trash.
2473
2474 2007-04-16  Simon Josefsson  <simon@josefsson.org>
2475
2476         * lib/gc-libgcrypt.c (gc_hash_open): Shut up compiler warnings.
2477
2478         * m4/autobuild.m4: Re-indent.
2479
2480 2007-04-13  Bruno Haible  <bruno@clisp.org>
2481
2482         * modules/fpurge-tests: New file.
2483         * tests/test-fpurge.c: New file.
2484
2485         * modules/fpurge: New file.
2486         * lib/fpurge.h: New file.
2487         * lib/fpurge.c: New file.
2488         * m4/fpurge.m4: New file.
2489
2490 2007-04-13  Bruno Haible  <bruno@clisp.org>
2491
2492         * modules/fbufmode-tests: New file.
2493         * tests/test-fbufmode.c: New file.
2494
2495         * modules/fbufmode: New file.
2496         * lib/fbufmode.h: New file.
2497         * lib/fbufmode.c: New file.
2498         * m4/fbufmode.m4: New file.
2499
2500 2007-04-13  Bruno Haible  <bruno@clisp.org>
2501
2502         * modules/fwritable-tests: New file.
2503         * tests/test-fwritable.c: New file.
2504
2505         * modules/fwritable: New file.
2506         * lib/fwritable.h: New file.
2507         * lib/fwritable.c: New file.
2508         * m4/fwritable.m4: New file.
2509
2510 2007-04-13  Bruno Haible  <bruno@clisp.org>
2511
2512         * modules/freadable-tests: New file.
2513         * tests/test-freadable.c: New file.
2514
2515         * modules/freadable: New file.
2516         * lib/freadable.h: New file.
2517         * lib/freadable.c: New file.
2518         * m4/freadable.m4: New file.
2519
2520 2007-04-13  Bruno Haible  <bruno@clisp.org>
2521
2522         * modules/fflush-tests (Makefile.am): Remove EXTRA_DIST. Augment
2523         MOSTLYCLEANFILES.
2524
2525 2007-04-13  Paul Eggert  <eggert@cs.ucla.edu>
2526
2527         * build-aux/bootstrap (gnulib_tool_option_extras): New var, used by
2528         gzip bootstrap.conf to avoid dragging in i18n machinery.
2529         (gnulib_tool_option): Use it.
2530
2531 2007-04-13  Bruno Haible  <bruno@clisp.org>
2532
2533         * tests/test-vasnprintf-posix.c (test_function): Add tests for %f and
2534         %F directives.
2535         * tests/test-vasprintf-posix.c (test_function): Likewise.
2536         * tests/test-snprintf-posix.h (test_function): Likewise.
2537         * tests/test-sprintf-posix.h (test_function): Likewise.
2538         * tests/test-fprintf-posix.h (test_function): Likewise.
2539         * tests/test-printf-posix.h (test_function): Likewise.
2540         * tests/test-fprintf-posix.out: Likewise.
2541
2542 2007-04-13  Bruno Haible  <bruno@clisp.org>
2543
2544         * modules/lock-tests (configure.ac): For LIBSCHED, try also -lposix4.
2545         * modules/tls-tests (configure.ac): Likewise.
2546         Reported by Arto C. Nirkko <anirkko@insel.ch>.
2547
2548 2007-04-13  Bruno Haible  <bruno@clisp.org>
2549
2550         * lib/tls.c (glthread_tls_get): Fix return type.
2551         Patch by Arto C. Nirkko <anirkko@insel.ch>.
2552
2553 2007-04-12  Eric Blake  <ebb9@byu.net>
2554
2555         * modules/gettime (Depends-on): Remove gettime.
2556         Reported by Dmitry V. Levin.
2557
2558 2007-04-12  Bruno Haible  <bruno@clisp.org>
2559
2560         * modules/fflush (Include): Mention <stdio.h>.
2561         * modules/strtoimax (Include): Mention <inttypes.h>.
2562         * modules/strtoumax (Include): Likewise.
2563
2564 2007-04-12  Eric Blake  <ebb9@byu.net>
2565
2566         * .cvsignore: New file.
2567         * .gitignore: Likewise.
2568
2569 2007-04-12  Bruno Haible  <bruno@clisp.org>
2570
2571         * modules/iconv-tests (test_iconv_LDADD): Mention -liconv after LDADD,
2572         not before, since $(LDADD) often contains libgnu.a.
2573         * modules/striconv-tests (test_striconv_LDADD): Likewise.
2574         * modules/striconveh-tests (test_striconveh_LDADD): Likewise.
2575         * modules/striconveha-tests (test_striconveha_LDADD): Likewise.
2576         Needed on Cygwin.
2577
2578 2007-04-12  Eric Blake  <ebb9@byu.net>
2579
2580         Work around glibc's failure to flush stdin on fclose.
2581         * lib/closein.c (close_stdin): Flush stdin before closing.
2582
2583         Work around glibc's failure to reset seekable stdin on exit.
2584         * modules/closein: New module.
2585         * lib/closein.c: New file.
2586         * lib/closein.h: Likewise.
2587         * m4/closein.m4: Likewise.
2588         * MODULES.html.sh (File stream based Input/Output): Document it.
2589
2590 2007-04-12  Simon Josefsson  <simon@josefsson.org>
2591
2592         * gnulib-tool: Rename generated 'autobuild' script to
2593         'do-autobuild' in --create-megatestdir output.
2594
2595         * doc/gnulib.texi (Build robot for gnulib): Fix.
2596
2597 2007-04-12  Simon Josefsson  <simon@josefsson.org>
2598
2599         * modules/sysexits (Depends-on): Add absolute-header.
2600
2601 2007-04-12  Eric Blake  <ebb9@byu.net>
2602
2603         No need to preserve errno on success.
2604         * lib/fflush.c (rpl_fflush): Simplify errno tracking.
2605         Reported by Bruno Haible.
2606
2607 2007-04-12  Simon Josefsson  <simon@josefsson.org>
2608
2609         * MODULES.html.sh (Support for maintaining and releasing
2610         projects): Add autobuild.  Suggested by Eric Blake <ebb9@byu.net>.
2611
2612 2007-04-12  Simon Josefsson  <simon@josefsson.org>
2613
2614         * gnulib-tool (func_modules_add_dummy): Respect --avoid=dummy.
2615
2616 2007-04-12  Simon Josefsson  <simon@josefsson.org>
2617
2618         * modules/autobuild: New module.
2619
2620         * m4/autobuild.m4: New file.
2621
2622 2007-04-11  Bruno Haible  <bruno@clisp.org>
2623
2624         * lib/vasnprintf.c (VASNPRINTF): Implement the %F directive using the
2625         %f directive, if NEED_PRINTF_DIRECTIVE_F is defined.
2626         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_F): New macro.
2627         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_F): New macro.
2628         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
2629         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2630         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2631         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
2632         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2633         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2634         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Invoke
2635         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2636         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2637         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Invoke
2638         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2639         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2640         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Invoke
2641         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2642         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2643         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Invoke
2644         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2645         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2646         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Invoke
2647         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2648         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2649         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Invoke
2650         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2651         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2652         Reported by Eric Blake.
2653
2654 2007-04-11  Bruno Haible  <bruno@clisp.org>
2655
2656         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Fix test. It always failed.
2657
2658 2007-04-10  Bruno Haible  <bruno@clisp.org>
2659
2660         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct result
2661         for NaN and Infinity. Needed on FreeBSD 6.1.
2662         * tests/test-vasnprintf-posix.c (test_function): Undo last change
2663         regarding results for "%010a" of Infinity and NaN.
2664         * tests/test-vasprintf-posix.c (test_function): Likewise.
2665         * tests/test-snprintf-posix.h (test_function): Likewise.
2666         * tests/test-sprintf-posix.h (test_function): Likewise.
2667         * tests/test-fprintf-posix.h (test_function): Likewise.
2668         * tests/test-printf-posix.h (test_function): Likewise.
2669         * tests/test-fprintf-posix.out: Likewise.
2670
2671 2007-04-10  Bruno Haible  <bruno@clisp.org>
2672
2673         * modules/locale-tests: New file.
2674         * tests/test-locale.c: New file.
2675
2676         * modules/locale: New file.
2677         * lib/locale_.h: New file.
2678         * m4/locale_h.m4: New file.
2679
2680 2007-04-10  Paul Eggert  <eggert@cs.ucla.edu>
2681             Bruno Haible  <bruno@clisp.org>
2682
2683         * m4/signbit.m4 (gl_SIGNBIT): When the sign bit position could not
2684         be determined, test for availability of the copysignf, copysign,
2685         copysignl functions.
2686         * lib/signbitf.c (gl_signbitf): Use copysignf if available in libc.
2687         * lib/signbitd.c (gl_signbitd): Use copysign if available in libc.
2688         * lib/signbitl.c (gl_signbitl): Use copysignl if available in libc.
2689
2690 2007-04-09  Eric Blake  <ebb9@byu.net>
2691
2692         * lib/stdio_.h [REPLACE_FFLUSH]: Declare rpl_fflush.
2693         * modules/stdio (Makefile.am): Support fflush.
2694         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
2695         * modules/fflush: New file.
2696         * lib/fflush.c: Likewise.
2697         * m4/fflush.m4: Likewise.
2698         * modules/fflush-tests: New test.
2699         * tests/test-fflush.c: Likewise.
2700         * MODULES.html.sh (Input/output <stdio.h>): Document new module.
2701
2702 2007-04-06  Bruno Haible  <bruno@clisp.org>
2703
2704         * lib/vasnprintf.c: Include <math.h>. Don't include float+.h.
2705         (VASNPRINTF): Use signbit for faster determination whether to print a
2706         minus sign.
2707         * modules/vasnprintf (Files): Remove lib/float+.h.
2708         * modules/fprintf-posix (Depends-on): Add signbit.
2709         * modules/snprintf-posix (Depends-on): Likewise.
2710         * modules/sprintf-posix (Depends-on): Likewise.
2711         * modules/vasnprintf-posix (Depends-on): Likewise.
2712         * modules/vasprintf-posix (Depends-on): Likewise.
2713         * modules/vfprintf-posix (Depends-on): Likewise.
2714         * modules/vsnprintf-posix (Depends-on): Likewise.
2715         * modules/vsprintf-posix (Depends-on): Likewise.
2716
2717 2007-04-06  Bruno Haible  <bruno@clisp.org>
2718
2719         * tests/test-frexp.c (main): Test also the sign bit of zero results.
2720         * tests/test-frexpl.c (main): Likewise.
2721         * tests/test-ldexpl.c (main): Likewise.
2722         * modules/frexp-tests (Depends-on): Add signbit.
2723         * modules/frexpl-tests (Depdends-on): Likewise.
2724         * modules/ldexpl-tests (Depdends-on): Likewise.
2725
2726 2007-04-06  Bruno Haible  <bruno@clisp.org>
2727
2728         * modules/signbit-tests: New file.
2729         * tests/test-signbit.c: New file.
2730
2731         * modules/signbit: New file.
2732         * lib/signbitf.c: New file.
2733         * lib/signbitd.c: New file.
2734         * lib/signbitl.c: New file.
2735         * m4/signbit.m4: New file.
2736         * lib/math_.h (gl_signbitf, gl_signbitd, gl_signbitl): New declarations.
2737         (signbit): New macro.
2738         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_SIGNBIT and
2739         REPLACE_SIGNBIT.
2740         * modules/math (Makefile.am) Substibute also GNULIB_SIGNBIT and
2741         REPLACE_FREXPL into math.h.
2742
2743 2007-04-06  Bruno Haible  <bruno@clisp.org>
2744
2745         * modules/isnanf-nolibm-tests: New file.
2746         * tests/test-isnanf.c: New file.
2747
2748         * modules/isnanf-nolibm: New file.
2749         * lib/isnanf.h: New file.
2750         * lib/isnanf.c: New file.
2751         * lib/isnan.c: Consider the USE_FLOAT macro.
2752         * m4/isnanf.m4: New file.
2753
2754 2007-04-06  Bruno Haible  <bruno@clisp.org>
2755
2756         * modules/gettext-h (configure.ac): AC_SUBST LIBINTL and LTLIBINTL.
2757         (Link): New section.
2758
2759         * modules/canonicalize-lgpl-tests (Makefile.am): Undo last change.
2760
2761 2007-04-06  Bruno Haible  <bruno@clisp.org>
2762
2763         Assume the 'long double' type.
2764         * m4/longdouble.m4: Remove file.
2765         * config/srclist.txt: Don't mention longdouble.m4.
2766         * lib/allocsa.h: Assume HAVE_LONG_DOUBLE to be true.
2767         * lib/float+.h: Likewise.
2768         * lib/frexp.c: Likewise.
2769         * lib/printf-args.h: Likewise.
2770         * lib/printf-args.c: Likewise.
2771         * lib/printf-frexp.c: Likewise.
2772         * lib/printf-parse.c: Likewise.
2773         * lib/vasnprintf.c: Likewise.
2774         * m4/allocsa.m4: Remove gt_TYPE_LONGDOUBLE invocation.
2775         * m4/intl.m4: Likewise.
2776         * m4/isnanl.m4: Likewise.
2777         * m4/printf.m4: Likewise.
2778         * m4/printf-frexpl.m4: Likewise.
2779         * m4/vasnprintf.m4: Likewise.
2780         * modules/allocsa (Files): Remove m4/longdouble.m4.
2781         * modules/gettext (Files): Likewise.
2782         * modules/relocatable-prog-wrapper (Files): Likewise.
2783         * modules/vasnprintf (Files): Likewise.
2784         * modules/isnanl (Files): Likewise.
2785         (Include): Simplify.
2786         * modules/isnanl-nolibm (Files): Remove m4/longdouble.m4.
2787         (Include): Simplify.
2788         * modules/printf-frexpl (Files): Remove m4/longdouble.m4.
2789         (Include): Simplify.
2790         * modules/snprintf-posix-tests (Files): Remove m4/longdouble.m4.
2791         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2792         * modules/sprintf-posix-tests (Files): Remove m4/longdouble.m4.
2793         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2794         * modules/vasnprintf-posix-tests (Files): Remove m4/longdouble.m4.
2795         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2796         * modules/vasprintf-posix-tests (Files): Remove m4/longdouble.m4.
2797         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2798         * modules/vsnprintf-posix-tests (Files): Remove m4/longdouble.m4.
2799         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2800         * modules/vsprintf-posix-tests (Files): Remove m4/longdouble.m4.
2801         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2802         * tests/test-isnanl-nolibm.c: Assume HAVE_LONG_DOUBLE to be true.
2803         * tests/test-isnanl.c: Likewise.
2804         * tests/test-snprintf-posix.h: Likewise.
2805         * tests/test-sprintf-posix.h: Likewise.
2806         * tests/test-vasnprintf-posix.c: Likewise.
2807         * tests/test-vasnprintf-posix2.c: Likewise.
2808         * tests/test-vasprintf-posix.c: Likewise.
2809
2810 2007-04-06  Bruno Haible  <bruno@clisp.org>
2811
2812         Fix problem with Compaq (ex-DEC) Desktop C compiler on Tru64.
2813         * lib/math_.h [__DECC]: Include the overridden include file through
2814         #include_next, outside the double-inclusion guard.
2815         * lib/stdio_.h [__DECC]: Likewise.
2816         * lib/stdlib_.h [__DECC]: Likewise.
2817         * lib/string_.h [__DECC]: Likewise.
2818         * lib/time_.h [__DECC]: Likewise.
2819         * lib/wchar_.h [__DECC]: Likewise.
2820         * lib/wctype_.h [__DECC]: Likewise.
2821         * lib/inttypes_.h [__DECC]: Likewise.
2822         Reported by Albert Chin <china@thewrittenword.com> in
2823         <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00088.html>.
2824
2825 2007-04-04  Eric Blake  <ebb9@byu.net>
2826
2827         * m4/stdint.m4 (gl_STDINT_H): Detect WINT_MAX bug in cygwin
2828         1.5.x.
2829
2830 2007-04-04  Bruno Haible  <bruno@clisp.org>
2831
2832         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct
2833         rounding. Don't assume that FreeBSD 6 and NetBSD 4 pass this test.
2834
2835 2007-04-04  Bruno Haible  <bruno@clisp.org>
2836
2837         * tests/test-vasnprintf-posix.c (test_function): Allow two possible
2838         results for "%010a" of Infinity and NaN.
2839         * tests/test-vasprintf-posix.c (test_function): Likewise.
2840         * tests/test-snprintf-posix.h (test_function): Likewise.
2841         * tests/test-sprintf-posix.h (test_function): Likewise.
2842         * tests/test-fprintf-posix.h (test_function): Remove these tests.
2843         * tests/test-printf-posix.h (test_function): Likewise.
2844         * tests/test-fprintf-posix.out: Update.
2845         Needed for FreeBSD 6.1.
2846
2847 2007-04-04  Bruno Haible  <bruno@clisp.org>
2848
2849         * DEPENDENCIES: Remove mentions of tar and gzip, since they are not
2850         directly used by the gnulib modules nor by gnulib-tool.
2851
2852 2007-04-04  Paul Eggert  <eggert@cs.ucla.edu>
2853
2854         * DEPENDENCIES: Give overall description of version dependency
2855         desirability.  Use more-typical names for apps.
2856         Add shell, coreutils, diffutils, grep, tar, gzip.
2857
2858 2007-04-04  Simon Josefsson  <simon@josefsson.org>
2859
2860         * MODULES.html.sh: Rename crypto modules.  Remove iconvme.
2861
2862 2007-04-04  Karl Berry  <karl@gnu.org>
2863
2864         * MODULES.html.sh (func_module): missing '.
2865
2866 2007-04-03  Bruno Haible  <bruno@clisp.org>
2867
2868         * modules/argmatch-tests (Makefile.am): New variable
2869         test_argmatch_LDADD.
2870         * modules/argp-tests (Makefile.am): New variable test_argp_LDADD.
2871         * modules/array-list-tests (Makefile.am): New variable
2872         test_array_list_LDADD.
2873         * modules/array-oset-tests (Makefile.am): New variable
2874         test_array_oset_LDADD.
2875         * modules/avltree-list-tests (Makefile.am): New variable
2876         test_avltree_list_LDADD.
2877         * modules/avltree-oset-tests (Makefile.am): New variable
2878         test_avltree_oset_LDADD.
2879         * modules/avltreehash-list-tests (Makefile.am): New variable
2880         test_avltreehash_list_LDADD.
2881         * modules/canonicalize-lgpl-tests (Makefile.am): New variable
2882         test_canonicalize_lgpl_LDADD.
2883         * modules/carray-list-tests (Makefile.am): New variable
2884         test_carray_list_LDADD.
2885         * modules/dirname-tests (Makefile.am): New variable
2886         test_dirname_LDADD.
2887         * modules/linked-list-tests (Makefile.am): New variable
2888         test_linked_list_LDADD.
2889         * modules/linkedhash-list-tests (Makefile.am): New variable
2890         test_linkedhash_list_LDADD.
2891         * modules/rbtree-list-tests (Makefile.am): New variable
2892         test_rbtree_list_LDADD.
2893         * modules/rbtree-oset-tests (Makefile.am): New variable
2894         test_rbtree_oset_LDADD.
2895         * modules/rbtreehash-list-tests (Makefile.am): New variable
2896         test_rbtreehash_list_LDADD.
2897         * modules/xvasprintf-tests (Makefile.am): New variable
2898         test_xvasprintf_LDADD.
2899         Reported by Eric Blake.
2900
2901 2007-04-03  Eric Blake  <ebb9@byu.net>
2902
2903         * DEPENDENCIES: Weaken m4 requirements.
2904
2905 2007-04-03  Bruno Haible  <bruno@clisp.org>
2906
2907         * modules/frexp-tests (configure.ac): Remove AC_SUBST.
2908         * modules/isnanl-tests (configure.ac): Likewise.
2909
2910 2007-04-03  Ben Pfaff  <blp@gnu.org>
2911
2912         * modules/iconv_open: Add $(srcdir)/ to source directory
2913         references in Makefile fragments that call gperf, to fix VPATH
2914         builds.
2915
2916 2007-04-03  Bruno Haible  <bruno@clisp.org>
2917
2918         * modules/ldexpl (Depends-on): Add isnanl, remove isnanl-nolibm.
2919         * lib/ldexpl.c: Undo last change.
2920
2921 2007-04-03  Bruno Haible  <bruno@clisp.org>
2922
2923         * modules/printf-frexpl (Depends-on): Undo last change.
2924         (Files): Add m4/ldexpl.m4.
2925
2926 2007-04-03  Bruno Haible  <bruno@clisp.org>
2927
2928         * m4/isnanl.m4 (gl_FUNC_ISNANL): Substitute ISNANL_LIBM.
2929         * modules/isnanl (Link): New section.
2930
2931         * m4/frexp.m4 (gl_FUNC_FREXP): Substitute FREXP_LIBM.
2932         * modules/frexp (Link): New section.
2933
2934         * m4/frexpl.m4 (gl_FUNC_FREXPL): Substitute FREXPL_LIBM.
2935         * modules/frexpl (Link): New section.
2936
2937         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Substitute LDEXPL_LIBM.
2938         * modules/ldexpl (Link): New section.
2939
2940 2007-04-03  Bruno Haible  <bruno@clisp.org>
2941
2942         * modules/TEMPLATE-EXTENDED: New file.
2943         * gnulib-tool (func_all_modules, func_verify_module): Exclude it.
2944
2945 2007-04-03  Bruno Haible  <bruno@clisp.org>
2946
2947         * DEPENDENCIES: New file.
2948         Suggested by Simon Josefsson.
2949
2950 2007-04-03  Bruno Haible  <bruno@clisp.org>
2951
2952         * doc/gnulib.texi: Escape @.
2953
2954 2007-04-03  James Youngman  <jay@gnu.org>
2955         and Paul Eggert  <eggert@cs.ucla.edu>
2956
2957         * lib/stat-time.h (get_stat_birthtime): Check for zero-valued
2958         birthtime on all systems that have birthtime, not just those which
2959         use st_birthtimensec rather than st_birthtim.  Putting zero in
2960         st_birthtim.tv_sec is how (for example) FreeBSD/x86 6.1 indicates
2961         that the birth time is not available for files on an NFS mount.
2962
2963 2007-04-03  Simon Josefsson  <simon@josefsson.org>
2964
2965         * modules/memxor: Move back from crypto/, suggested by Bruno.
2966         * modules/crypto/hmac-sha1: Fix memxor dependency.
2967
2968         * modules/crypto/gc: Moved from ../.
2969
2970 2007-04-02  Eric Blake  <ebb9@byu.net>
2971
2972         * lib/ldexpl.c (includes): Avoid libm.
2973
2974         * modules/printf-frexpl (Depends-on): Depend on ldexpl.
2975
2976 2007-04-02  Bruno Haible  <bruno@clisp.org>
2977
2978         * lib/sysexit_.h (EX_OK): Disable the EX_OK definition from <unistd.h>
2979         on IRIX.
2980
2981 2007-04-02  Bruno Haible  <bruno@clisp.org>
2982
2983         * m4/intdiv0.m4 (gt_INTDIV0): Avoid performing the test for real on
2984         x86 or x86_64 platforms running MacOS X.
2985         Reported by Ryan Schmidt <@ryandesign.com>.
2986
2987 2007-04-02  Bruno Haible  <bruno@clisp.org>
2988
2989         * m4/intdiv0.m4 (gt_INTDIV0): When cross-compiling, treat x86_64 like
2990         i386.
2991
2992 2007-04-01  Simon Josefsson  <simon@josefsson.org>
2993
2994         * modules/crypto/arcfour: Moved from ../.
2995         * modules/crypto/arcfour-tests: Moved from ../.
2996         * modules/crypto/arctwo: Moved from ../.
2997         * modules/crypto/arctwo-tests: Moved from ../.
2998         * modules/crypto/des: Moved from ../.
2999         * modules/crypto/des-tests: Moved from ../.
3000         * modules/crypto/gc-arcfour: Moved from ../.
3001         * modules/crypto/gc-arcfour-tests: Moved from ../.
3002         * modules/crypto/gc-arctwo: Moved from ../.
3003         * modules/crypto/gc-arctwo-tests: Moved from ../.
3004         * modules/crypto/gc-des: Moved from ../.
3005         * modules/crypto/gc-des-tests: Moved from ../.
3006         * modules/crypto/gc-hmac-md5: Moved from ../.
3007         * modules/crypto/gc-hmac-md5-tests: Moved from ../.
3008         * modules/crypto/gc-hmac-sha1: Moved from ../.
3009         * modules/crypto/gc-hmac-sha1-tests: Moved from ../.
3010         * modules/crypto/gc-md2: Moved from ../.
3011         * modules/crypto/gc-md2-tests: Moved from ../.
3012         * modules/crypto/gc-md4: Moved from ../.
3013         * modules/crypto/gc-md4-tests: Moved from ../.
3014         * modules/crypto/gc-md5: Moved from ../.
3015         * modules/crypto/gc-md5-tests: Moved from ../.
3016         * modules/crypto/gc-pbkdf2-sha1: Moved from ../.
3017         * modules/crypto/gc-pbkdf2-sha1-tests: Moved from ../.
3018         * modules/crypto/gc-random: Moved from ../.
3019         * modules/crypto/gc-rijndael: Moved from ../.
3020         * modules/crypto/gc-rijndael-tests: Moved from ../.
3021         * modules/crypto/gc-sha1: Moved from ../.
3022         * modules/crypto/gc-sha1-tests: Moved from ../.
3023         * modules/crypto/gc-tests: Moved from ../.
3024         * modules/crypto/hmac-md5: Moved from ../.
3025         * modules/crypto/hmac-md5-tests: Moved from ../.
3026         * modules/crypto/hmac-sha1: Moved from ../.
3027         * modules/crypto/hmac-sha1-tests: Moved from ../.
3028         * modules/crypto/md2: Moved from ../.
3029         * modules/crypto/md2-tests: Moved from ../.
3030         * modules/crypto/md4: Moved from ../.
3031         * modules/crypto/md4-tests: Moved from ../.
3032         * modules/crypto/md5: Moved from ../.
3033         * modules/crypto/md5-tests: Moved from ../.
3034         * modules/crypto/memxor: Moved from ../.
3035         * modules/crypto/rijndael: Moved from ../.
3036         * modules/crypto/rijndael-tests: Moved from ../.
3037         * modules/crypto/sha1: Moved from ../.
3038
3039 2007-03-30  James Youngman  <jay@gnu.org>
3040
3041         * tests/test-stat-time.c (prepare_test): use chmod() rather than
3042         rename() to change the ctime of a file (because ctime is unaffected
3043         by rename on jfs2 on AIX 5.1).
3044         (main): Start by doing cleanup, in case a previous run failed leaving
3045         test files behind.
3046
3047 2007-03-31  Bruno Haible  <bruno@clisp.org>
3048
3049         Support old proprietary implementations of iconv.
3050         * modules/iconv_open: New file.
3051         * lib/iconv_.h: New file.
3052         * m4/iconv_h.m4: New file.
3053         * lib/iconv_open.c: New file.
3054         * lib/iconv_open-aix.gperf: New file.
3055         * lib/iconv_open-hpux.gperf: New file.
3056         * lib/iconv_open-irix.gperf: New file.
3057         * lib/iconv_open-osf.gperf: New file.
3058         * m4/iconv_open.m4: New file.
3059         * modules/linebreak (Depends-on): Add iconv_open.
3060         * modules/striconv (Depends-on): Likewise.
3061         * modules/striconveh (Depends-on): Likewise.
3062         * modules/unicodeio (Depends-on): Likewise.
3063         * lib/striconveh.h (mem_cd_iconveh, str_cd_iconveh): Allow cd to be
3064         (iconv_t)(-1).
3065         * lib/striconveh.c (mem_cd_iconveh_internal): Use an indirect
3066         conversion if cd is (iconv_t)(-1).
3067         (mem_iconveh, str_iconveh): Don't fail just because a direct conversion
3068         is not possible.
3069
3070 2007-03-31  Bruno Haible  <bruno@clisp.org>
3071
3072         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
3073         work on Solaris either. Protect also second use of "autodetect_jp".
3074
3075 2007-03-31  Bruno Haible  <bruno@clisp.org>
3076
3077         * m4/frexpl.m4 (gl_FUNC_FREXPL): Set HAVE_DECL_FREXPL to 0 when
3078         the function is not present.
3079
3080 2007-03-31  Bruno Haible  <bruno@clisp.org>
3081
3082         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Set HAVE_DECL_LDEXPL to 0 when
3083         the function is not present.
3084
3085 2007-03-31  Bruno Haible  <bruno@clisp.org>
3086
3087         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-29 patch. Test also against
3088         a bug in HP-UX iconv_open().
3089
3090 2007-03-31  Bruno Haible  <bruno@clisp.org>
3091
3092         * MODULES.html.sh (func_module): Don't show gnulib-common.m4.
3093         (Mathematics <math.h>): New section, add fpieee.
3094         (Input/output <stdio.h>): Add fseterr.
3095         (Mathematics <math.h>): New section, add printf-frexp.
3096         (Container data structures): Add sublist.
3097         (Core language properties): Add fpucw, inline.
3098         (Functions for greatest-width integer types <inttypes.h>): Add
3099         imaxabs, imaxdiv, inttypes.
3100         (Mathematics <math.h>): Add frexp, frexpl, isnan-nolibm, isnanl,
3101         isnanl-nolibm, ldexp.
3102         (Mathematics <math.h>): New section, add printf-frexpl.
3103         (Support for systems lacking POSIX:2001): Add fprintf-posix,
3104         printf-posix, snprintf-posix, sprintf-posix, string, search, socklen,
3105         sys_select, sys_socket, vasnprintf-posix, vasprintf-posix,
3106         vfprintf-posix, vprintf-posix, vsnprintf-posix, vsprintf-posix.
3107         (Unicode string functions): Add unistr/u*-mbtoucr.
3108         (Java): Add javacomp-script, javaexec-script.
3109         (C#): Add csharpcomp-script, csharpexec-script.
3110         (Support for building libraries and executables): Add havelib,
3111         relocatable-*.
3112         (Support for maintaining and releasing projects): Renamed from
3113         'Support for maintaining and release projects'. Add announce-gen.
3114
3115 2007-03-31  Bruno Haible  <bruno@clisp.org>
3116
3117         * README: Talk primarily about git.
3118         (git and CVS): Renamed from CVS.
3119         * doc/gnulib.texi (Introduction, Build robot for gnulib): Mention that
3120         gnulib is available through git.
3121         * doc/gnulib-tool.texi (CVS Issues): Mention git and svn as well.
3122
3123 2007-03-30  Bruno Haible  <bruno@clisp.org>
3124
3125         * lib/alloca_.h: Change prefix of double-inclusion guard macro to _GL_.
3126         * lib/poll_.h: Likewise.
3127         * lib/stat_.h: Likewise.
3128         * lib/sys_time_.h: Likewise.
3129         * lib/sysexit_.h: Likewise.
3130         * lib/glob_.h: Prefix double-inclusion guard macro with _GL_.
3131         * lib/stdbool_.h: Likewise.
3132         * lib/byteswap_.h: Add double-inclusion guard.
3133
3134 2007-03-30  Sergey Poznyakoff  <gray@mirddin.farlep.net>
3135
3136         * lib/sysexit_.h: Prefix double-inclusion guard macro with _GNULIB.
3137
3138 2007-03-30  Karl Berry  <karl@gnu.org>
3139
3140         * config/srclist-update: double space after USA in the license
3141         substitution, since that's how it's usually (?) written.
3142
3143 2007-03-30  Paul Eggert  <eggert@cs.ucla.edu>
3144
3145         * lib/write-any-file.c (can_write_any_file): Fix else-else bug
3146         reported by Bruno Haible.
3147
3148 2007-03-29  Bruno Haible  <bruno@clisp.org>
3149
3150         * m4/iconv.m4 (AM_ICONV_LINK): Require AC_CANONICAL_HOST. Test against
3151         a bug in AIX iconv().
3152
3153 2007-03-29  Bruno Haible  <bruno@clisp.org>
3154
3155         * modules/ldexpl-tests: New file.
3156         * tests/test-ldexpl.c: New file.
3157
3158 2007-03-29  Bruno Haible  <bruno@clisp.org>
3159
3160         * lib/ldexpl.c: Include fpucw.h.
3161         (ldexpl): Use BEGIN/END_LONG_DOUBLE_ROUNDING. Skip the last unneeded
3162         multiplication.
3163         * modules/ldexpl (Depends-on): Add fpucw.
3164
3165 2007-03-29  Bruno Haible  <bruno@clisp.org>
3166
3167         * modules/ldexpl: New file.
3168         * m4/ldexpl.m4: New file.
3169         * lib/math_.h (ldexpl): Define to a replacement if REPLACE_LDEXPL is
3170         set.
3171         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize also GNULIB_LDEXPL,
3172         REPLACE_LDEXPL.
3173         * modules/math (Makefile.am): Substitute also GNULIB_LDEXPL,
3174         REPLACE_LDEXPL.
3175         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
3176         gl_FUNC_LDEXPL_WORKS.
3177         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Remove test for ldexpl.
3178         * modules/mathl (Files): Remove lib/ldexpl.c.
3179         (Depends-on): Add ldexpl.
3180
3181 2007-03-29  Bruno Haible  <bruno@clisp.org>
3182
3183         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Declare frexpl.
3184
3185 2007-03-29  Bruno Haible  <bruno@clisp.org>
3186
3187         * tests/test-striconveh.c (main): Don't assume that a direct conversion
3188         between ISO-8859-1 and ISO-8859-2 is possible. Needed for OSF/1, IRIX
3189         and possibly also HP-UX.
3190         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
3191         work on AIX, IRIX, HP-UX, OSF/1.
3192         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
3193         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
3194         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
3195         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
3196         * tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
3197         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
3198
3199 2007-03-29  Bruno Haible  <bruno@clisp.org>
3200
3201         * tests/test-stat-time.c: Include <fcntl.h>, not <sys/fcntl.h>.
3202
3203 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
3204
3205         * lib/acl-internal.h (acl_get_fd, acl_set_fd): undef before defining,
3206         to work around a problem on OSF/1 5.1 reported by Bruno Haible.
3207
3208 2007-03-29  Eric Blake  <ebb9@byu.net>
3209
3210         * lib/acl-internal.h: Remove redundant include.
3211         (ACL_NOT_WELL_SUPPORTED): Also filter on EBUSY, returned by
3212         Cygwin when a file is locked.
3213
3214 2007-03-29  Bruno Haible  <bruno@clisp.org>
3215
3216         * lib/vasprintf.c [IN_LIBASPRINTF]: Include different specification
3217         file.
3218         * lib/asprintf.c [IN_LIBASPRINTF]: Likewise.
3219
3220 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
3221
3222         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Don't bother to
3223         try to remove a parent directory if the child couldn't be removed
3224         (except for the first rmdir, which could fail because the child
3225         doesn't exist).  Problem reported by Jeff Blaine in
3226         <http://lists.gnu.org/archive/html/bug-tar/2007-03/msg00014.html>.
3227
3228 2007-03-28  Bruno Haible  <bruno@clisp.org>
3229
3230         * lib/striconveh.c (utf8conv_carefully): New function.
3231         (mem_cd_iconveh_internal): Invoke it.
3232
3233 2007-03-28  Bruno Haible  <bruno@clisp.org>
3234
3235         * lib/striconveh.c (mem_cd_iconveh_internal): Use u8_mbtoucr instead
3236         of u8_mbtouc in order to distinguish invalid and incomplete UTF-8
3237         input.
3238         * modules/striconveh (Depends-on): Add unistr/u8-mbtoucr. Replace
3239         utf8-ucs4 with unistr/u8-mbtouc. Replace ucs4-utf8 with
3240         unistr/u8-uctomb.
3241
3242 2007-03-28  Bruno Haible  <bruno@clisp.org>
3243
3244         * modules/unistr/u8-mbtoucr: New file.
3245         * lib/unistr/u8-mbtoucr.c: New file.
3246         * modules/unistr/u16-mbtoucr: New file.
3247         * lib/unistr/u16-mbtoucr.c: New file.
3248         * modules/unistr/u16-mbtoucr: New file.
3249         * lib/unistr/u16-mbtoucr.c: New file.
3250         * lib/unistr.h (u8_mbtoucr, u16_mbtoucr, u32_mbtoucr): New declarations.
3251
3252 2007-03-27  Simon Josefsson  <simon@josefsson.org>
3253             Bruno Haible  <bruno@clisp.org>
3254
3255         * m4/vasprintf.m4: Convert AC_SUBST into shell variable for
3256         REPLACE_VASPRINTF.  Set HAVE_VASPRINTF.  Add
3257         AC_REQUIRE([gl_STDIO_H_DEFAULTS]).
3258
3259         * m4/stdio_h.m4: Add stubs for vasprintf too.
3260
3261         * modules/stdio: Support vasprintf in sed command.
3262
3263         * modules/vasprintf: Depend on stdio for prototypes.  Remove
3264         vasprintf.h.  Add stdio module indicator.
3265
3266         * lib/stdio_.h: Declare asprintf and vasprintf, based on
3267         vasprintf.h.
3268
3269         * lib/vasprintf.h: File removed.
3270
3271         * lib/asprintf.c: Use stdio.h instead of vasprintf.h.
3272         * lib/vasprintf.c: Ditto.
3273         * lib/xvasprintf.c: Ditto.
3274         * tests/test-vasprintf-posix.c: Ditto.
3275         * tests/test-vasprintf.c: Ditto.
3276
3277 2007-03-27  Bruno Haible  <bruno@clisp.org>
3278
3279         Make vasnprintf multithread-safe.
3280         * lib/vasnprintf.c (decimal_point_char): New function.
3281         (VASNPRINTF): Use it.
3282         Suggested by Simon Josefsson.
3283
3284 2007-03-27  Eric Blake  <ebb9@byu.net>
3285
3286         Support sub-second birthtime on cygwin.
3287         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Also check for st_birthtim.
3288         * lib/stat-time.h (STAT_TIMESPEC): Adjust comments.
3289         (get_stat_birthtime): Also work with st_birthtim.
3290
3291 2007-03-27  Paul Eggert  <eggert@cs.ucla.edu>
3292
3293         * lib/stat-time.h (USE_BIRTHTIME): Remove.
3294         (get_stat_atime_ns, get_stat_ctime_ns, get_stat_mtime_ns):
3295         (get_stat_birthtime_ns): Do not try to use "spare" fields.
3296         (get_stat_birthtime_ns): Simplify compile-time tests.
3297         (get_stat_birthtime): Change the API to look like
3298         get_stat_mtime etc., except return a negative tv_nsec on error.
3299         * m4/stat-time.m4 (gl_STAT_TIME, gl_STAT_BIRTHTIME):
3300         Don't check for "spare" fields.
3301         (gl_STAT_BIRTHTIME): Don't check for struct stat.st_birthtimespec.tv_sec
3302         or for struct stat.st_birthtime, as these tests aren't used.
3303         * tests/test-stat-time.c (test_birthtime): Adjust to new API.
3304
3305 2007-03-27  Bruno Haible  <bruno@clisp.org>
3306
3307         * lib/stat-time.h: Include <sys/stat.h>.
3308
3309 2007-03-27  James Youngman  <jay@gnu.org>
3310
3311         * lib/stat-time.h (get_stat_birthtime): New function for
3312           retrieving st_birthtime as provided by UFS2 (hence *BSD).
3313         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Probe for st_birthtime
3314           and its variants.
3315         * modules/stat-time (configure.ac): call gl_STAT_BIRTHTIME.
3316         * modules/stat-time-test: New file.
3317         * tests/test-stat-time.c: New test, devised by Bruno Haible.
3318
3319 2007-03-26  Bruno Haible  <bruno@clisp.org>
3320
3321         Better support of signalling NaNs.
3322         * lib/atanl.c: Include isnanl.h.
3323         (atanl): Perform test for NaN at the beginning of the function and
3324         through a call to isnanl.
3325         * lib/cosl.c: Include isnanl.h.
3326         (cosl): Perform test for NaN at the beginning of the function and
3327         through a call to isnanl.
3328         * lib/ldexpl.c: Include isnanl.h.
3329         (ldexpl): Perform test for NaN through a call to isnanl.
3330         * lib/logl.c: Include isnanl.h.
3331         (logl): Perform test for NaN at the beginning of the function and
3332         through a call to isnanl.
3333         * lib/sinl.c: Include isnanl.h.
3334         (sinl): Perform test for NaN at the beginning of the function and
3335         through a call to isnanl.
3336         * lib/sqrtl.c: Include isnanl.h.
3337         (sqrtl): Perform test for NaN at the beginning of the function and
3338         through a call to isnanl.
3339         * lib/tanl.c: Include isnanl.h.
3340         (tanl): Perform test for NaN at the beginning of the function and
3341         through a call to isnanl.
3342         * lib/trigl.c (ieee754_rem_pio2l): Remove test for NaN.
3343         * modules/mathl (Depends-on): Add isnanl.
3344
3345 2007-03-26  Eric Blake  <ebb9@byu.net>
3346
3347         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Fix
3348         regression in logic sense of previous patch.
3349
3350 2007-03-26  Bruno Haible  <bruno@clisp.org>
3351
3352         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Don't use
3353         unportable shell command "if ! ...".
3354         Reported by Ralf Wildenhues.
3355
3356 2007-03-25  Bruno Haible  <bruno@clisp.org>
3357
3358         * lib/sysexit_,h: If HAVE_SYSEXITS_H is defined, include the original
3359         <sysexits.h> file, and only add EX_CONFIG.
3360         * m4/sysexits.m4 (gl_SYSEXITS): If <sysexits.h> exists, check its
3361         absolute file name and whether it is sufficient. Substitute also
3362         HAVE_SYSEXITS_H and ABSOLUTE_SYSEXITS_H.
3363         * modules/sysexits (Makefile.am): Substitute HAVE_SYSEXITS_H and
3364         ABSOLUTE_SYSEXITS_H into sysexits.h.
3365
3366 2007-03-25  Bruno Haible  <bruno@clisp.org>
3367
3368         * lib/getaddrinfo.c (getaddrinfo): Don't access hints->ai_flags when
3369         hints is NULL.
3370
3371 2007-03-25  Bruno Haible  <bruno@clisp.org>
3372
3373         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Add a cast.
3374         * lib/uniconv/u8-strconv-to-enc.c (u8_strconv_to_encoding): Likewise.
3375
3376 2007-03-25  Bruno Haible  <bruno@clisp.org>
3377
3378         * lib/vasnprintf.c: Include langinfo.h.
3379         (VASNPRINTF): Prefer nl_langinfo over localeconv, since it's more
3380         multithread-safe.
3381         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): New macro.
3382         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke it.
3383         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
3384         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
3385         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
3386         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
3387         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
3388         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX: Likewise.
3389         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
3390         Reported by Simon Josefsson.
3391
3392 2007-03-25  Bruno Haible  <bruno@clisp.org>
3393
3394         * lib/printf-parse.c [!IN_LIBINTL]: Include <stdint.h>, for intmax_t.
3395         (PRINTF_PARSE): Make the support for size specifier 'j' unconditional.
3396         * modules/vasnprintf (Depends-on): Add stdint.
3397
3398 2007-03-25  Bruno Haible  <bruno@clisp.org>
3399
3400         * modules/fpieee: New file.
3401         * m4/fpieee.m4: New file.
3402         * modules/isnan-nolibm (Depends-on): Add fpieee.
3403         * modules/isnanl-nolibm (Depends-on): Add fpieee.
3404         * modules/isnanl (Depends-on): Add fpieee.
3405
3406 2007-03-25  Bruno Haible  <bruno@clisp.org>
3407
3408         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Test also finite numbers.
3409
3410 2007-03-25  Bruno Haible  <bruno@clisp.org>
3411
3412         Avoid test failures on IRIX 6.5.
3413         * tests/test-frexpl.c (MIN_NORMAL_EXP): New macro.
3414         (main): Use it.
3415         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP): New
3416         macros.
3417         (main): Use them.
3418
3419 2007-03-25  Bruno Haible  <bruno@clisp.org>
3420
3421         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): New macro.
3422         (gl_FUNC_FREXPL): Invoke it. Set REPLACE_FREXPL to 1 if it frexpl
3423         exists but doesn't work.
3424         * lib/math_.h (frexpl): Define as a replacement macro if REPLACE_FREXPL
3425         is set. Don't provide a prototype if REPLACE_FREXPL is not set.
3426         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FREXPL.
3427         * modules/math (Makefile.am) Substibute also REPLACE_FREXPL into math.h.
3428
3429 2007-03-25  Bruno Haible  <bruno@clisp.org>
3430
3431         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Add check whether frexp(inf)
3432         returns inf. Needed on IRIX 6.5.
3433
3434 2007-03-25  Bruno Haible  <bruno@clisp.org>
3435
3436         * tests/test-frexpl.c: Include isnanl-nolibm.h.
3437         (main): Use isnanl instead of x != x idiom.
3438         * modules/frexpl-tests (Depends-on): Add isnanl-nolibm.
3439
3440         * tests/test-frexp.c: Include isnan.h.
3441         (main): Use isnan instead of x != x idiom.
3442         * modules/frexp-tests (Depends-on): Add isnan-nolibm.
3443
3444 2007-03-25  Bruno Haible  <bruno@clisp.org>
3445
3446         * tests/test-frexp.c (NaN): New function/macro.
3447         (main): Use it instead of 0.0 / 0.0.
3448         * tests/test-isnan.c (NaN): New function/macro.
3449         (main): Use it instead of 0.0 / 0.0.
3450         * tests/test-vasnprintf-posix.c (NaN): New function/macro.
3451         (test_function): Use it instead of 0.0 / 0.0.
3452         * tests/test-vasprintf-posix.c (NaN): New function/macro.
3453         (test_function): Use it instead of 0.0 / 0.0.
3454         * tests/test-snprintf-posix.h (NaN): New function/macro.
3455         (test_function): Use it instead of 0.0 / 0.0.
3456         * tests/test-sprintf-posix.h (NaN): New function/macro.
3457         (test_function): Use it instead of 0.0 / 0.0.
3458         * tests/test-fprintf-posix.h (NaN): New function/macro.
3459         (test_function): Use it instead of 0.0 / 0.0.
3460         * tests/test-printf-posix.h (NaN): New function/macro.
3461         (test_function): Use it instead of 0.0 / 0.0.
3462
3463         * lib/isnan.c (FUNC): Work around a DEC C compiler bug.
3464
3465 2007-03-25  Bruno Haible  <bruno@clisp.org>
3466
3467         * lib/glob_.h: Include <sys/stat.h>. Avoids warnings on AIX 5.1.
3468
3469 2007-03-25  Bruno Haible  <bruno@clisp.org>
3470
3471         * lib/regexec.c (merge_state_with_log): Make static.
3472
3473 2007-03-25  Bruno Haible  <bruno@clisp.org>
3474
3475         * lib/trigl.c (kernel_rem_pio2): Make static.
3476
3477 2007-03-25  Bruno Haible  <bruno@clisp.org>
3478
3479         * lib/sincosl.c (sincosl_table): Make static.
3480
3481 2007-03-25  Bruno Haible  <bruno@clisp.org>
3482
3483         * lib/argp.h (__restrict): Define to empty, rather than to 'restrict',
3484         if the compiler does not support C99.
3485
3486 2007-03-25  Bruno Haible  <bruno@clisp.org>
3487
3488         * modules/time (Makefile.am): Ensure all rule action lines start with a
3489         tab.
3490
3491 2007-03-24  Bruno Haible  <bruno@clisp.org>
3492
3493         * modules/tsearch-tests: New file.
3494         * tests/test-tsearch.sh: New file.
3495         * tests/test-tsearch.c: New file, mostly copied from glibc.
3496
3497         * modules/search-tests: New file.
3498         * tests/test-search.c: New file.
3499
3500         * modules/search: New file.
3501         * lib/search_.h: New file, incorporating lib/tsearch.h.
3502         * m4/search_h.m4: New file.
3503         * lib/tsearch.h: Remove file.
3504         * lib/tsearch.c: Include search.h instead of tsearch.h.
3505         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Require gl_SEARCH_H_DEFAULTS. Set
3506         HAVE_TSEARCH.
3507         * modules/tsearch (Files): Remove lib/tsearch.h.
3508         (Depends-on): Add search.
3509         (configure.ac): Invoke gl_SEARCH_MODULE_INDICATOR.
3510         (Include): Change tsearch.h into search.h.
3511
3512 2007-03-24  Bruno Haible  <bruno@clisp.org>
3513
3514         * modules/fpucw: New file.
3515         * lib/fpucw.h: New file.
3516         * lib/frexp.c: Include fpucw.h.
3517         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
3518         (FUNC): Use them.
3519         * lib/printf-frexp.c: Include fpucw.h.
3520         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
3521         (FUNC): Use them.
3522         * lib/vasnprintf.c: Include fpucw.h.
3523         (VASNPRINTF): Invoke BEGIN/END_LONG_DOUBLE_ROUNDING around the
3524         'long double' calculations.
3525         * tests/test-frexpl.c: Include fpucw.h.
3526         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
3527         * tests/test-printf-frexpl.c: Include fpucw.h.
3528         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
3529         * modules/frexpl (Depends-on): Add fpucw.
3530         * modules/printf-frexpl (Depends-on): Likewise.
3531         * modules/fprintf-posix (Depends-on): Likewise.
3532         * modules/snprintf-posix (Depends-on): Likewise.
3533         * modules/sprintf-posix (Depends-on): Likewise.
3534         * modules/vasnprintf-posix (Depends-on): Likewise.
3535         * modules/vasprintf-posix (Depends-on): Likewise.
3536         * modules/vfprintf-posix (Depends-on): Likewise.
3537         * modules/vsnprintf-posix (Depends-on): Likewise.
3538         * modules/vsprintf-posix (Depends-on): Likewise.
3539         * modules/frexpl-tests (Depends-on): Likewise.
3540         * modules/printf-frexpl-tests (Depends-on): Likewise.
3541
3542 2007-03-24  Bruno Haible  <bruno@clisp.org>
3543
3544         * lib/float+.h: New file.
3545         * lib/isnan.c: Include float+.h.
3546         (SIZE): New macro.
3547         (FUNC): Compare only SIZE bytes of the value.
3548         * lib/vasnprintf.c: Include float+.h.
3549         (VASNPRINTF): When comparing agains +0.0L or +0.0, compare only
3550         SIZEOF_LDBL or SIZEOF_DBL bytes.
3551         * modules/isnan-nolibm (Files): Add lib/float+.h.
3552         * modules/isnanl-nolibm (Files): Add lib/float+.h.
3553         * modules/isnanl (Files): Add lib/float+.h.
3554         * modules/vasnprintf (Files): Add lib/float+.h.
3555
3556 2007-03-24  Bruno Haible  <bruno@clisp.org>
3557
3558         * lib/vasnprintf.c [!HAVE_LONG_DOUBLE]: Include printf-frexp.h. Don't
3559         include isnanl-nolibm.h.
3560
3561 2007-03-24  Bruno Haible  <bruno@clisp.org>
3562
3563         * tests/test-read-file.c (main): Don't produce spurious output for
3564         expected situations. Make the test fail if it encountered unexpected
3565         results.
3566
3567 2007-03-24  Bruno Haible  <bruno@clisp.org>
3568
3569         * m4/locale-fr.m4 (gt_LOCALE_FR): Remove the special-casing of NetBSD,
3570         since its fr_FR.ISO8859-1 locale wouldn't pass the tests.
3571
3572 2007-03-24  Bruno Haible  <bruno@clisp.org>
3573
3574         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Fix last change.
3575
3576 2007-03-24  Bruno Haible  <bruno@clisp.org>
3577
3578         * modules/unistr/base (Depends-on): Remove utf8-ucs4-unsafe,
3579         utf16-ucs4-unsafe, utf8-ucs4, utf16-ucs4, ucs4-utf8, ucs4-utf16.
3580
3581         * modules/unistr/u8-mbtouc: Add source files from module utf8-ucs4.
3582         * modules/utf8-ucs4: Turn into a symbolic link to module
3583         unistr/u8-mbtouc.
3584
3585         * modules/unistr/u8-mbtouc-unsafe: Add source files from module
3586         utf8-ucs4-unsafe.
3587         * modules/utf8-ucs4-unsafe: Turn into a symbolic link to module
3588         unistr/u8-mbtouc-unsafe.
3589
3590         * modules/unistr/u16-mbtouc: Add source files from module utf16-ucs4.
3591         * modules/utf16-ucs4: Turn into a symbolic link to module
3592         unistr/u16-mbtouc.
3593
3594         * modules/unistr/u16-mbtouc-unsafe: Add source files from module
3595         utf16-ucs4-unsafe.
3596         * modules/utf16-ucs4-unsafe: Turn into a symbolic link to module
3597         unistr/u16-mbtouc-unsafe.
3598
3599         * modules/unistr/u8-uctomb: Add source files from module utf4-utf8.
3600         * modules/ucs4-utf8: Turn into a symbolic link to module
3601         unistr/u8-ubtomb.
3602
3603         * modules/unistr/u16-uctomb: Add source files from module utf4-utf16.
3604         * modules/ucs4-utf16: Turn into a symbolic link to module
3605         unistr/u16-ubtomb.
3606
3607 2007-03-24  Bruno Haible  <bruno@clisp.org>
3608
3609         * lib/unistr/u8-mbtouc-aux.c: Renamed from lib/unistr/utf8-ucs4.c.
3610         Enable the function only if HAVE_INLINE.
3611         * lib/unistr/u8-mbtouc-unsafe-aux.c: Renamed from
3612         lib/unistr/utf8-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
3613         * lib/unistr/u16-mbtouc-aux.c: Renamed from lib/unistr/utf16-ucs4.c.
3614         Enable the function only if HAVE_INLINE.
3615         * lib/unistr/u16-mbtouc-unsafe-aux.c: Renamed from
3616         lib/unistr/utf16-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
3617         * lib/unistr/u8-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf8.c.
3618         Enable the function only if HAVE_INLINE.
3619         * lib/unistr/u16-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf16.c.
3620         Enable the function only if HAVE_INLINE.
3621         * modules/utf8-ucs4: Update.
3622         * modules/utf8-ucs4-unsafe: Update.
3623         * modules/utf16-ucs4: Update.
3624         * modules/utf16-ucs4-unsafe: Update.
3625         * modules/ucs4-utf8: Update.
3626         * modules/ucs4-utf16: Update.
3627
3628 2007-03-24  Bruno Haible  <bruno@clisp.org>
3629
3630         * lib/utf8-ucs4.h: Remove file.
3631         * lib/utf8-ucs4-unsafe.h: Remove file.
3632         * lib/utf16-ucs4.h: Remove file.
3633         * lib/utf16-ucs4-unsafe.h: Remove file.
3634         * lib/ucs4-utf8.h: Remove file.
3635         * lib/ucs4-utf16.h: Remove file.
3636         * lib/unistr.h: Include their previous contents.
3637         * m4/utf-ucs4.m4: Remove file.
3638         * m4/ucs4-utf.m4: Remove file.
3639         * modules/utf8-ucs4 (Files): Remove lib/utf8-ucs4.h.
3640         (Depends-on): Add unistr/base.
3641         (configure.ac): Remove gl_UTF_UCS4.
3642         (Makefile.am): Update.
3643         (Include): Change to unistr.h.
3644         * modules/utf8-ucs4-unsafe (Files): Remove lib/utf8-ucs4-unsafe.h.
3645         (Depends-on): Add unistr/base.
3646         (configure.ac): Remove gl_UTF_UCS4.
3647         (Makefile.am): Update.
3648         (Include): Change to unistr.h.
3649         * modules/utf16-ucs4 (Files): Remove lib/utf16-ucs4.h.
3650         (Depends-on): Add unistr/base.
3651         (configure.ac): Remove gl_UTF_UCS4.
3652         (Makefile.am): Update.
3653         (Include): Change to unistr.h.
3654         * modules/utf16-ucs4-unsafe (Files): Remove lib/utf16-ucs4-unsafe.h.
3655         (Depends-on): Add unistr/base.
3656         (configure.ac): Remove gl_UTF_UCS4.
3657         (Makefile.am): Update.
3658         (Include): Change to unistr.h.
3659         * modules/ucs4-utf8 (Files): Remove lib/ucs4-utf8.h.
3660         (Depends-on): Add unistr/base.
3661         (configure.ac): Remove gl_UCS4_UTF.
3662         (Makefile.am): Update.
3663         (Include): Change to unistr.h.
3664         * modules/ucs4-utf16 (Files): Remove lib/ucs4-utf16.h.
3665         (Depends-on): Add unistr/base.
3666         (configure.ac): Remove gl_UCS4_UTF.
3667         (Makefile.am): Update.
3668         (Include): Change to unistr.h.
3669         * lib/unistr/utf8-ucs4.c: Include unistr.h instead of utf8-ucs4.h.
3670         * lib/unistr/utf8-ucs4-unsafe.c: Include unistr.h instead of
3671         utf8-ucs4-unsafe.h.
3672         * lib/unistr/utf16-ucs4.c: Include unistr.h instead of utf16-ucs4.h.
3673         * lib/unistr/utf16-ucs4-unsafe.c: Include unistr.h instead of
3674         utf16-ucs4-unsafe.h.
3675         * lib/unistr/ucs4-utf8.c: Include unistr.h instead of ucs4-utf8.h.
3676         * lib/unistr/ucs4-utf16.c: Include unistr.h instead of ucs4-utf16.h.
3677         * lib/unistr/u8-chr.c: Don't include ucs4-utf8.h.
3678         * lib/unistr/u8-strchr.c: Likewise.
3679         * lib/unistr/u8-strrchr.c: Likewise.
3680         * lib/unistr/u16-chr.c: Don't include ucs4-utf16.h.
3681         * lib/unistr/u16-strchr.c: Likewise.
3682         * lib/unistr/u16-strrchr.c: Likewise.
3683         * lib/striconveh.c: Update.
3684         * lib/linebreak.c: Update.
3685
3686 2007-03-24  Bruno Haible  <bruno@clisp.org>
3687
3688         * lib/argp-help.c (fill_in_uparams, canon_doc_option): Cast the
3689         arguments of isspace, isalpha, isalnum, isdigit to 'unsigned char'.
3690
3691 2007-03-22  Bruno Haible  <bruno@clisp.org>
3692
3693         * lib/strptime.c (__strptime_internal): Use ANSI C syntax.
3694
3695 2007-03-23  Paul Eggert  <eggert@cs.ucla.edu>
3696
3697         * MODULES.html.sh (File system functions): New module write-any-file.
3698         * modules/write-any-file, lib/write-any-file.c, lib/write-any-file.h:
3699         * m4/write-any-file.m4: New files.
3700
3701 2007-03-23  Eric Blake  <ebb9@byu.net>
3702
3703         * gnulib-tool: Rearrange space-tab sequences, since some editors
3704         like to eat them.
3705
3706 2007-03-23  Eric Blake  <ebb9@byu.net>
3707
3708         * lib/version-etc.c (version_etc_va): Update license wording to
3709         be more concise.  Recommended by Richard Stallman.
3710
3711 2007-03-22  Bruno Haible  <bruno@clisp.org>
3712
3713         * lib/poll.c (MSG_PEEK): New fallback definition.
3714
3715 2007-03-22  Bruno Haible  <bruno@clisp.org>
3716
3717         * modules/sys_socket-tests (configure.ac): Check for shutdown function.
3718         * tests/test-sys_socket.c (a): Test only if shutdown() exists.
3719         (main): Update.
3720         Fixes a compilation error on BeOS.
3721
3722 2007-03-22  Bruno Haible  <bruno@clisp.org>
3723
3724         * modules/frexpl-tests: New file.
3725         * tests/test-frexpl.c: New file.
3726
3727         * modules/frexpl: New file.
3728         * m4/frexpl.m4: New file.
3729         * modules/math (Makefile.am): Also substitute GNULIB_FREXPL into math.h.
3730         * lib/math_.h (frexpl): Test GNULIB_FREXPL instead of GNULIB_MATHL.
3731         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FREXPL.
3732         * modules/mathl (Files): Remove lib/frexpl.c, lib/frexp.c.
3733         (Depends-on): Add frexpl. Remove isnanl-nolibm.
3734         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Don't test for frexpl.
3735
3736 2007-03-22  Bruno Haible  <bruno@clisp.org>
3737
3738         * lib/frexpl.c: Share code with lib/frexp.c.
3739         * modules/mathl (Files): Add lib/frexp.c.
3740         (Depends-on): Add isnanl-nolibm.
3741
3742 2007-03-22  Bruno Haible  <bruno@clisp.org>
3743
3744         * modules/printf-frexp (Files): Add m4/frexp.m4.
3745         * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Define HAVE_FREXP_IN_LIBC
3746         only if the found frexp function actually works.
3747
3748 2007-03-22  Bruno Haible  <bruno@clisp.org>
3749
3750         * lib/frexp.c: Remove older implementation that uses divisions.
3751
3752 2007-03-21  Bruno Haible  <bruno@clisp.org>
3753
3754         * modules/frexp-tests: New file.
3755         * tests/test-frexp.c: New file.
3756
3757         * modules/frexp: New file.
3758         * lib/frexp.c: New file.
3759         * m4/frexp.m4: New file.
3760         * lib/math_.h (frexp): New declaration.
3761         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Also initialize GNULIB_FREXP and
3762         REPLACE_FREXP.
3763         * modules/math (math.h): Also substitute GNULIB_FREXP, REPLACE_FREXP.
3764
3765 2007-03-21  Bruno Haible  <bruno@clisp.org>
3766
3767         * modules/isnanl-tests: New file.
3768         * tests/test-isnanl.c: New file.
3769
3770         * modules/isnanl: New file.
3771         * lib/isnanl.h: New file.
3772         * m4/isnanl.m4 (gl_FUNC_ISNANL): New macro.
3773         (gl_FUNC_ISNANL_NO_LIBM): Invoke gl_HAVE_ISNANL_NO_LIBM,
3774         gl_FUNC_ISNANL_WORKS.
3775         (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM, gl_FUNC_ISNANL_WORKS):
3776         New macros.
3777
3778 2007-03-21  Bruno Haible  <bruno@clisp.org>
3779
3780         * modules/isnanl-nolibm (Files): Add lib/isnanl-nolibm.h, remove
3781         lib/isnanl.h.
3782         (Include): Update.
3783         * lib/isnanl-nolibm.h: Renamed from lib/isnanl.h.
3784         * lib/vasnprintf.c: Update.
3785         * modules/isnanl-nolibm-tests (Files): Add tests/test-isnanl-nolibm.c,
3786         tests/test-isnanl.h, remove tests/test-isnanl.c.
3787         (Makefile.am): Update.
3788         * tests/test-isnanl-nolibm.c: New file.
3789         * tests/test-isnanl.h: New file.
3790         * tests/test-isnanl.c: Remove file.
3791
3792 2007-03-21  Jim Meyering  <jim@meyering.net>
3793
3794         When trying to open ".", treat ESTALE like EACCES.
3795         * lib/savewd.c (savewd_save): Resort to forking not just upon
3796         failure with EACCES, but also when errno is ESTALE.
3797
3798 2007-03-20  Bruno Haible  <bruno@clisp.org>
3799
3800         * lib/string_.h (strndup): Enable declaration also if HAVE_STRNDUP.
3801         Needed on AIX 5.1. Reported by Matthew Woehlke.
3802
3803 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
3804
3805         Suggestions by Bruno Haible:
3806         * lib/acl-internal.h: Include "gettext.h" rather than rolling
3807         our own.
3808         (ACL_NOT_WELL_SUPPORTED): Parenthesize arg when used.
3809         * modules/acl (Depends-on): Add gettext.
3810
3811 2007-03-19  Bruno Haible  <bruno@clisp.org>
3812
3813         * modules/iconvme: Remove file.
3814         * lib/iconvme.h: Remove file.
3815         * lib/iconvme.c: Remove file.
3816         * m4/iconvme.m4: Remove file.
3817
3818 2007-03-19  Bruno Haible  <bruno@clisp.org>
3819
3820         * doc/relocatable-maint.texi: Break long shell script line.
3821         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
3822
3823 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
3824
3825         Add limited support for Solaris 10 ZFS-style ACLs: just enough to
3826         handle file_has_acl.
3827         * lib/acl-internal.h, lib/acl_entries.c, lib/file-has-acl.c: New files.
3828         * lib/acl.c: Move header inclusions and related macro defns into
3829         lib/acl-internal.h.
3830         (S_ISLNK): Remove defn, since that's now done for us.
3831         (file_has_acl): Move to lib/file-has-acl.c.
3832         Call acl_trivial if available.  This is the crucial part of the fix.
3833         (acl_entries): Move to lib/acl_entries.c.  Now extern, since it's
3834         shared within the library.  Rewrite a bit, partly to make it compatible
3835         with the GNU coding style.
3836         * m4/acl.m4 (AC_FUNC_ACL): Add AC_LIBOBJ([file-has-acl]).
3837         Remove unnecessary double-quotes.
3838         Don't test for acl_to_text; the build will catch that.
3839         Replace acl_entries if it doesn't exist and it is needed.
3840         Check for -lsec and acl_trivial (as used on Solaris 10).
3841         * modules/acl (Files): Add lib/acl-internal.h, lib/acl_entries.c,
3842         lib/file-has-acl.c.
3843         (Depends-on): Add sys_stat, for S_ISLNK.
3844
3845 2007-03-19  Ben Pfaff  <blp@gnu.org>
3846
3847         * doc/gnulib.texi: Fix typos.
3848         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
3849
3850 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
3851
3852         * lib/getcwd.c (__getcwd): Remove redundant comparison of buf to NULL.
3853         If size is zero here, buf must be zero.
3854
3855 2007-03-19  Simon Josefsson  <simon@josefsson.org>
3856
3857         * des.c: Remove weak_keys_chksum.  Reported by Bruno Haible
3858         <bruno@clisp.org>.
3859
3860 2007-03-18  Bruno Haible  <bruno@clisp.org>
3861
3862         * lib/vasnprintf.c (VASNPRINTF): Undo first part of last patch.
3863         Suggested by Eric Blake.
3864
3865 2007-03-18  Ben Pfaff  <blp@gnu.org>
3866
3867         * doc/relocatable.texi: Recommend using as prefix a directory
3868         that does not exist and will never be created.  Based on
3869         discussion with Bruno Haible, Ralf Wildenhues, Matthew Woehlke,
3870         and others.
3871
3872 2007-03-17  Bruno Haible  <bruno@clisp.org>
3873
3874         * lib/fchownat.c: Include lchown.h.
3875
3876 2007-03-17  Bruno Haible  <bruno@clisp.org>
3877
3878         Fix endless loop when the given allocated size was > INT_MAX.
3879         * lib/vasnprintf.c (EOVERFLOW): New fallback definition.
3880         (VASNPRINTF): Fail with EOVERFLOW when the given allocated size is
3881         larger than INT_MAX, or when it grow to a value larger than INT_MAX.
3882         * lib/vsprintf.c (vsprintf): Don't pass a size > INT_MAX to vasnprintf.
3883         * lib/sprintf.c (sprintf): Likewise.
3884
3885 2007-03-17  Bruno Haible  <bruno@clisp.org>
3886
3887         * tests/test-argp-2.sh (func_compare): Output a context diff.
3888
3889 2007-03-17  Bruno Haible  <bruno@clisp.org>
3890
3891         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Check also the
3892         locale's decimal-point character.
3893
3894 2007-03-17  Bruno Haible  <bruno@clisp.org>
3895
3896         * lib/vasnprintf.c (VASNPRINTF): Clear out the memory used for arg_mem
3897         before comparing it. Needed because on some platforms (e.g. x86) a
3898         'long double' occupies less bytes than sizeof (long double).
3899
3900 2007-03-17  Bruno Haible  <bruno@clisp.org>
3901
3902         * tests/test-crc.c (main): Make printf statements 64-bit clean.
3903         * tests/test-gc-pbkdf2-sha1.c (main): Likewise.
3904         * tests/test-getaddrinfo.c (simple): Likewise.
3905         * tests/test-read-file.c (main): Likewise.
3906
3907 2007-03-17  Bruno Haible  <bruno@clisp.org>
3908
3909         * tests/test-dirname.c (main): Make printf statements 64-bit clean.
3910
3911 2007-03-17  Bruno Haible  <bruno@clisp.org>
3912
3913         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Remove
3914         unused variable.
3915
3916 2007-03-17  Bruno Haible  <bruno@clisp.org>
3917
3918         * tests/test-c-strcasecmp.c: Include c-strcase.h.
3919         * tests/test-c-strncasecmp.c: Likewise.
3920
3921 2007-03-17  Bruno Haible  <bruno@clisp.org>
3922
3923         * modules/stdlib (Depends-on): Add unistd.
3924         * lib/stdlib_.h: Include <unistd.h> if mkstemp is desired.
3925         Needed for MacOS X 10.3.
3926
3927 2007-03-17  Bruno Haible  <bruno@clisp.org>
3928
3929         * lib/unistr/u-strdup.h: Include <stdlib.h>.
3930
3931 2007-03-17  Bruno Haible  <bruno@clisp.org>
3932
3933         * lib/unistr/u-cpy-alloc.h: Include <stdlib.h>.
3934
3935 2007-03-17  Bruno Haible  <bruno@clisp.org>
3936
3937         * gnulib-tool (func_import): Update .cvsignore and .gitignore files
3938         to reflect files copied from gnulib (with or without modifications).
3939         Suggested by Jim Meyering.
3940
3941 2007-03-17  Eric Blake  <ebb9@byu.net>
3942
3943         * NEWS: Document stdlib change from 2007-02-18.
3944
3945 2007-03-17  Jim Meyering  <jim@meyering.net>
3946
3947         Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
3948         * build-aux/bootstrap: Put ""s around use of $build_aux, in case
3949         someone uses a name containing shell meta-characters.
3950         Reported by Alfred M. Szmidt.
3951
3952         * build-aux/bootstrap: Don't use \> in grep regexp.  For HP-UX.
3953
3954 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
3955
3956         * build-aux/bootstrap (with_gettext): New variable.  Run autopoint
3957         and copy gettext configuration files only if configure.ac contains
3958         a use of AM_GNU_GETTEXT_VERSION.
3959
3960 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
3961
3962         * build-aux/bootstrap (gnulib_name): New variable.
3963         (gnulib_tool_options): Use it.
3964
3965 2007-03-13  Simon Josefsson  <simon@josefsson.org>
3966
3967         * tests/test-des.c: Use new namespace.
3968
3969 2007-03-15  Bruno Haible  <bruno@clisp.org>
3970
3971         * lib/dummy.c (gl_dummy_symbol): Renamed from 'dummy'.
3972         Reported by James Youngman <jay@gnu.org>.
3973
3974 2007-03-15  Bruno Haible  <bruno@clisp.org>
3975
3976         * lib/glob.c (glob): Add 'restrict' so that prototype matches the
3977         declared prototype. Needed with cc on OSF/1 5.1.
3978
3979 2007-03-15  Bruno Haible  <bruno@clisp.org>
3980
3981         * lib/gl_list.h (gl_listelement_dispose_fn): New type.
3982         (gl_list_create_empty, gl_list_create): Add dispose_fn argument.
3983         (struct gl_list_implementation): Add dispose_fn argument to the
3984         'create_empty', 'create' methods.
3985         (struct gl_list_impl_base): Add field 'dispose_fn'.
3986         * lib/gl_list.c (gl_list_create_empty, gl_list_create): Add dispose_fn
3987         argument.
3988         * lib/gl_array_list.c (gl_array_create_empty, gl_array_create): Add
3989         dispose_fn argument.
3990         (gl_array_remove_node, gl_array_remove_at, gl_array_list_free): Call
3991         dispose_fn on the dropped values.
3992         * lib/gl_carray_list.c (gl_carray_create_empty, gl_carray_create): Add
3993         dispose_fn argument.
3994         (gl_carray_remove_at, gl_carray_list_free): Call dispose_fn on the
3995         dropped values.
3996         * lib/gl_anyavltree_list2.h (gl_tree_create): Add dispose_fn argument.
3997         (gl_tree_remove_node): Call dispose_fn on the dropped value.
3998         * lib/gl_anyrbtree_list2.h (gl_tree_create): Add dispose_fn argument.
3999         (gl_tree_remove_node): Call dispose_fn on the dropped value.
4000         * lib/gl_anytree_list2.h (gl_tree_create_empty): Add dispose_fn
4001         argument.
4002         (gl_tree_list_free): Call dispose_fn on the dropped values.
4003         * lib/gl_anytreehash_list2.h (gl_tree_list_free): Call dispose_fn on
4004         the dropped values.
4005         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
4006         Add dispose_fn argument.
4007         (gl_linked_remove_node, gl_linked_remove_at, gl_linked_list_free):
4008         Call dispose_fn on the dropped values.
4009         * lib/gl_sublist.c (gl_sublist_create_empty, gl_sublist_create_fill):
4010         Add dispose_fn argument.
4011         (gl_sublist_create): Initialize the 'dispose_fn' field.
4012         * lib/clean-temp.c (create_temp_dir, register_fd): Update.
4013         * tests/test-array_list.c (main): Update.
4014         * tests/test-carray_list.c (main): Update.
4015         * tests/test-avltree_list.c (main): Update.
4016         * tests/test-rbtree_list.c (main): Update.
4017         * tests/test-avltreehash_list.c (main): Update.
4018         * tests/test-rbtreehash_list.c (main): Update.
4019         * tests/test-linked_list.c (main): Update.
4020         * tests/test-linkedhash_list.c (main): Update.
4021         * tests/test-array_oset.c (main): Update.
4022
4023 2007-03-15  Bruno Haible  <bruno@clisp.org>
4024
4025         * lib/gl_oset.h (gl_setelement_dispose_fn): New type.
4026         (gl_oset_create_empty): Add dispose_fn argument.
4027         (struct gl_oset_implementation): Add dispose_fn argument to
4028         'create_empty' method.
4029         (struct gl_oset_impl_base): Add dispose_fn field.
4030         * lib/gl_oset.c (gl_oset_create_empty): Add dispose_fn argument.
4031         * lib/gl_array_oset.c (gl_array_create_empty): Add dispose_fn argument.
4032         (gl_array_remove_at, gl_array_free): Call dispose_fn on the dropped
4033         values.
4034         * lib/gl_anytree_oset.h (gl_tree_create_empty): Add dispose_fn argument.
4035         (gl_tree_oset_free): Call dispose_fn on the dropped values.
4036         * lib/gl_avltree_oset.c (gl_tree_remove_node): Call dispose_fn on the
4037         dropped value.
4038         * lib/gl_rbtree_oset.c (gl_tree_remove_node): Call dispose_fn on the
4039         dropped value.
4040         * tests/test-array_oset.c (main): Update.
4041         * tests/test-avltree_oset.c (main): Update.
4042         * tests/test-rbtree_oset.c (main): Update.
4043         * lib/gl_anytreehash_list1.h (add_to_bucket): Update.
4044
4045 2007-03-13  Bruno Haible  <bruno@clisp.org>
4046
4047         * tests/test-stdbool.c (i): Update after last patch.
4048
4049 2007-03-12  Bruno Haible  <bruno@clisp.org>
4050
4051         * lib/quotearg.c: Include <wctype.h> early, before the definition of
4052         the iswprint macro. Needed on Solaris 2.5.1.
4053
4054 2007-03-12  Bruno Haible  <bruno@clisp.org>
4055
4056         * tests/test-printf-frexp.c (main): Declare x as volatile.
4057
4058 2007-03-12  Simon Josefsson  <simon@josefsson.org>
4059
4060         * doc/gnulib.texi (Build robot for gnulib): New section.
4061
4062 2007-03-12  Jim Meyering  <jim@meyering.net>
4063
4064         * build-aux/bootstrap: New file.
4065         * build-aux/bootstrap.conf: New file, from coreutils.
4066
4067 2007-03-11  Bruno Haible  <bruno@clisp.org>
4068
4069         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Require AC_C_INLINE.
4070
4071 2007-03-12  Simon Josefsson  <simon@josefsson.org>
4072
4073         * lib/des.h, lib/des.c, lib/gc-gnulib.c: Use gl_ namespace, to
4074         avoid collisions with 'des_setkey'.  Reported by Bruno Haible
4075         <bruno@clisp.org>.  Also change 'tripledes_' to '3des_'.
4076
4077 2007-03-11  Bruno Haible  <bruno@clisp.org>
4078
4079         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): If the test program fails to
4080         compile, set LOCALE_TR_UTF8 to 'none' instead of empty.
4081
4082 2007-03-11  Bruno Haible  <bruno@clisp.org>
4083
4084         * lib/stdint_.h (INT64_MIN, INTMAX_MIN): Avoid using the ~INT..._MAX
4085         formula. Needed for SunPRO C 5.0.
4086
4087 2007-03-11  Bruno Haible  <bruno@clisp.org>
4088
4089         * modules/long-options (Depends-on): Add getopt.
4090
4091 2007-03-11  Bruno Haible  <bruno@clisp.org>
4092
4093         * modules/modechange (Depends-on): Add stdbool.
4094
4095 2007-03-11  Bruno Haible  <bruno@clisp.org>
4096
4097         * modules/i-ring (Depends-on): Add stdbool.
4098
4099 2007-03-11  Bruno Haible  <bruno@clisp.org>
4100
4101         * modules/gc-des (Depends-on): Add stdbool.
4102
4103 2007-03-11  Bruno Haible  <bruno@clisp.org>
4104
4105         * m4/mktime.m4 (gl_PREREQ_MKTIME): Require AC_C_INLINE.
4106
4107 2007-03-11  Bruno Haible  <bruno@clisp.org>
4108
4109         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Require AC_C_RESTRICT.
4110
4111 2007-03-11  Bruno Haible  <bruno@clisp.org>
4112
4113         * lib/unistr/u32-mbtouc-unsafe.c (u32_mbtouc_unsafe): Fix syntax error.
4114
4115 2007-03-11  Bruno Haible  <bruno@clisp.org>
4116
4117         * lib/vasnprintf.c (sprintf): Undefine.
4118
4119 2007-03-11  Bruno Haible  <bruno@clisp.org>
4120
4121         * lib/isnan.c (rpl_isnan, rpl_isnanl): Work around bug regarding
4122         initializers in SunPRO C and Compaq C compilers.
4123
4124 2007-03-11  Bruno Haible  <bruno@clisp.org>
4125
4126         * lib/gl_array_oset.c (gl_array_iterator_next): Make pointer
4127         decrementing code ANSI C compliant.
4128
4129 2007-03-11  Bruno Haible  <bruno@clisp.org>
4130
4131         * lib/dummy.c [__sun]: Define a dummy variable, not just a typedef.
4132         Needed for Solaris 2.5.1 ranlib and SunPRO C 5.0.
4133
4134 2007-03-11  Bruno Haible  <bruno@clisp.org>
4135
4136         * tests/test-stdbool.c (s, d, e, xlcbug): Disable checks that gnulib's
4137         <stdbool.h> substitute doesn't pass.
4138
4139 2007-03-11  Bruno Haible  <bruno@clisp.org>
4140
4141         * lib/vasnprintf.c (snprintf): Undefine. Avoids an endless recursion.
4142
4143 2007-03-11  Bruno Haible  <bruno@clisp.org>
4144
4145         * gnulib-tool (func_create_megatestdir): Create also an autobuild
4146         script, for submission to autobuild.josefsson.org.
4147
4148 2007-03-10  Bruno Haible  <bruno@clisp.org>
4149
4150         * modules/canonicalize-lgpl-tests: New file.
4151         * tests/test-canonicalize-lgpl.sh: New file.
4152         * tests/test-canonicalize-lgpl.c: New file.
4153
4154         * modules/c-strcase-tests: New file.
4155         * tests/test-c-strcase.sh: New file.
4156         * tests/test-c-strcasecmp.c: New file.
4157         * tests/test-c-strncasecmp.c: New file.
4158
4159         * modules/atexit-tests: New file.
4160         * tests/test-atexit.sh: New file.
4161         * tests/test-atexit.c: New file.
4162
4163 2007-03-10  Bruno Haible  <bruno@clisp.org>
4164
4165         * tests/test-binary-io.sh: Use temporary filenames that are not so
4166         likely to clash with those of other tests (in a parallel make).
4167         * tests/test-binary-io.c: Likewise.
4168
4169 2007-03-10  Bruno Haible  <bruno@clisp.org>
4170
4171         * lib/fseterr.c (fseterr): Port to Solaris/SPARC64. Deactivate the
4172         fallback; use #error instead.
4173         Suggested by Simon Josefsson.
4174
4175 2007-03-10  Bruno Haible  <bruno@clisp.org>
4176
4177         * gnulib-tool (func_create_testdir): Treat MOSTLYCLEANFILES like
4178         CLEANFILES. Put spaces in each line of $cleaned_files, not only the
4179         first and the last.
4180
4181 2007-03-10  Bruno Haible  <bruno@clisp.org>
4182
4183         * lib/stdint_.h (uint_least64_t): Fix typo in last patch.
4184
4185 2007-03-10  Bruno Haible  <bruno@clisp.org>
4186
4187         * modules/snprintf-posix-tests (EXTRA_DIST): New variable. Needed for
4188         "make distcheck".
4189         * modules/sprintf-posix-tests (EXTRA_DIST): Likewise.
4190         * modules/vsnprintf-posix-tests (EXTRA_DIST): Likewise.
4191         * modules/vsprintf-posix-tests (EXTRA_DIST): Likewise.
4192
4193 2007-03-10  Bruno Haible  <bruno@clisp.org>
4194
4195         * modules/allocsa-tests (test_allocsa_SOURCES): Remove redundant
4196         variable.
4197         * modules/dirname-tests (test_dirname_SOURCES): Remove redundant
4198         variable.
4199
4200 2007-03-09  Eric Blake  <ebb9@byu.net>
4201         and Matthew Woehlke  <mw_triad@users.sourceforge.net>  (tiny change)
4202
4203         * lib/stdint_.h (int64_t, uint64_t): Don't undefine if 64-bit
4204         types are not being provided by gnulib.
4205         (GL_INT64_T, GL_UINT64_T): New witnesses of whether gnulib 64-bit
4206         types are supported.
4207
4208 2007-03-10  Bruno Haible  <bruno@clisp.org>
4209
4210         * lib/stdio_.h (__attribute__): New macro.
4211         (fprintf, vfprintf, printf, vprintf, snprintf, vsnprintf, sprintf,
4212         vsprintf): Specify __attribute__ __format__ for GCC.
4213         Suggested by Eric Blake.
4214
4215 2007-03-09  Bruno Haible  <bruno@clisp.org>
4216
4217         * modules/printf-posix-tests: New file.
4218         * tests/test-printf-posix.sh: New file.
4219         * tests/test-printf-posix.c: New file.
4220
4221         * modules/printf-posix: New file.
4222         * lib/printf.c: New file.
4223         * m4/printf-posix-rpl.m4: New file.
4224         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_PRINTF_POSIX,
4225         REPLACE_PRINTF.
4226         * lib/stdio_.h (printf): New declaration.
4227         (format, __format__, ____printf____, ____scanf____, ____strftime____,
4228         ____strfmon____): New macros.
4229         * modules/stdio (Makefile.am): Substitute also GNULIB_PRINTF_POSIX,
4230         REPLACE_PRINTF.
4231
4232 2007-03-09  Bruno Haible  <bruno@clisp.org>
4233
4234         * tests/test-vasnprintf-posix2.sh: New file.
4235         * tests/test-vasnprintf-posix2.c: New file.
4236         * modules/vasnprintf-posix-tests (Files): Add them and m4/locale-fr.m4.
4237         (configure.ac): Invoke gt_LOCALE_FR and gt_LOCALE_FR_UTF8.
4238         (Makefile.am): Activate test-vasnprintf-posix2.sh.
4239
4240         * lib/vasnprintf.c (VASNPRINTF): For the 'a' and 'A' directives, use
4241         a locale dependent decimal point, rather than always '.'.
4242
4243 2007-03-09  Eric Blake  <ebb9@byu.net>
4244
4245         * lib/stdlib_.h (EXIT_FAILURE): GNU code expects this to be 1, in
4246         spite of platforms like Tandem/NSK that define it to -1.
4247
4248 2007-03-08  Bruno Haible  <bruno@clisp.org>
4249
4250         * modules/vprintf-posix-tests: New file.
4251         * tests/test-vprintf-posix.sh: New file.
4252         * tests/test-vprintf-posix.c: New file.
4253         * tests/test-printf-posix.h: New file.
4254
4255         * modules/vprintf-posix: New file.
4256         * lib/vprintf.c: New file.
4257         * m4/vprintf-posix.m4: New file.
4258         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VPRINTF_POSIX,
4259         REPLACE_VPRINTF.
4260         * lib/stdio_.h (vprintf): New declaration.
4261         * modules/stdio (Makefile.am): Substitute also GNULIB_VPRINTF_POSIX,
4262         REPLACE_VPRINTF.
4263
4264 2007-03-08  Bruno Haible  <bruno@clisp.org>
4265
4266         * modules/fprintf-posix-tests: New file.
4267         * tests/test-fprintf-posix.sh: New file.
4268         * tests/test-fprintf-posix.c: New file.
4269
4270         * modules/fprintf-posix: New file.
4271         * lib/fprintf.c: New file.
4272         * m4/fprintf-posix.m4: New file.
4273         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FPRINTF_POSIX,
4274         REPLACE_FPRINTF.
4275         * lib/stdio_.h (fprintf): New declaration.
4276         * modules/stdio (Makefile.am): Substitute also GNULIB_FPRINTF_POSIX,
4277         REPLACE_FPRINTF.
4278
4279 2007-03-08  Bruno Haible  <bruno@clisp.org>
4280
4281         * modules/vfprintf-posix-tests: New file.
4282         * tests/test-vfprintf-posix.sh: New file.
4283         * tests/test-vfprintf-posix.c: New file.
4284         * tests/test-fprintf-posix.h: New file.
4285         * tests/test-fprintf-posix.out: New file.
4286
4287         * modules/vfprintf-posix: New file.
4288         * lib/vfprintf.c: New file.
4289         * m4/vfprintf-posix.m4: New file.
4290         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VFPRINTF_POSIX,
4291         REPLACE_VFPRINTF.
4292         * lib/stdio_.h (vfprintf): New declaration.
4293         * modules/stdio (Makefile.am): Substitute also GNULIB_VFPRINTF_POSIX,
4294         REPLACE_VFPRINTF.
4295
4296 2007-03-08  Bruno Haible  <bruno@clisp.org>
4297
4298         * lib/stdio_.h: Treat __need___FILE like __need_FILE.
4299
4300 2007-03-08  Bruno Haible  <bruno@clisp.org>
4301
4302         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Use 'case' statements
4303         instead of 'expr' invocations.
4304         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
4305         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
4306         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
4307         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
4308         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
4309         Suggested by Paul Eggert.
4310
4311 2007-03-08  Bruno Haible  <bruno@clisp.org>
4312
4313         * modules/fseterr-tests: New file.
4314         * tests/test-fseterr.c: New file.
4315
4316         * modules/fseterr: New file.
4317         * lib/fseterr.h: New file.
4318         * lib/fseterr.c: New file.
4319
4320 2007-03-08  Bruno Haible  <bruno@clisp.org>
4321
4322         * lib/fnmatch_.h: Convert tabs in the middle of lines to spaces.
4323         * lib/getopt_.h: Likewise.
4324         * lib/mbswidth.h: Likewise.
4325         * lib/setenv.h: Likewise.
4326         * lib/vasnprintf.h: Likewise.
4327         * lib/vasprintf.h: Likewise.
4328         * lib/verror.h: Likewise.
4329         * lib/xsetenv.h: Likewise.
4330         * lib/xvasprintf.h: Likewise.
4331
4332 2007-03-08  Jim Meyering  <jim@meyering.net>
4333
4334         * users.txt: Add parted.
4335
4336         * ChangeLog: Restore 1500 lines mistakenly removed from the end.
4337
4338 2007-03-07  Bruno Haible  <bruno@clisp.org>
4339
4340         * m4/printf.m4: Make the shell script snippets copy&pastable.
4341
4342 2007-03-02  Bruno Haible  <bruno@clisp.org>
4343
4344         * lib/netinet_in_.h: New file.
4345         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Test whether netinet/in.h
4346         is self-contained. Set ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H.
4347         * modules/netinet_in (Files): Add lib/netinet_in_.h.
4348         (Depends-on): Add absolute-header.
4349         (Makefile.am): Substitute ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H
4350         into netinet/in.h.
4351
4352 2007-03-03  Bruno Haible  <bruno@clisp.org>
4353
4354         * lib/sys_select_.h: New file.
4355         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SELECT): Test whether sys/select.h
4356         is self-contained. Set ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H.
4357         * modules/sys_select (Files): Add lib/sys_select_.h.
4358         (Depends-on): Add absolute-header.
4359         (Makefile.am): Substitute ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H
4360         into sys/select.h.
4361
4362 2007-03-02  Bruno Haible  <bruno@clisp.org>
4363
4364         * lib/socket_.h: If sys/socket.h exists, include that and <sys/types.h>
4365         before it. Turn HAVE_WINSOCK2_H and HAVE_WS2TCPIP_H into configute-time
4366         values.
4367         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Test also whether
4368         <sys/socket.h> is self-contained. Set ABSOLUTE_SYS_SOCKET_H,
4369         HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H.
4370         * modules/sys_socket (Depends-on): Add absolute-header.
4371         (Makefile.am): Substitute ABSOLUTE_SYS_SOCKET_H, HAVE_SYS_SOCKET_H,
4372         HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H into sys/socket.h.
4373         (Include): Remove requirement of inclusion of <sys/types.h>.
4374
4375 2007-03-02  Bruno Haible  <bruno@clisp.org>
4376
4377         * lib/byteswap_.h (bswap_32): Fix formula.
4378
4379 2007-03-06  Bruno Haible  <bruno@clisp.org>
4380
4381         * modules/sprintf-posix-tests: New file.
4382         * tests/test-sprintf-posix.c: New file.
4383
4384         * modules/sprintf-posix: New file.
4385         * lib/sprintf.c: New file.
4386         * m4/sprintf-posix.m4: New file.
4387         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_SPRINTF_POSIX,
4388         REPLACE_SPRINTF.
4389         * lib/stdio_.h (sprintf): New declaration.
4390         * modules/stdio (Makefile.am): Substitute also GNULIB_SPRINTF_POSIX,
4391         REPLACE_SPRINTF.
4392
4393 2007-03-06  Bruno Haible  <bruno@clisp.org>
4394
4395         * modules/vsprintf-posix-tests: New file.
4396         * tests/test-vsprintf-posix.c: New file.
4397         * tests/test-sprintf-posix.h: New file.
4398
4399         * modules/vsprintf-posix: New file.
4400         * lib/vsprintf.c: New file.
4401         * m4/vsprintf-posix.m4: New file.
4402         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VSPRINTF_POSIX,
4403         REPLACE_VSPRINTF.
4404         * lib/stdio_.h (vsprintf): New declaration.
4405         * modules/stdio (Makefile.am): Substitute also GNULIB_VSPRINTF_POSIX,
4406         REPLACE_VSPRINTF.
4407
4408 2007-03-06  Bruno Haible  <bruno@clisp.org>
4409
4410         * modules/vsnprintf (Depend-on): Remove minmax.
4411
4412 2007-03-06  Bruno Haible  <bruno@clisp.org>
4413
4414         * modules/snprintf-posix-tests: New file.
4415         * tests/test-snprintf-posix.c: New file.
4416
4417         * modules/snprintf-posix: New file.
4418         * m4/snprintf-posix.m4: New file.
4419         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): New macro, extracted from
4420         gl_FUNC_SNPRINTF.
4421         (gl_FUNC_SNPRINTF): Invoke it.
4422         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_SNPRINTF.
4423         * lib/stdio_.h (snprintf): Define as a replacement if REPLACE_SNPRINTF
4424         is set.
4425         * modules/stdio (Makefile.am): Substitute also REPLACE_SNPRINTF.
4426
4427 2007-03-06  Bruno Haible  <bruno@clisp.org>
4428
4429         * modules/vsnprintf-posix-tests: New file.
4430         * tests/test-vsnprintf-posix.c: New file.
4431         * tests/test-snprintf-posix.h: New file.
4432
4433         * modules/vsnprintf-posix: New file.
4434         * m4/vsnprintf-posix.m4: New file.
4435         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): New macro, extracted from
4436         gl_FUNC_VSNPRINTF.
4437         (gl_FUNC_VSNPRINTF): Invoke it.
4438         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_VSNPRINTF.
4439         * lib/stdio_.h (vsnprintf): Define as a replacement if
4440         REPLACE_VSNPRINTF is set.
4441         * modules/stdio (Makefile.am): Substitute also REPLACE_VSNPRINTF.
4442
4443 2007-03-06  Bruno Haible  <bruno@clisp.org>
4444
4445         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Test for vasnprintf here.
4446         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): ... not here.
4447
4448 2007-03-06  Bruno Haible  <bruno@clisp.org>
4449
4450         * lib/math_.h (acosl): Declare also if HAVE_DECL_ACOSL is set.
4451         (asinl): Declare also if HAVE_DECL_ASINL is set.
4452         (atanl): Declare also if HAVE_DECL_ATANL is set.
4453         (ceill): Declare also if HAVE_DECL_CEILL is set.
4454         (cosl): Declare also if HAVE_DECL_COSL is set.
4455         (expl): Declare also if HAVE_DECL_EXPL is set.
4456         (floorl): Declare also if HAVE_DECL_FLOORL is set.
4457         (frexpl): Declare also if HAVE_DECL_FREXPL is set.
4458         (ldexpl): Declare also if HAVE_DECL_LDEXPL is set.
4459         (logl): Declare also if HAVE_DECL_LOGL is set.
4460         (sinl): Declare also if HAVE_DECL_SINL is set.
4461         (sqrtl): Declare also if HAVE_DECL_SQRTL is set.
4462         (tanl): Declare also if HAVE_DECL_TANL is set.
4463         * modules/math (Makefile.am): Substitute the values of HAVE_DECL_*.
4464         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Set HAVE_DECL_* to 1.
4465         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Fix tests for the
4466         declaration of frexpl, ldexpl.
4467         * modules/printf-frexpl (Depends-on): Add math.
4468         * lib/printf-frexp.c (frexpl, ldexpl): Undo last change.
4469
4470 2007-03-05  Bruno Haible  <bruno@clisp.org>
4471
4472         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Also test whether
4473         frexpl and ldexpl are declared.
4474         * lib/printf-frexp.c (frexpl, ldexpl): Provide fallback declarations.
4475
4476 2007-03-05  Bruno Haible  <bruno@clisp.org>
4477
4478         * gnulib-tool (func_get_automake_snippet): Don't synthesize an
4479         EXTRA_lib_SOURCES augmentation for the relocatable-prog-wrapper module.
4480
4481 2007-03-05  Bruno Haible  <bruno@clisp.org>
4482
4483         * lib/stdio_.h: Include <stddef.h>.
4484
4485 2007-03-05  Bruno Haible  <bruno@clisp.org>
4486
4487         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): New macro.
4488
4489 2007-03-05  Bruno Haible  <bruno@clisp.org>
4490
4491         * m4/printf.m4: Update with info about OpenBSD 3.9, HP-UX 10.20,
4492         NetBSD 4, from Ralf Wildenhues.
4493
4494 2007-03-04  Bruno Haible  <bruno@clisp.org>
4495
4496         * lib/vasprintf.h: Update #if logic for the case when the functions
4497         exist but are overridden.
4498
4499 2007-03-04  Bruno Haible  <bruno@clisp.org>
4500
4501         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Exclude two buggy
4502         implementations: glibc-2.4 and MacOS X 10.3.
4503         * tests/test-vasnprintf-posix.c (test_function): Test also the case
4504         that exhibits the bugs in glibc-2.4 and MacOS X 10.3.
4505         * tests/test-vasprintf-posix.c (test_function): Likewise.
4506
4507 2007-03-04  Bruno Haible  <bruno@clisp.org>
4508
4509         * modules/vasprintf-posix-tests: New file.
4510         * tests/test-vasprintf-posix.c: New file.
4511
4512         * modules/vasprintf-posix: New file.
4513         * lib/vasprintf.h (asprintf, vasprintf): Rename if REPLACE_VASPRINTF is
4514         defined.
4515         * m4/vasprintf-posix.m4: New file.
4516         * m4/vasprintf.m4 (gl_REPLACE_VASPRINTF): New macro, extracted from
4517         gl_FUNC_VASPRINTF.
4518         (gl_FUNC_VASPRINTF): Invoke it.
4519         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Define REPLACE_VASNPRINTF
4520         here.
4521         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Not here.
4522
4523 2007-03-04  Bruno Haible  <bruno@clisp.org>
4524
4525         * lib/sys_time_.h: Rename GETTIMEOFDAY_REPLACEMENT to
4526         REPLACE_GETTIMEOFDAY.
4527         * modules/sys_time (Makefile.am): Likewise.
4528         * m4/sys_time_h.m4: Likewise.
4529         * m4/gettimeofday.m4: Likewise.
4530
4531 2007-03-04  Bruno Haible  <bruno@clisp.org>
4532
4533         * modules/vasnprintf-posix-tests: New file.
4534         * tests/test-vasnprintf-posix.c: New file.
4535
4536         * modules/vasnprintf-posix: New file.
4537         * lib/vasnprintf.c: Include isnan.h, isnanl.h, printf-frexp.h,
4538         printf-frexpl.h.
4539         (VASNPRINTF): Handle the 'a' and 'A' directives here, if needed.
4540         * lib/vasnprintf.h (asnprintf, vasnprintf): Rename if
4541         REPLACE_VASNPRINTF is defined.
4542         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): New macro, extracted from
4543         gl_FUNC_VASNPRINTF.
4544         (gl_FUNC_VASNPRINTF): Invoke it.
4545         * m4/vasnprintf-posix.m4: New file.
4546         * m4/printf.m4: New file.
4547
4548 2007-03-04  Bruno Haible  <bruno@clisp.org>
4549
4550         Compile progreloc.c only if --enable-relocatable is specified.
4551         * m4/relocatable.m4 (gl_RELOCATABLE): Arrange to compile progreloc.c
4552         if --enable-relocatable was specified.
4553         * modules/relocatable-prog (Makefile.am): Remove progreloc.c from
4554         lib_SOURCES.
4555
4556 2007-03-04  Jim Meyering  <jim@meyering.net>
4557
4558         * lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
4559         Use it consistently, rather than enumerating errno constants.
4560
4561 2007-03-04  Bruno Haible  <bruno@clisp.org>
4562
4563         * modules/xvasprintf-tests: New file.
4564         * tests/test-xvasprintf.c: New file.
4565
4566         * modules/vasprintf-tests: New file.
4567         * tests/test-vasprintf.c: New file.
4568
4569         * modules/vasnprintf-tests: New file.
4570         * tests/test-vasnprintf.c: New file.
4571
4572         * modules/vsnprintf-tests: New file.
4573         * tests/test-vsnprintf.c: New file.
4574
4575         * modules/snprintf-tests: New file.
4576         * tests/test-snprintf.c: New file.
4577
4578 2007-03-04  Bruno Haible  <bruno@clisp.org>
4579
4580         Compile relocatable.c only if --enable-relocatable is specified.
4581         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Renamed from
4582         gl_RELOCATABLE_LIBRARY.
4583         (gl_RELOCATABLE_LIBRARY, gl_RELOCATABLE_LIBRARY_SEPARATE): New macros.
4584         * m4/relocatable.m4 (gl_RELOCATABLE): Invoke gl_RELOCATABLE_LIBRARY.
4585         (gl_RELOCATABLE_BODY): Require gl_RELOCATABLE_LIBRARY_BODY instead of
4586         gl_RELOCATABLE_LIBRARY.
4587         * modules/relocatable-lib (configure.ac): Invoke gl_RELOCATABLE_LIBRARY.
4588         (Makefile.am): Remove lib_SOURCES.
4589         * modules/relocatable-lib-lgpl (configure.ac): Invoke
4590         gl_RELOCATABLE_LIBRARY.
4591         (Makefile.am): Remove lib_SOURCES.
4592         * modules/relocatable-prog (Makefile.am): Don't compile relocatable.c
4593         always.
4594         * modules/relocatable-prog-wrapper (configure.ac): Invoke
4595         gl_RELOCATABLE_LIBRARY_SEPARATE instead of gl_RELOCATABLE_LIBRARY.
4596
4597 2007-03-04  Bruno Haible  <bruno@clisp.org>
4598
4599         * modules/argmatch-tests: New file.
4600         * tests/test-argmatch.c: New file.
4601
4602         * tests/test-allocsa.c (main): Halve the number of loop runs.
4603
4604         * modules/alloca-opt-tests: New file.
4605         * tests/test-alloca-opt.c: New file.
4606
4607 2007-03-04  Jim Meyering  <jim@meyering.net>
4608
4609         Work around difference between Linux ACLs and Solaris 10 ZFS.
4610         * lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
4611         for EINVAL.
4612
4613 2007-03-03  Bruno Haible  <bruno@clisp.org>
4614
4615         * modules/relocatable-prog (Depends-on): Add back progreloc's
4616         dependencies: canonicalize-lgpl, xalloc, xreadlink, stdbool, unistd.
4617
4618 2007-03-03  Bruno Haible  <bruno@clisp.org>
4619
4620         * modules/relocatable-lib-lgpl: Renamed from modules/relocatable-lib.
4621         * modules/relocatable-lib: New file.
4622
4623 2007-03-03  Bruno Haible  <bruno@clisp.org>
4624
4625         * modules/relocatable-prog: Renamed from modules/relocatable.
4626         * doc/relocatable-maint.texi: Talk about module 'relocatable-prog'.
4627
4628 2007-03-03  Bruno Haible  <bruno@clisp.org>
4629
4630         * modules/relocatable-script (Files): Add doc/relocatable.texi,
4631         m4/relocatable-lib.m4.
4632         (Depends-on): Remove 'relocatable'.
4633         (configure.ac): Add gl_RELOCATABLE_NOP.
4634
4635 2007-03-03  Bruno Haible  <bruno@clisp.org>
4636
4637         * modules/relocatable-prog-wrapper: New file.
4638         * modules/relocatable (Depends-on): Add it. Remove all other
4639         dependencies except progname.
4640         (Files): Remove build-aux/install-reloc, lib/relocwrapper.c.
4641
4642         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): New macro.
4643         (gl_FUNC_STRERROR): Nop.
4644         * lib/strerror.c: Compile the file only if !HAVE_STRERROR.
4645
4646         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): New macro.
4647         * lib/setenv.c: Compile the file only if _LIBC || !HAVE_SETENV.
4648
4649         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): New macro.
4650         (gl_FUNC_READLINK): Update.
4651
4652         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL_SEPARATE): New macro.
4653
4654 2007-03-03  Bruno Haible  <bruno@clisp.org>
4655
4656         * lib/xreadlink.c: Include <unistd.h> unconditionally.
4657         * modules/xreadlink (Depends-on): Add unistd.
4658         * modules/xreadlink-with-size (Depends-on): Likewise.
4659
4660 2007-03-03  Bruno Haible  <bruno@clisp.org>
4661
4662         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_UNSETENV): New macros,
4663         extracted from gt_FUNC_SETENV.
4664         (gt_FUNC_SETENV): Remove macro.
4665         * modules/setenv (configure.ac): Add gl_FUNC_SETENV, gl_FUNC_UNSETENV,
4666         remove gt_FUNC_SETENV.
4667
4668 2007-03-03  Bruno Haible  <bruno@clisp.org>
4669
4670         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY): Define
4671         ENABLE_RELOCATABLE here.
4672         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Don't define it here.
4673
4674 2007-03-03  Bruno Haible  <bruno@clisp.org>
4675
4676         * modules/rbtreehash-list-tests (Depends-on): Add progname.
4677         * tests/test-rbtreehash_list.c: Include progname.h.
4678         (main): Call set_program_name.
4679
4680         * modules/rbtree-oset-tests (Depends-on): Add progname.
4681         * tests/test-rbtree_oset.c: Include progname.h.
4682         (main): Call set_program_name.
4683
4684         * modules/rbtree-list-tests (Depends-on): Add progname.
4685         * tests/test-rbtree_list.c: Include progname.h.
4686         (main): Call set_program_name.
4687
4688         * modules/linked-list-tests (Depends-on): Add progname.
4689         * tests/test-linked_list.c: Include progname.h.
4690         (main): Call set_program_name.
4691
4692 2007-03-03  Bruno Haible  <bruno@clisp.org>
4693
4694         * lib/glob-libc.h (_Restrict_): New macro, copied from lib/regex.h.
4695         All uses of __restrict changed to _Restrict_.
4696         * lib/glob_.h (__restrict): Remove macro.
4697
4698 2007-03-02  Bruno Haible  <bruno@clisp.org>
4699
4700         * modules/gettext (configure.ac): Require gettext infrastructure
4701         from version 0.16.1.
4702
4703 2007-03-02  Bruno Haible  <bruno@clisp.org>
4704
4705         * modules/linkedhash-list-tests (Depends-on): Add progname.
4706         * tests/test-linkedhash_list.c: Include progname.h.
4707         (main): Call set_program_name.
4708
4709         * modules/carray-list-tests (Depends-on): Add progname.
4710         * tests/test-carray_list.c: Include progname.h.
4711         (main): Call set_program_name.
4712
4713         * modules/avltreehash-list-tests (Depends-on): Add progname.
4714         * tests/test-avltreehash_list.c: Include progname.h.
4715         (main): Call set_program_name.
4716
4717         * modules/avltree-oset-tests (Depends-on): Add progname.
4718         * tests/test-avltree_oset.c: Include progname.h.
4719         (main): Call set_program_name.
4720
4721         * modules/avltree-list-tests (Depends-on): Add progname.
4722         * tests/test-avltree_list.c: Include progname.h.
4723         (main): Call set_program_name.
4724
4725         * modules/array-oset-tests (Depends-on): Add progname.
4726         * tests/test-array_oset.c: Include progname.h.
4727         (main): Call set_program_name.
4728
4729         * modules/array-list-tests (Depends-on): Add progname.
4730         * tests/test-array_list.c: Include progname.h.
4731         (main): Call set_program_name.
4732
4733         * modules/argp-tests (Depends-on): Add progname.
4734         * tests/test-argp.c: Include argp.h first. Include progname.h.
4735         (main): Call set_program_name.
4736
4737 2007-03-02  Paul Eggert  <eggert@cs.ucla.edu>
4738
4739         * doc/gnulib-tool.texi (Initial import): Reword description of
4740         _FILE_OFFSET_BITS and _GNU_SOURCE, since they sometimes have a
4741         limited effect even if defined after the first system include.
4742
4743 2007-03-01  Bruno Haible  <bruno@clisp.org>
4744
4745         * build-aux/config.libpath: Update to libtool-1.5.22.
4746         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
4747
4748 2007-03-01  Bruno Haible  <bruno@clisp.org>
4749
4750         * doc/relocatable-maint.texi: Recommend to set foo_CPPFLAGS, not
4751         foo_CFLAGS.
4752         Reported by Ralf Wildenhues.
4753
4754 2007-03-01  Bruno Haible  <bruno@clisp.org>
4755
4756         * build-aux/install-reloc: Remove object files left over by some
4757         compilers.
4758         Reported by Ralf Wildenhues.
4759
4760 2007-03-01  Bruno Haible  <bruno@clisp.org>
4761
4762         * build-aux/install-reloc: Break long lines.
4763
4764 2007-03-01  Bruno Haible  <bruno@clisp.org>
4765
4766         * doc/relocatable.texi: Document that it may not work on OpenBSD.
4767         Reported by Ralf Wildenhues.
4768
4769 2007-03-01  Bruno Haible  <bruno@clisp.org>
4770
4771         * doc/gnulib-tool.texi (Initial import): Remove paragraph about
4772         include ordering constraints.
4773
4774 2007-03-01  Paul Eggert  <eggert@cs.ucla.edu>
4775
4776         Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
4777         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00136.html>.
4778         * doc/gnulib-tool.texi (Initial import): Mention _FILE_OFFSET_BITS
4779         as another example.
4780         * lib/time_.h: Fix misspelling.
4781         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
4782         Require gl_HEADER_TIME_H_DEFAULTS.
4783         * m4/strptime.m4 (gl_FUNC_STRPTIME): Likewise.
4784         * m4/time_r.m4 (gl_TIME_R): Likewise.
4785         * m4/timegm.m4 (gl_FUNC_TIMEGM): Likewise.
4786
4787 2007-03-01  Bruno Haible  <bruno@clisp.org>
4788
4789         * m4/utimecmp.m4 (gl_UTIMECMP): Don't require gl_TIMESPEC.
4790         * m4/utimens.m4 (gl_UTIMENS): Likewise.
4791
4792 2007-03-01  Jim Meyering  <jim@meyering.net>
4793
4794         * modules/xreadlink (Maintainer): Add my name.
4795         * modules/xreadlink-with-size (Depends-on): Alphabetize.
4796
4797 2007-02-26  Ben Pfaff  <blp@cs.stanford.edu>
4798             Bruno Haible  <bruno@clisp.org>
4799
4800         * build-aux/install-reloc: Compile also c-ctype.c.
4801         * build-aux/relocatable.sh.in: New file.
4802         * doc/relocatable.texi: New file.
4803         * doc/relocatable-maint.texi: New file.
4804         * doc/gnulib.texi: Include relocatable-maint.texi.
4805         * lib/progreloc.c: Include unistd.h unconditionally.
4806         * lib/relocwrapper.c: Include unistd.h unconditionally.
4807         Include c-ctype.h.
4808         (add_dotbin): Use c_tolower.
4809         * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
4810         (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
4811         (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
4812         * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
4813         to m4/relocatable-lib.m4.
4814         (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
4815         RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
4816         (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
4817         require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
4818         SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
4819         * modules/relocatable: New file.
4820         * modules/relocatable-lib: New file.
4821         * modules/relocatable-script: New file.
4822
4823 2007-02-28  Bruno Haible  <bruno@clisp.org>
4824
4825         Import --enable-relocatable infrastructure.
4826         * build-aux/config.libpath: New file, from GNU gettext.
4827         * build-aux/install-reloc: New file, from GNU gettext.
4828         * build-aux/reloc-ldflags: New file, from GNU gettext.
4829         * lib/relocatable.h: New file, from GNU gettext.
4830         * lib/relocatable.c: New file, from GNU gettext.
4831         * lib/relocwrapper.c: New file, from GNU gettext.
4832         * m4/relocatable.m4: New file, from GNU gettext.
4833
4834 2007-02-28  Bruno Haible  <bruno@clisp.org>
4835
4836         * MODULES.html.sh (File system functions): Add xreadlink-with-size.
4837
4838         * modules/xreadlink: New file, from GNU gettext with modifications.
4839         * lib/xreadlink.c: New file, from GNU gettext.
4840         * lib/xreadlink.h: Add comments.
4841         (xreadlink): New declaration.
4842
4843         * modules/xreadlink-with-size: Renamed from modules/xreadlink.
4844         (Files): Remove m4/xreadlink.m4. Replace lib/xreadlink.c with
4845         lib/xreadlink-with-size.c.
4846         (configure.ac): Remove gl_XREADLINK invocation.
4847         (Makefile.am): Augment lib_SOURCES.
4848         * m4/xreadlink.m4: Remove file.
4849         * lib/xreadlink-with-size.c: Renamed from lib/xreadlink.c.
4850         (xreadlink_with_size): Renamed from xreadink.
4851         * lib/xreadlink.h (xreadlink_with_size): Renamed from xreadink.
4852         * modules/canonicalize (Depends-on): Replace xreadlink with
4853         xreadlink-with-size.
4854         * lib/canonicalize.c (canonicalize_filename_mode): Update.
4855
4856 2007-02-25  Jim Meyering  <jim@meyering.net>
4857
4858         * build-aux/announce-gen: When complaining about excess arguments,
4859         list them.
4860
4861 2007-02-25  Paul Eggert  <eggert@cs.ucla.edu>
4862
4863         * README: Document signed integer overflow situation more
4864         accurately.
4865
4866 2007-02-25  Bruno Haible  <bruno@clisp.org>
4867
4868         * lib/vasnprintf.c (VASNPRINTF): Fix estimate of size needed for a
4869         'a' or 'A' conversion.
4870
4871 2007-02-25  Bruno Haible  <bruno@clisp.org>
4872
4873         * modules/filename: Renamed from modules/pathname.
4874         (Files): Replace lib/pathname.h with lib/filename.h. Replace
4875         lib/concatpath.c with lib/concat-filename.c.
4876         (Makefile.am): Update.
4877         (Include): Replace pathname.h with filename.h.
4878         * lib/filename.h: Renamed from lib/pathname.h.
4879         (concatenated_filename): Renamed from concatenated_pathname.
4880         * lib/concat-filename.c: Renamed from lib/concatpath.c.
4881         (concatenated_filename): Renamed from concatenated_pathname.
4882         * lib/findprog.c: Include filename.h instead of pathname.h.
4883         (find_in_path): Update.
4884         * lib/javacomp.c: Include filename.h instead of pathname.h.
4885         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
4886         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
4887         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
4888         is_oldgcj_14_13_usable, is_javac_usable): Update.
4889         * lib/javaexec.c: Include filename.h instead of pathname.h.
4890         (execute_java_class): Update.
4891         * modules/findprog: Update.
4892         * modules/javacomp: Update.
4893         * modules/javaexec: Update.
4894         * MODULES.html.sh (File system functions): Add 'filename', remove
4895         'pathname'.
4896
4897 2007-02-25  Bruno Haible  <bruno@clisp.org>
4898
4899         * modules/printf-frexpl-tests: New file.
4900         * tests/test-printf-frexpl.c: New file.
4901
4902         * modules/printf-frexpl: New file.
4903         * lib/printf-frexpl.h: New file.
4904         * lib/printf-frexpl.c: New file.
4905         * m4/printf-frexpl.m4: New file.
4906
4907 2007-02-25  Bruno Haible  <bruno@clisp.org>
4908
4909         * modules/printf-frexp-tests: New file.
4910         * tests/test-printf-frexp.c: New file.
4911
4912         * modules/printf-frexp: New file.
4913         * lib/printf-frexp.h: New file.
4914         * lib/printf-frexp.c: New file.
4915         * m4/printf-frexp.m4: New file.
4916
4917 2007-02-25  Bruno Haible  <bruno@clisp.org>
4918
4919         Assume automake >= 1.10 for the tests.
4920         * modules/arcfour-tests (TESTS): Remove $(EXEEXT) suffix.
4921         * modules/arctwo-tests: Likewise.
4922         * modules/argp-tests: Likewise.
4923         * modules/avltree-list-tests: Likewise.
4924         * modules/avltree-oset-tests: Likewise.
4925         * modules/avltreehash-list-tests: Likewise.
4926         * modules/carray-list-tests: Likewise.
4927         * modules/crc-tests: Likewise.
4928         * modules/des-tests: Likewise.
4929         * modules/gc-arcfour-tests: Likewise.
4930         * modules/gc-arctwo-tests: Likewise.
4931         * modules/gc-des-tests: Likewise.
4932         * modules/gc-hmac-md5-tests: Likewise.
4933         * modules/gc-hmac-sha1-tests: Likewise.
4934         * modules/gc-md2-tests: Likewise.
4935         * modules/gc-md4-tests: Likewise.
4936         * modules/gc-md5-tests: Likewise.
4937         * modules/gc-pbkdf2-sha1-tests: Likewise.
4938         * modules/gc-rijndael-tests: Likewise.
4939         * modules/gc-sha1-tests: Likewise.
4940         * modules/gc-tests: Likewise.
4941         * modules/getaddrinfo-tests: Likewise.
4942         * modules/hmac-md5-tests: Likewise.
4943         * modules/hmac-sha1-tests: Likewise.
4944         * modules/linked-list-tests: Likewise.
4945         * modules/linkedhash-list-tests: Likewise.
4946         * modules/lock-tests: Likewise.
4947         * modules/md2-tests: Likewise.
4948         * modules/md4-tests: Likewise.
4949         * modules/md5-tests: Likewise.
4950         * modules/rbtree-list-tests: Likewise.
4951         * modules/rbtree-oset-tests: Likewise.
4952         * modules/rbtreehash-list-tests: Likewise.
4953         * modules/read-file-tests: Likewise.
4954         * modules/rijndael-tests: Likewise.
4955         * modules/stdint-tests: Likewise.
4956         * modules/tls-tests: Likewise.
4957
4958 2007-02-24  Bruno Haible  <bruno@clisp.org>
4959
4960         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
4961         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
4962         function; instead check whether isnan with a double argument links.
4963         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
4964         function; instead check whether isnan with a 'long double' argument
4965         links.
4966         Reported by Eric Blake <ebb9@byu.net>.
4967
4968 2007-02-24  Bruno Haible  <bruno@clisp.org>
4969
4970         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
4971         defined.
4972         * lib/isnanl.c: Remove all code. Just include isnan.c.
4973         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
4974
4975 2007-02-25  Jim Meyering  <jim@meyering.net>
4976
4977         Avoid conflicting types for 'unsetenv' on FreeBSD.
4978         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
4979         conflicting with FreeBSD's (5.0 and 6.1) function declaration
4980         in stdlib.h.
4981
4982 2007-02-24  Bruno Haible  <bruno@clisp.org>
4983
4984         * modules/isnanl-nolibm-tests: New file.
4985         * tests/test-isnanl.c: New file.
4986
4987         * modules/isnanl-nolibm: New file.
4988         * lib/isnanl.h: New file.
4989         * lib/isnanl.c: New file.
4990         * m4/isnanl.m4: New file.
4991
4992 2007-02-24  Bruno Haible  <bruno@clisp.org>
4993
4994         * modules/isnan-nolibm-tests: New file.
4995         * tests/test-isnan.c: New file.
4996
4997         * modules/isnan-nolibm: New file.
4998         * lib/isnan.h: New file.
4999         * lib/isnan.c: New file.
5000         * m4/isnan.m4: New file.
5001
5002 2007-02-24  Bruno Haible  <bruno@clisp.org>
5003
5004         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
5005         assume that an exponent fits in 20 bits.
5006
5007 2007-02-24  Jim Meyering  <jim@meyering.net>
5008
5009         * m4/regex.m4: Update the description of the configure-time option,
5010         --without-included-regex, to state accurately what the defaults are,
5011         and perhaps to give people an idea why using this option is risky.
5012
5013 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
5014
5015         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
5016         loops on small arguments.  This attempts to avoid the problem
5017         Bruno Haible reported for AIX 4.3.2 in
5018         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00309.html>.
5019
5020 2007-02-23  Bruno Haible  <bruno@clisp.org>
5021
5022         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
5023         Needed for help2man.
5024
5025 2007-02-23  Karl Berry  <karl@gnu.org>
5026
5027         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
5028         exists, foo.h should be cvs-ignored, not committed.
5029
5030 2007-02-23  Eric Blake  <ebb9@byu.net>
5031
5032         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
5033         * lib/stat-time.h (includes): Likewise.
5034         * lib/utimecmp.c (includes): Likewise.
5035         * lib/utimens.h (includes): Likewise.
5036         * lib/getdate.y (includes): Also include "timespec.h" for use
5037         internal to the module.
5038         * modules/utimens (Depends-on): Revert yesterday's patch.
5039         * modules/nanosleep (Depends-on): Add missing dependency.
5040
5041 2007-02-22  Bruno Haible  <bruno@clisp.org>
5042
5043         * lib/glob.c: Don't include getlogin_r.h.
5044
5045 2007-02-22  Jim Meyering  <jim@meyering.net>
5046
5047         * modules/utimens (Depends-on): Add timespec, required for
5048         utimens.h's inclusion of timespec.h.
5049
5050 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
5051
5052         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
5053         long unreadable paths in GNU/Linux.  Problem reported by Andreas
5054         Schwab in
5055         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
5056         I'll try to think of a better way to fix the Solaris problem.
5057
5058         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
5059         like glibc; on Solaris 10, it fails with errno == EINVAL.
5060         POSIX says the behavior is unspecified if the first argument is NULL,
5061         so play it safe and never pass NULL to the system getcwd.
5062
5063 2007-02-21  Jim Meyering  <jim@meyering.net>
5064
5065         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
5066         of gettimeofday.  It would conflict with the one now always
5067         provided via sys_time_.h.  Reported by Matthew Woehlke, as
5068         an IRIX 6.5 build failure.
5069
5070 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
5071
5072         Minor fixups to port to Solaris 10 with Sun C 5.8.
5073         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
5074         * modules/getcwd (Depends-on): Add dirfd.
5075         * lib/putenv.c (putenv): #undef it.
5076         (rpl_putenv): New decl.
5077         (malloc, free): Include <stdlib.h> rather than prototyping separately.
5078
5079 2007-02-20  Bruno Haible  <bruno@clisp.org>
5080
5081         * modules/stdio-tests: New file.
5082         * tests/test-stdio.c: New file.
5083
5084         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
5085         (Depends-on): Add stdio.
5086         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
5087         (Include): Use <stdio.h> instead of vsnprintf.h.
5088         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
5089         HAVE_DECL_VSNPRINTF.
5090         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
5091
5092         * modules/snprintf (Files): Remove lib/snprintf.h.
5093         (Depends-on): Add stdio.
5094         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
5095         (Include): Use <stdio.h> instead of snprintf.h.
5096         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
5097         HAVE_DECL_SNPRINTF.
5098         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
5099         * lib/getaddrinfo.c: Likewise.
5100
5101         * modules/stdio: New file.
5102         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
5103         * lib/snprintf.h: Remove file.
5104         * lib/vsnprintf.h: Remove file.
5105         * lib/.cppi-disable: Remove snprintf.h.
5106         * m4/stdio_h.m4: New file.
5107         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
5108
5109 2007-02-20  Jim Meyering  <jim@meyering.net>
5110
5111         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
5112         used by e.g., mingw.  From Bruno Haible.
5113
5114 2007-02-19  Bruno Haible  <bruno@clisp.org>
5115
5116         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
5117         warnings.
5118         Reported by Ben Pfaff <blp@cs.stanford.edu>.
5119
5120 2007-02-19  Bruno Haible  <bruno@clisp.org>
5121
5122         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
5123         from mingw users.
5124
5125 2007-02-19  Bruno Haible  <bruno@clisp.org>
5126
5127         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
5128         warnings.
5129         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
5130
5131 2007-02-19  Jim Meyering  <jim@meyering.net>
5132
5133         Don't use FD after a successful "fdopendir (fd)".
5134         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
5135         Reset it by calling dirfd on the just-obtained DIR*.
5136
5137         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
5138         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
5139
5140 2007-02-18  Bruno Haible  <bruno@clisp.org>
5141
5142         * lib/readlink.c: Include <unistd.h>.
5143         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
5144         HAVE_READLINK.
5145         * modules/readlink (Depends-on): Add unistd.
5146         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5147         (Include): Add <unistd.h>.
5148
5149         * lib/getlogin_r.h: Remove file.
5150         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
5151         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
5152         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
5153         HAVE_DECL_GETLOGIN_R.
5154         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
5155         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5156         (Include): Use <unistd.h> instead of getlogin_r.h.
5157
5158         * lib/getcwd.h: Remove file.
5159         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
5160         * lib/xgetcwd.c: Likewise.
5161         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
5162         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
5163         * modules/getcwd (Files): Remove lib/getcwd.h.
5164         (Depends-on): Add unistd.
5165         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5166         (Include): Use <unistd.h> instad of getcwd.h.
5167
5168         * lib/ftruncate.c: Include <unistd.h> first.
5169         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
5170         Set HAVE_FTRUNCATE.
5171         * modules/ftruncate (Depends-on): Add unistd.
5172         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5173
5174         * lib/fchdir.c: Include <unistd.h> first.
5175         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
5176         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
5177         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
5178         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5179         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
5180
5181         * lib/dup2.c: Include <unistd.h> first.
5182         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
5183         HAVE_DUP2.
5184         * modules/dup2 (Depends-on): Add unistd.
5185         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5186
5187         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
5188         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
5189         REPLACE_CHOWN. Don't define chown as a macro here.
5190         * modules/chown (Depends-on): Add unistd.
5191         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5192
5193         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
5194         Add definition for GL_LINK_WARNING.
5195         (chown, dup2): New declarations.
5196         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
5197         link warning.
5198         (ftruncate): New declaration.
5199         (getcwd): New declaration, taken from old getcwd.h.
5200         (getlogin_r): New declaration, taken from old getlogin_r.h.
5201         (readlink): New declaration.
5202         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
5203         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
5204         (gl_PREREQ_UNISTD): Remove macro.
5205         (gl_UNISTD_MODULE_INDICATOR): New macro.
5206         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
5207         many new variables. Don't set UNISTD_H.
5208         * modules/unistd (Description): Change.
5209         (Depends-on): Add link-warning.
5210         (configure.ac): Update.
5211         (Makefile.am): Create unistd.h always. Substitute many new variables
5212         into it.
5213
5214 2007-02-18  Bruno Haible  <bruno@clisp.org>
5215
5216         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
5217         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
5218         HAVE_GETSUBOPT.
5219         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
5220         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
5221         * lib/getsubopt.h: Remove file.
5222         * modules/getsubopt (Files): Remove lib/getsubopt.h.
5223         (Depends-on): Add stdlib.
5224         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
5225         (Includes): Use <stdlib.h> instead of getsubopt.h.
5226         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
5227         Set HAVE_GETSUBOPT.
5228         * lib/getsubopt.c: Don't include getsubopt.h.
5229
5230 2007-02-18  Bruno Haible  <bruno@clisp.org>
5231
5232         * modules/fchdir (Depends-on): Add dup2.
5233
5234 2007-02-18  Bruno Haible  <bruno@clisp.org>
5235
5236         * lib/stdlib_.h: Handle glibc's special invocation convention
5237         specially.
5238
5239 2007-02-18  Bruno Haible  <bruno@clisp.org>
5240
5241         * modules/stdlib-tests: New file.
5242         * tests/test-stdlib.c: New file.
5243
5244         * modules/mkstemp (Files): Remove lib/mkstemp.h.
5245         (Depends-on): Add stdlib.
5246         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
5247         (Includes): Use <stdlib.h> instead of mkstemp.h.
5248         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
5249         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
5250         * lib/mkstemp.c: Don't include mkstemp.h.
5251         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
5252         * lib/stdlib--.h: Don't include mkstemp.h.
5253
5254         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
5255         (Depends-on): Add stdlib.
5256         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
5257         (Includes): Use <stdlib.h> instead of mkdtemp.h.
5258         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
5259         HAVE_MKDTEMP.
5260         * lib/mkdtemp.c: Don't include mkdtemp.h.
5261         * lib/clean-temp.c: Don't include mkdtemp.h.
5262
5263         * modules/exit (Files): Remove lib/exit.h.
5264         (Depends-on): Add stdlib.
5265         (Makefile.am): Remove lib_SOURCES.
5266         (Include): Use <stdlib.h> instead of exit.h.
5267         * lib/argmatch.c: Don't include exit.h.
5268         * lib/execute.c: Likewise.
5269         * lib/pagealign_alloc.c: Likewise.
5270         * lib/pipe.c: Likewise.
5271         * lib/wait-process.c: Likewise.
5272         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
5273         * lib/exitfail.c: Likewise.
5274         * lib/savewd.c: Likewise.
5275         * lib/xsetenv.c: Likewise.
5276
5277         * modules/stdlib: New file.
5278         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
5279         and extra comments about mkstemp().
5280         * lib/exit.h: Remove file.
5281         * lib/mkdtemp.h: Remove file.
5282         * lib/mkstemp.h: Remove file.
5283         * m4/stdlib_h.m4: New file.
5284         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
5285
5286 2007-02-18  Bruno Haible  <bruno@clisp.org>
5287
5288         * modules/math-tests: New file.
5289         * tests/test-math.c: New file.
5290
5291         * modules/math: New file.
5292         * modules/mathl (Files): Remove lib/mathl.h.
5293         (Depends-on): Add math.
5294         (Makefile.am): Don't mention mathl.h.
5295         (Include): Use <math.h> instead of mathl.h.
5296         * lib/math_.h: New file.
5297         * lib/mathl.h: Remove file.
5298         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
5299         mathl.h.
5300         * lib/asinl.c: Likewise.
5301         * lib/atanl.c: Likewise.
5302         * lib/ceill.c: Likewise.
5303         * lib/cosl.c: Likewise.
5304         * lib/expl.c: Likewise.
5305         * lib/floorl.c: Likewise.
5306         * lib/frexpl.c: Likewise.
5307         * lib/ldexpl.c: Likewise.
5308         * lib/logl.c: Likewise.
5309         * lib/sincosl.c: Likewise.
5310         * lib/sinl.c: Likewise.
5311         * lib/sqrtl.c: Likewise.
5312         * lib/tanl.c: Likewise.
5313         * lib/trigl.c: Likewise.
5314         * m4/math_h.m4: New file.
5315         * MODULES.html.sh (Mathematics): Add math.
5316
5317 2007-02-17  Bruno Haible  <bruno@clisp.org>
5318
5319         * modules/wctype-tests: New file.
5320         * tests/test-wctype.c: New file.
5321
5322         * modules/wchar-tests: New file.
5323         * tests/test-wchar.c: New file.
5324
5325         * modules/unistd-tests: New file.
5326         * tests/test-unistd.c: New file.
5327
5328         * modules/time-tests: New file.
5329         * tests/test-time.c: New file.
5330
5331         * modules/sysexits-tests: New file.
5332         * tests/test-sysexits.c: New file.
5333
5334         * modules/sys_time-tests: New file.
5335         * tests/test-sys_time.c: New file.
5336
5337         * modules/sys_stat-tests: New file.
5338         * tests/test-sys_stat.c: New file.
5339
5340         * modules/sys_socket-tests: New file.
5341         * tests/test-sys_socket.c: New file.
5342
5343         * modules/sys_select-tests: New file.
5344         * tests/test-sys_select.c: New file.
5345
5346         * modules/string-tests: New file.
5347         * tests/test-string.c: New file.
5348
5349         * modules/stdbool-tests: New file.
5350         * tests/test-stdbool.c: New file.
5351
5352         * modules/netinet_in-tests: New file.
5353         * tests/test-netinet_in.c: New file.
5354
5355         * modules/inttypes-tests: New file.
5356         * tests/test-inttypes.c: New file.
5357
5358         * modules/fcntl-tests: New file.
5359         * tests/test-fcntl.c: New file.
5360
5361         * modules/byteswap-tests: New file.
5362         * tests/test-byteswap.c: New file.
5363
5364         * modules/arpa_inet-tests: New file.
5365         * tests/test-arpa_inet.c: New file.
5366
5367 2007-02-17  Bruno Haible  <bruno@clisp.org>
5368
5369         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
5370         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
5371         if the corresponding module is not enabled. Emit link warnings if
5372         the function is used nevertheless.
5373         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
5374         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
5375         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
5376         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
5377         * modules/inttypes (Depends-on): Add link-warning.
5378         (Makefile.am): Copy the contents of build-aux/link-warning.h into
5379         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
5380         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
5381         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
5382         * modules/imaxdiv (configure.ac): Likewise.
5383         * modules/strtoimax (configure.ac): Likewise.
5384         * modules/strtoumax (configure.ac): Likewise.
5385
5386 2007-02-17  Bruno Haible  <bruno@clisp.org>
5387
5388         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
5389         gl_STRING_MODULE_INDICATOR_DEFAULTS.
5390         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
5391         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
5392
5393 2007-02-17  Bruno Haible  <bruno@clisp.org>
5394
5395         * modules/link-warning: New file.
5396         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
5397         * lib/string_.h (GL_LINK_WARNING): Remove definition.
5398         * modules/string (Depends-on): Add link-warning.
5399         (Makefile.am): Copy the contents of build-aux/link-warning.h into
5400         string.h.
5401         * MODULES.html.sh (Support for building libraries and executables): Add
5402         link-warning.
5403
5404 2007-02-17  Bruno Haible  <bruno@clisp.org>
5405
5406         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
5407         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
5408         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
5409         long lines.
5410
5411 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
5412             Bruno Haible  <bruno@clisp.org>
5413
5414         * modules/tmpfile: New file.
5415         * lib/tmpfile.c: New file.
5416         * m4/tmpfile.m4: New file.
5417         * MODULES.html.sh (func_all_modules): New section "Input/output".
5418
5419 2007-02-15  Bruno Haible  <bruno@clisp.org>
5420
5421         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
5422         (supports_delete_on_close): New function.
5423         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
5424
5425 2007-02-14  Bruno Haible  <bruno@clisp.org>
5426
5427         * modules/mbspcasecmp-tests: New file.
5428         * tests/test-mbspcasecmp.sh: New file.
5429         * tests/test-mbspcasecmp.c: New file.
5430
5431         New module mbspcasecmp.
5432         * modules/mbspcasecmp: New file.
5433         * lib/mbspcasecmp.c: New file.
5434         * lib/string_.h (strncasecmp): Change warning message.
5435         (mbspcasecmp): New declaration.
5436         * m4/mbspcasecmp.m4: New file.
5437         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5438         GNULIB_MBSPCASECMP.
5439         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
5440         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
5441
5442 2007-02-14  Bruno Haible  <bruno@clisp.org>
5443
5444         * modules/mbsncasecmp-tests: New file.
5445         * tests/test-mbsncasecmp.sh: New file.
5446         * tests/test-mbsncasecmp.c: New file.
5447
5448         New module mbsncasecmp.
5449         * modules/mbsncasecmp: New file.
5450         * lib/mbsncasecmp.c: New file.
5451         * lib/string_.h (mbsncasecmp): New declaration.
5452         * m4/mbsncasecmp.m4: New file.
5453         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5454         GNULIB_MBSNCASECMP.
5455         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
5456         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
5457
5458 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
5459
5460         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
5461         Verify that it doesn't overlap with our flags.
5462         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
5463         do not have the desired effect in multibyte locales; instead, use
5464         mbscasecmp.
5465         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
5466         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
5467         we don't require GNU fnmatch ourselves (if our users require it, they
5468         should do so explicitly).
5469
5470         Fix regex code so it doesn't rely on strcasecmp.
5471         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
5472         Otherwise, include gnulib's langinfo.h.
5473         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
5474         undesirable behavior in non-C locales.  Instead, rely on localecharset.
5475         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
5476         * modules/regex (FILES): Remove m4/codeset.m4.
5477         (Depends-on): Add localcharset.  Remove strcase.
5478
5479 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5480
5481         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
5482         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
5483
5484 2007-02-13  Bruno Haible  <bruno@clisp.org>
5485
5486         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
5487         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5488
5489 2007-02-12  Bruno Haible  <bruno@clisp.org>
5490
5491         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
5492         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
5493         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
5494         time warning rather than a link error.
5495
5496 2007-02-12  Bruno Haible  <bruno@clisp.org>
5497
5498         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
5499         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
5500         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5501
5502 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
5503
5504         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
5505         args, not 2.
5506
5507 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
5508
5509         New module 'time', so that apps can include <time.h> as per
5510         POSIX and GNU instead of separate include files like time_r.h
5511         and timegm.h.  This implementation tries out a simpler approach
5512         for replacing decls in standard include files (as compared to
5513         the string module), somewhat as an experiment.
5514
5515         * config/srclist.txt: Comment out mktime.c for now.
5516         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
5517         since it doesn't apply any more.  Use generic wording instead.
5518         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
5519         'time'.
5520         * lib/time_.h, m4/time_h.m4, modules/time: New files.
5521         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
5522         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
5523         Don't include <sys/types.h>; no longer needed since we assume C89.
5524         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
5525         * lib/strftime.c: Likewise.
5526         * lib/time_r.c: Likewise.
5527         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
5528         * lib/nanosleep.c: Include <time.h> first, to check interface.
5529         * lib/strptime.c: Likewise.
5530         * lib/time_r.c: Likewise.
5531         * lib/timegm.c: Likewise.
5532         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
5533         needed.
5534         * lib/timegm.c: Don't include timegm.h; no longer needed.
5535         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
5536         time.h now handles any problems in that area.
5537         (struct timespec, nanosleep): Remove; time.h now arranges for these.
5538         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
5539         that time.h defines struct timespec.
5540         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
5541         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
5542         handles that.
5543         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
5544         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
5545         needed.  Set REPLACE_LOCALTIME.
5546         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
5547         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
5548         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
5549         nanosleep; time_h.m4 now does that.  Don't require
5550         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
5551         module handles this now.
5552         * modules/getdate (Depends-on): Remove timespec.  Add time.
5553         * modules/nanosleep (Depends-on): Likewise.
5554         * modules/stat-time (Depends-on): Likewise.
5555         * modules/nanosleep (Include): Include time.h, not timespec.h.
5556         * modules/strptime (Files): Remove lib/strptime.h.
5557         (Depends-on): Add extensions, time.
5558         (Include): Include time.h, not strptime.h.
5559         * modules/time_r (Files): Remove lib/time_r.h.
5560         (Depends-on): Add time.
5561         (Include): Include time.h, not time_r.h.
5562         * modules/timegm: Likewise.
5563         * modules/timespec (Description): Now does timespec-related decls
5564         of our own, instead of struct timespec itself.
5565         (Depends-on): Add time; remove extensions.
5566         (Maintainer): Add self.
5567         * modules/utimecmp (Depends-on): Add time; remove timespec.
5568         * modules/utimens (Depends-on): Likewise.
5569         * modules/xnanosleep (Depends-on): Likewise.
5570
5571 2007-02-11  Bruno Haible  <bruno@clisp.org>
5572
5573         * lib/c-strstr.c: Include allocsa.h.
5574         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
5575         * lib/c-strcasestr.c: Include allocsa.h.
5576         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
5577         * lib/strcasestr.c: Include allocsa.h.
5578         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
5579         * lib/mbsstr.c: Include allocsa.h.
5580         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
5581         allocsa/freesa instead of malloc/free.
5582         * lib/mbscasestr.c: Include allocsa.h.
5583         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
5584         allocsa/freesa instead of malloc/free.
5585         * modules/c-strstr (Depends-on): Add allocsa.
5586         * modules/c-strcasestr (Depends-on): Likewise.
5587         * modules/strcasestr (Depends-on): Likewise.
5588         * modules/mbsstr (Depends-on): Likewise.
5589         * modules/mbscasestr (Depends-on): Likewise.
5590
5591 2007-02-11  Bruno Haible  <bruno@clisp.org>
5592
5593         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
5594
5595         * modules/mbsspn-tests: New file.
5596         * tests/test-mbsspn.sh: New file.
5597         * tests/test-mbsspn.c: New file.
5598
5599 2007-02-11  Bruno Haible  <bruno@clisp.org>
5600
5601         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
5602
5603         * modules/mbspbrk-tests: New file.
5604         * tests/test-mbspbrk.sh: New file.
5605         * tests/test-mbspbrk.c: New file.
5606
5607 2007-02-11  Bruno Haible  <bruno@clisp.org>
5608
5609         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
5610         unneeded cast.
5611
5612         * modules/mbscspn-tests: New file.
5613         * tests/test-mbscspn.sh: New file.
5614         * tests/test-mbscspn.c: New file.
5615
5616 2007-02-11  Bruno Haible  <bruno@clisp.org>
5617
5618         * modules/mbscasecmp-tests: New file.
5619         * tests/test-mbscasecmp.sh: New file.
5620         * tests/test-mbscasecmp.c: New file.
5621
5622 2007-02-11  Bruno Haible  <bruno@clisp.org>
5623
5624         Ensure O(n) worst-case complexity of mbscasestr.
5625         * lib/mbscasestr.c: Include stdbool.h.
5626         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
5627         functions.
5628         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
5629         the bookkeeping indicates that it's worth it.
5630         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
5631
5632         * modules/mbscasestr-tests: New file.
5633         * tests/test-mbscasestr1.c: New file.
5634         * tests/test-mbscasestr2.sh: New file.
5635         * tests/test-mbscasestr2.c: New file.
5636         * tests/test-mbscasestr3.sh: New file.
5637         * tests/test-mbscasestr3.c: New file.
5638         * tests/test-mbscasestr4.sh: New file.
5639         * tests/test-mbscasestr4.c: New file.
5640         * m4/locale-tr.m4: New file.
5641
5642 2007-02-11  Bruno Haible  <bruno@clisp.org>
5643
5644         Ensure O(n) worst-case complexity of mbsstr.
5645         * lib/mbsstr.c: Include stdbool.h.
5646         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
5647         functions.
5648         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
5649         bookkeeping indicates that it's worth it.
5650         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
5651
5652         * modules/mbsstr-tests: New file.
5653         * tests/test-mbsstr1.c: New file.
5654         * tests/test-mbsstr2.sh: New file.
5655         * tests/test-mbsstr2.c: New file.
5656         * tests/test-mbsstr3.sh: New file.
5657         * tests/test-mbsstr3.c: New file.
5658         * m4/locale-fr.m4: New file.
5659
5660 2007-02-11  Bruno Haible  <bruno@clisp.org>
5661
5662         * lib/mbsrchr.c (mbsrchr): Fix bug.
5663
5664         * modules/mbsrchr-tests: New file.
5665         * tests/test-mbsrchr.sh: New file.
5666         * tests/test-mbsrchr.c: New file.
5667
5668 2007-02-11  Bruno Haible  <bruno@clisp.org>
5669
5670         * lib/mbschr.c (mbschr): Fix bug.
5671
5672         * modules/mbschr-tests: New file.
5673         * tests/test-mbschr.sh: New file.
5674         * tests/test-mbschr.c: New file.
5675         * m4/locale-zh.m4: New file.
5676
5677 2007-02-11  Bruno Haible  <bruno@clisp.org>
5678
5679         Support for copying multibyte string iterators.
5680         * lib/mbiter.h: Include <string.h>.
5681         (mbiter_multi_copy): New function.
5682         (mbi_copy): New macro.
5683         * lib/mbuiter.h: Include <string.h>.
5684         (mbuiter_multi_copy): New function.
5685         (mbui_copy): New macro.
5686
5687 2007-02-11  Bruno Haible  <bruno@clisp.org>
5688
5689         New module mbslen.
5690         * modules/mbslen: New file.
5691         * lib/mbslen.c: New file.
5692         * lib/string_.h (mbslen): New declaration.
5693         * m4/mbslen.m4: New file.
5694         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5695         GNULIB_MBSLEN.
5696         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
5697         * MODULES.html.sh (Internationalization functions): Add mbslen.
5698
5699 2007-02-11  Bruno Haible  <bruno@clisp.org>
5700
5701         Ensure O(n) worst-case complexity of strcasestr substitute.
5702         * lib/strcasestr.c: Include stdbool.h.
5703         (knuth_morris_pratt): New function.
5704         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
5705         bookkeeping indicates that it's worth it.
5706         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
5707
5708         * modules/strcasestr-tests: New file.
5709         * tests/test-strcasestr.c: New file.
5710
5711 2007-02-11  Bruno Haible  <bruno@clisp.org>
5712
5713         Ensure O(n) worst-case complexity of c_strcasestr.
5714         * lib/c-strcasestr.c: Include stdbool.h, string.h.
5715         (knuth_morris_pratt): New function.
5716         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
5717         the bookkeeping indicates that it's worth it.
5718         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
5719
5720         * modules/c-strcasestr-tests: New file.
5721         * tests/test-c-strcasestr.c: New file.
5722
5723 2007-02-11  Bruno Haible  <bruno@clisp.org>
5724
5725         Ensure O(n) worst-case complexity of c_strstr.
5726         * lib/c-strstr.c: Include stdbool.h, string.h.
5727         (knuth_morris_pratt): New function.
5728         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
5729         bookkeeping indicates that it's worth it.
5730         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
5731
5732         * lib/c-strstr.c: Complete rewrite for maintainability.
5733
5734         * modules/c-strstr-tests: New file.
5735         * tests/test-c-strstr.c: New file.
5736
5737 2007-02-11  Bruno Haible  <bruno@clisp.org>
5738
5739         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
5740         5.2.1 and earlier, whereby \055 was treated just like the range
5741         delimiter '-'.
5742         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
5743
5744 2007-02-08  Bruno Haible  <bruno@clisp.org>
5745
5746         * modules/regex (Depends-on): Add stdbool.
5747         Reported by Dalibor Topic <robilad@kaffe.org>.
5748
5749 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
5750
5751         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
5752         Prefer returning from main to exiting from it.
5753         Remove unnecessary parens after sizeof.
5754
5755 2007-02-05  Bruno Haible  <bruno@clisp.org>
5756
5757         New module mbssep.
5758         * modules/mbssep: New file.
5759         * lib/mbssep.c: New file.
5760         * lib/string_.h (strsep): Add a conditional link warning.
5761         (mbssep): New declaration.
5762         * m4/mbssep.m4: New file.
5763         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5764         GNULIB_MBSSEP.
5765         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
5766         * MODULES.html.sh (Internationalization functions): Add mbssep.
5767
5768 2007-02-05  Bruno Haible  <bruno@clisp.org>
5769
5770         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
5771         Optimize search in case of 1 delimiter.
5772
5773 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
5774
5775         * lib/acl.h: Include sys/types.h before sys/acl.h.
5776
5777 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
5778
5779         Merge upstream fix for glibc bugzilla #3957:
5780
5781         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
5782
5783         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
5784         bit for RE_HAT_LISTS_NOT_NEWLINE.
5785         (build_charclass_op): Remove bogus comment.
5786
5787 2007-02-05  Simon Josefsson  <simon@josefsson.org>
5788
5789         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
5790
5791 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
5792
5793         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
5794         * lib/memmem.c [!defined _LIBC]: Include config.h.
5795
5796 2007-02-04  Bruno Haible  <bruno@clisp.org>
5797
5798         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
5799         warning message.
5800
5801 2007-02-04  Bruno Haible  <bruno@clisp.org>
5802
5803         New module mbstok_r.
5804         * modules/mbstok_r: New file.
5805         * lib/mbstok_r.c: New file.
5806         * lib/string_.h (strtok_r): Change argument names to match the
5807         comments. Add a conditional link warning.
5808         (mbstok_r): New declaration.
5809         * m4/mbstok_r.m4: New file.
5810         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5811         GNULIB_MBSTOK_R.
5812         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
5813         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
5814
5815 2007-02-04  Bruno Haible  <bruno@clisp.org>
5816
5817         New module mbsspn.
5818         * modules/mbsspn: New file.
5819         * lib/mbsspn.c: New file.
5820         * lib/string_.h (strspn): Add a conditional link warning.
5821         (mbsspn): New declaration.
5822         * m4/mbsspn.m4: New file.
5823         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5824         GNULIB_MBSSPN.
5825         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
5826         * MODULES.html.sh (Internationalization functions): Add mbsspn.
5827
5828 2007-02-04  Bruno Haible  <bruno@clisp.org>
5829
5830         New module mbspbrk.
5831         * modules/mbspbrk: New file.
5832         * lib/mbspbrk.c: New file.
5833         * lib/string_.h (strpbrk): Add a conditional link warning.
5834         (mbspbrk): New declaration.
5835         * m4/mbspbrk.m4: New file.
5836         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5837         GNULIB_MBSPBRK.
5838         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
5839         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
5840
5841 2007-02-04  Bruno Haible  <bruno@clisp.org>
5842
5843         New module mbscspn.
5844         * modules/mbscspn: New file.
5845         * lib/mbscspn.c: New file.
5846         * lib/string_.h (strcspn): Add a conditional link warning.
5847         (mbscspn): New declaration.
5848         * m4/mbscspn.m4: New file.
5849         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5850         GNULIB_MBSCSPN.
5851         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
5852         * MODULES.html.sh (Internationalization functions): Add mbscspn.
5853
5854 2007-02-04  Bruno Haible  <bruno@clisp.org>
5855
5856         New module mbscasestr, reduced goal of strcasestr.
5857         * modules/mbscasestr: New file.
5858         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
5859         (mbscasestr): Renamed from strcasestr.
5860         * lib/strcasestr.c: Don't include mbuiter.h.
5861         (strcasestr): Remove support for multibyte locales.
5862         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
5863         Change the conditional link warning.
5864         (mbscasestr): New declaration.
5865         * m4/mbscasestr.m4: New file.
5866         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
5867         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
5868         REPLACE_STRCASESTR.
5869         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
5870         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
5871         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
5872         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
5873         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
5874         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
5875         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
5876         (Depends-on): Remove mbuiter.
5877         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
5878
5879 2007-02-04  Bruno Haible  <bruno@clisp.org>
5880
5881         Simplify handling of strncasecmp.
5882         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
5883         the conditional link warning.
5884         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
5885         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
5886         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
5887         * modules/strcase (configure.ac): Don't invoke
5888         gl_STRING_MODULE_INDICATOR.
5889         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
5890
5891 2007-02-04  Bruno Haible  <bruno@clisp.org>
5892
5893         New module mbscasecmp, reduced goal of strcasecmp.
5894         * modules/mbscasecmp: New file.
5895         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
5896         (mbscasecmp): Renamed from strcasecmp.
5897         * lib/strcasecmp.c: Don't include mbuiter.h.
5898         (strcasecmp): Remove support for multibyte locales.
5899         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
5900         Change the conditional link warning.
5901         (mbscasecmp): New declaration.
5902         * m4/mbscasecmp.m4: New file.
5903         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
5904         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
5905         REPLACE_STRCASECMP.
5906         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
5907         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5908         GNULIB_MBSCASECMP.
5909         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
5910         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
5911         * modules/strcase (Files): Remove m4/mbrtowc.m4.
5912         (Depends-on): Remove mbuiter.
5913         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
5914
5915 2007-02-04  Bruno Haible  <bruno@clisp.org>
5916
5917         New module mbsstr. Remove module strstr.
5918         * modules/mbsstr: New file.
5919         * modules/strstr: Remove file.
5920         * lib/mbsstr.c: Renamed from lib/strstr.c.
5921         (mbsstr): Renamed from strstr.
5922         * lib/string_.h (strstr): Remove declaration. Change the conditional
5923         link warning.
5924         (mbsstr): New declaration.
5925         * m4/mbsstr.m4: New file.
5926         * m4/strstr.m4: Remove file.
5927         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
5928         REPLACE_STRSTR.
5929         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
5930         Don't initialize GNULIB_STRSTR.
5931         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
5932         substitute GNULIB_STRSTR and REPLACE_STRSTR.
5933         * MODULES.html.sh (Internationalization functions): Add mbsstr.
5934         (Support for systems lacking ANSI C 89): Remove strstr.
5935
5936 2007-02-04  Bruno Haible  <bruno@clisp.org>
5937
5938         New module mbsrchr.
5939         * modules/mbsrchr: New file.
5940         * lib/mbsrchr.c: New file.
5941         * lib/string_.h (strrchr): Add a conditional link warning.
5942         (mbsrchr): New declaration.
5943         * m4/mbsrchr.m4: New file.
5944         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5945         GNULIB_MBSRCHR.
5946         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
5947         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
5948
5949 2007-02-04  Bruno Haible  <bruno@clisp.org>
5950
5951         New module mbschr.
5952         * modules/mbschr: New file.
5953         * lib/mbschr.c: New file.
5954         * lib/string_.h (strchr): Add a conditional link warning.
5955         (mbschr): New declaration.
5956         * m4/mbschr.m4: New file.
5957         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5958         GNULIB_MBSCHR.
5959         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
5960         * MODULES.html.sh (Internationalization functions): Add mbschr.
5961
5962 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
5963
5964         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
5965
5966         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
5967
5968 2007-02-04  Bruno Haible  <bruno@clisp.org>
5969
5970         New module description section 'configure.ac-early'.
5971         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
5972         (func_get_autoconf_early_snippet): New function.
5973         (func_import, func_create_testdir): Use it. Remove special cases for
5974         modules 'extensions' and 'lock'.
5975         * modules/extensions (configure.ac-early): Require
5976         gl_USE_SYSTEM_EXTENSIONS.
5977         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
5978
5979 2007-02-04  Bruno Haible  <bruno@clisp.org>
5980
5981         Make use of gcj-4.3's -fsource and -ftarget option.
5982         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
5983         and if so try the options -fsource and -ftarget.
5984         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
5985         source_version, ftarget_option, target_version arguments.
5986         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
5987         (is_envjavac_oldgcj_14_14_usable): Renamed from
5988         is_envjavac_gcj_14_14_usable.
5989         (is_envjavac_oldgcj_14_13_usable): Renamed from
5990         is_envjavac_gcj_14_13_usable.
5991         (is_gcj_present): Update.
5992         (is_gcj_43, is_gcj43_usable): New functions.
5993         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
5994         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
5995         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
5996         try the options -fsource and -ftarget.
5997
5998 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
5999
6000         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
6001         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
6002         larger value.
6003
6004 2007-02-03  Jim Meyering  <jim@meyering.net>
6005
6006         Give tools a better chance to allocate space for very large buffers.
6007         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
6008
6009         Make pwd and readlink work also when run with an unreadable parent dir
6010         on systems with openat support.
6011         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
6012         provided getcwd function, even when we have openat support.
6013         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
6014
6015 2007-02-02  Bruno Haible  <bruno@clisp.org>
6016
6017         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
6018         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
6019         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
6020         portability problems if one of these functions is only used on specific
6021         platforms.
6022         Reported by Paul Eggert.
6023
6024 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
6025
6026         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
6027         is causing more trouble than it's curing.
6028         * lib/regex_internal.h (__mempcpy): Remove.
6029         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
6030         (and make the code a tad smaller to boot).
6031         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
6032
6033 2007-02-02  Jim Meyering  <jim@meyering.net>
6034
6035         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
6036         section, not in the Makefile.am: one.
6037
6038 2007-02-02  Eric Blake  <ebb9@byu.net>
6039
6040         * lib/strchrnul.c: Always include config.h first.
6041
6042         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
6043         gnulib strstr is not necessary here.
6044
6045 2007-02-02  Simon Josefsson  <simon@josefsson.org>
6046
6047         * m4/socklen.m4: Fix typo.
6048
6049 2007-02-02  Eric Blake  <ebb9@byu.net>
6050
6051         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
6052         * modules/netinet_in (Makefile.am): Likewise.
6053
6054 2007-02-01  Bruno Haible  <bruno@clisp.org>
6055
6056         * lib/string_.h (GL_LINK_WARNING): New macro.
6057         (strcasecmp, strstr, strcasestr): If provided by the system,
6058         conditionally define as a macro that leads to a warning instead of to
6059         an error.
6060         (strncasecmp): Conditionally define as a macro that leads to a warning.
6061
6062 2007-02-01  Karl Berry  <karl@gnu.org>
6063
6064         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
6065
6066 2007-02-01  Bruno Haible  <bruno@clisp.org>
6067
6068         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
6069         renamings.
6070
6071 2007-02-01  Eric Blake  <ebb9@byu.net>
6072
6073         * modules/regex (Depends-on): Revert dependence on mempcpy.
6074         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
6075         module's definition of mempcpy.
6076         Reported by Paul Eggert.
6077
6078 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
6079
6080         * lib/string_.h: If the gnulib module XYZ is not present, undefine
6081         the symbol XYZ before redefining it.  This fixes a problem with
6082         programs that don't use XYZ, when compiled on systems that define
6083         XYZ to something else.
6084
6085 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
6086
6087         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
6088         occurs when "mkdir -m foo" creates a setgid directory that is (1)
6089         writeable to group or other and (2) is intended to have a special
6090         mode bit that is set or cleared.  In such a case, the directory
6091         should be neither group- nor other-writeable until the special
6092         mode bits are right.
6093
6094 2007-01-31  Eric Blake  <ebb9@byu.net>
6095
6096         * modules/mountlist (Depends-on): Add strstr.
6097
6098         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
6099         bug.
6100         * modules/string (Makefile.am): Remove redundant replacement.
6101         * modules/regex (Depends-on): Add mempcpy.
6102
6103 2007-01-31  Bruno Haible  <bruno@clisp.org>
6104
6105         New module description field 'Link'.
6106         * gnulib-tool (func_usage): Document --extract-link-directive.
6107         (sed_extract_prog): Recognize 'Link' directive.
6108         (func_get_link_directive): New function.
6109         (func_import): Show summary of link directives.
6110         Handle --extract-link-directive option.
6111         * modules/acl (Link): New section.
6112         * modules/clock-time (Link): New section.
6113         * modules/euidaccess (Link): New section.
6114         * modules/gettext (Link): New section.
6115         * modules/iconv (Link): New section.
6116         * modules/lock (Link): New section.
6117         * modules/nanosleep (Link): New section.
6118         * modules/readline (Link): New section.
6119
6120 2007-01-27  Bruno Haible  <bruno@clisp.org>
6121
6122         Enforce the use of gnulib modules for unportable <string.h> functions.
6123         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
6124         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
6125         (gl_HEADER_STRING_H_BODY): Require it.
6126         * lib/string_.h: If the gnulib module XYZ is not present, redefine
6127         the symbol XYZ to one that gives a link error.
6128         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
6129         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
6130         * modules/mempcpy (configure.ac): Likewise.
6131         * modules/memrchr (configure.ac): Likewise.
6132         * modules/stpcpy (configure.ac): Likewise.
6133         * modules/stpncpy (configure.ac): Likewise.
6134         * modules/strcase (configure.ac): Likewise.
6135         * modules/strcasestr (configure.ac): Likewise.
6136         * modules/strchrnul (configure.ac): Likewise.
6137         * modules/strdup (configure.ac): Likewise.
6138         * modules/strndup (configure.ac): Likewise.
6139         * modules/strnlen (configure.ac): Likewise.
6140         * modules/strpbrk (configure.ac): Likewise.
6141         * modules/strsep (configure.ac): Likewise.
6142         * modules/strstr (configure.ac): Likewise.
6143         * modules/strtok_r (configure.ac): Likewise.
6144
6145 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
6146
6147         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
6148
6149 2007-01-30  Jim Meyering  <jim@meyering.net>
6150
6151         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
6152
6153 2007-01-29  Bruno Haible  <bruno@clisp.org>
6154
6155         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
6156         * lib/execute.c: Likewise.
6157         * lib/pipe.c: Likewise.
6158         * lib/printf-args.h: Likewise.
6159         * lib/printf-args.c: Likewise.
6160         * lib/printf-parse.c: Likewise.
6161         * lib/vasnprintf.c: Likewise.
6162
6163 2007-01-29  Eric Blake  <ebb9@byu.net>
6164
6165         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
6166         declaration.
6167
6168 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
6169
6170         * lib/strptime.h (strptime): Use 'restrict' for args where
6171         POSIX requires this.
6172         * lib/strptime.c (strptime): Likewise.
6173         Change license notice from LGPL to GPL, since gnulib-tool will
6174         change this as needed.
6175         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
6176         defined.
6177         Include "strptime.h" first, to check interface.
6178         Do not #undef _LIBC and _NL_CURRENT.
6179         Do not include <stdlib.h>; no longer needed.
6180         Include "time_r.h" and declare ptime_locale_status
6181         only if _LIBC is not defined.
6182         (__P): Remove unused macro.
6183         (match_string): Bring back glibc version, but use it only if _LIBC
6184         is defined.
6185         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
6186         Remove unnecessary assertion and abort() call.
6187         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
6188         * m4/strptime.m4: Fix serial number comment.
6189         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
6190         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
6191         (Depends-on): Add time_r.
6192
6193 2007-01-29  Bruno Haible  <bruno@clisp.org>
6194
6195         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
6196         strptime.
6197         * modules/strptime (Depends-on): Add stdbool.
6198         * lib/strptime.h: Include <time.h> always. Add comments.
6199
6200 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
6201
6202         * modules/strptime: New file.
6203         * lib/strptime.h: New file.
6204         * lib/strptime.c: New file.
6205         * m4/strptime.m4: New file.
6206
6207 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
6208
6209         * MODULES.html.sh: New module mpsort.
6210         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
6211
6212         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
6213         a circularity problem with HP-UX ia64 reported by Bob Proulx in
6214         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
6215         All uses changed.
6216         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
6217         All uses changed.
6218         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
6219         to _Restrict_.
6220         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
6221         the parameter matches the prototype.
6222
6223 2007-01-28  Jim Meyering  <jim@meyering.net>
6224
6225         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
6226         sys/time.h here, reverting that part of the previous patch:
6227         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
6228
6229 2007-01-28  Bruno Haible  <bruno@clisp.org>
6230
6231         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
6232         value of $(SYS_TIME_H).
6233         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
6234         remove it conditionally, too. [added by Jim Meyering]
6235         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
6236         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
6237         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
6238         GETTIMEOFDAY_REPLACEMENT to 1.
6239
6240 2007-01-28  Bruno Haible  <bruno@clisp.org>
6241
6242         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
6243         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
6244         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
6245         Set UNISTD_H instead of UNISTD_H2.
6246         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
6247
6248 2007-01-28  Bruno Haible  <bruno@clisp.org>
6249
6250         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
6251         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
6252
6253 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6254
6255         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
6256         (func_create_testdir): Ensure C locale for `grep' and `tr'
6257         character ranges.
6258         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
6259         ACLOCAL_AMFLAGS parsing state machine.
6260
6261 2007-01-27  Bruno Haible  <bruno@clisp.org>
6262
6263         * modules/unistr/base: Update.
6264
6265 2007-01-27  Bruno Haible  <bruno@clisp.org>
6266
6267         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
6268         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
6269         * modules/unistr/u32-mbtouc-unsafe: Renamed from
6270         modules/unistr/u32-mbtouc.
6271         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
6272         * lib/unistr.h: Update.
6273         * lib/linebreak.c: Update.
6274         * modules/unistr/u32-mbtouc: Renamed from
6275         modules/unistr/u32-mbtouc-safe.
6276         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
6277         * lib/unistr.h: Update.
6278         * lib/unistr/u32-to-u8.c: Update.
6279         * lib/unistr/u32-to-u16.c: Update.
6280
6281 2007-01-27  Bruno Haible  <bruno@clisp.org>
6282
6283         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
6284         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
6285         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
6286         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
6287         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
6288         * modules/unistr/u16-mbtouc-unsafe: Renamed from
6289         modules/unistr/u16-mbtouc.
6290         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
6291         * lib/unistr.h: Update.
6292         * lib/linebreak.c: Update.
6293         * modules/linebreak: Update.
6294         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
6295         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
6296         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
6297         * modules/unistr/u16-mbtouc: Renamed from
6298         modules/unistr/u16-mbtouc-safe.
6299         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
6300         * lib/unistr.h: Update.
6301         * lib/unistr/u16-to-u8.c: Update.
6302         * modules/unistr/u16-to-u8: Update.
6303         * lib/unistr/u16-to-u32.c: Update.
6304         * modules/unistr/u16-to-u32: Update.
6305
6306 2007-01-27  Bruno Haible  <bruno@clisp.org>
6307
6308         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
6309         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
6310         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
6311         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
6312         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
6313         * modules/unistr/u8-mbtouc-unsafe: Renamed from
6314         modules/unistr/u8-mbtouc.
6315         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
6316         * lib/unistr.h: Update.
6317         * lib/striconveh.c: Update.
6318         * modules/striconveh: Update.
6319         * lib/linebreak.c: Update.
6320         * modules/linebreak: Update.
6321         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
6322         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
6323         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
6324         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
6325         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
6326         * lib/unistr.h: Update.
6327         * lib/striconveh.c: Update.
6328         * modules/striconveh: Update.
6329         * lib/unistr/u8-to-u16.c: Update.
6330         * modules/unistr/u8-to-u16: Update.
6331         * lib/unistr/u8-to-u32.c: Update.
6332         * modules/unistr/u8-to-u32: Update.
6333
6334 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6335
6336         Sync from Libtool.
6337         * lib/argz.c: Do not include strings.h nor memory.h, include
6338         string.h unconditionally.  Patch by Simon Josefsson.
6339
6340 2007-01-27  Bruno Haible  <bruno@clisp.org>
6341
6342         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
6343         from gl_HEADER_STRING_H_BODY.
6344         (gl_HEADER_STRING_H_BODY): Require it.
6345         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
6346         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
6347         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
6348         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
6349         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
6350         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
6351         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
6352         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
6353         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
6354         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
6355         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
6356         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
6357         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
6358         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
6359         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
6360
6361 2007-01-27  Bruno Haible  <bruno@clisp.org>
6362
6363         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
6364         check_PROGRAMS into noinst_PROGRAMS.
6365         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
6366         check_PROGRAMS in this case.
6367         (func_import): Set for_test to false.
6368         (func_create_testdir): Set for_test to true.
6369
6370 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
6371             Bruno Haible  <bruno@clisp.org>
6372
6373         * modules/strcasestr (Files): Remove lib/strcasestr.h.
6374         (Depends-on): Add string.
6375         (Includes): Use <string.h> instead of strcasestr.h.
6376         * modules/string (Makefile.am): Also substitute the value of
6377         REPLACE_STRCASESTR.
6378         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
6379         assume strcasestr is declared in <string.h> not <strings.h>. Also
6380         set REPLACE_STRCASESTR.
6381         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
6382         REPLACE_STRCASESTR.
6383         * lib/strcasestr.h: Remove file.
6384         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
6385         * lib/string_.h (strcasestr): New declaration.
6386
6387 2007-01-27  Bruno Haible  <bruno@clisp.org>
6388
6389         * lib/string_.h: Use 'extern'.
6390
6391 2007-01-27  Jim Meyering  <jim@meyering.net>
6392
6393         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
6394         of set-but-not-used local, "q".
6395
6396         * lib/mempcpy.c: Include <config.h> before <string.h>.
6397         This fixes a compilation error on HP-UX, due to the system's
6398         "restrict"-using mempcpy prototype.
6399
6400 2007-01-26  Bruno Haible  <bruno@clisp.org>
6401
6402         Small optimization.
6403         * lib/javacomp.c: Include c-strstr.h.
6404          (is_envjavac_gcj): Use c_strstr instead of strstr.
6405         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
6406
6407 2007-01-26  Bruno Haible  <bruno@clisp.org>
6408
6409         * MODULES.html.sh (Unicode string functions): Add the new modules.
6410
6411         * modules/uniconv/u32-strconv-to-locale: New file.
6412         * lib/uniconv/u32-strconv-to-locale.c: New file.
6413
6414         * modules/uniconv/u16-strconv-to-locale: New file.
6415         * lib/uniconv/u16-strconv-to-locale.c: New file.
6416
6417         * modules/uniconv/u8-strconv-to-locale: New file.
6418         * lib/uniconv/u8-strconv-to-locale.c: New file.
6419
6420         * modules/uniconv/u32-strconv-from-locale: New file.
6421         * lib/uniconv/u32-strconv-from-locale.c: New file.
6422
6423         * modules/uniconv/u16-strconv-from-locale: New file.
6424         * lib/uniconv/u16-strconv-from-locale.c: New file.
6425
6426         * modules/uniconv/u8-strconv-from-locale: New file.
6427         * lib/uniconv/u8-strconv-from-locale.c: New file.
6428
6429         * modules/uniconv/u32-strconv-to-enc: New file.
6430         * lib/uniconv/u32-strconv-to-enc.c: New file.
6431         * modules/uniconv/u32-strconv-to-enc-tests: New file.
6432         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
6433
6434         * modules/uniconv/u16-strconv-to-enc: New file.
6435         * lib/uniconv/u16-strconv-to-enc.c: New file.
6436         * lib/uniconv/u-strconv-to-enc.h: New file.
6437         * modules/uniconv/u16-strconv-to-enc-tests: New file.
6438         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
6439
6440         * modules/uniconv/u8-strconv-to-enc: New file.
6441         * lib/uniconv/u8-strconv-to-enc.c: New file.
6442         * modules/uniconv/u8-strconv-to-enc-tests: New file.
6443         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
6444
6445         * modules/uniconv/u32-strconv-from-enc: New file.
6446         * lib/uniconv/u32-strconv-from-enc.c: New file.
6447         * modules/uniconv/u32-strconv-from-enc-tests: New file.
6448         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
6449
6450         * modules/uniconv/u16-strconv-from-enc: New file.
6451         * lib/uniconv/u16-strconv-from-enc.c: New file.
6452         * modules/uniconv/u16-strconv-from-enc-tests: New file.
6453         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
6454
6455         * modules/uniconv/u8-strconv-from-enc: New file.
6456         * lib/uniconv/u8-strconv-from-enc.c: New file.
6457         * lib/uniconv/u-strconv-from-enc.h: New file.
6458         * modules/uniconv/u8-strconv-from-enc-tests: New file.
6459         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
6460
6461         * modules/uniconv/u32-conv-from-enc: New file.
6462         * lib/uniconv/u32-conv-from-enc.c: New file.
6463         * modules/uniconv/u32-conv-from-enc-tests: New file.
6464         * tests/uniconv/test-u32-conv-from-enc.c: New file.
6465
6466         * modules/uniconv/u16-conv-from-enc: New file.
6467         * lib/uniconv/u16-conv-from-enc.c: New file.
6468         * lib/uniconv/u-conv-from-enc.h: New file.
6469         * modules/uniconv/u16-conv-from-enc-tests: New file.
6470         * tests/uniconv/test-u16-conv-from-enc.c: New file.
6471
6472         * modules/uniconv/u8-conv-from-enc: New file.
6473         * lib/uniconv/u8-conv-from-enc.c: New file.
6474         * modules/uniconv/u8-conv-from-enc-tests: New file.
6475         * tests/uniconv/test-u8-conv-from-enc.c: New file.
6476
6477         * modules/uniconv/base: New file.
6478         * lib/uniconv.h: New file.
6479
6480 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
6481
6482         * doc/gnulib-tool.texi (Initial import): Update to match current
6483         behavior with strdup module.
6484         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
6485         * lib/memmem.h: Remove; all uses removed.  This is now done
6486         by <string.h>.
6487         * lib/mempcpy.h: Likewise.
6488         * lib/memrchr.h: Likewise.
6489         * lib/stpcpy.h: Likewise.
6490         * lib/stpncpy.h: Likewise.
6491         * lib/strcase.h: Likewise.
6492         * lib/strchrnul.h: Likewise.
6493         * lib/strdup.h: Likewise.
6494         * lib/strndup.h: Likewise.
6495         * lib/strnlen.h: Likewise.
6496         * lib/strpbrk.h: Likewise.
6497         * lib/strsep.h: Likewise.
6498         * lib/strstr.h: Likewise.
6499         * lib/strtok_r.h: Likewise.
6500         * lib/string_.h: New file.
6501         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
6502         Rely on <string.h> instead.
6503         * lib/canon-host.c: Likewise.
6504         * lib/chdir-long.c: Likewise.
6505         * lib/concatpath.c: Likewise.
6506         * lib/exclude.c: Likewise.
6507         * lib/fchdir.c: Likewise.
6508         * lib/getaddrinfo.c: Likewise.
6509         * lib/getcwd.c: Likewise.
6510         * lib/getsubopt.c: Likewise.
6511         * lib/glob.c: Likewise.
6512         * lib/hard-locale.c: Likewise.
6513         * lib/iconvme.c: Likewise.
6514         * lib/javacomp.c: Likewise.
6515         * lib/mempcpy.c: Likewise.
6516         * lib/memrchr.c: Likewise.
6517         * lib/regex_internal.h: Likewise.
6518         * lib/stpncpy.c: Likewise.
6519         * lib/strcasecmp.c: Likewise.
6520         * lib/strchrnul.c: Likewise.
6521         * lib/strdup.c: Likewise.
6522         * lib/striconv.c: Likewise.
6523         * lib/striconveh.c: Likewise.
6524         * lib/striconveha.c: Likewise.
6525         * lib/strncasecmp.c: Likewise.
6526         * lib/strndup.c: Likewise.
6527         * lib/strnlen.c: Likewise.
6528         * lib/strsep.c: Likewise.
6529         * lib/strstr.c: Likewise.
6530         * lib/strtok_r.c: Likewise.
6531         * lib/userspec.c: Likewise.
6532         * lib/w32spawn.h: Likewise.
6533         * lib/xstrndup.c: Likewise.
6534         * lib/mountlist.c (strstr): Remove decl.
6535         * m4/string_h.m4: New file.
6536         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
6537         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
6538         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
6539         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
6540         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
6541         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
6542         Set REPLACE_STRCASECMP if necessary.
6543         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
6544         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
6545         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
6546         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
6547         HAVE_DECL_STRDUP if necessary.
6548         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
6549         since gl_FUNC_STRNDUP does that now.
6550         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
6551         Check for decl here...
6552         (gl_PREREQ_STRNLEN): ... not here.
6553         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
6554         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
6555         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
6556         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
6557         necessary.
6558         * modules/string: New file.
6559         * modules/memmem (Files): Remove special-purpose include file.
6560         (Depends-on): Add string.
6561         (Include): Include <string.h>, not the removed file.
6562         * modules/mempcpy: Likewise.
6563         * modules/memrchr: Likewise.
6564         * modules/stpcpy: Likewise.
6565         * modules/stpncpy: Likewise.
6566         * modules/strcase: Likewise.
6567         * modules/strchrnul: Likewise.
6568         * modules/strdup: Likewise.
6569         * modules/strndup: Likewise.
6570         * modules/strnlen: Likewise.
6571         * modules/strpbrk: Likewise.
6572         * modules/strsep: Likewise.
6573         * modules/strstr: Likewise.
6574         * modules/strtok_r: Likewise.
6575         * tests/test-dirname.c: Don't include "strdup.h", since
6576         <string.h> now suffices.
6577         * tests/test-memmem.c: Don't include "memmem.h", since
6578         <string.h> now suffices.
6579
6580 2007-01-25  Bruno Haible  <bruno@clisp.org>
6581
6582         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
6583         *resultp is 0.
6584
6585         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
6586         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
6587         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
6588         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
6589
6590         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
6591         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
6592         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
6593         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
6594         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
6595         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
6596
6597 2007-01-24  Bruno Haible  <bruno@clisp.org>
6598
6599         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
6600         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
6601         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
6602         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
6603         gl_FUNC_FTS_CORE.
6604         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
6605         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
6606         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
6607         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
6608         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
6609         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
6610         gl_FUNC_FCHOWNAT.
6611         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
6612         gl_FUNC_STRFTIME.
6613         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
6614         Reported by Ralf Wildenhues.
6615
6616 2007-01-24  Bruno Haible  <bruno@clisp.org>
6617
6618         Drop AC_REQUIRE calls that are redundant with the module dependencies.
6619         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
6620         gl_GETADDRINFO.
6621         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
6622         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
6623         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
6624
6625 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
6626
6627         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
6628         Don't use 'exit'; just return from 'main'.
6629         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
6630
6631         * lib/fnmatch_.h: Readjust white space and comments to match
6632         glibc, to avoid spurious diffs.
6633
6634 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
6635
6636         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
6637         2004-12-01 change by Jakub Jelinek, since this code won't compile
6638         if !LIBC.  Problem reported by Bob Proulx.
6639
6640 2007-01-23  Bruno Haible  <bruno@clisp.org>
6641
6642         * lib/striconveh.c: Include c-strcaseeq.h.
6643         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
6644         * modules/striconveh (Depends-on): Add c-strcaseeq.
6645
6646 2007-01-23  Bruno Haible  <bruno@clisp.org>
6647
6648         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
6649
6650         * modules/c-strcaseeq: New file.
6651         * lib/c-strcaseeq.h: New file.
6652
6653         * modules/streq: New file.
6654         * lib/streq.h: New file.
6655
6656 2007-01-23  Bruno Haible  <bruno@clisp.org>
6657
6658         * modules/striconveha-tests: New file.
6659         * tests/test-striconveha.c: New file.
6660
6661         * lib/striconveha.h: Include <stdbool.h>.
6662         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
6663         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
6664         (mem_iconveha_notranslit): Renamed from mem_iconveha.
6665         (mem_iconveha): New function.
6666         (str_iconveha_notranslit): Renamed from str_iconveha.
6667         (str_iconveha): New function.
6668         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
6669         c-strcase.
6670
6671 2007-01-23  Bruno Haible  <bruno@clisp.org>
6672
6673         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
6674         encodings without forgiving before trying any encoding with handler.
6675         (str_iconveha): Try all encodings without forgiving before trying any
6676         encoding with handler.
6677
6678 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
6679
6680         Import the following changes from libc.
6681
6682         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
6683
6684         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
6685
6686         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
6687
6688         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
6689         normal_bracket label.
6690
6691         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
6692
6693         [BZ #361]
6694         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
6695         to normal_bracket after fetching the next character.
6696
6697 2007-01-22  Bruno Haible  <bruno@clisp.org>
6698
6699         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
6700         argument.
6701         * lib/striconveh.c (iconv_carefully_1): New function.
6702         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
6703         argument.
6704         (str_cd_iconveh): Update.
6705         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
6706         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
6707         * tests/test-striconveh.c (MAGIC): New macro.
6708         (new_offsets): New function.
6709         (main): Test call with and without offsets.
6710
6711 2007-01-22  Bruno Haible  <bruno@clisp.org>
6712
6713         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
6714         * modules/sys_select (Makefile.am): Likewise.
6715         * modules/sys_socket (Makefile.am): Likewise.
6716         * modules/sys_time (Makefile.am): Likewise.
6717
6718 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
6719
6720         * modules/gettimeofday (License): Change from GPL to LGPL, since
6721         gettimeofday is a library function.
6722
6723 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6724
6725         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
6726
6727 2007-01-21  Bruno Haible  <bruno@clisp.org>
6728
6729         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
6730
6731 2007-01-21  Bruno Haible  <bruno@clisp.org>
6732
6733         * modules/striconveha: New file.
6734         * lib/striconveha.h: New file.
6735         * lib/striconveha.c: New file.
6736         * MODULES.html.sh (Internationalization functions): Add striconveha.
6737         * lib/striconv.c (str_iconv): Optimize the case of an empty input
6738         string.
6739         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
6740
6741 2007-01-21  Bruno Haible  <bruno@clisp.org>
6742
6743         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
6744         * lib/striconveh.c (str_iconveh): Likewise.
6745
6746 2007-01-21  Bruno Haible  <bruno@clisp.org>
6747
6748         * lib/striconveh.h (mem_iconveh): New declaration.
6749         * lib/striconveh.c (mem_iconveh): New function.
6750         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
6751
6752 2007-01-21  Bruno Haible  <bruno@clisp.org>
6753
6754         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
6755
6756         * lib/striconveh.h (mem_cd_iconveh): Change specification.
6757         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
6758         original result buffer.
6759         (str_cd_iconveh): Update.
6760         * tests/test-striconveh.c (main): Update.
6761
6762         * lib/striconv.h (mem_cd_iconv): Change specification.
6763         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
6764         result buffer.
6765         (str_cd_iconv): Update.
6766         * tests/test-striconv.c (main): Update.
6767
6768 2007-01-21  Bruno Haible  <bruno@clisp.org>
6769
6770         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
6771
6772 2007-01-20  Jim Meyering  <jim@meyering.net>
6773
6774         * lib/userspec.c (parse_with_separator): If a user or group string
6775         starts with "+", skip the corresponding name-to-ID look-up, since
6776         such a look-up must fail: user and group names may not include "+".
6777
6778 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
6779
6780         * lib/poll.c: Include sys/time.h and time.h unconditionally,
6781         since we now assume the sys_time module.
6782         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
6783         check for sys/time.h; no longer needed.
6784         * modules/poll (Depends-on): Depend on sys_time.
6785
6786 2007-01-18  Bruno Haible  <bruno@clisp.org>
6787
6788         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
6789         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
6790
6791         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
6792         gettimeofday.
6793
6794         * tests/test-gettimeofday.c: Include <time.h>.
6795         (dummy): Remove variable.
6796
6797         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
6798         gl_HEADER_SYS_TIME_H.
6799         (gl_HEADER_SYS_TIME_H): New macro.
6800
6801         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
6802         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6803         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
6804         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
6805         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6806         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
6807         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
6808         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6809         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
6810         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
6811         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6812
6813         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
6814         last change; it caused a compilation error when cross-compiling to
6815         Cygwin.
6816
6817 2007-01-18  Jim Meyering  <jim@meyering.net>
6818
6819         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
6820         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
6821         than the race-prone "test -d sys || mkdir sys".
6822         (configure.ac): Use AC_PROG_MKDIR_P.
6823         * modules/sys_select: Likewise.
6824         * modules/sys_socket: Likewise.
6825         * modules/sys_time: Likewise.
6826
6827 2007-01-18  Eric Blake  <ebb9@byu.net>
6828
6829         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
6830         replace gettimeofday.
6831         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
6832         name, to avoid infinite recursion.
6833
6834 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
6835
6836         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
6837         module sys_time.
6838         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
6839         assume timespec.h defines struct timeval.
6840         * lib/settime.c: Likewise.
6841         * lib/utimens.c: Likewise.
6842         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
6843         since we now assume the gettimeofday module.
6844         * lib/tempname.c (__gen_tempname): Likewise.
6845         * lib/gettimeofday.h: Remove.
6846         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
6847         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
6848         Include <time.h>, for 'time()'.
6849         (localtime_buffer_addr): Also use this workaround if
6850         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
6851         to simplify the uses.  All uses changed.
6852         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
6853         that #undef is inside {}, and 'const' follows type name consistently.
6854         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
6855         (gettimeofday): Do not use the maximum possible value for
6856         tv->tv_usec, since that might break usages other than ls.c.
6857         Instead, we'll leave ls.c alone.  This undoes today's patch
6858         by Bruno.  Add a compile-time warning for 1s-clock resolution;
6859         we've never observed the problem but might as well keep the
6860         canary.
6861         * lib/nanosleep.c: Include timespec.h first, for interface check.
6862         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
6863         now assume the sys_time module.
6864         * lib/tempname.c: Likewise.
6865         * lib/timespec.h: Likewise.
6866         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
6867         needed.
6868         * lib/strftime.c: Likewise.
6869         * lib/timespec.h: Likewise.
6870         * lib/posixtm.c: Include posixtm.h first, for interface check.
6871         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
6872         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
6873         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
6874         * lib/sys_time_.h: New file.
6875         * lib/timespec.h (struct timespec): Use long int, not long.
6876         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
6877         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
6878         Remove obsolescent call to AC_HEADER_TIME.
6879         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
6880         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
6881         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
6882         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
6883         Likewise.
6884         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
6885         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
6886         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
6887         into the sys_time module.  Check for gettimeofday just once.
6888         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
6889         for gettimeofday signature to just check the signature.  Merely
6890         compile it, since linking doesn't test signature.  Improve test for
6891         whether gettimeofday.o is actually needed.
6892         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
6893         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
6894         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
6895         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6896         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
6897         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
6898         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
6899         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
6900         than worrying about sys/time.h.
6901         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
6902         Don't bother worrying about TIME_WITH_SYS_TIME.
6903         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
6904         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
6905         * m4/sys_time_h.m4: New file.
6906         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
6907         Don't include sys/time.h.  Return from main rather than exiting.
6908         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
6909         all uses changed.
6910         * modules/gethrxtime (Depends-on): Add sys_time.
6911         * modules/gettime (Depends-on): Likewise.
6912         * modules/gettimeofday (Depends-on): Likewise.
6913         * modules/nanosleep (Depends-on): Likewise.
6914         * modules/settime (Depends-on): Likewise.
6915         * modules/tempname (Depends-on): Likewise.
6916         * modules/utimens (Depends-on): Likewise.
6917         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
6918         (Include:) Change back to <sys/time.h>.
6919         (Maintainer:) Add self.
6920         * modules/sys_time: New file.
6921         * modules/tempname (Depends-on): Add gettimeofday.
6922         * tests/test-gettimeofday.c: Include <sys/time.h>
6923         rather than gettimeofday.h.
6924
6925 2007-01-17  Bruno Haible  <bruno@clisp.org>
6926
6927         * gnulib-tool (func_get_license): Revert last patch. Instead, let
6928         the license default to GPL.
6929         (func_create_testdir): Don't complain if a module is LGPL and its
6930         tests module depends on GPLed modules.
6931
6932 2007-01-17  Bruno Haible  <bruno@clisp.org>
6933
6934         * lib/gettimeofday.c (gettimeofday): Add code for the case
6935         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
6936         maximum possible value for tv->tv_usec, rather than the minimum one.
6937
6938 2005-10-08  Martin Lambers  <marlam@marlam.de>
6939 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
6940 2007-01-16  Bruno Haible  <bruno@clisp.org>
6941
6942         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
6943         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
6944         gl_FUNC_GETTIMEOFDAY.
6945         (Include): Add gettimeofday.h.
6946         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
6947         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
6948         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
6949         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
6950         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
6951         * lib/gettimeofday.h: New file.
6952         * lib/gettimeofday.c: Include <sys/timeb.h>.
6953         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
6954         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6955         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
6956         fall back on time().
6957
6958         * tests/test-gettimeofday.c: New file.
6959         * modules/gettimeofday-tests: New file.
6960
6961 2007-01-16  Eric Blake  <ebb9@byu.net>
6962
6963         * modules/fnmatch (Depends-on): Depend on wchar.
6964         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
6965         * m4/fnmatch.m4: Likewise.
6966         * modules/mbchar (Makefile.am): Assume <wchar.h>.
6967         * m4/mbchar.m4: Likewise.
6968         * modules/mbswidth (Depends-on): Depend on wchar.
6969         * lib/mbswidth.c: Assume <wchar.h>.
6970         * m4/mbswidth.m4: Likewise.
6971         * modules/quotearg (Depends-on): Depend on wchar.
6972         * lib/quotearg.c: Assume <wchar.h>.
6973         * m4/quotearg.m4: Likewise.
6974         * modules/regex (Depends-on): Depend on wchar.
6975         * lib/regex_internal.h: Assume <wchar.h>.
6976         * m4/regex.m4: Likewise.
6977         * modules/stdint (Depends-on): Depend on wchar.
6978         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
6979         * m4/stdint.m4: Likewise.
6980         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
6981         * modules/strftime (Depends-on): Depend on wchar.
6982         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
6983         * modules/strtol (Depends-on): Depend on wchar.
6984         * lib/strtol.c: Assume <wchar.h>.
6985         * modules/wcwidth (Depends-on): Depend on wchar.
6986         * lib/wcwidth.h: Assume <wchar.h>.
6987         * m4/wcwidth.m4: Likewise.
6988
6989 2007-01-16  Bruno Haible  <bruno@clisp.org>
6990
6991         * modules/csharpexec-script: New, created from...
6992         * modules/csharpexec: ... this.
6993
6994 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
6995
6996         * modules/javaexec-script: New, created from...
6997         * modules/javaexec: ... this.
6998
6999 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7000
7001         * modules/poll (Dependencies): Add sys_select.
7002
7003 2007-01-15  Jim Meyering  <jim@meyering.net>
7004
7005         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
7006         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
7007         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
7008         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
7009
7010 2007-01-15  Bruno Haible  <bruno@clisp.org>
7011
7012         * modules/striconveh: New file.
7013         * lib/striconveh.h: New file.
7014         * lib/striconveh.c: New file.
7015         * MODULES.html.sh (Internationalization functions): Add striconveh.
7016
7017         * modules/striconveh-tests: New file.
7018         * tests/test-striconveh.c: New file.
7019
7020 2007-01-15  Bruno Haible  <bruno@clisp.org>
7021
7022         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
7023         not from GNU libiconv or GNU libc.
7024
7025 2007-01-15  Bruno Haible  <bruno@clisp.org>
7026
7027         * doc/gnulib-intro.texi (Copyright): Explain the different license
7028         terms for module descriptions, autoconf macros, tests, documentation.
7029
7030 2007-01-14  Bruno Haible  <bruno@clisp.org>
7031
7032         * modules/striconv-tests: New file.
7033         * tests/test-striconv.c: New file.
7034
7035 2007-01-14  Bruno Haible  <bruno@clisp.org>
7036
7037         * modules/iconv-tests: New file.
7038         * tests/test-iconv.c: New file.
7039
7040 2007-01-14  Bruno Haible  <bruno@clisp.org>
7041
7042         * gnulib-tool (func_get_license): For test modules, use the license of
7043         the main module.
7044
7045 2007-01-14  Bruno Haible  <bruno@clisp.org>
7046
7047         * modules/iconv (Include): Clarify that <iconv.h> can only be included
7048         if iconv is found to exist.
7049
7050 2007-01-14  Bruno Haible  <bruno@clisp.org>
7051
7052         * modules/c-ctype-tests: New file.
7053         * tests/test-c-ctype.c: New file.
7054
7055 2007-01-14  Bruno Haible  <bruno@clisp.org>
7056
7057         * modules/binary-io-tests: New file.
7058         * tests/test-binary-io.sh: New file.
7059         * tests/test-binary-io.c: New file.
7060
7061 2007-01-14  Bruno Haible  <bruno@clisp.org>
7062
7063         * modules/array-oset-tests: New file.
7064         * tests/test-array_oset.c: New file.
7065
7066 2007-01-14  Bruno Haible  <bruno@clisp.org>
7067
7068         * modules/array-list-tests: New file.
7069         * tests/test-array_list.c: New file.
7070
7071 2007-01-14  Bruno Haible  <bruno@clisp.org>
7072
7073         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
7074         and make.
7075         Reported by Simon Josefsson in
7076         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
7077
7078 2007-01-14  Bruno Haible  <bruno@clisp.org>
7079
7080         * modules/allocsa-tests: New file.
7081         * tests/test-allocsa.c: New file.
7082
7083 2007-01-14  Bruno Haible  <bruno@clisp.org>
7084
7085         * modules/fchdir (Depends-on): Add absolute-header.
7086         * modules/unistd (Depends-on): Likewise.
7087
7088 2006-12-30  Bruno Haible  <bruno@clisp.org>
7089
7090         * modules/fchdir: New file.
7091         * modules/unistd (Files): Add lib/unistd_.h.
7092         (Makefile.am): Generate unistd.h from unistd_.h.
7093         * lib/fchdir.c: New file.
7094         * lib/dirent_.h: New file.
7095         * lib/unistd_.h: New file.
7096         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
7097         * m4/fchdir.m4: New file.
7098         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
7099         (gl_HEADER_UNISTD): Invoke it.
7100         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
7101         function.
7102         * lib/backupfile.c (opendir, closedir): Undefine.
7103         * lib/chown.c (open, close): Undefine.
7104         * lib/clean-temp.c (open, close): Undefine.
7105         * lib/copy-file.c (open, close): Undefine.
7106         * lib/execute.c (open, close): Undefine.
7107         * lib/fsusage.c (open, close): Undefine.
7108         * lib/gc-gnulib.c (open, close): Undefine.
7109         * lib/getcwd.c (opendir, closedir): Undefine.
7110         * lib/glob.c (opendir, closedir): Undefine.
7111         * lib/javacomp.c (open, close): Undefine.
7112         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
7113         * lib/openat-proc.c (open, close): Undefine.
7114         * lib/pagealign_alloc.c (open, close): Undefine.
7115         * lib/pipe.c (open, close): Undefine.
7116         * lib/progreloc.c (open, close): Undefine.
7117         * lib/savedir.c (opendir, closedir): Undefine.
7118         * lib/utime.c (open, close): Undefine.
7119         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
7120
7121 2007-01-10  Bruno Haible  <bruno@clisp.org>
7122
7123         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
7124
7125 2007-01-12  Eric Blake  <ebb9@byu.net>
7126
7127         Provide a robust <wchar.h>.  Further simplifications are now
7128         possible in other modules, but not included here.
7129         * modules/wchar: New module.
7130         * m4/wchar.m4: New file.
7131         * lib/wchar_.h: Likewise.
7132         * modules/mbchar (Depends-on): Depend on wchar, as the first use
7133         of the new module.
7134         * MODULES.html.sh (Extended multibyte and wide character utilities):
7135         New section.
7136
7137 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
7138
7139         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
7140         to a reasonable default for memory allocation.
7141         (xreadlink): Don't allocate a huge buffer, to work around a buggy
7142         file system that reports garbage st_size values for symlinks.
7143         Problem reported by Liyang Hu.
7144
7145 2007-01-11  Simon Josefsson  <simon@josefsson.org>
7146
7147         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
7148         Emacs .#* auto-save files).
7149
7150 2007-01-11  Bruno Haible  <bruno@clisp.org>
7151
7152         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
7153         directory.
7154
7155 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
7156
7157         Use @...@ consistently in lib/wctype_.h.
7158         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
7159         on it being set to 1 or 0.
7160         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
7161         go back to AC_SUBSTing it.
7162         * modules/wctype (Makefile.am): Undo previous change.
7163
7164 2007-01-10  Eric Blake  <ebb9@byu.net>
7165
7166         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
7167         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
7168         * modules/wctype (Makefile.am): Likewise.
7169         Reported by Chris McGuire.
7170
7171 2007-01-10  Jim Meyering  <jim@meyering.net>
7172
7173         fts.c: a small readability/maintainability improvement
7174         * lib/fts.c (fts_read): Make this code slightly more readable and
7175         maintainable by hoisting the "sp->fts_cur = p" assignments to
7176         immediately follow the statements that set P.  Derived from
7177         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
7178
7179 2007-01-10  Eric Blake  <ebb9@byu.net>
7180
7181         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
7182         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
7183         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
7184         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
7185         Reported by Chris McGuire.
7186
7187 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7188
7189         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
7190         in sed script.
7191
7192 2007-01-09  Bruno Haible  <bruno@clisp.org>
7193
7194         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
7195         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
7196         variables.
7197         (func_module): Use them.
7198
7199 2007-01-09  Bruno Haible  <bruno@clisp.org>
7200
7201         * modules/unistr/base: New file.
7202         * lib/unistr.h: New file.
7203
7204         * modules/unistr/u8-to-u16: New file.
7205         * lib/unistr/u8-to-u16.c: New file.
7206
7207         * modules/unistr/u8-to-u32: New file.
7208         * lib/unistr/u8-to-u32.c: New file.
7209
7210         * modules/unistr/u16-to-u8: New file.
7211         * lib/unistr/u16-to-u8.c: New file.
7212
7213         * modules/unistr/u16-to-u32: New file.
7214         * lib/unistr/u16-to-u32.c: New file.
7215
7216         * modules/unistr/u32-to-u8: New file.
7217         * lib/unistr/u32-to-u8.c: New file.
7218
7219         * modules/unistr/u32-to-u16: New file.
7220         * lib/unistr/u32-to-u16.c: New file.
7221
7222         * modules/unistr/u8-check: New file.
7223         * modules/unistr/u16-check: New file.
7224         * modules/unistr/u32-check: New file.
7225         * lib/unistr/u8-check.c: New file.
7226         * lib/unistr/u16-check.c: New file.
7227         * lib/unistr/u32-check.c: New file.
7228
7229         * modules/unistr/u8-chr: New file.
7230         * modules/unistr/u16-chr: New file.
7231         * modules/unistr/u32-chr: New file.
7232         * lib/unistr/u8-chr.c: New file.
7233         * lib/unistr/u16-chr.c: New file.
7234         * lib/unistr/u32-chr.c: New file.
7235
7236         * modules/unistr/u8-cmp: New file.
7237         * modules/unistr/u16-cmp: New file.
7238         * modules/unistr/u32-cmp: New file.
7239         * lib/unistr/u8-cmp.c: New file.
7240         * lib/unistr/u16-cmp.c: New file.
7241         * lib/unistr/u32-cmp.c: New file.
7242
7243         * modules/unistr/u8-cpy: New file.
7244         * modules/unistr/u16-cpy: New file.
7245         * modules/unistr/u32-cpy: New file.
7246         * lib/unistr/u8-cpy.c: New file.
7247         * lib/unistr/u16-cpy.c: New file.
7248         * lib/unistr/u32-cpy.c: New file.
7249         * lib/unistr/u-cpy.h: New file.
7250
7251         * modules/unistr/u8-cpy-alloc: New file.
7252         * modules/unistr/u16-cpy-alloc: New file.
7253         * modules/unistr/u32-cpy-alloc: New file.
7254         * lib/unistr/u8-cpy-alloc.c: New file.
7255         * lib/unistr/u16-cpy-alloc.c: New file.
7256         * lib/unistr/u32-cpy-alloc.c: New file.
7257         * lib/unistr/u-cpy-alloc.h: New file.
7258
7259         * modules/unistr/u8-endswith: New file.
7260         * modules/unistr/u16-endswith: New file.
7261         * modules/unistr/u32-endswith: New file.
7262         * lib/unistr/u8-endswith.c: New file.
7263         * lib/unistr/u16-endswith.c: New file.
7264         * lib/unistr/u32-endswith.c: New file.
7265         * lib/unistr/u-endswith.h: New file.
7266
7267         * modules/unistr/u8-mblen: New file.
7268         * modules/unistr/u16-mblen: New file.
7269         * modules/unistr/u32-mblen: New file.
7270         * lib/unistr/u8-mblen.c: New file.
7271         * lib/unistr/u16-mblen.c: New file.
7272         * lib/unistr/u32-mblen.c: New file.
7273
7274         * modules/unistr/u8-mbtouc: New file.
7275         * modules/unistr/u16-mbtouc: New file.
7276         * modules/unistr/u32-mbtouc: New file.
7277         * lib/unistr/u8-mbtouc.c: New file.
7278         * lib/unistr/u16-mbtouc.c: New file.
7279         * lib/unistr/u32-mbtouc.c: New file.
7280
7281         * modules/unistr/u8-mbtouc-safe: New file.
7282         * modules/unistr/u16-mbtouc-safe: New file.
7283         * modules/unistr/u32-mbtouc-safe: New file.
7284         * lib/unistr/u8-mbtouc-safe.c: New file.
7285         * lib/unistr/u16-mbtouc-safe.c: New file.
7286         * lib/unistr/u32-mbtouc-safe.c: New file.
7287
7288         * modules/unistr/u8-move: New file.
7289         * modules/unistr/u16-move: New file.
7290         * modules/unistr/u32-move: New file.
7291         * lib/unistr/u8-move.c: New file.
7292         * lib/unistr/u16-move.c: New file.
7293         * lib/unistr/u32-move.c: New file.
7294         * lib/unistr/u-move.h: New file.
7295
7296         * modules/unistr/u8-next: New file.
7297         * modules/unistr/u16-next: New file.
7298         * modules/unistr/u32-next: New file.
7299         * lib/unistr/u8-next.c: New file.
7300         * lib/unistr/u16-next.c: New file.
7301         * lib/unistr/u32-next.c: New file.
7302
7303         * modules/unistr/u8-prev: New file.
7304         * modules/unistr/u16-prev: New file.
7305         * modules/unistr/u32-prev: New file.
7306         * lib/unistr/u8-prev.c: New file.
7307         * lib/unistr/u16-prev.c: New file.
7308         * lib/unistr/u32-prev.c: New file.
7309
7310         * modules/unistr/u8-set: New file.
7311         * modules/unistr/u16-set: New file.
7312         * modules/unistr/u32-set: New file.
7313         * lib/unistr/u8-set.c: New file.
7314         * lib/unistr/u16-set.c: New file.
7315         * lib/unistr/u32-set.c: New file.
7316         * lib/unistr/u-set.h: New file.
7317
7318         * modules/unistr/u8-startswith: New file.
7319         * modules/unistr/u16-startswith: New file.
7320         * modules/unistr/u32-startswith: New file.
7321         * lib/unistr/u8-startswith.c: New file.
7322         * lib/unistr/u16-startswith.c: New file.
7323         * lib/unistr/u32-startswith.c: New file.
7324         * lib/unistr/u-startswith.h: New file.
7325
7326         * modules/unistr/u8-stpcpy: New file.
7327         * modules/unistr/u16-stpcpy: New file.
7328         * modules/unistr/u32-stpcpy: New file.
7329         * lib/unistr/u8-stpcpy.c: New file.
7330         * lib/unistr/u16-stpcpy.c: New file.
7331         * lib/unistr/u32-stpcpy.c: New file.
7332         * lib/unistr/u-stpcpy.h: New file.
7333
7334         * modules/unistr/u8-stpncpy: New file.
7335         * modules/unistr/u16-stpncpy: New file.
7336         * modules/unistr/u32-stpncpy: New file.
7337         * lib/unistr/u8-stpncpy.c: New file.
7338         * lib/unistr/u16-stpncpy.c: New file.
7339         * lib/unistr/u32-stpncpy.c: New file.
7340         * lib/unistr/u-stpncpy.h: New file.
7341
7342         * modules/unistr/u8-strcat: New file.
7343         * modules/unistr/u16-strcat: New file.
7344         * modules/unistr/u32-strcat: New file.
7345         * lib/unistr/u8-strcat.c: New file.
7346         * lib/unistr/u16-strcat.c: New file.
7347         * lib/unistr/u32-strcat.c: New file.
7348         * lib/unistr/u-strcat.h: New file.
7349
7350         * modules/unistr/u8-strchr: New file.
7351         * modules/unistr/u16-strchr: New file.
7352         * modules/unistr/u32-strchr: New file.
7353         * lib/unistr/u8-strchr.c: New file.
7354         * lib/unistr/u16-strchr.c: New file.
7355         * lib/unistr/u32-strchr.c: New file.
7356
7357         * modules/unistr/u8-strcmp: New file.
7358         * modules/unistr/u16-strcmp: New file.
7359         * modules/unistr/u32-strcmp: New file.
7360         * lib/unistr/u8-strcmp.c: New file.
7361         * lib/unistr/u16-strcmp.c: New file.
7362         * lib/unistr/u32-strcmp.c: New file.
7363
7364         * modules/unistr/u8-strcpy: New file.
7365         * modules/unistr/u16-strcpy: New file.
7366         * modules/unistr/u32-strcpy: New file.
7367         * lib/unistr/u8-strcpy.c: New file.
7368         * lib/unistr/u16-strcpy.c: New file.
7369         * lib/unistr/u32-strcpy.c: New file.
7370         * lib/unistr/u-strcpy.h: New file.
7371
7372         * modules/unistr/u8-strcspn: New file.
7373         * modules/unistr/u16-strcspn: New file.
7374         * modules/unistr/u32-strcspn: New file.
7375         * lib/unistr/u8-strcspn.c: New file.
7376         * lib/unistr/u16-strcspn.c: New file.
7377         * lib/unistr/u32-strcspn.c: New file.
7378         * lib/unistr/u-strcspn.h: New file.
7379
7380         * modules/unistr/u8-strdup: New file.
7381         * modules/unistr/u16-strdup: New file.
7382         * modules/unistr/u32-strdup: New file.
7383         * lib/unistr/u8-strdup.c: New file.
7384         * lib/unistr/u16-strdup.c: New file.
7385         * lib/unistr/u32-strdup.c: New file.
7386         * lib/unistr/u-strdup.h: New file.
7387
7388         * modules/unistr/u8-strlen: New file.
7389         * modules/unistr/u16-strlen: New file.
7390         * modules/unistr/u32-strlen: New file.
7391         * lib/unistr/u8-strlen.c: New file.
7392         * lib/unistr/u16-strlen.c: New file.
7393         * lib/unistr/u32-strlen.c: New file.
7394         * lib/unistr/u-strlen.h: New file.
7395
7396         * modules/unistr/u8-strmblen: New file.
7397         * modules/unistr/u16-strmblen: New file.
7398         * modules/unistr/u32-strmblen: New file.
7399         * lib/unistr/u8-strmblen.c: New file.
7400         * lib/unistr/u16-strmblen.c: New file.
7401         * lib/unistr/u32-strmblen.c: New file.
7402
7403         * modules/unistr/u8-strmbtouc: New file.
7404         * modules/unistr/u16-strmbtouc: New file.
7405         * modules/unistr/u32-strmbtouc: New file.
7406         * lib/unistr/u8-strmbtouc.c: New file.
7407         * lib/unistr/u16-strmbtouc.c: New file.
7408         * lib/unistr/u32-strmbtouc.c: New file.
7409
7410         * modules/unistr/u8-strncat: New file.
7411         * modules/unistr/u16-strncat: New file.
7412         * modules/unistr/u32-strncat: New file.
7413         * lib/unistr/u8-strncat.c: New file.
7414         * lib/unistr/u16-strncat.c: New file.
7415         * lib/unistr/u32-strncat.c: New file.
7416         * lib/unistr/u-strncat.h: New file.
7417
7418         * modules/unistr/u8-strncmp: New file.
7419         * modules/unistr/u16-strncmp: New file.
7420         * modules/unistr/u32-strncmp: New file.
7421         * lib/unistr/u8-strncmp.c: New file.
7422         * lib/unistr/u16-strncmp.c: New file.
7423         * lib/unistr/u32-strncmp.c: New file.
7424
7425         * modules/unistr/u8-strncpy: New file.
7426         * modules/unistr/u16-strncpy: New file.
7427         * modules/unistr/u32-strncpy: New file.
7428         * lib/unistr/u8-strncpy.c: New file.
7429         * lib/unistr/u16-strncpy.c: New file.
7430         * lib/unistr/u32-strncpy.c: New file.
7431         * lib/unistr/u-strncpy.h: New file.
7432
7433         * modules/unistr/u8-strnlen: New file.
7434         * modules/unistr/u16-strnlen: New file.
7435         * modules/unistr/u32-strnlen: New file.
7436         * lib/unistr/u8-strnlen.c: New file.
7437         * lib/unistr/u16-strnlen.c: New file.
7438         * lib/unistr/u32-strnlen.c: New file.
7439         * lib/unistr/u-strnlen.h: New file.
7440
7441         * modules/unistr/u8-strpbrk: New file.
7442         * modules/unistr/u16-strpbrk: New file.
7443         * modules/unistr/u32-strpbrk: New file.
7444         * lib/unistr/u8-strpbrk.c: New file.
7445         * lib/unistr/u16-strpbrk.c: New file.
7446         * lib/unistr/u32-strpbrk.c: New file.
7447         * lib/unistr/u-strpbrk.h: New file.
7448
7449         * modules/unistr/u8-strrchr: New file.
7450         * modules/unistr/u16-strrchr: New file.
7451         * modules/unistr/u32-strrchr: New file.
7452         * lib/unistr/u8-strrchr.c: New file.
7453         * lib/unistr/u16-strrchr.c: New file.
7454         * lib/unistr/u32-strrchr.c: New file.
7455
7456         * modules/unistr/u8-strspn: New file.
7457         * modules/unistr/u16-strspn: New file.
7458         * modules/unistr/u32-strspn: New file.
7459         * lib/unistr/u8-strspn.c: New file.
7460         * lib/unistr/u16-strspn.c: New file.
7461         * lib/unistr/u32-strspn.c: New file.
7462         * lib/unistr/u-strspn.h: New file.
7463
7464         * modules/unistr/u8-strstr: New file.
7465         * modules/unistr/u16-strstr: New file.
7466         * modules/unistr/u32-strstr: New file.
7467         * lib/unistr/u8-strstr.c: New file.
7468         * lib/unistr/u16-strstr.c: New file.
7469         * lib/unistr/u32-strstr.c: New file.
7470         * lib/unistr/u-strstr.h: New file.
7471
7472         * modules/unistr/u8-strtok: New file.
7473         * modules/unistr/u16-strtok: New file.
7474         * modules/unistr/u32-strtok: New file.
7475         * lib/unistr/u8-strtok.c: New file.
7476         * lib/unistr/u16-strtok.c: New file.
7477         * lib/unistr/u32-strtok.c: New file.
7478         * lib/unistr/u-strtok.h: New file.
7479
7480         * modules/unistr/u8-uctomb: New file.
7481         * modules/unistr/u16-uctomb: New file.
7482         * modules/unistr/u32-uctomb: New file.
7483         * lib/unistr/u8-uctomb.c: New file.
7484         * lib/unistr/u16-uctomb.c: New file.
7485         * lib/unistr/u32-uctomb.c: New file.
7486
7487         * MODULES.html.sh (Unicode string functions): Add the new modules.
7488
7489 2007-01-08  Bruno Haible  <bruno@clisp.org>
7490
7491         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
7492         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
7493         subdirectories.
7494
7495 2007-01-08  Karl Berry  <karl@gnu.org>
7496
7497         * doc/error.texi: mention that main() fns must set program_name
7498         when progname is used.
7499
7500 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
7501
7502         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
7503         WCTYPE_H is empty, for the benefit of builds from non-distclean
7504         directories.  Problem reported by Eric Blake in
7505         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
7506
7507 2007-01-08  Bruno Haible  <bruno@clisp.org>
7508
7509         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
7510         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
7511         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
7512         PROVIDE_CANONICALIZE_FILENAME_MODE.
7513         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
7514
7515 2007-01-08  Bruno Haible  <bruno@clisp.org>
7516
7517         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
7518         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
7519         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
7520         * lib/fts.c: Likewise.
7521         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
7522
7523 2006-12-25  Bruno Haible  <bruno@clisp.org>
7524
7525         * modules/utf8-ucs4-safe: New file.
7526         * lib/utf8-ucs4-safe.h: New file.
7527         * lib/unistr/utf8-ucs4-safe.c: New file.
7528
7529         * modules/utf16-ucs4-safe: New file.
7530         * lib/utf16-ucs4-safe.h: New file.
7531         * lib/unistr/utf16-ucs4-safe.c: New file.
7532
7533         * MODULES.html.sh (Unicode string functions): Add the new modules.
7534
7535 2007-01-08  Bruno Haible  <bruno@clisp.org>
7536
7537         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
7538         (Depends-on): Add unitypes.
7539         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
7540         (u8_mbtouc_aux): Move out to separate file.
7541         (u8_mbtouc): Use ucs4_t, uint8_t types.
7542         * lib/unistr/utf8-ucs4.c: New file.
7543
7544         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
7545         (Depends-on): Add unitypes.
7546         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
7547         (u16_mbtouc_aux): Move out to separate file.
7548         (u16_mbtouc): Use ucs4_t, uint16_t types.
7549         * lib/unistr/utf16-ucs4.c: New file.
7550
7551         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
7552         (Depends-on): Add unitypes.
7553         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
7554         (u8_uctomb_aux): Move out to separate file.
7555         (u8_uctomb): Use ucs4_t, uint8_t types.
7556         * lib/unistr/ucs4-utf8.c: New file.
7557
7558         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
7559         (Depends-on): Add unitypes.
7560         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
7561         (u16_uctomb_aux): Move out to separate file.
7562         (u16_uctomb): Use ucs4_t, uint16_t types.
7563         * lib/unistr/ucs4-utf16.c: New file.
7564
7565 2006-12-25  Bruno Haible  <bruno@clisp.org>
7566
7567         * modules/unitypes: New file.
7568         * lib/unitypes.h: New file.
7569         * MODULES.html.sh (func_all_modules): New section "Unicode string
7570         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
7571         this section. Add unitypes.
7572
7573 2007-01-08  Bruno Haible  <bruno@clisp.org>
7574
7575         Avoid variable names that conflict with those from libtool.
7576         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
7577         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
7578         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
7579         library_names_spec to acl_library_names_spec, hardcode_* to
7580         acl_hardcode_*.
7581         Reported by Ralf Wildenhues.
7582
7583 2007-01-08  Bruno Haible  <bruno@clisp.org>
7584
7585         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
7586         definition.
7587         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
7588         definition.
7589         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
7590         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
7591         definition.
7592         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
7593         definition.
7594         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
7595         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
7596         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
7597         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
7598         definition.
7599         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
7600         definition.
7601         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
7602         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
7603         GC_USE_<algorithm>.
7604         * lib/gc-libgcrypt.c: Likewise.
7605         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
7606         * modules/gc-arctwo (configure.ac): Likewise.
7607         * modules/gc-des (configure.ac): Likewise.
7608         * modules/gc-hmac-md5 (configure.ac): Likewise.
7609         * modules/gc-hmac-sha1 (configure.ac): Likewise.
7610         * modules/gc-md2 (configure.ac): Likewise.
7611         * modules/gc-md4 (configure.ac): Likewise.
7612         * modules/gc-md5 (configure.ac): Likewise.
7613         * modules/gc-random (configure.ac): Likewise.
7614         * modules/gc-rijndael (configure.ac): Likewise.
7615         * modules/gc-sha1 (configure.ac): Likewise.
7616
7617 2007-01-08  Bruno Haible  <bruno@clisp.org>
7618
7619         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
7620         macro definition.
7621         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
7622         definition.
7623         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
7624         definition.
7625         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
7626         * modules/fcntl-safer (configure.ac): Likewise.
7627         * modules/fopen-safer (configure.ac): Likewise.
7628         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
7629         GNULIB_FWRITEERROR macro definition.
7630
7631 2007-01-08  Bruno Haible  <bruno@clisp.org>
7632
7633         * m4/gnulib-common.m4: New file.
7634         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
7635         (func_get_filelist): Add m4/gnulib-common.m4.
7636
7637 2007-01-08  Bruno Haible  <bruno@clisp.org>
7638
7639         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
7640         command.
7641
7642 2007-01-08  Jim Meyering  <jim@meyering.net>
7643
7644         Use a more robust test for a "can't happen" condition.
7645         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
7646         narrowed the st_size value.  Presuming the "can't happen" condition
7647         is true, that narrowing could conceivably convert an invalid st_size
7648         value into a valid one.  Instead, use a change based on Matthew
7649         Woehlke's original patch.
7650
7651         Slight readability improvement: use an assert-like macro
7652         in place of literal "abort ()" uses.
7653         * lib/fts.c (fts_assert): Define.
7654         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
7655         Use this macro instead of a bare 'abort'.
7656
7657 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
7658
7659         Don't worry about using IRIX 5.3's wctype.h broken definitions;
7660         simply work around them.
7661         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
7662         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
7663         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before
7664         declaring.
7665         Don't bother to define as macros, since the standard doesn't require it.
7666         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
7667         longer worry about IRIX 5.3.
7668         (HAVE_WCTYPE_CTMP_BUG): Remove.
7669
7670 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
7671
7672         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
7673         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
7674         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
7675         Problems reported by Georg Schwarz for IRIX 5.3.
7676
7677         * gnulib-tool (autoconf_minversion): Take the maximum version number
7678         found, not the minimum.  Problem reported by James Youngman.
7679
7680 2007-01-03  Karl Berry  <karl@gnu.org>
7681
7682         * doc/error.texi: new file, explaining interaction with progname.
7683         * doc/gnulib.texi: include it.  Update copyright.
7684
7685 2007-01-03  Simon Josefsson  <simon@josefsson.org>
7686
7687         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
7688         AC_CANONICAL_HOST, to improve autobuild outputs.
7689
7690 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
7691             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
7692
7693         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
7694         sockets, server sockets, and other file descriptors.  Count errors
7695         to compute the return value.  Reorder the code a bit to be easier
7696         to follow.  Don't set event bits that were not requested (except
7697         POLLERR and POLLHUP).
7698
7699 2007-01-01  Bruno Haible  <bruno@clisp.org>
7700
7701         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
7702
7703 2007-01-03  Jim Meyering  <jim@meyering.net>
7704
7705         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
7706
7707 2007-01-02  Bruno Haible  <bruno@clisp.org>
7708
7709         * modules/settime (Include): Require timespec.h.
7710         * modules/nanosleep (Include): Likewise.
7711
7712 2007-01-01  Bruno Haible  <bruno@clisp.org>
7713
7714         * gnulib-tool (func_emit_copyright_notice): Bump year.
7715         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
7716
7717 2007-01-01  Bruno Haible  <bruno@clisp.org>
7718
7719         Improve support for OpenBSD.
7720         * build-aux/config.rpath (libname_spec): Export.
7721         (library_names_spec): New variable. Export.
7722         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
7723         library_names_spec from the config.rpath output. Locate shared library
7724         through the name pattern in library_names_spec.
7725
7726 2007-01-01  Eric Blake  <ebb9@byu.net>
7727
7728         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
7729
7730 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
7731
7732         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
7733         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
7734         assume the C locale, and avoid an "eval" that could cause trouble.
7735         Problem with SORT reported by Bob Proulx.
7736
7737         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
7738         Define.  Trivial patch from Henning Nielsen Lund, originally
7739         sent to bug-grep@gnu.org today.
7740
7741 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
7742
7743         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
7744         struct stat.  Problem reported by Henning Nielsen Lund.
7745         * lib/acl.c: Include acl.h first, to check interface.  Don't
7746         bother to include sys/types.h and sys/stat.h again.
7747
7748 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
7749
7750         Import the following change from libc; problem reported by
7751         Sven Verdoolaege.
7752
7753         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
7754
7755         [BZ #1373]
7756         * lib/argp.h: Remove __NTH for __argp_usage inline function.
7757
7758 2006-12-28  Jim Meyering  <jim@meyering.net>
7759
7760         * build-aux/announce-gen: Do not assume that the package
7761         builds any of tar.gz, tar.bz2, and .xdelta files.
7762         Suggestion from Simon Josefsson.
7763
7764 2006-12-28  Simon Josefsson  <simon@josefsson.org>
7765
7766         * modules/announce-gen: New file.
7767
7768 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
7769
7770         * lib/mbchar.h: Just include <wctype.h>; the wctype module
7771         handles its gotchas now.
7772         * lib/mbswidth.c: Likewise.
7773         * lib/wcwidth.h: Likewise.
7774         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
7775         and iswcntrl; the wctype module does this stuff now.
7776         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
7777         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
7778         * modules/mbchar (Depends-on): Add wctype.
7779         * modules/mbswidth (Depends-on): Likewise.
7780         * modules/wcwidth (Depends-on): Likewise.
7781
7782 2006-12-27  Eric Blake  <ebb9@byu.net>
7783
7784         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
7785         module uses more than what <wctype.h> is required to provide.
7786
7787 2006-12-26  Eric Blake  <ebb9@byu.net>
7788
7789         * gnulib-tool (sed_extract_prog): Avoid space-tab.
7790
7791 2006-12-26  Eric Blake  <ebb9@byu.net>
7792
7793         * modules/absolute-header: New module.
7794         * modules/fcntl (Depends-on): Depend on it.
7795         * modules/inttypes (Depends-on): Likewise.
7796         * modules/stdint (Depends-on): Likewise.
7797         * modules/sys_stat (Depends-on): Likewise.
7798         * modules/wctype (Depends-on): Likewise.
7799         * MODULES.html.sh (Support for building libraries and
7800         executables): Document it.
7801
7802 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
7803
7804         * gnulib-tool (SED): Remove, undoing previous change.
7805         The problem was that it broke coreutils on Solaris, because
7806         "sed --posix" leaked into a makefile.
7807         (sed): New alias, if 'alias' and GNU sed.
7808
7809 2006-12-24  Jim Meyering  <jim@meyering.net>
7810
7811         Work around an fchownat bug in glibc-2.4:
7812         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
7813         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
7814         in spite of the -P option.
7815         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
7816         New macros.
7817         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
7818         * modules/openat (Files): Add lib/fchownat.c.
7819         * lib/openat.c (fchownat): Don't define here.  Move to...
7820         * lib/fchownat.c: ...this new file.
7821
7822 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
7823
7824         Fix bug reported by Bruno Haible in
7825         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
7826         where quotearg.c didn't compile on Mac OS X 10.2 because it
7827         lacks <wchar.h> and wint_t.
7828         * lib/wctype_.h (__wctype_wint_t): New type.
7829         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
7830         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
7831         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
7832         Arg is now of type __wctype_wint_t, not wint_t.
7833         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
7834         substitute HAVE_WINT_T.
7835         * modules/wctype (Files): Add m4/wint_t.m4.
7836         (wctype.h): Substitute HAVE_WINT_T.
7837
7838 2006-12-23  Bruno Haible  <bruno@clisp.org>
7839
7840         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
7841
7842 2006-12-23  Bruno Haible  <bruno@clisp.org>
7843
7844         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
7845         S_ISLNK.
7846         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
7847         mingw.
7848
7849 2006-12-22  Bruno Haible  <bruno@clisp.org>
7850
7851         * lib/copy-file.c: Include acl.h.
7852         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
7853         Close the file descriptors only after being done with copy_acl.
7854         * modules/copy-file (Depends-on): Add acl.
7855
7856 2006-12-22  Bruno Haible  <bruno@clisp.org>
7857
7858         * gnulib-tool (SED): New variable.
7859         Use $SED instead of sed everywhere.
7860
7861 2006-12-22  Bruno Haible  <bruno@clisp.org>
7862
7863         * modules/no-c++: New file.
7864         * m4/no-c++.m4: New file.
7865         * MODULES.html.sh (Support for building libraries and executables):
7866         Add no-c++.
7867
7868 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
7869
7870         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
7871         Include <limits.h>, and use its INT_MAX to rewrite the
7872         j loop so that it does not overflow 'int'.  Problem reported by
7873         Ralf Wildenhues in
7874         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
7875         Play it safe by shifting left by 1 rather than multiplying by 2,
7876         as GCC is less likely to optimize this away when the value
7877         is signed (when it assumes overflow leads to undefined behavior).
7878         Also, don't assume time_t uses two's complement.
7879
7880 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
7881
7882         * MODULES.html.sh: New module wctype.
7883         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
7884         * lib/fnmatch.c: Don't bother to include <wchar.h> before
7885         <wctype.h>, since the new wctype module should fix this.
7886         * lib/quotearg.c: Include <wctype.h> unconditionally, since
7887         the wctype module should arrange for it.
7888         * lib/regex_internal.h: Likewise.
7889         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
7890         since the wctype module should handle this now.
7891         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
7892         * modules/fnmatch (Depends-on): Add wctype.
7893         * modules/quotearg (Depends-on): Likewise.
7894         * modules/regex (Depends-on): Likewise.
7895
7896 2006-12-19  Bruno Haible  <bruno@clisp.org>
7897
7898         * lib/strdup.h [C++]: Wrap definitions in extern "C".
7899         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
7900
7901 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7902
7903         * modules/savewd (Depends-on): Fix dependency on fcntl.
7904
7905 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
7906
7907         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
7908         conforms to C99, rather than relying on the user's environment
7909         setting of STDINT_H.
7910
7911 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
7912         and Eric Blake  <ebb9@byu.net>
7913
7914         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
7915         This is more consistent with the other defines here.
7916         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
7917         Port to z/OS.  Problem reported by Paul Gilmartin.
7918         Change local vars to use gl_ prefix rather than ac_.
7919         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
7920         with other defines.
7921         * modules/double-slash-root: New module.
7922         * modules/dirname (Files): Remove m4/double-slash-root.m4.
7923         (Depends-on): Add double-slash-root.
7924         * MODULES.html.sh (File system functions): Mention new module.
7925
7926 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
7927
7928         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
7929         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
7930         This is for the benefit of gzip, which doesn't do i18n.
7931
7932 2006-12-12  Jim Meyering  <jim@meyering.net>
7933
7934         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
7935         Reported by Andreas Schwab <schwab@suse.de>.
7936
7937 2006-12-12  Bruno Haible  <bruno@clisp.org>
7938
7939         Merge these changes.
7940         2006-09-05  Bruno Haible  <bruno@clisp.org>
7941         * lib/iconvme.c (iconv_string): No need to save and restore errno when
7942         iconv_alloc succeeded.
7943         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
7944         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
7945         test for " && dest " at the end - dest is always != NULL there. Call
7946         iconv with 4xNULL arguments initially, to reset the state. Call iconv
7947         with 2xNULL arguments, also to flush the state storage. Handle the
7948         IRIX iconv behaviour. Realloc the final result, to throw away unused
7949         memory.
7950
7951 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
7952
7953         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
7954         and fchmodat unconditionally, since glibc 2.4 has them.
7955         Problem reported by Arkadiusz Miskiewicz.
7956
7957 2006-12-10  Bruno Haible  <bruno@clisp.org>
7958
7959         * gnulib-tool (func_import): Show the include files only for those
7960         modules that are copied and specified.
7961         Reported by Karl Berry.
7962
7963 2006-12-08  Jim Meyering  <jim@meyering.net>
7964
7965         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
7966         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
7967
7968         * build-aux/announce-gen: Add two new options, both optional:
7969         --bootstrap-tools=TOOL_LIST
7970               a comma-separated list of tools, e.g.,
7971               autoconf,automake,bison,gnulib
7972         --gnulib-snapshot-date=DATE
7973               if gnulib is in the bootstrap tool list,
7974               then report this as the snapshot date.
7975               If not specified, use the current date/time.
7976               If you specify a date here, be sure it's UTC.
7977
7978 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7979
7980         * tests/test-argp-2.sh: Fix test to match actual output.
7981         (func_compare): Fix sed script to be portable.
7982
7983 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
7984
7985         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
7986         workaround for this case.  It is not autoconfigured now; offhand
7987         it's hard to see how to autoconfigure it.
7988
7989 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
7990
7991         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
7992         a directory that is about to be chowned.  Such a directory's
7993         initial file permissions should permit the owner only and this
7994         should not be changed until after the chown, since the group and
7995         other bits would be incorrect if they granted permission before
7996         the chown.
7997
7998         Fix porting problem for iswctype reported by Georg Schwarz in:
7999         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
8000         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
8001         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
8002         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
8003         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
8004
8005 2006-12-03  Jim Meyering  <jim@meyering.net>
8006
8007         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
8008         p->fts_statp may not yet be defined.
8009         (fts_read): Instead, set it in the caller, once p->fts_statp is
8010         sure to be defined, and corresponds to a top-level directory.
8011         This bug made du -x fail.  Here's the coreutils test case:
8012         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
8013         Reported by Mike Frysinger.
8014
8015 2006-12-01  Jim Meyering  <jim@meyering.net>
8016
8017         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
8018         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
8019         Reported by Simon Josefsson.
8020
8021 2006-11-30  Jim Meyering  <jim@meyering.net>
8022
8023         * m4/warning.m4: Use the all-permissive copyright notice
8024         recommended by RMS (rather than LGPL).
8025         * m4/vararrays.m4: Likewise.
8026         * m4/flexmember.m4: Likewise.
8027
8028 2006-11-29  Bruno Haible  <bruno@clisp.org>
8029
8030         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
8031         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
8032         using +=.
8033         Reported by Simon Josefsson <simon@josefsson.org>.
8034
8035 2006-11-28  James Youngman <jay@gnu.org>
8036
8037         * README: Advise users that they might find the bug-gnulib@gnu.org
8038         and autotools-announce@gnu.org mailing lists useful.
8039
8040 2006-11-28  Bruno Haible  <bruno@clisp.org>
8041
8042         * m4/ptrdiff_max.m4: Remove file.
8043
8044 2006-11-21  Bruno Haible  <bruno@clisp.org>
8045
8046         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
8047         _AC_COMPUTE_INT.
8048         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
8049         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
8050         _AC_COMPUTE_INT.
8051         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
8052         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
8053         _AC_COMPUTE_INT.
8054         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
8055
8056 2006-11-28  Jim Meyering  <jim@meyering.net>
8057
8058         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
8059         warning from "gcc -Wshadow" about shadowing the builtin.
8060
8061 2006-11-27  Bruno Haible  <bruno@clisp.org>
8062
8063         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
8064         _AC_COMPUTE_INT.
8065         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
8066
8067 2006-11-27  Bruno Haible  <bruno@clisp.org>
8068             Paul Eggert  <eggert@cs.ucla.edu>
8069
8070         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
8071
8072 2006-11-26  Bruno Haible  <bruno@clisp.org>
8073
8074         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
8075         noinst_LTLIBRARIES.
8076
8077 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
8078             Bruno Haible  <bruno@clisp.org>
8079
8080         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
8081         if compiling with "gcc -ansi".
8082
8083 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
8084
8085         Fix some incompatibilities with gcc -ansi -pedantic.
8086         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
8087         if compiling pedantically with GCC, unless it's C99 or later.
8088         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
8089         it mishandles gcc -ansi -pedantic as well.
8090         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
8091         if gcc -pedantic.
8092         * lib/regexec.c (check_node_accept_bytes): Don't use auto
8093         initializers for struct if -pedantic, unless it's C99 or later.
8094
8095 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
8096
8097         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
8098         Don't close an fd more than once. Identical atimes indicate
8099         success, not failure.
8100
8101 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
8102
8103         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
8104
8105 2006-11-23  Jim Meyering  <jim@meyering.net>
8106
8107         * build-aux/announce-gen: New file.  From coreutils.
8108
8109 2006-11-22  Jim Meyering  <jim@meyering.net>
8110
8111         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
8112         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
8113         (fts_read): Use a temporary to narrow the overused st_size member
8114         before using it in a switch statement.  Reported by Matthew Woehlke.
8115
8116         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
8117         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
8118
8119 2006-11-20  Bruno Haible  <bruno@clisp.org>
8120
8121         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
8122         changequote instead of pairs of brackets.
8123         Reported by Andreas Schwab <schwab@suse.de>.
8124
8125 2006-11-21  Jim Meyering  <jim@meyering.net>
8126
8127         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
8128         so as to remain compatible with older compilers.
8129         Patch from Michael Deutschmann.
8130
8131 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
8132
8133         * MODULES.html.sh (File system functions): Add openat.
8134
8135         * lib/openat.h (rpl_fstatat): New macro, if
8136         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
8137         (fstatat): Define to rpl_fstatat under the same conditions,
8138         unless COMPILING_FSTATAT.
8139         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
8140         seems to have the bug.
8141         * lib/fstatat.c: New file.
8142         * modules/openat (Files): Add it.
8143
8144 2006-11-20  Bruno Haible  <bruno@clisp.org>
8145
8146         * Makefile: New file.
8147
8148 2006-11-20  Jim Meyering  <jim@meyering.net>
8149
8150         The beginnings of syntax-related checks for gnulib.
8151         * lib/Makefile: New file.
8152         * lib/t-idcache: New script.  Ensure that the two halves of
8153         idcache.c stay in sync.
8154
8155         * lib/idcache.c: Adjust comments in user- and group- portions to
8156         be more accurate, and to be consistent with one another.
8157
8158 2006-11-20  Jim Meyering  <jim@meyering.net>
8159
8160         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
8161         continue using the flexible array member (thus, this module performs
8162         half as many malloc calls), with the addition that...
8163         (getgroup, getuser): Consistently record a non-match via an empty
8164         "name" string, and map an empty string match to a NULL return value.
8165         * modules/idcache (Depends-on): Re-add flexmember.
8166
8167         * lib/idcache.c (getuser): Remove all uses of the register keyword.
8168         (getuidbyname, getgroup, getgidbyname): Likewise.
8169
8170         Use cleaner syntax: NULL rather than 0.
8171         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
8172
8173 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
8174
8175         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
8176         It mishandled the case where the group was missing.
8177         Problem reported by Greg Schafer.
8178         * modules/idcache: Likewise.
8179
8180 2006-11-18  Jim Meyering  <jim@meyering.net>
8181
8182         * check-module (%exempt_header): Add exception for some
8183         conditionally-included headers.
8184
8185         * modules/i-ring (Depends-on): Add verify.
8186         (License): Change to LGPL.
8187
8188 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
8189
8190         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
8191         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
8192         and inttostr.h.  Use snprintf rather than uinttostr, so that
8193         LGPLed code doesn't depend on GPLed.
8194
8195 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
8196
8197         * modules/inline (License): Change from GPL to LGPL.
8198
8199 2006-11-17  Jim Meyering  <jim@meyering.net>
8200
8201         * modules/d-type (License): Switch to LGPL.
8202
8203 2006-11-15  Bruno Haible  <bruno@clisp.org>
8204
8205         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
8206
8207 2006-11-15  Eric Blake  <ebb9@byu.net>
8208
8209         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
8210         the module dependency.
8211
8212 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8213             Bruno Haible  <bruno@clisp.org>
8214
8215         * gnulib-tool (func_create_testdir): Add license consistency check.
8216
8217 2006-11-15  Eric Blake  <ebb9@byu.net>
8218
8219         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
8220         random "(cached)" in configure output.
8221
8222 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8223
8224         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
8225         test for conforming inttypes.h is both announced and cached.
8226
8227         * MODULES.html.sh (seen_modules, seen_files): New variables.
8228         (func_module): Rewrite to use a few less gnulib-tool and sed
8229         invocations.  Avoid a couple of quadratic algorithms for ...
8230         (missed_modules, missed_files): ... these, with ...
8231         (func_append, func_tmpdir): ... these new functions, from
8232         gnulib-tool.  Analogously, install traps for cleanup.
8233
8234         * tests/test-gc.c (main): Remove unused variables.
8235         * tests/test-read-file.c: Include stdlib.h, for 'free'.
8236
8237 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
8238
8239         * modules/inttostr (License): Change to LGPL.
8240
8241 2006-11-14  Eric Blake  <ebb9@byu.net>
8242
8243         * modules/tempname (License): Change to LGPL.
8244
8245 2006-11-14  Eric Blake  <ebb9@byu.net>
8246
8247         * doc/functions.texi (Function Portability): *printf functions on
8248         Cygwin now understand all POSIX size specifiers.
8249
8250 2006-11-14  Bruno Haible  <bruno@clisp.org>
8251
8252         * modules/c-ctype (License): Change to LGPL.
8253
8254 2006-11-12  Bruno Haible  <bruno@clisp.org>
8255
8256         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
8257         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
8258         for GNOME libraries, for which the include files are installed in
8259         subdirectories of $prefix/include.
8260
8261 2006-11-12  Bruno Haible  <bruno@clisp.org>
8262
8263         * m4/lib-link.m4: Require at least autoconf-2.54.
8264         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
8265         name to underscores for the --with option.
8266
8267 2006-11-13  Bruno Haible  <bruno@clisp.org>
8268
8269         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
8270         the tests directory.
8271         Reported by Ralf Wildenhues.
8272
8273 2006-11-13  Bruno Haible  <bruno@clisp.org>
8274
8275         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
8276         (func_emit_initmacro_end): Undo the override here.
8277         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
8278         Works around the famous automake error in coreutils.
8279
8280 2006-11-13  Eric Blake  <ebb9@byu.net>
8281
8282         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
8283         element, not its node.
8284
8285 2006-11-12  Bruno Haible  <bruno@clisp.org>
8286
8287         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
8288         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
8289
8290 2006-11-12  Bruno Haible  <bruno@clisp.org>
8291
8292         * gnulib-tool: New option --local-symlink.
8293         (func_usage): Document it.
8294         (lsymbolic): New variable.
8295         (func_import, func_create_testdir): If --symlink was not specified,
8296         test whether --local-symlink was specified and the file comes from
8297         the local_gnulib_dir.
8298
8299 2006-11-12  Bruno Haible  <bruno@clisp.org>
8300
8301         * gnulib-tool (func_ln): New function.
8302         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
8303
8304 2006-11-12  Bruno Haible  <bruno@clisp.org>
8305
8306         Finish support for source files in subdirectories.
8307         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
8308         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
8309         AUTOMAKE_OPTIONS.
8310         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
8311
8312 2006-11-12  Bruno Haible  <bruno@clisp.org>
8313
8314         * gnulib-tool (func_get_automake_snippet): Synthesize also an
8315         EXTRA_lib_SOURCES augmentation.
8316         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
8317
8318 2006-11-12  Jim Meyering  <jim@meyering.net>
8319
8320         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
8321         file descriptors.  This also averts a failure on systems with
8322         native openat support when a traversed directory lacks "x" access.
8323         * lib/fts_.h: Include "i-ring.h"
8324         (struct FTS) [fts_fd_ring]: New member.
8325         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
8326         (FCHDIR): Add parentheses.
8327         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
8328         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
8329         When descending, rather than simply closing the previous
8330         fts_cwd_fd value, push that file descriptor onto the ring.
8331         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
8332         (fts_open): Initialize the new fd_ring member.
8333         (fts_close): Clear the ring.
8334         (fts_safe_changedir): When possible, use our new fd_ring to skip
8335         the diropen and fstat and dev/ino comparison that would normally
8336         accompany a virtual `chdir ("..")'.
8337
8338         * modules/fts (Depends-on): Add i-ring.
8339         * modules/i-ring: New module.
8340         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
8341         * m4/i-ring.m4: New file.
8342
8343 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8344
8345         * gnulib-tool (func_create_testdir): Fix replacement of
8346         `build-aux' in configure.ac.  Run autotools in gltests
8347         subdirectory.
8348         (func_create_testdir, func_create_megatestdir, test): There is
8349         no need for '--force' in most autotool invocations in a new
8350         tree.  Actually fail the whole test if any of the tools, or the
8351         configure or make stages fail.
8352
8353         Sync from Automake.
8354         * build-aux/gnupload: Revert last change.  Add pointer to upload
8355         instructions of the GNU Maintenance Instructions.
8356         Suggestion by Karl Berry.
8357
8358 2006-11-10  Jim Meyering  <jim@meyering.net>
8359
8360         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
8361
8362 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
8363
8364         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
8365         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
8366         (bind_textdomain_codeset) [! ENABLE_NLS]:
8367         Evaluate all the arguments.  That way, callers get compatible behavior
8368         if the arguments have side effects.  Also, it avoids some GCC
8369         diagnostics in some cases; Joel E. Denny reported problems when Bison
8370         was configured with --enable-gcc-warnigs.
8371
8372 2006-11-10  Jim Meyering  <jim@meyering.net>
8373
8374         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
8375         relevant options in CFLAGS (like -O, -fno-inline) are taken into
8376         account.
8377
8378 2006-11-10  Jim Meyering  <jim@meyering.net>
8379
8380         * modules/inline: New file/module.
8381         * modules/xalloc (Files): Remove m4/inline.m4.
8382         (Depends-on): Add inline, instead.
8383         * modules/oset: Likewise.
8384         * modules/list: Likewise.
8385
8386 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
8387
8388         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
8389         Problem reported by Matthew Woehlke.
8390
8391 2006-11-09  Bruno Haible  <bruno@clisp.org>
8392
8393         * lib/tempname.c (gen_tempname): Remove variant that invokes
8394         __gen_tempname.
8395         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
8396         __gen_tempname.
8397
8398 2006-11-08  Bruno Haible  <bruno@clisp.org>
8399
8400         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
8401         to 'yes' instead of 'cross-compiling'.
8402
8403 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
8404
8405         * lib/quotearg.h (quotearg_free): New decl.
8406         * lib/quotearg.c (quotearg_free): New function.
8407         (slot0, nslots, slotvec0, slotvec):
8408         Now file-scope so that quotearg_free can get at them.
8409
8410 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8411
8412         Sync from Automake.
8413         * build-aux/gnupload: Add missing 'gnu' to example URL.
8414         Report by Karl Berry.
8415
8416 2006-11-08  Bruno Haible  <bruno@clisp.org>
8417
8418         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
8419         Suggested by Paul Eggert.
8420
8421 2006-11-08  Jim Meyering  <jim@meyering.net>
8422
8423         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
8424         It's already included if !_LIBC.
8425         (fts_safe_changedir): Add a comment.
8426
8427 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
8428
8429         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
8430         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
8431         Matthew Woehlke.
8432
8433         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
8434         definitions up, to avoid colliding with change below.
8435         (static_inline) [HAVE_INLINE]: New macro.
8436         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
8437         Provide extern decls when !HAVE_INLINE.  Do not define unless
8438         static_inline is defined, either by us or by xmalloc.c.  Use
8439         static_inline rather than static inline.
8440         (XCALLOC): Optimize sizeof(T) = 1 case.
8441         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
8442
8443 2006-11-07  Bruno Haible  <bruno@clisp.org>
8444
8445         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
8446         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
8447         AC_C_INLINE.
8448         * modules/xalloc (Files): Add m4/inline.m4.
8449
8450 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8451
8452         * README: Fix typo.
8453         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
8454         (Miscellanous Notes): ...from this.
8455
8456 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
8457
8458         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
8459         Mention that offsetof should be used instead of sizeof.
8460         From Bruno Haible.
8461
8462 2006-11-07  Bruno Haible  <bruno@clisp.org>
8463
8464         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
8465
8466 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
8467
8468         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
8469         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
8470         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
8471         (gl_tree_add_before, gl_tree_add_after):
8472         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
8473         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
8474         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
8475         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
8476         (gl_linked_add_after, gl_linked_add_at): Likewise.
8477         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
8478         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
8479         (gl_tree_add_before, gl_tree_add_after): Likewise.
8480         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
8481         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
8482         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
8483
8484 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8485
8486         * lib/gl_oset.h: Use C comment style, not C++ comment style.
8487
8488 2006-11-06  Bruno Haible  <bruno@clisp.org>
8489
8490         * m4/inline.m4: New file.
8491         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
8492         * modules/list (Files): Add m4/inline.m4.
8493         * modules/oset (Files): Likewise.
8494
8495 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
8496
8497         * lib/idcache.c: Include <stddef.h>, for offsetof.
8498         (struct userid.name): Change from char * to a flexible array member.
8499         All uses changed.
8500         * modules/idcache (Depends-on): Add flexmember.
8501
8502         * MODULES.html.sh (Core language properties): New module flexmember.
8503         * modules/flexmember, m4/flexmember.m4: New files.
8504
8505         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
8506         inline functions that are identical with the old xnmalloc_inline,
8507         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
8508         that we can avoid some unnecessary integer multiplications and
8509         divisions in the common case where the element size is known at
8510         compile time.
8511         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
8512         needed.
8513         (xnboundedmalloc): Remove.
8514         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
8515         arguments, for consistency with rest of this header.
8516         (xcharalloc): Rewrite using XNMALLOC.
8517         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
8518         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
8519         versions have been moved to lib/xalloc.h and renamed to be the
8520         non-*_inline versions.
8521         (xmalloc, xrealloc): Implement without reference to the xnmalloc
8522         and xnrealloc functions, since those functions are now inline and
8523         now call us.
8524         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
8525         renaming described above.
8526         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
8527         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
8528         captures the dependency in AC_C_INLINE.
8529
8530         New module canonicalize-lgpl, proposed by Charles Wilson in
8531         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
8532         with a few small changes afterwards.
8533         * MODULES.html.sh (File system functions): New module
8534         canonicalize-lgpl.
8535         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
8536         and canonicalize_file_name.
8537         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
8538         * modules/canonicalize-lgpl: New files.
8539
8540 2006-11-05  Bruno Haible  <bruno@clisp.org>
8541
8542         * gnulib-tool (func_import, func_create_testdir): Create directories
8543         also for files in subdirectories of lib/.
8544
8545 2006-11-05  Bruno Haible  <bruno@clisp.org>
8546
8547         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
8548         ANSI C compliant.
8549
8550 2006-11-03  Bruno Haible  <bruno@clisp.org>
8551
8552         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
8553         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
8554         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
8555         (xnboundedmalloc): New inline function.
8556         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
8557         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
8558         xmalloc.
8559         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
8560         xmalloc.
8561         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
8562         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
8563         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
8564         xmalloc.
8565         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
8566         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
8567         xmalloc.
8568         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
8569         gl_tree_add_after): Use XMALLOC instead of xmalloc.
8570         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
8571         xmalloc.
8572         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
8573         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
8574         gl_tree_add_after): Use XMALLOC instead of xmalloc.
8575         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
8576         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
8577         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
8578         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
8579
8580 2006-11-03  Bruno Haible  <bruno@clisp.org>
8581
8582         * lib/c-ctype.h [C++]: Define functions without name mangling.
8583         * lib/fwriteerror.h [C++]: Likewise.
8584         * lib/gcd.h [C++]: Likewise.
8585         * lib/linebreak.h [C++]: Likewise.
8586
8587 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
8588
8589         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
8590         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
8591         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
8592         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
8593         Check for functions and headers just once.
8594         Check for declaration of canonicalize_file_name.
8595         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
8596
8597 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
8598
8599         * gnulib-tool (func_import): Fix typo in actioncmd.
8600
8601 2006-11-02  Bruno Haible  <bruno@clisp.org>
8602
8603         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
8604         newline sequence in the Makefile.am snippet as a space, like "make"
8605         does.
8606         Reported by Roger Persson <perrog@gmail.com>.
8607
8608 2006-11-01  Bruno Haible  <bruno@clisp.org>
8609
8610         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
8611         already declared in <string.h>.
8612         * lib/strcase.h (strncasecmp): Don't declare it if yes.
8613
8614 2006-11-01  Bruno Haible  <bruno@clisp.org>
8615
8616         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
8617         * lib/strcase.h: Include <string.h>.
8618         (strcasecmp): Define to rpl_strcasecmp here.
8619
8620 2006-11-01  Bruno Haible  <bruno@clisp.org>
8621
8622         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
8623
8624 2006-11-01  Eric Blake  <ebb9@byu.net>
8625
8626         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
8627
8628         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
8629
8630 2006-10-29  Bruno Haible  <bruno@clisp.org>
8631
8632         Make it compile in C++ mode.
8633         * lib/full-write.c (full_rw): Add a cast.
8634
8635 2006-11-01  Bruno Haible  <bruno@clisp.org>
8636
8637         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
8638         be POSIX compliant.
8639         Reported by Roger Persson <perrog@gmail.com>.
8640
8641 2006-11-01  Eric Blake  <ebb9@byu.net>
8642
8643         * lib/getopt_.h: Fix comments.
8644
8645 2006-10-31  Eric Blake  <ebb9@byu.net>
8646
8647         * modules/tmpdir (Depends-on): Add sys_stat.
8648         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
8649         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
8650         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
8651         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
8652         tempname.
8653
8654 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
8655
8656         Avoid some C++ diagnostics reported by Bruno Haible.
8657         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
8658         xmalloc.
8659         (quotearg_alloc): Use xcharalloc rather than xmalloc.
8660         (struct slotvec): Move to top level.
8661         (quotearg_n_options): Rewrite to avoid xmalloc.
8662         * lib/xalloc.h (xcharalloc): New function.
8663         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
8664         [defined __cplusplus]: Add function template that provides result
8665         type propagation.  This part of the change is from Bruno Haible.
8666
8667 2006-10-29  Bruno Haible  <bruno@clisp.org>
8668
8669         Make it compile in C++ mode.
8670         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
8671         * lib/strnlen1.c (strnlen1): Cast memchr result.
8672         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
8673         * lib/clean-temp.c (string_equals, string_hash): Add casts.
8674         (create_temp_dir): Rename local variable 'template'.
8675         (compile_csharp_using_sscli): Add cast.
8676         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
8677         * lib/findprog.c (find_in_path): Likewise.
8678         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
8679         * lib/wait-process.c (register_slave_subprocess): Likewise.
8680
8681 2006-10-22  Bruno Haible  <bruno@clisp.org>
8682
8683         * modules/tsearch: New file.
8684         * lib/tsearch.h: New file.
8685         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
8686         * m4/tsearch.m4: New file.
8687         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
8688
8689 2006-10-29  Eric Blake  <ebb9@byu.net>
8690
8691         * lib/arcfour.c: Assume config.h.
8692         * lib/arctwo.c: Likewise.
8693         * lib/base64.c: Likewise.
8694         * lib/check-version.c: Likewise.
8695         * lib/crc.c: Likewise.
8696         * lib/des.c: Likewise.
8697         * lib/gc-gnulib.c: Likewise.
8698         * lib/gc-libgcrypt.c: Likewise.
8699         * lib/gc-pbkdf2-sha1.c: Likewise.
8700         * lib/getaddrinfo.c: Likewise.
8701         * lib/getdelim.c: Likewise.
8702         * lib/getline.c: Likewise.
8703         * lib/hmac-md5.c: Likewise.
8704         * lib/hmac-sha1.c: Likewise.
8705         * lib/iconvme.c: Likewise.
8706         * lib/md2.c: Likewise.
8707         * lib/md4.c: Likewise.
8708         * lib/memxor.c: Likewise.
8709         * lib/read-file.c: Likewise.
8710         * lib/readline.c: Likewise.
8711         * lib/rijndael-alg-fst.c: Likewise.
8712         * lib/rijndael-api-fst.c: Likewise.
8713         * lib/xgetdomainname.c: Likewise.
8714
8715 2006-10-28  Eric Blake  <ebb9@byu.net>
8716
8717         * lib/xstrndup.c: Assume config.h.
8718
8719 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
8720
8721         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
8722         stat-macros.h is now for our own macros, whereas stat_h is for
8723         macros in the <sys/stat.h> name space.
8724         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
8725         (STAT_MACROS_H): Remove.
8726         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
8727         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
8728         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
8729         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
8730         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
8731         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
8732         Move these macros to ...
8733         * lib/stat_.h: here.  Don't include stat-macros.h.
8734         * lib/canonicalize.c: Don't include stat-macros.h.
8735         * lib/chown.c: Likewise.
8736         * lib/euidaccess.c: Likewise.
8737         * lib/file-type.c: Likewise.
8738         * lib/filemode.c: Likewise.
8739         * lib/glob.c: Likewise.
8740         * lib/isapipe.c: Likewise.
8741         * lib/lchown.c: Likewise.
8742         * lib/lstat.c: Likewise.
8743         * lib/mkdir-p.c: Likewise.
8744         * lib/rmdir.c: Likewise.
8745         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
8746         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
8747         unless mkdir isn't declared, to speed up 'configure'.
8748         Always create sys/stat.h, since it's unlikely any real sys/stat.h
8749         would define all the S_* symbols.
8750         * modules/canonicalize (Depends-on):
8751         Depend on sys_stat, not stat-macros.
8752         * modules/chown: Likewise.
8753         * modules/euidaccess: Likewise.
8754         * modules/filemode: Likewise.
8755         * modules/file-type: Likewise.
8756         * modules/glob: Likewise.
8757         * modules/isapipe: Likewise.
8758         * modules/lchown: Likewise.
8759         * modules/lstat: Likewise.
8760         * modules/mkancesdirs: Likewise.
8761         * modules/rmdir: Likewise.
8762         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
8763         * modules/modechange: Likewise.
8764         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
8765         (configure.ac): Remove gl_STAT_MACROS.
8766         * modules/sys_stat (Depends-on): Remove stat-macros.
8767
8768 2006-10-27  Bruno Haible  <bruno@clisp.org>
8769
8770         * m4/signed.m4: Remove file.
8771         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
8772         invocation.
8773         * modules/vasnprintf (Files): Remove m4/signed.m4.
8774
8775 2006-10-27  Bruno Haible  <bruno@clisp.org>
8776
8777         Update to GNU gettext 0.16.
8778         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
8779         m4/inttypes-h.m4, m4/signed.m4.
8780         * m4/gettext.m4: Update to GNU gettext 0.16.
8781         * m4/intl.m4: New file, from GNU gettext.
8782         * m4/intldir.m4: New file, from GNU gettext.
8783         * config/srclist.txt: Update
8784
8785 2006-10-27  Eric Blake  <ebb9@byu.net>
8786
8787         * MODULES.html.sh: Document tempname.
8788         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
8789         dependencies.
8790         (Files): Move lib/tempname.c...
8791         * modules/tempname: ...to this new module.
8792         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
8793         (gl_PREREQ_TEMPNAME): Move...
8794         * m4/tempname.m4: ...to this new file.
8795         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
8796         * modules/sys_stat (Depends-on): Add stat-macros.
8797         * lib/stat_.h (includes): Pick up stat macros.
8798         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
8799         if stat macros are broken.
8800         * lib/tempname.c (includes): No need to include "stat-macros.h".
8801         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
8802         (direxists, __path_search) [!_LIBC]: Don't compile these in
8803         gnulib; the tmpdir module covers that.
8804         * lib/tempname.h: New file.
8805
8806 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
8807
8808         * COPYING: Explain how gnulib-tool converts licence headers.
8809         Almost all wording by Eric Blake.
8810
8811 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
8812
8813         * lib/mbchar.h (is_basic_table): Make read-only.
8814         * lib/mbchar.c (is_basic_table): Likewise.
8815         Reported by John Darrington.
8816
8817 2006-10-25  Bruno Haible  <bruno@clisp.org>
8818
8819         * lib/progname.h (set_program_name): Undefine before defining.
8820
8821 2006-10-25  Bruno Haible  <bruno@clisp.org>
8822
8823         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
8824         false for non-gcc C++ compilers.
8825         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
8826
8827 2006-10-24  Bruno Haible  <bruno@clisp.org>
8828
8829         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
8830         iconv implementations like Irix iconv.
8831
8832 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
8833
8834         * modules/vararrays: New file.
8835         * m4/vararrays.m4: New file, taken from diffutils.
8836         * MODULES.html.sh: New module vararrays.
8837
8838 2006-10-24  Karl Berry  <karl@gnu.org>
8839
8840         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
8841         Don't call GNU Unix.
8842
8843 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8844
8845         * users.txt: Add Libtool.
8846
8847         Sync from Libtool:
8848
8849         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
8850
8851         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
8852         to gnulib's policy of including config.h unconditionally.
8853
8854 2006-10-24  Bruno Haible  <bruno@clisp.org>
8855
8856         * modules/wcwidth (Files): Add m4/wint_t.m4.
8857         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
8858         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
8859
8860 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
8861
8862         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
8863         to pacify GCC with some -W flags enabled.  Problem reported by
8864         Bruno Haible.
8865
8866 2006-10-24  Jim Meyering  <jim@meyering.net>
8867
8868         * MODULES.html.sh: Remove uinttostr.  It's not a module.
8869         Reported by Karl Berry.
8870
8871 2006-10-23  Bruno Haible  <bruno@clisp.org>
8872
8873         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
8874
8875 2006-10-24  Bruno Haible  <bruno@clisp.org>
8876
8877         * lib/gl_list.h: Use C comment style, not C++ comment style.
8878
8879 2006-10-23  Eric Blake  <ebb9@byu.net>
8880
8881         * lib/getaddrinfo.c (includes): Add missing include.
8882
8883 2006-10-23  Bruno Haible  <bruno@clisp.org>
8884             Paul Eggert  <eggert@cs.ucla.edu>
8885
8886         Ability to rename obstack_free.
8887         * lib/obstack.h (__obstack_free): New macro. Declare instead of
8888         obstack_free.
8889         (obstack_free): Invoke the __obstack_free macro.
8890         * lib/obstack.c (obstack_free): Use __obstack_free macro.
8891
8892 2006-10-23  Bruno Haible  <bruno@clisp.org>
8893             Paul Eggert  <eggert@cs.ucla.edu>
8894
8895         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
8896         __argc, __argv from the declaration. (They are defined as macros on
8897         mingw.)
8898
8899 2006-10-22  Bruno Haible  <bruno@clisp.org>
8900
8901         * doc/gnulib-intro.texi: New file.
8902         * doc/gnulib.texi: Include it.
8903
8904 2006-10-21  Bruno Haible  <bruno@clisp.org>
8905
8906         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
8907         "Introduction", "Miscellanous Notes", "Particular Modules".
8908
8909 2006-10-21  Bruno Haible  <bruno@clisp.org>
8910
8911         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
8912         Change mostlyclean-local rule to avoid sh syntax error from bash
8913         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
8914
8915 2006-10-23  Jim Meyering  <jim@meyering.net>
8916
8917         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
8918         in place of snprintf.
8919
8920         * modules/inttostr (Files): Add lib/uinttostr.c.
8921         * lib/uinttostr.c (inttostr): New file/function.
8922         * lib/inttostr.h (uinttostr): Declare.
8923         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
8924         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
8925         Add uinttostr.
8926         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
8927
8928 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
8929
8930         * lib/canonicalize.c (ELOOP): Define if not already defined.
8931         Problem reported by Bruno Haible in
8932         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
8933
8934 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
8935
8936         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
8937         Problem reported by Perry Smith and Ville Laurikari.
8938
8939         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
8940         uses.
8941
8942 2006-10-19  Bruno Haible  <bruno@clisp.org>
8943
8944         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
8945         for mingw.
8946
8947 2006-10-19  Bruno Haible  <bruno@clisp.org>
8948
8949         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
8950         Needed for mingw.
8951
8952 2006-10-19  Bruno Haible  <bruno@clisp.org>
8953
8954         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
8955
8956 2006-10-19  Bruno Haible  <bruno@clisp.org>
8957
8958         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
8959         it.
8960
8961 2006-10-19  Bruno Haible  <bruno@clisp.org>
8962
8963         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
8964         invocation.
8965
8966 2006-10-19  Bruno Haible  <bruno@clisp.org>
8967
8968         * gnulib-tool (func_create_testdir): Don't include ftruncate and
8969         mountlist by default.
8970
8971 2006-10-16  Bruno Haible  <bruno@clisp.org>
8972
8973         * lib/c-strstr.c: Include c-strstr.h.
8974
8975 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
8976
8977         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
8978         in a slash.
8979
8980 2006-10-18  Bruno Haible  <bruno@clisp.org>
8981
8982         * lib/lock.h [C++]: Wrap definitions in extern "C".
8983
8984 2006-10-18  Bruno Haible  <bruno@clisp.org>
8985
8986         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
8987         gl_LIBOBJS list.
8988
8989 2006-10-18  Bruno Haible  <bruno@clisp.org>
8990
8991         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
8992
8993 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
8994
8995         * lib/xstrtol.h: Include gettext.h.
8996         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
8997         Problem reported by Eric Blake.
8998         * modules/xstrtol (Depends-on): Add gettext-h.
8999
9000 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
9001
9002         * lib/strftime.c (advance): New macro.
9003         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
9004         incomplete type, so you can't add 0 to it.  Problem and patch
9005         reported by Eelco Dolstra for dietlibc.
9006
9007 2006-10-18  Jim Meyering  <jim@meyering.net>
9008
9009         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
9010         type for a local, and rename it: s/up/user_proc/.
9011
9012 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
9013
9014         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
9015         READ_UTMP_USER_PROCESS.
9016         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
9017
9018 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
9019
9020         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
9021         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
9022
9023 2006-10-17  Eric Blake  <ebb9@byu.net>
9024
9025         * lib/sigprocmask.c (sigprocmask): Fix typo.
9026
9027         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
9028
9029         * modules/clean-temp (Makefile.am): Don't add to make output...
9030         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
9031         config.h.
9032
9033 2006-10-17  Bruno Haible  <bruno@clisp.org>
9034
9035         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
9036         differently if DEFAULT_TEXT_DOMAIN is set.
9037
9038 2006-10-16  Bruno Haible  <bruno@clisp.org>
9039
9040         * lib/clean-temp.c: Include fwriteerror.h.
9041
9042 2006-10-16  Bruno Haible  <bruno@clisp.org>
9043
9044         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
9045
9046 2006-10-16  Bruno Haible  <bruno@clisp.org>
9047
9048         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
9049         * lib/sigprocmask.h: Include <sys/types.h>.
9050         (sigset_t): Use the system's definition if present.
9051
9052 2006-10-17  Eric Blake  <ebb9@byu.net>
9053
9054         * lib/xvasprintf.c (includes): Assume config.h.
9055         * lib/xasprintf.c (includes): Likewise.
9056
9057 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
9058
9059         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
9060         at least as wide as intmax_t.
9061
9062 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
9063
9064         (Imported from Automake.)
9065         * build-aux/gnupload: Update to version 1.1 of directive file.
9066
9067 2006-10-16  Eric Blake  <ebb9@byu.net>
9068
9069         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
9070         match Automake 1.10a.
9071
9072 2006-10-14  Bruno Haible  <bruno@clisp.org>
9073
9074         * modules/sigprocmask: New file.
9075         * lib/sigprocmask.h: New file.
9076         * lib/sigprocmask.c: New file.
9077         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
9078         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
9079         request sigprocmask.o.
9080         (gl_PREREQ_SIGPROCMASK): New macro.
9081         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
9082         (Depends-on): Add sigprocmask.
9083         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
9084         gt_SIGNALBLOCKING. Test for 'raise' only once.
9085         * lib/fatal-signal.c: Include sigprocmask.h.
9086         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
9087         unblock_fatal_signals): Define always.
9088         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
9089         sigprocmask.
9090
9091 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
9092
9093         Sync from Automake.
9094         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
9095         which incorrectly sets the mode of an existing destination
9096         directory.  In some cases the unpatched install-sh could do the
9097         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
9098         system.  We hope this is rare in practice, but it's clearly worth
9099         fixing.  Problem reported by Alex Unleashed in
9100         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
9101         Also, don't bother to check for -m bugs unless we're using -m;
9102         suggested by Stepan Kasal.
9103
9104 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9105
9106         Sync from Automake.
9107         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
9108         `-c' flag, so they appear at the same position as in %FASTDEP%
9109         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
9110         which ignores unknown options only after the first non-option.
9111         Bug report against M4 by Nelson H. F. Beebe.
9112
9113 2006-10-13  Jim Meyering  <jim@meyering.net>
9114
9115         Fix a bug in yesterday's change.
9116         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
9117         p->fts_statp->st_dev would be used uninitialized.
9118         Ensures that we always call fts_stat on the very first entry.
9119         Miklos Szeredi reported that find -xdev stopped working.
9120
9121 2006-10-12  Bruno Haible  <bruno@clisp.org>
9122
9123         * gnulib-tool (func_get_automake_snippet): Append an automatically
9124         computed EXTRA_DIST augmentation.
9125         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
9126         * modules/alloca-opt (Makefile.am): Likewise.
9127         * modules/allocsa (Makefile.am): Likewise.
9128         * modules/arcfour (Makefile.am): Likewise.
9129         * modules/arctwo (Makefile.am): Likewise.
9130         * modules/argmatch (Makefile.am): Likewise.
9131         * modules/argz (Makefile.am): Likewise.
9132         * modules/atexit (Makefile.am): Likewise.
9133         * modules/backupfile (Makefile.am): Likewise.
9134         * modules/byteswap (Makefile.am): Likewise.
9135         * modules/c-strtod (Makefile.am): Likewise.
9136         * modules/c-strtold (Makefile.am): Likewise.
9137         * modules/calloc (Makefile.am): Likewise.
9138         * modules/canon-host (Makefile.am): Likewise.
9139         * modules/canonicalize (Makefile.am): Likewise.
9140         * modules/chdir-long (Makefile.am): Likewise.
9141         * modules/chdir-safer (Makefile.am): Likewise.
9142         * modules/check-version (Makefile.am): Likewise.
9143         * modules/chown (Makefile.am): Likewise.
9144         * modules/cloexec (Makefile.am): Likewise.
9145         * modules/close-stream (Makefile.am): Likewise.
9146         * modules/closeout (Makefile.am): Likewise.
9147         * modules/crc (Makefile.am): Likewise.
9148         * modules/csharpexec (Makefile.am): Likewise.
9149         * modules/cycle-check (Makefile.am): Likewise.
9150         * modules/des (Makefile.am): Likewise.
9151         * modules/dev-ino (Makefile.am): Likewise.
9152         * modules/dirfd (Makefile.am): Likewise.
9153         * modules/dirname (Makefile.am): Likewise.
9154         * modules/dup2 (Makefile.am): Likewise.
9155         * modules/eealloc (Makefile.am): Likewise.
9156         * modules/error (Makefile.am): Likewise.
9157         * modules/euidaccess (Makefile.am): Likewise.
9158         * modules/exclude (Makefile.am): Likewise.
9159         * modules/exitfail (Makefile.am): Likewise.
9160         * modules/fcntl-safer (Makefile.am): Likewise.
9161         * modules/fcntl (Makefile.am): Likewise.
9162         * modules/file-type (Makefile.am): Likewise.
9163         * modules/fileblocks (Makefile.am): Likewise.
9164         * modules/filemode (Makefile.am): Likewise.
9165         * modules/filenamecat (Makefile.am): Likewise.
9166         * modules/fnmatch (Makefile.am): Likewise.
9167         * modules/fopen-safer (Makefile.am): Likewise.
9168         * modules/fpending (Makefile.am): Likewise.
9169         * modules/fprintftime (Makefile.am): Likewise.
9170         * modules/free (Makefile.am): Likewise.
9171         * modules/fsusage (Makefile.am): Likewise.
9172         * modules/ftruncate (Makefile.am): Likewise.
9173         * modules/fts (Makefile.am): Likewise.
9174         * modules/gc-arcfour (Makefile.am): Likewise.
9175         * modules/gc-des (Makefile.am): Likewise.
9176         * modules/gc-hmac-md5 (Makefile.am): Likewise.
9177         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
9178         * modules/gc-md4 (Makefile.am): Likewise.
9179         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
9180         * modules/gc-sha1 (Makefile.am): Likewise.
9181         * modules/gc (Makefile.am): Likewise.
9182         * modules/getaddrinfo (Makefile.am): Likewise.
9183         * modules/getcwd (Makefile.am): Likewise.
9184         * modules/getdelim (Makefile.am): Likewise.
9185         * modules/getdomainname (Makefile.am): Likewise.
9186         * modules/getgroups (Makefile.am): Likewise.
9187         * modules/gethostname (Makefile.am): Likewise.
9188         * modules/gethrxtime (Makefile.am): Likewise.
9189         * modules/getline (Makefile.am): Likewise.
9190         * modules/getloadavg (Makefile.am): Likewise.
9191         * modules/getlogin_r (Makefile.am): Likewise.
9192         * modules/getndelim2 (Makefile.am): Likewise.
9193         * modules/getopt (Makefile.am): Likewise.
9194         * modules/getpagesize (Makefile.am): Likewise.
9195         * modules/getpass-gnu (Makefile.am): Likewise.
9196         * modules/getpass (Makefile.am): Likewise.
9197         * modules/getsubopt (Makefile.am): Likewise.
9198         * modules/gettime (Makefile.am): Likewise.
9199         * modules/gettimeofday (Makefile.am): Likewise.
9200         * modules/getugroups (Makefile.am): Likewise.
9201         * modules/getusershell (Makefile.am): Likewise.
9202         * modules/glob (Makefile.am): Likewise.
9203         * modules/group-member (Makefile.am): Likewise.
9204         * modules/hard-locale (Makefile.am): Likewise.
9205         * modules/hash (Makefile.am): Likewise.
9206         * modules/hmac-md5 (Makefile.am): Likewise.
9207         * modules/hmac-sha1 (Makefile.am): Likewise.
9208         * modules/human (Makefile.am): Likewise.
9209         * modules/idcache (Makefile.am): Likewise.
9210         * modules/imaxabs (Makefile.am): Likewise.
9211         * modules/imaxdiv (Makefile.am): Likewise.
9212         * modules/inet_ntop (Makefile.am): Likewise.
9213         * modules/inet_pton (Makefile.am): Likewise.
9214         * modules/intprops (Makefile.am): Likewise.
9215         * modules/inttostr (Makefile.am): Likewise.
9216         * modules/inttypes (Makefile.am): Likewise.
9217         * modules/isapipe (Makefile.am): Likewise.
9218         * modules/javaversion (Makefile.am): Likewise.
9219         * modules/lchmod (Makefile.am): Likewise.
9220         * modules/lchown (Makefile.am): Likewise.
9221         * modules/localcharset (Makefile.am): Likewise.
9222         * modules/long-options (Makefile.am): Likewise.
9223         * modules/lstat (Makefile.am): Likewise.
9224         * modules/malloc (Makefile.am): Likewise.
9225         * modules/mathl (Makefile.am): Likewise.
9226         * modules/mbchar (Makefile.am): Likewise.
9227         * modules/md2 (Makefile.am): Likewise.
9228         * modules/md4 (Makefile.am): Likewise.
9229         * modules/md5 (Makefile.am): Likewise.
9230         * modules/memcasecmp (Makefile.am): Likewise.
9231         * modules/memchr (Makefile.am): Likewise.
9232         * modules/memcmp (Makefile.am): Likewise.
9233         * modules/memcoll (Makefile.am): Likewise.
9234         * modules/memcpy (Makefile.am): Likewise.
9235         * modules/memmem (Makefile.am): Likewise.
9236         * modules/memmove (Makefile.am): Likewise.
9237         * modules/mempcpy (Makefile.am): Likewise.
9238         * modules/memrchr (Makefile.am): Likewise.
9239         * modules/memset (Makefile.am): Likewise.
9240         * modules/memxor (Makefile.am): Likewise.
9241         * modules/mkancesdirs (Makefile.am): Likewise.
9242         * modules/mkdir-p (Makefile.am): Likewise.
9243         * modules/mkdir (Makefile.am): Likewise.
9244         * modules/mkdtemp (Makefile.am): Likewise.
9245         * modules/mkstemp (Makefile.am): Likewise.
9246         * modules/mktime (Makefile.am): Likewise.
9247         * modules/modechange (Makefile.am): Likewise.
9248         * modules/mountlist (Makefile.am): Likewise.
9249         * modules/nanosleep (Makefile.am): Likewise.
9250         * modules/obstack (Makefile.am): Likewise.
9251         * modules/openat (Makefile.am): Likewise.
9252         * modules/pagealign_alloc (Makefile.am): Likewise.
9253         * modules/pathmax (Makefile.am): Likewise.
9254         * modules/physmem (Makefile.am): Likewise.
9255         * modules/poll (Makefile.am): Likewise.
9256         * modules/posixtm (Makefile.am): Likewise.
9257         * modules/posixver (Makefile.am): Likewise.
9258         * modules/putenv (Makefile.am): Likewise.
9259         * modules/quote (Makefile.am): Likewise.
9260         * modules/quotearg (Makefile.am): Likewise.
9261         * modules/raise (Makefile.am): Likewise.
9262         * modules/read-file (Makefile.am): Likewise.
9263         * modules/readline (Makefile.am): Likewise.
9264         * modules/readlink (Makefile.am): Likewise.
9265         * modules/readtokens (Makefile.am): Likewise.
9266         * modules/readutmp (Makefile.am): Likewise.
9267         * modules/realloc (Makefile.am): Likewise.
9268         * modules/regex (Makefile.am): Likewise.
9269         * modules/rename-dest-slash (Makefile.am): Likewise.
9270         * modules/rename (Makefile.am): Likewise.
9271         * modules/rijndael (Makefile.am): Likewise.
9272         * modules/rmdir (Makefile.am): Likewise.
9273         * modules/rpmatch (Makefile.am): Likewise.
9274         * modules/safe-read (Makefile.am): Likewise.
9275         * modules/safe-write (Makefile.am): Likewise.
9276         * modules/same-inode (Makefile.am): Likewise.
9277         * modules/same (Makefile.am): Likewise.
9278         * modules/save-cwd (Makefile.am): Likewise.
9279         * modules/savedir (Makefile.am): Likewise.
9280         * modules/setenv (Makefile.am): Likewise.
9281         * modules/settime (Makefile.am): Likewise.
9282         * modules/sha1 (Makefile.am): Likewise.
9283         * modules/sig2str (Makefile.am): Likewise.
9284         * modules/snprintf (Makefile.am): Likewise.
9285         * modules/stat-macros (Makefile.am): Likewise.
9286         * modules/stat-time (Makefile.am): Likewise.
9287         * modules/stdbool (Makefile.am): Likewise.
9288         * modules/stdint (Makefile.am): Likewise.
9289         * modules/stdlib-safer (Makefile.am): Likewise.
9290         * modules/stpcpy (Makefile.am): Likewise.
9291         * modules/stpncpy (Makefile.am): Likewise.
9292         * modules/strcase (Makefile.am): Likewise.
9293         * modules/strcasestr (Makefile.am): Likewise.
9294         * modules/strchrnul (Makefile.am): Likewise.
9295         * modules/strcspn (Makefile.am): Likewise.
9296         * modules/strdup (Makefile.am): Likewise.
9297         * modules/strerror (Makefile.am): Likewise.
9298         * modules/strftime (Makefile.am): Likewise.
9299         * modules/strndup (Makefile.am): Likewise.
9300         * modules/strnlen (Makefile.am): Likewise.
9301         * modules/strpbrk (Makefile.am): Likewise.
9302         * modules/strsep (Makefile.am): Likewise.
9303         * modules/strstr (Makefile.am): Likewise.
9304         * modules/strtod (Makefile.am): Likewise.
9305         * modules/strtoimax (Makefile.am): Likewise.
9306         * modules/strtok_r (Makefile.am): Likewise.
9307         * modules/strtol (Makefile.am): Likewise.
9308         * modules/strtoll (Makefile.am): Likewise.
9309         * modules/strtoul (Makefile.am): Likewise.
9310         * modules/strtoull (Makefile.am): Likewise.
9311         * modules/strtoumax (Makefile.am): Likewise.
9312         * modules/strverscmp (Makefile.am): Likewise.
9313         * modules/sys_socket (Makefile.am): Likewise.
9314         * modules/sys_stat (Makefile.am): Likewise.
9315         * modules/sysexits (Makefile.am): Likewise.
9316         * modules/time_r (Makefile.am): Likewise.
9317         * modules/timegm (Makefile.am): Likewise.
9318         * modules/timespec (Makefile.am): Likewise.
9319         * modules/tmpfile-safer (Makefile.am): Likewise.
9320         * modules/trim (Makefile.am): Likewise.
9321         * modules/unistd-safer (Makefile.am): Likewise.
9322         * modules/unlinkdir (Makefile.am): Likewise.
9323         * modules/unlocked-io (Makefile.am): Likewise.
9324         * modules/userspec (Makefile.am): Likewise.
9325         * modules/utime (Makefile.am): Likewise.
9326         * modules/utimecmp (Makefile.am): Likewise.
9327         * modules/utimens (Makefile.am): Likewise.
9328         * modules/vasnprintf (Makefile.am): Likewise.
9329         * modules/vasprintf (Makefile.am): Likewise.
9330         * modules/vsnprintf (Makefile.am): Likewise.
9331         * modules/xalloc (Makefile.am): Likewise.
9332         * modules/xgetcwd (Makefile.am): Likewise.
9333         * modules/xnanosleep (Makefile.am): Likewise.
9334         * modules/xreadlink (Makefile.am): Likewise.
9335         * modules/xstrtod (Makefile.am): Likewise.
9336         * modules/xstrtol (Makefile.am): Likewise.
9337         * modules/xstrtold (Makefile.am): Likewise.
9338         * modules/yesno (Makefile.am): Likewise.
9339         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
9340
9341 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
9342
9343         * modules/error (Makefile.am): Distribute files through
9344         EXTRA_DIST, not lib_SOURCES.
9345
9346 2006-10-12  Eric Blake  <ebb9@byu.net>
9347
9348         * modules/error (Makefile.am): Distribute files in /lib.
9349         * modules/obstack (Makefile.am): Likewise.
9350
9351 2006-10-12  Bruno Haible  <bruno@clisp.org>
9352
9353         * modules/acl (Makefile.am): Distribute all files in lib/ through
9354         EXTRA_DIST.
9355         * modules/arcfour (Makefile.am): Likewise.
9356         * modules/arctwo (Makefile.am): Likewise.
9357         * modules/argmatch (Makefile.am): Likewise.
9358         * modules/argz (Makefile.am): Likewise.
9359         * modules/atexit (Makefile.am): Likewise.
9360         * modules/backupfile (Makefile.am): Likewise.
9361         * modules/c-strtod (Makefile.am): Likewise.
9362         * modules/c-strtold (Makefile.am): Likewise.
9363         * modules/calloc (Makefile.am): Likewise.
9364         * modules/canon-host (Makefile.am): Likewise.
9365         * modules/canonicalize (Makefile.am): Likewise.
9366         * modules/chdir-long (Makefile.am): Likewise.
9367         * modules/chdir-safer (Makefile.am): Likewise.
9368         * modules/check-version (Makefile.am): Likewise.
9369         * modules/chown (Makefile.am): Likewise.
9370         * modules/cloexec (Makefile.am): Likewise.
9371         * modules/close-stream (Makefile.am): Likewise.
9372         * modules/closeout (Makefile.am): Likewise.
9373         * modules/crc (Makefile.am): Likewise.
9374         * modules/cycle-check (Makefile.am): Likewise.
9375         * modules/des (Makefile.am): Likewise.
9376         * modules/dirfd (Makefile.am): Likewise.
9377         * modules/dirname (Makefile.am): Likewise.
9378         * modules/dup2 (Makefile.am): Likewise.
9379         * modules/euidaccess (Makefile.am): Likewise.
9380         * modules/exclude (Makefile.am): Likewise.
9381         * modules/exitfail (Makefile.am): Likewise.
9382         * modules/fcntl-safer (Makefile.am): Likewise.
9383         * modules/file-type (Makefile.am): Likewise.
9384         * modules/fileblocks (Makefile.am): Likewise.
9385         * modules/filemode (Makefile.am): Likewise.
9386         * modules/filenamecat (Makefile.am): Likewise.
9387         * modules/fnmatch (Makefile.am): Likewise.
9388         * modules/fopen-safer (Makefile.am): Likewise.
9389         * modules/fpending (Makefile.am): Likewise.
9390         * modules/fprintftime (Makefile.am): Likewise.
9391         * modules/free (Makefile.am): Likewise.
9392         * modules/fsusage (Makefile.am): Likewise.
9393         * modules/ftruncate (Makefile.am): Likewise.
9394         * modules/fts (Makefile.am): Likewise.
9395         * modules/gc (Makefile.am): Likewise.
9396         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
9397         * modules/getaddrinfo (Makefile.am): Likewise.
9398         * modules/getcwd (Makefile.am): Likewise.
9399         * modules/getdelim (Makefile.am): Likewise.
9400         * modules/getdomainname (Makefile.am): Likewise.
9401         * modules/getgroups (Makefile.am): Likewise.
9402         * modules/gethostname (Makefile.am): Likewise.
9403         * modules/gethrxtime (Makefile.am): Likewise.
9404         * modules/getline (Makefile.am): Likewise.
9405         * modules/getloadavg (Makefile.am): Likewise.
9406         * modules/getlogin_r (Makefile.am): Likewise.
9407         * modules/getopt (Makefile.am): Likewise.
9408         * modules/getpass (Makefile.am): Likewise.
9409         * modules/getpass-gnu (Makefile.am): Likewise.
9410         * modules/getsubopt (Makefile.am): Likewise.
9411         * modules/gettime (Makefile.am): Likewise.
9412         * modules/gettimeofday (Makefile.am): Likewise.
9413         * modules/getugroups (Makefile.am): Likewise.
9414         * modules/getusershell (Makefile.am): Likewise.
9415         * modules/glob (Makefile.am): Likewise.
9416         * modules/group-member (Makefile.am): Likewise.
9417         * modules/hard-locale (Makefile.am): Likewise.
9418         * modules/hash (Makefile.am): Likewise.
9419         * modules/hmac-md5 (Makefile.am): Likewise.
9420         * modules/hmac-sha1 (Makefile.am): Likewise.
9421         * modules/human (Makefile.am): Likewise.
9422         * modules/idcache (Makefile.am): Likewise.
9423         * modules/imaxabs (Makefile.am): Likewise.
9424         * modules/imaxdiv (Makefile.am): Likewise.
9425         * modules/inet_ntop (Makefile.am): Likewise.
9426         * modules/inet_pton (Makefile.am): Likewise.
9427         * modules/inttostr (Makefile.am): Likewise.
9428         * modules/isapipe (Makefile.am): Likewise.
9429         * modules/lchown (Makefile.am): Likewise.
9430         * modules/long-options (Makefile.am): Likewise.
9431         * modules/lstat (Makefile.am): Likewise.
9432         * modules/malloc (Makefile.am): Likewise.
9433         * modules/mathl (Makefile.am): Likewise.
9434         * modules/mbchar (Makefile.am): Likewise.
9435         * modules/md2 (Makefile.am): Likewise.
9436         * modules/md4 (Makefile.am): Likewise.
9437         * modules/md5 (Makefile.am): Likewise.
9438         * modules/memcasecmp (Makefile.am): Likewise.
9439         * modules/memchr (Makefile.am): Likewise.
9440         * modules/memcmp (Makefile.am): Likewise.
9441         * modules/memcoll (Makefile.am): Likewise.
9442         * modules/memcpy (Makefile.am): Likewise.
9443         * modules/memmem (Makefile.am): Likewise.
9444         * modules/memmove (Makefile.am): Likewise.
9445         * modules/mempcpy (Makefile.am): Likewise.
9446         * modules/memrchr (Makefile.am): Likewise.
9447         * modules/memset (Makefile.am): Likewise.
9448         * modules/memxor (Makefile.am): Likewise.
9449         * modules/mkancesdirs (Makefile.am): Likewise.
9450         * modules/mkdir (Makefile.am): Likewise.
9451         * modules/mkdir-p (Makefile.am): Likewise.
9452         * modules/mkdtemp (Makefile.am): Likewise.
9453         * modules/mkstemp (Makefile.am): Likewise.
9454         * modules/mktime (Makefile.am): Likewise.
9455         * modules/modechange (Makefile.am): Likewise.
9456         * modules/mountlist (Makefile.am): Likewise.
9457         * modules/nanosleep (Makefile.am): Likewise.
9458         * modules/openat (Makefile.am): Likewise.
9459         * modules/pagealign_alloc (Makefile.am): Likewise.
9460         * modules/physmem (Makefile.am): Likewise.
9461         * modules/poll (Makefile.am): Likewise.
9462         * modules/posixtm (Makefile.am): Likewise.
9463         * modules/posixver (Makefile.am): Likewise.
9464         * modules/putenv (Makefile.am): Likewise.
9465         * modules/quote (Makefile.am): Likewise.
9466         * modules/quotearg (Makefile.am): Likewise.
9467         * modules/raise (Makefile.am): Likewise.
9468         * modules/read-file (Makefile.am): Likewise.
9469         * modules/readline (Makefile.am): Likewise.
9470         * modules/readlink (Makefile.am): Likewise.
9471         * modules/readtokens (Makefile.am): Likewise.
9472         * modules/readutmp (Makefile.am): Likewise.
9473         * modules/realloc (Makefile.am): Likewise.
9474         * modules/regex (Makefile.am): Likewise.
9475         * modules/rename (Makefile.am): Likewise.
9476         * modules/rename-dest-slash (Makefile.am): Likewise.
9477         * modules/rijndael (Makefile.am): Likewise.
9478         * modules/rmdir (Makefile.am): Likewise.
9479         * modules/rpmatch (Makefile.am): Likewise.
9480         * modules/safe-read (Makefile.am): Likewise.
9481         * modules/safe-write (Makefile.am): Likewise.
9482         * modules/same (Makefile.am): Likewise.
9483         * modules/save-cwd (Makefile.am): Likewise.
9484         * modules/savedir (Makefile.am): Likewise.
9485         * modules/setenv (Makefile.am): Likewise.
9486         * modules/settime (Makefile.am): Likewise.
9487         * modules/sha1 (Makefile.am): Likewise.
9488         * modules/sig2str (Makefile.am): Likewise.
9489         * modules/snprintf (Makefile.am): Likewise.
9490         * modules/stdlib-safer (Makefile.am): Likewise.
9491         * modules/stpcpy (Makefile.am): Likewise.
9492         * modules/stpncpy (Makefile.am): Likewise.
9493         * modules/strcase (Makefile.am): Likewise.
9494         * modules/strcasestr (Makefile.am): Likewise.
9495         * modules/strchrnul (Makefile.am): Likewise.
9496         * modules/strcspn (Makefile.am): Likewise.
9497         * modules/strdup (Makefile.am): Likewise.
9498         * modules/strerror (Makefile.am): Likewise.
9499         * modules/strftime (Makefile.am): Likewise.
9500         * modules/strndup (Makefile.am): Likewise.
9501         * modules/strnlen (Makefile.am): Likewise.
9502         * modules/strpbrk (Makefile.am): Likewise.
9503         * modules/strsep (Makefile.am): Likewise.
9504         * modules/strstr (Makefile.am): Likewise.
9505         * modules/strtod (Makefile.am): Likewise.
9506         * modules/strtoimax (Makefile.am): Likewise.
9507         * modules/strtok_r (Makefile.am): Likewise.
9508         * modules/strtol (Makefile.am): Likewise.
9509         * modules/strtoll (Makefile.am): Likewise.
9510         * modules/strtoul (Makefile.am): Likewise.
9511         * modules/strtoull (Makefile.am): Likewise.
9512         * modules/strtoumax (Makefile.am): Likewise.
9513         * modules/strverscmp (Makefile.am): Likewise.
9514         * modules/time_r (Makefile.am): Likewise.
9515         * modules/timegm (Makefile.am): Likewise.
9516         * modules/tmpfile-safer (Makefile.am): Likewise.
9517         * modules/unistd-safer (Makefile.am): Likewise.
9518         * modules/unlinkdir (Makefile.am): Likewise.
9519         * modules/userspec (Makefile.am): Likewise.
9520         * modules/utime (Makefile.am): Likewise.
9521         * modules/utimecmp (Makefile.am): Likewise.
9522         * modules/utimens (Makefile.am): Likewise.
9523         * modules/vasnprintf (Makefile.am): Likewise.
9524         * modules/vasprintf (Makefile.am): Likewise.
9525         * modules/vsnprintf (Makefile.am): Likewise.
9526         * modules/xalloc (Makefile.am): Likewise.
9527         * modules/xgetcwd (Makefile.am): Likewise.
9528         * modules/xnanosleep (Makefile.am): Likewise.
9529         * modules/xreadlink (Makefile.am): Likewise.
9530         * modules/xstrtod (Makefile.am): Likewise.
9531         * modules/xstrtol (Makefile.am): Likewise.
9532         * modules/xstrtold (Makefile.am): Likewise.
9533         * modules/yesno (Makefile.am): Likewise.
9534
9535 2006-10-12  Jim Meyering  <jim@meyering.net>
9536
9537         * m4/getloadavg.m4: Revert the change below.
9538
9539         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
9540         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
9541         fail with a symlink, which is what coreutils' ./bootstrap now
9542         creates by default.
9543
9544 2006-10-12  Bruno Haible  <bruno@clisp.org>
9545
9546         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
9547         mingw.
9548         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
9549         MSVC and mingw explicitly.
9550
9551 2006-10-11  Simon Josefsson  <jas@extundo.com>
9552             Bruno Haible  <bruno@clisp.org>
9553
9554         Add support for multiple gnulib-tool invocations in the scope of a
9555         single configure.ac file.
9556         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
9557         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
9558         with the same contents as the _LIBADD variable.
9559         (func_emit_initmacro_start, func_emit_initmacro_end,
9560         func_emit_initmacro_done): New functions.
9561         (func_import, func_create_testdir): Invoke them. Allow the identifiers
9562         gl_LIBOBJS and gl_LTLIBOBJS.
9563
9564 2006-10-11  Bruno Haible  <bruno@clisp.org>
9565
9566         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
9567         (func_create_testdir): Don't create po/Makefile.am, don't invoke
9568         autoreconf. Instead, invoke autopoint explicitly but move back the
9569         *.m4 files from gnulib.
9570
9571 2006-10-11  Bruno Haible  <bruno@clisp.org>
9572
9573         * gnulib-tool (func_usage): Make module names after --create-testdir
9574         optional.
9575         (func_create_testdir): If no module was specified, use nearly all
9576         modules.
9577
9578 2006-10-12  Jim Meyering  <jim@meyering.net>
9579
9580         Big performance improvement for fts-based tools that use FTS_NOSTAT.
9581         Avoid spurious inode-mismatch problems on non-POSIX file systems.
9582         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
9583         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
9584         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
9585         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
9586         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
9587         (fts_set_stat_required): New function.
9588         (fts_open): Defer the calls to fts_stat, if possible or requested.
9589         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
9590         into fts_stat itself.
9591         (fts_read): Perform any required (deferred) fts_stat call.
9592         (fts_build): Likewise, for the directory we're about to open and read.
9593         In the readdir loop, carefully decide whether each entry will require
9594         an eventual call to fts_stat, using dirent.d_type info if available.
9595         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
9596         a command line argument into this function.  Update all callers.
9597         Map a return value of FTS_DOT to FTS_D for a command line argument.
9598         * modules/fts (Depends-on): Add d-type.  Alphabetize.
9599         Thanks to Miklos Szeredi for his tenacity and for the initial
9600         bug report about "find" failing on a FUSE-based file system.
9601
9602         * lib/fts.c (fts_open): Use consistent indentation.
9603
9604 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
9605
9606         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
9607         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
9608         reported by Jim Meyering.  All uses of cache variables renamed
9609         to match Autoconf's.
9610         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
9611         the other one.
9612
9613         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
9614         Fix misspelling in diagnostic.
9615
9616 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
9617
9618         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
9619         defined.  Problem reported by Matthew Woehlke.
9620
9621         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
9622         Add support for Tandem NonStop R series.
9623         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
9624         Use new macro.
9625
9626         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
9627         (has_trailing_slash): Omit size arg; all callers changed.
9628         Omit 'inline', since it doesn't help performance and we'd
9629         need to configure it.
9630         Don't count //, ///, etc. as having a trailing slash.
9631         As a side effect, this removes a C99ism reported by Matthew Woehlke.
9632         (rpl_rename_dest_slash): On failure, use rename's errno rather
9633         than (in some cases) an incorrect or junk errno.
9634         Simplify code by removing need to compute length; this does
9635         cause it to make two passes instead of one over the file name,
9636         but it's worth it.
9637
9638         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
9639         change, since Autoconf's version may no longer be appropriate now
9640         that we are using CVS Autoconf's version.  Add support for Tandem.
9641
9642 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
9643             Bruno Haible  <bruno@clisp.org>
9644
9645         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
9646         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
9647         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
9648         gl_AC_TYPE_LONG_LONG.
9649
9650         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
9651         instead of HAVE_LONG_LONG.
9652         * lib/printf-args.c (printf_fetchargs): Likewise.
9653         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
9654         * lib/vasnprintf.c (VASNPRINTF): Likewise.
9655         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
9656         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
9657         gl_AC_TYPE_LONG_LONG.
9658
9659 2006-10-11  Bruno Haible  <bruno@clisp.org>
9660
9661         * m4/longlong.m4: Add comments.
9662         * m4/ulonglong.m4: Likewise.
9663
9664 2006-10-10  Bruno Haible  <bruno@clisp.org>
9665
9666         Make it possible to #define stpcpy, strdup to aliases.
9667         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
9668         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
9669
9670 2006-10-10  Bruno Haible  <bruno@clisp.org>
9671
9672         Make it possible to #define gcd to an alias.
9673         * lib/gcd.c: Include config.h.
9674
9675 2006-10-10  Bruno Haible  <bruno@clisp.org>
9676
9677         Make it possible to #define c_isascii to an alias.
9678         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
9679         defined. Undefine the macros before defining them, to avoid gcc
9680         warnings.
9681         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
9682         define NO_C_CTYPE_MACROS early.
9683
9684 2006-10-10  Bruno Haible  <bruno@clisp.org>
9685
9686         Make it possible to #define set_program_name to an alias.
9687         * lib/progname.c: Don't undefine set_program_name; instead, undefine
9688         ENABLE_RELOCATABLE early.
9689
9690 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
9691
9692         Port to Tandem NSK OSS, which has 64-bit signed int but at most
9693         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
9694         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
9695         More generally, don't assume that 64-bit signed int is available
9696         if unsigned int is, and vice versa.
9697         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
9698         unsigned symbols, not on their signed counterparts.
9699         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
9700         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
9701         (UINT64_C, UINTMAX_C):
9702         Likewise.
9703         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
9704         unsigned counterparts.
9705         (Have_long_long, Unsigned): New macros.
9706         (Int): Renamed from INT.
9707         (strtoimax): Use the new macros.
9708         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
9709         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
9710         * modules/inttypes (inttypes.h): Substitute
9711         HAVE_UNSIGNED_LONG_LONG_INT.
9712         * modules/stdint (stdint.h): Likewise.
9713         (Files): Add m4/ulonglong.m4.
9714
9715 2006-10-10  Bruno Haible  <bruno@clisp.org>
9716
9717         Fix a gcc -Wshadow warning.
9718         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
9719         to 'bucket'.
9720         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
9721         gl_linked_indexof_from_to): Likewise.
9722         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
9723         Likewise.
9724         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
9725         Likewise.
9726         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
9727         Reported by Eric Blake.
9728
9729 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
9730
9731         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
9732         for NetBSD.  Problem reported by Bruno Haible.
9733
9734 2006-10-09  Jim Meyering  <jim@meyering.net>
9735
9736         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
9737         Patch from Bruno Haible.
9738
9739 2006-10-09  Jim Meyering  <jim@meyering.net>
9740
9741         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
9742         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
9743         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
9744
9745 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
9746
9747         Don't include <config.h> twice; this doesn't work in some cases,
9748         e.g., when config.h has "#define intmax_t long long int" and
9749         we include <config.h>, <inttypes.h>, <config.h> in that order.
9750         Problem reported by Matthew Woehlke in:
9751         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
9752         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
9753         * lib/fts-cycle.c: Don't include config.h.
9754         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
9755         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
9756         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
9757         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
9758         inttypes.h.
9759         * lib/xstrtoumax.c: Likewise.
9760         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
9761         __strtol and the like, so that this module is more like its siblings.
9762         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
9763         Remove; no longer needed now that we assume gnulib inttypes.h.
9764
9765 2006-10-08  Bruno Haible  <bruno@clisp.org>
9766
9767         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
9768         option.
9769
9770 2006-10-07  Jim Meyering  <jim@meyering.net>
9771
9772         * modules/inttypes (inttypes.h): Revert what seems to have been
9773         an inadvertent part of today's change: use "|", not "/" in the
9774         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
9775
9776 2006-10-07  Bruno Haible  <bruno@clisp.org>
9777
9778         * modules/sublist: New file.
9779
9780 2006-10-07  Bruno Haible  <bruno@clisp.org>
9781
9782         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
9783         * modules/argz (argz.h): Likewise.
9784         * modules/arpa_inet (arpa/inet.h): Likewise.
9785         * modules/byteswap (byteswap.h): Likewise.
9786         * modules/configmake (configmake.h): Likewise.
9787         * modules/fcntl (fcntl.h): Likewise.
9788         * modules/fnmatch (fnmatch.h): Likewise.
9789         * modules/getopt (getopt.h): Likewise.
9790         * modules/glob (glob.h): Likewise.
9791         * modules/inttypes (inttypes.h): Likewise.
9792         * modules/netinet_in (netinet/in.h): Likewise.
9793         * modules/poll (poll.h): Likewise.
9794         * modules/stdbool (stdbool.h): Likewise.
9795         * modules/stdint (stdint.h): Likewise.
9796         * modules/sys_select (sys/select.h): Likewise.
9797         * modules/sys_socket (sys/socket.h): Likewise.
9798         * modules/sys_stat (sys/stat.h): Likewise.
9799         * modules/sysexits (sysexits.h): Likewise.
9800         * modules/unistd (unistd.h): Likewise.
9801         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9802         Add a "DO NOT EDIT" comment to the generated file.
9803         (func_import): Likewise for gnulib-comp.m4.
9804
9805 2006-10-07  Bruno Haible  <bruno@clisp.org>
9806
9807         * lib/gl_sublist.h: New file.
9808         * lib/gl_sublist.c: New file.
9809
9810 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
9811
9812         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
9813         name (relative to the original working directory) and the file
9814         name component (relative to the temporary working directory).  All
9815         callers changed.
9816         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
9817         * lib/mkdir-p.c (make_dir_parents): Likewise.
9818         * lib/mkdir-p.h (make_dir_parents): Likewise.
9819
9820 2006-10-06  Eric Blake  <ebb9@byu.net>
9821
9822         Define several macros for use by the clean-temp module.
9823         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
9824         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
9825         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
9826
9827         * lib/clean-temp.h (close_stream_temp): New declaration.
9828         * lib/clean-temp.c (includes): Pull in headers according to what
9829         other modules are in use.
9830         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
9831
9832 2006-10-06  Bruno Haible  <bruno@clisp.org>
9833
9834         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
9835         instead of fopen, fwriteerror.
9836
9837 2006-10-06  Bruno Haible  <bruno@clisp.org>
9838
9839         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
9840         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
9841         int.
9842         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
9843         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
9844         Return an error indicator.
9845         Suggested by Eric Blake.
9846
9847 2006-10-06  Bruno Haible  <bruno@clisp.org>
9848
9849         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
9850         Reported by Eric Blake.
9851
9852 2006-10-06  Bruno Haible  <bruno@clisp.org>
9853
9854         * modules/closeout (Description): Mention stderr too.
9855
9856 2006-10-06  Bruno Haible  <bruno@clisp.org>
9857         and Paul Eggert  <eggert@cs.ucla.edu>
9858
9859         * lib/closeout.c (close_stdout): Also close stderr.
9860         * lib/closeout.h: Update comment.
9861
9862 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
9863
9864         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
9865         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
9866         * lib/dirchownmod.c: Include lchown.h.
9867         * lib/lchown.c: Don't include files that lchown.h now includes.
9868         Don't declare chown, since lchown.h now does that.
9869         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
9870         (lchown): Define to rpl_chown if lchown is declared but
9871         does not exist.  Declare using a prototype if lchown is not
9872         declared.  Add a copyright notice.
9873         * lib/mkstemp.h: Include <unistd.h>.
9874         * lib/openat.c: Include lchown.h.
9875
9876         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
9877         we now test for that separately.
9878         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
9879         rather than O_NOFOLLOW, when testing whether it's possible to
9880         avoid a race condition reliably.
9881         * lib/savewd.c (savewd_chdir): Likewise.
9882
9883         Remove macros that are no longer needed now that stdint.h is
9884         reliable.
9885         * lib/fsusage.c (UINTMAX_MAX): Remove.
9886         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
9887         * lib/utimecmp.c (SIZE_MAX): Remove.
9888
9889         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
9890
9891         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
9892         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
9893         O_NOATIME works.
9894
9895 2006-10-05  Bruno Haible  <bruno@clisp.org>
9896
9897         * lib/gl_list.h (gl_sortedlist_search_from_to,
9898         gl_sortedlist_indexof_from_to): New declarations.
9899         (gl_list_implementation): New fields sortedlist_search_from_to,
9900         sortedlist_indexof_from_to.
9901         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
9902         inline functions.
9903         * lib/gl_list.c (gl_sortedlist_search_from_to,
9904         gl_sortedlist_indexof_from_to): New functions.
9905         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
9906         function.
9907         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
9908         (gl_array_sortedlist_search_from_to): New function.
9909         (gl_array_list_implementation): Update.
9910         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
9911         function.
9912         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
9913         (gl_carray_sortedlist_search_from_to): New function.
9914         (gl_carray_list_implementation): Update.
9915         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
9916         gl_linked_sortedlist_indexof_from_to): New functions.
9917         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
9918         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
9919         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
9920         gl_tree_sortedlist_indexof_from_to): New functions.
9921         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
9922         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
9923         Update.
9924         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
9925         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
9926         Update.
9927
9928 2006-10-05  Bruno Haible  <bruno@clisp.org>
9929
9930         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
9931         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
9932         (struct gl_list_implementation): Add fields search_from_to,
9933         indexof_from_to. Remove fields search, indexof.
9934         (gl_list_search): Use the search_from_to method.
9935         (gl_list_search_from, gl_list_search_from_to): New functions.
9936         (gl_list_indexof): Use the indexof_from_to method.
9937         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
9938         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
9939         (gl_list_search_from, gl_list_search_from_to): New functions.
9940         (gl_list_indexof): Use the indexof_from_to method.
9941         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
9942         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
9943         gl_array_indexof. Add start_index, end_index arguments.
9944         (gl_array_search_from_to): Renamed from gl_array_search. Add
9945         start_index, end_index arguments.
9946         (gl_array_remove, gl_array_list_implementation): Update.
9947         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
9948         gl_carray_indexof. Add start_index, end_index arguments.
9949         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
9950         start_index, end_index arguments.
9951         (gl_carray_remove, gl_carray_list_implementation): Update.
9952         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
9953         gl_linked_search. Add start_index, end_index arguments.
9954         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
9955         start_index, end_index arguments.
9956         (gl_linked_remove): Update.
9957         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
9958         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
9959         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
9960         field to 'size_t'.
9961         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
9962         gl_tree_search. Add start_index, end_index arguments.
9963         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
9964         start_index, end_index arguments.
9965         (gl_tree_remove): Update.
9966         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
9967         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
9968         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
9969         function.
9970         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
9971         gl_tree_search. Add start_index, end_index arguments.
9972         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
9973         start_index, end_index arguments.
9974         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
9975         Update.
9976         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
9977
9978 2006-10-05  Bruno Haible  <bruno@clisp.org>
9979
9980         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
9981
9982         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
9983         fwriteerror_temp): New declarations.
9984         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
9985         (descriptors): New variable.
9986         (cleanup): First, close the descriptors.
9987         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
9988         fclose_temp, fwriteerror_temp): New functions.
9989
9990 2006-10-04  Jim Meyering  <jim@meyering.net>
9991
9992         * lib/fts.c (fts_open): Tiny comment change.
9993
9994 2006-10-04  Bruno Haible  <bruno@clisp.org>
9995
9996         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
9997         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
9998         gl_LOCK_BODY.
9999         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
10000         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
10001         gl_LOCK_EARLY_BODY.
10002         (gl_LOCK): Require gl_LOCK_BODY.
10003
10004 2006-10-04  Bruno Haible  <bruno@clisp.org>
10005
10006         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
10007         (gl_oset_search_atleast): New declaration.
10008         (struct gl_oset_implementation): Add field 'search_atleast'.
10009         (gl_oset_search_atleast): New inline function.
10010         * lib/gl_oset.c (gl_oset_search_atleast): New function.
10011         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
10012         (gl_array_oset_implementation): Update.
10013         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
10014         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
10015         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
10016
10017 2006-10-04  Bruno Haible  <bruno@clisp.org>
10018
10019         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
10020
10021 2006-10-03  Bruno Haible  <bruno@clisp.org>
10022
10023         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
10024         from gl_avltreehash_list_implementation.
10025
10026 2006-10-03  Bruno Haible  <bruno@clisp.org>
10027
10028         * lib/gl_oset.c (gl_oset_add): Fix return type.
10029
10030 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
10031
10032         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
10033
10034 2006-10-02  Eric Blake  <ebb9@byu.net>
10035
10036         * modules/strnlen (Depends-on): Add extensions.
10037
10038 2006-10-02  Eric Blake  <ebb9@byu.net>
10039
10040         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
10041         definition in 2.60+.
10042
10043 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
10044
10045         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
10046         checks.
10047
10048 2006-10-02  Bruno Haible  <bruno@clisp.org>
10049
10050         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
10051         to the AUTOMAKE_OPTIONS.
10052         Reported by Jim Meyering.
10053
10054 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
10055
10056         Work around bug in Solaris 10 /proc file system:
10057         /proc/self/fd/NNN/.. isn't the parent directory of
10058         the directory whose file descriptor is NNN.  This needs to
10059         be worked around at run time, not compile time, since a
10060         program might be built on Solaris 8, where things work, and
10061         run on Solaris 10.
10062         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
10063         to use the following interface instead:
10064         (OPENAT_BUFFER_SIZE): New macro.
10065         (openat_proc_name): New function.
10066         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
10067         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
10068         Likewise.
10069         * lib/openat-proc.c: New file.
10070         * modules/openat (Files): Add lib/openat-proc.c.
10071         (Depends-on): Add same-inode, stdbool.
10072         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
10073
10074 2006-09-29  Bruno Haible  <bruno@clisp.org>
10075
10076         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
10077         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
10078         argument. Set stdout_closed before testing for ferror, not after.
10079         (fwriteerror, fwriteerror_no_ebadf): New functions.
10080
10081 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10082
10083         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
10084
10085 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
10086
10087         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
10088         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
10089
10090 2006-09-28  Jim Meyering  <jim@meyering.net>
10091
10092         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
10093         Include <unistd.h>.
10094
10095 2006-09-28  Bruno Haible  <bruno@clisp.org>
10096
10097         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
10098         * modules/linkedhash-list (Depends-on): Likewise.
10099         * modules/rbtreehash-list (Depends-on): Likewise.
10100
10101 2006-09-28  Bruno Haible  <bruno@clisp.org>
10102
10103         * lib/strndup.h: Simplify the redefinition of strndup.
10104         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
10105         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
10106
10107 2006-09-28  Bruno Haible  <bruno@clisp.org>
10108
10109         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
10110         * lib/gl_linkedhash_list.c: Likewise.
10111         * lib/gl_rbtreehash_list.c: Likewise.
10112
10113 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
10114
10115         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
10116         getaddrinfo.
10117
10118         * lib/__fpending.h: Don't include <stdio_ext.h> unless
10119         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
10120         it causes <stdio_ext.h> to cause a compile-time error.
10121         Problem reported by Nelson H. F. Beebe.
10122         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
10123         of HAVE_DECL___PENDING.
10124
10125         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
10126         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
10127         declaration.
10128
10129 2006-09-27  Jim Meyering  <jim@meyering.net>
10130
10131         This file could end up with a definition for a function
10132         named __strndup, rather than rpl_strndup on a system with
10133         incomplete weak_alias support.
10134         * lib/strndup.c (strndup): Rename from __strndup.
10135         Remove #defines that used to map __strndup to strndup.
10136         Don't use K&R prototypes.
10137         Remove LIBC-related code, since this file is not sync'd with glibc.
10138         * lib/strndup.h: Revamp, accordingly.
10139         * m4/strndup.m4: Modernize.
10140
10141 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
10142
10143         * modules/savewd (Depends-on): Add 'raise'.
10144         * lib/savewd.c: Include <signal.h>, for 'raise'.
10145
10146 2006-09-26  Jim Meyering  <jim@meyering.net>
10147
10148         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
10149         when we detect Darwin 8.7.0's acl_get_file bug.
10150         Rearrange to perform the new (below) run-test while $LIBS
10151         contains any acl-related library.  Set USE_ACL at the end.
10152         (gl_ACL_GET_FILE): New function.
10153
10154 2006-09-26  Eric Blake  <ebb9@byu.net>
10155
10156         * lib/verror.c: Include <config.h> unconditionally.
10157
10158 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
10159
10160         * modules/clock-time (Maintainer): Add self.
10161         * modules/getlogin_r (Depends-on): Add extensions.
10162
10163 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10164
10165         * modules/clock-time: New module.
10166         * modules/nanosleep (Depends-on): Add clock-time.
10167         * modules/gethrxtime (Depends-on): Likewise.
10168         * modules/gettime (Depends-on): Likewise.
10169         * modules/settime (Depends-on): Likewise.
10170
10171         * modules/fts-lgpl: Depend on openat.
10172         * modules/mkancesdirs: Depend on savewd.
10173         * modules/mkdir-p: Likewise.
10174
10175 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10176
10177         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
10178
10179         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
10180         `gl_have_arbitrary_file_name_length_limit' to
10181         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
10182         actually works between configure runs.
10183
10184 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10185             Bruno Haible  <bruno@clisp.org>
10186
10187         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
10188
10189 2006-09-25  Jim Meyering  <jim@meyering.net>
10190
10191         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
10192         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
10193
10194 2006-09-25  Eric Blake  <ebb9@byu.net>
10195
10196         * gnulib-tool (func_import, func_create_testdir): Fix typos in
10197         exec's in 2006-09-18 patch when shuffling fds.
10198
10199 2006-09-25  Bruno Haible  <bruno@clisp.org>
10200
10201         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
10202         Reported by Jim Meyering.
10203
10204 2006-09-24  Jim Meyering  <jim@meyering.net>
10205
10206         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
10207         compare a pointer against a literal "0".  That caused failures with
10208         at least HP-UX's hpcc.
10209
10210 2006-09-22  Simon Josefsson  <jas@extundo.com>
10211
10212         * modules/gc-sha1:
10213         * modules/gc-md4:
10214         * modules/gc-hmac-sha1:
10215         * modules/gc-hmac-md5:
10216         * modules/gc-des:
10217         * modules/gc-arcfour: Distribute more files.
10218
10219 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10220
10221         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
10222         (gl_linked_iterator_from_to): Initialize struct completely.
10223         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
10224         (gl_tree_iterator_from_to): Likewise
10225         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
10226         * lib/gl_array_list.c [lint] (gl_array_iterator)
10227         (gl_array_iterator_from_to): Likewise.
10228         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
10229         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
10230         (gl_carray_iterator_from_to): Likewise.
10231
10232         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
10233         * lib/md4.c (md4_process_block): Remove unused variable.
10234         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
10235         parentheses for clarity.
10236
10237 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10238
10239         * modules/bison-i18n (Depends-on): Add gettext.
10240
10241 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10242
10243         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
10244         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
10245         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
10246         also add missing comma that caused broken test.
10247         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
10248         stdlib.h, for `abort'.
10249         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
10250         variables.
10251         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
10252         include unistd.h if present, for `rmdir'.
10253         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
10254         variables.
10255         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
10256         in the process include standard headers for prototypes.
10257         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
10258         gets declared on GNU/Linux.
10259         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
10260         unistd.h, for `rmdir'.
10261         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
10262
10263         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
10264         always true.
10265         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
10266
10267         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
10268
10269 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10270
10271         * gnulib-tool (func_version): Create output all at once.  This
10272         may help avoid triggering unnecessary SIGPIPEs, and at any
10273         rate it doesn't hurt.
10274
10275 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10276             Bruno Haible  <bruno@clisp.org>
10277
10278         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
10279         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
10280         * m4/signed.m4 (bh_C_SIGNED): Likewise.
10281
10282         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
10283         (gl_FUNC_VASPRINTF): Invoke it.
10284
10285 2006-09-22  Bruno Haible  <bruno@clisp.org>
10286
10287         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
10288         getloadavg.c as first argument.
10289
10290 2006-09-22  Bruno Haible  <bruno@clisp.org>
10291
10292         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
10293         at the beginning of the gl_INIT macro.
10294         * modules/getloadavg (configure.ac): Pass $gl_source_base to
10295         gl_GETLOADAVG.
10296
10297 2006-09-22  Bruno Haible  <bruno@clisp.org>
10298
10299         * gnulib-tool (func_create_megatestdir): Don't include the config-h
10300         module.
10301         Suggested by Ralf Wildenhues.
10302
10303 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
10304
10305         Import this patch from libc:
10306
10307         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
10308
10309         * lib/regex_internal.c (re_string_reconstruct): Handle
10310         offset < pstr->valid_raw_len && pstr->offsets_needed case.
10311         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
10312         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
10313         re_string_context_at.
10314
10315         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
10316         now requires it.
10317         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
10318         gl_REGEX now does it for us.
10319         (gl_REGEX): Add test taken from
10320         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
10321
10322         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
10323         Check that large offsets work.  Modernize Autoconf usages.
10324         Prefer "yes" to mean a good thing rather than a bad.
10325         Don't put "#define mkstemp" in config.h, as this might interfere
10326         with standard system headers that "#define mkstemp mkstemp64".
10327
10328         * modules/mkstemp (Depends-on): Add extensions, so that
10329         mkstemp is visible on some platforms.
10330         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
10331         (Include): Change to "mkstemp.h" from <stdlib.h>.
10332         (Files): Add mkstemp.h.
10333
10334         * lib/mkstemp.h: New file, since some standard headers
10335         #define mkstemp.
10336         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
10337         Include "mkstemp.h".
10338         Make the _LIBC code resemble glibc original more,
10339         e.g., use K&R style.
10340         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
10341         (mkstemp): Remove, since mkstemp.h does this for us.
10342         * lib/stdlib--.h: Include mkstemp.h.
10343
10344         Import this patch from libc:
10345
10346         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
10347
10348         * lib/tempname.c (__gen_tempname): Change attempts_min
10349         into a macro.  Use preprocessor to decide how to initialize
10350         attempts [Coverity CID 67].
10351
10352 2006-09-20  Bruno Haible  <bruno@clisp.org>
10353
10354         * lib/mkdtemp.c: Import from libc.
10355         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
10356                 * sysdeps/posix/tempname.c (__gen_tempname): Change
10357                 attempts_min into a macro.  Use preprocessor to decide how to
10358                 initialize attempts [Coverity CID 67].
10359         2001-11-27  Paul Eggert  <eggert@twinsun.com>
10360                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
10361                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
10362
10363 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10364
10365         * gnulib-tool (func_exit): New function, to allow to pass the
10366         exit status portably through the trap.  Use everywhere.
10367         (--help, --version): Signal a write error.
10368         (trap): catch SIGPIPE, for write errors.
10369         Exit at the end of the trap, with the correct exit status.
10370
10371 2006-09-19  Karl Berry  <karl@gnu.org>
10372
10373         * doc/gnulib.texi: note about the license texinfo files.
10374
10375 2006-09-19  Eric Blake  <ebb9@byu.net>
10376
10377         * gnulib-tool: Avoid space-tab.
10378
10379 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
10380
10381         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
10382         that prevented coreutils 6.1 from building.  Problem reported
10383         by Petter Reinholdtsen.
10384
10385 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
10386
10387         * gnulib-tool (avoidlist): Fix typo that broke options like
10388         --avoid=lock that are used by coreutils bootstrap.
10389
10390 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
10391
10392         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
10393         more systematically.
10394
10395 2006-09-18  Jim Meyering  <jim@meyering.net>
10396
10397         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
10398
10399 2006-09-18  Bruno Haible  <bruno@clisp.org>
10400
10401         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
10402
10403 2006-09-18  Bruno Haible  <bruno@clisp.org>
10404
10405         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
10406         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
10407         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
10408         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
10409         * m4/gettext.m4: Require autoconf >= 2.52.
10410         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
10411         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
10412         of gl_cv_header_inttypes_h.
10413
10414 2006-09-18  Bruno Haible  <bruno@clisp.org>
10415
10416         * lib/javaversion.c: Include configmake.h.
10417
10418 2006-09-18  Bruno Haible  <bruno@clisp.org>
10419
10420         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
10421         avoid that the while loops be executed in a subshell.
10422
10423 2006-09-18  Bruno Haible  <bruno@clisp.org>
10424
10425         * MODULES.html.sh (func_module): Break long lines.
10426         Suggested by Bruce Korb <bkorb@gnu.org>.
10427
10428 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10429
10430         Speed up by a factor of 1.12.
10431         * gnulib-tool (nl): New variable.
10432         (func_import): Rewrite include directive extraction to only read each
10433         directive once.
10434
10435 2006-09-17  Bruno Haible  <bruno@clisp.org>
10436
10437         * modules/javaversion (Makefile.am): Remove DEFS setting.
10438         (Depends-on): Add configmake, for PKGDATADIR definition.
10439
10440 2006-09-17  Bruno Haible  <bruno@clisp.org>
10441
10442         * gnulib-tool (func_create_testdir): Rewrite all files at once.
10443
10444 2006-09-17  Bruno Haible  <bruno@clisp.org>
10445
10446         * gnulib-tool (func_append): New function, stolen from libtool.m4.
10447         (func_modules_transitive_closure, func_modules_add_dummy,
10448         func_modules_to_filelist, func_import, func_create_testdir,
10449         func_create_megatestdir, ...): Use it wherever possible.
10450         Suggested by Ralf Wildenhues.
10451
10452 2006-09-16  Karl Berry  <karl@gnu.org>
10453
10454         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
10455         to avoid sectioning errors.
10456         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
10457         [ifinfo]: blank line after @center-ed titles.
10458         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
10459         Spell FSF address consistently with others.
10460         (These changes approved by rms.)
10461
10462 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10463
10464         Speed up by a factor of 1.61.
10465         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
10466         already checked module names again.
10467
10468 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10469
10470         Speed up by a factor of 1.13.
10471         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
10472         for new_files, and the input to func_add_or_update.
10473
10474 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10475
10476         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
10477         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
10478
10479 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
10480
10481         * modules/mkancesdirs (Depends-on): Add fcntl.
10482         * modules/savewd: New file.
10483         * MODULES.html.sh (File system functions): Add savewd.
10484
10485         * modules/configmake (Makefile.am): Add support for the
10486         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
10487
10488 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
10489
10490         * m4/savewd.m4: New file.
10491
10492 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
10493
10494         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
10495         (dirchownmod): New arg FD.  All callers changed.
10496         Use FD rather than opening the directory ourself, as opening is
10497         now the caller's responsibility.
10498         * lib/dirchownmod.h: Likewise.
10499         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
10500         hosts that require <sys/types.h> before <sys/stat.h>.  Include
10501         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
10502         (test_dir): Remove.
10503         (mkancesdirs): Return length of prefix of FILE that has already
10504         been made, or -2 if there is a child doing the work.  Redo
10505         algorithm so that it is O(N) rather than O(N**2).  Optimize away
10506         ".", and treat ".." specially since it might stray back into
10507         already-created areas.  Use a subprocess if necessary.  New arg
10508         WD; all users changed.  MAKE_DIR function should now return 1
10509         if it creates a directory that is not readable.  Return -2 if
10510         a child process is spun off.
10511         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
10512         Adjust signature to match code.
10513         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
10514         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
10515         all users changed.
10516         * lib/savewd.c, lib/savewd.h: New files.
10517
10518 2006-09-15  Jim Meyering  <jim@meyering.net>
10519
10520         * modules/rename-dest-slash: New module.
10521         * MODULES.html.sh (posix_compat): Add it here.
10522
10523         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
10524
10525 2006-09-15  Jim Meyering  <jim@meyering.net>
10526
10527         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
10528         file.
10529
10530         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
10531
10532 2006-09-15  Jim Meyering  <jim@meyering.net>
10533
10534         * lib/rename-dest-slash.c (has_trailing_slash): Use
10535         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
10536         (rpl_rename_dest_slash): Perform the cheaper trailing slash
10537         test before testing whether SRC is a directory.
10538         Suggestions from Bruno Haible.
10539
10540         Avoid a warning about an unused variable.
10541         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
10542         into the #ifdef block where it's used.
10543
10544         * lib/rename-dest-slash.c: New file.
10545
10546 2006-09-14  Bruno Haible  <bruno@clisp.org>
10547
10548         * lib/allocsa.c: Include <config.h> unconditionally.
10549         * lib/asnprintf.c: Likewise.
10550         * lib/asprintf.c: Likewise.
10551         * lib/c-strcasecmp.c: Likewise.
10552         * lib/c-strcasestr.c: Likewise.
10553         * lib/c-strncasecmp.c: Likewise.
10554         * lib/c-strstr.c: Likewise.
10555         * lib/classpath.c: Likewise.
10556         * lib/clean-temp.c: Likewise.
10557         * lib/concatpath.c: Likewise.
10558         * lib/copy-file.c: Likewise.
10559         * lib/csharpcomp.c: Likewise.
10560         * lib/csharpexec.c: Likewise.
10561         * lib/execute.c: Likewise.
10562         * lib/fatal-signal.c: Likewise.
10563         * lib/findprog.c: Likewise.
10564         * lib/fwriteerror.c: Likewise.
10565         * lib/gl_array_list.c: Likewise.
10566         * lib/gl_array_oset.c: Likewise.
10567         * lib/gl_avltree_list.c: Likewise.
10568         * lib/gl_avltree_oset.c: Likewise.
10569         * lib/gl_avltreehash_list.c: Likewise.
10570         * lib/gl_carray_list.c: Likewise.
10571         * lib/gl_linked_list.c: Likewise.
10572         * lib/gl_linkedhash_list.c: Likewise.
10573         * lib/gl_list.c: Likewise.
10574         * lib/gl_oset.c: Likewise.
10575         * lib/gl_rbtree_list.c: Likewise.
10576         * lib/gl_rbtree_oset.c: Likewise.
10577         * lib/gl_rbtreehash_list.c: Likewise.
10578         * lib/imaxabs.c: Likewise.
10579         * lib/imaxdiv.c: Likewise.
10580         * lib/javacomp.c: Likewise.
10581         * lib/javaexec.c: Likewise.
10582         * lib/javaversion.c: Likewise.
10583         * lib/linebreak.c: Likewise.
10584         * lib/localcharset.c: Likewise.
10585         * lib/lock.c: Likewise.
10586         * lib/mbchar.c: Likewise.
10587         * lib/mbswidth.c: Likewise.
10588         * lib/mkdtemp.c: Likewise.
10589         * lib/pipe.c: Likewise.
10590         * lib/printf-args.c: Likewise.
10591         * lib/printf-parse.c: Likewise.
10592         * lib/progname.c: Likewise.
10593         * lib/progreloc.c: Likewise.
10594         * lib/readlink.c: Likewise.
10595         * lib/sh-quote.c: Likewise.
10596         * lib/stpcpy.c: Likewise.
10597         * lib/stpncpy.c: Likewise.
10598         * lib/strcasecmp.c: Likewise.
10599         * lib/strcasestr.c: Likewise.
10600         * lib/strcspn.c: Likewise.
10601         * lib/striconv.c: Likewise.
10602         * lib/strncasecmp.c: Likewise.
10603         * lib/strnlen1.c: Likewise.
10604         * lib/strstr.c: Likewise.
10605         * lib/strtok_r.c: Likewise.
10606         * lib/tls.c: Likewise.
10607         * lib/tmpdir.c: Likewise.
10608         * lib/unicodeio.c: Likewise.
10609         * lib/unsetenv.c: Likewise.
10610         * lib/vasnprintf.c: Likewise.
10611         * lib/vasprintf.c: Likewise.
10612         * lib/wait-process.c: Likewise.
10613         * lib/xallocsa.c: Likewise.
10614         * lib/xsetenv.c: Likewise.
10615         * lib/xstriconv.c: Likewise.
10616
10617 2006-09-13  Simon Josefsson  <jas@extundo.com>
10618
10619         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
10620         that internally, suggested by Ralf Wildenhues
10621         <Ralf.Wildenhues@gmx.de>.
10622
10623 2006-09-13  Simon Josefsson  <jas@extundo.com>
10624
10625         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
10626         @LIBOBJS@.
10627         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10628
10629 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
10630
10631         * lib/_fpending.c: Include <config.h> unconditionally, since we no
10632         longer worry about uses that don't define HAVE_CONFIG_H.
10633         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
10634         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
10635         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
10636         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
10637         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
10638         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
10639         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
10640         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
10641         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
10642         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
10643         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
10644         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
10645         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
10646         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
10647         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
10648         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
10649         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
10650         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
10651         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
10652         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
10653         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
10654         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
10655         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
10656         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
10657         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
10658         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
10659         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
10660         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
10661         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
10662         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
10663         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
10664         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
10665         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
10666         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
10667         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
10668         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
10669         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
10670         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
10671         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
10672         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
10673         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
10674         Likewise.
10675
10676 2006-09-13  Eric Blake  <ebb9@byu.net>
10677
10678         * lib/getopt.c: Fix typo in last commit.
10679
10680 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
10681
10682         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
10683         dgettext.
10684
10685 2006-09-12  Jim Meyering  <jim@meyering.net>
10686
10687         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
10688         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
10689         Reported by Nelson H. F. Beebe.
10690
10691 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
10692
10693         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
10694         program_invocation_name and program_invocation_short_name are
10695         initialized.
10696         * lib/argp-namefrob.h: Move declarations of program_invocation_name
10697         and program_invocation_short_name to argp.h, so they are visible
10698         to user programs.
10699         * lib/argp.h: Likewise
10700
10701 2006-09-10  Bruno Haible  <bruno@clisp.org>
10702
10703         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
10704         m4/inttypes_h.m4, m4/uintmax_t.m4.
10705
10706 2006-09-10  Bruno Haible  <bruno@clisp.org>
10707
10708         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
10709         gl_AC_TYPE_UINTMAX_T.
10710
10711 2006-09-10  Bruno Haible  <bruno@clisp.org>
10712
10713         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
10714
10715 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10716
10717         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
10718         convention.  Text proposed by Bruno Haible.
10719         (struct argp_option): Document the use of N_() wrappers.
10720
10721         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
10722         '\v', and translate the two parts separately, instead of feeding
10723         the whole string to gettext.  This allows to exclude
10724         '\v' from the strings visible to the translator by writing doc
10725         strings as N_("..") "\v" N_("..").
10726
10727 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
10728
10729         * config/srclist.txt: Undo latest change; the bug was fixed.
10730
10731 2006-09-09  Bruno Haible  <bruno@clisp.org>
10732
10733         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
10734         assignments if building a library without libtool.
10735         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
10736         in func_emit_lib_Makefile_am.
10737         (func_import): When building a static library libfoo.a, arrange to
10738         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
10739         (func_create_testdir): Likewise.
10740         * modules/gc (configure.ac, Makefile.am): If building statically,
10741         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
10742         * modules/iconvme (configure.ac, Makefile.am): Likewise.
10743         * modules/striconv (configure.ac, Makefile.am): Likewise.
10744         Based on a suggestion by Ralf Wildenhues.
10745
10746 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10747
10748         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
10749         Check for unistd.h too, since Autoconf doesn't assume POSIX.
10750         Also:
10751
10752         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10753         Add year_2050_test to catch glibc bug 2821
10754         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
10755
10756         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
10757         Prefer #ifdef to #if.
10758
10759         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
10760         Return from 'main' instead of calling 'exit'.
10761
10762 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10763
10764         * lib/mktime.c (guess_time_tm): Fix bug where mktime
10765         returned the maximum time_t value rather than (time_t) -1.
10766         Problem originally reported by William Bardwell
10767         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
10768
10769         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
10770         Moved to here ...
10771         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
10772         ... from here.
10773
10774 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10775
10776         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
10777         2821 is fixed.
10778
10779 2006-09-08  Jim Meyering  <jim@meyering.net>
10780
10781         Don't make generated files read-only.  That would bother too many
10782         people.  However, do retain the ability to work when targets are
10783         read-only: remove the destination and temporary files before writing
10784         them (when generated via sed or echo), or by using the -f option for
10785         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
10786         * modules/alloca-opt, modules/argz, modules/arpa_inet:
10787         * modules/byteswap, modules/configmake, modules/fcntl:
10788         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
10789         * modules/localcharset, modules/netinet_in, modules/poll:
10790         * modules/stdbool, modules/stdint, modules/sys_select:
10791         * modules/sys_socket, modules/sys_stat, modules/sysexits:
10792
10793 2006-09-08  Jim Meyering  <jim@meyering.net>
10794
10795         Avoid new build failure on FreeBSD 6.0.
10796         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
10797         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
10798         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
10799
10800 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10801
10802         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
10803
10804 2006-09-07  Jim Meyering  <jim@meyering.net>
10805
10806         Fix global typo in last change: use chmod u-w, not chmod u-x.
10807         Spotted by Paul Eggert and Bruce Korb.
10808         * modules/alloca-opt, modules/argz, modules/arpa_inet:
10809         * modules/byteswap, modules/configmake, modules/fcntl:
10810         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
10811         * modules/localcharset, modules/netinet_in, modules/poll:
10812         * modules/stdbool, modules/stdint, modules/sys_select:
10813         * modules/sys_socket, modules/sys_stat, modules/sysexits:
10814
10815 2006-09-06  Jim Meyering  <jim@meyering.net>
10816
10817         Make generated files be read-only.
10818         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
10819         Ensure that each generated file is now read-only.
10820         * modules/argz: Likewise.
10821         * modules/arpa_inet: Likewise.
10822         * modules/byteswap: Likewise.
10823         * modules/configmake: Likewise.
10824         * modules/fcntl: Likewise.
10825         * modules/fnmatch: Likewise.
10826         * modules/getopt: Likewise.
10827         * modules/glob: Likewise.
10828         * modules/inttypes: Likewise.
10829         * modules/netinet_in: Likewise.
10830         * modules/poll: Likewise.
10831         * modules/stdbool: Likewise.
10832         * modules/stdint: Likewise.
10833         * modules/sys_select: Likewise.
10834         * modules/sys_socket: Likewise.
10835         * modules/sys_stat: Likewise.
10836         * modules/sysexits: Likewise.
10837         * modules/localcharset: Same as above, but continue using temporary
10838         file named "t-$@" (why different?) rather than the "$@-t" used
10839         everywhere else.
10840
10841         * modules/sysexits (Makefile.am): Replace literal occurrences
10842         of "sysexit.h" more readable, and more consistent, "$@".
10843
10844 2006-09-06  Bruno Haible  <bruno@clisp.org>
10845
10846         * modules/striconv: New file.
10847         * modules/xstriconv: New file.
10848         * MODULES.html.sh (Internationalization functions): Add striconv,
10849         xstriconv.
10850
10851 2006-09-06  Bruno Haible  <bruno@clisp.org>
10852
10853         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
10854         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
10855         not using libtool correctly.
10856
10857 2006-09-06  Bruno Haible  <bruno@clisp.org>
10858
10859         * lib/striconv.h: New file.
10860         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
10861         iconvstring.c.
10862         * lib/xstriconv.h: New file.
10863         * lib/xstriconv.c: New file.
10864
10865 2006-09-06  Bruno Haible  <bruno@clisp.org>
10866
10867         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
10868         lib_..._LDFLAGS.
10869
10870 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10871
10872         * lib/argz_.h: Sync from Libtool.
10873
10874         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
10875                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10876
10877         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
10878
10879 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
10880
10881         * modules/trim: New file.
10882
10883 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
10884
10885         * lib/trim.h: New file.
10886         * lib/trim.c: New file.
10887
10888 2006-09-05  Bruno Haible  <bruno@clisp.org>
10889
10890         * MODULES.html.sh (String handling): Add trim.
10891
10892 2006-09-04  Karl Berry  <karl@gnu.org>
10893
10894         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
10895         until next release.
10896
10897 2006-09-03  Bruno Haible  <bruno@clisp.org>
10898
10899         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
10900         correctly.
10901
10902 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
10903
10904         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
10905         not gl_GETLOADAVG.  Omit unneeded semicolons.
10906         Problems reported by Ralf Wildenhues in
10907         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
10908         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
10909         at the end, which is the usual gnulib style.
10910
10911         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
10912         of doing all the work ourselves.
10913         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
10914         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
10915
10916 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
10917
10918         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
10919         Problem reported by Ralf Wildenhues in
10920         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
10921
10922         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
10923         HAVE_STRUCT_STATFS_F_FSTYPENAME.
10924
10925 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
10926
10927         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
10928         yesterday's patch by changing test -n to test -z.
10929
10930 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10931
10932         * modules/getloadavg (Files): Add m4/getloadavg.m4.
10933         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
10934         the former is now obsolescent.
10935
10936         * modules/chdir-long (Depends-on): Add fcntl.
10937
10938 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10939
10940         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
10941         obsolescent, and programs should use gnulib instead.
10942         * m4/getloadavg.m4: New file, with contents taken from Autoconf
10943         but with prefixes changed.
10944
10945 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10946
10947         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
10948         or stdbool.h, because they might not exist while configuring.
10949
10950         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
10951         Don't include unistd.h or limits.h; not needed, since chdir-long.h
10952         does that for us.
10953         (O_DIRECTORY): Remove.
10954
10955 2006-08-31  Eric Blake  <ebb9@byu.net>
10956
10957         * gnulib-tool: Don't let emacs change spaces to TAB.
10958
10959 2006-08-31  Bruno Haible  <bruno@clisp.org>
10960
10961         * gnulib-tool: When calling func_import more than once, do it in a
10962         subshell.
10963         Reported by Eric Blake <ebb9@byu.net>.
10964
10965 2006-08-31  Bruno Haible  <bruno@clisp.org>
10966
10967         * gnulib-tool (nl): Remove variable.
10968         (sed_transform_lib_file): Use more robust test for config-h module.
10969         (func_import): Fix typo in 2006-08-25 patch.
10970
10971 2006-08-31  Bruno Haible  <bruno@clisp.org>
10972
10973         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
10974         specified, augment Makefile.am variables instead of assigning them.
10975
10976 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
10977
10978         Work around a bug in both the Linux and SunOS 64-bit kernels:
10979         nanosleep mishandles sleeps for longer than 2**31 seconds.
10980         Problem reported by Frank v Waveren in
10981         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
10982         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
10983         Check for nanosleep bug.
10984         (LIB_NANOSLEEP): Append clock_gettime library if needed.
10985
10986 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
10987
10988         Work around a bug in both the Linux and SunOS 64-bit kernels:
10989         nanosleep mishandles sleeps for longer than 2**31 seconds.
10990         Problem reported by Frank v Waveren in
10991         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
10992         * lib/nanosleep.c (BILLION): New constant.
10993         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
10994         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
10995         implementation.
10996
10997 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
10998
10999         * modules/nanosleep (Depends-on): Add gettime.
11000
11001 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
11002         and Simon Josefsson  <jas@extundo.com>
11003         and Oskar Liljeblad  <oskar@osk.mine.nu>
11004
11005         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
11006         * gnulib-tool (func_import): New license type 'unmodifiable license
11007         text'.
11008         * modules/fdl: Use it.  Longer description.
11009         * module/gpl, module/lgpl: New files.
11010
11011 2006-08-30  Jim Meyering  <jim@meyering.net>
11012
11013         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
11014         shadowing the parameter.
11015
11016 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11017
11018         Sync from Libtool:
11019
11020         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11021
11022         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
11023         sharing with gnulib.  Report by Eric Blake.
11024
11025 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11026
11027         * modules/isapipe: New file.
11028         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
11029
11030 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11031
11032         * modules/configmake (Makefile.am): Add a comment, and omit
11033         the CONFIGMAKE_ prefix from generated macro names.  Suggested
11034         by Bruno Haible.
11035
11036 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11037
11038         * m4/isapipe.m4: New file.
11039
11040 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11041
11042         * lib/isapipe.c, lib/isapipe.h: New files.
11043
11044 2006-08-29  Jim Meyering  <jim@meyering.net>
11045
11046         * modules/configmake (Makefile.am): Make configmake.h depend on
11047         Makefile.  Otherwise, a stale configmake.h could hang around.
11048
11049 2006-08-29  Eric Blake  <ebb9@byu.net>
11050
11051         * lib/error.c (error_at_line, print_errno_message): Match libc, after
11052         resolution of upstream bug 3044.
11053
11054 2006-08-29  Bruno Haible  <bruno@clisp.org>
11055
11056         * modules/localcharset (Depends-on): Add configmake.
11057         (Makefile.am): Remove setting of LIBDIR through DEFS.
11058
11059 2006-08-29  Bruno Haible  <bruno@clisp.org>
11060
11061         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
11062         defined.
11063
11064 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
11065
11066         * modules/fcntl: New file.
11067         * modules/chdir-safer (Depends-on): Add fcntl.
11068         * modules/fts: Likewise.
11069         * modules/mkdir-p: Likewise.
11070
11071         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
11072         This undoes the most recent change, since we're now addressing the
11073         problem in a different way.
11074
11075         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
11076         into output, since the output might be called Makefile.am even
11077         if $makefile_name is something different.
11078         (func_import): Use $makefile_am rather than
11079         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
11080         empty.
11081
11082         * modules/inttypes (Files): Add m4/inttypes-h.m4.
11083
11084 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
11085
11086         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
11087         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
11088         recent change to stdint.m4, since we're now addressing the problem in a
11089         different way.
11090
11091 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
11092
11093         * m4/fcntl_h.m4: New file.
11094
11095 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
11096
11097         * lib/fcntl_.h: New file.
11098         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
11099         the fcntl module.
11100         * lib/dirchownmod.c: Likewise.
11101         * lib/fts.c: Likewise.
11102
11103         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
11104         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
11105         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
11106         just before including <inttypes.h>, to avoid circular inclusion.
11107
11108 2006-08-28  Jim Meyering  <jim@meyering.net>
11109
11110         * doc/visibility.texi: Actually read and correct the grammar of the
11111         sentence affected by yesterday's change.
11112
11113 2006-08-28  Eric Blake  <ebb9@byu.net>
11114
11115         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
11116         needs wrapper.
11117
11118 2006-08-28  Eric Blake  <ebb9@byu.net>
11119
11120         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
11121
11122 2006-08-28  Eric Blake  <ebb9@byu.net>
11123
11124         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
11125
11126 2006-08-28  Bruno Haible  <bruno@clisp.org>
11127
11128         * modules/c-strstr: New file, from GNU gettext.
11129         * MODULES.html.sh (String handling): Add c-strstr.
11130
11131 2006-08-28  Bruno Haible  <bruno@clisp.org>
11132
11133         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
11134         macros.
11135         Reported by Eric Blake.
11136
11137 2006-08-28  Bruno Haible  <bruno@clisp.org>
11138
11139         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
11140         (VASNPRINTF): Return a string of length > INT_MAX without failing.
11141         * lib/vasprintf.c: Include errno.h, limits.h.
11142         (EOVERFLOW): New fallback definition.
11143         (vasprintf): Test here whether the string length is > INT_MAX.
11144         * lib/vsnprintf.c: Include errno.h, limits.h.
11145         (EOVERFLOW): New fallback definition.
11146         (vsnprintf): Fix bug when generated string was too long for the buffer.
11147         Test here whether the string length is > INT_MAX.
11148
11149 2006-08-28  Bruno Haible  <bruno@clisp.org>
11150
11151         * lib/inttypes_.h (SCNX*): Remove definitions.
11152         Reported by Eric Blake.
11153
11154 2006-08-28  Bruno Haible  <bruno@clisp.org>
11155
11156         * lib/c-strstr.h: New file, from GNU gettext.
11157         * lib/c-strstr.c: New file, from GNU gettext.
11158
11159 2006-08-28  Bruno Haible  <bruno@clisp.org>
11160
11161         * gnulib-tool: Reorder some statements.
11162
11163 2006-08-28  Bruno Haible  <bruno@clisp.org>
11164
11165         * gnulib-tool: New option --makefile-name.
11166         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
11167         $makefile_name.
11168         (func_import): Write $makefile_name to the cache file, and read it from
11169         there unless explicitly specified. Use $makefile_name as file name
11170         instead of Makefile.am. Adjust the recommendations accordingly.
11171
11172 2006-08-28  Bruno Haible  <bruno@clisp.org>
11173
11174         * gnulib-tool (func_verify_module): Check against misapplying patch.
11175
11176 2006-08-28  Bruno Haible  <bruno@clisp.org>
11177
11178         * gnulib-tool (func_relativize, func_relconcat): New functions.
11179         Give an error if --local-dir is given with --update.
11180         Remove trailing slashes from $local_gnulib_dir.
11181         (func_import): Store the relativized $local_gnulib_dir in
11182         gnulib-cache.m4, and read it from there if not specified explicitly.
11183
11184 2006-08-28  Bruno Haible  <bruno@clisp.org>
11185
11186         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
11187         is the current directory. Respect also $local_gnulib_dir.
11188
11189 2006-08-28  Bruno Haible  <bruno@clisp.org>
11190             Simon Josefsson  <jas@extundo.com>
11191
11192         BeOS portability.
11193         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
11194
11195 2006-08-27  Jim Meyering  <jim@meyering.net>
11196
11197         * doc/visibility.texi: Remove duplicate word: "pointer".
11198
11199 2006-08-26  Bruno Haible  <bruno@clisp.org>
11200
11201         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
11202         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
11203         (Makefile.am): Create inttypes.h from inttypes_.h.
11204         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
11205
11206         * modules/imaxabs: New file.
11207
11208         * modules/imaxdiv: New file.
11209
11210 2006-08-26  Bruno Haible  <bruno@clisp.org>
11211
11212         * m4/inttypes.m4: New file.
11213         * m4/_inttypes_h.m4: Remove file.
11214         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
11215         PRI_MACROS_BROKEN.
11216         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
11217
11218         * m4/imaxabs.m4: New file.
11219
11220         * m4/imaxdiv.m4: New file.
11221
11222 2006-08-26  Bruno Haible  <bruno@clisp.org>
11223
11224         * lib/inttypes_.h: New file.
11225         * lib/inttypes.h: Remove file.
11226         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
11227
11228         * lib/imaxabs.c: New file.
11229
11230         * lib/imaxdiv.c: New file.
11231
11232 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11233
11234         New config-h module, so that "make" output needn't be cluttered
11235         by -DHAVE_CONFIG_H.
11236         * MODULES.html.sh (Support for building libraries and executables):
11237         Add config-h.
11238         * modules/config-h: New file.
11239         * gnulib-tool (nl, sed_transform_lib_file): New vars.
11240         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
11241         the config-h module is used.
11242
11243         New configmake module, so that "make" output needn't be cluttered
11244         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
11245         * MODULES.html.sh (Support for building libraries and executables):
11246         Add configmake.
11247         * modules/configmake: New file.
11248
11249 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11250
11251         * m4/config-h.m4: New file.
11252
11253 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11254
11255         * config/srclist.txt: Add elisp-comp.
11256
11257 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11258
11259         * MODULES.html.sh (Support for building libraries and executables):
11260         Add elisp-comp.
11261         * build-aux/elisp-comp: New file.
11262         * modules/elisp-comp: New file.
11263
11264 2006-08-24  Bruno Haible  <bruno@clisp.org>
11265
11266         * gnulib-tool (func_create_testdir): Use non-default values of
11267         sourcebase and m4base.
11268
11269 2006-08-24  Bruno Haible  <bruno@clisp.org>
11270
11271         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
11272         HTML structure.
11273
11274 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11275
11276         * modules/openat (Depends-on): Add lchown.
11277
11278 2006-08-23  Bruno Haible  <bruno@clisp.org>
11279
11280         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
11281         of gl_LOCK_EARLY instead of gl_LOCK.
11282
11283 2006-08-23  Bruno Haible  <bruno@clisp.org>
11284
11285         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
11286         on OSF/1 to no.
11287         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
11288
11289 2006-08-23  Bruno Haible  <bruno@clisp.org>
11290
11291         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
11292         as unusable.
11293
11294         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
11295         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
11296         (gl_LOCK): New macro.
11297
11298 2006-08-22  Simon Josefsson  <jas@extundo.com>
11299
11300         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
11301         to md5 module.
11302
11303 2006-08-22  Simon Josefsson  <jas@extundo.com>
11304
11305         * MODULES.html.sh: Add "Support for maintaining and release
11306         projects".
11307
11308         * build-aux/gnupload: New file, from coreutils.
11309
11310 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
11311
11312         Avoid the need for AC_LIBSOURCES in m4 macros.
11313         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
11314         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
11315         * modules/check-version (EXTRA_DIST): Add check-version.h.
11316         * modules/crc (EXTRA_DIST): Add crc.h.
11317         * modules/des (EXTRA_DIST): Add des.h.
11318         * modules/gc (EXTRA_DIST): Add gc.h.
11319         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
11320         * modules/getline (EXTRA_DIST): Add getline.h.
11321         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
11322         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
11323         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
11324         * modules/md2 (EXTRA_DIST): Add md2.h.
11325         * modules/md4 (EXTRA_DIST): Add md4.h.
11326         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
11327         * modules/read-file (EXTRA_DIST): Add read-file.h.
11328         * modules/readline (EXTRA_DIST): Add readline.h.
11329         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
11330         rijndael-api-fst.h.
11331
11332 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
11333
11334         * m4/rijndael.m4 (gl_ARCFOUR):
11335         * m4/arctwo.m4 (gl_ARCTWO):
11336         * m4/check-version.m4 (gl_CHECK_VERSION):
11337         * m4/crc.m4 (gl_CRC):
11338         * m4/des.m4 (gl_DES):
11339         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
11340         * m4/gc.m4 (gl_GC):
11341         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
11342         * m4/getline.m4 (gl_FUNC_GETLINE):
11343         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
11344         * m4/hmac-md5.m4 (gl_HMAC_MD5):
11345         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
11346         * m4/md2.m4 (gl_MD2):
11347         * m4/md4.m4 (gl_MD4):
11348         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
11349         * m4/read-file.m4 (gl_FUNC_READ_FILE):
11350         * m4/readline.m4 (gl_FUNC_READLINE):
11351         * m4/rijndael.m4 (gl_RIJNDAEL):
11352         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
11353         to get the necessary .h files and whatnot.
11354
11355 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
11356
11357         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
11358         gnulib rather than the other way around.
11359         * config/srclistvars.sh (COREUTILS): Remove.
11360
11361 2006-08-22  Jim Meyering  <jim@meyering.net>
11362
11363         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
11364
11365         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
11366
11367 2006-08-22  Eric Blake  <ebb9@byu.net>
11368
11369         * modules/regexprops-generic: New file.
11370         * MODULES.html.sh (Support for building documentation): List it.
11371
11372 2006-08-22  Eric Blake  <ebb9@byu.net>
11373
11374         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
11375         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
11376         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
11377         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
11378
11379 2006-08-22  Bruno Haible  <bruno@clisp.org>
11380
11381         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
11382         and lib_LTLIBRARIES like the other lib_* variables.
11383
11384 2006-08-22  Bruno Haible  <bruno@clisp.org>
11385
11386         * build-aux/x-to-1.in: New file, from GNU gettext.
11387
11388 2006-08-22  Bruno Haible  <bruno@clisp.org>
11389
11390         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
11391         <utmpx.h> exists.
11392
11393 2006-08-22  Bruno Haible  <bruno@clisp.org>
11394
11395         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
11396         <utmpx.h> exists.
11397
11398 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
11399
11400         BeOS portability.
11401         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
11402         exist.
11403         Problem reported by Bruno Haible.
11404
11405 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
11406
11407         Avoid the need for AC_LIBSOURCES in m4 macros.
11408         * modules/acl (EXTRA_DIST): Add acl.h.
11409         * modules/argmatch (Files): Add m4/argmatch.m4.
11410         (configure.ac): Add gl_ARGMATCH.
11411         (EXTRA_DIST): Renamed from lib_SOURCES, for
11412         consistency with the other modules.  Remove argmatch.c.
11413         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
11414         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
11415         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
11416         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
11417         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
11418         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
11419         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
11420         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
11421         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
11422         * modules/closeout (EXTRA_DIST): Add closeout.h.
11423         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
11424         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
11425         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
11426         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
11427         dirname.h; remove basename.c and stripslash.c.
11428         * modules/exclude (EXTRA_DIST): Add exclude.h.
11429         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
11430         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
11431         * modules/file-type (EXTRA_DIST): Add file-type.h.
11432         * modules/filemode (EXTRA_DIST): Add filemode.h.
11433         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
11434         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
11435         * modules/fpending (EXTRA_DIST): Add __fpending.h.
11436         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
11437         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
11438         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
11439         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
11440         * modules/getdate (EXTRA_DIST): Add getdate.c.
11441         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
11442         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
11443         * modules/getpass (EXTRA_DIST): Add getpass.h.
11444         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
11445         * modules/group-member (EXTRA_DIST): Add group-member.h.
11446         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
11447         * modules/hash (EXTRA_DIST): Add hash.h.
11448         * modules/human (EXTRA_DIST): Add human.h.
11449         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
11450         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
11451         * modules/lchown (EXTRA_DIST): Add lchown.h.
11452         * modules/long-options (EXTRA_DIST): Add long-options.h.
11453         * modules/lstat (EXTRA_DIST): Add lstat.h.
11454         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
11455         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
11456         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
11457         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
11458         * modules/memxor (EXTRA_DIST): Add memxor.h.
11459         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
11460         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
11461         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
11462         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
11463         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
11464         * modules/physmem (EXTRA_DIST): Add physmem.h.
11465         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
11466         * modules/posixver (EXTRA_DIST): Add posixver.h.
11467         * modules/quote (EXTRA_DIST): Add quote.h.
11468         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
11469         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
11470         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
11471         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
11472         regex_internal.h regexec.c.
11473         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
11474         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
11475         * modules/same (EXTRA_DIST): Add same.h.
11476         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
11477         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
11478         * modules/savedir (EXTRA_DIST): Add savedir.h.
11479         * modules/sha1 (EXTRA_DIST): Add sha1.h.
11480         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
11481         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
11482         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
11483         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
11484         * modules/strdup (EXTRA_DIST): Add strdup.h.
11485         * modules/strftime (EXTRA_DIST): Add strftime.h.
11486         * modules/strndup (EXTRA_DIST): Add strndup.h.
11487         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
11488         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
11489         * modules/time_r (EXTRA_DIST): Add time_r.h.
11490         * modules/timespec (EXTRA_DIST): Add timespec.h.
11491         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
11492         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
11493         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
11494         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
11495         * modules/userspec (EXTRA_DIST): Add userspec.h.
11496         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
11497         * modules/utimens (EXTRA_DIST): Add utimens.h.
11498         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
11499         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
11500         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
11501         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
11502         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
11503         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
11504         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
11505         * modules/yesno (EXTRA_DIST): Add yesno.h.
11506
11507 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
11508
11509         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
11510
11511         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
11512         * m4/dev-ino.m4, same-inode.m4: Remove.
11513
11514         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
11515         * m4/acl.m4 (AC_FUNC_ACL):
11516         * m4/backupfile.m4 (gl_BACKUPFILE):
11517         * m4/c-strtod.m4 (gl_C99_STRTOLD):
11518         * m4/canon-host.m4 (gl_CANON_HOST):
11519         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
11520         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
11521         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
11522         * m4/cloexec.m4 (gl_CLOEXEC):
11523         * m4/close-stream.m4 (gl_CLOSE_STREAM):
11524         * m4/closeout.m4 (gl_CLOSEOUT):
11525         * m4/dirfd.m4 (gl_FUNC_DIRFD):
11526         * m4/dirname.m4 (gl_DIRNAME):
11527         * m4/exclude.m4 (gl_EXCLUDE):
11528         * m4/exitfail.m4 (gl_EXITFAIL):
11529         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
11530         * m4/file-type.m4 (gl_FILE_TYPE):
11531         * m4/filemode.m4 (gl_FILEMODE):
11532         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
11533         * m4/fpending.m4 (gl_FUNC_FPENDING):
11534         * m4/fprintftime.m4 (gl_FPRINTFTIME):
11535         * m4/fts.m4 (gl_FUNC_FTS):
11536         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
11537         * m4/getdate.m4 (gl_GETDATE):
11538         * m4/gethrxtime.m4 (gl_GETHRXTIME):
11539         * m4/getpagesize.m4 (gl_GETPAGESIZE):
11540         * m4/getpass.m4 (gl_FUNC_GETPASS):
11541         * m4/gettime.m4 (gl_GETTIME):
11542         * m4/getugroups.m4 (gl_GETUGROUPS):
11543         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
11544         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
11545         * m4/hard-locale.m4 (gl_HARD_LOCALE):
11546         * m4/hash.m4 (gl_HASH):
11547         * m4/idcache.m4 (gl_IDCACHE):
11548         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
11549         * m4/lchown.m4 (gl_FUNC_LCHOWN):
11550         * m4/long-options.m4 (gl_LONG_OPTIONS):
11551         * m4/lstat.m4 (gl_FUNC_LSTAT):
11552         * m4/md5.m4 (gl_MD5):
11553         * m4/memcasecmp.m4 (gl_MEMCASECMP):
11554         * m4/memcoll.m4 (gl_MEMCOLL):
11555         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
11556         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
11557         * m4/memxor.m4 (gl_MEMXOR):
11558         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
11559         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
11560         * m4/modechange.m4 (gl_MODECHANGE):
11561         * m4/mountlist.m4 (gl_MOUNTLIST):
11562         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
11563         * m4/openat.m4 (gl_FUNC_OPENAT):
11564         * m4/pathmax.m4 (gl_PATHMAX):
11565         * m4/physmem.m4 (gl_PHYSMEM):
11566         * m4/posixtm.m4 (gl_POSIXTM):
11567         * m4/posixver.m4 (gl_POSIXVER):
11568         * m4/quote.m4 (gl_QUOTE):
11569         * m4/quotearg.m4 (gl_QUOTEARG):
11570         * m4/readtokens.m4 (gl_READTOKENS):
11571         * m4/readutmp.m4 (gl_READUTMP):
11572         * m4/regex.m4 (gl_REGEX):
11573         * m4/safe-read.m4 (gl_SAFE_READ):
11574         * m4/safe-write.m4 (gl_SAFE_WRITE):
11575         * m4/same.m4 (gl_SAME):
11576         * m4/save-cwd.m4 (gl_SAVE_CWD):
11577         * m4/savedir.m4 (gl_SAVEDIR):
11578         * m4/settime.m4 (gl_SETTIME):
11579         * m4/sha1.m4 (gl_SHA1):
11580         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
11581         * m4/stat-macros.m4 (gl_STAT_MACROS):
11582         * m4/stat-time.m4 (gl_STAT_TIME):
11583         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
11584         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
11585         * m4/strdup.m4 (gl_FUNC_STRDUP):
11586         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
11587         * m4/strndup.m4 (gl_FUNC_STRNDUP):
11588         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
11589         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
11590         * m4/time_r.m4 (gl_TIME_R):
11591         * m4/timespec.m4 (gl_TIMESPEC):
11592         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
11593         * m4/unlinkdir.m4 (gl_UNLINKDIR):
11594         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
11595         * m4/userspec.m4 (gl_USERSPEC):
11596         * m4/utimecmp.m4 (gl_UTIMECMP):
11597         * m4/utimens.m4 (gl_UTIMENS):
11598         * m4/xalloc.m4 (gl_XALLOC):
11599         * m4/xgetcwd.m4 (gl_XGETCWD):
11600         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
11601         * m4/xreadlink.m4 (gl_XREADLINK):
11602         * m4/xstrtod.m4 (gl_XSTRTOD):
11603         * m4/yesno.m4 (gl_YESNO):
11604         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
11605         to get the necessary .h files and whatnot.
11606
11607 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
11608             Bruno Haible  <bruno@clisp.org>
11609
11610         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
11611         /bin/sh understanding of '!' conditional negation.
11612
11613 2006-08-21  Jim Meyering  <jim@meyering.net>
11614
11615         * modules/openat (Depends-on): Really alphabetize.
11616
11617         * modules/acl (Depends-on): Add error and quote.
11618
11619         * check-module (find_included_lib_files): Add at-func.c to the
11620         ok-to-include-more-than-once white list.
11621
11622         * modules/openat (Depends-on): Add lstat.  Alphabetize.
11623
11624 2006-08-21  Bruno Haible  <bruno@clisp.org>
11625
11626         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
11627         Emit a pkgdata_DATA variable only if some snippets add contents to it.
11628         Reported by Martin Lambers <marlam@marlam.de>.
11629
11630 2006-08-21  Bruno Haible  <bruno@clisp.org>
11631
11632         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
11633         specify an installation location, don't emit a noinst_LIBRARIES or
11634         noinst_LTLIBRARIES assignment.
11635
11636 2006-08-21  Bruno Haible  <bruno@clisp.org>
11637
11638         BeOS portability.
11639         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
11640         BeOS has mbrtowc() but no <wctype.h>.
11641
11642 2006-08-21  Bruno Haible  <bruno@clisp.org>
11643
11644         BeOS portability.
11645         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
11646         exist.
11647
11648 2006-08-21  Bruno Haible  <bruno@clisp.org>
11649
11650         BeOS portability.
11651         * lib/mbchar.h: Include <wctype.h> only if it exists.
11652
11653 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11654
11655         Remove files that are no longer needed by their respective modules.
11656         * m4/obstack.m4: Remove.
11657         * m4/strerror_r.m4: Remove.
11658         * m4/uint32_t.m4: Remove.
11659         * m4/uintptr_t.m4: Remove.
11660         * m4/ullong_max.m4: Remove.
11661         * m4/xstrtoimax.m4: Remove.
11662         * m4/xstrtoumax.m4: Remove.
11663
11664         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
11665         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
11666         dependencies now capture this.
11667
11668         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
11669         Do not use AC_LIBSOURCES, since gnulib modules now do this.
11670         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
11671         * m4/human.m4 (gl_HUMAN): Likewise.
11672         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
11673         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
11674
11675         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
11676
11677         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
11678         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
11679         stdint.
11680         * m4/human.m4 (gl_HUMAN): Likewise.
11681         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
11682         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
11683         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
11684         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
11685         * m4/xstrtol (gl_XSTRTOL): Likewise.
11686
11687         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
11688         AC_TYPE_LONG_LONG_INT.
11689         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
11690         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
11691         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
11692         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
11693
11694         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
11695         on stdbool.
11696
11697         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
11698         (gl_PREREQ_XSTRTOUL): Remove.
11699
11700         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
11701
11702         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
11703         mode.
11704
11705 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11706
11707         Add and change modules to make it easier for coreutils to use
11708         gnulib-tool.
11709         * modules/backupfile (Files): Remove m4/d-ino.m4.
11710         (Depends-on): Add d-ino.
11711         * modules/cycle-check (Depends-on): Add stdint.
11712         (lib_SOURCES): Add cycle-check.h.
11713         * modules/d-ino: New module.
11714         * modules/d-type: New module.
11715         * modules/error (Files): Remove m4/strerror_r.m4.
11716         * modules/filemode (Files): Add m4/st_dm_mode.m4.
11717         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
11718         m4/inttypes_h.m4, m4/uintmax_t.m4.
11719         (Depends-on): Add stdint.
11720         (lib_SOURCES): Add fsusage.h.
11721         * modules/getcwd (Files): Remove d-ino.m4.
11722         (Depends-on): Add d-ino.
11723         * modules/getndelim2 (Depends-on): Add stdint.
11724         * modules/glob (Files): Remove m4/d-type.m4.
11725         (Depends-on): Add d-type.
11726         * modules/host-os: New module.
11727         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
11728         m4/inttypes_h.m4, m4/uintmax_t.m4.
11729         * Depends-on: Add stdint.
11730         (lib_SOURCES): Add human.h.
11731         * modules/inttostr (Files): Remove m4/intmax_t.m4,
11732         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
11733         m4/uintmax_t.m4, m4/ulonglong.m4.
11734         (Depends-on): Add stdint.
11735         (EXTRA_DIST): Add inttostr.h.
11736         * modules/lchmod: New module.
11737         * modules/link-follow: New module.
11738         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
11739         (Depends-on): Add lchmod.
11740         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
11741         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
11742         (Depends-on): Add stdint.
11743         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
11744         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
11745         (Depends-on): Add stdint.
11746         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
11747         * modules/perl: New module.
11748         * modules/regex (Depends-on): Add stdint.
11749         * modules/rmdir-errno: New module.
11750         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
11751         m4/intmax_t.m4.
11752         (Depends-on): Add stdint.
11753         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
11754         m4/uintmax_t.m4.
11755         (Depends-on): Add stdint.
11756         * modules/unlink-busy: New module.
11757         * modules/utimecmp (Depends-on): Add stdint.
11758         * modules/uptime: New module.
11759         * modules/winsz-ioctl: New module.
11760         * modules/winsz-termios: New module.
11761         * modules/xnanosleep (Depends-on): Add nanosleep.
11762         * modules/ullong_max: Remove.
11763         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
11764         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
11765         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
11766         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
11767         (Depends-on): Add inttypes.
11768         (lib_SOURCES): Add xstrtol.h.
11769         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
11770         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
11771         * MODULES.html.sh: Move 'assert' into the assert section.
11772         Move 'dummy' into the linking section.
11773         Remove ullong_max.
11774         Add section for compatibility checks for POSIX:2001 functions,
11775         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
11776         winsz-ioctl, and winsz-termios into it.
11777         Add lchmod.
11778         Add top-level Misc section and put host-os, perl, and uptime
11779         into it.
11780
11781 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11782
11783         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
11784         now assume the stdint module.  Do not include inttypes.h.
11785         * lib/fsusage.h: Likewise.
11786         * lib/getndelim2.c: Likewise.
11787         * lib/human.h: Likewise.
11788         * lib/inttostr.h: Likewise.
11789         * lib/obstack.c: Likewise.
11790         * lib/regex_internal.h: Likewise.
11791         * lib/tempname.c: Likewise.
11792         * lib/utimecmp.c: Likewise.
11793         * lib/xstrtol.h: Likewise.
11794
11795         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
11796
11797         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
11798         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
11799         * lib/xtime.h: Likewise.
11800
11801 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
11802
11803         * modules/openat (Files): Add lib/fchmodat.c.
11804         Fixes problem reported by Jay Youngman.
11805
11806 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
11807
11808         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
11809         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
11810
11811 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
11812             Bruno Haible  <bruno@clisp.org>
11813
11814         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
11815         and is a script that invokes bison. Tighten the code. Add comments.
11816
11817 2006-08-18  Jim Meyering  <jim@meyering.net>
11818
11819         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
11820         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
11821         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
11822         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
11823
11824 2006-08-18  Bruno Haible  <bruno@clisp.org>
11825
11826         * modules/bison-i18n: New file.
11827         * MODULES.html.sh (Internationalization functions): Add it.
11828
11829 2006-08-18  Bruno Haible  <bruno@clisp.org>
11830
11831         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
11832         sys/statvfs.h. When getmntinfo was found, check its declaration and
11833         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
11834
11835 2006-08-18  Bruno Haible  <bruno@clisp.org>
11836
11837         * m4/bison-i18n.m4: New file, from bison.
11838
11839 2006-08-18  Bruno Haible  <bruno@clisp.org>
11840
11841         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
11842         (ME_DUMMY): Treat "kernfs" as a dummy.
11843         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
11844
11845 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
11846
11847         Update from coreutils.
11848
11849         2006-08-15  Jim Meyering  <jim@meyering.net>
11850
11851         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
11852
11853         2006-01-17  Jim Meyering  <jim@meyering.net>
11854
11855         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
11856
11857         2006-01-11  Jim Meyering  <jim@meyering.net>
11858
11859         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
11860         Check for the lchmod function.
11861
11862 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
11863
11864         Update from coreutils.
11865
11866         * lib/__fpending.h: Add copyright notice.
11867         * lib/fprintftime.h: Likewise.
11868         * lib/savedir.c: Use (C) in copyright notice.
11869         * lib/savedir.h: Likewise.
11870
11871         2006-08-15  Jim Meyering  <jim@meyering.net>
11872
11873         * lib/at-func.c: New file, with the logic of all emulated at-functions.
11874         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
11875         in support of the EXPECTED_ERRNO macro.
11876         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
11877         definitions.  Instead, define the appropriate symbols and include
11878         "at-func.c".
11879         * lib/mkdirat.c (mkdirat): Likewise.
11880         * lib/fchmodat.c (fchmodat): Likewise.
11881         (ENOSYS): Remove definition.
11882         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
11883         it.  Don't include "unistd--.h" -- it wasn't ever used.
11884
11885         2006-01-17  Jim Meyering  <jim@meyering.net>
11886
11887         Rewrite fts.c not to change the current working directory,
11888         by using openat, fstatat, fdopendir, etc..
11889
11890         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
11891         (HAVE_OPENAT_SUPPORT): Define.
11892         [_LIBC] (fchdir): Don't undef or define; no longer used.
11893         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
11894         Now, this `function' always succeeds, and consumes its file descriptor
11895         parameter -- so callers must not close such FDs.  Update callers.
11896         (diropen_fd, opendirat, cwd_advance_fd): New functions.
11897         (diropen): Add parameter, SP.  Adjust all callers.
11898         Implement using diropen_fd, rather than open.
11899         (fts_open): Initialize new member, fts_cwd_fd.
11900         Remove fts_rft-setting code.
11901         (fts_close): Close fts_cwd_fd, if necessary.
11902         (__opendir2): Define in terms of opendir or opendirat,
11903         depending on whether the FST_NOCHDIR flag is set.
11904         (fts_build): Since fts_safe_changedir consumes its FD, and since
11905         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
11906         and close the dup'd file descriptor upon failure.
11907         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
11908         (fts_safe_changedir): Tweak semantics to reflect that this function
11909         now calls cwd_advance_fd and hence consumes its FD argument.
11910         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
11911         [struct FTS] (fts_rft): Remove now-unused member.
11912         [struct FTS] (fts_cycle.state): Improve comment.
11913
11914         * lib/openat.c (openat_needs_fchdir): New function.
11915         * lib/openat.h (openat_needs_fchdir): Declare it.
11916
11917 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
11918
11919         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
11920         Problem and fix reported by Pádraig Brady in
11921         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
11922
11923 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
11924
11925         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
11926
11927 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
11928
11929         * lib/memcoll.c (memcoll): Optimize for the common case where the
11930         arguments are bytewise equal.
11931
11932 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
11933
11934         * doc/regexprops-generic.texi: Add a copyright notice.
11935
11936 2006-08-15  Bruno Haible  <bruno@clisp.org>
11937
11938         * modules/tmpdir (License): Change to LGPL.
11939
11940 2006-08-15  Bruno Haible  <bruno@clisp.org>
11941
11942         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
11943         module.
11944
11945 2006-08-14  Simon Josefsson  <jas@extundo.com>
11946
11947         * config/srclist.txt: Add gnupload.
11948
11949 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
11950
11951         Change copyright notice from LGPL 2 to GPL 2, since that's the
11952         standard form used in the gnulib repository.
11953         * tests/test-lock.c: Likewise.
11954         * tests/test-stdint.c: Likewise.
11955         * tests/test-tls.c: Likewise.
11956
11957         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
11958         prelude-manager.  User shorter URLs for GNU projects, without '?'.
11959         Add copyright notice.
11960
11961         * check-module: Add copyright notice.  Output a copyright
11962         notice if "--version" is specified.
11963         * modules/COPYING: New file.
11964         * tests/test-getaddrinfo.c: Add copyright notice.
11965         * tests/test-verify.c: Likewise.
11966
11967 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
11968
11969         Change copyright notice from LGPL 2 to GPL 2, since that's the
11970         standard form used in the gnulib repository.
11971         * lib/lock.c: LGPL -> GPL.
11972         * lib/lock.h: Likewise.
11973         * lib/strnlen1.c: Likewise.
11974         * lib/strnlen1.h: Likewise.
11975         * lib/tls.c: Likewise.
11976         * lib/tls.h: Likewise.
11977         * lib/tmpdir.c: Likewise.
11978
11979         * lib/TODO: Remove; this belongs only in coreutils.
11980
11981 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
11982
11983         Add copyright notices to long-enough files that lack them, since
11984         otherwise the files aren't clearly free.  Use the same notice that
11985         getdate.texi already uses.
11986         * doc/alloca-opt.texi: Add copyright notice.
11987         * doc/alloca.texi: Likewise.
11988         * doc/ctime.texi: Likewise.
11989         * doc/functions.texi: Likewise.
11990         * doc/gcd.texi: Likewise.
11991         * doc/gnulib-tool.texi: Likewise.
11992         * doc/inet_ntoa.texi: Likewise.
11993         * doc/visibility.texi: Likewise.
11994
11995         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
11996         * doc/quote.texi: Add copyright notice.
11997
11998         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
11999         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
12000         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
12001         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
12002         is now obsolete, and give a pointer to the Sun list.
12003         Add copyright notice.
12004
12005 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
12006
12007         * config/srclistvars.sh: Add copyright notice.
12008
12009 2006-08-14  Eric Blake  <ebb9@byu.net>
12010
12011         Import the following change from libc:
12012
12013         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
12014
12015         Upstream bug 2997.
12016         * lib/misc/error.c: Add space between program name and message if file
12017         name is missing.
12018
12019 2006-08-12  Karl Berry  <karl@gnu.org>
12020
12021         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
12022         remove, these originate in gnulib now.
12023
12024 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12025
12026         * doc/Makefile (standards.info standards.html standards.dvi):
12027         Also depend on make-stds.texi.
12028
12029 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
12030
12031         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
12032         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
12033
12034         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
12035         in wchar_t.  Problem reported by Eric Blake.
12036
12037         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
12038         LEN is smaller than SIZE.  Suggested by Bruno Haible.
12039         Also, help the compiler to keep LEN in a register.
12040
12041 2006-08-11  Eric Blake  <ebb9@byu.net>
12042
12043         * users.txt: Sort.  Add tar.
12044
12045 2006-08-11  Bruno Haible  <bruno@clisp.org>
12046
12047         * users.txt: New file.
12048
12049 2006-08-11  Bruno Haible  <bruno@clisp.org>
12050
12051         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
12052         before <wchar.h>. Needed for OSF/1 and BSD/OS.
12053
12054 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
12055
12056         * modules/snprintf (Depends-on): Remove minmax.
12057         (Maintainer): Add self and Bruno.
12058
12059 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
12060
12061         * lib/.cppi-disable: Add snprintf.h, socket_.h.
12062         * lib/snprintf.c: Include <errno.h> and <limits.h>.
12063         (EOVERFLOW): Define if the system does not.
12064         Do not include "minmax.h"; it wasn't used.
12065         (snprintf): Don't assume size_t promotes to an unsigned type.
12066         Fix bug when generated string was too long for the buffer: the
12067         buffer's contents are supposed to be the initial prefix of the
12068         output.  Don't assume vasnprintf returns EOVERFLOW if the size
12069         exceeds INT_MAX; do the check ourselves.
12070
12071         Import the following changes from libc:
12072
12073         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
12074
12075         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
12076         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
12077         set wc to the byte which couldn't be converted.
12078         (re_string_reconstruct): Don't clear valid_raw_len before calling
12079         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
12080         tip_context using re_string_context_at.
12081
12082         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
12083
12084         * lib/posix/regex.h: g++ still cannot handled [restrict].
12085
12086         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
12087
12088         * lib/posix/regex.h: Remove special handling for VMS.
12089
12090 2006-08-10  Jim Meyering  <jim@meyering.net>
12091
12092         * modules/same-inode: New module.
12093         * modules/dev-ino: New module.
12094         * modules/cycle-check: Depend on these modules, rather than simply
12095         including their .h files.
12096         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
12097         required via m4/cycle-check.m4.
12098         * modules/same: Depend on new same-inode module, rather than
12099         including same-inode.h.
12100         * modules/chdir-safer: New file.
12101
12102         * modules/chown (Depends-on): Add stat-macros.
12103
12104 2006-08-10  Jim Meyering  <jim@meyering.net>
12105
12106         * m4/cycle-check.m4: New file.
12107         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
12108         * m4/dev-ino.m4, m4/same-inode.m4: New files.
12109
12110 2006-08-10  Eric Blake  <ebb9@byu.net>
12111
12112         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
12113         in from original proposal.
12114
12115 2006-08-10  Eric Blake  <ebb9@byu.net>
12116         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12117
12118         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
12119         namespace.
12120
12121 2006-08-10  Bruno Haible  <bruno@clisp.org>
12122
12123         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
12124         as well.
12125
12126 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
12127
12128         Sync from coreutils.
12129
12130         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
12131
12132         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
12133         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
12134
12135 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
12136
12137         * modules/restrict: Remove; no longer needed now that we assume
12138         Autoconf 2.59 or later.
12139         * MODULES.html.sh: Remove 'restrict'.
12140         * modules/argp (Depends-on): Remove 'restrict'.
12141         * modules/base64 (Depends-on): Likewise.
12142         * modules/gc (Depends-on): Likewise.
12143         * modules/getaddrinfo (Depends-on): Likewise.
12144         * modules/glob (Depends-on): Likewise.
12145         * modules/inet_ntop (Depends-on): Likewise.
12146         * modules/inet_pton (Depends-on): Likewise.
12147         * modules/memxor (Depends-on): Likewise.
12148         * modules/regex (Depends-on): Likewise.
12149         * modules/strtok_r (Depends-on): Likewise.
12150         * modules/time_r (Depends-on): Likewise.
12151
12152 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
12153
12154         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
12155         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
12156         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
12157         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
12158         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
12159         * m4/memxor.m4 (gl_MEMXOR): Likewise.
12160         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
12161         gl_C_RESTRICT replaced by AC_C_RESTRICT.
12162
12163         Merge from coreutils.
12164         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
12165         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
12166         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
12167         * m4/time_r.m4 (gl_TIME_R): Likewise.
12168
12169 2006-08-09  Karl Berry  <karl@gnu.org>
12170
12171         * config/srclist.txt: no more gettext-tools, per Bruno.
12172
12173 2006-08-08  Eric Blake  <ebb9@byu.net>
12174
12175         * modules/verror: New module.
12176         * MODULES.html.sh: Document it.
12177
12178 2006-08-08  Eric Blake  <ebb9@byu.net>
12179
12180         * lib/verror.h, lib/verror.c: New files.
12181
12182 2006-08-08  Eric Blake  <ebb9@byu.net>
12183
12184         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
12185         verror_at_line output complies with GNU Coding Standards even when
12186         file is NULL.
12187
12188 2006-08-07  Bruno Haible  <bruno@clisp.org>
12189
12190         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
12191         versions of AIX.
12192         Reported by Ralf Wildenhues.
12193
12194 2006-08-07  Bruno Haible  <bruno@clisp.org>
12195
12196         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
12197         in an AC_DEFUN. Needed so that the autoconf snippets can use
12198         AC_REQUIRE.
12199
12200 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12201
12202         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
12203         Initialize pkgdata_DATA.
12204         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
12205         overriding it.
12206
12207 2006-08-06  Eric Blake  <ebb9@byu.net>
12208
12209         * lib/error.h: Fold in some upstream changes from glibc.
12210         * lib/error.c: Likewise.
12211
12212 2006-08-04  Bruno Haible  <bruno@clisp.org>
12213
12214         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
12215         Make the mostlyclean-local rule depend on mostlyclean-generic.
12216         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
12217
12218 2006-07-31  Bruno Haible  <bruno@clisp.org>
12219
12220         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
12221         <stdlib.h>, <string.h>.
12222
12223 2006-07-30  Bruno Haible  <bruno@clisp.org>
12224
12225         * modules/readlink (License): Change to LGPL.
12226
12227 2006-07-30  Bruno Haible  <bruno@clisp.org>
12228
12229         * modules/javaversion (Makefile.am): Distribute javaversion.java and
12230         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
12231         set PKGDATADIR to point to it.
12232
12233 2006-07-30  Bruno Haible  <bruno@clisp.org>
12234
12235         * modules/csharpexec (configure.ac): Comment out macro invocation.
12236         * modules/javaexec (configure.ac): Likewise.
12237         * modules/javacomp-script (configure.ac): Likewise.
12238
12239         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
12240
12241 2006-07-30  Bruno Haible  <bruno@clisp.org>
12242
12243         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
12244         linked-list.
12245
12246 2006-07-30  Bruno Haible  <bruno@clisp.org>
12247
12248         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
12249
12250 2006-07-30  Bruno Haible  <bruno@clisp.org>
12251
12252         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
12253         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
12254         get removed.
12255
12256 2006-07-29  Bruno Haible  <bruno@clisp.org>
12257
12258         Make it possible for gnulib-tool to work with locally modified or
12259         augmented gnulib repositories.
12260         * gnulib-tool (func_usage): Document --local-dir option.
12261         (local_gnulib_dir): New variable.
12262         Handle --local-dir option.
12263         (func_lookup_file): New function.
12264         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
12265         (func_get_description, func_get_filelist, func_get_description,
12266         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
12267         func_get_automake_snippet, func_get_include_directive,
12268         func_get_license, func_get_maintainer): Use func_lookup_file.
12269         (func_import, func_create_testdir): Use func_lookup_file.
12270
12271 2006-07-29  Bruno Haible  <bruno@clisp.org>
12272
12273         * modules/setenv (Depends-on): Add unistd.
12274
12275 2006-07-29  Bruno Haible  <bruno@clisp.org>
12276
12277         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
12278
12279 2006-07-29  Bruno Haible  <bruno@clisp.org>
12280
12281         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
12282
12283 2006-07-29  Bruno Haible  <bruno@clisp.org>
12284
12285         * gnulib-tool (import, update): If there is no Makefile.am, look at
12286         aclocal.m4, instead of bailing out.
12287
12288 2006-07-29  Bruno Haible  <bruno@clisp.org>
12289
12290         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
12291         Categorize the options by when they are useful.
12292
12293 2006-07-29  Bruno Haible  <bruno@clisp.org>
12294
12295         * gnulib-tool (func_usage): Document option --no-libtool.
12296         Handle option --no-libtool.
12297         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
12298         for changed semantics of $libtool variable.
12299         (func_import): Likewise. If libtool is not used, show this through
12300         an option --no-libtool.
12301         (func_create_testdir): Update.
12302
12303 2006-07-29  Bruno Haible  <bruno@clisp.org>
12304
12305         * gnulib-tool (func_import): Extend error message about missing
12306         --doc-base.
12307
12308 2006-07-29  Bruno Haible  <bruno@clisp.org>
12309
12310         * gnulib-tool (func_import): Don't create the $docbase directory if
12311         there is no file to store there.
12312
12313 2006-07-29  Bruno Haible  <bruno@clisp.org>
12314
12315         * gnulib-tool (autoconf_minversion): If a --dir option is given and
12316         relevant, look for configure.ac there, not in the current directory.
12317         Also use a simple search for AC_PREREQ, not "autoconf --trace".
12318
12319 2006-07-29  Bruno Haible  <bruno@clisp.org>
12320
12321         * gnulib-tool (SORT): New variable.
12322         (func_usage): Undocument --assume-autoconf option.
12323         Remove --assume-autoconf option handling.
12324         (autoconf_minversion): Determine from the contents of configure.ac.
12325         (func_import): Remove autoconf_minversion handling.
12326         Suggested by Eric Blake.
12327
12328 2006-07-29  Bruno Haible  <bruno@clisp.org>
12329
12330         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
12331
12332 2006-07-29  Bruno Haible  <bruno@clisp.org>
12333
12334         * config/srclist.txt (*setenv.[ch]): Remove rules.
12335
12336 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12337
12338         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
12339
12340 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12341
12342         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
12343         arpa/inet.h.
12344
12345 2006-07-28  Simon Josefsson  <jas@extundo.com>
12346
12347         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
12348         * modules/inet_pton (Depends-on): Likewise.
12349
12350 2006-07-28  Simon Josefsson  <jas@extundo.com>
12351
12352         * m4/netinet_in_h.m4: New file.
12353
12354 2006-07-28  Simon Josefsson  <jas@extundo.com>
12355
12356         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
12357         #include's.
12358
12359 2006-07-28  Simon Josefsson  <jas@extundo.com>
12360
12361         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
12362         #include's.
12363
12364 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
12365
12366         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
12367         setgid on directories only if they set these bits.
12368         * lib/modechange.h: Remove obsolete comment about masks.
12369
12370 2006-07-28  Eric Blake  <ebb9@byu.net>
12371
12372         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
12373         macro expansion.
12374
12375 2006-07-28  Bruno Haible  <bruno@clisp.org>
12376
12377         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
12378
12379 2006-07-28  Bruno Haible  <bruno@clisp.org>
12380
12381         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
12382
12383 2006-07-28  Bruno Haible  <bruno@clisp.org>
12384
12385         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
12386         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
12387         Define fallbacks.
12388         Avoids link error on FreeBSD 4.x.
12389         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
12390
12391         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
12392         encoding.
12393         * lib/mbswidth.c (iswcntrl): Likewise.
12394
12395 2006-07-27  Bruno Haible  <bruno@clisp.org>
12396
12397         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
12398         test.
12399
12400 2006-07-27  Bruno Haible  <bruno@clisp.org>
12401
12402         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
12403         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
12404         defined.
12405
12406 2006-07-26  Eric Blake  <ebb9@byu.net>
12407
12408         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
12409
12410 2006-07-26  Eric Blake  <ebb9@byu.net>
12411
12412         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
12413         like mingw that lack mkstemp.
12414         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
12415         avoid compilation warning on mingw.
12416
12417 2006-07-26  Bruno Haible  <bruno@clisp.org>
12418
12419         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
12420         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
12421         INT_FAST*_MIN, INTPTR_MIN.
12422
12423 2006-07-25  Bruno Haible  <bruno@clisp.org>
12424
12425         * modules/version-etc (Depends-on): Add stdarg.
12426
12427 2006-07-25  Bruno Haible  <bruno@clisp.org>
12428
12429         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
12430         complex commands.
12431
12432 2006-07-25  Bruno Haible  <bruno@clisp.org>
12433
12434         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
12435         defined in <stdarg.h> or config.h.
12436
12437 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
12438
12439         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
12440         (gl_STDIO_SAFER): Remove.
12441
12442 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
12443
12444         * MODULES.html.sh (File stream based Input/Output):
12445         Add fopen-safer, tmpfile-safer; remove stdio-safer.
12446         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
12447         * modules/fopen-safer, modules/tmpfile-safer: New files.
12448         * modules/stdio-safer: Remove.
12449
12450 2006-07-24  Bruno Haible  <bruno@clisp.org>
12451
12452         * modules/tmpdir: New file.
12453         * MODULES.html.sh (File system functions): Add it.
12454
12455 2006-07-24  Bruno Haible  <bruno@clisp.org>
12456
12457         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
12458         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
12459
12460 2006-07-24  Bruno Haible  <bruno@clisp.org>
12461
12462         * modules/clean-temp: New file.
12463
12464 2006-07-24  Bruno Haible  <bruno@clisp.org>
12465
12466         * m4/tmpdir.m4: New file, from GNU gettext.
12467
12468 2006-07-24  Bruno Haible  <bruno@clisp.org>
12469
12470         * lib/tmpdir.h: New file, from GNU gettext.
12471         * lib/tmpdir.c: New file, from GNU gettext.
12472
12473 2006-07-24  Bruno Haible  <bruno@clisp.org>
12474
12475         * lib/clean-temp.h: New file, from GNU gettext.
12476         * lib/clean-temp.c: New file, from GNU gettext.
12477
12478 2006-07-23  Eric Blake  <ebb9@byu.net>
12479
12480         * modules/stdio-safer (Files): Add tmpfile-safer.c.
12481         (Depends-on): Add binary-io.
12482
12483 2006-07-23  Eric Blake  <ebb9@byu.net>
12484
12485         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
12486
12487 2006-07-23  Eric Blake  <ebb9@byu.net>
12488
12489         * lib/tmpfile-safer.c: New file.
12490         * lib/stdio-safer.h (fopen_safer): Add prototype.
12491         * lib/stdio--.h (tmpfile): Make safer.
12492
12493 2006-07-23  Bruno Haible  <bruno@clisp.org>
12494
12495         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
12496         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
12497         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
12498         gl_linked_remove_at): Use it.
12499
12500 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12501         and Simon Josefsson <jas@extundo.com>
12502
12503         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
12504
12505         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
12506
12507 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
12508
12509         * modules/close-stream: New file.
12510         * modules/closeout (Description): Make it clear that it exits
12511         with a diagnostic on error.
12512         (Depends-on): Add close-stream.  Remove fpending, stdbool.
12513         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
12514
12515 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
12516
12517         * m4/close-stream.m4: New file.
12518
12519 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
12520
12521         * lib/close-stream.c, lib/close-stream.h: New files.
12522
12523 2006-07-22  Bruno Haible  <bruno@clisp.org>
12524
12525         Merge from GNU gettext 0.15.
12526
12527         2006-05-01  Bruno Haible  <bruno@clisp.org>
12528
12529                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
12530
12531         2006-07-22  Bruno Haible  <bruno@clisp.org>
12532
12533                 * modules/javaversion: New file.
12534                 * MODULES.html.sh (Java): Add javaversion.
12535
12536         2006-03-12  Bruno Haible  <bruno@clisp.org>
12537
12538                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
12539
12540         2005-12-04  Bruno Haible  <bruno@clisp.org>
12541
12542                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
12543                 (untested).
12544
12545         2006-06-21  Bruno Haible  <bruno@clisp.org>
12546
12547                 Avoid warnings from recent versions of mcs.
12548                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
12549                 -o, -L, -r any more. Use options documented since mcs-1.0
12550                 instead. Similarly for -g.
12551
12552         2005-12-04  Bruno Haible  <bruno@clisp.org>
12553
12554                 * build-aux/csharpcomp.sh.in: Suffix for resources is
12555                 .resources, not .resource.
12556
12557         2005-07-09  Bruno Haible  <bruno@clisp.org>
12558
12559                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
12560                 add a .dll suffix.
12561                 Reported by Mark Junker <mjscod@gmx.de>.
12562
12563         2006-07-22  Bruno Haible  <bruno@clisp.org>
12564
12565                 * modules/gettext: Upgrade to gettext-0.15.
12566                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
12567                 m4/visibility.m4.
12568                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
12569
12570 2006-07-22  Bruno Haible  <bruno@clisp.org>
12571
12572         Merge from GNU gettext 0.15.
12573
12574         2006-03-25  Bruno Haible  <bruno@clisp.org>
12575
12576                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
12577
12578         2006-07-21  Bruno Haible  <bruno@clisp.org>
12579
12580                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
12581                 "1.1".
12582
12583         2006-05-09  Bruno Haible  <bruno@clisp.org>
12584
12585                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
12586                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
12587                 for the conftestver execution.
12588
12589         2006-05-01  Bruno Haible  <bruno@clisp.org>
12590
12591                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
12592                 optional target-version argument. Verify that the compiler
12593                 groks source of the specified source-version, or add -source
12594                 option as necessary. Verify that the compiler produces
12595                 bytecode in the specified target-version, or add -target and
12596                 -source options as necessary. Make the result of the test
12597                 available as variable CONF_JAVAC. Also log error output in
12598                 config.log.
12599
12600         2006-03-11  Bruno Haible  <bruno@clisp.org>
12601
12602                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
12603
12604         2006-05-09  Bruno Haible  <bruno@clisp.org>
12605
12606                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
12607                 CLASSPATH_SEPARATOR to a semicolon.
12608
12609         2006-03-12  Bruno Haible  <bruno@clisp.org>
12610
12611                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
12612                 available as variable CONF_JAVA, for subsequent autoconf
12613                 tests. Also log error output in config.log.
12614
12615         2006-07-19  Bruno Haible  <bruno@clisp.org>
12616
12617                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
12618                 that getline works on glibc2 systems. Needed to avoid trouble
12619                 in relocatable.c.
12620                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
12621
12622         2005-12-04  Bruno Haible  <bruno@clisp.org>
12623
12624                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
12625                 launcher (untested).
12626
12627         2005-12-04  Bruno Haible  <bruno@clisp.org>
12628
12629                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
12630
12631         2006-07-22  Bruno Haible  <bruno@clisp.org>
12632
12633                 * gettext.m4: Update from GNU gettext-0.15.
12634                 * nls.m4: Likewise.
12635                 * po.m4: Likewise.
12636                 * inttypes-pri.m4: Likewise.
12637                 * inttypes-h.m4: Renamed from inttypes.m4.
12638                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
12639
12640 2006-07-22  Bruno Haible  <bruno@clisp.org>
12641
12642         Merge from GNU gettext 0.15.
12643
12644         2005-07-05  Bruno Haible  <bruno@clisp.org>
12645
12646                 * printf-args.c (printf_fetchargs): Work around broken
12647                 definition of wint_t on mingw.
12648
12649         2005-02-12  Bruno Haible  <bruno@clisp.org>
12650
12651                 * xallocsa.h: Add extern "C" for C++.
12652
12653         2006-05-17  Bruno Haible  <bruno@clisp.org>
12654
12655                 Cygwin portability.
12656                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
12657
12658         2006-04-30  Bruno Haible  <bruno@clisp.org>
12659
12660                 * progreloc.c: Include <mach-o/dyld.h> if available.
12661                 (find_executable): Use _NSGetExecutablePath when possible.
12662
12663         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
12664
12665                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
12666                 function.
12667
12668         2005-12-29  Bruno Haible  <bruno@clisp.org>
12669
12670                 * progreloc.c (set_program_name_and_installdir): Fix
12671                 compilation error.
12672
12673         2005-12-04  Bruno Haible  <bruno@clisp.org>
12674
12675                 Cygwin portability.
12676                 * progreloc.c: Include <windows.h> also on Cygwin.
12677                 (find_executable): Add support for Cygwin.
12678                 (set_program_name_and_installdir): Handle also platforms with
12679                 nonempty EXEEXT.
12680
12681         2006-07-11  Bruno Haible  <bruno@clisp.org>
12682
12683                 * javacomp.c: Fix a comment.
12684                 Reported by Jim Meyering.
12685
12686         2006-04-30  Bruno Haible  <bruno@clisp.org>
12687
12688                 * javacomp.h (compile_java_class): Add source_version,
12689                 target_version arguments.
12690                 * javacomp.c: Rewritten to choose only a compiler that
12691                 respects the specified source_version and target_version.
12692
12693         2006-06-27  Bruno Haible  <bruno@clisp.org>
12694
12695                 Assume correct S_ISDIR macro.
12696                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
12697
12698         2006-07-22  Bruno Haible  <bruno@clisp.org>
12699
12700                 * javaversion.h: New file, from GNU gettext.
12701                 * javaversion.c: New file, from GNU gettext.
12702                 * javaversion.java: New file, from GNU gettext.
12703                 * javaversion.class: New file, from GNU gettext.
12704
12705         2006-05-17  Bruno Haible  <bruno@clisp.org>
12706
12707                 Cygwin portability.
12708                 * javaexec.c (execute_java_class): Test for jview program
12709                 also on Cygwin.
12710
12711         2006-04-09  Bruno Haible  <bruno@clisp.org>
12712
12713                 * fatal-signal.c: Don't include string.h.
12714                 (at_fatal_signal): Use a copying loop instead of memcpy.
12715
12716         2005-12-04  Bruno Haible  <bruno@clisp.org>
12717
12718                 * csharpexec.c: Add support for 'clix' launcher (untested).
12719                 (execute_csharp_using_sscli): New function.
12720                 (execute_csharp_program): Call it.
12721
12722         2006-06-21  Bruno Haible  <bruno@clisp.org>
12723
12724                 Avoid warnings from recent versions of mcs.
12725                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
12726                 -o, -L, -r any more. Use options documented since mcs-1.0
12727                 instead. Similarly for -g.
12728
12729         2005-07-09  Bruno Haible  <bruno@clisp.org>
12730
12731                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
12732                 add a .dll suffix.
12733                 Reported by Mark Junker <mjscod@gmx.de>.
12734
12735         2006-06-17  Bruno Haible  <bruno@clisp.org>
12736
12737                 * config.charset: Update for NetBSD 3.0.
12738
12739         2006-05-17  Bruno Haible  <bruno@clisp.org>
12740
12741                 Cygwin portability.
12742                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
12743
12744         2006-05-16  Bruno Haible  <bruno@clisp.org>
12745
12746                 * localcharset.c [CYGWIN]: Include <windows.h>.
12747                 (get_charset_aliases): For Cygwin, return the same CPxxx
12748                 aliases list as under WIN32.
12749                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
12750                 the environment variables. Fall back to GetACP().
12751
12752         2006-04-05  Bruno Haible  <bruno@clisp.org>
12753
12754                 * config.charset: Update Juan Manuel Guerrero's address.
12755
12756         2005-02-12  Bruno Haible  <bruno@clisp.org>
12757
12758                 * allocsa.h: Add extern "C" for C++.
12759
12760         2005-02-10  Bruno Haible  <bruno@clisp.org>
12761
12762                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
12763                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
12764
12765         2006-07-22  Bruno Haible  <bruno@clisp.org>
12766
12767                 * gettext.h: Update to GNU gettext-0.15.
12768
12769 2006-07-22  Bruno Haible  <bruno@clisp.org>
12770
12771         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
12772         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
12773         lib-prefix.m4, longdouble.m4, ssize_t.m4.
12774
12775 2006-07-21  Eric Blake  <ebb9@byu.net>
12776
12777         * modules/stdlib-safer: New file.
12778         * MODULES.html.sh (File stream based Input/Output): Add
12779         stdlib-safer.
12780
12781 2006-07-21  Eric Blake  <ebb9@byu.net>
12782
12783         * lib/stdlib-safer.h: New file from coreutils, required by
12784         stdlib--.h.
12785
12786 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
12787
12788         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
12789
12790 2006-07-20  Bruno Haible  <bruno@clisp.org>
12791
12792         * gnulib-tool: Recognize new option --assume-autoconf.
12793         (autoconf_minversion): New variable.
12794         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
12795
12796 2006-07-20  Bruno Haible  <bruno@clisp.org>
12797
12798         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
12799
12800 2006-07-19  Derek R. Price  <derek@ximbiot.com>
12801
12802         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
12803         Reindent and repaginate.
12804
12805 2006-07-19  Derek Price  <derek@ximbiot.com>
12806
12807         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
12808         Correct grammar.
12809
12810 2006-07-17  Bruno Haible  <bruno@clisp.org>
12811
12812         * modules/list: New file.
12813         * modules/array-list: New file.
12814         * modules/carray-list, modules/carray-list-tests: New files.
12815         * modules/linked-list, modules/linked-list-tests: New files.
12816         * modules/avltree-list, modules/avltree-list-tests: New files.
12817         * modules/rbtree-list, modules/rbtree-list-tests: New files.
12818         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
12819         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
12820         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
12821         * modules/oset: New file.
12822         * modules/array-oset: New file.
12823         * modules/avltree-oset, modules/avltree-oset-tests: New files.
12824         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
12825         * tests/test-carray_list.c: New file.
12826         * tests/test-linked_list.c: New file.
12827         * tests/test-avltree_list.c: New file.
12828         * tests/test-rbtree_list.c: New file.
12829         * tests/test-linkedhash_list.c: New file.
12830         * tests/test-avltreehash_list.c: New file.
12831         * tests/test-rbtreehash_list.c: New file.
12832         * tests/test-avltree_oset.c: New file.
12833         * tests/test-rbtree_oset.c: New file.
12834         * MODULES.html.sh (Container data structures): New section.
12835
12836 2006-07-17  Bruno Haible  <bruno@clisp.org>
12837
12838         * m4/gl_list.m4: New file.
12839
12840 2006-07-17  Bruno Haible  <bruno@clisp.org>
12841
12842         * lib/gl_list.h: New file.
12843         * lib/gl_list.c: New file.
12844         * lib/gl_array_list.h: New file.
12845         * lib/gl_array_list.c: New file.
12846         * lib/gl_carray_list.h: New file.
12847         * lib/gl_carray_list.c: New file.
12848         * lib/gl_linked_list.h: New file.
12849         * lib/gl_linked_list.c: New file.
12850         * lib/gl_anylinked_list1.h: New file.
12851         * lib/gl_anylinked_list2.h: New file.
12852         * lib/gl_avltree_list.h: New file.
12853         * lib/gl_avltree_list.c: New file.
12854         * lib/gl_anyavltree_list1.h: New file.
12855         * lib/gl_anyavltree_list2.h: New file.
12856         * lib/gl_rbtree_list.h: New file.
12857         * lib/gl_rbtree_list.c: New file.
12858         * lib/gl_anyrbtree_list1.h: New file.
12859         * lib/gl_anyrbtree_list2.h: New file.
12860         * lib/gl_anytree_list1.h: New file.
12861         * lib/gl_anytree_list2.h: New file.
12862         * lib/gl_linkedhash_list.h: New file.
12863         * lib/gl_linkedhash_list.c: New file.
12864         * lib/gl_anyhash_list1.h: New file.
12865         * lib/gl_anyhash_list2.h: New file.
12866         * lib/gl_avltreehash_list.h: New file.
12867         * lib/gl_avltreehash_list.c: New file.
12868         * lib/gl_rbtreehash_list.h: New file.
12869         * lib/gl_rbtreehash_list.c: New file.
12870         * lib/gl_anytreehash_list1.h: New file.
12871         * lib/gl_anytreehash_list2.h: New file.
12872
12873         * lib/gl_oset.h: New file.
12874         * lib/gl_oset.c: New file.
12875         * lib/gl_array_oset.h: New file.
12876         * lib/gl_array_oset.c: New file.
12877         * lib/gl_avltree_oset.h: New file.
12878         * lib/gl_avltree_oset.c: New file.
12879         * lib/gl_rbtree_oset.h: New file.
12880         * lib/gl_rbtree_oset.c: New file.
12881         * lib/gl_anytree_oset.h: New file.
12882
12883 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
12884
12885         * m4/mkancesdirs.m4: New file.
12886         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
12887         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
12888         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
12889         it.
12890
12891 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
12892
12893         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
12894         * lib/mkancesdirs.h: New files.
12895         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
12896         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
12897         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
12898         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
12899         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
12900         callers changed.  Revamp internals significantly, by not
12901         attempting to create directories that are temporarily more
12902         permissive than the final results.  Do not attempt to use
12903         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
12904         This removes some race conditions, fixes some bugs, and simplifies
12905         things.  Use new dirchownmod function to do owner and mode changes.
12906         * lib/mkdir-p.h: Likewise.
12907         * lib/modechange.c (octal_to_mode): New function.
12908         (struct mode_change): New member mentioned.
12909         (make_node_op_equals): New arg mentioned.  All callers changed.
12910         (mode_compile): Keep track of which mode bits the user has explicitly
12911         mentioned.
12912         (mode_adjust): New arg DIR, so that we implement the X op correctly.
12913         New arg PMODE_BITS, to keep track of which mode bits the user
12914         mentioned; it treats S_ISUID and S_ISGID speciall.
12915         All callers changed.
12916         * lib/modechange.h: Likewise.
12917
12918 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
12919
12920         * MODULES.html.sh: Add mkancestors.
12921         * modules/mkancesdirs: New module.
12922         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
12923         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
12924         The chdir-safer and afs files are now orphans; I'll remove them
12925         unless someone speaks up.
12926         Add lib/dirchownmod.c, lib/dirchownmod.h.
12927         (Depends-on): Remove alloca, chown, save-cwd, dirname.
12928         Add lchown, mkancesdirs.
12929         (Maintainer): Add self.
12930
12931 2006-07-15  Karl Berry  <karl@gnu.org>
12932
12933         * gnulib-tool: help message wording/arrangement.
12934
12935 2006-07-14  Simon Josefsson  <jas@extundo.com>
12936
12937         * doc/gnulib.texi (Libtool and Windows): New section.
12938
12939 2006-07-12  Simon Josefsson  <jas@extundo.com>
12940
12941         * modules/gendocs (License): Fix license, approved by Karl.
12942
12943 2006-07-12  Eric Blake  <ebb9@byu.net>
12944
12945         * MODULES.html.sh: Add gendocs.
12946
12947 2006-07-11  Eric Blake  <ebb9@byu.net>
12948
12949         * modules/fdl: New module, to install doc/fdl.texi.
12950         * MODULES.html.sh: Add new section for documentation modules.
12951         * gnulib-tool: Avoid space-tab.
12952         (--doc-base): New option, to manage files from doc.
12953
12954 2006-07-11  Eric Blake  <ebb9@byu.net>
12955
12956         * m4/absolute-header.m4: Fix comments to match recent change.
12957
12958 2006-07-11  Eric Blake  <ebb9@byu.net>
12959
12960         * gnulib-tool: List --doc-base before --tests-base.
12961
12962 2006-07-11  Derek R. Price  <derek@ximbiot.com>
12963
12964         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
12965
12966 2006-07-11  Bruno Haible  <bruno@clisp.org>
12967
12968         * README: Mention where to put documentation.
12969
12970 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12971
12972         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
12973
12974 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
12975
12976         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
12977         to stdint.m4.
12978
12979 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
12980
12981         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
12982         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
12983         "no/such/file/stdint.h" when there is no such file, so that
12984         the resulting C code can be parsed by dodgy compilers.
12985         Problems reported by Bob Proulx.
12986
12987 2006-07-10  Derek R. Price  <derek@ximbiot.com>
12988
12989         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
12990         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
12991         macros into the GNU _D_EXACT_NAMLEN.
12992         * lib/savedir.c:  Likewise.
12993         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
12994
12995 2006-07-10  Derek R. Price  <derek@ximbiot.com>
12996         and Paul Eggert  <eggert@cs.ucla.edu>
12997
12998         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
12999         * m4/savedir.m4:
13000         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
13001         macros into the GNU _D_EXACT_NAMLEN.
13002
13003 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
13004
13005         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
13006         around the absolute name, to work around a problem with the HP-UX
13007         11.23 native C compiler, reported by Bob Proulx.
13008
13009 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
13010
13011         * doc/maintain.texi, make-stds.texi: Sync from
13012         <http://savannah.gnu.org/projects/gnustandards>.
13013
13014 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
13015
13016         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
13017
13018 2006-07-09  Jim Meyering  <jim@meyering.net>
13019
13020         * m4/glob.m4: Remove a doubled word in a comment.
13021
13022 2006-07-09  Jim Meyering  <jim@meyering.net>
13023
13024         * lib/argp-pv.c: Remove a doubled word in a comment.
13025         * lib/check-version.c (check_version): Likewise.
13026         * lib/javacomp.c (compile_java_class): Likewise.
13027
13028 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
13029
13030         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
13031         for the benefit of people using Autoconf 2.60.  If you want to
13032         support older Autoconf versions you can copy m4/onceonly_2_57.m4
13033         (or m4/onceonly.m4, if pre-2.57) manually.
13034
13035 2006-07-08  Jim Meyering  <jim@meyering.net>
13036
13037         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
13038         comment.
13039         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
13040         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
13041         comment.
13042
13043 2006-07-08  Jim Meyering  <jim@meyering.net>
13044
13045         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
13046
13047 2006-07-07  Simon Josefsson  <jas@extundo.com>
13048
13049         * tests/test-crc.c: Change expected crc value, the test vector
13050         were probably computed using the old broken crc.c?
13051
13052 2006-07-06  Simon Josefsson  <jas@extundo.com>
13053
13054         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
13055         now the canonical place for the M4 file).
13056
13057         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
13058         from the sys_socket dependency now.
13059
13060         * modules/inet_pton (Files): Ditto.
13061
13062         * modules/inet_ntop (Files): Ditto.
13063
13064 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
13065
13066         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
13067         not gl_PREREQ_GETUSERSHELL.
13068
13069 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13070
13071         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
13072         with only one argument, for Autoconf 2.60.
13073         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
13074         expand to nothing, so add a shell command to avoid syntax error.
13075         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
13076
13077 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13078
13079         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
13080
13081 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
13082
13083         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
13084         no longer needed.  Check for isblank decl.
13085         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
13086         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
13087         of existence.
13088
13089 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
13090
13091         * lib/getloadavg.c: Use __VMS, not VMS.
13092         * lib/getopt.c: Likewise.
13093         * lib/getpagesize.h: Likewise.
13094         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
13095         and probably does not work.
13096
13097 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
13098
13099         * lib/.cppi-disable: Add wcwidth.
13100         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
13101         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
13102         (ISGRAPH): Remove.  All uses changed to isgraph.
13103         (FOLD) [!defined _LIBC]: Remove special case.
13104         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
13105         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
13106         HAVE_ISBLANK.
13107         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
13108         case.
13109
13110 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
13111
13112         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
13113         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
13114         brackets.  Other minor changes to suppress some compiler
13115         warnings.
13116
13117 2006-07-06  Derek R. Price  <derek@ximbiot.com>
13118         and Paul Eggert  <eggert@cs.ucla.edu>
13119
13120         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
13121         of invoking obsolescent AC_HEADER_DIRENT macro.
13122         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
13123         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
13124         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
13125         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
13126         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
13127         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
13128         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
13129         * m4/readdir.m4: Remove; no longer needed.
13130
13131 2006-07-06  Derek R. Price  <derek@ximbiot.com>
13132         and Paul Eggert  <eggert@cs.ucla.edu>
13133
13134         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
13135         Don't worry about this obsolete case any more.
13136         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
13137         directories.
13138         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
13139         worry about this obsolete case any more.
13140         * lib/fts.c: Likewise.
13141         * lib/getcwd.c: Likewise.
13142         * lib/glob.h: Likewise.
13143         * lib/savedir.c: Likewise.
13144
13145 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
13146
13147         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
13148         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
13149         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
13150         needed.
13151         All uses removed.
13152         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
13153         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
13154         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
13155         needed.
13156         * m4/getdate.m4 (gl_GETDATE): Likewise.
13157         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
13158         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
13159         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
13160         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
13161         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
13162         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
13163         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
13164         needed.
13165
13166 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
13167
13168         * lib/memcasecmp.c: Include <limits.h>.
13169         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
13170         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
13171         Don't assume isdigit succeeds only on '0' through '9'.
13172
13173 2006-07-05  Eric Blake  <ebb9@byu.net>
13174
13175         * modules/getaddrinfo (Depends-on): Add snprintf.
13176
13177 2006-07-05  Eric Blake  <ebb9@byu.net>
13178
13179         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
13180         to avoid 'header present but could not be compiled' on cygwin.
13181
13182 2006-07-05  Eric Blake  <ebb9@byu.net>
13183
13184         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
13185         missing from netdb.h.
13186         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
13187
13188 2006-07-05  Derek R. Price  <derek@ximbiot.com>
13189
13190         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
13191         no longer needed.
13192         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
13193         * m4/getdate.m4 (gl_GETDATE): Likewise.
13194         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
13195         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
13196         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
13197         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
13198         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
13199
13200 2006-07-05  Derek R. Price  <derek@ximbiot.com>
13201
13202         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
13203         All uses of is_space replaced by isspace.
13204         * lib/exit.h: Don't talk about STDC_HEADERS.
13205         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
13206         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
13207         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
13208         replaced by isprint etc.
13209         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
13210         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
13211         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
13212         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
13213         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
13214         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
13215
13216 2006-07-05  Bruno Haible  <bruno@clisp.org>
13217
13218         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
13219         the function exists, before testing against AIX.
13220         Reported by Martin Lambers <marlam@marlam.de>.
13221
13222 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
13223
13224         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
13225         From Mark D. Baushke.
13226
13227 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
13228
13229         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
13230         to the absolute name, not just one, to bypass Sun C 5.8's
13231         "warning: #include of /usr/include/... may be non-portable".
13232
13233 2006-07-04  Eric Blake  <ebb9@byu.net>
13234
13235         * modules/dirname-tests: New test module.
13236         * tests/test-dirname.c: New file, replacing dirname.c
13237         TEST_DIRNAME section that was recently deleted.
13238
13239 2006-07-04  Bruno Haible  <bruno@clisp.org>
13240
13241         Assume ANSI C header files and <ctype.h> functions.
13242         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
13243         (mbsnwidth): Use isprint, iscntrl instead.
13244
13245 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13246
13247         Merge from coreutils.
13248         * MODULES.html.sh: Add xstrtold.
13249         * modules/xstrtold: New file.
13250         * modules/cycle-check (Files): Add lib/same-inode.h.
13251         * modules/dirname (Files): Add m4/double-slash-root.m4.
13252         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
13253         * modules/mkdir-p (Files): Add lib/same-inode.h.
13254         * modules/same (Files): Add lib/same-inode.h.
13255
13256 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13257
13258         * m4/absolute-header.m4: Renamed from full-header-path.m4.
13259         This is to keep the terminology clean; POSIX talks about
13260         "absolute pathnames", not "full pathnames", but the GNU
13261         Coding Standards say to use "path" for something else;
13262         so use "absolute" to keep both sides happy.
13263         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
13264         Set gl_absolute_header, not gl_full_header_path.
13265         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
13266         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
13267         All uses changed.
13268
13269         Merge from coreutils.
13270
13271         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
13272
13273         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
13274         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
13275         want to require the building of c-strtod.o.
13276         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
13277         needs -lm directly.
13278         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
13279
13280         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
13281
13282         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
13283         --as-needed option if available.  Problem reported by Albert Chin in
13284         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
13285         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
13286         cc merely issues a bunch of annoying warnings for --as-needed
13287         (this problem was reported by Bob Proulx).  Also, try linking with
13288         -lm to detect a bug in binutils 2.16 (this problem was reported
13289         by Ralf Wildenhues).
13290
13291         2006-06-18  Jim Meyering  <jim@meyering.net>
13292
13293         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
13294         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
13295         macro.
13296         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
13297         also check for glibc-2.4's abort-inducing bug.
13298
13299         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
13300         Low-probability clean-up should be to use rmdir to get rid of
13301         the just-created directory, not unlink.
13302
13303         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
13304         configure fail, and request a bug report to inform us about it.
13305         Add a comment that, barring reports to the contrary, in 2007 we'll
13306         assume ftruncate is universally available.
13307
13308         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
13309
13310         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
13311
13312         2006-03-12  Jim Meyering  <jim@meyering.net>
13313
13314         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
13315         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
13316         * m4/same.m4 (gl_SAME): Likewise.
13317         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
13318
13319         2006-03-11  Eric Blake  <ebb9@byu.net>
13320
13321         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
13322         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
13323         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
13324         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
13325
13326 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13327
13328         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
13329         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
13330         reported by Mark D. Baushke, one in
13331         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
13332
13333         Merge from coreutils.
13334
13335         * lib/.cppi-disable: Add stdint_.h.
13336         * lib/.cvsignore: Add stdint.h.
13337
13338         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
13339
13340         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
13341         both double and long double versions.
13342         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
13343         * lib/xstrtold.c: New file.
13344         * lib/xstrtod.h (xstrtold): New decl.
13345
13346         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
13347
13348         * lib/filemode.c (setst): Remove.
13349         (strmode): Rewrite to avoid setst.  This makes the code shorter,
13350         (arguably) clearer, and the generated code is a bit smaller on my
13351         Debian GNU/Linux stable x86 host.
13352
13353         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
13354
13355         * lib/filemode.c: Include "filemode.h" first, to test the interface.
13356         Assume that filemode.h includes sys/types.h and sys/stat.h.
13357         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
13358         (ftypelet): Reorder to put common cases first, for efficiency.
13359         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
13360         to do 'M'.
13361         (strmode): Renamed from mode_string, and now stores 12 bytes instead
13362         of 10, for compatibility with FreeBSD.  All callers changed.
13363         (filemodestring): Now stores 12 bytes instead of 10, and sets file
13364         types that can't be deduced solely from st_mode.  First arg is now a
13365         const pointer.
13366         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
13367         (strmode): Renamed from mode_string.
13368         (filemodestring): New decl.
13369         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
13370         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
13371         needed.
13372         (S_ISPORT, S_ISWHT): New macros, if not already defined.
13373
13374         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
13375
13376         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
13377         fsusage.h now does that.  Include fsusage.h first, to test interface.
13378         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
13379         at most one method (the old code could have generated decls that
13380         didn't conform to C89, not that this was ever exercised).
13381         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
13382
13383         2006-03-19  Jim Meyering  <jim@meyering.net>
13384
13385         Work even in a chroot where d_ino values for entries in "/"
13386         don't match the stat.st_ino values for the same names.
13387         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
13388         number, iterate through all entries again, using lstat instead.
13389         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
13390         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
13391
13392         * lib/getcwd.c (__getcwd): Clarify a comment.
13393         Use memcpy in place of a call to strcpy.
13394
13395         2006-03-12  Jim Meyering  <jim@meyering.net>
13396
13397         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
13398         matches that of the current directory (which we're about to chdir ".."
13399         out of), then save the dev-ino of the parent, instead.
13400
13401         * lib/same-inode.h (SAME_INODE): New file/macro.
13402         * lib/chdir-safer.c (SAME_INODE): Remove definition.
13403         Include "same-inode.h", instead.
13404         * lib/same.c: Likewise.
13405         * lib/cycle-check.h: Include "same-inode.h".
13406         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
13407         * lib/cycle-check.c (SAME_INODE): Remove definition.
13408         * lib/root-dev-ino.h: Include "same-inode.h".
13409
13410         2006-03-11  Eric Blake  <ebb9@byu.net>
13411
13412         * lib/same.c (same_name): s/base_name/last_component/
13413         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
13414         * lib/filenamecat.c (file_name_concat): Likewise.
13415
13416         2006-03-11  Eric Blake  <ebb9@byu.net>,
13417                     Paul Eggert  <eggert@cs.ucla.edu>
13418
13419         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
13420         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
13421         drive prefix.
13422         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
13423         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
13424         (last_component): New method.
13425         * lib/dirname.c (dir_len): Determine when drive letters need a
13426         subsequent slash.  Preserve // when it is special.
13427         (dir_name): Don't append dot when drive letter is absolute.
13428         [TEST_DIRNAME]: Move into a full-blown gnulib test.
13429         * lib/basename.c (base_name): New semantics - malloc the result.
13430         Preserve // when it is special.  Preserve relative files that look
13431         like drive letters.
13432         (base_len): Preserve // when it is special.
13433         (last_component): New method, similar to old base_name semantics.
13434         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
13435         base_name.  Strip redundant slashes from ///.
13436
13437 2006-07-03  Jim Meyering  <jim@meyering.net>
13438
13439         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
13440         macro is used before the first cycle_check call.
13441
13442 2006-07-03  Eric Blake  <ebb9@byu.net>
13443
13444         * modules/dirname (Depends-on): Add xstrndup.
13445
13446 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
13447
13448         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
13449         test cases, so that config.log is a bit easier to follow.
13450
13451 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
13452
13453         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
13454         both are 64 bits, since this seems to be the tradition, and this
13455         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
13456         we ever run into a host that prefers long long to long in this
13457         case, we'll need another configure-time test.  Problem reported by
13458         Jim Meyering.
13459
13460 2006-07-02  Eric Blake  <ebb9@byu.net>
13461
13462         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
13463
13464 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13465
13466         * modules/inttypes (Depends-on): No longer depends on stdint.
13467         * modules/stdint (Description): Say more about assumptions.
13468         Say that the fast types might differ.  Say macros are used.
13469         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
13470         (Makefile.am): Revise list of substituted symbols to match
13471         new stdint.m4.
13472         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
13473         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
13474         * tests/test-stdint.c (verify_same_types)
13475         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
13476         the code conforms to C99/C89.
13477         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
13478         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
13479
13480 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13481
13482         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
13483         but fix a bug, by requiring at least 64 bits.
13484         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
13485         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
13486         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
13487         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
13488
13489         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
13490         changes.  Make 2.59 a prerequisite.  Check and substitute for
13491         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
13492         inttypes.h.  Do not use special include files; just use the
13493         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
13494         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
13495         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
13496         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
13497         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
13498         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
13499         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
13500         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
13501         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
13502         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
13503         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
13504         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
13505         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
13506         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
13507         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
13508         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
13509         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
13510         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
13511         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
13512         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
13513         WINT_MAX.  Check for C99 conformance more strictly, by detecting
13514         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
13515         not check for things that C99 does not require, e.g., int8_t.  If
13516         a test isn't needed unless <stdint.h> isn't working, and is
13517         unlikely to be needed for any other reason, then don't do it
13518         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
13519         size_t, since we assume C89 freestanding at least.  Do not check
13520         for sig_atomic_t, wchar_t, or wint_t, since the code now does
13521         the right thing even if the types are not defined.  Instead use:
13522         (gl_STDINT_TYPE_PROPERTIES): New macro.
13523         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
13524         testing whether <sys/types.h> clashes, as Autoconf does this for
13525         us now.  All uses removed.
13526         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
13527         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
13528         (gl_CHECK_TYPE_SAME):
13529         Remove; no longer needed.
13530         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
13531         exists, since we'll return 0 anyway in that case.
13532         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
13533
13534 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13535
13536         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
13537         possible collision with system files.
13538         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
13539         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
13540         WCHAR_MIN and WCHAR_MAX in this case.
13541         (<stddef.h>): Do not include; no longer needed.
13542         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
13543         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
13544         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
13545         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
13546         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
13547         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
13548         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
13549         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
13550         !defined(__c99))]: Include in this case too, since it's harmless
13551         now.
13552         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
13553         dangerous to do so.
13554         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
13555         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
13556         (_STDINT_MIN, _STDINT_MAX): New macros.
13557         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
13558         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
13559         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
13560         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
13561         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
13562         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
13563         macros, not typedefs; this simplifies things quite a bit.
13564         Use long int for all types narrower than int64_t.
13565         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
13566         Define in terms of long long int or int64_t or long int,
13567         not int64_t or int32_t.  This saves some compile-time testing.
13568         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
13569         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
13570         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
13571         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
13572         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
13573         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
13574         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
13575         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
13576         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
13577         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
13578         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
13579         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
13580         undef any previous version and define our own version, for
13581         simplicity and consistency with the new macros for types.
13582         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
13583         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
13584         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
13585         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
13586         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
13587         @WINT_T_SUFFIX@ to keep things simple here.
13588         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
13589         Simplify by assuming typical 8/16/32/64 host, since we're
13590         already doing that elsewhere anyway.
13591         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
13592         and assume long long int is 64 bits if available.  This
13593         speeds up 'configure'.
13594
13595 2006-07-01  Eric Blake  <ebb9@byu.net>
13596
13597         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
13598         Reported by Andreas Buening.
13599
13600 2006-07-01  Eric Blake  <ebb9@byu.net>
13601
13602         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
13603
13604 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
13605
13606         * lib/getaddrinfo.c: fixed typo
13607
13608 2006-06-29  Jim Meyering  <jim@meyering.net>
13609
13610         * modules/strftime (Maintainer): Add my name, since with the
13611         FPRINTFTIME changes strftime.c has forked from glibc.
13612
13613 2006-06-29  Eric Blake  <ebb9@byu.net>
13614
13615         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
13616
13617 2006-06-29  Eric Blake  <ebb9@byu.net>
13618
13619         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
13620
13621 2006-06-29  Eric Blake  <ebb9@byu.net>
13622
13623         * lib/stat_.h: New file.
13624
13625 2006-06-29  Eric Blake  <ebb9@byu.net>
13626
13627         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
13628         unused static function.
13629
13630 2006-06-29  Eric Blake  <ebb9@byu.net>
13631
13632         * doc/functions.texi (Function Portability): Document missing lstat
13633         on mingw.
13634
13635 2006-06-29  Eric Blake  <ebb9@byu.net>
13636
13637         * MODULES.html.sh: Add sys_stat.
13638         * modules/sys_stat: New module.
13639         * modules/mkstemp (Depends-on): Add sys_stat.
13640
13641 2006-06-29  Derek R. Price  <derek@ximbiot.com>
13642
13643         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
13644
13645 2006-06-29  Derek R. Price  <derek@ximbiot.com>
13646
13647         * m4/c-bs-a.m4: Removed.
13648
13649 2006-06-29  Derek R. Price  <derek@ximbiot.com>
13650
13651         * lib/strftime.c: Assume strftime() exists.
13652
13653 2006-06-29  Derek Price  <derek@ximbiot.com>
13654
13655         * modules/c-bs-a: Removed - \a is C89.
13656         * MODULES.html.sh: Remove c-bs-a.
13657
13658 2006-06-29  Bruno Haible  <bruno@clisp.org>
13659
13660         * modules/wcwidth (License): Change to LGPL.
13661
13662 2006-06-28  Simon Josefsson  <jas@extundo.com>
13663
13664         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
13665         on _WIN32.
13666
13667         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
13668         getnameinfo.
13669
13670 2006-06-28  Simon Josefsson  <jas@extundo.com>
13671
13672         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
13673
13674 2006-06-28  Simon Josefsson  <jas@extundo.com>
13675
13676         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
13677         functions there.  It will succeed on Windows XP, but on Windows
13678         2000 and (presumably) earlier, it will fail, and use the internal
13679         re-implementation.
13680         (use_win32_p): New function.
13681         (getaddrinfo): Use strtoul on servname, to support numeric ports.
13682         Support AI_NUMERICSERV to disable getservbyname.
13683         (getnameinfo): New function, only supports
13684         NI_NUMERICHOST|NI_NUMERICSERV for now.
13685
13686         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
13687         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
13688         getnameinfo.
13689
13690 2006-06-28  Eric Blake  <ebb9@byu.net>
13691
13692         * modules/wcwidth: New file.
13693         * modules/mbchar (Depends-on): Add wcwidth.
13694         * modules/mbswidth (Depends-on): Add wcwidth.
13695         * MODULES.html.sh: Add wcwidth.
13696
13697 2006-06-28  Eric Blake  <ebb9@byu.net>
13698
13699         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
13700         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
13701
13702 2006-06-28  Eric Blake  <ebb9@byu.net>
13703
13704         * lib/xvasprintf.h: Fix comments.
13705
13706 2006-06-28  Eric Blake  <ebb9@byu.net>
13707
13708         * lib/mbchar.h (wcwidth): Include wcwidth.h.
13709         * lib/mbswidth.c (wcwidth): Move from here...
13710         * lib/wcwidth.h: ...to this new file.
13711
13712 2006-06-28  Derek R. Price  <derek@ximbiot.com>
13713
13714         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
13715
13716         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
13717         it's obsolete.
13718         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
13719
13720 2006-06-28  Derek R. Price  <derek@ximbiot.com>
13721
13722         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
13723         Autoconf 2.60 says this stuff was obsolete.
13724
13725 2006-06-28  Bruno Haible  <bruno@clisp.org>
13726
13727         * modules/wcwidth (Files): Add m4/wchar_t.m4.
13728
13729 2006-06-28  Bruno Haible  <bruno@clisp.org>
13730
13731         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
13732         gt_TYPE_WCHAR_T.
13733
13734 2006-06-28  Bruno Haible  <bruno@clisp.org>
13735
13736         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
13737         declaration for wcwidth.
13738         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
13739
13740 2006-06-28  Bruno Haible  <bruno@clisp.org>
13741
13742         * lib/mkdtemp.c [MINGW]: Include <io.h>.
13743         (mkdir): Define using _mkdir.
13744
13745 2006-06-28  Bruno Haible  <bruno@clisp.org>
13746
13747         * lib/getaddrinfo.h: Fix POSIX URL.
13748         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
13749         _WIN32.
13750         (use_win32_p): Make static.
13751         (getaddrinfo): Reject service name if it is empty or does not consist
13752         solely of decimal digits, or if its value is > 65535.
13753         (getnameinfo): Remove useless casts.
13754
13755 2006-06-27  Simon Josefsson  <jas@extundo.com>
13756
13757         * modules/sys_select: New file, suggested by Bruno Haible, Paul
13758         Eggert and Martin Lambers.
13759
13760 2006-06-27  Simon Josefsson  <jas@extundo.com>
13761
13762         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
13763         Eggert and Martin Lambers.
13764
13765 2006-06-27  Bruno Haible  <bruno@clisp.org>
13766
13767         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
13768         result to 0, not to empty.
13769         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
13770
13771 2006-06-27  Bruno Haible  <bruno@clisp.org>
13772
13773         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
13774
13775 2006-06-26  Simon Josefsson  <jas@extundo.com>
13776
13777         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
13778         present.
13779
13780 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
13781
13782         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
13783         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
13784         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
13785
13786 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
13787
13788         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
13789
13790 2006-06-26  Bruno Haible  <bruno@clisp.org>
13791
13792         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
13793
13794 2006-06-26  Bruno Haible  <bruno@clisp.org>
13795
13796         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
13797
13798 2006-06-26  Bruno Haible  <bruno@clisp.org>
13799
13800         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
13801         SGI C compiler in pre-C99 mode.
13802         Suggested by Mark D. Baushke and Larry Jones.
13803
13804 2006-06-26  Bruno Haible  <bruno@clisp.org>
13805
13806         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
13807         WCHAR_MAX.
13808         Reported by Mark D. Baushke and Larry Jones.
13809
13810 2006-06-26  Bruno Haible  <bruno@clisp.org>
13811
13812         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
13813         in pre-C99 mode.
13814         Suggested by Mark D. Baushke and Larry Jones.
13815
13816 2006-06-23  Simon Josefsson  <jas@extundo.com>
13817             Bruno Haible  <bruno@clisp.org>
13818
13819         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
13820         Emit mostlyclean-local rule.
13821         (func_emit_tests_Makefile_am): Likewise.
13822         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
13823
13824 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
13825
13826         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
13827
13828 2006-06-23  Bruno Haible  <bruno@clisp.org>
13829
13830         * tests/test-stdint.c: Update to match ISO C 99 Technical
13831         Corrigendum 1.
13832
13833 2006-06-23  Bruno Haible  <bruno@clisp.org>
13834
13835         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
13836
13837 2006-06-23  Bruno Haible  <bruno@clisp.org>
13838
13839         * lib/stdint_.h: Treat IRIX like OpenBSD.
13840
13841 2006-06-23  Bruno Haible  <bruno@clisp.org>
13842
13843         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
13844         ISO C 99 Technical Corrigendum 1.
13845
13846 2006-06-22  Simon Josefsson  <jas@extundo.com>
13847
13848         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
13849         MinGW.
13850
13851 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
13852
13853         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
13854         needed.  Some compiler complained about some of them.  Problem reported
13855         by Larry Jones in
13856         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
13857
13858 2006-06-21  Simon Josefsson  <jas@extundo.com>
13859
13860         * tests/test-getaddrinfo.c: New file.
13861
13862         * modules/getaddrinfo-tests: New file.
13863
13864         * MODULES.html.sh: Add inet_pton.
13865
13866         * modules/inet_pton: New file.
13867
13868 2006-06-21  Simon Josefsson  <jas@extundo.com>
13869
13870         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
13871         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
13872         of using the (limited) gnulib implementation on Windows XP.
13873
13874         * m4/inet_pton.m4: New file.
13875
13876 2006-06-21  Simon Josefsson  <jas@extundo.com>
13877
13878         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
13879         variable.
13880
13881         * lib/socket_.h: Don't define WINVER.
13882
13883         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
13884         slightly modified to work in gnulib.
13885
13886 2006-06-21  Simon Josefsson  <jas@extundo.com>
13887
13888         * doc/gnulib.texi (Windows sockets): Add.
13889
13890 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
13891
13892         * lib/read-file.c (fread_file): Start with buffer allocation of
13893         0 bytes rather than 1 byte; this simplifies the code.
13894         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
13895         code to free buffer and save/restore errno.
13896         (internal_read_file): Remove unused local.
13897
13898 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
13899
13900         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
13901         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
13902         Problem reported by Denis Excoffier in
13903         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
13904
13905 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13906
13907         * modules/sys_socket, modules/socklen: Include sys/types since
13908         FreeBSD 4.x's sys/socket.h needs it.
13909
13910 2006-06-19  Simon Josefsson  <jas@extundo.com>
13911
13912         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
13913
13914 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
13915
13916         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
13917
13918 2006-06-19  Bruno Haible  <bruno@clisp.org>
13919
13920         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
13921         and FULL_PATH_INTTYPES_H in angle brackets.
13922         Reported by Mark D. Baushke <mdb@gnu.org>.
13923
13924 2006-06-17  Eric Blake  <ebb9@byu.net>
13925
13926         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
13927         errno.
13928
13929 2006-06-17  Bruno Haible  <bruno@clisp.org>
13930
13931         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
13932         <sys/inttypes.h>.
13933
13934 2006-06-17  Bruno Haible  <bruno@clisp.org>
13935
13936         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
13937         whether errno is declared. Assume <errno.h> declares errno.
13938
13939 2006-06-17  Bruno Haible  <bruno@clisp.org>
13940
13941         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
13942
13943 2006-06-17  Bruno Haible  <bruno@clisp.org>
13944
13945         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
13946         problem on Solaris 2.5.1.
13947
13948 2006-06-16  Eric Blake  <ebb9@byu.net>
13949
13950         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
13951         * lib/unicodeio.c [!defined errno]: Likewise.
13952         * lib/strtol.c [!defined errno]: Likewise.
13953         * lib/strtod.c [!defined errno]: Likewise.
13954
13955 2006-06-15  Eric Blake  <ebb9@byu.net>
13956
13957         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
13958
13959 2006-06-15  Eric Blake  <ebb9@byu.net>
13960
13961         * config/srclist.txt (ssize_t.m4): Lose sync.
13962
13963 2006-06-15  Bruno Haible  <bruno@clisp.org>
13964
13965         * modules/stdint (Files): Include m4/full-header-path.m4,
13966         m4/size_max.m4, m4/wchar_t.m4.
13967         (Makefile.am): Many more substitutions.
13968         * modules/stdint-tests: New file.
13969         * tests/test-stdint.c: New file.
13970
13971 2006-06-15  Bruno Haible  <bruno@clisp.org>
13972
13973         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
13974         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
13975         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
13976         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
13977         gl_CHECK_TYPE_SAME): New macros.
13978
13979 2006-06-15  Bruno Haible  <bruno@clisp.org>
13980
13981         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
13982
13983 2006-06-15  Bruno Haible  <bruno@clisp.org>
13984
13985         * lib/stdint_.h: Rewritten to be fully auto-configured.
13986         Fixes bug on HP-UX/IA64.
13987
13988 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
13989
13990         * lib/getdate.y (__attribute__): Don't define if already defined.
13991         Problem reported by Larry Jones.
13992         * lib/utimens.c (__attribute__): Likewise.
13993
13994 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
13995
13996         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
13997         reported by Andreas Schwab.
13998
13999 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14000             Bruno Haible  <bruno@clisp.org>
14001
14002         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
14003         check for the declaration of strnlen and a run test that exposes the
14004         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
14005         rpl_strndup.
14006
14007 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14008             Bruno Haible  <bruno@clisp.org>
14009
14010         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
14011
14012 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14013
14014         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
14015         compile test, for Tru64 4.0D.
14016
14017 2006-05-28  Karl Berry  <karl@gnu.org>
14018
14019         * config/srclist.txt (printf-args.c): lose sync.
14020
14021 2006-05-26  Martin Lambers  <marlam@marlam.de>
14022
14023         * lib/getpass.c: Updates the test for the native W32 API, and adds
14024         missing includes, thus fixing compilation warnings.
14025
14026 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
14027
14028         * lib/exclude.c (exclude_fnmatch): New function.
14029         (excluded_file_name): Call exclude_fnmatch.
14030         * lib/exclude.h (excluded_file_name): New prototype
14031
14032 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
14033
14034         * lib/tempname.c (small_open, large_open): New macros.
14035         (__open, __open64) [!_LIBC]: Remove.
14036         (__gen_tempname): Use small_open and large_open instead of __open
14037         and __open64.  This fixes a portability bug on HP-UX 11.11i
14038         reported by Simon Wing-Tang in
14039         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
14040
14041 2006-05-24  Bruno Haible  <bruno@clisp.org>
14042
14043         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
14044         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
14045         Reported by Thorsten Maerz <torte@netztorte.de> via
14046         Aaron Stone <aaron@serendipity.cx>.
14047
14048 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
14049
14050         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
14051         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
14052         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
14053         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
14054         not really conditional on the cache.
14055         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
14056
14057 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
14058
14059         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
14060         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
14061         (my_usleep): Don't mishandle maximum value.
14062
14063 2006-05-19  Jim Meyering  <jim@meyering.net>
14064
14065         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
14066
14067 2006-05-17  Bruno Haible  <bruno@clisp.org>
14068
14069         Cygwin portability.
14070         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
14071
14072 2006-05-17  Bruno Haible  <bruno@clisp.org>
14073
14074         * lib/stdint_.h: Fix recognition of Cygwin.
14075
14076 2006-05-15  Bruno Haible  <bruno@clisp.org>
14077
14078         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
14079         on libtool patch by Ralf Wildenhues.
14080
14081 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14082
14083         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
14084         test for C99 conformance; (bool) 0.5 is an integer constant
14085         expression, but (bool) -0.5 is not.  Problem reported by Fedor
14086         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
14087
14088 2006-05-11  Simon Josefsson  <jas@extundo.com>
14089
14090         * m4/xvasprintf.m4: Fix obvious typo.
14091
14092 2006-05-11  Jim Meyering  <jim@meyering.net>
14093
14094         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
14095         James Lemley.
14096
14097 2006-05-10  Simon Josefsson  <jas@extundo.com>
14098
14099         * lib/md4.c: Typo fix, update copyright years.
14100         (K1, K2): Don't use L because it turn computations into 64-bit on
14101         64-bit platforms.
14102
14103 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
14104
14105         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
14106         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
14107         unwanted sign propagation, e.g., on hosts with 64-bit int.
14108         There still are some problems with reeelly weird theoretical hosts
14109         (e.g., 33-bit int) but it's not worth worrying about now.
14110         * lib/sha1.c (rol): Likewise.
14111         (K1, K2, K3, K4): Remove unnecessary L suffix.
14112
14113 2006-05-10  Bruno Haible  <bruno@clisp.org>
14114
14115         * lib/des.c: Cast to avoid warnings.
14116
14117 2006-05-09  Bruno Haible  <bruno@clisp.org>
14118
14119         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
14120         (Depends-on): Depend also on xsize, stdarg.
14121         (configure.ac): Add gl_XVASPRINTF.
14122
14123 2006-05-09  Bruno Haible  <bruno@clisp.org>
14124
14125         * m4/xvasprintf.m4: New file.
14126
14127 2006-05-09  Bruno Haible  <bruno@clisp.org>
14128
14129         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
14130         (EOVERFLOW): Define fallback value.
14131         (xstrcat): New function.
14132         (xvasprintf): Recognize the special case of a string concatenation.
14133
14134 2006-05-08  Eric Blake  <ebb9@byu.net>
14135
14136         * gnulib-tool (func_version): Base copyright year on CVS date.
14137         (func_emit_copyright_notice): New function.
14138         (func_emit_lib_Makefile_am): Use it.
14139         (func_emit_tests_Makefile_am): Likewise.
14140         (func_import): Likewise.
14141
14142 2006-05-08  Bruno Haible  <bruno@clisp.org>
14143
14144         * modules/stdarg: New file.
14145         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
14146
14147 2006-05-08  Bruno Haible  <bruno@clisp.org>
14148
14149         * m4/stdarg.m4: New file, from GNU gettext.
14150
14151 2006-05-08  Bruno Haible  <bruno@clisp.org>
14152
14153         * config/srclist.txt (build-aux/config.rpath): different from latest
14154         release.
14155
14156 2006-05-08  Bruno Haible  <bruno@clisp.org>
14157
14158         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
14159
14160 2006-05-05  Jim Meyering  <jim@meyering.net>
14161
14162         * m4/warning.m4: New file, derived from bison's file by the same name.
14163
14164 2006-05-03  Bruno Haible  <bruno@clisp.org>
14165
14166         * lib/stdint_.h: Shorter URL.
14167         * lib/inttypes.h: Likewise.
14168
14169 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
14170
14171         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
14172
14173 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
14174
14175         * lib/verify.h: Document the internals better.  Most of this change
14176         was written by Bruno Haible.
14177
14178 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
14179
14180         * doc/verify.texi: New file, partly based on a proposal by
14181         Bruno Haible.
14182
14183 2006-05-02  Bruno Haible  <bruno@clisp.org>
14184
14185         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
14186         test from here...
14187         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
14188
14189 2006-04-29  Bruno Haible  <bruno@clisp.org>
14190
14191         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
14192         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
14193
14194 2006-04-29  Bruno Haible  <bruno@clisp.org>
14195
14196         * gnulib-tool: Make --update option actually work.
14197
14198 2006-04-29  Bruno Haible  <bruno@clisp.org>
14199
14200         * doc/gcd.texi: New file.
14201         * doc/gnulib.texi: Include it.
14202
14203 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
14204
14205         * lib/getdate.y (get_date): When adding relative date, start with the
14206         initial time, not with the result of the first mktime call.
14207
14208 2006-04-25  Bruno Haible  <bruno@clisp.org>
14209
14210         * gnulib-tool (func_import): Output the include directives in three
14211         blocks, sorted separately.
14212         Reported by Ben Pfaff <blp@cs.stanford.edu>.
14213
14214 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
14215
14216         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
14217         to define main with arguments, for C++.  Reported by Eric Blake.
14218         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
14219         Prefer 'int main ()' to 'int main (void)', for C++.
14220         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
14221         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
14222         for 'main', for C99 and C++.
14223
14224 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
14225
14226         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
14227         Don't assume that exit status -1 is valid.
14228         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
14229         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
14230         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
14231         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
14232         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
14233         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
14234         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
14235         functions can be used without declaring them, or that you can
14236         exit with status -1.
14237         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
14238
14239 2006-04-24  Karl Berry  <karl@gnu.org>
14240
14241         * config/srclist.txt (longdouble.m4): sync lost.
14242
14243 2006-04-24  Eric Blake  <ebb9@byu.net>
14244
14245         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
14246
14247 2006-04-24  Bruno Haible  <bruno@clisp.org>
14248
14249         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
14250         poll() implementation in AIX.
14251         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
14252
14253 2006-04-24  Bruno Haible  <bruno@clisp.org>
14254
14255         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
14256         assigned exactly once.
14257
14258 2006-04-23  Claudio Fontana  <claudio@gnu.org>
14259             Bruno Haible  <bruno@clisp.org>
14260
14261         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
14262         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
14263         for AM_CPPFLAGS.
14264
14265 2006-04-23  Bruno Haible  <bruno@clisp.org>
14266
14267         * modules/copy-file: Depend on unistd.
14268         * modules/execute: Likewise.
14269         * modules/fatal-signal: Likewise.
14270         * modules/findprog: Likewise.
14271         * modules/mkdtemp : Likewise.
14272         * modules/pipe: Likewise.
14273         * modules/wait-process: Likewise.
14274
14275 2006-04-23  Bruno Haible  <bruno@clisp.org>
14276
14277         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
14278         condition was already detected.
14279         Reported by Ben Pfaff <blp@cs.stanford.edu>.
14280
14281 2006-04-23  Bruno Haible  <bruno@clisp.org>
14282
14283         * lib/copy-file.c: Include <unistd.h> unconditionally.
14284         * lib/execute.c: Likewise.
14285         * lib/fatal-signal.c: Likewise.
14286         * lib/findprog.c: Likewise.
14287         * lib/mkdtemp.c: Likewise.
14288         * lib/pipe.h: Likewise.
14289         * lib/pipe.c: Likewise.
14290         * lib/wait-process.h: Likewise.
14291
14292 2006-04-23  Bruno Haible  <bruno@clisp.org>
14293
14294         * gnulib-tool (func_usage): Fix --import description. Document
14295         --update.
14296         (func_import): Create temporary file in a temporary directory, if
14297         --dry-run is specified. Silence errors from 'grep' when there are no
14298         m4 files in $m4dir.
14299         (func_create_testdir): Silence errors from 'grep' when there are no
14300         m4 files in $m4dir.
14301         Reported by Karl Berry <karl@freefriends.org>.
14302
14303 2006-04-20  Bruno Haible  <bruno@clisp.org>
14304
14305         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
14306         one argument, so that the code will be portable to Autoconf 2.60.
14307         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
14308         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
14309         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
14310
14311 2006-04-19  Derek Price  <derek@ximbiot.com>
14312             Eric Blake  <ebb9@byu.net>
14313
14314         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
14315         rather than "/full/path.h".  Update comment to match.  Shorten &
14316         generalize m4_translit call via AS_TR_CPP.
14317
14318 2006-04-19  Derek Price  <derek@ximbiot.com>
14319             Eric Blake  <ebb9@byu.net>
14320
14321         * lib/inttypes.h: Correct grammar in comment.
14322
14323 2006-04-18  Derek Price  <derek@ximbiot.com>
14324             Paul Eggert  <eggert@cs.ucla.edu>
14325
14326         * modules/inttypes: New file.
14327         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
14328
14329 2006-04-18  Derek Price  <derek@ximbiot.com>
14330             Paul Eggert  <eggert@cs.ucla.edu>
14331
14332         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
14333         New files.
14334
14335 2006-04-18  Derek Price  <derek@ximbiot.com>
14336             Paul Eggert  <eggert@cs.ucla.edu>
14337
14338         * lib/inttypes.h: New file.
14339         * lib/strtoimax.c: Assume <inttypes.h>.
14340
14341 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
14342
14343         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
14344         isn't mounted.  Problem reported by Kir Kolyshkin.
14345
14346 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
14347
14348         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
14349         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
14350         Derek R. Price.
14351         * lib/regex.h (RE_DUP_MAX): Update comment to match current
14352         implementation.
14353
14354 2006-04-12  Eric Blake  <ebb9@byu.net>
14355
14356         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
14357         is now done automatically by the corresponding Autoconf macro.
14358
14359 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
14360
14361         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
14362         time_r.h.
14363
14364 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
14365
14366         Merge regex changes from libc, removing some of our
14367         POSIX-conformance changes that were rejected and redoing them in a
14368         less-intrusive way.
14369
14370         * lib/regcomp.c (re_compile_internal, init_dfa):
14371         Length arg is now size_t, not Idx.  All uses changed.
14372         (peek_token): Forward decl now says internal_function.
14373         (__re_error_msgid, __re_error_msgid_idx):
14374         Now static rather than extern with attribute_hidden.
14375         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
14376         For some reason libc prefers K&R style defns for external functions.
14377         (regerror) [!defined _LIBC]: Likewise.
14378         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
14379         (seek_collating_symbol_entry, lookup_collation_sequence_value):
14380         (build_range_exp, build_collating_symbol):
14381         Use K&R-style defn.
14382         (re_compile_fastmap): Use '\0' to memset, not 0.
14383         (utf8_sb_map): Make the calculations more obvious.
14384         (init_dfa, parse_bracket_exp, build_charclass_op):
14385         Call calloc and cast result, as glibc does.
14386         (init_word_char, fetch_token, peek_token, peek_token_bracket):
14387         (build_range_exp, build_collating_symbol):
14388         Now internal functions.
14389
14390         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
14391
14392         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
14393         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
14394         Don't depend on VMS; depend on __VMS instead, for POSIX
14395         namespace cleanness.
14396         (regoff_t): Define to ssize_t, not long int.
14397
14398         Remove the REG_ macros named below.  Instead, make the old names
14399         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
14400         __USE_GNU_REGEX.
14401         (REG_BACKSLASH_ESCAPE_IN_LISTS):
14402         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
14403         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
14404         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
14405         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
14406         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
14407         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
14408         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
14409         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
14410         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
14411         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
14412         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
14413         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
14414         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
14415         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
14416         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
14417         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
14418         (REG_NREGS):
14419         Remove.  All uses replaced by the old RE_* names.
14420         (RE_BACKSLASH_ESCAPE_IN_LISTS):
14421         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
14422         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
14423         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
14424         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
14425         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
14426         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
14427         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
14428         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
14429         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
14430         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
14431         Don't bother having these macros be independent of each others'
14432         values, since they no longer exist in the POSIX name space.
14433
14434         Rename the following member names back to their old names,
14435         unless !__USE_GNU_REGEX.  All uses changed back.
14436         (buffer): Renamed from re_buffer.
14437         (allocated): Renamed from re_allocated.
14438         (used): Renamed from re_used.
14439         (syntax): Renamed from re_syntax.
14440         (fastmap): Renamed from re_fastmap.
14441         (translate): Renamed from re_translate.
14442         (can_be_null): Renamed from re_can_be_null.
14443         (regs_allocated): Renamed from re_regs_allocated.
14444         (fastmap_accurate): Renamed from re_fastmap_accurate.
14445         (no_sub): Renamed from re_no_sub.
14446         (not_bol): Renamed from re_not_bol.
14447         (not_eol): Renamed from re_not_eol.
14448         (newline_anchor): Renamed from re_newline_anchor.
14449         (num_regs): Renamed from rm_num_regs.
14450         (start): Renamed from rm_start.
14451         (end): Renamed from rm_end.
14452
14453         (free_state): Move up a bit.
14454
14455         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
14456         #define to be empty.
14457         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
14458         when that is what is intended.
14459         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
14460         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
14461         (MAX): New macro.
14462         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
14463         All uses changed back to re_malloc, etc.  It's now the caller's
14464         responsibility to check for overflow; all callers changed.
14465         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
14466         (re_x2nrealloc): Remove.
14467         (free_state): Remove decl.
14468
14469         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
14470         (re_set_registers, re_exec):
14471         Use K&R-style defn.
14472
14473         2006-01-31  Roland McGrath  <roland@redhat.com>
14474
14475         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
14476         Reported by Mike Frysinger <vapier@gentoo.org>.
14477
14478         2006-01-15  Andreas Jaeger  <aj@suse.de>
14479
14480         [BZ #1950]
14481         * lib/regex_internal.c (re_string_reconstruct): Adjust for
14482         build_wcs_upper_buffer change.
14483         (build_wcs_upper_buffer): Change return type.
14484
14485         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
14486
14487         * lib/regex_internal.h: Include <stdint.h> if available.
14488
14489         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
14490
14491         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
14492
14493         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
14494
14495         * lib/regcomp.c: Adjust for changed secondary hash function.
14496
14497         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
14498
14499         * lib/regex.h: Pretty printing.
14500         Clean up namespace a bit.
14501
14502         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
14503
14504         * lib/regexec.c (update_cur_sifted_state, check_arrival,
14505         check_arrival_add_next_nodes): Avoid using uninitialized variable.
14506
14507         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
14508                     Ulrich Drepper  <drepper@redhat.com>
14509
14510         [BZ #1302]
14511         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
14512         changed.
14513         (bitset_word_t): Renamed from bitset_word.  All uses changed.
14514
14515         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
14516
14517         [BZ #281]
14518         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
14519         * lib/regcomp.c: Remove unnecessary uses of
14520         unsigned RE_TRANSLATE_TYPE.
14521         * lib/regex_internal.h: Likewise.
14522         * lib/regex_internal.c: Likewise.
14523         * lib/regexec.c: Likewise.
14524         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
14525
14526         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
14527
14528         * lib/regexec.c (find_recover_state): Remove unnecessary
14529         initialization.
14530         (transit_state_bkref): Make DFA a const pointer.
14531         (get_subexp): Likewise.
14532         (check_arrival): Likewise.
14533         (update_cur_sifted_state): Likewise.
14534         (re_search_internal): Likewise.
14535         (prune_impossible_nodes): Likewise.
14536         (acquire_init_state_context): Likewise.
14537         (proceed_next_node): Likewise.
14538         (set_regs): Likewise.
14539         (free_fail_stack_return): Likewise.
14540         (check_arrival_expand_ecl): Mark DFA parameter as const.
14541         (check_arrival_expand_ecl_sub): Likewise.
14542         (check_subexp_limits): Likewise.
14543         (sub_epsilon_src_nodes):  Likewise.
14544         (add_epsilon_src_nodes):  Likewise.
14545         (merge_state_array): Likewise.
14546         (update_regs): Likewise.
14547         (build_trtable): Likewise.
14548         (sift_states_backward): Mark MCTX parameter as const.
14549         (build_sifted_states): Likewise.
14550         (update_cur_sifted_state): Likewise.
14551         (sift_states_mkref): Likewise.
14552         (check_arrival_expand_ecl): Mark eclosure as const.
14553         (check_dst_limits_calc_pos_1): Likewise.
14554         * lib/regex_internal.h (re_match_context_t): Make dfa a const
14555         pointer.
14556
14557         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
14558
14559         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
14560         (transit_state_sb): Likewise.
14561         (transit_state_mb): Likewise.
14562         (sift_states_iter_mb): Likewise.
14563         (check_arrival_add_next_nodes): Likewise.
14564         (check_node_accept_bytes): Change first parameter to pointer-to-const.
14565         [_LIBC] (re_search_2_stub): Use mempcpy.
14566
14567         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
14568         mbrtowc for very simple UTF-8 case.
14569
14570         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
14571         a pointer-to-const.
14572         (re_acquire_state_context): Likewise.
14573         * lib/regex_internal.h: Adjust prototypes.
14574
14575         * lib/regex.c: Prevent using C++ compilers.
14576
14577         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
14578         (re_acquire_state_context): Likewise.
14579
14580 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
14581
14582         * modules/regex (Depends-on): Add ssize_t.
14583
14584 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
14585
14586         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
14587         translation table.
14588
14589 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
14590
14591         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
14592
14593 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
14594             Bruno Haible  <bruno@clisp.org>
14595
14596         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
14597         <sys/types.h> and <inttypes.h>.
14598
14599 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14600
14601         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
14602         `__error_t_defined', so argp.h will not typedef the former.
14603
14604 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
14605
14606         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
14607         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
14608         glibc names.  Even if glibc is changed to conform to POSIX, the
14609         traditional names will be available anyway, since regex depends on
14610         the extensions module.  Also, fix a longstanding typo in the
14611         implementation of Spencer ERE test #75 from grep 2.3.  Problems
14612         reported by Emanuele Giaquinta.  Also, change sense of cached
14613         variable, so that the message makes sense.
14614
14615 2006-03-24  Simon Josefsson  <jas@extundo.com>
14616
14617         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
14618         including some doc fixes.
14619         (base64_encode_alloc): Fix +1 bug on allocation failures.
14620
14621 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14622
14623         * lib/base64.c (base64_encode): Do not read past end of array with
14624         unsanitized input on systems with CHAR_BIT > 8.
14625
14626 2006-03-24  Eric Blake  <ebb9@byu.net>
14627
14628         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
14629
14630 2006-03-22  Karl Berry  <karl@gnu.org>
14631
14632         * config/srclist.txt (*setenv.[ch]): get from coreutils.
14633         * config/srclistvars.sh (COREUTILS): new var.
14634
14635 2006-03-17  Jim Meyering  <jim@meyering.net>
14636
14637         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
14638         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
14639
14640 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
14641
14642         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
14643         no longer needs it.  Instead, check that regoff_t is as least
14644         as wide as ptrdiff_t.
14645
14646         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
14647         so that our regex.h stays compatible with the installed regex.
14648         This is helpful for installers who configure --without-included-regex.
14649         Problem reported by Emanuele Giaquinta.
14650
14651 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
14652
14653         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
14654         Typedef to long int, not to off_, as POSIX will likely change
14655         in that direction.
14656
14657 2006-03-15  Eric Blake  <ebb9@byu.net>
14658
14659         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
14660
14661 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
14662
14663         * lib/argp-help.c (validate_uparams): Fix typo
14664         * lib/argp-parse.c (argp_default_options): Consistently begin help
14665         messages with a lowercase letter.
14666
14667 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
14668
14669         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
14670         overrun buffers and shouldn't be used (much as gets shouldn't be
14671         used).
14672         * lib/time_r.c (asctime_r, ctime_r): Likewise.
14673
14674 2006-03-08  Simon Josefsson  <jas@extundo.com>
14675
14676         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
14677         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
14678
14679 2006-03-08  Simon Josefsson  <jas@extundo.com>
14680
14681         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
14682         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
14683
14684 2006-03-08  Simon Josefsson  <jas@extundo.com>
14685
14686         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
14687         signal that configure disabled the device.
14688
14689 2006-03-08  Simon Josefsson  <jas@extundo.com>
14690
14691         * build-aux/maint.mk: Fix refresh-po, to handle no translated
14692         languages.
14693
14694 2006-03-07  Simon Josefsson  <jas@extundo.com>
14695
14696         * modules/getopt (Depends-on): Add unistd.
14697
14698         * modules/unistd: New file.
14699
14700 2006-03-07  Simon Josefsson  <jas@extundo.com>
14701
14702         * modules/gc-random: New file.
14703
14704 2006-03-07  Simon Josefsson  <jas@extundo.com>
14705
14706         * m4/unistd_h.m4: New file.
14707
14708 2006-03-07  Simon Josefsson  <jas@extundo.com>
14709
14710         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
14711         test to be side-effect free by storing the result in the cache
14712         variable gl_cv_lib_readline, and moving the assignment of
14713         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
14714         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
14715
14716 2006-03-07  Simon Josefsson  <jas@extundo.com>
14717
14718         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
14719         error on missing devices (the functions will return an error).
14720
14721         * m4/gc.m4: Move random stuff to gc-random.m4
14722
14723 2006-03-07  Simon Josefsson  <jas@extundo.com>
14724
14725         * lib/unistd_.h: New file.
14726
14727 2006-03-07  Simon Josefsson  <jas@extundo.com>
14728
14729         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
14730
14731 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
14732
14733         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
14734         Problem reported by Juan Manuel Guerrero.
14735
14736 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
14737
14738         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
14739         the unistd module.
14740         * lib/getlogin_r.c: Likewise.
14741         * lib/getlogin_r.h: Likewise.
14742         * lib/glob.c: Likewise.
14743         * lib/pagealign_alloc.c: Likewise.
14744         * lib/unistd_.h: Remove; no longer needed.
14745
14746 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
14747
14748         * MODULES.html.sh (Support for systems lacking POSIX:2001):
14749         Add unistd.
14750         * modules/c-stack (Depends-on): Add unistd.
14751         * modules/getlogin_r: Likewise.
14752         * modules/glob: Likewise.
14753         * modules/pagealign_alloc: Likewise.
14754         * modules/unistd (Files): Remove lib/unistd_.h.
14755         (EXTRA_DIST): Remove.
14756         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
14757         need unistd_.h.
14758         (MOSTLYCLEANFILES): Remove unistd.h-t.
14759
14760 2006-03-03  Simon Josefsson  <jas@extundo.com>
14761
14762         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
14763
14764 2006-03-03  Simon Josefsson  <jas@extundo.com>
14765
14766         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
14767         libidn and bison.
14768
14769 2006-03-03  Simon Josefsson  <jas@extundo.com>
14770
14771         * build-aux/maint.mk: Add indent target.
14772
14773 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
14774
14775         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
14776         our replacement poll.h in any case, to avoid a differing
14777         declaration from a system header.  Seen on AIX.
14778
14779 2006-03-01  Simon Josefsson  <jas@extundo.com>
14780
14781         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
14782         <kasal@ucw.cz>.
14783
14784 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14785
14786         * modules/gettime (Depends-on): Add extensions module.
14787         * modules/nanosleep (Depends-on): Likewise.
14788         * modules/settime (Depends-on): Likewise.
14789
14790 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14791
14792         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
14793         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
14794         pedantically.
14795         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
14796         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
14797
14798         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
14799         not "==".  Reported by Ralf Wildenhues.
14800
14801 2006-03-01  Karl Berry  <karl@gnu.org>
14802
14803         * doc/Copyright/request-*: new files, synced from gnuorg.
14804
14805 2006-03-01  Karl Berry  <karl@gnu.org>
14806
14807         * config/srclist.txt (Copyright/*): new entries.
14808
14809 2006-02-28  Simon Josefsson  <jas@extundo.com>
14810
14811         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
14812
14813 2006-02-27  Simon Josefsson  <jas@extundo.com>
14814
14815         * lib/base64.h: Indent #define's.  From Jim Meyering
14816         <jim@meyering.net>.
14817
14818 2006-02-27  Jim Meyering  <jim@meyering.net>
14819
14820         Revert the change of 2006-02-24, so these files can continue
14821         to be sync'd from gettext.
14822         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
14823         of `config.h'.
14824
14825 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
14826
14827         * modules/intprops: New file.
14828         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
14829         Add intprops.
14830         * modules/getloadavg (Files): Remove lib/intprops.h.
14831         (Depends-on): Add intprops.
14832         * modules/human: Likewise.
14833         * modules/inttostr: Likewise.
14834         * modules/openat: Likewise.
14835         * modules/sig2str: Likewise.
14836         * modules/userspec: Likewise.
14837         * modules/utimecmp: Likewise.
14838         * modules/xnanosleep: Likewise.
14839         * modules/xstrtol: Likewise.
14840
14841 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
14842
14843         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
14844         * modules/lock-tests (TESTS): Use $(EXEEXT).
14845         * modules/tls-tests: Likewise.
14846         * modules/argp-tests: Likewise.
14847         (check_PROGRAMS): New var, replacing...
14848         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
14849
14850 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14851
14852         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
14853         `config.h'.
14854
14855 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
14856
14857         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
14858
14859 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14860
14861         Sync from coreutils.
14862         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
14863         gl_CHDIR_SAFER.
14864
14865 2006-02-22  Jim Meyering  <jim@meyering.net>
14866
14867         Sync from coreutils.
14868         * m4/chdir-safer.m4: New file.
14869
14870 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
14871
14872         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
14873         AT_FDCWD exceeds INT_MAX.
14874         * lib/openat.h (AT_FDCWD): Likewise.
14875
14876 2006-02-17  Eric Blake  <address@hidden>
14877
14878         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
14879
14880 2006-02-16  Simon Josefsson  <jas@extundo.com>
14881
14882         * modules/getaddrinfo (Depends-on): Add sys_socket.
14883
14884 2006-02-15  Simon Josefsson  <jas@extundo.com>
14885
14886         * build-aux/maint.mk: Add dsyntax-check rule.
14887
14888 2006-02-15  Eric Blake  <ebb9@byu.net>
14889
14890         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
14891         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
14892         'present but cannot compile' warnings on cygwin.
14893         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
14894         use ws2tcpip.h if sys/socket.h works.
14895         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
14896         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
14897
14898 2006-02-14  Simon Josefsson  <jas@extundo.com>
14899
14900         * modules/maintainer-makefile (Files): Rename.
14901
14902         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
14903         and (the local) Makefile.cfg to maint-cfg.mk.
14904
14905         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
14906         to the latter.
14907
14908         * modules/maintainer-makefile: New module.
14909
14910         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
14911         severaly stripped to make it possible to build it up from scratch
14912         with reliable tests.
14913
14914         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
14915         fixes to permit overriding the default actions when configure and
14916         makefile are not available.
14917
14918 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
14919
14920         Sync from coreutils.
14921         * modules/lstat (Depends-on): Don't depend on xalloc.
14922         (License): Change from GPL to LGPL, since this is now simply a
14923         replacement for a libc function.
14924
14925 2006-02-14  Jim Meyering  <jim@meyering.net>
14926
14927         Sync from coreutils.
14928
14929         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
14930         failure on deficient systems, and simplify gnulib lgpl dependencies.
14931         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
14932         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
14933
14934         * lib/xalloc-die.c: Remove unused definition of N_.
14935
14936 2006-02-14  Jim Meyering  <jim@meyering.net>
14937
14938         Sync from coreutils.
14939         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
14940         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
14941         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
14942         double-quote uses of that variable, to accommodate the rare case in
14943         which getmntent is available in none of the libraries checked.  This
14944         happens at least on FreeBSD 5.0.
14945
14946 2006-02-13  Simon Josefsson  <jas@extundo.com>
14947
14948         * gnulib-tool (Usage): Fix --import, from
14949         karl@freefriends.org (Karl Berry).
14950
14951 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
14952
14953         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
14954
14955 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
14956
14957         * lib/argp-namefrob.h: Restore changes accidentally lost during the
14958         "autoupdate" on 2005-12-12.
14959
14960 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
14961
14962         * modules/closeout (Depends-on): Remove atexit.
14963
14964 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
14965
14966         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
14967         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
14968
14969 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
14970
14971         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
14972         __EXTENSIONS__ if this causes compilation to fail.  Problem
14973         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
14974         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
14975
14976 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
14977
14978         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
14979         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
14980         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
14981         All uses changed.
14982
14983 2006-01-26  Simon Josefsson  <jas@extundo.com>
14984
14985         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
14986         prototype is visible on mingw32.
14987
14988         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
14989         for mingw32.
14990
14991         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
14992         mingw32).
14993
14994 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
14995
14996         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
14997         attempt to open for write; this always fails, at least on POSIX
14998         hosts.  This reinstates the 2006-01-09 change, which was
14999         inadvertently removed.
15000
15001 2006-01-26  Bruno Haible  <bruno@clisp.org>
15002
15003         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
15004         Reported by Paul Eggert.
15005
15006 2006-01-26  Bruno Haible  <bruno@clisp.org>
15007             Paul Eggert  <eggert@cs.ucla.edu>
15008
15009         * lib/stdbool_.h (_Bool)
15010         [(! (defined __cplusplus || defined __BEOS__)
15011           && !defined __GNUC__
15012           && !(defined __HP_cc || defined __xlc__
15013                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
15014                || defined __sgi))]:
15015         #define to signed char in these cases too; this simplifies
15016         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
15017         etc., separately) and makes it more conservative.
15018
15019 2006-01-25  Simon Josefsson  <jas@extundo.com>
15020
15021         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
15022         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
15023         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
15024
15025 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
15026
15027         * lib/argp-namefrob.h: Bugfix. Remove stray #
15028
15029 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
15030
15031         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
15032         so that we test the test.
15033         Check for yet another HP-UX cc bug involving *bool |= bool.
15034
15035 2006-01-25  Karl Berry  <karl@gnu.org>
15036
15037         * config/srclist.txt (vasnprintf.c): sync lost.
15038
15039 2006-01-25  Jim Meyering  <jim@meyering.net>
15040
15041         Sync from the stable (b5) branch of coreutils:
15042
15043         * lib/fts.c (fts_children): Don't let close() clobber errno from
15044         failed fchdir().
15045
15046         * lib/fts.c (fts_stat): When following a symlink-to-directory,
15047         don't necessarily interpret stat-fails+lstat-succeeds as indicating
15048         a dangling symlink.  That can also happen at least for ELOOP.
15049         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
15050         FYI, this bug predates the inclusion of fts.c in coreutils.
15051
15052         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
15053         in their own block, so pre-c99 compilers don't object.
15054
15055         Avoid the double-free (first in fts_read, second in fts_close) that
15056         would occur when an `active' directory is made inaccessible (e.g.,
15057         via chmod a-x) during a traversal.
15058         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
15059         before returning.  Reproduce this failure by
15060         mkdir -p a/b; cd a; chmod a-x . b
15061         Reported by Stavros Passas.
15062
15063 2006-01-25  Jim Meyering  <jim@meyering.net>
15064
15065         * lib/fileblocks.c: Remove more useless parentheses.
15066         * lib/readutmp.h: Likewise.
15067
15068 2006-01-25  Bruno Haible  <bruno@clisp.org>
15069
15070         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
15071         warnings.
15072         Reported by Paul Eggert.
15073
15074 2006-01-25  Bruno Haible  <bruno@clisp.org>
15075
15076         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
15077         rid of a trap command. For Solaris sh.
15078         Reported by Mark D. Baushke <mdb@gnu.org>.
15079
15080 2006-01-24  Simon Josefsson  <jas@extundo.com>
15081
15082         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
15083         Bruno.
15084
15085 2006-01-24  Karl Berry  <karl@gnu.org>
15086
15087         * config/srclist.txt (argp-namefrob.h): sync lost.
15088
15089 2006-01-24  Jim Meyering  <jim@meyering.net>
15090
15091         * modules/openat (Files): Add lib/intprops.h.
15092         From Mark D. Baushke.
15093
15094 2006-01-24  Jim Meyering  <jim@meyering.net>
15095
15096         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
15097         Reported by Mark D. Baushke.
15098
15099 2006-01-24  Jim Meyering  <jim@meyering.net>
15100
15101         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
15102
15103 2006-01-24  Bruno Haible  <bruno@clisp.org>
15104
15105         * modules/strnlen (Maintainer): Change from glibc to all.
15106
15107 2006-01-24  Bruno Haible  <bruno@clisp.org>
15108
15109         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
15110         Patch by Paul Eggert.
15111
15112 2006-01-24  Bruno Haible  <bruno@clisp.org>
15113
15114         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
15115         already has it.
15116         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
15117         2005-11-26.
15118
15119         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
15120         'signed char' to avoid problems with the built-in _Bool type.
15121         Reported by Paul Eggert on 2005-11-26.
15122
15123 2006-01-24  Bruno Haible  <bruno@clisp.org>
15124
15125         * gnulib-tool (func_import): Avoid constructing complicated sed
15126         expressions inside backquote.
15127         Report and solution by Mark D. Baushke <mdb@gnu.org>.
15128
15129 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
15130
15131         These changes imported from libc.
15132         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
15133         test and two separate function calls.
15134         * lib/strndup.c (__strndup): Add libc_hidden_def.
15135
15136 2006-01-23  Simon Josefsson  <jas@extundo.com>
15137
15138         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
15139         Remove the test_*_SOURCES variable: automake infers it by default.
15140         * modules/tls-tests: Likewise.
15141
15142 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
15143
15144         Work around porting bugs reported by Dieter in
15145         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
15146         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
15147         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
15148         Include "getopt.h" first, to check interface.
15149         (getenv): Declare only if defined HAVE_DECL_GETENV &&
15150         !HAVE_DECL_GETENV.
15151         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
15152         (__strndup): Revert to K&R-style function dfns, the glibc style.
15153         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
15154         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
15155         Include strnlen.h first, to get prototype properly.
15156         (strnlen): Renamed from __strnlen.
15157         Remove weak alias.
15158
15159 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
15160
15161         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
15162
15163 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
15164
15165         * config/srclist.txt: Adjust to reflect glibc reorganization.
15166         This affects only comments.
15167
15168 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
15169
15170          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
15171          Reported by Bruce Korb <bkorb@gnu.org>.
15172
15173 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
15174
15175         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
15176         to pacify gcc -Wswitch-default.
15177
15178 2006-01-22  Bruno Haible  <bruno@clisp.org>
15179
15180         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
15181         temporary buffer for sprintf, take into account the precision also
15182         for 'd', 'i', 'u', 'o', 'x', 'X'.
15183
15184 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
15185
15186         * modules/argp-tests: New module
15187         * tests/test-argp.c: New file
15188         * tests/test-argp-2.sh: New file
15189
15190 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
15191
15192         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
15193         (__argp_base_name): Removed
15194         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
15195         typo.
15196         (__argp_base_name): Provide macro definition or extern declaration
15197         depending on the configuration
15198
15199 2006-01-20  Simon Josefsson  <jas@extundo.com>
15200
15201         * modules/inet_ntop (Depends-on): Depend on sys_socket.
15202
15203 2006-01-20  Simon Josefsson  <jas@extundo.com>
15204
15205         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
15206
15207 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15208
15209         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
15210         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
15211         Suggested by Bruno Haible.
15212
15213 2006-01-20  Karl Berry  <karl@gnu.org>
15214
15215         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
15216         until changes propagate, I guess.
15217
15218 2006-01-19  Simon Josefsson  <jas@extundo.com>
15219
15220         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
15221
15222 2006-01-19  Simon Josefsson  <jas@extundo.com>
15223
15224         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
15225
15226 2006-01-19  Simon Josefsson  <jas@extundo.com>
15227
15228         * gnulib-tool: Set check_PROGRAMS.
15229
15230         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
15231         modules/des-tests, modules/gc-arcfour-tests,
15232         modules/gc-arctwo-tests, modules/gc-des-tests,
15233         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
15234         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
15235         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
15236         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
15237         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
15238         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
15239         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
15240         test_*_SOURCES.
15241
15242 2006-01-18  Simon Josefsson  <jas@extundo.com>
15243
15244         * modules/socklen (Depends-on): Depend on sys_socket.
15245
15246 2006-01-18  Simon Josefsson  <jas@extundo.com>
15247
15248         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
15249         modules/des-tests, modules/gc-arcfour-tests,
15250         modules/gc-arctwo-tests, modules/gc-des-tests,
15251         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
15252         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
15253         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
15254         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
15255         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
15256         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
15257         $(EXEEXT) to automake TESTS variable, for mingw32.
15258
15259 2006-01-17  Simon Josefsson  <jas@extundo.com>
15260
15261         * modules/socklen (Include): Need sys/socket.h.
15262
15263 2006-01-17  Bruno Haible  <bruno@clisp.org>
15264
15265         * modules/ssize_t (Include): Add <sys/types.h>.
15266
15267 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
15268
15269         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
15270         it's not portable and it doesn't work with cross-compiles.
15271         Problem reported by Bruno Haible.  Fix missing-$ typo in
15272         'test "gl_cv_ignore_unused_libraries" ...' that prevented
15273         -zignore from being used with Sun's C compiler.
15274
15275 2006-01-12  Simon Josefsson  <jas@extundo.com>
15276
15277         * lib/base64.c: Fix warning, reported by Bruno Haible
15278         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
15279
15280 2006-01-12  Bruno Haible  <bruno@clisp.org>
15281
15282         * modules/ldd: New file.
15283         * build-aux/ldd.sh.in: New file.
15284         * MODULES.html.sh (Support for building libraries and executables): Add
15285         ldd.
15286
15287 2006-01-12  Bruno Haible  <bruno@clisp.org>
15288
15289         * m4/ldd.m4: New file.
15290
15291 2006-01-12  Bruno Haible  <bruno@clisp.org>
15292
15293         * gnulib-tool (func_import, func_create_testdir): Don't go into an
15294         endless loop while replacing $auxdir with build-aux.
15295
15296 2006-01-11  Simon Josefsson  <jas@extundo.com>
15297
15298         * lib/stdint_.h (SIZE_MAX): Add missing (.
15299
15300 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
15301
15302         Sync from coreutils.
15303         * lib/md5.c: Fix commentary typos.
15304         (alignof, UNALIGNED_P): No need for a GCC-specific version.
15305         * lib/md5.h (__attribute__): Remove; unused.
15306         * lib/sha1.c: Fix commentary to match md5 better.
15307         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
15308         so that we don't need to worry about alignment.  All uses changed.
15309         This merges the 2005-10-28 md5 change into sha1.
15310
15311 2006-01-11  Jim Meyering  <jim@meyering.net>
15312
15313         Sync from coreutils.
15314         * lib/md5.c (OP): Fix spacing.
15315
15316 2006-01-11  Bruno Haible  <bruno@clisp.org>
15317
15318         Ensure automatic ordering between gl_LOCK and gl_ARGP.
15319         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
15320         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
15321
15322 2006-01-11  Bruno Haible  <bruno@clisp.org>
15323
15324         Ensure automatic ordering between gl_LOCK and gl_ARGP.
15325         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
15326         the "early" section as well.
15327
15328 2006-01-11  Bruno Haible  <bruno@clisp.org>
15329
15330         Avoid "ar: no archive members specified" error on MacOS X.
15331         * gnulib-tool (func_modules_add_dummy): New function.
15332         (func_import, func_create_testdir): Invoke it.
15333
15334 2006-01-11  Bruno Haible  <bruno@clisp.org>
15335
15336         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
15337         with $auxdir in AC_CONFIG_FILES statements.
15338
15339 2006-01-11  Bruno Haible  <bruno@clisp.org>
15340
15341         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
15342         Initialize also noinst_HEADERS to empty.
15343
15344 2006-01-11  Bruno Haible  <bruno@clisp.org>
15345
15346         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
15347         variables.
15348         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
15349         autoreconf.
15350
15351 2006-01-11  Bruno Haible  <bruno@clisp.org>
15352
15353         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
15354         overridable by the user.
15355         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15356
15357 2006-01-10  Simon Josefsson  <jas@extundo.com>
15358
15359         * modules/sys_socket: New file.
15360
15361 2006-01-10  Simon Josefsson  <jas@extundo.com>
15362
15363         * m4/sys_socket_h.m4: New file.
15364
15365 2006-01-10  Simon Josefsson  <jas@extundo.com>
15366
15367         * lib/socket_.h: New file.
15368
15369 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
15370
15371         * modules/readutmp (Maintainer): Add myself.
15372
15373 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
15374
15375         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
15376         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
15377         People who are still concerned with buggy memcmp implementations
15378         can invoke gl_FUNC_MEMCMP themselves.
15379
15380 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
15381
15382         * lib/regex_internal.h (BITSET_WORD_BITS):
15383         Work around a bug in 64-bit PGC (before version 6.1-2), where the
15384         preprocessor mishandles large unsigned values as if they were signed.
15385         Problem reported by Claudio Fontana in
15386         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
15387
15388 2006-01-10  Jim Meyering  <jim@meyering.net>
15389
15390         Avoid the double-free (first in fts_read, second in fts_close) that
15391         would occur when an `active' directory is made inaccessible (e.g.,
15392         via chmod a-x) during a traversal.
15393         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
15394         before returning.  Reproduce this failure by
15395         mkdir -p a/b; cd a; chmod a-x . b
15396         Reported by Stavros Passas.
15397
15398         Sync from coreutils.
15399         * lib/sha1.c: Tweak grammar in a comment.
15400
15401 2006-01-10  Jim Meyering  <jim@meyering.net>
15402
15403         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
15404         Patch by Joerg Sonnenberger.
15405
15406 2006-01-10  Bruno Haible  <bruno@clisp.org>
15407
15408         * modules/readutmp: Depend on module free.
15409         * modules/strtok_r: Depend on module restrict.
15410
15411 2006-01-10  Bruno Haible  <bruno@clisp.org>
15412
15413         * modules/gettext (configure.ac): Add an invocation of
15414         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
15415
15416 2006-01-10  Bruno Haible  <bruno@clisp.org>
15417
15418         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
15419         Reported by Werner Lemberg <wl@gnu.org>.
15420
15421 2006-01-10  Bruno Haible  <bruno@clisp.org>
15422
15423         * lib/localcharset.c: Update from GNU gettext.
15424
15425 2006-01-10  Bruno Haible  <bruno@clisp.org>
15426
15427         * lib/argp.h (__const): Remove macro. Use const instead.
15428         * lib/argp-fmtstream.h (__const): Likewise.
15429         * lib/glob_.h (__const): Remove macro.
15430         * lib/glob-libc.h: Use const instead of __const.
15431
15432 2006-01-10  Bruno Haible  <bruno@clisp.org>
15433
15434         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
15435         variable.
15436         Needed to avoid an automake error regarding the 'gettext' module.
15437
15438 2006-01-09  Simon Josefsson  <jas@extundo.com>
15439
15440         * modules/inet_ntop (Depends-on): Add restrict.
15441
15442 2006-01-09  Simon Josefsson  <jas@extundo.com>
15443
15444         * modules/gc-rijndael-tests (License): Put under LGPL.
15445
15446         * modules/gc-des-tests (License): Likewise.
15447
15448         * modules/gc-arcfour-tests (License): Likewise.
15449
15450         * modules/gc-arctwo-tests (License): Likewise.
15451
15452         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
15453
15454         * modules/gc-hmac-sha1-tests (Files): Likewise.
15455
15456         * modules/gc-hmac-md5-tests (License): Likewise.
15457
15458         * modules/gc-sha1-tests (License): Likewise.
15459
15460         * modules/gc-md5-tests (License): Likewise.
15461
15462         * modules/gc-md4-tests (License): Likewise.
15463
15464         * modules/gc-md2-tests (License): Likewise.
15465
15466         * modules/gc-tests (License): Likewise.
15467
15468         * modules/des-tests (License): Likewise.
15469
15470         * modules/md4-tests (License): Likewise.
15471
15472         * modules/md2-tests (License): Likewise.
15473
15474 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
15475
15476         Sync from coreutils:
15477
15478         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
15479         * modules/lib-ignore: New file.
15480         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
15481         chdir-safer.m4, lchmod.m4.
15482         * modules/openat: Add mkdirat.c, openat-priv.h.
15483
15484 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
15485
15486         Sync from coreutils.
15487         * m4/lib-ignore.m4: New file.
15488         * m4/lchmod.m4: New file.
15489
15490 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
15491
15492         Sync from coreutils.
15493         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
15494         for write access: POSIX says that must fail.
15495         * lib/fts.c (diropen): Likewise.
15496         * lib/save-cwd.c (save_cwd): Likewise.
15497         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
15498         well, for minor improvements on hosts that lack O_DIRECTORY.
15499         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
15500         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
15501         Fall back on chown if open failed with EACCES.
15502
15503         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
15504         Report an error at compile-time if only a 1-second nominal clock
15505         resolution is found.
15506
15507         * lib/lchmod.h: New file.
15508         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
15509         (make_dir_parents): Use lchown rather than chown, and
15510         lchmod rather than chmod.
15511
15512         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
15513         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
15514         "proc" reported by n0dalus.
15515
15516         * lib/mountlist.c: Include <limits.h>.
15517         (dev_from_mount_options)
15518         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
15519         New function.  It no longer assumes "dev=" has the System V meaning
15520         on Linux (since it doesn't).  It also parses "dev=" more carefully.
15521         (read_file_system_list)
15522         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
15523         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
15524         dev= in that case.
15525
15526         * lib/posixtm.h (PDS_PRE_2000): New macro.
15527         * lib/posixtm.c (year): Arg is now syntax_bits rather than
15528         allow_century.  All usages changed.  Reject dates outside the range
15529         1969-1999 if PDS_PRE_2000 is used.
15530
15531 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
15532
15533         Sync from coreutils.
15534         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
15535         (Time of day items): Mention the possibility of leap seconds.
15536         Problem reported by Dr. David Alan Gilbert.
15537
15538 2006-01-09  Jim Meyering  <jim@meyering.net>
15539
15540         Sync from coreutils.
15541
15542         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
15543
15544         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
15545
15546         * lib/modechange.c (mode_compile): Reject an invalid mode string
15547         that starts with an octal digit.  From Andreas Gruenbacher.
15548
15549         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
15550         and dup to open_safer and dup_safer, respectively.
15551         (openat_permissive): Fix typo in comment.
15552
15553         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
15554         "gettext.h"; either no longer needed or are guaranteed by openat.h.
15555         (_): Remove; no longer needed.
15556         (openat): Renamed from rpl_openat; no need for rpl_openat
15557         since openat.h renames openat for us.
15558         Replace most of the body with a call to openat_permissive,
15559         to avoid duplicate code.
15560         Port to (probably hypothetical) environments were mode_t is
15561         wider than int.
15562         (openat_permissive): Require mode arg, so that we can check
15563         types better.  Put it just after flags.  Change cwd failure
15564         indicator from pointer-to-bool to pointer-to-errno-value.
15565         All callers changed.
15566         Invoke openat_save_fail and/or openat_restore_fail if
15567         cwd_errno is null, so that openat can call us.
15568         (openat_permissive, fdopendir, fstatat, unlinkat):
15569         Simplify errno handling to avoid some duplicate code,
15570         as it's OK to set errno on success.
15571         * lib/openat.h: Revamp code so that function macros depend on
15572         __OPENAT_PREFIX only, not also on AT_FDCWD.
15573         (openat_ro): Remove.  Caller changed to use openat_permissive.
15574         (openat_permissive): Now a macro, if not a function.
15575         (openat_restore_fail, openat_save_fail): Now always functions,
15576         since mkdirat needs them even if __OPENAT_PREFIX is defined.
15577
15578         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
15579         and openat.c.
15580         * lib/mkdirat.c: Include openat-priv.h.
15581         Remove definitions of macros defined therein.
15582         * lib/openat.c: Likewise.
15583
15584         * lib/mkdirat.c (mkdirat): New file and function.
15585         * lib/openat.h (mkdirat): Declare.
15586
15587         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
15588
15589         * lib/openat.h (openat_permissive): Declare.
15590         (openat_ro): Define.
15591
15592         * lib/openat.c (EXPECTED_ERRNO): New macro.
15593         (openat_permissive): New function -- used in remove.c rewrite.
15594         (all functions): Set errno just before returning, only if there
15595         was an actual failure.
15596         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
15597
15598         Emulate openat-family functions using Linux's procfs, if possible.
15599         Idea and some code based on Ulrich Drepper's glibc changes.
15600
15601         * lib/openat.c: (BUILD_PROC_NAME): New macro.
15602         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
15603         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
15604         before falling back on save_cwd and restore_cwd.
15605         (fdopendir, fstatat, unlinkat): Likewise.
15606
15607         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
15608         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
15609
15610         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
15611         as second argument to va_arg.  Otherwise, some versions of gcc
15612         warn that `if this code is reached, the program will abort'.
15613
15614 2006-01-09  Jim Meyering  <jim@meyering.net>
15615
15616         Sync from coreutils.
15617         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
15618         Require openat-priv.h.
15619
15620 2006-01-09  Bruno Haible  <bruno@clisp.org>
15621
15622         * modules/strnlen (Include): Use strnlen.h.
15623
15624 2006-01-09  Bruno Haible  <bruno@clisp.org>
15625
15626         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
15627
15628 2006-01-09  Bruno Haible  <bruno@clisp.org>
15629
15630         * lib/sysexit_.h (EX_OK): New macro.
15631         Suggested by Martin Lambers <marlam@marlam.de>.
15632
15633 2006-01-09  Bruno Haible  <bruno@clisp.org>
15634
15635         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
15636         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
15637
15638 2006-01-09  Bruno Haible  <bruno@clisp.org>
15639
15640         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
15641         numbers.
15642
15643 2006-01-09  Bruno Haible  <bruno@clisp.org>
15644
15645         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
15646         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
15647         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
15648         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
15649
15650 2006-01-09  Bruno Haible  <bruno@clisp.org>
15651
15652         * build-aux/javacomp.sh.in: New file, moved from lib/.
15653         * modules/javacomp-script (Files): Update.
15654         (configure.ac): Add AC_CONFIG_FILES invocation.
15655         (EXTRA_DIST): Remove variable.
15656
15657         * build-aux/javaexec.sh.in: New file, moved from lib/.
15658         * modules/javaexec (Files): Update.
15659         (configure.ac): Add AC_CONFIG_FILES invocation.
15660         (EXTRA_DIST): Remove javaexec.sh.in.
15661
15662         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
15663         * modules/csharpcomp-script (Files): Update.
15664         (configure.ac): Add AC_CONFIG_FILES invocation.
15665         (EXTRA_DIST): Remove variable.
15666
15667         * build-aux/csharpexec.sh.in: New file, moved from lib/.
15668         * modules/csharpexec (Files): Update.
15669         (configure.ac): Add AC_CONFIG_FILES invocation.
15670         (EXTRA_DIST): Remove csharpexec.sh.in.
15671
15672 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
15673
15674         Sync from coreutils.
15675
15676         Add POSIX ACL support
15677         * lib/acl.h (copy_acl, set_acl): Add declarations.
15678         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
15679         systems other than Linux.
15680         (chmod_or_fchmod): New function: use fchmod when possible,
15681         and chmod otherwise.
15682         (file_has_acl): Add a POSIX ACL implementation, with a
15683         Linux-specific subcase.
15684         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
15685         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
15686         acls are unsupported.
15687         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
15688         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
15689         are unsupported.
15690
15691 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
15692
15693         Sync from coreutils.
15694         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
15695
15696 2006-01-07  Bruno Haible  <bruno@clisp.org>
15697
15698         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
15699         gl_EARLY.
15700
15701 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
15702
15703         * lib/strftime.c (tzname): Don't declare if it is already #defined.
15704         Problem reported for Mingw by Mark Junker.
15705
15706 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
15707
15708         * README: Gnulib normally doesn't generate a tarball.
15709
15710 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
15711
15712         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
15713         long int, not int, for nanosecond counts, so that people who are
15714         used to POSIX struct timespec won't be surprised.  Reported by Jim
15715         Meyering.
15716
15717 2005-12-28  Bruno Haible  <bruno@clisp.org>
15718
15719         * build-aux/config.rpath: Update from GNU gettext.
15720
15721 2005-12-16  Jim Meyering  <jim@meyering.net>
15722
15723         * modules/fprintftime: New module.
15724         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
15725
15726 2005-12-16  Jim Meyering  <jim@meyering.net>
15727
15728         * m4/fprintftime.m4: New file.
15729
15730 2005-12-16  Jim Meyering  <jim@meyering.net>
15731
15732         * lib/fprintftime.c, lib/fprintftime.h: New files.
15733
15734 2005-12-15  Simon Josefsson  <jas@extundo.com>
15735
15736         * modules/socklen (configure.ac): Fix M4 macro name, to align with
15737         new m4/socklen.m4.
15738
15739 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
15740
15741         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
15742         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
15743
15744 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
15745
15746         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
15747         * lib/argp-help.c (fill_in_uparams): Check if the constructed
15748         struct uparams is valid. Fall back to the default values if it is
15749         not.
15750
15751 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
15752
15753         * modules/argp (Files): Add argp-pin.c
15754         (Depends-on): dirname
15755         (lib_SOURCES): Add argp-pin.c
15756
15757 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
15758
15759         * m4/argp.m4:  Check if program_invocation_name and
15760         program_invocation_short_name are declared and define appropriate
15761         macros if they are not.
15762
15763 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
15764
15765         * lib/argp-help.c (__argp_base_name): New function
15766         (__argp_short_program_name): Rewrite using __argp_base_name
15767         * lib/argp-namefrob.h: Define program_invocation_name and
15768         program_invocation_short_name if requested
15769         (__argp_base_name): Add prototype
15770         * lib/argp-parse.c (argp_def): Use gettext wrappers
15771         (argp_default_parser): Use __argp_base_name
15772         * lib/argp-pin.c: New file. Defines program_invocation_name and
15773         program_invocation_short_name on systems that lack them.
15774
15775 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
15776
15777         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
15778         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
15779         porting problem reported by Georg Schwarz in
15780         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
15781
15782 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
15783
15784         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
15785         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
15786         porting problem reported by Georg Schwarz in
15787         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
15788
15789 2005-12-05  Bruno Haible  <bruno@clisp.org>
15790
15791         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
15792         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
15793         Reported by Mark Junker <mjscod@gmx.de>.
15794
15795 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
15796
15797         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
15798         Use implementation from Albert Chin, with some
15799         comments/corrections by Stepan Kasal and myself.
15800
15801 2005-12-02  Bruno Haible  <bruno@clisp.org>
15802
15803         * gnulib-tool (func_import): Accept GPLed build tool modules when
15804         --lgpl is given.
15805         * modules/csharpcomp-script: New file.
15806         * modules/csharpcomp: Depend on it.
15807         * modules/javacomp-script: New file.
15808         * modules/javacomp: Depend on it.
15809         Suggested by Simon Josefsson.
15810
15811 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
15812
15813         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
15814         statement, to work around an HP-UX 10.20 compiler bug reported by
15815         Peter O'Gorman.
15816
15817 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
15818
15819         * modules/savedir (Depends-on): Add openat.
15820
15821 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
15822
15823         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
15824         (uintmax_t) [defined uintmax_t]: Do not declare.
15825         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
15826         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
15827         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
15828         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
15829         sake of portability to weird hosts that C allows (though we don't
15830         know of any practical examples).
15831
15832         * lib/savedir.h (fdsavedir): New decl.
15833         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
15834         contains most of the former guts of savedir.
15835         (savedir): Use savedirstream.
15836         Include "openat.h".
15837
15838 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
15839
15840         * modules/obstack (Files): Add m4/ulonglong.m4.
15841         Problem reported by Davide Angelocola.
15842
15843 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
15844
15845         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
15846         coreutils no longer futzes with rounding modes.
15847
15848 2005-11-14  Jim Meyering  <jim@meyering.net>
15849
15850         * lib/mkstemp-safer.c: Include <config.h>, required for possible
15851         replacement of mkstemp.
15852
15853 2005-11-10  Simon Josefsson  <jas@extundo.com>
15854
15855         * lib/readline.c: Remove EOL.
15856
15857 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15858
15859         * modules/gethrxtime (Depends-on): Add gettime.
15860
15861 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15862
15863         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
15864         or gettimeofday; no longer needed.
15865
15866 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15867
15868         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
15869         time business.
15870         (gethrxtime) [! (HAVE_NANOUPTIME
15871         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
15872         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
15873         our own approximation.
15874
15875 2005-11-08  Eric Blake  <ebb9@byu.net>
15876
15877         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
15878
15879 2005-11-08  Eric Blake  <ebb9@byu.net>
15880
15881         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
15882
15883 2005-11-04  Bruno Haible  <bruno@clisp.org>
15884
15885         * gnulib-tool: Implement --update mode.
15886
15887 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
15888
15889         Fix porting problem reported by Theodoros V. Kalamatianos.
15890         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
15891         Don't assume that futimes failing means we must fail.
15892
15893 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
15894
15895         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
15896         variables to suggest the intended function of the PATH_MAX check.
15897
15898 2005-10-30  Kean Johnston  <jkj@sco.com>
15899
15900         Trivial changes to support SCO systems.
15901         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
15902         as PATH_MAX.
15903         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
15904         where __ptr is null when no I/O is pending.
15905
15906 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15907
15908         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
15909         leave errno alone.  Problem reported by Dmitry V. Levin.
15910
15911 2005-10-28  Simon Josefsson  <jas@extundo.com>
15912
15913         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
15914         Test more.
15915
15916         * tests/test-gc-md2.c, tests/test-md2.c: New files.
15917
15918         * modules/md2, modules/md2-tests: New files.
15919
15920 2005-10-28  Simon Josefsson  <jas@extundo.com>
15921
15922         * m4/inet_ntop.m4: More tests.
15923
15924         * m4/gc-md2.m4, md2.m4: New file.
15925
15926 2005-10-28  Simon Josefsson  <jas@extundo.com>
15927
15928         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
15929         "restrict" keywords, as per POSIX.  Protect the function
15930         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
15931         Don't use K&R prototypes.  Check the sprintf return values.
15932         Re-define EAFNOSUPPORT if not present.  Indent.
15933
15934         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
15935         suggested by Bruno Haible <bruno@clisp.org>.
15936
15937         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
15938
15939         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
15940
15941         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
15942         libgcrypt).
15943
15944         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
15945
15946         * lib/md2.h, lib/md2.c: New files.
15947
15948 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
15949
15950         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
15951         errno alone.  Problem reported by Frederic Jolliton.
15952
15953 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
15954
15955         * modules/verify (License): Change from GPL to LGPL.  This is a
15956         tiny module and there are apparently near-equivalents that are
15957         under the BSD license.
15958
15959 2005-10-24  Simon Josefsson  <jas@extundo.com>
15960
15961         * modules/sha1: Relicense to LGPL.
15962
15963 2005-10-24  Simon Josefsson  <jas@extundo.com>
15964
15965         * lib/md4.h: Shrink buffer size, now that we changed the type.
15966
15967 2005-10-23  Simon Josefsson  <jas@extundo.com>
15968
15969         * gnulib-tool (func_import): Fix --tests-base.
15970
15971 2005-10-22  Simon Josefsson  <jas@extundo.com>
15972
15973         * modules/arcfour (Depends-on): Need stdint.
15974
15975 2005-10-22  Simon Josefsson  <jas@extundo.com>
15976
15977         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
15978         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
15979
15980 2005-10-22  Simon Josefsson  <jas@extundo.com>
15981
15982         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
15983         suggested by Bruno Haible <bruno@clisp.org>.
15984
15985 2005-10-22  Simon Josefsson  <jas@extundo.com>
15986
15987         * lib/crc.h: Include stddef.h, for size_t.
15988
15989 2005-10-22  Simon Josefsson  <jas@extundo.com>
15990
15991         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
15992         arcfour_context struct (simplify test vector testing in GNU
15993         Shishi).
15994
15995 2005-10-21  Simon Josefsson  <jas@extundo.com>
15996
15997         * modules/des, modules/des-tests: New files.
15998
15999         * modules/gc-des, modules/gc-des-tests: New files.
16000
16001         * tests/test-des.c, tests/test-gc-des.c: New file.
16002
16003 2005-10-21  Simon Josefsson  <jas@extundo.com>
16004
16005         * modules/arctwo, modules/arctwo-tests: New files.
16006
16007         * tests/test-arctwo.c: New file.
16008
16009         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
16010
16011         * tests/test-gc-arctwo.c: New file.
16012
16013 2005-10-21  Simon Josefsson  <jas@extundo.com>
16014
16015         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
16016         Bruno Haible <bruno@clisp.org>.
16017
16018         * m4/gc-des.m4: New file.
16019
16020 2005-10-21  Simon Josefsson  <jas@extundo.com>
16021
16022         * m4/arctwo.m4: New file.
16023
16024         * m4/gc-arctwo.m4: New file.
16025
16026 2005-10-21  Simon Josefsson  <jas@extundo.com>
16027
16028         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
16029         block.
16030
16031 2005-10-21  Simon Josefsson  <jas@extundo.com>
16032
16033         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
16034         <bruno@clisp.org>.
16035
16036         * lib/hmac-sha1.c (hmac_sha1): Likewise.
16037
16038         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
16039         Bruno Haible <bruno@clisp.org>.
16040
16041         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
16042         <bruno@clisp.org>.
16043
16044 2005-10-21  Simon Josefsson  <jas@extundo.com>
16045
16046         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
16047
16048 2005-10-21  Simon Josefsson  <jas@extundo.com>
16049
16050         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
16051
16052 2005-10-21  Simon Josefsson  <jas@extundo.com>
16053
16054         * lib/des.h, lib/des.c: New files.
16055
16056         * lib/gc-gnulib.c: Support DES.c
16057
16058 2005-10-21  Simon Josefsson  <jas@extundo.com>
16059
16060         * lib/arctwo.h, lib/arctwo.c: New files.
16061
16062         * lib/gc-gnulib.c: Support ARCTWO.
16063
16064 2005-10-21  Simon Josefsson  <jas@extundo.com>
16065
16066         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
16067         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
16068
16069 2005-10-21  Simon Josefsson  <jas@extundo.com>
16070
16071         * gnulib-tool (func_import, func_create_testdir): Define automake
16072         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
16073         Makefile.am snippet),
16074         suggested by Bruno Haible <bruno@clisp.org>.
16075
16076         * modules/gc (Makefile.am): Use it.
16077
16078 2005-10-21  Bruno Haible  <bruno@clisp.org>
16079
16080         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
16081         patch.
16082
16083 2005-10-19  Simon Josefsson  <jas@extundo.com>
16084
16085         * tests/test-gc-rijndael.c: New file.
16086
16087         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
16088
16089 2005-10-19  Simon Josefsson  <jas@extundo.com>
16090
16091         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
16092         interface too.
16093
16094 2005-10-19  Simon Josefsson  <jas@extundo.com>
16095
16096         * tests/test-gc-arcfour.c: New file.
16097
16098         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
16099
16100 2005-10-19  Simon Josefsson  <jas@extundo.com>
16101
16102         * modules/gc-md4, modules/gc-md4-tests: New file.
16103
16104         * tests/test-gc-md4.c: New file.
16105
16106 2005-10-19  Simon Josefsson  <jas@extundo.com>
16107
16108         * m4/gc-md4.m4: New file.
16109
16110 2005-10-19  Simon Josefsson  <jas@extundo.com>
16111
16112         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
16113         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
16114         <kasal@ucw.cz>.
16115
16116 2005-10-19  Simon Josefsson  <jas@extundo.com>
16117
16118         * m4/gc-arcfour.m4: New file.
16119
16120         * m4/gc-rijndael.m4: New file.
16121
16122 2005-10-19  Simon Josefsson  <jas@extundo.com>
16123
16124         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
16125
16126 2005-10-19  Simon Josefsson  <jas@extundo.com>
16127
16128         * lib/gc-gnulib.c: Support ARCFOUR.
16129
16130 2005-10-19  Simon Josefsson  <jas@extundo.com>
16131
16132         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
16133         support.
16134
16135         * lib/gc.h: Add ECB enum type.
16136
16137         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
16138
16139 2005-10-18  Simon Josefsson  <jas@extundo.com>
16140
16141         * tests/test-md5.c: New file.
16142
16143         * modules/md5-tests: New file.
16144
16145 2005-10-18  Simon Josefsson  <jas@extundo.com>
16146
16147         * tests/test-md4.c: New file.
16148
16149         * modules/md4, modules/md4-tests: New files.
16150
16151 2005-10-18  Simon Josefsson  <jas@extundo.com>
16152
16153         * m4/md4.m4: New file.
16154
16155 2005-10-18  Simon Josefsson  <jas@extundo.com>
16156
16157         * lib/md4.h, lib/md4.c: New files, based on md5.?.
16158
16159 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
16160
16161         * gnulib-tool (func_create_testdir): Omit the second check whether
16162         BUILT_SOURCES in nonempty.
16163
16164 2005-10-17  Simon Josefsson  <jas@extundo.com>
16165
16166         * tests/test-rijndael.c: New file.
16167
16168 2005-10-17  Simon Josefsson  <jas@extundo.com>
16169
16170         * modules/sha1: Depend on stdint instead of md5.
16171
16172         * modules/md5: Depend on stdint, remove uint32_t.
16173
16174 2005-10-17  Simon Josefsson  <jas@extundo.com>
16175
16176         * modules/gc-sha1-tests: New file.
16177
16178         * tests/test-gc-sha1.c: New file.
16179
16180 2005-10-17  Simon Josefsson  <jas@extundo.com>
16181
16182         * m4/md5.m4: Remove call to uint32_t.m4.
16183
16184 2005-10-17  Simon Josefsson  <jas@extundo.com>
16185
16186         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
16187
16188         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
16189         md5.h.
16190
16191         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
16192
16193         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
16194
16195 2005-10-17  Simon Josefsson  <jas@extundo.com>
16196
16197         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
16198
16199 2005-10-17  Simon Josefsson  <jas@extundo.com>
16200
16201         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
16202
16203 2005-10-17  Simon Josefsson  <jas@extundo.com>
16204
16205         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
16206
16207         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
16208
16209 2005-10-17  Bruno Haible  <bruno@clisp.org>
16210
16211         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
16212         that it can also be used in a test.
16213
16214 2005-10-16  Bruno Haible  <bruno@clisp.org>
16215
16216         * gnulib-tool (func_emit_tests_Makefile_am): Also define
16217         TESTS_ENVIRONMENT, so that individual tests can augment it.
16218
16219         * gnulib-tool (func_create_testdir): Use an intermediate target for
16220         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
16221         macros, like $(ALLOCA_H), which cannot be passed through the command
16222         line.
16223
16224 2005-10-15  Simon Josefsson  <jas@extundo.com>
16225
16226         * modules/rijndael-tests: New file.
16227
16228         * modules/rijndael: New file.
16229
16230 2005-10-15  Simon Josefsson  <jas@extundo.com>
16231
16232         * m4/rijndael.m4: New file.
16233
16234 2005-10-15  Simon Josefsson  <jas@extundo.com>
16235
16236         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
16237
16238         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
16239
16240 2005-10-14  Simon Josefsson  <jas@extundo.com>
16241
16242         * tests/test-arcfour.c: New file.
16243
16244         * modules/arcfour, modules/arcfour-tests: New files.
16245
16246 2005-10-14  Simon Josefsson  <jas@extundo.com>
16247
16248         * m4/arcfour.m4: New file.
16249
16250 2005-10-14  Simon Josefsson  <jas@extundo.com>
16251
16252         * lib/arcfour.h, lib/arcfour.c: New files.
16253
16254 2005-10-14  Roland McGrath  <roland@redhat.com>
16255
16256         Import from libc.  [BZ #1331]
16257         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
16258         macro argument.
16259         Reported by Matej Vela <vela@debian.org>.
16260
16261 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
16262
16263         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
16264         include <wchar.h>; no longer needed.
16265
16266 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
16267
16268         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
16269
16270 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
16271         and  Ulrich Drepper  <drepper@redhat.com>
16272
16273         Import from libc.
16274         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
16275         instead of inline stream orientation test and two separate
16276         function calls.  Pay no attention to USE_IN_LIBIO.
16277
16278 2005-10-13  Simon Josefsson  <jas@extundo.com>
16279
16280         * modules/gc-hmac-md5-tests: New file.
16281
16282         * tests/test-gc-hmac-sha1.c: New file.
16283
16284         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
16285
16286         * modules/gc-hmac-md5-tests: New file.
16287
16288         * tests/test-gc-md5.c: New file.
16289
16290         * modules/gc-md5-tests: New file.
16291
16292 2005-10-13  Simon Josefsson  <jas@extundo.com>
16293
16294         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
16295         Move memory allocation outside of loop.
16296
16297 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
16298
16299         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
16300         intermediate directory is in a read-only file system.  Problem
16301         reported by Eric Blake.
16302
16303 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
16304
16305         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
16306
16307 2005-10-12  Simon Josefsson  <jas@extundo.com>
16308
16309         * tests/test-hmac-sha1.c: New file.
16310
16311         * modules/hmac-sha1-tests: New file.
16312
16313         * modules/hmac-sha1: New file.
16314
16315 2005-10-12  Simon Josefsson  <jas@extundo.com>
16316
16317         * modules/gc-sha1: New file.
16318
16319 2005-10-12  Simon Josefsson  <jas@extundo.com>
16320
16321         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
16322
16323         * tests/test-gc-pbkdf2-sha1.c: New file.
16324
16325 2005-10-12  Simon Josefsson  <jas@extundo.com>
16326
16327         * modules/gc-md5, modules/gc-hmac-md5: New files.
16328
16329         * modules/gc (Files): Remove md5, memxor and hmac files.
16330
16331 2005-10-12  Simon Josefsson  <jas@extundo.com>
16332
16333         * m4/gc-pbkdf2-sha1.m4: New file.
16334
16335         * m4/gc-hmac-sha1.m4: New file.
16336
16337         * m4/gc-sha1: New file.
16338
16339         * m4/hmac-sha1.m4: New file.
16340
16341 2005-10-12  Simon Josefsson  <jas@extundo.com>
16342
16343         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
16344
16345         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
16346
16347 2005-10-12  Simon Josefsson  <jas@extundo.com>
16348
16349         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
16350         suggested by Bruno Haible <bruno@clisp.org>.
16351
16352 2005-10-12  Simon Josefsson  <jas@extundo.com>
16353
16354         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
16355
16356 2005-10-12  Simon Josefsson  <jas@extundo.com>
16357
16358         * lib/gc-pbkdf2-sha1.c: New file.
16359
16360         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
16361
16362 2005-10-12  Simon Josefsson  <jas@extundo.com>
16363
16364         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
16365
16366         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
16367
16368 2005-10-12  Simon Josefsson  <jas@extundo.com>
16369
16370         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
16371         GC_USE_HMAC_MD5, respectively.
16372
16373         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
16374         (gc_md5): Fix typo.
16375
16376         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
16377
16378         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
16379
16380         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
16381
16382 2005-10-12  Bruno Haible  <bruno@clisp.org>
16383
16384         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
16385         Reported by Stepan Kasal <kasal@ucw.cz>.
16386
16387 2005-10-11  Simon Josefsson  <jas@extundo.com>
16388
16389         * tests/test-crc.c: New file.
16390
16391         * modules/crc, modules/crc-tests: New files.
16392
16393 2005-10-11  Simon Josefsson  <jas@extundo.com>
16394
16395         * m4/crc.m4: New file.
16396
16397 2005-10-11  Simon Josefsson  <jas@extundo.com>
16398
16399         * lib/gc.h: Add gc_hash and gc_hash_buffer.
16400
16401         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
16402
16403         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
16404
16405 2005-10-11  Simon Josefsson  <jas@extundo.com>
16406
16407         * lib/crc.h, lib/crc.c: New files.
16408
16409         * lib/gc.h (gc_hash_buffer): Add doc.
16410
16411 2005-10-11  Bruno Haible  <bruno@clisp.org>
16412
16413         * modules/c-strcasestr: New file.
16414         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
16415
16416 2005-10-11  Bruno Haible  <bruno@clisp.org>
16417
16418         * modules/c-strcase: New file.
16419         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
16420
16421 2005-10-11  Bruno Haible  <bruno@clisp.org>
16422
16423         * lib/strcasecmp.c: Include limits.h.
16424         (strcasecmp): Avoid integer overflow on exotic platforms.
16425         * lib/strncasecmp.c: Include limits.h.
16426         (strncasecmp): Avoid integer overflow on exotic platforms.
16427         Reported by Paul Eggert.
16428
16429 2005-10-11  Bruno Haible  <bruno@clisp.org>
16430
16431         * lib/c-strcasestr.h: New file, from GNU gettext.
16432         * lib/c-strcasestr.c: New file, from GNU gettext.
16433
16434 2005-10-11  Bruno Haible  <bruno@clisp.org>
16435
16436         * lib/c-strcase.h: New file, from GNU gettext.
16437         * lib/c-strcasecmp.c: New file, from GNU gettext.
16438         * lib/c-strncasecmp.c: New file, from GNU gettext.
16439
16440 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
16441
16442         * modules/mempcpy (License): GPL -> LGPL.
16443         * modules/strchrnul (License): Likewise.
16444         * modules/sysexits (License): Likewise.
16445
16446 2005-10-08  Simon Josefsson  <jas@extundo.com>
16447
16448         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
16449
16450 2005-10-07  Simon Josefsson  <jas@extundo.com>
16451
16452         * m4/memxor.m4: Remove gl_C_RESTRICT call.
16453
16454 2005-10-06  Simon Josefsson  <jas@extundo.com>
16455
16456         * tests/test-hmac-md5.c: New file.
16457
16458         * modules/hmac-md5-tests: New file.
16459
16460         * modules/hmac-md5: New file.
16461
16462 2005-10-06  Simon Josefsson  <jas@extundo.com>
16463
16464         * m4/hmac-md5.m4: New file.
16465
16466         * m4/memxor.m4: Require gl_C_RESTRICT.
16467
16468 2005-10-06  Simon Josefsson  <jas@extundo.com>
16469
16470         * lib/memxor.c (memxor): Avoid casts and warnings.
16471
16472 2005-10-06  Simon Josefsson  <jas@extundo.com>
16473
16474         * lib/hmac-md5.c: New file.
16475
16476         * lib/hmac.h: New file.
16477
16478 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
16479
16480         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
16481         promotes to int, not unsigned int, to catch the AIX 5.3
16482         compiler bug.
16483
16484 2005-10-05  Simon Josefsson  <jas@extundo.com>
16485
16486         * modules/memxor: New file.
16487
16488         * modules/iconv (Files): Move config.rpath to havelib, it is used
16489         there.
16490
16491         * modules/havelib (Files): Add config.rpath.
16492
16493 2005-10-05  Simon Josefsson  <jas@extundo.com>
16494
16495         * m4/memxor.m4: New file.
16496
16497 2005-10-05  Simon Josefsson  <jas@extundo.com>
16498
16499         * lib/memxor.c (memxor): Fix compiler error.
16500
16501         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
16502         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
16503
16504         * lib/memxor.h, lib/memxor.c: New files.
16505
16506         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
16507         we assume all systems have it, suggested by Jim Meyering
16508         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
16509         any systems lack sys/socket.h; mingw32 is known to lack it, but we
16510         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
16511         same reasons.
16512
16513 2005-10-05  Simon Josefsson  <jas@extundo.com>
16514
16515         * config/srclist.txt: Add glibc bug 1423 for md5.h.
16516
16517 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
16518
16519         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
16520         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
16521         needed, since the source code now assumes these .h files.
16522
16523 2005-10-05  Derek Price  <derek@ximbiot.com>
16524
16525         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
16526
16527 2005-10-05  Bruno Haible  <bruno@clisp.org>
16528
16529         * modules/stdint (License): Change to LGPL.
16530
16531 2005-10-04  Simon Josefsson  <jas@extundo.com>
16532
16533         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
16534         D. Baushke" <mdb@gnu.org>.
16535
16536 2005-10-04  Bruno Haible  <bruno@clisp.org>
16537
16538         * lib/verify.h (verify_true): Provide alternative definition for C++.
16539
16540 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
16541
16542         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
16543         (SSIZE_MAX): New macro, if not already defined.
16544         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
16545         than 2 GiB.
16546
16547 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
16548
16549         Sync from coreutils.
16550         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
16551         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
16552         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
16553         ULLONG_MAX doesn't work with 2.7.2.1.
16554
16555 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
16556
16557         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
16558         From Ben Pfaff.
16559
16560         * modules/exclude (Depends-on): Depend on verify.
16561         * modules/strtoimax (Depends-on): Likewise.
16562         * modules/utimecmp (Depends-on): Likewise.
16563
16564 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
16565
16566         * lib/exclude.c: Include verify.h.
16567         (verify): Remove.  All callers changed to use verify.h's version.
16568         * lib/strtoimax.c: Likewise.
16569         * lib/utimecmp.c: Likewis.e
16570
16571         Sync from coreutils.
16572         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
16573         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
16574         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
16575         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
16576         bother returning ENOSYS if settimeofday or stime fails; just let
16577         them return whatever errno they want to return.
16578         * lib/utimens.c: Include unistd.h, for dup2.
16579         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
16580         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
16581
16582 2005-10-02  Jim Meyering  <jim@meyering.net>
16583
16584         Sync from coreutils.
16585         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
16586         from glibc-2.2.5 that fails for read-only files.
16587
16588 2005-10-02  Jim Meyering  <jim@meyering.net>
16589
16590         Sync from coreutils.
16591         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
16592         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
16593         `#if HAVE_CONFIG_H'.
16594         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
16595         Remove AT_FDCWD test.
16596         Do not consume the fd unless successful.
16597         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
16598         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
16599         block, so that we don't even try to compile it if settimeofday is
16600         available.  This works around a compilation failure on OSF1 V5.1,
16601         due to stime requiring a `long int*' while tv_sec is `int'.
16602
16603 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
16604
16605         Sync from coreutils.
16606         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
16607         against `yes', rather than just testing for nonempty.
16608
16609 2005-10-01  Simon Josefsson  <jas@extundo.com>
16610
16611         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
16612         and Darwin.
16613
16614         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
16615         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
16616         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
16617         freeaddrinfo and gai_strerror are declared by the POSIX headers.
16618         Check if struct addrinfo is declared.
16619
16620 2005-10-01  Simon Josefsson  <jas@extundo.com>
16621
16622         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
16623         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
16624         AI_* and EAI_* definitions.  Protect function declarations.
16625
16626 2005-10-01  Jim Meyering  <jim@meyering.net>
16627
16628         Sync from coreutils.
16629
16630         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
16631         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
16632         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
16633         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
16634         in the inet and nsl libraries.  Required on Solaris 5.7.
16635
16636 2005-10-01  Jim Meyering  <jim@meyering.net>
16637
16638         Sync from coreutils.
16639         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
16640         in the inet and nsl libraries.  Required on Solaris 5.7.
16641
16642 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
16643
16644         * lib/getdelim.c (getdelim): Remove unused variables.
16645
16646 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
16647
16648         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
16649         so that the code works even with ancient cpp.  Portability problem
16650         with GCC 2.7.2.1 reported by Thomas M.Ott.
16651
16652 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
16653
16654         * modules/regex (Depends-on): Add strcase.
16655
16656         * modules/gethostname (Licence): Change from GPL to LGPL, since
16657         gethostname.c is a trivial implementation of a standard library
16658         function.
16659         * modules/poll (License): Change from GPL to LGPL, since it's
16660         derived from LGPL code.
16661
16662 2005-09-27  Jim Meyering  <jim@meyering.net>
16663
16664         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
16665         HAVE_CONFIG_H.
16666
16667         * lib/intprops.h (signed_type_or_expr__): Define.
16668         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
16669         for unsigned types.
16670
16671 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
16672
16673         * lib/verify.h (verify_expr): Remove, replacing with:
16674         (verify_true): New macro that returns true instead of void.
16675         (verify_type__): Remove.
16676         (verify): Use verify_true rather than verify_type__.
16677
16678 2005-09-26  Bruno Haible  <bruno@clisp.org>
16679
16680         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
16681         is necessary.
16682         (lib_SOURCES): Remove mbchar.c.
16683         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
16684         (Files): Add m4/mbrtowc.m4.
16685         * modules/mbiter: Likewise.
16686         * modules/mbuiter: Likewise.
16687
16688 2005-09-26  Bruno Haible  <bruno@clisp.org>
16689
16690         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
16691         compile mbchar.c if they are not both present.
16692         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
16693         * m4/mbiter.m4 (gl_MBITER): Likewise.
16694         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
16695         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
16696         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
16697
16698 2005-09-25  Jim Meyering  <jim@meyering.net>
16699
16700         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
16701         also uses socklen_t.
16702
16703 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
16704
16705         * lib/utimens.c (ENOSYS): Define if not already defined.
16706         (futimens): Support having a null PATH if the file descriptor
16707         is nonnegative.
16708
16709         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
16710         Remove.
16711         (__attribute): Define to empty unless GCC 3.1 or later.
16712         This works around a core dump on OpenBSD 3.4, which has GCC
16713         2.95.3, which dumps core when given __attribute__(()).  It also
16714         simplifies other tests, since we really don't want to bother with
16715         worrying about which ancient version of GCC supported what.
16716         Original problem reported by Yoann Vandoorselaere, with part of
16717         the fix suggested by Derek Price.
16718
16719 2005-09-24  Jim Meyering  <jim@meyering.net>
16720
16721         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
16722         so we can once again use a positive bitfield width of 1 -- now we
16723         don't have to explain why we were using a bitfield width of 2.
16724
16725 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
16726
16727         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
16728         and similarly for the other external symbols.  Problem reported
16729         by James Gallager.
16730
16731         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
16732         bug reported by Jim Meyering.
16733
16734         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
16735         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
16736         not needed, since socklen is a prerequisite module.
16737
16738 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
16739
16740         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
16741         Problem reported by Eric Blake.
16742         (getaddrinfo): Initialize se so that it's not garbage.
16743         Redo internal storage allocation so that it doesn't make unportable
16744         assumptions about alignment.
16745         Fix a memory leak.
16746
16747         * lib/utimens.c (futimens): Use futimesat if available.
16748         Prefer it to futimes since it doesn't have the futimes bug.
16749
16750         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
16751         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
16752         Instead, declare a function that returns a pointer to an array,
16753         and use verify_type__ to declare the size of the array.
16754         Problem and germ of a solution reported by Bruno Haible.
16755         (verify_type__): Use 2, not 1, for bitfield size, to avoid
16756         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
16757
16758 2005-09-23  Jim Meyering  <jim@meyering.net>
16759
16760         Sync from coreutils.
16761         Correct build failure (socklen_t not defined) on at least
16762         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
16763         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
16764
16765 2005-09-23  Jim Meyering  <jim@meyering.net>
16766
16767         * modules/getaddrinfo (Depends-on): Add socklen.
16768
16769 2005-09-23  Bruno Haible  <bruno@clisp.org>
16770
16771         * tests/test-verify.c: New file.
16772
16773 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
16774
16775         Sync from coreutils.
16776
16777         * modules/argmatch (Depends-on): Add verify.
16778         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
16779         unistd-safer.
16780         * modules/save-cwd (Depends-on): Likewise.
16781
16782         * modules/openat (Files): Add lib/openat-die.c.
16783         (Depends-on): Remove error, exitfail.
16784         Add dirname.
16785
16786         * modules/verify: New file.
16787         * MODULES.html.sh (Diagnostics <assert.h>): New section,
16788         with "verify" module.
16789
16790 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
16791
16792         Sync from coreutils.
16793
16794         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
16795         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
16796         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
16797         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
16798         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
16799         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
16800         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
16801         Don't bother checking for string.h, stdlib.h, unistd.h.
16802         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
16803         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
16804         module's job.
16805         * m4/jm-macros.m4 (gl_MACROS): Likewise.
16806         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
16807
16808         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
16809         (gl_GETDATE): Use it.
16810
16811         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
16812
16813 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
16814
16815         Sync from coreutils.
16816
16817         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
16818         stat-time.h.
16819         * lib/argmatch.h: Include verify.h
16820         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
16821         (ARGMATCH_ASSERT): Remove; unused.
16822         * lib/canonicalize.c: Assume STDC_HEADERS.
16823         * lib/exclude.c: Include "strcase.h".
16824         * lib/regex_internal.h [!defined _LIBC]: Likewise.
16825         * lib/getusershell.c: Include stdio--.h rather than stdio.h
16826         and stdio-safer.h.
16827         (getusershell): Call fopen, not fopen_safer.
16828         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
16829         Do not include unistd-safer.h.
16830         (save_cwd): Don't call fd_safer; no longer needed
16831         now that we include fcntl--.h.
16832
16833         * lib/getdate.y (relative_time): New type.
16834         (RELATIVE_TIME_0): New constant.
16835         (parser_control): Use relative_time instead of doing it ourselves.
16836         (%union): Add new relative_time rel member.
16837         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
16838         Now typeless.
16839         (relunit, relunit_snumber): Now of type rel.
16840         (zone, rel, relunit, get_date): Adjust to above changes.
16841
16842         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
16843         Do not include unistd-safer.h.
16844         (getloadavg): Don't call fd_safer; no longer needed
16845         now that we include fcntl--.h.
16846
16847         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
16848         (make_dir_parents): Treat ENOSYS like EEXIST.
16849
16850         Improve quality of diagnostics on restore_cwd failure.
16851         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
16852         (make_dir_parents): Last arg is now int * (for errno), not bool *.
16853         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
16854         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
16855         each time through the loop.  Do not diagnose restore_cwd failure;
16856         that is the caller's job (and perhaps the caller does not care).
16857
16858         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
16859         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
16860         If the file already exists but is not a directory, don't bother
16861         to try to make its parents.
16862         Close potential file descriptor leak if we can't chdir("/") (!).
16863         Don't always return true if chdir($PWD) fails; return true only
16864         if the requested action was done successfully (except for the
16865         chdir($PWD)).
16866         Don't log final directory unless we actually made it.
16867         Refactor to avoid duplicate code to fix up permissions.
16868         Don't attempt to fix up parent permissions if chdir($PWD) fails.
16869
16870         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
16871         to make it a bit faster and (I hope) clearer.
16872         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
16873         Fix bug in formats like %2N.
16874
16875         * lib/verify.h: New file.
16876
16877 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
16878
16879         Sync from coreutils.
16880         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
16881
16882 2005-09-22  Jim Meyering  <jim@meyering.net>
16883
16884         Sync from coreutils.
16885
16886         * m4/lstat.m4 (gl_FUNC_LSTAT):
16887         Use AC_LIBSOURCES to require lstat.c and lstat.h.
16888         Remove obsolete comment.
16889         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
16890         * m4/xstrtod.m4: Likewise.
16891
16892         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
16893
16894 2005-09-22  Jim Meyering  <jim@meyering.net>
16895
16896         Sync from coreutils.
16897
16898         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
16899
16900         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
16901         the .tm_year member, since otherwise gcc-4.0 would now warn about
16902         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
16903
16904         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
16905         order to avoid an unsuppressible warning from gcc on 64-bit systems.
16906
16907         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
16908         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
16909         when run in a time zone for which daylight savings time is in effect
16910         for the starting date.
16911
16912         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
16913         stop us from restricting permissions of just-created absolute-named
16914         directories.
16915         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
16916         to restore initial working directory.
16917         * lib/mkdir-p.c (make_dir_parents): New parameter:
16918         different_working_dir, to tell caller if/when we change the working
16919         directory and are unable to return to the initial one.
16920         * lib/mkdir-p.h (make_dir_parents): Update prototype.
16921         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
16922         `return false'.  This fixes a bug introduced on 2004-07-30.
16923
16924         * lib/openat.c (fdopendir): Be sure to close the supplied
16925         file descriptor before returning.  This makes our replacement
16926         implementation a little closer to Solaris's, where fdopendir
16927         ties the file descriptor to the returned DIR* pointer.
16928         * lib/openat.c (unlinkat): New function.
16929         * lib/openat.h (unlinkat): Add prototype.
16930         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
16931         (openat_restore_fail): Rename from openat_restore_die.
16932         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
16933
16934         Provide an alternative to exiting immediately upon save_cwd or
16935         restore_cwd failure.  Now, an application can arrange e.g.,
16936         to perform a longjump in that case.
16937         * lib/openat.c: Include dirname.h.
16938         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
16939         (rpl_openat, fdopendir, fstatat): Call openat_save_die
16940         and openat_restore_die rather than calling error directly.
16941         Don't include "error.h" or "exitfail.h"; they're no longer needed.
16942
16943         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
16944         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
16945         define.
16946
16947         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
16948         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
16949                             int utc, int nanoseconds);
16950         Background:
16951         date should not have to allocate a megabyte of virtual memory to
16952         handle a format argument like +%1048575T.  When implemented with
16953         strftime, it must allocate such a buffer, use strftime to fill it
16954         in, print it, then free it.
16955         With fprintftime, it simply prints everything and exits.
16956         With no need for memory allocation, that's one fewer way to fail.
16957         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
16958         optional field width, not before, so we accept %9:z, not %:9z.
16959         (my_strftime): Be sure to use L_('x') for literals.
16960
16961         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
16962         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
16963         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
16964         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
16965         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
16966         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
16967         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
16968         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
16969         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
16970         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
16971         * lib/xgethostname.c, lib/xreadlink.c:
16972         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
16973
16974         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
16975         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
16976         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
16977         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
16978         and don't include <sys/file.h>).
16979
16980 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
16981
16982         Sync from coreutils.
16983
16984         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
16985         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
16986         [!LDAV_DONE]: Avoid unused variable warning.
16987
16988 2005-09-21  Bruno Haible  <bruno@clisp.org>
16989
16990         * lib/unicodeio.h (unicode_to_mb): New declaration.
16991
16992 2005-09-20  Derek Price  <derek@ximbiot.com>
16993
16994         * lib/getaddrinfo.c: Don't include <netdb.h> included from
16995         getaddrinfo.h.
16996
16997 2005-09-20  Bruno Haible  <bruno@clisp.org>
16998
16999         * gnulib-tool: Remove trailing slashes from the values specified for
17000         --source-base, --m4-base, --tests-base, --aux-dir.
17001         Suggested by Simon Josefsson <jas@extundo.com>.
17002
17003 2005-09-20  Bruno Haible  <bruno@clisp.org>
17004
17005         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
17006         func_modules_to_filelist, func_import, func_create_testdir): Make all
17007         sorting results locale-independent, so that gnulib-cache.m4 doesn't
17008         change when gnulib-tool is invoked in a different locale.
17009
17010 2005-09-19  Simon Josefsson  <jas@extundo.com>
17011
17012         * m4/socklen.m4: Fix typo.
17013
17014 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
17015
17016         Use a consistent style for including <config.h>.
17017         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
17018         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
17019         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
17020         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
17021         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
17022         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
17023         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
17024         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
17025         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
17026         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
17027         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
17028         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
17029         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
17030         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
17031         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
17032         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
17033         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
17034         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
17035         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
17036         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
17037         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
17038         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
17039         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
17040         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
17041         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
17042         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
17043         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
17044         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
17045         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
17046         lib/xstrtoumax.c, lib/yesno.c:
17047         Standardize inclusion of config.h.
17048         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
17049         lib/inttostr.h:  Removed inclusion of config.h from header files.
17050         * lib/inttostr.c:  Adjusted in-tree users.
17051         * lib/timespec.h: Remove superfluous warning to include config.h.
17052         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
17053         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
17054         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
17055         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
17056         config.h with HAVE_CONFIG_H.
17057
17058 2005-09-19  Jim Meyering  <jim@meyering.net>
17059
17060         * modules/pathmax (License): Change to LGPL.
17061
17062 2005-09-19  Derek Price  <derek@ximbiot.com>
17063
17064         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
17065
17066 2005-09-19  Bruno Haible  <bruno@clisp.org>
17067
17068         * gnulib-tool (import): Provide default for --tests-base.
17069
17070 2005-09-19  Bruno Haible  <bruno@clisp.org>
17071
17072         * doc/quote.texi: New file, extracted from gnulib.texi.
17073         * doc/ctime.texi: New file, extracted from gnulib.texi.
17074         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
17075         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
17076         * doc/gnulib.texi: Include them.
17077
17078 2005-09-18  Bruno Haible  <bruno@clisp.org>
17079
17080         Portability fix.
17081         * gnulib-tool (func_readlink): New function.
17082         (func_ln_if_changed): Use it.
17083
17084 2005-09-18  Bruno Haible  <bruno@clisp.org>
17085
17086         * gnulib-tool: Support --with-tests also with --import.
17087         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
17088         (func_import): Use variables $testsbase and $inctests. Emit a
17089         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
17090         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
17091         SUBDIRS += $testsdir.
17092         (func_create_testdir): Update.
17093
17094 2005-09-18  Bruno Haible  <bruno@clisp.org>
17095
17096         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
17097         instead of $dry_run.
17098         (func_cp_if_changed, func_mv_if_changed): Remove functions.
17099         (func_ln_if_changed): Don't handle dry-run here.
17100         (func_import): In dry-run mode, detect more precisely which actions
17101         would be performed, and don't use "...ing" verbs.
17102
17103 2005-09-18  Bruno Haible  <bruno@clisp.org>
17104
17105         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
17106         (func_import): Use join on two temporary files instead of three nested
17107         loops, in order to determine which files are new or old.
17108
17109 2005-09-18  Bruno Haible  <bruno@clisp.org>
17110
17111         * gnulib-tool (func_import): Comment out code that spits out the
17112         new files with --dry-run.
17113
17114 2005-09-18  Bruno Haible  <bruno@clisp.org>
17115
17116         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
17117
17118 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
17119
17120         * lib/stat-time.h: New file.
17121         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
17122         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
17123         in a different way.
17124         (timespec_cmp): New function.
17125         * lib/utimecmp.c: Include stat-time.h.
17126         (SYSCALL_RESOLUTION): Depend on whether various struct stat
17127         members exist, not on the obsolescent ST_MTIM_NSEC.
17128         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
17129
17130 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
17131
17132         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
17133
17134 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
17135
17136         * MODULES.html.sh (File system functions): Add stat-time.
17137         * modules/stat-time: New file.
17138         * modules/timespec (Files): Remove m4/st_mtim.m4; this
17139         is now done in a different way, by the stat-time module.
17140         * modules/utimecmp (Depends-on): Add stat-time.
17141
17142 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
17143
17144         * m4/st_mtim.m4: Remove.  Superseded by...
17145         * m4/stat-time.m4: New file.
17146         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
17147         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
17148
17149 2005-09-15  Derek Price  <derek@ximbiot.com>
17150
17151         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
17152
17153 2005-09-15  Derek Price  <derek@ximbiot.com>
17154
17155         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
17156         * lib/regex_internal.c: Ditto, using this...
17157         (__GNUC_PREREQ): ...new macro.
17158         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
17159         using...
17160         (__GNUC_PREREQ): ...this new macro.
17161
17162         * lib/strstr.h: Include string.h. Define strstr as a macro here.
17163
17164 2005-09-15  Derek Price  <derek@ximbiot.com>
17165             Paul Eggert  <eggert@cs.ucla.edu>
17166
17167         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
17168         changes, consolidating in...
17169         * lib/regex_internal.h: ...this file.
17170
17171 2005-09-13  Jim Meyering  <jim@meyering.net>
17172
17173         * lib/canon-host.c: Filter through gnu indent and reword comments
17174         slightly.
17175         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
17176
17177 2005-09-13  Derek Price  <derek@ximbiot.com>
17178
17179         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
17180         failure.
17181         Reported by Jim Meyering  <jim@meyering.net>.
17182
17183 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
17184
17185         * lib/base64.c: Typo.
17186         (base64_encode): Put b64str in initialized data section.
17187
17188 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
17189
17190         Merge glibc and coreutils changes into gnulib, plus a few
17191         extra fixes.
17192         * lib/md5.c: Use #error rather than a string.
17193         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
17194         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
17195         (__attribute__): Define to empty for non recent-GCC.
17196         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
17197         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
17198         Renamed from their non-__ counterparts, with new macros replacing
17199         them if not _LIBC.  Add __THROW attribute.
17200         (rol): Remove.
17201         (struct md5_ctx): Align buffer if using GCC.
17202         * lib/sha1.h (struct sha1_ctx): Likewise.
17203         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
17204         The old name was backwards.
17205         (NOTSWAP): Remove; not used.
17206         (rol): New macro, moved here from md5.h.
17207         (sha1_process_block): Remove a FIXME that doesn't make sense.
17208
17209 2005-09-12  Derek Price  <derek@ximbiot.com>
17210
17211         Return usable errors from canon-host.
17212         * lib/canon-host.h: New file.
17213         * lib/canon-host.c (canon_host): Wrap...
17214         (canon_host_r): ...this new function, which now relies exclusively on
17215         getaddrinfo.
17216         (ch_strerror): New function.
17217         (last_cherror): New global.
17218         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
17219         interface.
17220         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
17221         void *.
17222         (freeaddrinfo): Free ai->ai_canonname when set.
17223
17224 2005-09-12  Derek Price  <derek@ximbiot.com>
17225
17226         Make canon-host require getaddrinfo.
17227         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
17228         AC_LIBSOURCE canon-host.h.  Call...
17229         (gl_PREREQ_CANON_HOST): ...this new function, which requires
17230         gl_GETADDRINFO.
17231         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
17232
17233 2005-09-12  Derek Price  <derek@ximbiot.com>
17234
17235         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
17236         LGPL.
17237         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
17238
17239 2005-09-12  Derek Price  <derek@ximbiot.com>
17240
17241         * lib/gai_strerror.c: Include config.h when available.  Include
17242         getaddrinfo.h before other headers to test interface.
17243         Reported by Larry Jones <lawrence.jones@ugs.com>.
17244
17245 2005-09-12  Derek Price  <derek@ximbiot.com>
17246             Paul Eggert  <eggert@cs.ucla.edu>
17247
17248         * modules/glob (Files): Add glob-libc.h.
17249
17250 2005-09-12  Derek Price  <derek@ximbiot.com>
17251             Paul Eggert  <eggert@cs.ucla.edu>
17252
17253         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
17254         glob_.h, glob-libc.h.
17255         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
17256
17257 2005-09-12  Derek Price  <derek@ximbiot.com>
17258             Paul Eggert  <eggert@cs.ucla.edu>
17259
17260         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
17261         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
17262         protecting things that should be done only in gnulib contexts.
17263         * lib/glob_.h: New file, containing only the glob things needed for
17264         gnulib.
17265         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
17266         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
17267         (glob, globfree, glob_pattern_p): Now defined simply in terms of
17268         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
17269         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
17270         and to respect the namespace rules better.
17271
17272 2005-09-08  Simon Josefsson  <jas@extundo.com>
17273
17274         * modules/socklen: New file.
17275
17276 2005-09-08  Simon Josefsson  <jas@extundo.com>
17277
17278         * m4/socklen.m4: New file.
17279
17280 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
17281
17282         * modules/utimens (Files): Add m4/utimbuf.m4, since
17283         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
17284         Reported by Sergey Poznyakoff.
17285
17286 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
17287
17288         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
17289         definitions, since that's the preferred style in glibc.
17290         Fix a minor spacing issue, and update copyright notice to match
17291         glibc's.
17292
17293 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
17294
17295         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
17296
17297 2005-09-06  Simon Josefsson  <jas@extundo.com>
17298
17299         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
17300         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
17301
17302 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
17303
17304         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
17305         warning.
17306
17307 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
17308
17309         * config/srclist.txt: Add glibc bug 1302.
17310
17311 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
17312
17313         Change bitset word type from unsigned int to unsigned long int,
17314         as this has better performance on typical 64-bit hosts.
17315         Port bitset code to hosts with unusual word sizes.
17316         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
17317         (build_collating_symbol):
17318         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
17319         argument is a bitset.  This is merely a style issue, but it makes
17320         it clearer that an entire array is expected.
17321         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
17322         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
17323         Port to the case where bitset_word is not the same as unsigned int.
17324         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
17325         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
17326         Likewise.
17327         * lib/regexec.c (check_dst_limits_calc_pos_1,
17328         check_subexp_matching_top):
17329         (build_trtable, group_nodes_into_DFAstates):
17330         Likewise.
17331         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
17332         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
17333         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
17334         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
17335         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
17336         * lib/regcomp.c (optimize_subexps, lower_subexp):
17337         Work even if bitset_word has holes in its bitwise representation.
17338         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
17339         * lib/regexec.c (check_dst_limits_calc_pos_1,
17340         check_subexp_matching_top):
17341         Likewise.
17342         * lib/regex_internal.c (re_string_reconstruct):
17343         Don't assume UCHAR_MAX == 255.
17344         * lib/regex_internal.h (bitset_set_all): Likewise.
17345         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
17346         All uses changed.
17347         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
17348         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
17349         All uses changed.
17350         (BITSET_WORD_MAX): New macro.
17351         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
17352         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
17353         (bitset_empty, bitset_copy):
17354         Prefer sizeof (bitset) to multiplying it out ourselves.
17355         (bitset_not_merge): Remove; unused.
17356         (bitset_contain): Return bool, not unsigned int with one bit on.
17357         All callers changed.
17358         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
17359         alignment than re_node_set; do this by defining a new internal
17360         type struct dests_alloc and using it to allocate memory.
17361
17362 2005-09-05  Bruno Haible  <bruno@clisp.org>
17363
17364         * gnulib-tool (func_import): Fix comparison in handling of symbolic
17365         links.
17366
17367 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
17368
17369         * modules/size_max (Makefile.am): Add size_max.h
17370
17371 2005-09-04  Derek Price  <derek@ximbiot.com>
17372
17373         * gnulib-tool (func_import): Fix reversed $symbolic logic.
17374
17375 2005-09-03  Simon Josefsson  <jas@extundo.com>
17376
17377         * gnulib-tool: Fix typo.
17378
17379 2005-09-03  Simon Josefsson  <jas@extundo.com>
17380
17381         * config/srclist.txt: Add glibc bug 1293.
17382
17383 2005-09-03  Derek Price  <derek@ximbiot.com>
17384
17385         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
17386         From Larry Jones <lawrence.jones@ugs.com>.
17387
17388 2005-09-02  Simon Josefsson  <jas@extundo.com>
17389
17390         * modules/socklen: New file.
17391
17392 2005-09-02  Simon Josefsson  <jas@extundo.com>
17393
17394         * modules/havelib: New module.
17395
17396         * modules/gettext, modules/iconv, modules/lock, modules/readline:
17397         Use havelib.
17398
17399 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
17400
17401         Check for arithmetic overflow when calculating sizes, to prevent
17402         some buffer-overflow issues.  These patches are conservative, in the
17403         sense that when I couldn't determine whether an overflow was possible,
17404         I inserted a run-time check.
17405         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
17406         macros.
17407         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
17408         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
17409         (re_xnrealloc, re_x2nrealloc): New inline functions.
17410         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
17411         parse_bracket_exp):
17412         (build_equiv_class, build_charclass): Check for arithmetic overflow
17413         in size expression calculations.
17414         * lib/regex_internal.c (re_string_realloc_buffers):
17415         (build_wcs_upper_buffer, re_node_set_add_intersect):
17416         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
17417         (re_dfa_add_node, register_state): Likewise.
17418         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
17419         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
17420         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
17421         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
17422
17423 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
17424
17425         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
17426         m4/ulonglong.m4.  Problem reported by Martin Lambers.
17427
17428 2005-09-02  Bruno Haible  <bruno@clisp.org>
17429
17430         Support for lib vs. lib64 distinction on biarch platforms.
17431         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
17432         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
17433         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
17434
17435 2005-09-02  Bruno Haible  <bruno@clisp.org>
17436
17437         * gnulib-tool (import): In the other first-use case, provide defaults
17438         as well.
17439
17440 2005-09-02  Bruno Haible  <bruno@clisp.org>
17441
17442         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
17443         patches not yet found in the latest gettext release.
17444
17445 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
17446
17447         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
17448         to avoid a collision with bits/local_lim.h in glibc.
17449         All uses changed.  Problem reported by Dmitry V. Levin in
17450         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
17451
17452         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
17453         bugs in int versus size_t comparisons.
17454         (re_string_context_at): Fix bug where the code assumed that
17455         Idx is signed.
17456
17457         Use bool where appropriate.
17458         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
17459         All callers changed.
17460         (calc_eclosure_iter): Likewise, for ROOT arg.
17461         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
17462         (build_charclass_op): Likewise, for NON_MATCH arg.
17463         * lib/regex_internal.c (re_string_allocate, re_string_construct):
17464         (re_string_construct_common): Likewise, for ICASE arg.
17465         * lib/regexec.c (re_search_2_stub, re_search_stub):
17466         Likewise, for RET_LEN arg.
17467         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
17468         (set_regs): Likewise, for FL_BACKTRACK arg.
17469         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
17470         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
17471         (calc_eclosure_iter, parse_bracket_exp):
17472         Use bool for internal variables that are booleans.
17473         * lib/regexec.c (re_search_internal, check_matching,
17474         proceed_next_node):
17475         (set_regs, build_sifted_states, sift_states_bkref):
17476         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
17477         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
17478         (find_collation_sequence_value):
17479         Likewise.
17480         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
17481         (re_node_set_compare):
17482         Return bool, not int. All callers changed.
17483         * lib/regexec.c (check_halt_node_context, check_dst_limits):
17484         (build_trtable, check_node_accept): Likewise.
17485         * lib/regex_internal.h: Include stdbool.h.
17486
17487         Fix bugs uncovered when converting to bool.
17488         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
17489         failure instead of charging ahead blindly.
17490         * lib/regex_internal.c (register_state): Likewise.
17491         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
17492         for freeing internal storage.
17493         (group_nodes_into_DFA_states): Use unsigned int, not int, for
17494         bitset pieces used as boolean, to avoid undefined behavior
17495         on hosts that do int overflow checking.
17496
17497 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
17498
17499         * config/srclist.txt: Add glibc bugs 1285-1287.
17500
17501 2005-09-01  Jim Meyering  <jim@meyering.net>
17502
17503         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
17504         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
17505         Require gl_STAT_MACROS, too.
17506
17507 2005-09-01  Bruno Haible  <bruno@clisp.org>
17508
17509         * gnulib-tool (import): In the first-use case, provide defaults.
17510
17511 2005-09-01  Bruno Haible  <bruno@clisp.org>
17512
17513         * gnulib-tool (func_import): Remove the .tmp files.
17514
17515 2005-09-01  Bruno Haible  <bruno@clisp.org>
17516
17517         * gnulib-tool (func_import): Fix handling of symbolic links.
17518
17519 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
17520
17521         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
17522         old glibc regex code mishandles strings longer than 2**31 bytes.
17523         This patch fixes this when the regex code is used in gnulib
17524         (i.e., outside glibc).
17525
17526         This patch should not affect the use of the regex code inside
17527         glibc.  No doubt this problem also needs to be handled for glibc
17528         as well, but the result will be an incompatible change to the
17529         glibc ABI, and the old ABI will have to be supported too.  That
17530         can be the the subject for another patch.
17531
17532         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
17533         governing whether the rest of this patch is active.  By default,
17534         the macro is disabled and the patch has no effect.
17535         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
17536         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
17537         (struct re_pattern_buffer, re_search, re_search_2, re_match):
17538         (re_match_2, re_set_registers): Use the new types.
17539         * lib/regex_internal.h (Idx, re_hashval_t): New types.
17540         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
17541         New macros.
17542         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
17543         (re_string_context_at, bin_tree_t, re_dfastate_t):
17544         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
17545         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
17546         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
17547         (re_string_char_size_at, re_string_wchar_at):
17548         (re_string_elem_size_at):
17549         Use the new types and macros to port to 64-bit hosts.
17550         Use unsigned types for internal values, so that the code
17551         mostly works even for arrays larger than SSIZE_MAX.
17552         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
17553         (search_duplicated_node, calc_eclosure_iter, fetch_number):
17554         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
17555         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
17556         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
17557         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
17558         (calc_inveclosure, parse_dup_op, build_range_exp):
17559         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
17560         (fetch_number, create_token_tree, mark_opt_subexp):
17561         Likewise.
17562         * lib/regex_internal.c (re_string_construct_common,
17563         create_ci_newstate):
17564         (create_cd_newstate, re_string_allocate, re_string_construct):
17565         (re_string_realloc_buffers, build_wcs_upper_buffer):
17566         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
17567         (re_string_reconstruct, re_string_peek_byte_case):
17568         (re_string_fetch_byte_case, re_string_context_at):
17569         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
17570         (re_node_set_init_copy, re_node_set_add_intersect):
17571         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
17572         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
17573         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
17574         (re_acquire_state, re_acquire_state_context, register_state):
17575         Likewise.
17576         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
17577         search_cur_bkref_entry):
17578         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
17579         (re_search_internal, re_search_2_stub, re_search_stub)
17580         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
17581         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
17582         (update_cur_sifted_state, check_dst_limits):
17583         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
17584         (check_subexp_limits, sift_states_bkref, merge_state_array):
17585         (check_subexp_matching_top, get_subexp, get_subexp_sub):
17586         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
17587         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
17588         (expand_bkref_cache, check_node_accept_bytes):
17589         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
17590         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
17591         (acquire_init_state_context, check_halt_node_context):
17592         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
17593         (sift_states_backward, clean_state_log_if_needed):
17594         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
17595         (find_recover_state, transit_state_sb, transit_state_mb):
17596         (transit_state_bkref, build_trtable, match_ctx_clean):
17597         Likewise.
17598         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
17599         to work around an assumption that REG_MISSING is negative.
17600
17601         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
17602         (seek_collating_symbol_entry) [defined _LIBC]:
17603         (lookup_collation_sequence_value) [defined _LIBC]:
17604         (build_range_exp, build_collating_symbol) [defined _LIBC]:
17605         Use prototypes rather than old-style function definitions.
17606         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
17607         (transit_state_sb) [0]:
17608         (find_collation_sequence_value) [defined _LIBC]: Likewise.
17609
17610         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
17611         rm_eo.
17612
17613         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
17614         (optimize_subexps, lower_subexp):
17615         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
17616         since the signed shift might overflow.  Use 1u<<31 instead.
17617         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
17618         Likewise.
17619         * lib/regexec.c (check_dst_limits_calc_pos_1,
17620         check_subexp_matching_top): Likewise.
17621
17622         * lib/regcomp.c (optimize_subexps, lower_subexp):
17623         Use CHAR_BIT rather than 8, for clarity.
17624         * lib/regexec.c (check_dst_limits_calc_pos_1):
17625         (check_subexp_matching_top): Likewise.
17626         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
17627         have to worry about portability issues when shifting it left.
17628         Remove no-longer-needed test for table_size > 0.
17629         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
17630         in a word, as the resulting behavior is undefined.
17631         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
17632         in one case, a <= should have been an <, and in another case the
17633         whole test was missing.
17634         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
17635         the standard name CHAR_BIT.
17636         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
17637         this is not true on one's complement and signed-magnitude hosts.
17638
17639         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
17640         next_last_offset.
17641         (struct re_dfa_t): Remove unused member states_alloc.
17642         * lib/regcomp.c (init_dfa): Don't initialize unused members.
17643
17644 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
17645
17646         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
17647         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
17648         and large-file glibc and in 32-bit large-file Solaris.
17649
17650 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
17651
17652         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
17653         lengths fit in regoff_t; this isn't true if regoff_t is the same
17654         width as size_t.
17655         * lib/regex.c (re_search_internal): 5th arg is LAST_START
17656         (= START + RANGE) instead of RANGE.  This avoids overflow
17657         problems when regoff_t is the same width as size_t.
17658         All callers changed.
17659         (re_search_2_stub): Check for overflow when adding the
17660         sizes of the two strings.
17661         (re_search_stub): Check for overflow when adding START
17662         to RANGE; if it occurs, substitute the extreme value.
17663
17664 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
17665
17666         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
17667
17668 2005-08-31  Jim Meyering  <jim@meyering.net>
17669
17670         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
17671         a pointer-to-const.
17672         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
17673         (register_state): Likewise.
17674         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
17675         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
17676         (group_nodes_into_DFAstates): Likewise.
17677
17678 2005-08-31  Jim Meyering  <jim@meyering.net>
17679
17680         * check-module: Add a FIXME comment.
17681
17682 2005-08-31  Eric Blake  <ebb9@byu.net>
17683
17684         * modules/unistd-safer (Files): Add unistd--.h.
17685         * modules/stdio-safer (Files): Add stdio--.h.
17686
17687 2005-08-31  Derek Price  <derek@ximbiot.com>
17688
17689         * lib/getdelim.c (getdelim): Return EOF on EOF.
17690         Reported by Larry Jones <lawrence.jones@ugs.com>.
17691
17692 2005-08-31  Bruno Haible  <bruno@clisp.org>
17693
17694         Avoid unnecessary diffs in the generated lib/Makefile.am.
17695         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
17696         the generated files.
17697         (func_import): Don't set cmd.
17698
17699 2005-08-31  Bruno Haible  <bruno@clisp.org>
17700
17701         * lib/strstr.c: Include <stddef.h>, for NULL.
17702         * lib/strcasestr.c: Likewise.
17703         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
17704
17705 2005-08-31  Bruno Haible  <bruno@clisp.org>
17706
17707         * gnulib-tool: New option --macro-prefix.
17708         (func_import): Use macro_prefix.
17709         (import): Handle option --macro-prefix.
17710
17711 2005-08-31  Bruno Haible  <bruno@clisp.org>
17712
17713         * gnulib-tool (import): Rename most ac_* variables to cached_*.
17714         Also use new variables cached_lgpl, cached_libtool.
17715
17716 2005-08-31  Bruno Haible  <bruno@clisp.org>
17717
17718         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
17719         always instantiating them.
17720
17721 2005-08-31  Bruno Haible  <bruno@clisp.org>
17722
17723         * gnulib-tool (func_import): Read the previous cached settings
17724         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
17725         earlier added by gnulib but are now dropped. Warn when a gnulib file
17726         overwrites a non-gnulib file.
17727
17728 2005-08-31  Bruno Haible  <bruno@clisp.org>
17729
17730         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
17731         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
17732         projects that don't keep autogenerated files in CVS. Put into
17733         actioncmd only the specified modules, not the transitive closure.
17734
17735 2005-08-31  Bruno Haible  <bruno@clisp.org>
17736
17737         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
17738         Create directories that shall be filled.
17739         (import): Don't look for gl_* macros in configure.ac. Recurse across
17740         all directories containing a gnulib-cache.m4 files, if meaningful.
17741
17742 2005-08-31  Bruno Haible  <bruno@clisp.org>
17743
17744         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
17745         (import): Set seen_libtool when we see gl_LIBTOOL.
17746
17747 2005-08-31  Bruno Haible  <bruno@clisp.org>
17748
17749         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
17750         declaration macro definitions from generated gnulib.m4.
17751
17752 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
17753
17754         * lib/iconvme.h: Add prototype for iconv_alloc.
17755
17756 2005-08-29  Simon Josefsson  <jas@extundo.com>
17757
17758         * lib/iconvme.c: Fix errno.
17759
17760 2005-08-29  Bruno Haible  <bruno@clisp.org>
17761
17762         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
17763         that it works when the directory contains spaces.
17764
17765 2005-08-29  Bruno Haible  <bruno@clisp.org>
17766
17767         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
17768
17769 2005-08-29  Bruno Haible  <bruno@clisp.org>
17770
17771         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
17772         Emit more advice.
17773
17774 2005-08-29  Bruno Haible  <bruno@clisp.org>
17775         and Stepan Kasal  <kasal@ucw.cz>
17776
17777         * check-module: If more parameters are given, check each of them
17778         separately; add more exceptions, as noted by Jim Meyering.
17779         (check_module): New procedure.
17780         (%exempt_header): Now contains all exceptions.
17781
17782 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
17783
17784         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
17785
17786 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
17787
17788         * lib/iconvme.c: Split iconv_string into iconv_alloc.
17789
17790 2005-08-28  Bruno Haible  <bruno@clisp.org>
17791
17792         * m4/gnulib-tool.m4: New file.
17793
17794 2005-08-27  Jim Meyering  <jim@meyering.net>
17795
17796         * modules/unistd-safer (Files): Add pipe-safer.c.
17797         * modules/fcntl-safer (Files): Add creat-safer.c.
17798
17799 2005-08-27  Jim Meyering  <jim@meyering.net>
17800
17801         * m4/stdlib-safer.m4: New file.  From coreutils.
17802         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
17803         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
17804         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
17805         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
17806         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
17807
17808 2005-08-27  Jim Meyering  <jim@meyering.net>
17809
17810         * lib/fopen-safer.c: Merge minor changes from coreutils.
17811         * lib/dup-safer.c: Likewise.
17812         * lib/fd-safer.c: Likewise.
17813
17814         Merge from coreutils.
17815         * lib/stdio--.h: New file.
17816         * lib/stdlib--.h: New file.
17817         * lib/mkstemp-safer.c: New file.
17818
17819         GNU tar needs these.
17820         * lib/pipe-safer.c: New file.
17821         * lib/creat-safer.c: New file.
17822         * lib/fcntl--.h (creat): Define to creat_safer.
17823         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
17824         * lib/unistd--.h (pipe): Define to pipe_safer.
17825         * lib/unistd-safer.h: Declare pipe_safer.
17826
17827 2005-08-26  Simon Josefsson  <jas@extundo.com>
17828
17829         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
17830         Haible <bruno@clisp.org>.
17831
17832 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
17833
17834         * lib/regex_internal.h: Remove all references to
17835         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
17836         or better.
17837         (bitset_not, bitset_merge, bitset_not_merge):
17838         (bitset_mask, re_string_allocate, re_string_construct):
17839         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
17840         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
17841         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
17842         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
17843         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
17844         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
17845         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
17846         (re_acquire_state_context):
17847         Remove unnecessary forward decls.
17848         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
17849         Put __attribute at function definition,
17850         now that the function decl has been removed.
17851         * lib/regex_internal.c (re_string_peek_byte_case):
17852         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
17853         Likewise.
17854
17855 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
17856
17857         * m4/regex.m4: Add AC_PREREQ(2.50).
17858         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
17859
17860 2005-08-25  Simon Josefsson  <jas@extundo.com>
17861
17862         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
17863         __fsetlocking.
17864
17865 2005-08-25  Simon Josefsson  <jas@extundo.com>
17866
17867         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
17868         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
17869         GLIBC specific code.
17870
17871 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
17872
17873         Make regex safe for g++.  This fixes one real bug (an "err"
17874         that should have been "*err").  g++ problem reported by
17875         Sam Steingold.
17876         * lib/regex_internal.h (re_calloc): New macro, consistent with
17877         re_malloc etc.  All callers of calloc changed to use re_calloc.
17878         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
17879         not int.  All callers changed.
17880         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
17881         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
17882         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
17883         (find_recover_state): Change "err" to "*err"; this fixes what
17884         appears to be a real bug.
17885         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
17886         versus int.
17887
17888 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
17889
17890         * modules/regex (Depends-on): Add malloc, since the code
17891         assumes that !malloc(0) means failure.
17892
17893 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
17894
17895         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
17896
17897         alloca modernization/simplification for regex.
17898         * lib/regex.c: Remove portability cruft for alloca.  This no longer
17899         needs to be at the start of the file, and can be moved into
17900         regex_internal.h and simplified.
17901         * lib/regex_internal.h: Include <alloca.h>.
17902         (__libc_use_alloca) [!defined _LIBC]: New macro.
17903         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
17904         now works outside glibc.
17905
17906 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
17907
17908         * config/srclist.txt: Add glibc bugs 1241, 1245.
17909
17910 2005-08-25  Jim Meyering  <jim@meyering.net>
17911
17912         * lib/open-safer.c: Include <config.h>.
17913         Otherwise, we'd lose LARGEFILE support in any file using
17914         e.g. "fcntl--.h"
17915
17916 2005-08-25  Bruno Haible  <bruno@clisp.org>
17917
17918         * m4/minmax.m4: Require autoconf 2.52.
17919         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
17920         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
17921         alternatives of translit over the alphabet.
17922         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
17923
17924 2005-08-24  Simon Josefsson  <jas@extundo.com>
17925
17926         * tests/test-getpass.c: New file.
17927
17928 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
17929
17930         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
17931         for GNU regex features.
17932
17933 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
17934
17935         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
17936         * lib/regex.h (regerror): Likewise.
17937
17938         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
17939         requires this.  (The code never needed it.)
17940
17941         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
17942         All uses of recently-renamed identifiers changed to use the new,
17943         POSIX-compliant names.  The code will build and run just fine
17944         without these changes, but it's better to eat our own dog food
17945         and use the standard-conforming names.
17946
17947         * lib/regex.h: Fix a multitude of POSIX name space violations.
17948         These changes have an effect only for programs that define
17949         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
17950         do not change anything for programs compiled in the normal way.
17951         Also, there is no effect on the ABI.
17952
17953         (_REGEX_SOURCE): New macro.
17954         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
17955         defined and _GNU_SOURCE is not; this fixes a name space violation.
17956
17957         Rename the following macros to obey POSIX requirements.
17958         The old names are still visible as macros if _REGEX_SOURCE is defined.
17959         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
17960         RE_BACKSLASH_ESCAPE_IN_LISTS.
17961         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
17962         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
17963         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
17964         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
17965         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
17966         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
17967         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
17968         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
17969         (REG_INTERVALS): renamed from RE_INTERVALS.
17970         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
17971         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
17972         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
17973         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
17974         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
17975         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
17976         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
17977         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
17978         RE_UNMATCHED_RIGHT_PAREN_ORD.
17979         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
17980         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
17981         (REG_DEBUG): renamed from RE_DEBUG.
17982         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
17983         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
17984         unusual, since we can't clash with the POSIX REG_ICASE.
17985         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
17986         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
17987         (REG_NO_SUB): renamed from RE_NO_SUB.
17988         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
17989         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
17990         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
17991         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
17992         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
17993         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
17994         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
17995         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
17996         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
17997         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
17998         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
17999         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
18000         RE_SYNTAX_POSIX_MINIMAL_BASIC.
18001         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
18002         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
18003         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
18004         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
18005         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
18006         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
18007         (REG_FIXED): Renamed from REGS_FIXED.
18008         (REG_NREGS): Renamed from RE_NREGS.
18009
18010         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
18011         of other REG_* macros, since POSIX says the user is allowed to
18012         #undef these macros selectively.
18013
18014         (reg_errcode_t): Update comment stating what other tables need
18015         to be consistent.
18016
18017         Rename the following enum values to obey POSIX requirements.
18018         The old names are still visible as macros.
18019         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
18020         is not defined, since GNU is supposed to be a superset of POSIX as
18021         much as possible, and since we want reg_errcode_t to be a signed
18022         type for implementation consistency.
18023         (_REG_NOERROR): Renamed from REG_NOERROR.
18024         (_REG_NOMATCH): Renamed from REG_NOMATCH.
18025         (_REG_BADPAT): Renamed from REG_BADPAT.
18026         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
18027         (_REG_ECTYPE): Renamed from REG_ECTYPE.
18028         (_REG_EESCAPE): Renamed from REG_EESCAPE.
18029         (_REG_ESUBREG): Renamed from REG_ESUBREG.
18030         (_REG_EBRACK): Renamed from REG_EBRACK.
18031         (_REG_EPAREN): Renamed from REG_EPAREN.
18032         (_REG_EBRACE): Renamed from REG_EBRACE.
18033         (_REG_BADBR): Renamed from REG_BADBR.
18034         (_REG_ERANGE): Renamed from REG_ERANGE.
18035         (_REG_ESPACE): Renamed from REG_ESPACE.
18036         (_REG_BADRPT): Renamed from REG_BADRPT.
18037         (_REG_EEND): Renamed from REG_EEND.
18038         (_REG_ESIZE): Renamed from REG_ESIZE.
18039         (_REG_ERPAREN): Renamed from REG_ERPAREN.
18040         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
18041         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
18042         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
18043         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
18044
18045         (_REG_RE_NAME, _REG_RM_NAME): New macros.
18046         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
18047         changed.  But support the old name if the new one is not defined
18048         and if _REGEX_SOURCE.
18049
18050         Change the following member names in struct re_pattern_buffer.
18051         The old names are still supported if !_REGEX_SOURCE.
18052         The new names are always supported, regardless of _REGEX_SOURCE.
18053         (re_buffer): Renamed from buffer.
18054         (re_allocated): Renamed from allocated.
18055         (re_used): Renamed from used.
18056         (re_syntax): Renamed from syntax.
18057         (re_fastmap): Renamed from fastmap.
18058         (re_translate): Renamed from translate.
18059         (re_can_be_null): Renamed from can_be_null.
18060         (re_regs_allocated): Renamed from regs_allocated.
18061         (re_fastmap_accurate): Renamed from fastmap_accurate.
18062         (re_no_sub): Renamed from no_sub.
18063         (re_not_bol): Renamed from not_bol.
18064         (re_not_eol): Renamed from not_eol.
18065         (re_newline_anchor): Renamed from newline_anchor.
18066
18067         Change the following member names in struct re_registers.
18068         The old names are still supported if !_REGEX_SOURCE.
18069         The new names are always supported, regardless of _REGEX_SOURCE.
18070         (rm_num_regs): Renamed from num_regs.
18071         (rm_start): Renamed from start.
18072         (rm_end): Renamed from end.
18073
18074         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
18075         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
18076         Prepend __ to parameter names.
18077
18078         Undo yesterday's changes.
18079
18080 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
18081
18082         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
18083         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
18084         lib/regex.c.
18085
18086 2005-08-24  Jim Meyering  <jim@meyering.net>
18087
18088         Sync from coreutils.
18089         * m4/fcntl-safer.m4: New file.
18090
18091         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
18092         and object files for this module.
18093
18094 2005-08-24  Jim Meyering  <jim@meyering.net>
18095
18096         Sync from coreutils.
18097         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
18098
18099 2005-08-24  Jim Meyering  <jim@meyering.net>
18100
18101         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
18102         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
18103
18104 2005-08-24  Jim Meyering  <jim@meyering.net>
18105
18106         * modules/fcntl-safer: New module.
18107         * modules/fts (Depends-on): Add fcntl-safer.
18108         * MODULES.html.sh (File descriptor based Input/Output):
18109         Add fcntl-safer.
18110
18111 2005-08-24  Bruno Haible  <bruno@clisp.org>
18112
18113         Support for unit test modules.
18114         * modules/README: Mention tests modules.
18115         * modules/TEMPLATE-TESTS: New file.
18116         * gnulib-tool: New options --extract-tests-module, --with-tests and
18117         --tests-base (unused for the moment).
18118         (testsbase, inctests): New variables.
18119         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
18120         (func_verify_module): Exclude TEMPLATE-TESTS.
18121         (func_verify_nontests_module, func_verify_tests_module): New functions.
18122         (func_get_dependencies): Add implicit dependency for tests modules.
18123         (func_get_tests_module): New function.
18124         (func_modules_transitive_closure): When --with-tests was specified,
18125         include the unit tests as well, unless explicitly avoided.
18126         (func_emit_lib_Makefile_am): Ignore the tests modules here.
18127         (func_emit_tests_Makefile_am): New function.
18128         (func_create_testdir): When --with-tests was specified, emit a
18129         tests/ directory.
18130         * MODULES.html.sh (Future developments): Update.
18131
18132 2005-08-24  Bruno Haible  <bruno@clisp.org>
18133
18134         * modules/tls-tests: New file.
18135         * tests/test-tls.c: New file, from GNU gettext.
18136
18137 2005-08-24  Bruno Haible  <bruno@clisp.org>
18138
18139         * modules/lock-tests: New file.
18140         * tests/test-lock.c: New file, from GNU gettext.
18141
18142 2005-08-24  Bruno Haible  <bruno@clisp.org>
18143
18144         * lib/lock.h: Add multiple inclusion guard.
18145         * lib/tls.h: Add multiple inclusion guard.
18146
18147 2005-08-24  Bruno Haible  <bruno@clisp.org>
18148
18149         * gnulib-tool: Add support for the --aux-dir option to
18150         --create-testdir, --create-megatestdir, --test, --megatest.
18151         (func_create_testdir, func_create_megatestdir): Optionally emit a
18152         AC_CONFIG_AUX_DIR directive.
18153         (create-testdir, create-megatestdir, test, megatest): Provide a
18154         default value for $auxdir.
18155
18156 2005-08-24  Bruno Haible  <bruno@clisp.org>
18157
18158         * gnulib-tool (import): Use compound statement instead of subshell
18159         where possible.
18160
18161 2005-08-24  Bruno Haible  <bruno@clisp.org>
18162
18163         * gnulib-tool (import): Change --aux-dir default to "build-aux".
18164
18165 2005-08-24  Bruno Haible  <bruno@clisp.org>
18166
18167         * gnulib-tool (func_version): Update.
18168
18169 2005-08-24  Bruno Haible  <bruno@clisp.org>
18170
18171         * gnulib-tool (func_import, func_create_testdir,
18172         func_create_megatestdir): Quote all autoconf macro arguments.
18173
18174 2005-08-24  Bruno Haible  <bruno@clisp.org>
18175
18176         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
18177         option --force, because --force causes the aclocal.m4 of each
18178         subdirectory to be newer than the corresponding config.h.in.
18179
18180 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
18181
18182         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
18183         All contents moved to gl_REGEX.
18184         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
18185         assume that it does.
18186
18187 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
18188
18189         * lib/regex.h (REG_NOSYS)
18190         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
18191         Define, since POSIX requires it as of 2001.
18192         (_REG_ENOSYS)
18193         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
18194         New private symbol, used to keep the enum signed in all cases.
18195         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
18196         Youngman in
18197         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
18198
18199         * lib/regex_internal.c (re_string_skip_chars, register_state):
18200         (calc_state_hash):
18201         Remove forward decls; no longer needed now that we use prototypes.
18202         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
18203         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
18204         (clean_state_log_if_needed): Likewise.
18205
18206 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
18207
18208         * config/srclist.txt: Add glibc bugs 1231-1233.
18209
18210 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
18211
18212         Fix problems reported by Sam Steingold in
18213         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
18214         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
18215         assumed that reg_errcode_t is a signed type, which is not
18216         necessarily true if _XOPEN_SOURCE is not defined.
18217         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
18218         since some compilers warn about it otherwise.
18219
18220 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
18221
18222         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
18223         (init_word_char, create_initial_state, duplicate_node_closure):
18224         (fetch_token, peek_token_bracket, build_range_exp):
18225         (build_collating_symbol): Remove forward decls; no longer needed
18226         now that we use prototypes.
18227
18228         * lib/regcomp.c:
18229         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
18230         (re_compile_fastmap_iter, regcomp, regerror, regfree):
18231         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
18232         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
18233         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
18234         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
18235         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
18236         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
18237         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
18238         (build_range_exp, build_collating_symbol, parse_bracket_exp):
18239         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
18240         (build_charclass, build_charclass_op, fetch_number, create_tree):
18241         (create_token_tree, mark_opt_subexp, duplicate_tree):
18242         Use prototypes rather than old-style definitions.
18243
18244         * lib/regex_internal.c:
18245         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
18246         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
18247         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
18248         (re_string_reconstruct, re_string_peek_byte_case):
18249         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
18250         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
18251         (re_node_set_init_copy, re_node_set_add_intersect):
18252         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
18253         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
18254         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
18255         (re_acquire_state, re_acquire_state_context, register_state):
18256         (create_ci_newstate, create_cd_newstate, free_state):
18257         Likewise.
18258         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
18259         re_search_2):
18260         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
18261         (re_search_internal, prune_impossible_nodes):
18262         (acquire_init_state_context, check_matching, static):
18263         (check_halt_node_context, check_halt_state_context, proceed_next_node):
18264         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
18265         (update_regs, sift_states_backward, build_sifted_states):
18266         (clean_state_log_if_needed, merge_state_array):
18267         (update_cur_sifted_state, add_epsilon_src_nodes):
18268         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
18269         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
18270         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
18271         (find_recover_state, check_subexp_matching_top, transit_state_mb):
18272         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
18273         (check_arrival, check_arrival_add_next_nodes):
18274         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
18275         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
18276         (check_node_accept_bytes, check_node_accept, extend_buffers):
18277         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
18278         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
18279         (sift_ctx_init):
18280         Likewise.
18281
18282         * lib/regex_internal.h:
18283         (re_string_allocate, re_string_construct, re_string_reconstruct):
18284         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
18285         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
18286         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
18287         (re_string_context_at, re_string_peek_byte_case):
18288         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
18289         is defined, since we now use prototypes always.
18290
18291         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
18292         C89 or better.  All uses removed.
18293
18294 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
18295
18296         * config/srclist.txt: Add glibc bugs 1220-1227.
18297
18298 2005-08-20  Jim Meyering  <jim@meyering.net>
18299
18300         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
18301         of unused local, dfa.
18302
18303 2005-08-20  Bruno Haible  <bruno@clisp.org>
18304
18305         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
18306
18307 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18308
18309         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
18310         (re_node_set_insert_last, re_dfa_add_node):
18311         Rename local variables to avoid GCC shadowing warnings.
18312
18313 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18314
18315         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
18316         [defined lint]: Suppress bogus uninitialized-variable warnings.
18317
18318         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
18319         and let the caller return REG_ESPACE if out of space.  This
18320         removes an uninitialied-variable warning with GCC 4.0.1, and also
18321         avoids taking the address of a local variable.  All callers
18322         changed.
18323
18324 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18325
18326         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
18327         $LIBCSRC/posix/regexec.c.
18328         Add glibc bug 1217 for regcomp.c.
18329
18330 2005-08-19  Jim Meyering  <jim@meyering.net>
18331
18332         * lib/regexec.c (proceed_next_node): Redo local variables to
18333         avoid GCC shadowing warnings.
18334
18335 2005-08-18  Bruno Haible  <bruno@clisp.org>
18336
18337         * lib/strstr.c (strstr): Fix return value in multibyte case.
18338         * lib/strcasestr.c (strcasestr): Likewise.
18339
18340 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
18341
18342         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
18343
18344 2005-08-17  Jim Meyering  <jim@meyering.net>
18345
18346         Make the %s format (seconds since the epoch) work for a negative
18347         number and when used with a zero-padded field width, e.g. %015s.
18348
18349         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
18350         label so that it precedes the code to set `digits'.  Otherwise,
18351         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
18352         print `00-22'.  Now, it prints `-0022', as it should.
18353
18354 2005-08-17  Bruno Haible  <bruno@clisp.org>
18355
18356         * modules/strstr (Files): Add m4/mbrtowc.m4.
18357         (Depends-on): Add mbuiter.
18358
18359 2005-08-17  Bruno Haible  <bruno@clisp.org>
18360
18361         * modules/strcasestr: New file.
18362         * MODULES.html.sh (String handling, based on ANSI C 89): Add
18363         strcasestr.
18364
18365 2005-08-17  Bruno Haible  <bruno@clisp.org>
18366
18367         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
18368
18369 2005-08-17  Bruno Haible  <bruno@clisp.org>
18370
18371         * modules/mbuiter: New file.
18372         * MODULES.html.sh (Extended multibyte and wide character utilities):
18373         Add mbuiter.
18374
18375 2005-08-17  Bruno Haible  <bruno@clisp.org>
18376
18377         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
18378         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
18379
18380 2005-08-17  Bruno Haible  <bruno@clisp.org>
18381
18382         * m4/strcasestr.m4: New file.
18383
18384 2005-08-17  Bruno Haible  <bruno@clisp.org>
18385
18386         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
18387         * lib/strstr.c: Completely rewritten, with multibyte locale support.
18388
18389 2005-08-17  Bruno Haible  <bruno@clisp.org>
18390
18391         * lib/strcasestr.h: New file.
18392         * lib/strcasestr.c: New file.
18393
18394 2005-08-17  Bruno Haible  <bruno@clisp.org>
18395
18396         * lib/strcasecmp.c: Use mbuiter.h.
18397
18398 2005-08-17  Bruno Haible  <bruno@clisp.org>
18399
18400         * lib/mbuiter.h: New file.
18401
18402 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
18403
18404         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
18405         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
18406         and gl_GETOPT are both invoked via different paths (as happens
18407         with GNU tar CVS because it uses both argp and getopt), the former
18408         wins.
18409
18410 2005-08-16  Bruno Haible  <bruno@clisp.org>
18411
18412         * modules/tls: New file.
18413         * MODULES.html.sh (Multithreading): Add tls.
18414
18415 2005-08-16  Bruno Haible  <bruno@clisp.org>
18416
18417         * modules/strnlen1: New file.
18418         * MODULES.html.sh (String handling): Add strnlen1.
18419
18420 2005-08-16  Bruno Haible  <bruno@clisp.org>
18421
18422         * modules/strcase (Files): Add m4/mbrtowc.m4.
18423         (Depends-on): Add strnlen1, mbchar.
18424
18425 2005-08-16  Bruno Haible  <bruno@clisp.org>
18426
18427         * modules/mbiter: New file.
18428         * MODULES.html.sh (Extended multibyte and wide character utilities):
18429         Add mbiter.
18430
18431 2005-08-16  Bruno Haible  <bruno@clisp.org>
18432
18433         * modules/mbfile: New file.
18434         * MODULES.html.sh (Extended multibyte and wide character utilities):
18435         Add mbfile.
18436
18437 2005-08-16  Bruno Haible  <bruno@clisp.org>
18438
18439         * modules/mbchar: New file.
18440         * MODULES.html.sh (Extended multibyte and wide character utilities):
18441         New section.
18442
18443 2005-08-16  Bruno Haible  <bruno@clisp.org>
18444
18445         * m4/tls.m4: New file, from GNU gettext.
18446
18447 2005-08-16  Bruno Haible  <bruno@clisp.org>
18448
18449         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
18450         always.
18451         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
18452
18453 2005-08-16  Bruno Haible  <bruno@clisp.org>
18454
18455         * m4/mbiter.m4: New file.
18456
18457 2005-08-16  Bruno Haible  <bruno@clisp.org>
18458
18459         * m4/mbfile.m4: New file.
18460
18461 2005-08-16  Bruno Haible  <bruno@clisp.org>
18462
18463         * m4/mbchar.m4: New file.
18464
18465 2005-08-16  Bruno Haible  <bruno@clisp.org>
18466
18467         * lib/tls.h: New file, from GNU gettext.
18468         * lib/tls.c: New file, from GNU gettext.
18469
18470 2005-08-16  Bruno Haible  <bruno@clisp.org>
18471
18472         * lib/strnlen1.h: New file.
18473         * lib/strnlen1.c: New file.
18474
18475 2005-08-16  Bruno Haible  <bruno@clisp.org>
18476
18477         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
18478         (mbi_init): Update.
18479         (mbi_avail, mbi_advance): Let the iteration end before the terminating
18480         NUL byte, not after it.
18481
18482 2005-08-16  Bruno Haible  <bruno@clisp.org>
18483
18484         * lib/strcase.h (strcasecmp): Add note in comments.
18485         * lib/strncasecmp.c: Use code from strcasecmp.c.
18486         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
18487         (strcasecmp): Work correctly in multibyte locales.
18488
18489 2005-08-16  Bruno Haible  <bruno@clisp.org>
18490
18491         * lib/mbiter.h: New file.
18492
18493 2005-08-16  Bruno Haible  <bruno@clisp.org>
18494
18495         * lib/mbfile.h: New file.
18496
18497 2005-08-16  Bruno Haible  <bruno@clisp.org>
18498
18499         * lib/mbchar.h: New file.
18500         * lib/mbchar.c: New file.
18501
18502 2005-08-16  Bruno Haible  <bruno@clisp.org>
18503
18504         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
18505         the valid ones. Makes the comparison operations transitive:
18506         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
18507         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
18508
18509 2005-08-15  Simon Josefsson  <jas@extundo.com>
18510
18511         * modules/ssize_t (License): Change to 'unlimited'.
18512
18513         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
18514
18515 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
18516
18517         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
18518         Add comments for each pending glibc patch.
18519
18520 2005-08-15  Bruno Haible  <bruno@clisp.org>
18521
18522         * lib/regex.h (__restrict_arr): Don't define to __restrict if
18523         __cplusplus is defined.
18524
18525 2005-08-14  Jim Meyering  <jim@meyering.net>
18526
18527         Sync from coreutils.
18528
18529         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
18530         Use the hash-table-based cycle-detection code not just when
18531         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
18532         Reported by James Youngman in
18533         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
18534         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
18535         FTS_TIGHT_CYCLE_CHECK.
18536         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
18537         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
18538         once again.
18539         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
18540         * lib/fts.c (fd_safer): Remove decl.
18541         Include fcntl--.h rather than unistd-safer.h
18542         (fts_safe_changedir): Don't call fd_safer; no longer needed
18543         now that we include fcntl--.h.
18544
18545 2005-08-12  Simon Josefsson  <jas@extundo.com>
18546
18547         * modules/getndelim2: Use ssize_t module.
18548         * modules/getnline: Likewise.
18549         * modules/safe-read: Likewise.
18550         * modules/xreadlink: Likewise.
18551
18552         * modules/ssize_t: New file.
18553
18554 2005-08-12  Simon Josefsson  <jas@extundo.com>
18555
18556         * m4/readline.m4: Look for termcap, curses or ncurses if required.
18557
18558 2005-08-12  Simon Josefsson  <jas@extundo.com>
18559
18560         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
18561         ssize_t.
18562
18563 2005-08-12  Simon Josefsson  <jas@extundo.com>
18564
18565         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
18566         readline, getdelim and check_version.
18567         (Support for systems lacking ISO C 99: Sizes of integer types):
18568         Add size_max.
18569
18570 2005-08-12  Bruno Haible  <bruno@clisp.org>
18571
18572         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
18573
18574 2005-08-11  Simon Josefsson  <jas@extundo.com>
18575
18576         * modules/readline: New file.
18577
18578         * modules/strnlen (Files): Add strnlen.h.
18579
18580 2005-08-11  Simon Josefsson  <jas@extundo.com>
18581
18582         * m4/readline.m4: New file.
18583
18584 2005-08-11  Simon Josefsson  <jas@extundo.com>
18585
18586         * lib/readline.h, readline.c: New file.
18587
18588 2005-08-11  Simon Josefsson  <jas@extundo.com>
18589
18590         * doc/gnulib.texi (Initial import, Finishing touches): Mention
18591         gl_AVOID.
18592
18593 2005-08-11  Bruno Haible  <bruno@clisp.org>
18594
18595         * lib/strnlen.h (strnlen): Change parameter name to match comment.
18596
18597 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
18598
18599         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
18600
18601 2005-08-10  Simon Josefsson  <jas@extundo.com>
18602
18603         * tests/test-iconvme.c: New file.
18604
18605 2005-08-10  Simon Josefsson  <jas@extundo.com>
18606
18607         * m4/strnlen.m4: New file.
18608
18609         * m4/strndup.m4: Don't check for strnlen declaration, done in
18610         strnlen.m4.
18611
18612 2005-08-10  Simon Josefsson  <jas@extundo.com>
18613
18614         * lib/strndup.c: Use strnlen.h.
18615
18616         * lib/strnlen.h: New file.
18617
18618 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
18619
18620         * README: Typos.
18621
18622 2005-08-02  Simon Josefsson  <jas@extundo.com>
18623
18624         * modules/readline: New file.
18625
18626 2005-08-02  Simon Josefsson  <jas@extundo.com>
18627
18628         * modules/getdelim: New file.
18629
18630         * modules/getline: Rewrite, don't use getndelim2.
18631
18632 2005-08-02  Simon Josefsson  <jas@extundo.com>
18633
18634         * m4/getline.m4: Separate out getdelim stuff into separate module.
18635
18636         * m4/getdelim.m4: New file.
18637
18638 2005-08-02  Simon Josefsson  <jas@extundo.com>
18639
18640         * lib/getline.h, getline.c: Rewrite.
18641
18642         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
18643
18644 2005-07-31  Bruno Haible  <bruno@clisp.org>
18645
18646         * lib/lock.h (gl_lock_initializer): New macro.
18647         (gl_lock_define_initialized): Use it.
18648         (gl_rwlock_initializer): New macro.
18649         (gl_rwlock_define_initialized): Use it.
18650         (gl_recursive_lock_initializer): New macro.
18651         (gl_recursive_lock_define_initialized): Use it.
18652
18653 2005-07-30  Karl Berry  <karl@gnu.org>
18654
18655         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
18656         Report from Ben Pfaff, regarding getopt.
18657
18658 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
18659
18660         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
18661         normal way.
18662         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
18663         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
18664         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
18665         (gl_GETOPT): Use the new macros.  Most of the implementation
18666         is moved to the new macros.  This is for programs like Emacs
18667         that don't want all the functionality of gl_GETOPT.
18668
18669 2005-07-26  Bruno Haible  <bruno@clisp.org>
18670
18671         * m4/lock.m4: Update from GNU gettext.
18672
18673 2005-07-26  Bruno Haible  <bruno@clisp.org>
18674
18675         * lib/lock.h: Update from GNU gettext.
18676         * lib/lock.c: Update from GNU gettext.
18677
18678 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
18679
18680         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
18681         obsolescent AC_TRY_RUN.  Include the default includes files, for
18682         'exit'.
18683
18684 2005-07-24  Bruno Haible  <bruno@clisp.org>
18685
18686         * modules/visibility: New file.
18687         * MODULES.html.sh (Misc): Add visibility.
18688
18689 2005-07-24  Bruno Haible  <bruno@clisp.org>
18690
18691         * m4/visibility.m4: New file.
18692
18693 2005-07-24  Bruno Haible  <bruno@clisp.org>
18694
18695         * doc/visibility.texi: New file.
18696
18697 2005-07-22  Bruno Haible  <bruno@clisp.org>
18698
18699         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
18700         $(ALLOCA_H), redundant through BUILT_SOURCES.
18701         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
18702         redundant through BUILT_SOURCES.
18703         * modules/byteswap (Makefile.am): Remove explicit dependency on
18704         $(BYTESWAP_H), redundant through BUILT_SOURCES.
18705         * modules/fnmatch (Makefile.am): Remove explicit dependency on
18706         $(FNMATCH_H), redundant through BUILT_SOURCES.
18707         * modules/getopt (Makefile.am): Remove explicit dependency on
18708         $(GETOPT_H), redundant through BUILT_SOURCES.
18709         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
18710         redundant through BUILT_SOURCES.
18711         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
18712         redundant through BUILT_SOURCES.
18713         * modules/stdbool (Makefile.am): Remove explicit dependency on
18714         $(STDBOOL_H), redundant through BUILT_SOURCES.
18715         * modules/stdint (Makefile.am): Remove explicit dependency on
18716         $(STDINT_H), redundant through BUILT_SOURCES.
18717         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
18718         Remove explicit dependency on $(SYSEXITS_H).
18719         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
18720
18721 2005-07-18  Simon Josefsson  <jas@extundo.com>
18722
18723         * lib/check-version.c (check_version): Accept identical versions too.
18724
18725 2005-07-18  Bruno Haible  <bruno@clisp.org>
18726
18727         * modules/lock: New file.
18728         * MODULES.html.sh (Multithreading): New section.
18729
18730 2005-07-18  Bruno Haible  <bruno@clisp.org>
18731
18732         * m4/lock.m4: New file, from GNU gettext.
18733
18734 2005-07-18  Bruno Haible  <bruno@clisp.org>
18735
18736         * lib/lock.h: New file, from GNU gettext.
18737         * lib/lock.c: New file, from GNU gettext.
18738
18739 2005-07-18  Bruno Haible  <bruno@clisp.org>
18740
18741         * lib/lock.h (gl_once_t): New type.
18742         (gl_once_define, gl_once): New macros.
18743         * lib/lock.c (fresh_once): New variable.
18744         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
18745         functions.
18746
18747 2005-07-16  Simon Josefsson  <jas@extundo.com>
18748
18749         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
18750         workaround, suggested by Bruno.
18751
18752 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
18753
18754         * modules/xalloc (Depends-on): Add xalloc-die.
18755         * modules/xvasprintf (Depends-on): Add xalloc-die.
18756
18757 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
18758
18759         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
18760         with a minor change.
18761
18762 2005-07-15  Bruno Haible  <bruno@clisp.org>
18763
18764         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
18765         When using lib/poll.c, define poll as rpl_poll.
18766
18767 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
18768
18769         * modules/argp (Depends-on): Remove unlocked-io.
18770
18771 2005-07-14  Derek Price  <derek@ximbiot.com>
18772
18773         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
18774         for glob symlink bug.
18775
18776 2005-07-14  Bruno Haible  <bruno@clisp.org>
18777
18778         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
18779         Instead, test for *_unlocked function declarations directly.
18780
18781 2005-07-11  Simon Josefsson  <jas@extundo.com>
18782
18783         * modules/size_max: New file.
18784
18785         * modules/xsize: Depend on size_max module for size_max.m4.
18786
18787 2005-07-11  Simon Josefsson  <jas@extundo.com>
18788
18789         * lib/size_max.h: New file.
18790
18791 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
18792
18793         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
18794         copyright symbol and the year.
18795         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
18796         (version_etc_va): Use parameterized copyright notice.
18797         Reword to conform to the current GNU coding standards.
18798
18799 2005-07-11  Karl Berry  <karl@gnu.org>
18800
18801         * doc/gnulib.texi (Quoting): new node.
18802         (Initial import): more info, from Patrice.
18803
18804 2005-07-11  Bruno Haible  <bruno@clisp.org>
18805
18806         * gnulib-tool (func_usage): Document option --avoid.
18807         (Command line options): Handle --avoid.
18808         (func_acceptable): New function.
18809         (func_modules_transitive_closure): Use it.
18810
18811 2005-07-11  Bruno Haible  <bruno@clisp.org>
18812
18813         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
18814         Reported by Jim Meyering.
18815
18816 2005-07-10  Bruno Haible  <bruno@clisp.org>
18817
18818         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
18819         Needed when size_t is smaller than 'unsigned int'.
18820         Reported by Paul Eggert.
18821
18822 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
18823
18824         * modules/argp (Depends-on): Add unlocked-io
18825
18826 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
18827
18828         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
18829         block of defines.
18830
18831 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
18832
18833         * config/srclist.txt: Comment out regcomp.c, since we have a porting
18834         fix now.
18835
18836 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
18837         and Paul Eggert  <eggert@cs.ucla.edu>
18838
18839         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
18840         in wint_t, not wchar_t.  Remove now-unnecessary cast.
18841
18842 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
18843
18844         * modules/regex (Files): Add lib/regex_internal.c,
18845         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
18846         (Depends-on): Add extensions.
18847         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
18848
18849 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
18850
18851         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
18852         pathconf.
18853         * m4/same.m4 (gl_SAME): Likewise.
18854         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
18855
18856         * m4/regex.m4: Adjust to new libc regex implementation.
18857         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
18858         all the .c and .h parts of (the new) regex.
18859         Quote the m4 stuff better.
18860         Check for RE_ICASE bug of old gnulib.
18861         Check for REG_STARTEND of recent libc.
18862         Rename local variables from jm_* to gl_*.
18863         Quote operand of "test -f".
18864         Say "recent enough" version of libc, not "version 2".
18865         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
18866         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
18867         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
18868         Remove check for btowc, isascii.
18869         Require AM_LANGINFO_CODESET.
18870
18871 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
18872
18873         * lib/regex.c, regex.h: Sync from libc.
18874         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
18875         * lib/regexec.c:
18876         New files, synced from libc, except that regex_internal.h
18877         currently has a small porting fix.
18878
18879 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
18880
18881         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
18882         regex_internal.c, regexec.c.
18883         Add regex_internal.h too, but as a comment, since the libc version
18884         is currently broken in gnulib mode.
18885
18886 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
18887
18888         Support programs like Emacs that use gnulib but not gettext.
18889         * MODULES.html.sh (Internationalization functions): Add gettext-h.
18890         * modules/gettext-h: New file.
18891         * modules/gettext (Files): Remove lib/gettext.h.
18892         (Depends-on): Add gettext-h.
18893         (Makefile.am): Remove lib_SOURCES.
18894         * modules/argmatch, modules/c-stack, modules/closeout:
18895         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
18896         * modules/execute, modules/file-type, modules/getaddrinfo:
18897         * modules/getopt, modules/human, modules/javacomp:
18898         * modules/javaexec, modules/mkdir-p, modules/obstack:
18899         * modules/openat, modules/pagealign_alloc, modules/pipe:
18900         * modules/quotearg, modules/regex, modules/rpmatch:
18901         * modules/unicodeio, modules/userspec, modules/version-etc:
18902         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
18903         * modules/xsetenv:
18904         Depend on gettext-h, not gettext.
18905
18906 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
18907
18908         * gnulib-tool (func_import): Add support for 'public domain' license.
18909         * modules/alloca, modules/atexit, modules/memmove:
18910         Now public domain, not GPL.
18911         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
18912         * modules/realloc, modules/strerror, modules/strtod:
18913         Now LGPL, not GPL.
18914
18915 2005-07-05  Bruno Haible  <bruno@clisp.org>
18916
18917         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
18918         autoconf CVS. Needed for mingw.
18919
18920 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
18921
18922         Remove the dependency of the strftime module on the tzset module.
18923         * modules/strftime (Depends-on): Remove dependency on tzset.
18924
18925 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
18926
18927         Remove the dependency of the strftime module on the tzset module.
18928         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
18929         gl_FUNC_TZSET_CLOBBER.
18930
18931 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
18932
18933         Remove the dependency of the strftime module on the tzset module.
18934         * lib/strftime.c (my_strftime)
18935         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
18936         Copy the input structure, to work around some of the bug with
18937         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
18938         Solaris releases, you should also use the tzset module, but we won't
18939         require it as a dependency any more since we don't want LGPLed code
18940         to depend on GPLed code.
18941
18942 2005-07-02  Jim Meyering  <jim@meyering.net>
18943
18944         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
18945         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
18946         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
18947         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
18948
18949 2005-07-02  Jim Meyering  <jim@meyering.net>
18950
18951         * lib/backupfile.c (backup_args): Change a `0' to NULL.
18952
18953 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
18954
18955         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
18956         declares only 'struct timespec;' (!).
18957
18958 2005-07-01  Jim Meyering  <jim@meyering.net>
18959
18960         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
18961         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
18962         * lib/save-cwd.c, tempname.c:
18963         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
18964         and don't include <sys/file.h>).
18965
18966 2005-06-29  Jim Meyering  <jim@meyering.net>
18967
18968         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
18969         type name.  Use the variable name instead.
18970         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
18971         Likewise.
18972
18973 2005-06-28  Simon Josefsson  <jas@extundo.com>
18974
18975         * modules/check-version (Files): Add check-version.m4.
18976
18977 2005-06-28  Simon Josefsson  <jas@extundo.com>
18978
18979         * m4/check-version.m4: New file, suggested by Jim Meyering
18980         <jim@meyering.net>.
18981
18982 2005-06-28  Simon Josefsson  <jas@extundo.com>
18983
18984         * lib/check-version.h, lib/check-version.c: New files.
18985
18986 2005-06-28  Simon Josefsson  <jas@extundo.com>
18987
18988         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
18989         collision with global variable.  Better indentation.  Don't
18990         increment buffer pointer beyond buffer end.  Based on comments
18991         from Paul Eggert <eggert@cs.ucla.edu>.
18992
18993         * lib/base64.h: Indent.
18994
18995 2005-06-28  Simon Josefsson  <jas@extundo.com>
18996
18997         * doc/gnulib.texi (Library version handling): New section.
18998
18999 2005-06-28  Jim Meyering  <jim@meyering.net>
19000
19001         * check-module (find_included_lib_files): Hard-code another
19002         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
19003         but modules/fts-lgpl (correctly) does not list those files.
19004
19005         * modules/canonicalize (Files): Add lib/pathmax.h.
19006
19007 2005-06-25  Simon Josefsson  <jas@extundo.com>
19008
19009         * modules/check-version: New file.
19010
19011 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
19012
19013         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
19014         initializer of struct addrinfo, as an indication that we don't
19015         care how many members the structure has.
19016
19017 2005-06-24  Derek Price  <derek@ximbiot.com>
19018         and Bruno Haible  <bruno@clisp.org>
19019
19020         Remove stat module & update lstat.
19021         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
19022         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
19023         * m4/stat.m4: Remove this file.
19024
19025 2005-06-24  Derek Price  <derek@ximbiot.com>
19026         and Bruno Haible  <bruno@clisp.org>
19027
19028         Remove stat module & update lstat.
19029         * lib/stat.c: Remove this file...
19030         (slash_aware_lstat): ...moving this content and its support...
19031         * lib/lstat.c (rpl_lstat): ...into here.
19032         * lib/lstat.h: New file.
19033
19034 2005-06-24  Derek Price  <derek@ximbiot.com>
19035         and Bruno Haible  <bruno@clisp.org>
19036
19037         Remove stat module & update lstat.
19038         * config/srclist.txt (libc sources): Remove stat.
19039
19040 2005-06-24  Derek Price  <derek@ximbiot.com>
19041         and Bruno Haible  <bruno@clisp.org>
19042
19043         Remove stat module & update lstat.
19044         * MODULES.html.sh (stat): Remove.
19045         * MODULES.html: Regenerated.
19046         * modules/lstat (Description): Correct function name.
19047         (Files): Add "lstat.h".
19048         (Depends-on): Remove stat, add xalloc, stat-macros.
19049         * modules/stat: Remove this file.
19050         (Include): Add "lstat.h", remove <sys/stat.h>.
19051
19052 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
19053
19054         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
19055         (ranged_convert): Don't save conversion in a temporary struct.
19056         This causes a warning with GCC 4.0.0, and anyway in the typical
19057         case it's not worth the extra 100 bytes or so of code.
19058         (ranged_convert, __mktime_internal): When calling a function via a
19059         pointer P, use P () rather than (*P) (), as we now assume C89 or
19060         better.
19061
19062 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
19063
19064         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
19065         "who -r" failed to give output.  Problem reported by Tim Waugh.
19066
19067         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
19068         (xcalloc): Use it to avoid needless tests.
19069         Problem reported by Jim Meyering.
19070
19071 2005-06-20  Derek Price  <derek@ximbiot.com>
19072
19073         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
19074         unnecessary for Autoconfs > 2.59c.
19075
19076 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
19077
19078         * lib/argp.h (__option_is_short): Check upper limit of
19079         __key. Isprint() requires its argument to have the value
19080         of an unsigned char or EOF.
19081
19082 2005-06-16  Jim Meyering  <jim@meyering.net>
19083
19084         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
19085         when either N or S is zero.
19086
19087 2005-06-16  Derek Price  <derek@ximbiot.com>
19088
19089         * m4/bison.m4: Declare YACC & YFLAGS precious.
19090
19091 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
19092
19093         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
19094         multibyte string or pattern, fall back on unibyte matching.
19095         Problem reported by James Youngman.
19096
19097 2005-06-08  Bruno Haible  <bruno@clisp.org>
19098
19099         * modules/csharpcomp: New file.
19100         * MODULES.html.sh (C#): Add csharpcomp.
19101
19102 2005-06-08  Bruno Haible  <bruno@clisp.org>
19103
19104         * m4/csharpcomp.m4: New file, from GNU gettext.
19105
19106 2005-06-08  Bruno Haible  <bruno@clisp.org>
19107
19108         * lib/csharpcomp.h: New file, from GNU gettext.
19109         * lib/csharpcomp.c: New file, from GNU gettext.
19110         * lib/csharpcomp.sh.in: New file, from GNU gettext.
19111
19112 2005-06-08  Bruno Haible  <bruno@clisp.org>
19113
19114         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
19115         warning on mingw.
19116
19117 2005-06-07  Derek Price  <derek@ximbiot.com>
19118
19119         Sync from CVS.
19120         * lib/glob_.h: Indent nested #ifdef.
19121
19122 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
19123
19124         Sync from coreutils.
19125         Use "file name" when talking about file names, instead of "filename"
19126         or "path", as per the GNU coding standards.
19127         * lib/mkdir-p.c: Renamed from makepath.c.
19128         (make_dir_parents): Renamed from make_path.  All callers changed.
19129         * lib/mkdir-p.h: Likewise.  All includers changed.
19130         * lib/filenamecat.c: Renamed from path-concat.c.
19131         (file_name_concat): Renamed from path_concat.  All callers changed.
19132         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
19133         * lib/filenamecat.h: Likewise.  All includers changed.
19134         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
19135         in comments or local variable names.
19136         * lib/basename.c: Likewise.
19137         * lib/canonicalize.c, canonicalize.h: Likewise.
19138         * lib/dirname.c, dirname.h: Likewise.
19139         * lib/euidaccess.c: Likewise.
19140         * lib/exclude.c: Likewise
19141         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
19142         * lib/fsusage.c, fsuage.h: Likewise.
19143         * lib/fts.c, fts_.h: Likewise.
19144         * lib/getcwd.c: Likewise.
19145         * lib/getloadavg.c: Likewise.
19146         * lib/mkstemp.c: Likewise.
19147         * lib/mountlist.c, mountlist.h: Likewise.
19148         * lib/openat.c, openat.h: Likewise.
19149         * lib/readlink-stub.c: Likewise.
19150         * lib/readutmp.c, readutmp.h: Likewise.
19151         * lib/rename.c: Likewise.
19152         * lib/rmdir.c: Likewise.
19153         * lib/same.c: Likewise.
19154         * lib/savedir.c: Likewise.
19155         * lib/stripslash.c: Likewise.
19156         * lib/tempname.c: Likewise.
19157         * lib/xreadlink.c: Likewise.
19158         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
19159         All uses changed.
19160         * lib/exclude.h: Likewise.
19161
19162         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
19163         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
19164         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
19165         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
19166         * lib/pathmax.h: Include <limits.h> unconditionally, since other
19167         files have been getting away with it for years (MORE/BSD 4.3
19168         is extinct now).
19169         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
19170         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
19171
19172         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
19173         Define to 256, not 255, as per modern POSIX.
19174
19175 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
19176
19177         Sync from coreutils.
19178         Use "file name" when talking about file names, instead of "filename"
19179         or "path", as per the GNU coding standards.
19180         * MODULES.html.sh: mkdir-p renamed from makepath.
19181         filenamecat renamed from path-concat.
19182         * modules/filenamecat: Renamed from modules/path-concat.
19183         (Files): filenamecat.h and filenamecat.c renamed from
19184         path-concat.h and path-concat.c.
19185         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
19186         (Include): filenamecat.h, not path-concat.h.
19187         * modules/mkdir-p: Renamed from modules/makepath.
19188         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
19189         makepath.c.
19190         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
19191         (Include): mkdir-p.h, not makepath.h.
19192
19193 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
19194
19195         Sync from coreutils.
19196         * m4/mkdir-p.m4: Renamed from makepath.m4.
19197         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
19198         Rename files from makepath.c to mkdir-p.c, and from
19199         makepath.h to mkdir-p.h.
19200         * m4/filenamecat.m4: Renamed from path-concat.m4.
19201         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
19202         Rename files from path-concat.c to filenamecat.c,
19203         and from path-concat.h to filenamecat.h.
19204         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
19205         "file name" in local variables or comments.
19206         * m4/rename.m4: Likewise.
19207
19208 2005-06-01  Bruno Haible  <bruno@clisp.org>
19209
19210         * modules/csharpexec: New file.
19211         * MODULES.html.sh (C#): New section.
19212
19213 2005-06-01  Bruno Haible  <bruno@clisp.org>
19214
19215         * m4/csharp.m4: New file, from GNU gettext.
19216         * m4/csharpexec.m4: New file, from GNU gettext.
19217
19218 2005-06-01  Bruno Haible  <bruno@clisp.org>
19219
19220         * lib/csharpexec.h: New file, from GNU gettext.
19221         * lib/csharpexec.c: New file, from GNU gettext.
19222         * lib/csharpexec.sh.in: New file, from GNU gettext.
19223
19224 2005-05-31  Derek Price  <derek@ximbiot.com>
19225             Paul Eggert  <eggert@cs.ucla.edu>
19226
19227         Sync from cvs.
19228         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
19229
19230 2005-05-31  Derek Price  <derek@ximbiot.com>
19231             Paul Eggert  <eggert@cs.ucla.edu>
19232
19233         Sync from cvs.
19234         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
19235
19236 2005-05-29  Derek Price  <derek@ximbiot.com>
19237
19238         * config/srclist.txt (glob_.h, glob.c): Add these files.
19239
19240 2005-05-29  Derek Price  <derek@ximbiot.com>
19241
19242         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
19243         * modules/glob: New file.
19244         * modules/getlogin_r: Add link to POSIX spec in description.
19245
19246 2005-05-29  Derek Price  <derek@ximbiot.com>
19247             Paul Eggert  <eggert@cs.ucla.edu>
19248
19249         * m4/glob.m4: New file.
19250
19251 2005-05-29  Derek Price  <derek@ximbiot.com>
19252             Paul Eggert  <eggert@cs.ucla.edu>
19253
19254         * lib/glob_.h, lib/glob.c: New files.
19255
19256 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
19257
19258         * modules/fts (Files): Remove m4/inttypes-pri.m4.
19259         * modules/fts-lgpl (Depends-on): Remove gettext.
19260
19261 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
19262
19263         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
19264         and don't require gt_INTTYPES_PRI.
19265
19266 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
19267
19268         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
19269
19270         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
19271         the configuration hassle isn't worth it.
19272         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
19273         (LONGEST_MODIFIER, PRIuMAX): Remove.
19274
19275 2005-05-27  Bruno Haible  <bruno@clisp.org>
19276
19277         * lib/getlogin_r.h: Remove second include of <stddef.h>.
19278
19279 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
19280
19281         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
19282         _POSIX_PTHREAD_SEMANTICS for Solaris.
19283
19284 2005-05-25  Derek Price  <derek@ximbiot.com>
19285
19286         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
19287
19288 2005-05-25  Derek Price  <derek@ximbiot.com>
19289             Paul Eggert  <eggert@cs.ucla.edu>
19290
19291         * modules/getlogin_r, m4/getlogin_r.m4: New files.
19292         * lib/getlogin_r.c, getlogin_r.h: New files.
19293
19294 2005-05-25  Bruno Haible  <bruno@clisp.org>
19295             Derek Price  <derek@ximbiot.com>
19296
19297         * lib/getlogin_r.h: Simplify API documentation.
19298
19299 2005-05-23  Derek Price  <derek@ximbiot.com>
19300
19301         * modules/minmax (Files): Add m4/minmax.m4.
19302         (configure.ac): Add gl_MINMAX.
19303
19304 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
19305
19306         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
19307         so that unistd-safer.h (GPL'ed code) need not be included.
19308
19309 2005-05-22  Bruno Haible  <bruno@clisp.org>
19310
19311         * m4/minmax.m4: New file.
19312         Based on a patch by Derek Price <derek@ximbiot.com>.
19313
19314 2005-05-22  Bruno Haible  <bruno@clisp.org>
19315
19316         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
19317         (INT64_MIN): Fix definition.
19318         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
19319
19320         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
19321         NEED_SIGNED_INT_TYPES.
19322
19323         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
19324         HAVE_SYSTEM_INTTYPES.
19325
19326 2005-05-22  Bruno Haible  <bruno@clisp.org>
19327
19328         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
19329         Also include <sys/param.h> if it defines MIN, MAX.
19330         Based on a patch by Derek Price <derek@ximbiot.com>.
19331
19332 2005-05-21  Jim Meyering  <jim@meyering.net>
19333
19334         * modules/fts (Files): Add m4/inttypes-pri.m4.
19335         (Depends-on): Add lstat and remove gettext.  Alphabetize.
19336
19337 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
19338
19339         New fts module.
19340         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
19341         (setup_dir, free_dir): New functions.
19342         (enter_dir, leave_dir): Define trivial
19343         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
19344         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
19345         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
19346         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
19347         Move to fts-cycle.c.
19348         (fts_open): Use setup_dir.
19349         (fts_close): Use free_dir.
19350         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
19351         This adds a label and some gotos, but the alternatives were messier.
19352         Check for memory allocation failure when entering a dir.
19353         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
19354         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
19355         (FTS): New member fts_cycle, that is a union that contains the
19356         old active_dir_ht and cycle_state.  All uses changed to mention
19357         fts_cycle.ht and fts_cycle.state.
19358         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
19359         fts.c, with the following changes:
19360         (setup_dir, free_dir): New functions.
19361         (enter_dir): Now returns bool.  Return true if successful, false
19362         if memory exhausted.  All callers changed.
19363         Do not bother partly cleaning up on
19364         memory allocation failure; that is free_dir's job.
19365         However, free ad if hash_insert fails, to avoid memory leak.
19366         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
19367         fts->fts_options to see which union member to use.
19368
19369 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
19370
19371         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
19372         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
19373
19374 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
19375
19376         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
19377
19378 2005-05-20  Jim Meyering  <jim@meyering.net>
19379
19380         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
19381         Now a macro, to pacify GCC.
19382
19383 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
19384
19385         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
19386         of -1.
19387
19388 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
19389
19390         * lib/chown.c (rpl_chown): Return -1 on failure.
19391
19392 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
19393
19394         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
19395         Don't check for stddef.h.
19396         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
19397         don't use its results.
19398         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
19399         since we include them unconditionally.  Don't require
19400         AM_STDBOOL_H, since stdbool is a prerequisite.
19401         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
19402         since we assume C89 or better.
19403         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
19404         as we don't use their results.
19405         Don't check for fchdir, memmove, memset, strrchr, as we use
19406         them unconditionally.
19407         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
19408         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
19409
19410 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
19411
19412         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
19413         Include <stddef.h> unconditionally, since we assume C89 now.
19414         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
19415         * lib/fts.c: Include fts_.h first, to check interface.
19416         Do not include intprops.h; no longer needed.
19417         Include cycle-check.h and hash.h, since fts_.h no longer does.
19418         Remove unnecessary casts of closedir to void.
19419         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
19420         decide whether to decrement nlinks.
19421         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
19422         (FTS): Use struct hash_table * instead of Hash_table, so that
19423         we no longer need to include hash.h here.
19424
19425 2005-05-18  Jim Meyering  <jim@meyering.net>
19426
19427         * modules/dirfd (License): Change to LGPL.  Most of the code
19428         is already in the public domain.
19429
19430 2005-05-18  Jim Meyering  <jim@meyering.net>
19431
19432         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
19433         Reported by Yoann Vandoorselaere.
19434
19435 2005-05-17  Jim Meyering  <jim@meyering.net>
19436
19437         * m4/fts.m4: New file, from coreutils.
19438
19439 2005-05-17  Jim Meyering  <jim@meyering.net>
19440
19441         * lib/fts.c, lib/fts_.h: New files, from coreutils.
19442
19443 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
19444
19445         Sync from coreutils.
19446         * m4/unlinkdir.m4: New file.
19447
19448 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
19449
19450         Sync from coreutils.
19451         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
19452         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
19453         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
19454         White space changes only.
19455         * lib/makepath.c (make_path): Port to hosts where leading "//" is
19456         special.
19457         * lib/yesno.c: Include getline.h, not ctype.h.
19458         (yesno): Don't remove leading white space; POSIX doesn't allow it.
19459         Use getline to remove arbitrary restriction on response length.
19460
19461 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
19462
19463         * config/srclist-update: Spell out "Street" in FSF postal
19464         mail address; this is the style the FSF seems to prefer.
19465
19466         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
19467         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
19468         this updates FSF postal mail address.
19469
19470         Sync from coreutils.
19471         * modules/unlinkdir: New file.
19472         * modules/yesno (Depends-on): Add getline.
19473         * MODULES.html.sh (File system functions): Add unlinkdir.
19474
19475 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
19476
19477         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
19478         lib/strsep.h:
19479         Change the initial comment to refer to GPL, not LGPL.
19480         gnulib-tool will change it to LGPL as needed.
19481
19482         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
19483         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
19484         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
19485         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
19486         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
19487         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
19488         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
19489         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
19490         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
19491         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
19492         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
19493         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
19494         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
19495         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
19496         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
19497         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
19498         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
19499         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
19500         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
19501         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
19502         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
19503         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
19504         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
19505         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
19506         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
19507         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
19508         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
19509         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
19510         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
19511         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
19512         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
19513         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
19514         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
19515         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
19516         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
19517         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
19518         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
19519         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
19520         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
19521         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
19522         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
19523         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
19524         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
19525         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
19526         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
19527         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
19528         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
19529         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
19530         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
19531         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
19532         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
19533         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
19534         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
19535         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
19536         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
19537         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
19538         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
19539         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
19540         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
19541         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
19542         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
19543         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
19544         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
19545         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
19546         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
19547         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
19548         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
19549         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
19550         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
19551         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
19552         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
19553         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
19554         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
19555         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
19556         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
19557         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
19558         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
19559         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
19560         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
19561         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
19562         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
19563         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
19564         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
19565         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
19566         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
19567         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
19568         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
19569         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
19570         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
19571         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
19572         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
19573         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
19574         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
19575         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
19576         lib/yesno.c, lib/yesno.h:
19577         Update FSF postal mail address.
19578
19579 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
19580
19581         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
19582         tests/test-memmem.c, tests/test-stpncpy.c:
19583         Update FSF postal mail address.
19584
19585 2005-05-13  Bruno Haible  <bruno@clisp.org>
19586
19587         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
19588         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
19589         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
19590         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
19591         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
19592         Add support for 64-bit integers in the MSVC compiler.
19593
19594 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
19595
19596         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
19597
19598 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
19599
19600         * gnulib-tool (func_import): Sort and uniquify recommended includes.
19601
19602 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
19603
19604         * doc/getdate.texi (General date syntax): Don't say that date
19605         date --iso-8601=ns generates acceptable dates; it doesn't yet.
19606         Problem reported by Nic Ferrier.
19607
19608 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
19609
19610         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
19611         specified in ai_socktype. Fix invalid ai_protocol
19612         check. ai_protocol is usually set to 0 or depending on
19613         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
19614         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
19615         ai_socktype / ai_protocol in the returned addrinfo structure.
19616
19617 2005-05-10  Simon Josefsson  <jas@extundo.com>
19618
19619         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
19620         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
19621
19622 2005-05-10  Karl Berry  <karl@gnu.org>
19623
19624         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
19625         (from http://www.gnu.org/licenses).
19626         * doc/COPYING.LIB: also rename to COPYING.LESSER.
19627         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
19628         fdl.texi suffices.
19629
19630 2005-05-10  Karl Berry  <karl@gnu.org>
19631
19632         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
19633         (COPYING.DOC): remove.
19634
19635         * config/srclist-update: new FSF address.
19636
19637 2005-05-10  Derek Price  <derek@ximbiot.com>
19638
19639         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
19640         possible.
19641
19642 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
19643             Bruno Haible  <bruno@clisp.org>
19644
19645         * modules/inet_ntop: New file.
19646         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
19647         inet_ntop.
19648
19649 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
19650             Bruno Haible  <bruno@clisp.org>
19651
19652         * m4/inet_ntop.m4: New file.
19653
19654 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
19655             Bruno Haible  <bruno@clisp.org>
19656
19657         * lib/inet_ntop.h: New file.
19658         * lib/inet_ntop.c: New file, from glibc with modifications.
19659
19660 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
19661
19662         * modules/time_r (License): Change to LGPL.
19663         * modules/extensions (License): Change to LGPL.  Actually,
19664         the license is more permissive than that, but currently gnulib-tool
19665         doesn't know how to handle more-permissive licenses.
19666
19667         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
19668         Problem reported by Dave Love.
19669
19670 2005-05-08  Jim Meyering  <jim@meyering.net>
19671
19672         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
19673         blank.
19674
19675 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
19676
19677         * modules/argmatch (Depends-on): Add stdbool.
19678         * modules/backupfile (Depends-on): Likewise.
19679         * modules/chdir-long (Depends-on): Likewise.
19680         * modules/closeout (Depends-on): Likewise.
19681         * modules/cycle-check (Depends-on): Likewise.
19682         * modules/dirname (Depends-on): Likewise.
19683         * modules/fnmatch (Depends-on): Likewise.
19684         * modules/fsusage (Depends-on): Likewise.
19685         * modules/fwriteerror (Depends-on): Likewise.
19686         * modules/getcwd (Depends-on): Likewise.
19687         * modules/getloadavg (Depends-on): Likewise.
19688         * modules/hard-locale (Depends-on): Likewise.
19689         * modules/makepath (Depends-on): Likewise.
19690         * modules/mountlist (Depends-on): Likewise.
19691         * modules/nanosleep (Depends-on): Likewise.
19692         * modules/posixtm (Depends-on): Likewise.
19693         * modules/quotearg (Depends-on): Likewise.
19694         * modules/readtokens (Depends-on): Likewise.
19695         * modules/readtokens0 (Depends-on): Likewise.
19696         * modules/readutmp (Depends-on): Likewise.
19697         * modules/save-cwd (Depends-on): Likewise.
19698         * modules/strftime (Depends-on): Likewise.
19699         * modules/userspec (Depends-on): Likewise.
19700         * modules/utimecmp (Depends-on): Likewise.
19701         * modules/xgetcwd (Depends-on): Likewise.
19702         * modules/xnanosleep (Depends-on): Likewise.
19703         * modules/xstrtod (Depends-on): Likewise.
19704         * modules/yesno (Depends-on): Likewise.
19705
19706 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
19707
19708         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
19709         needless checks.
19710
19711 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
19712
19713         Merge from coreutils.  Among other things,
19714         add bulletproofing for cases where stdin, stdout, or stderr are closed.
19715         * lib/fd-safer.c: New file.
19716         * lib/fcntl-safer.h, open-safer.c: Remove.
19717         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
19718         * lib/dup-safer.c: Include unistd-safer.h first.
19719         Don't include errno.h.
19720         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
19721         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
19722         * lib/file-type.c: Rely on file-type.h change.
19723         * lib/getloadavg.c: Include unistd-safer.h.
19724         (getloadavg): Use safer open.
19725         * lib/getusershell.c: Include "stdio-safer.h".
19726         (getusershell): Use safer fopen.
19727         * lib/long-options.c (long_options): Use NULL rather than 0.
19728         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
19729         'free'.
19730         * lib/modechange.c: Likewise.
19731         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
19732         (MODE_DONE): New constant.
19733         (struct mode_change): Remove 'next' member.
19734         (make_node_op_equals): New function; like the old one of the
19735         same name, except it allocates an array.
19736         (mode_compile, mode_create_from_ref): Use it.
19737         (mode_compile): Allocate result as an array, not a linked list.
19738         Parse octal string ourself, so that we catch mistakes like "+0".
19739         (mode_adjust): Arg is an array, not a linked list.
19740         * lib/modechange.c: Include stat-macros.h, xalloc.h.
19741         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
19742         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
19743         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
19744         Remove.  This is now stat-macros.h's job.
19745         (talloc): Remove.  All callers replaced by xalloc, so that
19746         our invokers don't have to worry about reporting memory failures.
19747         (make_node_op_equals): Remove.
19748         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
19749         New constants.
19750         (struct mode_change): Moved here from modechange.h.
19751         (mode_append_entry): Remove.
19752         (mode_compile): Remove MASKED_OPS arg, since it encouraged
19753         apps to have incorrect behavior.  Use simpler algorithm for head
19754         and tail.  Don't futz with umask; that's now the job of mode_adjust.
19755         Detect more invalid usages rather than having somewhat-random behavior.
19756         Don't insert an "a=" action, as that leads to incorrect behavior.
19757         (mode_compile, mode_create_from_ref): Return NULL on error instead
19758         of an enum, since now there's only one way to have an error.  All
19759         callers changed.
19760         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
19761         at the correct time.  Simplify calculation of "+u" and its ilk.
19762         Don't mishandle "+X".
19763         (mode_free): Remove "register" and localize decls.
19764         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
19765         (struct mode_change): Move to modechange.c; callers don't
19766         need to see this stuff.
19767         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
19768         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
19769         (mode_change, mode_adjust): Reflect the new signatures noted above.
19770         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
19771         that might redefine system include files.
19772         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
19773         (my_usleep): Use NULL rather than (void *) 0.
19774         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
19775         Use siginterrupt to specify that system calls should be interrupted.
19776         (rpl_nanosleep): Move initialization of suspended closer to call of
19777         my_usleep.
19778         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
19779         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
19780         (desirable_utmp_entry): New function.
19781         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
19782         using x2nrealloc, to simplify logic.
19783         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
19784         size calculation.  Do not assume utmp file is a regular file.
19785         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
19786         (READ_UTMP_CHECK_PIDS): New constant.
19787         * lib/save-cwd.c: Include unistd-safer.h.
19788         (save_cwd): Use fd_safer.
19789         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
19790         [!_LIBC] Include "stat-macros.h" instead.
19791         * lib/unistd-safer.h (fd_safer): New decl.
19792
19793 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
19794
19795         * modules/getloadavg (Depends-on): Add unistd-safer.
19796         * modules/getusershell (Depends-on): Add stdio-safer.
19797         * modules/lstat (Depends-on): Remove xalloc.
19798         * modules/mkstemp (Depends-on): Add stat-macros.
19799         * modules/modechange (Depends-on): Remove xstrtol.
19800         Add stat-macros, xalloc.
19801         * modules/save-cwd (Depends-on): Add unistd-safer.
19802         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
19803         * modules/unistd-safer (Files): Add lib/fd-safer.c
19804         (Makefile.am): Remove lib_SOURCES.
19805
19806         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
19807         Remove fcntl-safer; unistd-safer supersedes it.
19808
19809 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
19810
19811         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
19812         AC_HEADER_STAT.
19813         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
19814         (gl_PREREQ_CHOWN): Remove.
19815         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
19816         it.  Don't require AC_HEADER_STAT.
19817         (gl_PREREQ_LSTAT): Remove.
19818         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
19819         Don't require AC_HEADER_STAT.
19820         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
19821         (gl_PREREQ_RMDIR): Remove.
19822         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
19823         mention stat-macros.h or AC_HEADER_STAT, since we'll make
19824         the stat-macros module a prerequisite.
19825         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
19826         * m4/filemode.m4 (gl_FILEMODE): Likewise.
19827         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
19828         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
19829         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
19830         variable names.
19831         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
19832         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
19833         variable prefixes.
19834         * m4/fcntl-safer.m4: Remove.
19835         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
19836         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
19837         Invoke gl_PREREQ_FD_SAFER.
19838         (gl_PREREQ_FD_SAFER): New macro.
19839         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
19840         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
19841         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
19842         Remove duplicate call to AC_LIBOBJ(readutmp).
19843         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
19844
19845         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
19846         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
19847
19848 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
19849
19850         * MODULES.html.sh (Misc): Add byteswap.
19851
19852 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
19853
19854         * modules/getcwd (Depends-on): Add extensions.
19855         * modules/openat (Depends-on): Likewise.
19856
19857 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
19858
19859         * modules/byteswap: New file.
19860
19861 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
19862
19863         * m4/byteswap.m4: New file.
19864
19865 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
19866
19867         * lib/byteswap_.h: New file.
19868
19869 2005-04-25  Karl Berry  <karl@gnu.org>
19870
19871         * m4/gettext.m4: Update from GNU gettext 0.14.4.
19872
19873 2005-04-25  Albert Chin  <china@thewrittenword.com>
19874
19875         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
19876         Toolkit C bug.
19877
19878 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
19879
19880         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
19881         (func_ln_if_changed) Remove forcibly for no error message
19882         in case file does not exist.
19883
19884 2005-04-19  Simon Josefsson  <jas@extundo.com>
19885
19886         * gnulib-tool (Options): Make --symlink mean --symbolic.
19887
19888 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
19889
19890         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
19891
19892 2005-04-16  Simon Josefsson  <jas@extundo.com>
19893
19894         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
19895
19896 2005-04-15  Simon Josefsson  <jas@extundo.com>
19897
19898         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
19899
19900 2005-04-15  Simon Josefsson  <jas@extundo.com>
19901
19902         * gnulib-tool: Rename --symlink to --symbolic.
19903
19904 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
19905
19906         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
19907         symbolic links to files instead of copying/moving.  Add --aux-dir,
19908         specifying directory relative --dir where auxiliary build tools
19909         are placed.
19910
19911 2005-04-14  Bruno Haible  <bruno@clisp.org>
19912
19913         * modules/allocsa (License): Change to LGPL.
19914         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
19915
19916 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
19917
19918         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
19919         that "UTC +1 second" continues to work.  Problem reported
19920         by Dmitry V. Levin.
19921         (relunit_snumber): New rule.
19922         (relunit): Use it.
19923
19924 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
19925
19926         * lib/getdate.y (universal_time_zone_table): New constant.
19927         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
19928         universal_time_zone_table.
19929         (lookup_zone): Prefer universal_time_zone_table to
19930         local_time_zone_table, so that "GMT" time stamps are allowed in
19931         London during the summer.  Problem reported by Ian Abbott.
19932
19933 2005-04-12  Jim Meyering  <jim@meyering.net>
19934
19935         * lib/human.c (humblock): Set *options even when returning due to
19936         xstrtoumax conversion failure.  Thanks to a used-uninitialized
19937         warning from gcc-4.
19938
19939 2005-04-09  Jim Meyering  <jim@meyering.net>
19940
19941         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
19942         -Wuninitialized: initialize tm0.tm_year.
19943
19944 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
19945
19946         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
19947         count, since there's no maximum.  All uses changed.
19948         Add member dsts_seen.
19949         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
19950         not being INT_MAX.
19951         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
19952         Use pc_rels_seen to decide whther a date is absolute.
19953
19954         * lib/getdate.y (number): Don't overwrite year.
19955         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
19956         check.
19957
19958 2005-04-02  Simon Josefsson  <jas@extundo.com>
19959
19960         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
19961         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
19962
19963 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
19964
19965         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
19966         where no absolute path name can be longer than PATH_MAX.
19967
19968 2005-03-27  Jim Meyering  <jim@meyering.net>
19969
19970         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
19971
19972 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
19973
19974         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
19975         "one's complement" -> "ones' complement" in comment, as per Knuth.
19976         "value of type" -> "type or expression" in comment.
19977         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
19978
19979 2005-03-26  Jim Meyering  <jim@meyering.net>
19980
19981         Comment nits.
19982         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
19983         Correct typos: s/or/of/.
19984
19985 2005-03-26  Jim Meyering  <jim@meyering.net>
19986
19987         * modules/check-include-files: Move to ../ and rename to...
19988         * check-module: ...this.
19989
19990 2005-03-25  Jim Meyering  <jim@meyering.net>
19991
19992         * modules/xvasprintf (Files): Add xalloc.h.
19993
19994 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
19995
19996         * modules/gettext (Files): config/config.rpath ->
19997         build-aux/config.rpath
19998         * modules/iconv (Files): Likewise.
19999         Problem reported by Oskar Liljeblad.
20000
20001 2005-03-23  Jim Meyering  <jim@meyering.net>
20002
20003         * modules/check-include-files: New script to check for
20004         missing dependencies, multiple includes, etc.
20005
20006         * modules/c-strtold (Depends-on): Add xalloc.
20007         * modules/c-strtod (Depends-on): Add xalloc.
20008         * modules/hash (Depends-on): Add xalloc.
20009         (Files): Remove lib/xalloc.h.
20010
20011         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
20012         * modules/userspec (Files): Add lib/inttostr.h.
20013
20014 2005-03-23  Jim Meyering  <jim@meyering.net>
20015
20016         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
20017
20018 2005-03-22  Jim Meyering  <jim@meyering.net>
20019
20020         * modules/stat-macros: New module.
20021         * modules/canonicalize, modules/euidaccess, modules/file-type,
20022         * modules/filemode, modules/lchown, modules/makepath,
20023         * modules/rmdir, modules/stat: Depend on new stat-macros module
20024         rather than listing lib/stat-macros.h manually.
20025         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
20026
20027 2005-03-22  Jim Meyering  <jim@meyering.net>
20028
20029         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
20030
20031 2005-03-22  Bruno Haible  <bruno@clisp.org>
20032
20033         * config/srclist.txt: Replace target directory 'config' with
20034         'build-aux'.
20035         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
20036         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
20037         ../build-aux/.
20038
20039 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
20040
20041         * modules/chdir-long (Depends-on): Add mempcpy.
20042
20043         * modules/acl, modules/backupfile, modules/c-strtod,
20044         modules/c-strtold, modules/canon-host, modules/canonicalize,
20045         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
20046         modules/exclude, modules/exitfail, modules/file-type,
20047         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
20048         modules/getdate, modules/getline, modules/getpagesize,
20049         modules/getpass, modules/getugroups, modules/group-member,
20050         modules/hard-locale, modules/hash, modules/human, modules/idcache,
20051         modules/inttostr, modules/long-options, modules/makepath,
20052         modules/md5, modules/memcasecmp, modules/memcoll,
20053         modules/modechange, modules/mountlist, modules/path-concat,
20054         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
20055         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
20056         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
20057         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
20058         modules/strftime, modules/strndup, modules/strverscmp,
20059         modules/timespec, modules/unlocked-io, modules/userspec,
20060         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
20061         modules/yesno:
20062         Remove lib_SOURCES line from Makefile.am section, as this is now
20063         done automatically by the corresponding Autoconf macro.
20064
20065 2005-03-21  Jim Meyering  <jim@meyering.net>
20066
20067         Changes imported from coreutils.
20068
20069         * lib/cycle-check.c: Don't include xalloc.h.
20070
20071         * lib/path-concat.c: Don't include assert.h.
20072         (path_concat): Remove assertion that would have triggered
20073         for ABASE starting with more than one slash.
20074         Reported by Andreas Schwab.
20075
20076         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
20077         properly when ABASE is an absolute file name.
20078         Correct the description of this function.
20079         Include <assert.h>.
20080         Add an assertion and a test driver.
20081         This fixes a bug introduced on 2004-07-02.
20082         Andreas Schwab reported the resulting failure of cp --parents:
20083         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
20084
20085 2005-03-21  Jim Meyering  <jim@meyering.net>
20086
20087         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
20088         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
20089
20090 2005-03-21  Jim Meyering  <jim@meyering.net>
20091         and  Paul Eggert  <eggert@cs.ucla.edu>
20092
20093         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
20094         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
20095         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
20096         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
20097         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
20098         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
20099         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
20100         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
20101         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
20102         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
20103         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
20104         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
20105         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
20106         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
20107         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
20108         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
20109         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
20110         for these modules.
20111
20112 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
20113
20114         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
20115         (which shouldn't happen), generate nothing instead of returning 0
20116         immediately, so that nstrftime (NULL, ...) doesn't return 0.
20117
20118 2005-03-16  Bruno Haible  <bruno@clisp.org>
20119
20120         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
20121         HAVE_LONGLONG_64BIT.
20122
20123 2005-03-16  Bruno Haible  <bruno@clisp.org>
20124
20125         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
20126         HAVE_LONGLONG_64BIT.
20127
20128 2005-03-16  Bruno Haible  <bruno@clisp.org>
20129
20130         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
20131         HAVE_LONGLONG_64BIT.
20132
20133 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
20134
20135         * lib/strftime.c (my_strftime): Prepend space to format so that we can
20136         reliably distinguish strftime failure from empty output on POSIX
20137         hosts.
20138
20139 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
20140
20141         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
20142         (iconv_string): Don't guess a size-zero buffer, as that might cause
20143         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
20144         result would be 'too large', where 'too large' is (heuristically)
20145         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
20146         overflow concerns.  This will prevent some unwanted malloc failures
20147         when the inputs are very large.
20148
20149 2005-03-15  Karl Berry  <karl@gnu.org>
20150
20151         * config/srclist.txt (config.rpath): from gettext.
20152         * config/config.rpath: update.
20153
20154 2005-03-15  Bruno Haible  <bruno@clisp.org>
20155
20156         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
20157         to 'negate'.
20158
20159         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
20160         variable.
20161
20162         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
20163         results.
20164
20165 2005-03-14  Simon Josefsson  <jas@extundo.com>
20166
20167         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
20168         <fx@gnu.org>.
20169
20170 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
20171
20172         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
20173         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
20174         intprops.h.
20175         * lib/strtol.c: Likewise.
20176
20177 2005-03-14  Jim Meyering  <jim@meyering.net>
20178
20179         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
20180         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
20181         to be nonzero so that we (and caller) can detect the difference
20182         between a valid zero-length expansion and an error return, even
20183         when the underlying strftime fails before writing anything into
20184         that location.
20185
20186 2005-03-14  Bruno Haible  <bruno@clisp.org>
20187
20188         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
20189         Update from GNU gettext 0.14.3.
20190
20191 2005-03-10  Jim Meyering  <jim@meyering.net>
20192
20193         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
20194
20195 2005-03-10  Jim Meyering  <jim@meyering.net>
20196
20197         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
20198         so that this module works on systems without fchdir.
20199
20200 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
20201
20202         Factor int-properties macros into a single file, except for
20203         glibc-related files.
20204         * lib/intprops.h: New file.
20205         * lib/getloadavg.c: Include it instead of limits.h.
20206         (INT_STRLEN_BOUND): Remove.
20207         * lib/human.c: Include intprops.h.
20208         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
20209         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
20210         302/1000.
20211         * lib/inttostr.h: Include intprops.h instead of limits.h.
20212         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
20213         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
20214         for consistency with intprops.h.
20215         (time_t_is_integer, twos_complement_arithmetic): Use them.
20216         * lib/sig2str.h: Include <signal.h>, intprops.h.
20217         (INT_STRLEN_BOUND): Remove.
20218         * lib/strftime.c (TYPE_SIGNED): Remove.
20219         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
20220         * lib/strtol.c: Adjust comments to match intprops.h.
20221         * lib/userspec.c: Include intprops.h.
20222         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
20223         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
20224         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
20225         instead of rolling our own expressions.
20226         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
20227
20228         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
20229         instead of int.
20230         (my_strftime): Do not mishandle years close to INT_MAX, by doing
20231         the right thing even if adding 1900 would overflow.  Similarly
20232         for tm_mon + 1 and tm_yday + 1.
20233         Make %Y always equivalent to %C%y, and similarly for %G and %g.
20234         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
20235         (DO_SIGNED_NUMBER): New macro.
20236         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
20237
20238 2005-03-07  Bruno Haible  <bruno@clisp.org>
20239
20240         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
20241
20242 2005-03-07  Bruno Haible  <bruno@clisp.org>
20243
20244         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
20245
20246 2005-03-04  Derek R. Price  <derek@ximbiot.com>
20247
20248         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
20249         (func_import): Only replace files via --import when they have actually
20250         changed.
20251
20252 2005-03-03  Derek R. Price  <derek@ximbiot.com>
20253
20254         * m4/mmap-anon.m4: New file.
20255         * m4/pagealign_alloc.m4: New file.
20256
20257 2005-03-03  Derek R. Price  <derek@ximbiot.com>
20258             Bruno Haible  <bruno@clisp.org>
20259
20260         * modules/pagealign_alloc: New file.
20261         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
20262
20263 2005-03-03  Derek R. Price  <derek@ximbiot.com>
20264             Bruno Haible  <bruno@clisp.org>
20265
20266         * lib/pagealign_alloc.h: New file.
20267         * lib/pagealign_alloc.c: New file.
20268
20269 2005-03-03  Bruno Haible  <bruno@clisp.org>
20270
20271         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
20272         Use an all-permissive copyright notice, recommended by RMS.
20273
20274 2005-03-02  Bruno Haible  <bruno@clisp.org>
20275
20276         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
20277         of AIX, the replacement has to be done only after <string.h> is
20278         included, therefore not in config.h. stpncpy.h does the replacement,
20279         and stpncpy.c uses it.
20280
20281 2005-03-02  Bruno Haible  <bruno@clisp.org>
20282
20283         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
20284         stpncpy.c uses it.
20285
20286 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
20287
20288         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
20289         The workaround isn't strictly needed for POSIX conformance, and
20290         it's too much of a pain to configure and maintain.  We'll ask
20291         people to fix their kernels instead.
20292         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
20293         (NANOSLEEP_BUG_WORKAROUND): Remove.
20294         (xnanosleep): Remove the workaround.
20295
20296 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
20297
20298         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
20299         Reported by Derek Price.
20300         (Include): Add "timespec.h".
20301
20302         * modules/xnanosleep (Depends-on): Remove gethrxtime.
20303
20304 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
20305
20306         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
20307         to detect nanosleep bug.
20308
20309 2005-03-01  Bruno Haible  <bruno@clisp.org>
20310
20311         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
20312
20313 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
20314
20315         * modules/gethrxtime: New file.
20316         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
20317         (Depends-on): Add gethrxtime.
20318         (configure.ac): Add gl_XNANOSLEEP.
20319         (Makefile.am): Remove lib_SOURCES line.
20320
20321 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
20322
20323         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
20324         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
20325
20326 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
20327
20328         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
20329         * lib/timespec.h (gettime): Return void, since it always
20330         succeeds now.  All uses changed.
20331         * lib/gettime.c (gettime) Likewise.
20332         [HAVE_NANOTIME]: Prefer nanotime.
20333         Assume gettimeofday succeeds, as POSIX requires.
20334         Assime time () succeeds, since other code already does.
20335         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
20336         (timespec_subtract): Remove.
20337         (NANOSLEEP_BUG_WORKAROUND): New constant.
20338         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
20339         things considerably.  Use it only on GNU/Linux hosts, since the
20340         workaround shouldn't be needed elsewhere.
20341
20342 2005-02-24  Bruno Haible  <bruno@clisp.org>
20343
20344         * modules/gettext (Files): Add m4/glibc2.m4.
20345
20346 2005-02-24  Bruno Haible  <bruno@clisp.org>
20347
20348         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
20349         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
20350         * m4/progtest.m4:
20351         Update from GNU gettext 0.14.2.
20352         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
20353
20354 2005-02-24  Bruno Haible  <bruno@clisp.org>
20355
20356         * lib/localcharset.c: Update from GNU gettext 0.14.2.
20357         * lib/config.charset: Update from GNU gettext 0.14.2.
20358
20359 2005-02-24  Bruno Haible  <bruno@clisp.org>
20360
20361         * lib/gettext.h: Update from GNU gettext 0.14.2.
20362
20363 2005-02-23  Simon Josefsson  <jas@extundo.com>
20364
20365         * m4/iconvme.m4: New file.
20366
20367 2005-02-23  Jim Meyering  <jim@meyering.net>
20368
20369         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
20370         change.
20371         Thanks to Bruno Haible for catching it.
20372
20373 2005-02-22  Simon Josefsson  <jas@extundo.com>
20374
20375         * modules/iconvme: New file.
20376
20377         * MODULES.html.sh: Add iconvme.
20378
20379 2005-02-22  Simon Josefsson  <jas@extundo.com>
20380
20381         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
20382
20383 2005-02-22  Simon Josefsson  <jas@extundo.com>
20384
20385         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
20386
20387 2005-02-22  Jim Meyering  <jim@meyering.net>
20388
20389         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
20390         s/ifndef/ifdef/.
20391
20392 2005-02-20  Neil Conway  <neilc@samurai.com>
20393
20394         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
20395         returned by OSX/Darwin if the specified buffer is not large
20396         enough for the hostname.
20397
20398 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20399
20400         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
20401         pass it to _help, otherwise the latter coredumps trying to
20402         dereference state.root_argp.
20403
20404 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
20405
20406         * modules/chdir-long (Depends-on): Add memrchr.
20407         * modules/memrchr (Files): Add lib/memrchr.h.
20408         (Include): "memrchr.h".
20409
20410 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
20411
20412         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
20413
20414 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
20415
20416         * lib/memrchr.h: New file.
20417         * lib/chdir-long.c: Include it.
20418         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
20419         Don't bother including stddef.h.
20420
20421 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
20422
20423         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
20424         inclusion.
20425         Include <sys/types.h>, for dev_t.
20426         (ME_DUMMY, ME_REMOTE): Move from here....
20427         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
20428         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
20429         Dmitry V. Levin.
20430         Include mountlist.h first, to test the interface.
20431
20432 2005-01-29  Bruno Haible  <bruno@clisp.org>
20433
20434         * lib/progname.c (program_name): Initialize.
20435         Needed when linking statically on MacOS X.
20436
20437 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
20438
20439         Sync from coreutils.
20440         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
20441         (Depends-on): Add c-strtod.
20442         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
20443
20444 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
20445
20446         Sync from coreutils.
20447         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
20448
20449         Remove files that are specific to coreutils.
20450         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
20451
20452 2005-01-28  Bruno Haible  <bruno@clisp.org>
20453
20454         * modules/javacomp: New file.
20455         * MODULES.html.sh (Java): Add javacomp.
20456
20457 2005-01-28  Bruno Haible  <bruno@clisp.org>
20458
20459         * m4/javacomp.m4: New file, from GNU gettext.
20460
20461 2005-01-28  Bruno Haible  <bruno@clisp.org>
20462
20463         * lib/javacomp.sh.in: New file, from GNU gettext.
20464         * lib/javacomp.h: New file, from GNU gettext.
20465         * lib/javacomp.c: New file, from GNU gettext.
20466
20467 2005-01-26  Simon Josefsson  <jas@extundo.com>
20468
20469         * lib/gai_strerror.c: Use GPL in header.
20470
20471 2005-01-26  Bruno Haible  <bruno@clisp.org>
20472
20473         * modules/javaexec: New file.
20474         * MODULES.html.sh (Java): Add javaexec.
20475
20476 2005-01-26  Bruno Haible  <bruno@clisp.org>
20477
20478         * m4/javaexec.m4: New file, from GNU gettext.
20479
20480 2005-01-26  Bruno Haible  <bruno@clisp.org>
20481
20482         * lib/javaexec.sh.in: New file, from GNU gettext.
20483         * lib/javaexec.h: New file, from GNU gettext.
20484         * lib/javaexec.c: New file, from GNU gettext.
20485
20486 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20487
20488         * modules/lchown (Depends-on): Remove lchown.h
20489
20490 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20491
20492         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
20493         must be defined if the header file was not found, in order
20494         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
20495
20496 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20497
20498         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
20499         initializers for struct pentry_state.
20500         (__argp_error): Check return value of __asprintf
20501         (__argp_failure): Translate error message
20502
20503         * lib/argp-parse.c: Removed braces around the expansion of N_()
20504
20505 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
20506
20507         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
20508         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
20509         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
20510         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
20511         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
20512         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
20513         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
20514         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
20515         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
20516         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
20517         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
20518         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
20519         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
20520         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
20521         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
20522         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
20523         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
20524         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
20525         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
20526         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
20527         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
20528         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
20529         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
20530         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
20531         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
20532         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
20533         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
20534         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
20535         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
20536         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
20537         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
20538         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
20539         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
20540         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
20541         xstrtol.m4, xstrtoumax.m4, yesno.m4:
20542         Use an all-permissive copyright notice, recommended by RMS.
20543
20544 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
20545
20546         * modules/chdir-long (Depends-on): Remove mempcpy.
20547
20548 2005-01-21  Jim Meyering  <jim@meyering.net>
20549
20550         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
20551         same value as for Solaris 9.
20552
20553         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
20554         component length.  This included changing the parameter to be
20555         of type `char *' rather than `char const *'.
20556         * lib/chdir-long.h (chdir_long): Update prototype.
20557
20558         * lib/openat.c (fdopendir, fstatat): New functions.
20559         * lib/openat.h: Include headers required for use of DIR and struct
20560         stat.
20561         [AT_SYMLINK_NOFOLLOW]: Define.
20562         (fdopendir, fstatat): Add prototypes.
20563
20564 2005-01-21  Bruno Haible  <bruno@clisp.org>
20565
20566         * modules/classpath: New file.
20567         * MODULES.html.sh (Java): Add classpath.
20568
20569 2005-01-21  Bruno Haible  <bruno@clisp.org>
20570
20571         * lib/classpath.h: New file, from GNU gettext.
20572         * lib/classpath.c: New file, from GNU gettext.
20573
20574 2005-01-20  Simon Josefsson  <jas@extundo.com>
20575
20576         * modules/version-etc-fsf: New file.
20577
20578 2005-01-20  Simon Josefsson  <jas@extundo.com>
20579
20580         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
20581         * lib/version-etc.c: Remove version_etc_copyright.
20582         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
20583         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
20584
20585 2005-01-20  Simon Josefsson  <jas@extundo.com>
20586
20587         * lib/base64.h (isbase64): Add.
20588
20589         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
20590         using a unsigned prototype, don't inline.
20591         (base64_decode): Use it.
20592
20593 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
20594
20595         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
20596         it.
20597
20598 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
20599
20600         * lib/save-cwd.c (save_cwd): Remove code to support the case
20601         where fchdir is missing or flaky.
20602
20603 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
20604
20605         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
20606
20607 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
20608
20609         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
20610         AC_LIBSOURCES now does this.
20611         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
20612         with new ullong_max module.
20613
20614 2005-01-19  Bruno Haible  <bruno@clisp.org>
20615
20616         * modules/sh-quote: New file.
20617         * MODULES.html.sh (Executing programs): Add sh-quote.
20618
20619 2005-01-19  Bruno Haible  <bruno@clisp.org>
20620
20621         * lib/sh-quote.h: New file, from GNU gettext.
20622         * lib/sh-quote.c: New file, from GNU gettext.
20623
20624 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
20625
20626         Merge from coreutils.
20627         * m4/ullong_max.m4: New file.
20628         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
20629         (gl_MACROS): Assume localeconv exists.
20630
20631 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
20632
20633         Merge changes from coreutils, as described below in several
20634         changelogs dated today.
20635
20636         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
20637         (O_DIRECTORY): Remove; not needed here, since "." must be
20638         a directory.  All uses removed.
20639         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
20640         universal on Suns, and we also need to test for IRIX.
20641         Revamp code to use 'if' rather than '#if'.
20642         Avoid unnecessary comparison of cwd->desc to 0.
20643
20644         * lib/utimens.c (futimens): Robustify the previous patch, by checking
20645         for known valid error numbers rather than observed invalid ones.
20646
20647 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
20648
20649         * modules/ullong_max: New file.
20650
20651         * modules/chdir-long, modules/openat: New files.
20652         * modules/save-cwd (Depends-on): Depend on chdir-long.
20653         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
20654
20655 2005-01-18  Jim Meyering  <jim@meyering.net>
20656
20657         Merge from coreutils.
20658         * m4/chdir-long.m4, m4/openat.m4: New files.
20659         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
20660         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
20661         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
20662         is sane and DOES follow symlinks.  Besides, testing 20 different
20663         systems found no broken chown implementations.
20664         Prompted by a change in rsync's copy of this macro.
20665         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
20666
20667         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
20668
20669         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
20670         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
20671         NULL-means-set-to-current-time semantics.
20672         Remove temporary file immediately, rather than waiting
20673         for configure's at-exit trap code to do it.
20674
20675 2005-01-18  Jim Meyering  <jim@meyering.net>
20676
20677         * lib/version-etc.c (version_etc_copyright): Update copyright date.
20678
20679         * lib/utimens.c (futimens): Account for the fact that futimes
20680         can also fail with errno == ENOSYS or errno == ENOENT.
20681         Patch from Dmitry V. Levin.
20682
20683         Change the name of the robust chdir function from chdir to chdir_long.
20684         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
20685         (restore_cwd): Use chdir_long, not chdir.
20686         * lib/chdir-long.c: Renamed from chdir.c.
20687         * lib/chdir-long.h: Renamed from chdir.h.
20688         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
20689         Hurd.
20690
20691 2005-01-18  Bruno Haible  <bruno@clisp.org>
20692
20693         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
20694         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
20695         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
20696         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
20697         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
20698         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
20699         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
20700         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
20701         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
20702         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
20703         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
20704         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
20705         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
20706         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
20707         Use an all-permissive copyright notice, recommended by RMS.
20708
20709 2005-01-18  Bob Proulx  <bob@proulx.com>
20710
20711         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
20712         simplify offsetof() macro construct to avoid compile failure with
20713         native HP-UX 11.0 ANSI C compiler.
20714
20715 2005-01-17  Bruno Haible  <bruno@clisp.org>
20716
20717         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
20718         redundant because stpncpy.m4 takes care of it.
20719
20720 2005-01-17  Bruno Haible  <bruno@clisp.org>
20721
20722         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
20723
20724 2005-01-17  Bruno Haible  <bruno@clisp.org>
20725
20726         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
20727         used.
20728
20729 2005-01-17  Bruno Haible  <bruno@clisp.org>
20730
20731         * lib/fwriteerror.h (fwriteerror): Change specification to include
20732         fclose.
20733         * lib/fwriteerror.c: Include <stdbool.h>.
20734         (fwriteerror): At the end, close the file stream. Record whether
20735         stdout was already closed.
20736
20737 2005-01-17  Bruno Haible  <bruno@clisp.org>
20738
20739         * lib/execute.c (environ): Declare if needed.
20740         * lib/pipe.c (environ): Likewise.
20741         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
20742
20743 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20744
20745         * modules/argp: Depend on vsnprintf
20746
20747 2005-01-10  Jim Meyering  <jim@meyering.net>
20748
20749         * modules/closeout (Depends-on): Add atexit.
20750
20751 2005-01-06  Bruno Haible  <bruno@clisp.org>
20752
20753         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
20754
20755 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
20756
20757         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
20758         definitions to be after all include files, to avoid collisions.
20759         Problem reported by Bob Proulx.
20760
20761 2005-01-04  Jim Meyering  <jim@meyering.net>
20762
20763         Changes imported from coreutils.
20764         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
20765         as the mkstemp template, use a temporary directory and an
20766         8.3-friendly template to avoid trouble on systems like DJGPP.
20767         Reported by Juan M. Guerrero via Stepan Kasal.
20768         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
20769         close. Remove the temporary directory right away, rather than waiting
20770         for configure's at-exit trap code to do it.
20771         Suggestion from Stepan Kasal.
20772
20773 2005-01-01  Simon Josefsson  <jas@extundo.com>
20774
20775         * gnulib-tool: Print #include directives when --import'ing.
20776
20777 2004-12-28  Simon Josefsson  <jas@extundo.com>
20778
20779         * tests/test-base64.c: Include required header files.  Remove
20780         unused variables.
20781
20782 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
20783
20784         * modules/error (Depends-on): Remove gettext.
20785
20786 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
20787
20788         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
20789         not needed.  This removes a dependency on the gettext module.
20790         [defined _LIBC]: Do not include <libintl.h>; not needed.
20791
20792 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
20793
20794         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
20795         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
20796
20797 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
20798
20799         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
20800         HAVE_DECL_STRTOLD.
20801
20802 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
20803
20804         * modules/getdate (Depends-on): Remove alloca-opt.
20805
20806 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
20807
20808         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
20809
20810 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
20811
20812         * lib/argp-parse.c: Include <stddef.h>.
20813         (alignof, alignto): New macros.
20814         (parser_init): Don't assume that void * is aligned sufficiently
20815         for struct option.
20816
20817         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
20818         need to extend the stack.
20819         (YYINITDEPTH): New macro, so that the initial stack isn't overly
20820         large.
20821
20822 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20823
20824         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
20825
20826 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
20827
20828         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
20829         (2004-10-24) change.  Apparently this was a false alarm.
20830
20831         * modules/getdate: Depend on alloca-opt, not alloca.
20832
20833 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
20834
20835         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
20836         Remove now-obsolete comment about AIX.
20837         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
20838         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
20839         (YYMAXDEPTH): New macro.
20840
20841 2004-12-18  Simon Josefsson  <jas@extundo.com>
20842
20843         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
20844
20845 2004-12-18  Bruno Haible  <bruno@clisp.org>
20846
20847         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
20848
20849 2004-12-18  Bruno Haible  <bruno@clisp.org>
20850
20851         * lib/fatal-signal.c (fatal_signals): Make non-const.
20852         (init_fatal_signals): New function.
20853         (uninstall_handlers, install_handlers): Ignore signals that were set to
20854         SIG_IGN.
20855         (at_fatal_signal): Call init_fatal_signals.
20856         (init_fatal_signal_set): Likewise. Ignore signals that were set to
20857         SIG_IGN.
20858         Reported by Paul Eggert.
20859
20860 2004-12-18  Bruno Haible  <bruno@clisp.org>
20861
20862         * doc/alloca.texi: New file.
20863         * doc/alloca-opt.texi: New file.
20864
20865 2004-12-17  Jim Meyering  <jim@meyering.net>
20866
20867         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
20868         Otherwise, install-sh could exit with improper exit status when
20869         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
20870
20871 2004-12-16  Simon Josefsson  <jas@extundo.com>
20872
20873         * tests/test-base64.c: Add license.
20874
20875 2004-12-15  Stepan Kasal  <address@hidden>
20876
20877         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
20878
20879 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
20880
20881         * modules/getcwd (Files): Add m4/d-ino.m4.
20882         Suggested by Mark D. Baushke.
20883
20884 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
20885
20886         * lib/getdate.y (textint): New member "negative".
20887         (time_zone_hhmm): New function.
20888         Expect 14 shift-reduce conflicts, not 13.
20889         (o_colon_minutes): New rule.
20890         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
20891         (yylex): Set the "negative" member of signed numbers.
20892
20893 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
20894
20895         * doc/getdate.texi (Time of day items, Time zone items):
20896         Describe new formats +00:00, UTC+00:00.
20897
20898 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
20899
20900         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
20901         spurious "-l"s.  Problem reported by Stepan Kasal.
20902
20903 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
20904
20905         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
20906         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
20907
20908 2004-12-04  Simon Josefsson  <jas@extundo.com>
20909
20910         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
20911         Vandoorselaere <yoann@prelude-ids.org>.
20912
20913 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
20914
20915         Changes imported from coreutils.
20916         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
20917         exist.
20918         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
20919
20920 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
20921
20922         Changes imported from coreutils.
20923         * lib/hard-locale.c: Assume <locale.h> exists.
20924         Include "strdup.h".
20925         (GLIBC_VERSION): New macro.
20926         (hard_locale): Assume setlocale exists.
20927         Rewrite to avoid #ifdef.
20928         Use strdup rather than malloc + strcpy.
20929         * lib/human.c: Assume <locale.h> exists.
20930         (human_readable): Assume localeconv exists.
20931
20932 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
20933
20934         * modules/hard-locale (Depends-on): Add strdup.
20935
20936 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
20937
20938         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
20939         convert T2, not T.  (Imported from libc.)
20940
20941 2004-11-30  Simon Josefsson  <jas@extundo.com>
20942
20943         * modules/restrict (License): Change to LGPL.
20944
20945 2004-11-30  Simon Josefsson  <jas@extundo.com>
20946
20947         * m4/restrict.m4: Add copyright and copying conditions.
20948
20949 2004-11-30  Simon Josefsson  <jas@extundo.com>
20950
20951         * m4/base64.m4: New file.
20952
20953 2004-11-30  Simon Josefsson  <jas@extundo.com>
20954
20955         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
20956         base64.
20957
20958         * tests/test-base64.c: New file.
20959
20960         * modules/base64: New file.
20961
20962 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
20963
20964         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
20965         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
20966
20967         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
20968
20969 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
20970
20971         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
20972         (__getcwd.c): Don't restore errno; glibc doesn't.
20973         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
20974         first, falling back to our code only if its results look suspicious.
20975         Ensure that the resulting buffer is only as large as necessary.
20976
20977         * lib/readutmp.c: Include readutmp.h first.
20978         Include <errno.h>, since readutmp.h no longer does that.
20979         * lib/readutmp.h: Don't include <errno.h>,
20980         <sys/param.h>, <time.h>; not needed to establish interface.
20981         (errno): Remove decl.
20982         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
20983         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
20984         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
20985
20986 2004-11-28  Simon Josefsson  <jas@extundo.com>
20987
20988         * lib/base64.h, base64.c: New file.
20989
20990 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
20991
20992         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
20993
20994 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
20995
20996         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
20997         (Depends-on): Remove pathmax, same.  Add mempcpy.
20998         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
20999         (Makefile.am): Append getcwd.h to lib_SOURCES.
21000         (Include): Add getcwd.h.
21001         (Maintainer): Change from Jim Meyering to "all, glibc",
21002         since getdate now uses intended-for-glibc code.
21003         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
21004         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
21005
21006 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
21007
21008         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
21009         HP's ANSI C compiler.
21010         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
21011         Declaring int functions causes warnings on some modern systems and
21012         shouldn't be needed to compile on ancient ones.
21013         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
21014         defined.
21015
21016         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
21017         with the following changes.
21018         (__set_errno): Parenthesize properly.
21019         Include <stdbool.h>.
21020         (MIN, MAX, MATCHING_INO): New macros.
21021         (__getcwd): Define with prototype, not K&R form.
21022         Use heuristics to allocate default buffer on stack if possible.
21023         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
21024         behavior, and to avoid the PATH_MAX limit when computing
21025         ../../../../...
21026         Use MATCHING_INO to compare inode number to file.
21027         Check for arithmetic overflow in size calculations.
21028         Fix bug in reallocation of dot array that caused getcwd to fail
21029         on directories nested deeper than 75.
21030         Be more careful about saving errno on error.
21031         Do not use realloc; use only free+malloc, as this is a bit
21032         more flexible and avoids a needless copy operation.
21033         Do not inspect st_dev and st_ino for symbolic links; POSIX
21034         doesn't specify the latter.
21035         Check for closedir errors.
21036         Avoid needless casts.
21037         Use "#ifdef weak_alias" around weak_alias, to be like other
21038         glibc code.
21039         The following changes to getcwd.c have effect only when used in
21040         gnulib; they have no effect inside glibc proper.
21041         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
21042         as alloca isn't used.
21043         (alloca, __alloca): Likewise.
21044         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
21045         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
21046         unconditionally, as gnulib assumes C89 or better.
21047         Do not include <sys/param.h>.
21048         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
21049         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
21050         better.
21051         (NULL) [!defined NULL]: Remove; we assume C89 or better.
21052         Include <dirent.h> in a way that is compatible with modern Autoconf.
21053         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
21054         New macros, if not already defined.
21055         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
21056         Use "_LIBC", not "defined _LIBC", for consistency.
21057         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
21058         a mempcpy module.
21059         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
21060         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
21061         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
21062         credit only to Jim Meyering and adjust the copyright dates.
21063         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
21064         <stdlib.h>, <unistd.h>, "pathmax.h".
21065         Instead, include "xgetcwd.h" (first) and "getcwd.h".
21066         (INITIAL_BUFFER_SIZE): Remove.
21067         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
21068
21069 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
21070
21071         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
21072         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
21073         Use the _ONCE methods, for efficiency.
21074         Check for fcntl.h.  In test program, include <errno.h>
21075         and <fcntl.h> if available.  Remove old K&R cruft from
21076         test program.  Check for common errors in GNU/Linux,
21077         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
21078         don't do AC_LIBOBJ, as that's getcwd.m4's job.
21079         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
21080         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
21081         name accordingly.
21082         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
21083         accommodate new getcwd.c.
21084         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
21085         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
21086         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
21087         that's all we need now.
21088
21089 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21090
21091         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
21092         argp-parse.c depends on getopt internals, that means we should
21093         always use our getopt, to be on the safe side.
21094         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
21095         order not to spoil the result of an eventual previous invocation
21096         of gl_GETOPT_SUBSTITUTE.
21097
21098 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21099
21100         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
21101         redefinition warnings. To avoid them, include the defines
21102         in `#if !defined __need_getopt ... #endif'. The only place
21103         where __getopt_argv_const is used is in definitions
21104         of getopt_long and getopt_long_only below, which are as well
21105         protected by `#ifndef __need_getopt'.
21106         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
21107         __need_getopt after including <stdio.h> and <unistd.h> These
21108         headers might have defined it.
21109
21110 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
21111
21112         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
21113
21114 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
21115
21116         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
21117         (futimens): New function, which uses futimes if available.
21118         (futimens, utimens): Support timespec==NULL, with same semantics
21119         as utime and utimens.
21120         * lib/utimens.h (futimens): New decl.
21121
21122 2004-11-23  Jim Meyering  <jim@meyering.net>
21123
21124         * lib/getopt_.h: Remove trailing blanks.
21125
21126 2004-11-23  Jim Meyering  <jim@meyering.net>
21127
21128         * lib/__fpending.c: Add comment.
21129
21130 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
21131
21132         * modules/canonicalize (Depends-on): Add xreadlink.
21133         Problem reported by James Youngman.
21134
21135 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
21136
21137         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
21138         New macros.
21139         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
21140         optopt): Use them instead of invoking ## directly; otherwise, the
21141         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
21142
21143 2004-11-19  Bruno Haible  <bruno@clisp.org>
21144
21145         * lib/strtok_r.c: Move comments from here...
21146         * lib/strtok_r.h: ... to here.
21147
21148 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
21149
21150         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
21151         implementations that mishandle size_t overflow.
21152
21153 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
21154
21155         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
21156         might fail.  Problem reported by Yoann Vandoorselaere.
21157         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
21158         implementations that mishandle size_t overflow.
21159
21160 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
21161
21162         * modules/canon-host (Depends-on): Add strdup.
21163
21164 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
21165
21166         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
21167
21168 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
21169
21170         * lib/canon-host.c: Include "strdup.h".
21171         (canon_host): Use getaddrinfo if available, so that IPv6 works.
21172         Use strdup instead of malloc/strcpy to duplicate strings.
21173
21174         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
21175         (human_space_before_unit): New constant.
21176         * lib/human.c (human_readable): Support it.
21177
21178         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
21179         (xgetcwd): Set errno correctly when failing.
21180         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
21181         the failure is actually due to a PATH_MAX problem.
21182
21183         Further getopt changes to make it more likely that glibc will
21184         buy the changes back.
21185         * lib/getopt.c (POSIXLY_CORRECT): New constant.
21186         (getopt): Use it, so to preserve glibc semantic
21187         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
21188         when compiling for libc.
21189         * lib/getopt_.h (__getopt_argv_const): Bring it back.
21190         (getopt_long, getopt_long_only): Use it.
21191
21192         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
21193         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
21194         (getopt): Argv is now char * const *, as per standard.
21195         (_getopt_internal_r, _getopt_internal): Argv is now char **,
21196         not char *__getopt_argv_const *.
21197         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
21198         _getopt_long_only_r): Likewise.
21199         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
21200         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
21201         _getopt_long_r, _getopt_long_only_r): Likewise.
21202         * lib/getopt_.h (__getopt_argv_const): Remove.
21203         (getopt): Argv is now char * const *, as per standard.
21204
21205         * lib/getdate.y (tORDINAL): New token.
21206         (day, relunit): Allow it for relative times.
21207         (relative_time_table): Use tORDINAL for ordinals.
21208
21209 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
21210
21211         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
21212         Document that "second" isn't allowed as an ordinal number.
21213
21214 2004-11-16  Jim Meyering  <jim@meyering.net>
21215
21216         * modules/closeout (Depends-on): Add fpending.
21217
21218 2004-11-15  Jim Meyering  <jim@meyering.net>
21219
21220         * lib/closeout.c: Include "__fpending.h" once again.
21221         Include <stdbool.h>.
21222         (close_stdout): Don't fail just because stdout was closed initially,
21223         since some programs don't write to stdout in the normal course of
21224         operation (other than --version and --help), and we don't want this
21225         function to make e.g. `touch file >&-' fail.
21226         But do fail if it was closed and someone has tried to write to it.
21227         E.g., `printf foo >&-' must fail.
21228
21229 2004-11-13  Jim Meyering  <jim@meyering.net>
21230
21231         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
21232
21233 2004-11-12  Simon Josefsson  <jas@extundo.com>
21234
21235         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
21236         small doc fix is still pending.
21237
21238 2004-11-11  Simon Josefsson  <jas@extundo.com>
21239
21240         * modules/strtok_r: New file.
21241
21242         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
21243         strtok_r.
21244
21245 2004-11-11  Simon Josefsson  <jas@extundo.com>
21246
21247         * m4/strtok_r.m4: New file.
21248
21249         * m4/getopt.m4: Replace opterr.
21250
21251 2004-11-11  Simon Josefsson  <jas@extundo.com>
21252
21253         * lib/strtok_r.h, strtok_r.c: New file.
21254
21255 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
21256
21257         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
21258         of replacing opterr, getopt, etc.  This should handle the
21259         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
21260
21261 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
21262
21263         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
21264         we can stop lying to compilers about the constness of argv when we
21265         are compiled outside glibc.
21266         (getopt, getopt_long, getopt_long_only): Use it.
21267         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
21268         _getopt_internal, getopt): Likewise.
21269         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
21270         _getopt_long_only_r): Likewise.
21271         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
21272         _getopt_long_r, _getopt_long_only_r): Likewise.
21273
21274         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
21275         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
21276         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
21277         the other external symbols.
21278         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
21279         declaration, since the above renaming now works around collisions.
21280
21281 2004-11-11  Jim Meyering  <jim@meyering.net>
21282
21283         * lib/linebreak.c: Remove trailing blanks.
21284         * lib/alloca_.h: Likewise.
21285         * lib/acosl.c: Likewise.
21286         * lib/euidaccess.c: Likewise.
21287         * lib/allocsa.h: Likewise.
21288
21289 2004-11-10  Simon Josefsson  <jas@extundo.com>
21290
21291         * m4/getaddrinfo.m4: New file.
21292
21293 2004-11-10  Simon Josefsson  <jas@extundo.com>
21294
21295         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
21296
21297 2004-11-10  Simon Josefsson  <jas@extundo.com>
21298
21299         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
21300         getaddrinfo.
21301
21302         * modules/getaddrinfo: New file.
21303
21304 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
21305
21306         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
21307
21308 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
21309
21310         * lib/mktime.c (SHR): New macro, which is a portable
21311         substitute for >> that should work even on Crays.
21312         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
21313         Problem reported by Mark D. Baushke in
21314         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
21315         * lib/getdate.y (SHR): Likewise.
21316         (tm_diff): Use it.
21317         * lib/strftime.c (SHR): Likewise.
21318         (tm_diff): Use it.
21319         * lib/quotearg.c (struct quoting_options): Use unsigned int for
21320         quote_these_too, so that right shifts are well defined.  All uses
21321         changed.
21322
21323 2004-11-10  Jim Meyering  <jim@meyering.net>
21324
21325         Ensure that no close failure goes unreported.
21326         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
21327         return early when it seems there's nothing to flush.
21328         Don't include __fpending.h.
21329
21330 2004-11-10  Jim Meyering  <jim@meyering.net>
21331
21332         * modules/closeout (Depends-on): Remove fpending.
21333
21334 2004-11-10  Jim Meyering  <jim@meyering.net>
21335
21336         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
21337
21338 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
21339
21340         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
21341         gl_FUNC_STRFTIME.
21342         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
21343         and AC_REQUIRE when possible, to avoid duplicate checks.
21344         Check for <wchar.h>.
21345
21346 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
21347
21348         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
21349
21350 2004-11-09  Bruno Haible  <bruno@clisp.org>
21351
21352         * m4/sockpfaf.m4: New file.
21353
21354 2004-11-05  Bruno Haible  <bruno@clisp.org>
21355
21356         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
21357         Reported by Mark D. Baushke <mdb@cvshome.org>.
21358
21359 2004-11-04  Bruno Haible  <bruno@clisp.org>
21360
21361         2004-09-11  Bruno Haible  <bruno@clisp.org>
21362                 * allocsa.valgrind: New file.
21363         2004-02-06  Bruno Haible  <bruno@clisp.org>
21364                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
21365                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
21366                 Reported by Christopher Seip <chris.seip@hp.com>.
21367
21368 2004-11-04  Bruno Haible  <bruno@clisp.org>
21369
21370         * modules/allocsa (Files): Add lib/allocsa.valgrind.
21371         (Makefile.am): Distribute it.
21372
21373 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
21374
21375         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
21376         with errno == ERANGE if the buffer is too small.
21377         Problem reported by Mark D. Baushke.
21378
21379 2004-11-03  Albert Chin  <china@thewrittenword.com>
21380             Paul Eggert  <eggert@cs.ucla.edu>
21381
21382         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
21383         equivalent, substitute $ac_type for equivalent type rather than
21384         blindly using uint32_t *always* which won't work if uint32_t is not
21385         available.  Define _UINT32_T to work around typedef of uint32_t if
21386         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
21387         2.5.1.
21388
21389 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
21390
21391         * m4/jm-macros.m4: Sync from coreutils.
21392         (gl_MACROS): Check for mbrlen, for pathchk.
21393         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
21394
21395 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
21396
21397         * lib/xreadlink.c (MAXSIZE): New macro.
21398         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
21399         size does not exceed MAXSIZE.  Avoid cast.
21400         As suggested by Mark D. Baushke in
21401         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
21402         if readlink fails with buffer size just under MAXSIZE, try again
21403         with MAXSIZE.
21404
21405 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
21406
21407         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
21408
21409 2004-11-02  Derek R. Price  <derek@ximbiot.com>
21410         and  Paul Eggert  <eggert@cs.ucla.edu>
21411
21412         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
21413         (get_date): Overparenthesize to avoid GCC warning.
21414
21415 2004-11-02  Bruno Haible  <bruno@clisp.org>
21416
21417         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
21418         returns void.
21419
21420 2004-11-02  Bruno Haible  <bruno@clisp.org>
21421
21422         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
21423         function returns void.
21424
21425 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
21426
21427         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
21428         fflush_unlocked, flockfile, funlockfile, funlockfile,
21429         fputs_unlocked, putc_unlocked.
21430
21431 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
21432
21433         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
21434         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
21435         already declared.
21436
21437 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
21438
21439         * modules/getdate (Files): Add doc/getdate.texi.
21440         (Depends-on): Add setenv, xalloc.
21441
21442 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
21443
21444         * lib/getdate.y: Add support for TZ="foo" within a date string.
21445         Fix some bugs near time_t boundaries.  Reject dates with
21446         out-of-range components, e.g., "Sept 31".
21447         Include <stdlib.h>, "setenv.h", "xalloc.h".
21448         (ISDIGIT_LOCALE): Remove; unused.
21449         Note that the TZ and time functions used here are not reentrant.
21450         (mktime_ok, get_tz): New functions.
21451         (TZBUFSIZE): New constant.
21452         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
21453         This requires that we sometimes generate our own TZ="XXX..." setting.
21454
21455 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
21456
21457         * doc/getdate.texi: New file, from coreutils with modifications for
21458         the new TZ parsing.
21459
21460 2004-10-27  Derek R. Price  <derek@ximbiot.com>
21461
21462         * lib/mktime.c (not_equal_tm): Remove redundant check.
21463
21464 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
21465
21466         * modules/regex (lib_SOURCES): Add regex.c.
21467         Reported by James Youngman in
21468         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
21469
21470 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
21471
21472         * lib/getdate.y: Use Bison 1.875 features, and some minor
21473         code cleanups.  This change does not affect semantics.
21474         Don't include <stdlib.h>; no longer needed.
21475         Don't include unlocked-io.h; only the "#if TEST" code uses
21476         stdio, and performance isn't crucial there.
21477         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
21478         Bison 1.875 features as described below.
21479         All uses of "PC." replaced by "pc->".
21480         (YYSTYPE): Add a forward declaration.
21481         (yylex, yyerror): Use full prototypes in forward decls.
21482         Use "%pure-parser" rather than obsolescent "%pure_parser".
21483         Use %parse-param and %lex-param instead of obsolescent
21484         YYPARSE_PARAM and YYLEX_PARAM.
21485         (meridian_table, month_and_day_table, time_units_table,
21486         relative_time_table, time_zone_table, military_table,
21487         lookup_zone, lookup_word, get_date):
21488         Use NULL instead of 0 where appropriate.
21489         (to_hour): Avoid abort (), to avoid a dependency on
21490         stdlib.h.
21491         (yyerror, yylex): Now accepts parser_control * arg.
21492         (main) [TEST]: Use '\0' rather than 0 for char.
21493
21494 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
21495
21496         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
21497
21498 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
21499
21500         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
21501         It's now the caller's responsibility to handle the case where
21502         !HAVE_GETPAGESIZE && !defined getpagesize.
21503
21504         * lib/mktime.c (leapyear): Arg is long int, not int.
21505
21506 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
21507
21508         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
21509
21510 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
21511
21512         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
21513         missing.  Problem reported by James Youngman.
21514
21515 2004-10-16  Simon Josefsson  <jas@extundo.com>
21516
21517         * gnulib-tool: Fix comments.  Fix parse problem.
21518         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
21519
21520 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
21521
21522         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
21523         implementation of getopt_long.  Problem reported by Alexander Taler in:
21524         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
21525
21526 2004-10-15  Bruno Haible  <bruno@clisp.org>
21527
21528         * gnulib-tool: Untabify. Initialize supplied_libname.
21529         (func_usage): More homogenous output.
21530         (func_modules_transitive_closure, func_modules_to_filelist,
21531         func_emit_lib_Makefile_am): New functions.
21532         (func_import): New function, extracted from big case statement. Use
21533         func_get_license, func_modules_transitive_closure,
21534         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
21535         opt_lgpl. Don't use test -a, as it's not portable.
21536         (func_create_testdir): Use func_modules_transitive_closure,
21537         func_modules_to_filelist, func_emit_lib_Makefile_am.
21538
21539 2004-10-15  Bruno Haible  <bruno@clisp.org>
21540
21541         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
21542
21543 2004-10-15  Bruno Haible  <bruno@clisp.org>
21544
21545         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
21546         the portions belonging to each module.
21547         Suggested by Derek Robert Price <derek@ximbiot.com>.
21548
21549 2004-10-12  Simon Josefsson  <jas@extundo.com>
21550
21551         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
21552         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
21553         to real functions.
21554
21555 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21556
21557         * modules/vsnprintf: New file.
21558
21559 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21560
21561         * m4/vsnprintf.m4: New file.
21562
21563 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21564
21565         * lib/vsnprintf.h: New file.
21566         * lib/vsnprintf.c: New file.
21567
21568 2004-10-11  Bruno Haible  <bruno@clisp.org>
21569
21570         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
21571         vsnprintf.
21572
21573 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
21574
21575         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
21576
21577 2004-10-07  Bruno Haible  <bruno@clisp.org>
21578
21579         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
21580         fits into the provided buffer.
21581
21582 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
21583
21584         * lib/diacrit.c, diacrit.h: Add GPL notice.
21585
21586         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
21587         notice.
21588         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
21589         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
21590         This avoids a potential constant-folding bug.
21591
21592 2004-10-05  Bruno Haible  <bruno@clisp.org>
21593
21594         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
21595         for the declaration of strsep.
21596
21597 2004-10-05  Bruno Haible  <bruno@clisp.org>
21598
21599         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
21600
21601 2004-10-04  Simon Josefsson  <jas@extundo.com>
21602
21603         * modules/memmem: New file.
21604         * tests/test-memmem.c: New file.
21605         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
21606
21607 2004-10-04  Simon Josefsson  <jas@extundo.com>
21608
21609         * m4/memmem.m4: New file.
21610
21611 2004-10-04  Simon Josefsson  <jas@extundo.com>
21612
21613         * lib/memmem.h: New file.
21614         * lib/memmem.c: New file, taken from glibc.
21615
21616 2004-10-04  Simon Josefsson  <jas@extundo.com>
21617
21618         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
21619         '#ifdef USE_UNLOCKED_IO'.
21620
21621 2004-10-04  Simon Josefsson  <jas@extundo.com>
21622
21623         * config/srclist.txt: Add memmem from glibc.
21624
21625 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
21626
21627         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
21628
21629         * modules/argmatch, modules/argp, modules/closeout, modules/error,
21630         modules/exclude, modules/getdate, modules/getline,
21631         modules/getndelim2, modules/getpass, modules/getpass-gnu,
21632         modules/getusershell, modules/linebuffer, modules/md5,
21633         modules/mountlist, modules/posixtm, modules/readtokens,
21634         modules/readutmp, modules/regex, modules/sha1,
21635         modules/version-etc, modules/yesno:
21636         Remove dependency on unlocked-io.
21637
21638 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
21639
21640         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
21641
21642         * m4/unlocked-io.m4: Add copyright notice.
21643         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
21644
21645 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
21646
21647         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
21648         * lib/xmalloc.c (xmemdup): Likewise.
21649         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
21650         XFREE): Remove these long-obsolescent macros.
21651         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
21652         * lib/xstrdup.c: Remove.
21653
21654         * lib/regex.c (re_comp): Cast gettext return value to char *,
21655         Problem reported by Martin Neitzel via Mark D. Baushke.
21656
21657 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
21658
21659         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
21660         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
21661         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
21662         regex.c, sha1.c, version-etc.c, yesno.c:
21663         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
21664         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
21665         the includer's responsibility.
21666
21667         Sync from coreutils.
21668
21669         * lib/modechange.c (mode_compile): Don't decrement a pointer that
21670         points to the start of a string, as the C Standard says the
21671         resulting behavior is undefined.
21672
21673         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
21674         simple -> simple_backups, numbered_existing ->
21675         numbered_existing_backups, numbered -> numbered_backups
21676         to avoid shadowing problems.  All uses changed.
21677         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
21678         * lib/backupfile.c (check_extension, numbered_backup):
21679         Rename locals to avoid shadowing 'basename'.
21680         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
21681         once.
21682
21683         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
21684         * lib/.cvsignore: Add getopt.h.
21685
21686 2004-10-04  Bruno Haible  <bruno@clisp.org>
21687
21688         * modules/README: New file.
21689         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
21690         not a module.
21691
21692 2004-10-02  Jim Meyering  <jim@meyering.net>
21693
21694         * lib/dirfd.h, getpagesize.h: Add copyright notice.
21695
21696 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21697
21698         * modules/strsep: New file.
21699
21700 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21701
21702         * m4/strsep.m4: New file.
21703
21704 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21705
21706         * lib/strsep.h: New file.
21707         * lib/strsep.c: New file.
21708
21709 2004-10-01  Simon Josefsson  <jas@extundo.com>
21710
21711         * lib/snprintf.c (snprintf): Handle size==0.
21712
21713 2004-10-01  Simon Josefsson  <jas@extundo.com>
21714             Bruno Haible  <bruno@clisp.org>
21715
21716         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
21717         (snprintf): Declare 'args'.
21718
21719 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
21720
21721         * lib/snprintf.c: Remove comments as to why each header is needed.
21722
21723 2004-10-01  Bruno Haible  <bruno@clisp.org>
21724
21725         * MODULES.html.sh: Add strsep.
21726
21727 2004-09-30  Simon Josefsson  <jas@extundo.com>
21728
21729         * modules/snprintf: New file.
21730
21731 2004-09-30  Simon Josefsson  <jas@extundo.com>
21732
21733         * m4/snprintf.m4: New file.
21734
21735 2004-09-30  Simon Josefsson  <jas@extundo.com>
21736
21737         * lib/snprintf.h, lib/snprintf.c: New files.
21738
21739 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21740
21741         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
21742         (hol_entry_help): Never translate an empty string.
21743         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
21744         * lib/argp.h (OPTION_NO_TRANS): New option.
21745
21746 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
21747
21748         * modules/argp (Maintainer): Replace Simon Josefsson
21749         by Sergey Poznyakoff.
21750
21751 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
21752
21753         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
21754         changes merged back into glibc.
21755
21756 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
21757
21758         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
21759
21760 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
21761
21762         * lib/xvasprintf.c: Include xalloc.h.
21763         (xvasprintf): Use xalloc_die, not xmalloc_die.
21764
21765 2004-09-29  Bruno Haible  <bruno@clisp.org>
21766
21767         * modules/alloca-opt: New file, derived from modules/alloca.
21768         * modules/allocsa: Depend on alloca-opt instead of alloca.
21769         * modules/setenv: Likewise.
21770         * modules/vasnprintf: Likewise.
21771         * MODULES.html.sh: Add alloca-opt.
21772
21773 2004-09-28  Simon Josefsson  <jas@extundo.com>
21774
21775         * gnulib-tool: New parameter --lgpl, to asseert that modules are
21776         LGPL, and to replace license template from GPL to LGPL.
21777
21778 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
21779
21780         * modules/dummy: Change license to LGPL.
21781
21782 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
21783
21784         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
21785
21786 2004-09-24  Simon Josefsson  <jas@extundo.com>
21787
21788         * modules/minmax (License): Change from GPL to LGPL.
21789
21790 2004-09-23  Simon Josefsson  <jas@extundo.com>
21791
21792         * gnulib-tool (--import): Typo.
21793
21794 2004-09-23  Simon Josefsson  <jas@extundo.com>
21795
21796         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
21797
21798 2004-09-22  Bruno Haible  <bruno@clisp.org>
21799
21800         * modules/*: Add 'License' field.
21801         * gnulib-tool: Accept --extract-license option.
21802         (func_get_license): New function.
21803
21804 2004-09-21  Bruno Haible  <bruno@clisp.org>
21805
21806         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
21807         Reported by Simon Josefsson.
21808
21809 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
21810
21811         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
21812         gl_AC_TYPE_LONG_LONG.
21813
21814 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
21815
21816         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
21817
21818 2004-09-18  Simon Josefsson  <jas@extundo.com>
21819         and  Paul Eggert  <eggert@cs.ucla.edu>
21820
21821         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
21822         calls with autoreconf.  Define GL_LIB.
21823
21824 2004-09-14  Karl Berry  <karl@gnu.org>
21825
21826         * config/srclist.txt: unsync setenv.c, sigh.
21827
21828 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
21829
21830         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
21831         Problem reported by Bruno Haible in:
21832         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
21833
21834 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
21835
21836         * config/srclist.txt: Comment out argp-pvh.c.
21837
21838 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
21839
21840         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
21841         in case some system header has #define'd it.  Problem reported by
21842         Soeren D. Schulze in
21843         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
21844
21845 2004-09-09  Karl Berry  <karl@gnu.org>
21846
21847         * regex.[ch]: delete from the root.  These were supposed to be
21848                 synced with emacs cvs, but this has not happened for about
21849                 a year, and anyway nothing else uses emacs regex.[ch].
21850                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
21851                 lib/regex[.ch] is untouched.
21852
21853 2004-09-09  Bruno Haible  <bruno@clisp.org>
21854
21855         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
21856
21857 2004-09-09  Bruno Haible  <bruno@clisp.org>
21858
21859         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
21860         modifications.
21861         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
21862
21863 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
21864
21865         * modules/xvasprintf: New file.
21866         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
21867
21868 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
21869
21870         * lib/xvasprintf.h: New file.
21871         * lib/xvasprintf.c: New file.
21872         * lib/xasprintf.c: New file.
21873
21874 2004-09-08  Bruno Haible  <bruno@clisp.org>
21875
21876         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
21877
21878 2004-09-08  Bruno Haible  <bruno@clisp.org>
21879
21880         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
21881         length is > INT_MAX.
21882         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
21883         more.
21884
21885 2004-09-08  Bruno Haible  <bruno@clisp.org>
21886
21887         * lib/stdint_.h: New file, taken from GNU clisp.
21888
21889 2004-09-08  Bruno Haible  <bruno@clisp.org>
21890             Oskar Liljeblad  <oskar@osk.mine.nu>
21891
21892         * modules/stdint: New file.
21893         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
21894
21895 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
21896
21897         Import from coreutils.
21898         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
21899         strings on unbounded length.  alloca's performance benefits aren't
21900         that important here.
21901         (V_STRDUP): Remove.
21902         (parse_with_separator): New function, with most of the internals
21903         of the old parse_user_spec.  Allow user to omit both user and group,
21904         for compatibility with FreeBSD.
21905         Clone only the user name, not the entire spec.
21906         Do not set *uid, *gid unless entirely successful.
21907         Avoid memory leak in some failing cases.
21908         Fix regression for USER.GROUP reported by Dmitry V. Levin in
21909         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
21910         (parse_user_spec): Rewrite to use parse_with_separator.
21911
21912 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
21913
21914         * modules/userspec: Don't depend on alloca.
21915
21916 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
21917
21918         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
21919
21920 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
21921
21922         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
21923         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
21924         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
21925
21926 2004-08-16  Simon Josefsson  <jas@extundo.com>
21927
21928         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
21929         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
21930         Add --dry-run for --import.
21931         Let user provided command line parameters override configure.ac
21932         settings.
21933
21934 2004-08-12  Simon Josefsson  <jas@extundo.com>
21935
21936         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
21937         as discussed with Paul Eggert in threads rooted at
21938         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
21939         and
21940         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
21941         Before, the test was empty, and relied on ELIDE_CODE in source
21942         code.)
21943         (gl_PREREQ_GETOPT): New macro.
21944         (gl_GETOPT): Use them.
21945
21946 2004-08-12  Simon Josefsson  <jas@extundo.com>
21947
21948         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
21949         * lib/getopt_.h: Renamed from getopt.h.
21950
21951 2004-08-12  Simon Josefsson  <jas@extundo.com>
21952
21953         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
21954         Change default library name from libfoo to libgnu.
21955         Now, if you have a configure.ac that says:
21956                 gl_SOURCE_BASE(gl)
21957                 gl_M4_BASE(gl/m4)
21958                 gl_MODULES(error getopt etcetera)
21959                 gl_INIT
21960         you can import all you need by running:
21961                 ../gnulib/gnulib-tool --import
21962
21963         * modules/getopt (Files): Rename getopt.h to getopt_.h.
21964         (Makefile.am): Rewrite, use logic from argz.
21965         (Include): Use <getopt.h> instead of "getopt.h".
21966
21967 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
21968
21969         * modules/argp (Files): Add m4/unlocked-io.m4.
21970         (Depends-on): Add extensions.
21971
21972 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
21973
21974         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
21975         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
21976         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
21977         Check for program_invocation_name, program_invocation_short_name,
21978         flockfile, funlockfile, features.h, _getopt_long_only_r.
21979
21980 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
21981
21982         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
21983         its complicated substitute.
21984         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
21985         and program_invocation_name.
21986         (__argp_basename) [!_LIBC]: Remove; the only use was
21987         replaced by its body.
21988         (__argp_short_program_name): Change condition from
21989         !defined __argp_short_program_name to
21990         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
21991         to match argp-namefrob.h.
21992         (__argp_failure): Don't assume strerror_r returns char *.
21993         * lib/argp-parse.c (N_): Define unconditionally.
21994         (argp_default_options): Fill out initializers with 0 to avoid
21995         gcc warnings.
21996
21997 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
21998
21999         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
22000         getopt1.c.
22001
22002 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
22003
22004         Merge from coreutils.
22005
22006         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
22007
22008         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
22009         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
22010
22011 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
22012
22013         Merge from coreutils.
22014
22015         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
22016         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
22017         for Reliant Unix 5.43.
22018
22019         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
22020         (union fooround): Use uintmax_t, not long int.
22021         The rest is a merge from libc:
22022         [defined _LIBC]: Include <shlib-compat.h>.
22023         (_obstack) [defined _LIBC]: Remove after 2.3.4.
22024
22025         * lib/settime.c (settime): Recode to avoid warning with
22026         Sun Forte C 6U2.
22027
22028         * lib/strverscmp.c: Convert to UTF-8.
22029
22030 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
22031
22032         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
22033         m4/uintmax_t.m4.
22034
22035 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
22036
22037         * modules/xalloc-die: New file.
22038         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
22039
22040         * modules/md5 (Files): Add m4/uint32_t.m4.
22041         * modules/sha1: Renamed from modules/sha.
22042         (Files):
22043         Rename lib/sha.h to lib/sha1.h.
22044         Rename lib/sha.c to lib/sha1.c.
22045         Rename m4/sha.m4 to m4/sha1.m4.
22046         (lib_SOURCES): Likewise.
22047         (configure.ac): Rename gl_SHA to gl_SHA1.
22048         (Include): sha.h -> sha1.h.
22049
22050 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
22051
22052         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
22053         * m4/sha1.m4: Renamed from sha.m4.
22054         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
22055
22056 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
22057
22058         * lib/obstack.h (obstack_empty_p):
22059         Don't assume that chunk->contents is suitably aligned.
22060         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
22061         Likewise. Problem reported by Benno in
22062         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
22063
22064         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
22065         readable.  This could be improved further but it'd take some work.
22066
22067 2004-08-08  Simon Josefsson  <jas@extundo.com>
22068
22069         * modules/xgethostname (Depends-on): Remove exit and error (not
22070         used).
22071
22072         * modules/getpass-gnu: Add getpass.h.
22073         (Depends-on): Add stdbool.
22074         * modules/getpass: Add getpass.h.
22075
22076 2004-08-08  Simon Josefsson  <jas@extundo.com>
22077
22078         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
22079         Check getpass declaration.
22080
22081 2004-08-08  Simon Josefsson  <jas@extundo.com>
22082
22083         * lib/xgethostname.c: Don't include error.h (not used).
22084
22085         * lib/getpass.h: Add.
22086         * lib/getpass.c: Include getpass.h first.
22087
22088 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
22089
22090         * lib/xalloc-die.c: New file.
22091         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
22092         All uses removed.
22093         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
22094         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
22095         xalloc-die.c.
22096         (_, N_, xalloc_die): Move to xalloc-die.c.
22097         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
22098         so that we needn't mess with xalloc_msg_memory_exhausted.
22099
22100         * lib/sha1.h: Renamed from sha.h.
22101         (SHA1_H): Renamed from _SHA_H.
22102         (sha1_ctx): Renamed from sha_ctx.
22103         (sha1_init_ctx): Renamed from sha_init_ctx.
22104         (sha1_process_block): Renamed from sha_process_block.
22105         (sha1_process_bytes): Renamed from sha_process_bytes.
22106         (sha1_finish_ctx): Renamed from sha_finish_ctx.
22107         (sha1_read_ctx): Renamed from sha_read_ctx.
22108         (sha1_stream): Renamed from sha_stream.
22109         (sha1_buffer): Renamed from sha_buffer.
22110         * lib/sha1.c: Likewise; renamed from sha.c.
22111         Do not include <sys/types.h>.
22112         Include <stddef.h> rather than <stdlib.h>.
22113
22114 2004-08-08  Bruno Haible  <bruno@clisp.org>
22115
22116         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
22117         FILESYSTEM_PREFIX_LEN.
22118         * lib/progreloc.c: Likewise.
22119         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
22120
22121 2004-08-06  Simon Josefsson  <jas@extundo.com>
22122
22123         * modules/progname (Depends-on): Don't depend on stdbool.
22124
22125 2004-08-06  Simon Josefsson  <jas@extundo.com>
22126
22127         * modules/getsubopt: New file.
22128         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
22129         getsubopt.
22130
22131 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
22132
22133         More merge from coreutils.
22134
22135         * m4/utimens.m4, m4/utimecmp.m4: New files.
22136         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
22137         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
22138         prereq.m4, sha.m4: Import changes from coreutils.
22139
22140 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
22141
22142         More merge from coreutils.
22143         * modules/raise, modules/readtokens0, modules/utimens:
22144         * modules/utimecmp, module/xnanosleep: New files.
22145         * modules/strftime: Add lib/strftime.h.
22146         Change include from <time.h> to "strftime.h".
22147         * modules/yesno: Add lib/yesno.h.
22148         * modules/backupfile: Remove lib/addext.c.
22149         * modules/euidaccess: Add stat-macros.h.
22150         * modules/canonicalize, modules/euidaccess,
22151         modules/filemode, modules/lchown, modules/makepath,
22152         modules/rmdir, modules/stat: Likewise.
22153
22154 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
22155
22156         Merge from tar.
22157         * lib/argp-help.c (make_hol, hol_append): Don't assume that
22158         SIZE_MAX is a valid preprocessor constant.
22159         (__argp_basename): Change from "#ifndef _LIBC"
22160         to "#ifndef __argp_short_program_name", so that
22161         we don't compile these functions for tar.
22162
22163         More merges from coreutils.
22164         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
22165         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
22166         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
22167         * lib/addext.c: Remove; no longer needed.
22168         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
22169         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
22170         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
22171         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
22172         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
22173         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
22174         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
22175         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
22176         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
22177         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
22178         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
22179         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
22180         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
22181         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
22182         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
22183         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
22184         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
22185         Import changes from coreutils.
22186
22187 2004-08-05  Simon Josefsson  <jas@extundo.com>
22188
22189         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
22190
22191 2004-08-05  Simon Josefsson  <jas@extundo.com>
22192
22193         * m4/getsubopt.m4: New file.
22194
22195 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
22196
22197         Merge from coreutils.
22198
22199         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
22200         * m4/getcwd-path-max.m4: New files.
22201
22202         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
22203         FILESYSTEM_PREFIX_LEN ->
22204         FILE_SYSTEM_PREFIX_LEN.
22205         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
22206         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
22207         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
22208         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
22209
22210         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
22211         prerequisite modules now handle the DOS stuff.
22212         Don't check for unistd.h.
22213
22214 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
22215
22216         Merge from coreutils.
22217
22218         * lib/.gdb-history: Remove; this doesn't belong here.
22219
22220         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
22221         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
22222         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
22223         * lib/getcwd.c: New files.
22224
22225         * lib/dirname.h: Include <stdbool.h>.
22226         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
22227         for consistency with POSIX terminology.  All uses changed.
22228         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
22229         (strip_trailing_slashes): Use bool for booleans.
22230         * lib/stripslash.c (strip_trailing_slashes): Likewise.
22231
22232         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
22233         sometimes returns a positive errno value even when it succeeds.
22234         (print_errno_message) [!LIBC]: Fall back on strerror if
22235         __strerror_r fails.
22236
22237         * lib/path-concat.c (mempcpy): Don't define if a system header defines
22238         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
22239         (longest_relative_suffix): New function.
22240         (path_concat): Use it.  Assume first argument is not NULL.
22241         Port to DOS.  Omit redundant separators.
22242         Report an error instead of returning NULL.
22243         Use mempcpy instead of memcpy.
22244         (xpath_concat): Remove: not declared or used.
22245
22246         * lib/same.h: Include <stdbool.h>
22247         (same_name): Return bool, not int.
22248         * lib/same.c (same_name): Likewise.
22249         (errno): Don't declare; we assume C89 or better now.
22250
22251         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
22252         if not already defined.
22253
22254         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
22255         * lib/dup-safer.c (errno): Likewise.
22256
22257 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
22258
22259         Merge from coreutils.
22260         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
22261         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
22262         * modules/path-concat: Don't depend on strdup.
22263
22264 2004-08-03  Simon Josefsson  <jas@extundo.com>
22265
22266         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
22267         * lib/progname.h: Don't include stdbool.h.
22268
22269 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
22270
22271         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
22272         * MODULES.html.sh (func_all_modules): Remove fatal.
22273
22274 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
22275
22276         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
22277
22278 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
22279
22280         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
22281         working.
22282
22283 2004-08-02  Simon Josefsson  <jas@extundo.com>
22284
22285         * lib/getsubopt.h: New file, with comments from Bruno Haible.
22286         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
22287         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
22288
22289 2004-08-01  Simon Josefsson  <jas@extundo.com>
22290
22291         * lib/xgetdomainname.c: Include stdlib.h, for free().
22292
22293 2004-07-19  Bruno Haible  <bruno@clisp.org>
22294
22295         * MODULES.html.sh (func_all_modules): Add dummy.
22296
22297 2004-07-16  Simon Josefsson  <jas@extundo.com>
22298
22299         * modules/dummy: New file.
22300
22301 2004-07-16  Simon Josefsson  <jas@extundo.com>
22302
22303         * lib/dummy.c: New file.
22304
22305 2004-07-16  Bruno Haible  <bruno@clisp.org>
22306
22307         * lib/backupfile.h: Add extern "C" for C++.
22308         * lib/closeout.h: Likewise.
22309         * lib/copy-file.h: Likewise.
22310         * lib/findprog.h: Likewise.
22311         * lib/full-write.h: Likewise.
22312         * lib/pathname.h: Likewise.
22313         * lib/progname.h: Likewise.
22314         * lib/stpcpy.h: Likewise.
22315         * lib/stpncpy.h: Likewise.
22316         * lib/strcase.h: Likewise.
22317         * lib/strstr.h: Likewise.
22318         * lib/xalloc.h: Likewise.
22319
22320         * lib/mbswidth.h: Add extern "C" for C++.
22321         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
22322
22323 2004-07-13  Robert Millan  <robertmh@gnu.org>
22324
22325         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
22326
22327 2004-07-09  Simon Josefsson  <jas@extundo.com>
22328
22329         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
22330         failed without this.)
22331
22332 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
22333
22334         * modules/chown (Files): Add lib/fchown-stub.c, since
22335         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
22336
22337 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
22338
22339         * lib/fchown-stub.c: New file.
22340
22341 2004-06-24  Jim Meyering  <jim@meyering.net>
22342
22343         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
22344
22345 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
22346
22347         * modules/argz: Omit "#include".
22348
22349         * MODULES.html.sh (func_all_modules): Add calloc, to match
22350         2004-06-01 addition of calloc module.
22351
22352 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
22353
22354         * m4/argz.m4: New file, which is autoupdated from libtool.
22355
22356 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
22357
22358         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
22359         libtool.
22360
22361 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
22362
22363         * config/srclist-update: Don't insist on "USA." before the
22364         close-comment, as libtool omits the period and puts the */ on a
22365         separate line.
22366         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
22367         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
22368
22369 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
22370
22371         * modules/argz: New file.
22372         * MODULES.html.sh (func_all_modules): Add argz.
22373
22374 2004-06-12  Jim Meyering  <jim@meyering.net>
22375         and  Paul Eggert  <eggert@cs.ucla.edu>
22376
22377         * modules/hash (Files): Add lib/xalloc.h.
22378         * modules/pipe (Depends-on): Add wait-process.
22379         * modules/stat (Depends-on): Add xalloc.
22380         * modules/userspec (Files): Add lib/userspec.h.
22381         * modules/xstrto
22382
22383         Upgrade from gettext-0.13.
22384         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
22385         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
22386         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
22387
22388 2004-06-10  Jim Meyering  <jim@meyering.net>
22389
22390         * lib/calloc.c: New file.
22391
22392 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
22393
22394         * lib/getdate.y (yylex): Allow space between sign and number.
22395         Problem reported by Dan Jacobson.
22396
22397 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
22398
22399         Merge from coreutils CVS.
22400
22401         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
22402         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
22403         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
22404         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
22405         xstrtol.m4: Fix copyright date and/or serial number.
22406
22407         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
22408         See if we need an fchown replacement.
22409         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
22410         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
22411         and use the replacement function if we detect either defect.
22412
22413         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
22414         gl_UTIMECMP.
22415
22416 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
22417         and  Jim Meyering  <jim@meyering.net>
22418
22419         Merge from coreutils CVS.
22420
22421         * lib/stat-macros.h: New file, with contents from file-type.h
22422         and coreutils' system.h.
22423         * lib/file-type.c: Include "stat-macros.h".
22424         * lib/file-type.h (file_type): Move all macro definitions to new file,
22425         stat-macros.h.
22426
22427         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
22428         Wrap old code with this conditional.
22429         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
22430         function that does not dereference symlinks.
22431         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
22432
22433         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
22434         dependency problems.
22435         (xreadlink): Accept new arg SIZE, for efficiency.
22436         All decls and uses changed.
22437         * lib/xreadlink.h: Include <stddef.h>, for size_t.
22438
22439         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
22440         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
22441
22442         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
22443         sysexits.h.
22444
22445 2004-06-01  Jim Meyering  <jim@meyering.net>
22446
22447         * m4/calloc.m4: New file.
22448
22449 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
22450
22451         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
22452         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
22453         Also, fix a typo in a diagnostic.
22454
22455 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
22456
22457         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
22458         or AC_FUNC_REALLOC.
22459
22460 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
22461
22462         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
22463         macros to be defined.
22464         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
22465         the allocator returns NULL because the requested size is zero.
22466
22467 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
22468
22469         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
22470         var.  Add comment explaining why libc still defines it.  This
22471         merges the following patch from glibc:
22472         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
22473
22474 2004-05-20  Andreas Schwab  <schwab@suse.de>
22475
22476         * m4/free.m4: Replace free if it not known to work, not the other
22477         way round.
22478
22479 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
22480
22481         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
22482         present in glibc since revision 1.1 of this file.
22483         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
22484         obstack_alignment_mask, obstack_alloc, obstack_base,
22485         obstack_blank, obstack_blank_fast, obstack_chunk_size,
22486         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
22487         obstack_grow0, obstack_init, obstack_int_grow,
22488         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
22489         obstack_next_free, obstack_object_size, obstack_ptr_grow,
22490         obstack_ptr_grow_fast, obstack_room): Remove declarations of
22491         nonexistent functions.
22492
22493 2004-05-18  Karl Berry  <karl@gnu.org>
22494
22495         * config/srclist.txt: break link for vasnprintf.c.
22496
22497 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
22498
22499         Port obstack to the AS/400, where pointers are 16 bytes wide and
22500         you cannot cast an integer to a valid pointer.  This patch is
22501         currently waiting to be integrated into glibc; see
22502         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
22503
22504         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
22505         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
22506         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
22507         (struct obstack): temp member is now a union of a pointer and
22508         an integer, instead of an integer.  All integer uses changed.
22509         This does not affect the physical layout of struct obstack,
22510         except on hosts (like the AS/400) where the size or alignment of
22511         void * is greater than that of ptrdiff_t.
22512         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
22513         __STDC__)]: Store temporary in pointer member of union, not
22514         integer member.
22515         * lib/obstack.c: Include <stddef.h>, for offsetof.
22516         (struct fooalign): Remove; it doesn't need a name.
22517         (union fooround): Change double to long double, and add void *.
22518         (DEFAULT_ALIGNMENT): Use offsetof to compute.
22519         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
22520         not a macro.  Hence the values are always int; so remove all
22521         casts-to-int in uses.
22522
22523 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
22524
22525         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
22526         we can get this patch merged into glibc.
22527
22528 2004-05-17  Derek R. Price  <derek@ximbiot.com>
22529             Paul Eggert  <eggert@cs.ucla.edu>
22530
22531         * m4/argp: Depend on alloca.
22532
22533 2004-05-17  Derek R. Price  <derek@ximbiot.com>
22534             Paul Eggert  <eggert@cs.ucla.edu>
22535
22536         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
22537         freecoding.
22538
22539 2004-05-17  Bruno Haible  <bruno@clisp.org>
22540
22541         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
22542         precision that consists of a '.' followed by an empty digit string.
22543         Patch by Tor Lillqvist <tml@iki.fi>.
22544
22545 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
22546
22547         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
22548         for backward compatibility with older code.  We need our own
22549         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
22550         it under some other name, and our alloca.h will define it.
22551
22552 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
22553             Derek Price  <derek@ximbiot.com>
22554
22555         * lib/alloca.c: Include <alloca.h>, to get our interface.
22556         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
22557         include <alloca.h> first.  Use C89 prototype for alloca; this
22558         requires including <stddef.h> for size_t.  Use extern "C" if C++.
22559         Use #elif for simplicity, since we can assume C89 now.
22560         Don't try to source the system alloca.h since it will not be found
22561         and to prevent recursively including its replacement.
22562         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
22563         * lib/regex.c: Likewise.
22564
22565 2004-05-16  Derek Price  <derek@ximbiot.com>
22566             Paul Eggert  <eggert@cs.ucla.edu>
22567
22568         getline cleanup.  This changes the getndelim2 API: both order of
22569         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
22570         no delimiter).
22571
22572         * lib/getline.c: Don't include stddef.h or stdio.h, since our
22573         interface does that.
22574         (getline): Always use getdelim, so that we don't have two
22575         copies of this code.
22576         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
22577         if available.
22578         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
22579         (GETNDELIM2_MAXIMUM): New macro.
22580         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
22581         instead of the old practice of delim2==0.  All callers changed.
22582         Return -1 on overflow, instead of returning junk.
22583         Do not set *linesize unless allocation succeeds.
22584         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
22585         that we include sys/types.h.
22586         * lib/getnline.h: Likewise.
22587         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
22588         (getndelim2): Reorder arguments.
22589         * lib/getnline.c (getnline, getndelim):
22590         Don't discard the NMAX argument.
22591         (getnline): Invoke getndelim, to avoid code duplication.
22592         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
22593         of (size_t) -1 by callers of the getnline family.
22594
22595 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
22596
22597         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
22598         Check for gettimeofday.
22599         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
22600         Check for settimeofday, stime.
22601
22602 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
22603
22604         * lib/nanosleep.c (suspended): Change its type from int to
22605         sig_atomic_t volatile.
22606         (first_call): Make it private to rpl_nanosleep, and have it
22607         be zero initially as that's a bit faster.
22608         (my_usleep): Round up fractional times instead of truncating them,
22609         as this is the usual meaning for 'sleep'.
22610
22611         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
22612         doesn't work.
22613         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
22614         (ENOSYS): Define if not defined.
22615         (settime): Fall back on stime if it exists and settimeofday fails.
22616         But don't bother with fallbacks if a method fails with errno == EPERM.
22617
22618 2004-05-11  Jim Meyering  <jim@meyering.net>
22619
22620         Prior to this change, the save_cwd caller required read access to the
22621         current directory on most systems (ones with the fchdir function).
22622
22623         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
22624         fails, try write-only, and finally, resort to using xgetcwd.
22625
22626 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
22627
22628         * lib/obstack.c, obstack.h: Import changes from libc.
22629
22630 2004-04-28  Bruno Haible  <bruno@clisp.org>
22631
22632         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
22633         also implicitly appends .exe to executables.
22634         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
22635         accepts Windows pathnames.
22636         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
22637         Treat Cygwin like Windows, since it now accepts Windows pathnames.
22638         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
22639         Treat Cygwin like Windows, since it now accepts Windows pathnames.
22640         Reported by Derek Robert Price <derek@ximbiot.com>.
22641
22642 2004-04-21  Karl Berry  <karl@gnu.org>
22643
22644         * config/srclist.txt (localcharset.c): break sync.
22645
22646 2004-04-20  Paul Eggert  <eggert@twinsun.com>
22647
22648         * m4/host-os.m4: Add a copyright notice.
22649
22650 2004-04-20  Jim Meyering  <jim@meyering.net>
22651
22652         Change UTILS_ to gl_ in AC_DEFINE'd names.
22653         Change utils_- and jm_-prefixed variables, too.
22654         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
22655         UTILS_FUNC_MKDIR_TRAILING_SLASH.
22656         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
22657
22658         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
22659         Don't emit trailing blanks.
22660         Also rename jm_-prefixed variables to have gl_ prefix.
22661
22662         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
22663         Also rename jm_-prefixed variables to have gl_ prefix.
22664
22665         * m4/jm-macros.m4: Reflect the renamings.
22666         * m4/prereq.m4: Likewise.
22667
22668 2004-04-20  Jim Meyering  <jim@meyering.net>
22669
22670         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
22671         memory.
22672
22673 2004-04-20  Jim Meyering  <jim@meyering.net>
22674             Bruno Haible  <bruno@clisp.org>
22675
22676         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
22677         memory when realloc fails.
22678
22679 2004-04-19  Jim Meyering  <jim@meyering.net>
22680
22681         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
22682         now that readutmp.c may call `free (0)'.
22683
22684 2004-04-19  Bruno Haible  <bruno@clisp.org>
22685
22686         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
22687         * m4/inttypes_h.m4: Likewise.
22688         * m4/stdint_h.m4: Likewise.
22689         * m4/intmax_t.m4: Likewise.
22690         * m4/uintmax_t.m4: Likewise.
22691
22692 2004-04-18  Jim Meyering  <jim@meyering.net>
22693
22694         * m4/prereq.m4: Don't forbid jm_ prefix.
22695
22696         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
22697         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
22698         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
22699         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
22700         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
22701         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
22702         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
22703         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
22704         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
22705         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
22706         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
22707         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
22708         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
22709         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
22710         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
22711         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
22712         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
22713         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
22714         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
22715
22716 2004-04-18  Jim Meyering  <jim@meyering.net>
22717
22718         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
22719         failure, don't leak memory and do call END_UTMP_ENT.
22720
22721 2004-04-16  Jim Meyering  <jim@meyering.net>
22722
22723         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
22724         coreutils' stat program.
22725         (gl_PREREQ): Don't require jm_PREREQ_STAT.
22726
22727 2004-04-11  Paul Eggert  <eggert@twinsun.com>
22728
22729         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
22730         C89.
22731         (CHAR_BIT): Remove, since we assume C89.
22732         Include <stdint.h> if available, as per current Autoconf CVS advice.
22733
22734 2004-03-31  Jim Meyering  <jim@meyering.net>
22735
22736         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
22737         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
22738         * m4/xalloc.m4: Likewise.
22739
22740 2004-03-30  Paul Eggert  <eggert@twinsun.com>
22741
22742         Merge from coreutils.
22743
22744         * m4/inttostr.m4: New file.
22745         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
22746         Require AM_STDBOOL_H and gl_TIMESPEC instead.
22747         Require gl_CLOCK_TIME.
22748         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
22749
22750 2004-03-30  Paul Eggert  <eggert@twinsun.com>
22751
22752         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
22753         not bool, to be more consistent with Unix conventions.
22754         Suggested by Bruno Haible.
22755
22756         Merge from coreutils.
22757
22758         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
22759         * lib/umaxtostr.c: New files.
22760
22761         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
22762         the usual <time.h> dance.
22763         (get_date): Change signature to support fractional time stamps.
22764         All callers changed.
22765         * lib/getdate.y: Include "getdate.h" first, as we can now
22766         assume C89 and don't need to worry about 'const'.
22767         Similarly, include "unlocked-io.h" near start, not in middle.
22768         Include <limits.h>.
22769         (textint.value): Use long int rather than int.
22770         (textint.digits): Use size_t rather than int.
22771         (BILLION, LOG10_BILLION): New constants.
22772         (parser_control): New member rel_ns.  Members day_ordinal,
22773         time_zone, month, day, hour, minutes, rel_year, rel_month,
22774         rel_day, rel_hour, rel_minutes, rel_seconds
22775         are now long int, not int.  Member seconds is now struct timespec,
22776         not int.  New member timespec_seen.  Members dates_seen, days_seen,
22777         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
22778         not int.
22779         (%union.intval): Now long int, not int.
22780         New member timespec.
22781         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
22782         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
22783         (spec): Now is a timespec or an item list.
22784         (timespec, items): New nonterminals.
22785         (time, rel, relunit, number, get_date):
22786         Add support for fractional seconds.
22787         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
22788         (gmtime, localtime, mktime): Remove decls; not needed with C89.
22789         (to_hour): First arg is now long int, not int.
22790         (to_year): Returns long int, not int.
22791         Don't treat year -70 like 70.
22792         (tm_diff): Returns long int, not int.
22793         (lookup_word): Use bool instead of int when appropriate.
22794         (yylex): Use size_t for count, not int.
22795         Detect overflow when parsing large integer constants.
22796         Add support for fractions.
22797         (get_date): Make pointers 'const' if possible.
22798         Use more-portable code to detect integer overflow.
22799         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
22800         Don't use ctime; it's not reliable if the year has >4 digits.
22801
22802         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
22803         This is for compatibility with BSD.
22804
22805         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
22806         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
22807         From coreutils' system.h.
22808
22809         * lib/userspec.c: Don't include "posixver.h".
22810         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
22811         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
22812         compatible extension.  Simplify code by removing a boolean int
22813         that was always nonzero if a string was nonnull.
22814
22815 2004-03-30  Jim Meyering  <jim@meyering.net>
22816
22817         Merge from coreutils.
22818
22819         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
22820         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
22821         on some systems one must include <grp.h> before it.
22822         Reported by Christian Krackowizer.
22823
22824 2004-03-30  Jim Meyering  <jim@meyering.net>
22825
22826         Merge from coreutils.
22827
22828         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
22829
22830         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
22831         an empty input stream.
22832
22833         * lib/readtokens.c: Include <stdbool.h>.
22834         (readtoken): Use `size_t' rather than int/long.
22835         All callers adjusted.
22836         Use `bool' rather than `int' where appropriate.
22837         Use memset rather than an explicit loop.
22838         Use x2nrealloc rather than xrealloc.
22839         Allow the use of `\0' as a delimiter.
22840         (readtokens): Likewise.
22841         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
22842
22843 2004-03-30  Jim Meyering  <jim@meyering.net>
22844
22845         * m4/realloc.m4: Remove file, since now it does no more than
22846         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
22847         the `configure.ac' section of module/realloc.
22848         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
22849
22850 2004-03-30  Bruno Haible  <bruno@clisp.org>
22851
22852         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
22853         nonnull.
22854
22855 2004-03-29  Paul Eggert  <eggert@twinsun.com>
22856
22857         Merge changes to getloadavg.c from coreutils and Emacs.
22858
22859         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
22860         Define to an expression, not to the empty string.
22861         Include cloexec.h and xalloc.h.
22862         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
22863         Use set_cloexec_flag rather than rolling our own.
22864         * lib/cloexec.c, lib/cloexec.h: New files.
22865
22866 2004-03-29  Paul Eggert  <eggert@twinsun.com>
22867
22868         * m4/cloexec.m4: New file.
22869
22870 2004-03-18  Paul Eggert  <eggert@twinsun.com>
22871
22872         * lib/getopt.h: Sync with libc CVS.
22873
22874 2004-03-18  Paul Eggert  <eggert@twinsun.com>
22875             Bruno Haible  <bruno@clisp.org>
22876
22877         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
22878         mbswidth.
22879
22880 2004-03-18  Paul Eggert  <eggert@twinsun.com>
22881             Bruno Haible  <bruno@clisp.org>
22882
22883         * lib/mbswidth.h: Include <wchar.h> only if
22884         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
22885         <wchar.h>.
22886         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
22887
22888 2004-03-09  Paul Eggert  <eggert@twinsun.com>
22889
22890         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
22891         Sync with libc CVS.
22892         * lib/getopt_int.h: New file, also synced from libc.
22893
22894 2004-03-09  Paul Eggert  <eggert@twinsun.com>
22895
22896         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
22897         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
22898         Bring back getopt.c, getopt.h, getopt1.c.
22899
22900 2004-03-07  Paul Eggert  <eggert@twinsun.com>
22901
22902         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
22903         All uses changed.  Check for sa_sigaction member; this fixes
22904         a bug first reported by Jason Andrade in
22905         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
22906
22907 2004-03-07  Paul Eggert  <eggert@twinsun.com>
22908
22909         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
22910         '#if' expressions.  Unlike the code it replaces, it does not
22911         depend on (defined _SC_PAGESIZE).  However, it does depend on
22912         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
22913         first reported by Jason Andrade in
22914         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
22915
22916 2004-02-25  Simon Josefsson  <jas@extundo.com>
22917
22918         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
22919
22920 2004-02-25  Simon Josefsson  <jas@extundo.com>
22921
22922         * lib/strdup.h: New file.
22923         * lib/strdup.c: Include it.
22924         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
22925         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
22926
22927 2004-02-23  Karl Berry  <karl@gnu.org>
22928
22929         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
22930         (from fencepost.gnu.org:/gd/gnuorg).
22931
22932 2004-02-23  Karl Berry  <karl@gnu.org>
22933
22934         * config/srclistvars.sh (GNUORG) [karl]: redefine.
22935         * config/srclist.txt: add maintain/standards documents.
22936
22937 2004-02-18  Bruno Haible  <bruno@clisp.org>
22938
22939         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
22940         Reported by Derek Robert Price <derek@ximbiot.com>.
22941
22942 2004-02-16  Karl Berry  <karl@gnu.org>
22943
22944         * config/mkinstalldirs, install-sh: update from automake.
22945
22946 2004-02-06  Karl Berry  <karl@gnu.org>
22947
22948         * m4/po.m4: update from gettext 0.14.1.
22949
22950 2004-02-06  Karl Berry  <karl@gnu.org>
22951
22952         * lib/config.charset: update from gettext 0.14.1.
22953
22954 2004-02-05  Paul Eggert  <eggert@twinsun.com>
22955
22956         Add comments and code, prompted by suggestions from Bruno Haible
22957         for sh-quote.
22958         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
22959         describing the enum quoting_style values.
22960         * lib/quotearg.c (quotearg_alloc): New function.
22961         (quotearg_buffer_restyled): Treat lone { and } as special.
22962         Treat = as special.  Work around bug with older shells
22963         that "see" a '\' that is really the 2nd byte of a multibyte char.
22964         Quote empty string with shell_quoting_style.
22965
22966 2004-02-03  Bruno Haible  <bruno@clisp.org>
22967
22968         * m4/pipe.m4: New file, from GNU gettext.
22969
22970 2004-02-03  Bruno Haible  <bruno@clisp.org>
22971
22972         * lib/pipe.h: New file, from GNU gettext.
22973         * lib/pipe.c: New file, from GNU gettext.
22974
22975 2004-01-27  Bruno Haible  <bruno@clisp.org>
22976
22977         * m4/execute.m4: New file, from GNU gettext.
22978
22979 2004-01-27  Bruno Haible  <bruno@clisp.org>
22980
22981         * lib/execute.h: New file, from GNU gettext.
22982         * lib/execute.c: New file, from GNU gettext.
22983         * lib/w32spawn.h: New file, from GNU gettext.
22984
22985 2004-01-24  Paul Eggert  <eggert@twinsun.com>
22986
22987         Merge from diffutils.
22988
22989         * lib/file-type.c (file_type): Add typed memory objects.
22990         * lib/file-type.h (S_TYPEISTMO): New macro.
22991
22992         * lib/c-stack.h (c_stack_action): Remove argv argument.
22993         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
22994         (die): Don't calculate message unless segv_action returns.
22995         (get_stack_location, min_address_from_argv, max_address_from_argv,
22996         volatile stack_base, volatile_stack_size): Remove.
22997         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
22998         that every segmentation violation is a stack overflow.  (Ouch!)
22999         See Debian bug 136249 (still outstanding) for more info about why
23000         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
23001
23002 2004-01-24  Paul Eggert  <eggert@twinsun.com>
23003
23004         Exit-status fix from coreutils.
23005
23006         Use exit_failure consistently in place of EXIT_FAILURE,
23007         so that program exit statuses are consistent on failure.
23008
23009         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
23010         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
23011         * lib/argmatch.h: Comment fix to match the above.
23012         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
23013         Now a macro referring to exit_failure, instead of a separate
23014         variable.  Include "exitfail.h" to get it.
23015         * lib/xstrtol.h: Include "exitfail.h".
23016         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
23017
23018         * lib/long-options.c (parse_long_options): Use prototype
23019         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
23020         for clarity.
23021
23022 2004-01-21  Jim Meyering  <jim@meyering.net>
23023
23024         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
23025         so as not to conflict with a different-sized __mktime_internal
23026         function in GNU libc.
23027         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
23028         Problem building statically-linked `ls' reported by Michael Brunnbauer.
23029
23030 2004-01-20  Karl Berry  <karl@gnu.org>
23031
23032         * config/config.guess: update from config.
23033
23034         * config/srclistvars.sh: GNUWWWLICENSES for karl.
23035
23036 2004-01-20  Bruno Haible  <bruno@clisp.org>
23037
23038         Safer stack allocation.
23039         * lib/setenv.c: Include allocsa.h.
23040         (alloca): Remove fallback definition.
23041         (freea): Remove macro.
23042         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
23043         instead of freea.
23044
23045 2004-01-20  Bruno Haible  <bruno@clisp.org>
23046
23047         * m4/eealloc.m4: New file, from GNU gettext.
23048
23049 2004-01-20  Bruno Haible  <bruno@clisp.org>
23050
23051         * m4/allocsa.m4: New file, from GNU gettext.
23052
23053 2004-01-20  Bruno Haible  <bruno@clisp.org>
23054
23055         * lib/xallocsa.h: New file, from GNU gettext.
23056         * lib/xallocsa.c: New file, from GNU gettext.
23057
23058 2004-01-20  Bruno Haible  <bruno@clisp.org>
23059
23060         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
23061
23062 2004-01-20  Bruno Haible  <bruno@clisp.org>
23063
23064         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
23065         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
23066         specially.
23067
23068 2004-01-20  Bruno Haible  <bruno@clisp.org>
23069
23070         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
23071         patch.
23072
23073 2004-01-20  Bruno Haible  <bruno@clisp.org>
23074
23075         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
23076
23077 2004-01-20  Bruno Haible  <bruno@clisp.org>
23078
23079         * lib/eealloc.h: New file.
23080
23081 2004-01-20  Bruno Haible  <bruno@clisp.org>
23082
23083         * lib/binary-io.h: Avoid warnings on Cygwin.
23084
23085 2004-01-20  Bruno Haible  <bruno@clisp.org>
23086
23087         * lib/allocsa.h: New file, from GNU gettext.
23088         * lib/allocsa.c: New file, from GNU gettext.
23089
23090 2004-01-18  Karl Berry  <karl@gnu.org>
23091
23092         * doc/gpl.texi, doc/lgpl.texi: new files.
23093
23094 2004-01-18  Karl Berry  <karl@gnu.org>
23095
23096         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
23097         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
23098
23099 2004-01-15  Paul Eggert  <eggert@twinsun.com>
23100
23101         Merge from coreutils.
23102
23103         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
23104         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
23105         (gl_DEFAULT_POSIX2_VERSION): Move
23106         the documentation from 'configure' into 'config.hin',
23107         so that 'configure --help' isn't burdened by it and
23108         we don't have to worry about its formatting there.
23109         Reword the documentation so that it's more succinct
23110         and can be run together into a single paragraph.
23111         * m4/same.m4 (gl_SAME): Check for pathconf.
23112
23113 2004-01-15  Paul Eggert  <eggert@twinsun.com>
23114
23115         Merge from coreutils.
23116
23117         * lib/posixver.c: Include posixver.h.
23118
23119         * lib/same.c: Include <stdbool.h>, <limits.h>.
23120         (_POSIX_NAME_MAX): Define if not defined.
23121         (MIN): New macro.
23122         (same_name): If file names are silently truncated, report
23123         that the file names are the same if they are the same after
23124         the silent truncation.
23125
23126         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
23127         conversion function.
23128         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
23129         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
23130         longer needed.
23131
23132 2004-01-15  Jim Meyering  <jim@meyering.net>
23133
23134         Merge from coreutils.
23135
23136         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
23137         if no library is required.
23138         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
23139         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
23140         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
23141         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
23142         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
23143         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
23144         value, $ac_cv_search_crypt, if it's "none required".
23145         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
23146         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
23147         not gl_FUNC_GETLOADAVG.
23148         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
23149         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
23150
23151 2004-01-15  Jim Meyering  <jim@meyering.net>
23152
23153         Merge from coreutils.
23154
23155         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
23156         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
23157         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
23158
23159         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
23160         optional configure-time default.
23161
23162         * lib/version-etc.c (version_etc_copyright): Update copyright date.
23163
23164         * lib/xreadlink.c (xreadlink): Correct outdated comment.
23165
23166 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
23167
23168         Merge from coreutils.
23169
23170         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
23171         value, $ac_cv_search_nanosleep, if it's "none required".
23172
23173 2004-01-14  Paul Eggert  <eggert@twinsun.com>
23174
23175         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
23176         with like-named macro in fnmatch.c.
23177         (EXT): Use an internal constant instead.
23178
23179         Merge fnmatch patches from glibc.
23180         * lib/fnmatch.c (mbsinit): Remove define.
23181         Add libc_hidden_ver (__fnmatch, fnmatch).
23182         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
23183         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
23184
23185 2004-01-14  Karl Berry  <karl@gnu.org>
23186
23187         * config/install-sh: update from automake.
23188
23189 2004-01-13  Karl Berry  <karl@gnu.org>
23190
23191         * config/install-sh: update from automake.
23192
23193 2004-01-09  Karl Berry  <karl@gnu.org>
23194
23195         * config/install-sh: update from automake.
23196
23197 2004-01-05  Karl Berry  <karl@gnu.org>
23198
23199         * config/config.{sub,guess}: update from config.
23200
23201 2003-12-31  Karl Berry  <karl@gnu.org>
23202
23203         * config/depcomp: update from automake.
23204
23205 2003-12-14  Karl Berry  <karl@gnu.org>
23206
23207         * lib/config.charset: update from gettext-runtime.
23208
23209 2003-12-03  Paul Eggert  <eggert@twinsun.com>
23210
23211         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
23212         Bug reported by Alfred M. Szmidt.
23213
23214 2003-12-03  Bruno Haible  <bruno@clisp.org>
23215
23216         * m4/gettext.m4: Upgrade from gettext-0.13.
23217         * m4/po.m4: Upgrade from gettext-0.13.
23218         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
23219         * m4/intmax.m4: New file, from gettext-0.13.
23220         * m4/printf-posix.m4: New file, from gettext-0.13.
23221
23222 2003-11-29  Karl Berry  <karl@gnu.org>
23223
23224         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
23225
23226 2003-11-25  Paul Eggert  <eggert@twinsun.com>
23227             Bruno Haible  <bruno@clisp.org>
23228
23229         * lib/printf-parse.h: Don't include sys/types.h.
23230         (ARG_NONE): New macro.
23231         (char_directive): Change type of *arg_index fields to size_t.
23232         * lib/printf-parse.c: Don't include sys/types.h.
23233         (SSIZE_MAX): Remove macro.
23234         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
23235         Remove unnecessary overflow check.
23236         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
23237         fields.
23238
23239 2003-11-25  Bruno Haible  <bruno@clisp.org>
23240
23241         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
23242
23243 2003-11-25  Bruno Haible  <bruno@clisp.org>
23244
23245         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
23246         gt_TYPE_SSIZE_T.
23247
23248 2003-11-24  Paul Eggert  <eggert@twinsun.com>
23249
23250         * modules/alloca: Remove dependency on xalloc.
23251
23252 2003-11-24  Paul Eggert  <eggert@twinsun.com>
23253
23254         * lib/alloca.c: Remove dependency on xalloc module.
23255         (xalloc_die): Remove.
23256         (memory_full) [!defined emacs]: New macro.
23257         [!defined emacs]: Don't include xalloc.h.
23258         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
23259         address arithmetic overflows.  Change datatypes a bit to avoid
23260         unnecessary casts.
23261
23262 2003-11-22  Jim Meyering  <jim@meyering.net>
23263
23264         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
23265         s/size/size_t/.
23266
23267 2003-11-21  Karl Berry  <karl@gnu.org>
23268
23269         * config/config.{sub,guess}: update from config.
23270
23271 2003-11-18  Karl Berry  <karl@gnu.org>
23272
23273         * config/config.{sub,guess}: update from config.
23274
23275         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
23276
23277 2003-11-17  Paul Eggert  <eggert@twinsun.com>
23278
23279         * README: Mention that S+T cannot overflow if S is the size of
23280         an existing object and T is sufficiently small.
23281
23282 2003-11-17  Jim Meyering  <jim@meyering.net>
23283
23284         On systems without utime and without a utimes function capable of
23285         dealing with a NULL struct utimbuf* argument, this utime replacement
23286         could -- in unusual circumstances -- leak a file descriptor.
23287         * lib/utime.c: Include <unistd.h> and <errno.h>.
23288         (utime_null): Be sure to close `fd' and to preserve errno.
23289         Reported by Geoff Collyer via Arnold Robbins.
23290
23291 2003-11-17  Bruno Haible  <bruno@clisp.org>
23292
23293         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
23294         (Depends-on): Add xsize.
23295
23296 2003-11-17  Bruno Haible  <bruno@clisp.org>
23297
23298         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
23299
23300 2003-11-17  Bruno Haible  <bruno@clisp.org>
23301
23302         * lib/vasnprintf.c (alloca): Remove fallback definition.
23303         (freea): Remove definition.
23304         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
23305         Reported by Paul Eggert.
23306
23307 2003-11-16  Paul Eggert  <eggert@twinsun.com>
23308             Bruno Haible  <bruno@clisp.org>
23309
23310         Protect against address arithmetic overflow.
23311         * lib/printf-args.h: Include stddef.h.
23312         (arguments): Change type of field 'count' to size_t.
23313         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
23314         'unsigned int' where appropriate.
23315         * lib/printf-parse.h: Include sys/types.h.
23316         (char_directive): Change type of *arg_index fields to ssize_t.
23317         (char_directives): Change type of fields 'count', max_*_length to
23318         size_t.
23319         * lib/printf-parse.c: Include sys/types.h and xsize.h.
23320         (SSIZE_MAX): Define fallback value.
23321         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
23322         instead of 'int' where appropriate. Check a_allocated, d_allocated
23323         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
23324         * lib/vasnprintf.c: Include xsize.h.
23325         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
23326         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
23327         overflow. Avoid wraparound when converting a width or precision from
23328         decimal to binary.
23329
23330 2003-11-16  Bruno Haible  <bruno@clisp.org>
23331
23332         Update from GNU gettext.
23333         * lib/printf-parse.c: Generalize to it can be compiled for wide
23334         strings.
23335         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
23336         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
23337         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
23338         SNPRINTF): New macros.
23339         Don't include <alloca.h> if the file is used inside libintl.
23340         (local_wcslen): New function, for Solaris 2.5.1.
23341         (VASNPRINTF): Use it instead of wcslen.
23342
23343 2003-11-16  Bruno Haible  <bruno@clisp.org>
23344
23345         * lib/xsize.h (xmax): New function.
23346         (xsum, xsum3, xsum4): Declare as "pure" functions.
23347
23348 2003-11-12  Paul Eggert  <eggert@twinsun.com>
23349
23350         * modules/xalloc (Files): Undo latest change, since xalloc.h
23351         no longer needs SIZE_MAX or PTRDIFF_MAX.
23352
23353 2003-11-12  Paul Eggert  <eggert@twinsun.com>
23354
23355         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
23356         gl_PTRDIFF_MAX.
23357
23358 2003-11-12  Paul Eggert  <eggert@twinsun.com>
23359
23360         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
23361         "return", to pacify some unknown compiler.  Problem reported
23362         by Joerg Schilling.
23363
23364 2003-11-12  Paul Eggert  <eggert@twinsun.com>
23365
23366         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
23367         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
23368         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
23369         heuristic is just as accurate as far as we know, and it removes a
23370         dependency on size_max.m4 and ptrdiff_max.m4.
23371
23372 2003-11-11  Bruno Haible  <bruno@clisp.org>
23373
23374         * modules/xsize (Files): Add m4/size_max.m4.
23375         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
23376
23377 2003-11-11  Bruno Haible  <bruno@clisp.org>
23378
23379         * m4/size_max.m4: New file.
23380         * m4/ptrdiff_max.m4: New file.
23381         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
23382         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
23383         (gl_XALLOC): Invoke it.
23384
23385 2003-11-11  Bruno Haible  <bruno@clisp.org>
23386
23387         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
23388         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
23389         defined.
23390
23391 2003-11-10  Paul Eggert  <eggert@twinsun.com>
23392
23393         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
23394         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
23395         rejected some allocations of exactly SIZE_MAX - 2 bytes.
23396         From Bruno Haible.
23397         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
23398         not (size_t) -1, since it's defined here.
23399
23400 2003-11-09  Karl Berry  <karl@gnu.org>
23401
23402         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
23403
23404 2003-11-06  Paul Eggert  <eggert@twinsun.com>
23405
23406         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
23407         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
23408         Reject sizes of exactly SIZE_MAX bytes.
23409         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
23410         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
23411
23412 2003-11-05  Bruno Haible  <bruno@clisp.org>
23413
23414         * lib/xsize.h: Include limits.h, to avoid a possible collision with
23415         SIZE_MAX defined in <limits.h> on Solaris.
23416
23417 2003-11-04  Jim Meyering  <jim@meyering.net>
23418
23419         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
23420         variable names, rather than @VAR@.
23421         * modules/poll: Likewise.
23422
23423 2003-11-04  Bruno Haible  <bruno@clisp.org>
23424
23425         * modules/xsize: New file.
23426         * modules/linebreak: Depend on xsize.
23427         * MODULES.html.sh (func_all_modules): Add xsize.
23428
23429 2003-11-04  Bruno Haible  <bruno@clisp.org>
23430
23431         * m4/xsize.m4: New file.
23432
23433 2003-11-04  Bruno Haible  <bruno@clisp.org>
23434
23435         * lib/xsize.h: New file.
23436         * lib/linebreak.c: Include xsize.h.
23437         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
23438         argument for overflow.
23439         Suggested by Paul Eggert.
23440
23441 2003-11-03  Karl Berry  <karl@gnu.org>
23442
23443         * config/config.{guess,sub}: update from config.
23444
23445 2003-11-03  Jim Meyering  <jim@meyering.net>
23446
23447         * modules/userspec (lib_SOURCES): Add userspec.h.
23448         (Include): Add "userspec.h".
23449         Improve description.
23450
23451 2003-11-03  Jim Meyering  <jim@meyering.net>
23452
23453         * lib/userspec.c: Include "userspec.h".
23454         * lib/userspec.h: New file.
23455
23456 2003-11-03  Bruno Haible  <bruno@clisp.org>
23457
23458         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
23459
23460 2003-11-03  Bruno Haible  <bruno@clisp.org>
23461
23462         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
23463         available, to avoid (extremely rare) race condition.
23464         Suggested by Paul Eggert.
23465
23466 2003-11-02  Karl Berry  <karl@gnu.org>
23467
23468         * config/srclist.txt (vasprintf.c): sync broken, sigh.
23469
23470 2003-10-31  Paul Eggert  <eggert@twinsun.com>
23471
23472         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
23473         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
23474         (read_filesystem_list): Set and use me_type_malloced.
23475         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
23476         whatever the type happens to be), for brevity and consistency.
23477         Check for size calculation overflow on Alphas running OSF/1.
23478
23479 2003-10-31  Jim Meyering  <jim@meyering.net>
23480
23481         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
23482
23483         * lib/linebuffer.c: Include <string.h> for declaration of memset.
23484
23485 2003-10-30  Paul Eggert  <eggert@twinsun.com>
23486             Bruno Haible  <bruno@clisp.org>
23487
23488         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
23489         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
23490
23491 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
23492
23493         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
23494         netbsd*-gnu*.  Suggested by Robert Millan.
23495
23496 2003-10-29  Paul Eggert  <eggert@twinsun.com>
23497
23498         * modules/group-member: Depend on stdbool.
23499
23500 2003-10-29  Paul Eggert  <eggert@twinsun.com>
23501
23502         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
23503
23504 2003-10-29  Paul Eggert  <eggert@twinsun.com>
23505
23506         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
23507         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
23508         after the 'gnu' in these cases.  This fixes some bugs in the
23509         previous change, and is based on suggestions by Robert Millan.
23510
23511 2003-10-29  Paul Eggert  <eggert@twinsun.com>
23512
23513         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
23514         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
23515         no longer needed.
23516         * lib/quotearg.c (quotearg_n_options): Use it.
23517         * lib/group-member.c: Include <stdbool.h>.
23518         (free_group_info): Arg is now const *; don't free arg.
23519         (get_group_info): Now returns bool and accepts struct group_info *,
23520         rather than returning a malloc'ed struct group_info *.
23521         All uses changed.  Check for overflow in internal size calculation.
23522
23523         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
23524         rather than xmalloc/xrealloc.
23525         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
23526         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
23527         conformance bug: the old code used a pointer after freeing the
23528         storage that it addressed.
23529         * lib/hash.c (hash_initialize): Simplify the code by using
23530         xalloc_oversized rather than doing it by hand.
23531         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
23532         the buffer preserved.  Use free and xmalloc instead.
23533         * lib/quotearg.c (quotearg_n_options): Likewise.
23534         Use a simpler test for size overflow.  Don't use xalloc_oversized
23535         because unsigned int might be wider than size_t (!); this suggests
23536         that we should switch from unsigned int to size_t for slot numbers.
23537
23538 2003-10-28  Paul Eggert  <eggert@twinsun.com>
23539
23540         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
23541         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
23542         NetBSD kernels.  Requested by Richard Stallman.
23543
23544 2003-10-27  Paul Eggert  <eggert@twinsun.com>
23545
23546         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
23547         to allocate the returned structure.  Do not allocate a subarray,
23548         as x2nrealloc will do that.
23549         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
23550         instead of xnrealloc.
23551         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
23552
23553 2003-10-27  Bruno Haible  <bruno@clisp.org>
23554
23555         * lib/stdbool_.h: Better support for BeOS.
23556
23557 2003-10-26  Paul Eggert  <eggert@twinsun.com>
23558
23559         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
23560         now uses inline.
23561
23562 2003-10-26  Paul Eggert  <eggert@twinsun.com>
23563
23564         * lib/xalloc.h (xalloc_oversized): New static inline function, for
23565         callers that want to do their own size-overflow checking.  Include
23566         <stdbool.h>, since xalloc_oversized returns bool.
23567         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
23568         to use xalloc_oversized.
23569
23570         Add two functions x2realloc, x2nrealloc, for programs that grow
23571         arrays dynamically by doubling their sizes.
23572         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
23573         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
23574         New functions.
23575
23576         Port to C99 semantics for 'inline' of external functions.
23577         Bug reported by Bruno Haible.
23578         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
23579         with the old contents of xnmalloc.
23580         (xnmalloc, xmalloc): Use it.
23581         (xnrealloc_inline): New static inline function,
23582         with the old contents of xnrealloc.
23583         (xnrealloc, xrealloc): Use it.
23584
23585         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
23586         that.
23587
23588 2003-10-26  Karl Berry  <karl@gnu.org>
23589
23590         * config/srclist.txt (COPYING.DOC): no longer available from
23591         /gd/gnuorg; don't know where the ultimate source is.
23592
23593 2003-10-25  Paul Eggert  <eggert@twinsun.com>
23594
23595         Fix several address-calculation bugs in the hash modules,
23596         plus some minor code cleanup.
23597
23598         * lib/hash.h: Include <stdbool.h>, for bool.
23599         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
23600         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
23601         hash_get_n_entries, hash_get_max_bucket_length,
23602         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
23603         hash_rehash): Use size_t rather than unsigned.
23604         * lib/hash.c (struct hash_table, hash_get_n_buckets,
23605         hash_get_n_buckets_used, hash_get_n_entries,
23606         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
23607         hash_get_entries, hash_do_for_each, hash_string, is_prime,
23608         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
23609         Likewise.
23610         (SIZE_MAX): Define if not defined.
23611         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
23612         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
23613         hash_print):
23614         Use const * when possible.
23615         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
23616         (check_tuning): Fix bug: if tuning parameters were very close to
23617         0 or 1, rounding errors could have caused subscript violations.
23618         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
23619         (hash_initialize): Add 'fail:' label
23620         to free table and return NULL, and use it to simplify code.
23621         Use calloc rather than clearing the storage ourself.
23622         (hash_initialize, hash_rehash): Check for arithmetic overflow in
23623         buffer size calculations.
23624         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
23625         Include <stddef.h>, for size_t.
23626         * lib/hash-pjw.c (hash_pjw): Likewise.
23627         Switch to method described by Bruno Haible.
23628         Include <limits.h>, for CHAR_BIT.
23629         (SIZE_BITS): New macro.
23630
23631 2003-10-23  Paul Eggert  <eggert@twinsun.com>
23632
23633         * m4/getline.m4 (AM_FUNC_GETLINE):
23634         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
23635         hosts.  Problem reported by Derek Robert Price in
23636         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
23637         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
23638         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
23639
23640 2003-10-21  Paul Eggert  <eggert@twinsun.com>
23641
23642         * lib/getndelim2.c (getndelim2): When size calculation overflows,
23643         ceiling the allocation at NMAX bytes rather than silently
23644         discarding input bytes before NMAX is reached.  This makes
23645         a difference only if NMAX exceeds SIZE_MAX / 2.
23646
23647         * lib/obstack.c: Merge from glibc.
23648         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
23649         Add libc_hidden_def (_obstack_newchunk).
23650         (_obstack_free) [! defined _LIBC]: Remove.
23651         [defined _LIBC]: Make a strong alias from obstack_free, rather than
23652         a clone of the function body.
23653         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
23654         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
23655
23656         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
23657         glibc.
23658         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
23659         arg to memcpy.
23660
23661         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
23662         (obstack_ptr_grow_fast, obstack_int_grow_fast):
23663         Don't use lvalue casts, as GCC plans to remove support for them
23664         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
23665         was also present in the non-GCC version, indicating that this
23666         code had always been buggy and had never been widely used.
23667         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
23668         Use the fast variant of each macro, rather than copying the
23669         definiens of the fast variant; that way, we'll be more likely to
23670         catch future bugs in the fast variants.
23671
23672 2003-10-20  Bruno Haible  <bruno@clisp.org>
23673
23674         * modules/wait-process: New file.
23675         * MODULES.html.sh (func_all_modules): Add wait-process.
23676
23677 2003-10-20  Bruno Haible  <bruno@clisp.org>
23678
23679         * m4/wait-process.m4: New file.
23680
23681 2003-10-20  Bruno Haible  <bruno@clisp.org>
23682
23683         * lib/wait-process.h: New file, from GNU gettext.
23684         * lib/wait-process.c: New file, from GNU gettext.
23685
23686 2003-10-19  Jim Meyering  <jim@meyering.net>
23687
23688         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
23689         HPUX 10.20.
23690
23691 2003-10-18  Karl Berry  <karl@gnu.org>
23692
23693         * config/config.guess: update from config.
23694
23695 2003-10-16  Paul Eggert  <eggert@twinsun.com>
23696
23697         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
23698         (getgroups): First arg is int, not size_t.
23699         Don't let 'free' mangle errno.
23700
23701 2003-10-16  Paul Eggert  <eggert@twinsun.com>
23702
23703         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
23704
23705 2003-10-16  Karl Berry  <karl@gnu.org>
23706
23707         * config/config.{guess,sub}: update from config.
23708
23709 2003-10-16  Jim Meyering  <jim@meyering.net>
23710
23711         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
23712         memcpy.
23713
23714 2003-10-15  Paul Eggert  <eggert@twinsun.com>
23715
23716         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
23717         (SIZE_MAX): Remove.
23718         (new_exclude, add_exclude_file): Initial size no longer needs to
23719         be a power of 2.
23720         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
23721         our own address arithmetic overflow checking.
23722
23723         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
23724         (fnmatch): Do not alloca more than 2000 wide characters;
23725         instead, use malloc for large buffers.
23726         Check for address arithmetic overflow, and return -1
23727         with errno set to ENOMEM in that case.
23728         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
23729         (NEW_PATTERN): Do not alloca more than 8000 bytes;
23730         instead, return -1.  Check for address arithmetic overflow.
23731
23732 2003-10-14  Paul Eggert  <eggert@twinsun.com>
23733
23734         Handle invalid suffixes and overflow independently, so that
23735         callers can treat them independently as needed.  Fix some bugs in
23736         suffix handling, e.g., "100k@" was not diagnosed as an invalid
23737         suffix for a human-readable blocksize.  The major caller-visible
23738         change is the addition of a new
23739         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
23740         that both overflow and suffix chars were found.
23741
23742         * lib/human.c (humblock): Don't check separately for invalid suffix
23743         char; that is xstrtoumax's job (now that its bug is fixed).
23744         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
23745         INTMAX_MAX]: New macros.
23746         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
23747         TYPE_MAXIMUM): New macros.
23748         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
23749         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
23750         if overflow occurs, as it's what __strtol does and it's more useful
23751         in practice.
23752         (__xstrtol): If __strtol reports some error other than ERANGE,
23753         reflect it to the caller as LONGINT_INVALID.  If it reports
23754         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
23755         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
23756         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
23757         value.
23758         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
23759         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
23760         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
23761         [defined UINTMAX_MAX]: New macros.
23762
23763 2003-10-14  Bruno Haible  <bruno@clisp.org>
23764
23765         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
23766
23767 2003-10-14  Bruno Haible  <bruno@clisp.org>
23768
23769         * m4/sig_atomic_t: New file, from GNU gettext.
23770         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
23771
23772 2003-10-14  Bruno Haible  <bruno@clisp.org>
23773
23774         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
23775         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
23776         Also use volatile where needed.
23777
23778 2003-10-12  Paul Eggert  <eggert@twinsun.com>
23779
23780         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
23781         Change maintainer from Bruno Haible to 'all'.
23782
23783 2003-10-12  Paul Eggert  <eggert@twinsun.com>
23784
23785         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
23786
23787 2003-10-12  Paul Eggert  <eggert@twinsun.com>
23788
23789         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
23790         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
23791         and define in terms of the other primitives.
23792         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
23793         (SIZE_MAX): Define if not already defined.
23794         (array_size_overflow): New function.
23795         (xalloc_die): Abort instead of exiting if 'error' returns.
23796         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
23797         (xmalloc, xrealloc): Use them.
23798         (xcalloc): Check for address arithmetic overflow.
23799         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
23800         a bit faster than strcpy.
23801
23802 2003-10-10  Simon Josefsson  <jas@extundo.com>
23803
23804         * modules/argp (Depends-on): Add restrict and strcase.
23805
23806 2003-10-10  Simon Josefsson  <jas@extundo.com>
23807
23808         * m4/argp.m4: Add AC_C_INLINE.
23809
23810 2003-10-08  Paul Eggert  <eggert@twinsun.com>
23811
23812         Merge getpass from libc, plus a few fixes.
23813
23814         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
23815         Include <stdbool.h>.
23816         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
23817         __fsetlocking to empty.
23818         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
23819         do include <bits/libc-lock.h>.
23820         Do not include <fcntl.h>; not needed.
23821         [_LIBC]: Include <wchar.h>.
23822         (NOTCANCEL_MODE): New macro.
23823         (flockfile, funlockfile) [_LIBC]: New macros.
23824         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
23825         [!_LIBC]: New macros.
23826         (call_fclose): New function.
23827         (getpass): Use it.  Save tty stream separately; this simplifies the
23828         code and makes it more reliable if stdin happens to equal stdout.
23829         Invoke __fsetlocking on tty.
23830         Handle thread cancellation if needed.
23831         Namespace cleanup (use __tcgetattr, __getline).
23832         Use bool for Booleans.
23833         [USE_IN_LIBIO]: Handle wide streams.
23834         [!_LIBC]: Unconditionally do the fseek, since we don't know what
23835         stream might go where.
23836
23837         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
23838         doesn't have to include <stdio.h> before us.
23839         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
23840         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
23841         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
23842         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
23843         if not declared, so that we can use getpass.c code from libc without
23844         rewriting it.
23845         (flockfile, ftrylockfile, funlockfile): New macros.
23846
23847 2003-10-08  Paul Eggert  <eggert@twinsun.com>
23848
23849         * modules/getpass: Depend on stdbool.
23850
23851 2003-10-08  Paul Eggert  <eggert@twinsun.com>
23852
23853         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
23854
23855 2003-10-07  Karl Berry  <karl@gnu.org>
23856
23857         * config/config.{guess,sub}: update from config.
23858
23859 2003-10-06  Jim Meyering  <jim@meyering.net>
23860             Bruno Haible  <bruno@clisp.org>
23861
23862         This lets translators provide better translations for the
23863         "Written by ..." part of --version output.
23864         * lib/version-etc.h: Include stdarg.h.
23865         (version_etc_copyright): Declare as readonly.
23866         (version_etc): Make this function variadic with a NULL-terminated list
23867         of author name strings.
23868         (version_etc_va): New declaration.
23869         * lib/version-etc.c: Include stdarg.h, stdlib.h.
23870         (version_etc_copyright): Declare as readonly.
23871         (version_etc_va): New function. Provide a different translatable string
23872         for each possible number of authors < 10. Abbreviate when there are 10
23873         authors or more.
23874         (version_etc): Make this function variadic. Call version_etc_va.
23875         Suggestion from Gary V. Vaughan.
23876
23877         * lib/long-options.h (parse_long_options): Change prototype: the
23878         authors string is moved to the end and becomes variadic.
23879         * lib/long-options.c: Include stdarg.h.
23880         (parse_long_options): Make this function variadic, too.
23881         Call version_etc_va, not version_etc.
23882
23883 2003-10-06  Bruno Haible  <bruno@clisp.org>
23884
23885         * modules/version-etc-2: Remove file.
23886         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
23887
23888 2003-10-06  Bruno Haible  <bruno@clisp.org>
23889
23890         * modules/fatal-signal: New file.
23891         * MODULES.html.sh (func_all_modules): Add fatal-signal.
23892
23893 2003-10-06  Bruno Haible  <bruno@clisp.org>
23894
23895         * m4/fatal-signal.m4: New file.
23896         * m4/signalblocking.m4: New file, from GNU gettext.
23897
23898 2003-10-06  Bruno Haible  <bruno@clisp.org>
23899
23900         * lib/version-etc-2.h: Remove file.
23901         * lib/version-etc-2.c: Remove file.
23902
23903 2003-10-06  Bruno Haible  <bruno@clisp.org>
23904
23905         * lib/fatal-signal.h: New file, from GNU gettext.
23906         * lib/fatal-signal.c: New file, from GNU gettext.
23907
23908 2003-10-05  Paul Eggert  <eggert@twinsun.com>
23909
23910         * README: Rework advice for preventing empty .o files.
23911         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
23912         not <sys/types.h>.
23913
23914 2003-10-04  Karl Berry  <karl@gnu.org>
23915
23916         * lib/argp*: update from libc.
23917
23918 2003-10-04  Karl Berry  <karl@gnu.org>
23919
23920         * config/config.{guess,sub}: update from config.
23921
23922 2003-10-02  Bruno Haible  <bruno@clisp.org>
23923
23924         * modules/lchown (Include): Add lchown.h.
23925         * modules/time_r (Include): Use "..." syntax.
23926         * modules/xgetdomainname (Include): Add xgetdomainname.h.
23927
23928 2003-10-01  Simon Josefsson  <jas@extundo.com>
23929
23930         * MODULES.html.sh (func_all_modules): Move gethostname from section
23931         'based on' to section 'lacking' POSIX:2001.
23932
23933 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
23934
23935         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
23936         to output mode on the same stream.
23937
23938 2003-09-29  Paul Eggert  <eggert@twinsun.com>
23939
23940         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
23941         Fix arg typo in previous patch.
23942
23943 2003-09-28  Jim Meyering  <jim@meyering.net>
23944
23945         * lib/error.c: Correct cpp indentation.
23946
23947 2003-09-27  Paul Eggert  <eggert@twinsun.com>
23948
23949         * modules/free: New file.
23950
23951 2003-09-27  Paul Eggert  <eggert@twinsun.com>
23952
23953         * m4/free.m4: New file.
23954
23955 2003-09-27  Paul Eggert  <eggert@twinsun.com>
23956
23957         * lib/minmax.h (MIN, MAX)
23958         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
23959         Omit the special code that used __typeof__, since we worry that
23960         it could be more trouble than it's worth.  See:
23961         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
23962         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
23963
23964         * lib/free.c: New file.
23965
23966 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
23967
23968         Trivial fixes to Makefile.am parts of module listings.
23969         * modules/strstr: Append strstr.h to lib_SOURCES.
23970         * modules/strcase: Likewise, for strcase.h.
23971
23972 2003-09-27  Karl Berry  <karl@gnu.org>
23973
23974         * config/mkinstalldirs: update from automake.
23975
23976 2003-09-26  Paul Eggert  <eggert@twinsun.com>
23977
23978         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
23979         (error_tail): Do not loop, reallocating temporary buffer, since
23980         the output cannot contain more wide characters than the input
23981         contains bytes, the size must be big enough already.  This avoids
23982         one potential size overflow calculation.  Check for size overflow
23983         when calculating temporary buffer size.  Free temporary buffer
23984         when done, if it was allocated with malloc; this plugs a memory
23985         leak.  Remove casts from void * to pointers, that are no longer
23986         needed now that we're assuming C89 or better.
23987
23988         Merge error changes from glibc.
23989
23990         * lib/error.c, error.h: Update copyright notice header to match glibc.
23991         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
23992         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
23993         Disable cancellation while printing error.
23994         * lib/error.h: Prepend __ to parameter names.
23995
23996 2003-09-26  Jim Meyering  <jim@meyering.net>
23997
23998         * lib/error.c (error_tail): Move some declarations
23999         into inner scope where the local variables are used.
24000
24001 2003-09-26  Bruno Haible  <bruno@clisp.org>
24002
24003         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
24004         stpncpy().
24005         Don't define stpncpy through config.h; it's now done through stpncpy.h.
24006
24007 2003-09-26  Bruno Haible  <bruno@clisp.org>
24008
24009         * lib/stpncpy.h (gnu_stpncpy): New declaration.
24010         (stpncpy): Define as alias for gnu_stpncpy.
24011         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
24012
24013 2003-09-25  Simon Josefsson  <jas@extundo.com>
24014
24015         * lib/xgetdomainname.h: New file.
24016         * lib/xgetdomainname.c: New file.
24017
24018 2003-09-25  Simon Josefsson  <jas@extundo.com>
24019             Bruno Haible  <bruno@clisp.org>
24020
24021         * modules/getdomainname: New file.
24022         * modules/xgetdomainname: New file.
24023         * MODULES.html.sh (func_all_modules): Add getdomainname,
24024         xgetdomainname.
24025
24026 2003-09-25  Simon Josefsson  <jas@extundo.com>
24027             Bruno Haible  <bruno@clisp.org>
24028
24029         * m4/getdomainname.m4: New file.
24030
24031 2003-09-25  Simon Josefsson  <jas@extundo.com>
24032             Bruno Haible  <bruno@clisp.org>
24033
24034         * lib/getdomainname.h: New file.
24035         * lib/getdomainname.c: New file.
24036
24037 2003-09-25  Karl Berry  <karl@gnu.org>
24038
24039         * lib/argp-fmtstream.c, argp-help.c: update from libc.
24040
24041 2003-09-25  Karl Berry  <karl@gnu.org>
24042
24043         * config/install-sh: update from automake.
24044
24045 2003-09-25  Bruno Haible  <bruno@clisp.org>
24046
24047         * modules/version-etc-2: New file, from modules/version-etc with
24048         modifications.
24049         * MODULES.html.sh (func_all_modules): Add version-etc-2.
24050
24051 2003-09-25  Bruno Haible  <bruno@clisp.org>
24052
24053         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
24054         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
24055
24056 2003-09-24  Simon Josefsson  <jas@extundo.com>
24057
24058         * modules/xgethostname: Add xgethostname.h.
24059
24060 2003-09-24  Paul Eggert  <eggert@twinsun.com>
24061
24062         * lib/linebuffer.c (freebuffer): Don't free the argument, just
24063         the buffer associated with the argument.  Bug reported by
24064         Simon Josefsson.
24065
24066 2003-09-24  Paul Eggert  <eggert@twinsun.com>
24067
24068         * README: Document assumptions that 'int' is at least 32 bits
24069         wide, that integer arithmetic is 2's complement without overflow,
24070         that there are no holes in integer values, that adding sizes of
24071         two nonoverlapping objects can't overflow, and that all-bits-zero
24072         yields scalar zero.  Fix spelling and capitalization typos.
24073
24074 2003-09-19  Karl Berry  <karl@gnu.org>
24075
24076         * lib/argp.h: update from libc.
24077
24078 2003-09-17  Paul Eggert  <eggert@twinsun.com>
24079
24080         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
24081         to avoid spurious warnings like "AC_RUN_IFELSE was called before
24082         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
24083
24084 2003-09-17  Paul Eggert  <eggert@twinsun.com>
24085
24086         * gnulib-tool: Use "test -h", not "test -L", for portability
24087         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
24088         (tags_regexp): Remove, since \| doesn't conform to POSIX.
24089         (sed_extract_prog): Issue s commands one-by-one, rather than
24090         using \| in one s command.
24091
24092 2003-09-16  Paul Eggert  <eggert@twinsun.com>
24093
24094         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
24095         input error, instead of returning NULL the next time we are called
24096         (and therefore losing track of errno).
24097
24098 2003-09-16  Bruno Haible  <bruno@clisp.org>
24099
24100         * gnulib-tool (func_create_testdir): Warn about duplicated
24101         dependencies.
24102
24103 2003-09-15  Paul Eggert  <eggert@twinsun.com>
24104
24105         * modules/argmatch, modules/fatal, modules/obstack,
24106         modules/xalloc, modules/xgethostname: Sort dependencies by
24107         importance, not alphabetically.
24108
24109 2003-09-15  Paul Eggert  <eggert@twinsun.com>
24110
24111         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
24112         fails, so that the caller gets the proper errno.
24113
24114         * lib/readutmp.c (read_utmp): Likewise.
24115         Check for fstat error.  Close stream and free storage
24116         when failing.
24117
24118 2003-09-14  Karl Berry  <karl@gnu.org>
24119
24120         * config/srclist.txt (strdup.c): disable for c89 changes.
24121
24122 2003-09-14  Jim Meyering  <jim@meyering.net>
24123
24124         * lib/getloadavg.c: Correct cpp indentation.
24125         * lib/strdup.c: Likewise.
24126         * lib/vasnprintf.c: Likewise.
24127
24128 2003-09-14  Bruno Haible  <bruno@clisp.org>
24129
24130         * modules/fwriteerror: New file.
24131         * MODULES.html.sh (func_all_modules): Add fwriteerror.
24132
24133 2003-09-14  Bruno Haible  <bruno@clisp.org>
24134
24135         * lib/fwriteerror.h: New file.
24136         * lib/fwriteerror.c: New file.
24137
24138 2003-09-12  Paul Eggert  <eggert@twinsun.com>
24139
24140         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
24141         modules/xgethostname, modules/xalloc: Depend on exit.
24142
24143 2003-09-12  Paul Eggert  <eggert@twinsun.com>
24144
24145         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
24146
24147         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
24148         and AC_MINIX, too, so that their extensions are available.
24149
24150         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
24151         This macro has been superseded by gl_BACKUPFILE.
24152
24153         More patches to assume C89 or better.
24154
24155         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
24156
24157         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
24158         unconditionally.
24159         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
24160         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
24161         Include <string.h>, <stdlib.h> unconditionally.
24162         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
24163         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
24164         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
24165         headers or for string.h.
24166         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
24167         or strtoul.
24168
24169         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
24170         headers.
24171         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
24172         * m4/userspec.m4 (gl_USERSPEC): Likewise.
24173         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
24174         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
24175         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
24176         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
24177         memcpy, memset.
24178         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
24179         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
24180         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
24181         strtol.
24182         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
24183         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
24184         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
24185         strtoul.
24186
24187 2003-09-12  Paul Eggert  <eggert@twinsun.com>
24188
24189         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
24190         * lib/obstack.c [!defined _LIBC]: Likewise.
24191         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
24192         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
24193         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
24194
24195         More changes to assume C89 or better.
24196
24197         * lib/error.c (error_tail): Assume vprintf.
24198
24199         * lib/argmatch.c (getenv): Remove decl.
24200         * lib/progreloc.c (get_full_program_name): Define via prototype.
24201         * lib/setenv.c (clearenv): Likewise.
24202         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
24203         needed.
24204         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
24205         (malloc, memcpy): Remove decls.
24206         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
24207         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
24208         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
24209         (memcpy): Remove macro.
24210         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
24211         (__P): Remove.  All uses removed.
24212         (PTR): Remove.  All uses changed to void *.
24213         (CHAR_BIT, NULL): Remove.
24214         (spaces, zeros, memset_space, memset_zero)
24215         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
24216         Remove.
24217         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
24218         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
24219         Define with prototype.
24220         Remove now-unnecessary prototype decl.
24221         (extra_args_spec): Assume ANSI C.  All uses changed.
24222         (extra_args_spec_iso): Remove.
24223         (my_strftime, emacs_strftimeu): Define via prototype.
24224         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
24225         unconditionally.
24226         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
24227         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
24228         (strtoul, strtol): Remove decls.
24229         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
24230         LONG_MAX): Remove.
24231         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
24232         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
24233         (LOCALE_PARAM_PROTO): New macro.
24234         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
24235         (INTERNAL (strtol), strtol): Define with a prototype.
24236         (PARAMS): Remove.  All uses removed.
24237         * lib/tempname.c: Include <string.h> unconditionally.
24238         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
24239         * lib/xgethostname.c (main): Define with a prototype.
24240         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
24241         Include <stdlib.h> unconditionally.
24242         (calloc, malloc, realloc, free): Remove decls.
24243         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
24244         Include <stdlib.h> unconditionally.  Sort include file names.
24245         (strtod): Remove.
24246         (xstrtod): Define with a prototype.
24247         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
24248         (strtol, strtoul): Remove decls.
24249
24250 2003-09-11  Paul Eggert  <eggert@twinsun.com>
24251
24252         More patches to assume C89 or better.
24253         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
24254         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
24255         string.h, memchr, STDC_HEADERS.
24256
24257 2003-09-11  Paul Eggert  <eggert@twinsun.com>
24258
24259         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
24260         Include <stdlib.h>, <string.h> unconditionally.
24261         Remove now-unnecessary cast to char *.
24262         * lib/strnlen.c: Include <string.h> unconditionally.
24263         * lib/yesno.c (yesno): Define with a prototype.
24264
24265 2003-09-11  Bruno Haible  <bruno@clisp.org>
24266
24267         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
24268
24269 2003-09-10  Jim Meyering  <jim@meyering.net>
24270
24271         * lib/error.c: Correct indentation of cpp directives.
24272
24273 2003-09-10  Bruno Haible  <bruno@clisp.org>
24274
24275         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
24276         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
24277         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
24278         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
24279         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
24280         <stdlib.h> and <string.h> checks.
24281         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
24282         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
24283
24284 2003-09-10  Bruno Haible  <bruno@clisp.org>
24285
24286         * lib/strcspn.c: Include <string.h> unconditionally.
24287         * lib/strpbrk.c: Include <string.h> unconditionally.
24288         * lib/strstr.c: Include <string.h> unconditionally.
24289         * lib/unicodeio.c: Include <string.h> unconditionally.
24290         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
24291         * lib/unsetenv.c: Likewise.
24292         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
24293         * lib/yesno.c: Include <stdlib.h> unconditionally.
24294         (rpmatch): Add prototype.
24295
24296 2003-09-09  Paul Eggert  <eggert@twinsun.com>
24297
24298         More patches to assume C89 or better.
24299         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
24300         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
24301         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
24302         or for string.h.
24303         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
24304         stdlib.h.
24305         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
24306         C headers.
24307         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
24308         string.h.
24309         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
24310         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
24311         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
24312         or for string.h.
24313         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
24314         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
24315         C headers.
24316         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
24317         memcpy.
24318         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
24319         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
24320         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
24321         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
24322         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
24323         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
24324         string.h, free.
24325         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
24326         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
24327         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
24328         C headers, or for string.h.
24329         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
24330         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
24331         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
24332         headers, memory.h, stdlib.h, string.h, strings.h.
24333         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
24334         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
24335         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
24336         strchr.
24337         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
24338         headers, memory.h, string.h.
24339         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
24340         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
24341         free.
24342         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
24343         headers.
24344         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
24345         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
24346         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
24347         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
24348         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
24349
24350 2003-09-09  Paul Eggert  <eggert@twinsun.com>
24351
24352         More K&R removal.
24353
24354         * lib/acosl.c (main): Use a prototype.
24355         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
24356         tanl.c: Likewise.
24357
24358         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
24359
24360         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
24361         (getopt, etopt_long, getopt_long_only, _getopt_internal)
24362         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
24363         with a prototype.
24364         * lib/getopt.c (const): Remove macro.
24365         Include <string.h> unconditionally.
24366         (my_index): Remove; all uses changed to strchr.
24367         (strlen): Remove decl.
24368         (exchange): Remove forward decl; no longer needed.
24369         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
24370         Define with prototype.
24371         * lib/getopt1.c (const): Remove macro.
24372         (getopt_long, getopt_long_only, main): Define with prototype.
24373
24374         * lib/getugroups.c: Include <string.h> unconditionally.
24375
24376         * lib/getusershell.c: Include <stdlib.h> unconditionally.
24377         (getusershell, setusershell, endusershell, readname, main):
24378         Define with prototypes.
24379
24380         * lib/group-member.c: Include group-member.h first.
24381         Include <stdlib.h> unconditionally.
24382
24383         * lib/hard-locale.c: Include hard-locale.h first.
24384         Include <stdlib.h>, <string.h> unconditionally.
24385
24386         * lib/hash.c (free, malloc): Remove decls.
24387         Include <stdlib.h> unconditionally.
24388
24389         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
24390         (getenv): Do not declare.
24391
24392         * lib/idcache.c: Include <string.h> unconditionally.
24393
24394         * lib/long-options.c: Include long-options.h first, to test interface.
24395         Include <stdlib.h> unconditionally.
24396
24397         * lib/makepath.c: Include makepath.h first, to test interface.
24398         Include <stdlib.h> and <string.h> unconditionally.
24399
24400         * lib/linebuffer.c: Include <stdlib.h>.
24401         (free): Remove decl.
24402
24403         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
24404         stddef.h. rpl_malloc returns void *, not char *.
24405         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
24406         prototype.
24407
24408         * lib/md5.h: Include <limits.h> unconditionally.
24409         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
24410         (__P): Remove; all uses removed.
24411         * lib/md5.c: Include "md5.h" first.
24412         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
24413         md5_buffer, md5_process_bytes, md5_process_block):
24414         Define with prototypes.
24415         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
24416         * lib/sha.c: Include "sha.h" first.
24417         Include <stdlib.h>, <string.h> unconditionally.
24418
24419         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
24420         * lib/memcmp.c (__ptr_t): Likewise.
24421         * lib/memrchr.c (__ptr_t): Likewise.
24422         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
24423         Include <string.h> unconditionally.
24424         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
24425         * lib/memchr.c: Include <stdlib.h> unconditionally.
24426         * lib/memchr.c (LONG_MAX): Remove.
24427         * lib/memrchr.c (LONG_MAX): Likewise.
24428         * lib/memchr.c (__memchr): Define via a prototype.
24429         * lib/memrchr.c (__memrchr): Likewise.
24430         * lib/memcmp.c (__P): Remove, and remove all uses.
24431         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
24432         Remove forward decls; no longer needed.
24433         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
24434         Use types required by C89 in prototype.
24435
24436         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
24437         * lib/savedir.c: Likewise.
24438         * lib/mkdir.c (free): Remove decl.
24439         * lib/rmdir.c (rmdir): Define with a prototype.
24440         * lib/savedir.c: Include savedir.h first, to test interface.
24441
24442         * lib/mktime.c (STDC_HEADERS): Remove.
24443         Include <stdlib.h>, <string.h> unconditionally.
24444
24445         * lib/modechange.c: Include <stdlib.h> unconditionally.
24446         (malloc): Remove decl.
24447
24448         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
24449         (free): Remove decl.
24450
24451         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
24452         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
24453         (This type really should be intptr_t, but that's a C99ism.)
24454         (_obstack_memcpy): Remove: all uses changed to memcpy.
24455         Include <string.h> unconditionally.
24456         (struct obstack): Assume __STDC__ for types of members
24457         chunkfun, freefun, extra_arg.
24458         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
24459         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
24460         obstack_begin, obstack_specify_allocation,
24461         obstack_specify_allocation_with_arg, obstack_chunkfun,
24462         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
24463         Remove unprototyped decls and the macros that use them.
24464         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
24465         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
24466         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
24467         (defined __STDC__ && __STDC__)]:
24468         Remove nonprototyped code.
24469         Include <stdlib.h> unconditionally.
24470         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
24471         _obstack_allocated_p, _obstack_free, obstack_free,
24472         _obstack_memory_used, print_and_abort):
24473         Define using prototypes.
24474         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
24475         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
24476         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
24477         obstack_next_free, obstack_object_size, obstack_room) [0]:
24478         Remove unused, unprototyped code.
24479
24480         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
24481
24482         * lib/physmem.c (physmem_total, physmem_available, main): Define
24483         with prototypes.
24484
24485         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
24486         (main): Define with a prototype.
24487
24488         * lib/posixver.c (getenv): Remove decl.
24489
24490         * lib/putenv.c (malloc): Returns void *, not char *.
24491         Include <string.h> unconditionally.
24492         (strchr, memcpy, NULL): Do not define.
24493
24494         * lib/readtokens.c: Include readtokens.h first, to test interface.
24495         Include <stdlib.h>, <string.h> unconditionally.
24496         (init_tokenbuffer): Define with a prototype.
24497
24498         * lib/regex.c (PARAMS): Remove.  All uses removed.
24499         All uses of _RE_ARGS removed, too.
24500         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
24501         unconditionally.
24502         (bzero): Assume memset exists.
24503         (memcmp, memcpy, NULL): Remove.
24504         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
24505         char, or assignments to local vars of type signed char.
24506         (init_syntax_once, PREFIX(extract_number_and_incr),
24507         PREFIX(print_partial_compiled_pattern),
24508         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
24509         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
24510         PREFIX(regex_grow_registers), PREFIX(regex_compile),
24511         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
24512         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
24513         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
24514         wcs_compile_range, byte_compile_range, truncate_wchar,
24515         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
24516         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
24517         count_mbs_length, wcs_re_match_2_internal,
24518         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
24519         PREFIX(alt_match_null_string_p),
24520         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
24521         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
24522         regfree, PREFIX(extract_number)): Define with prototype.  Remove
24523         now-unnecessary declaration, if any.
24524         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
24525         regcomp, regexec):
24526         Remove now-unnecessary casts among pointer types.
24527         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
24528
24529         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
24530         (free): Remove decl.
24531
24532         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
24533
24534         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
24535         (free): Remove decl.
24536
24537         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
24538         * lib/xgetcwd.c: Likewise.
24539
24540         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
24541         (free): Remove decl.
24542
24543         * lib/strchrnul.c (strchrnul): Define with a prototype.
24544         Fix bug: c_in was not converted to char before searching.
24545
24546         The following changes are not K&R related:
24547
24548         * lib/group-member.h: Include <sys/types.h>, so that this file is
24549         self-contained.
24550         * lib/makepath.h: Likewise.
24551
24552         * lib/getusershell.c (readname, default_index, line_size, readname):
24553         Use size_t, not int, for sizes.
24554         (readname): If the size overflows, report an error instead of
24555         looping forever.
24556
24557 2003-09-09  Paul Eggert  <eggert@twinsun.com>
24558
24559         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
24560         libc.
24561
24562 2003-09-09  Paul Eggert  <eggert@twinsun.com>
24563
24564         * README: New section: portability guidelines.
24565
24566 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
24567
24568         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
24569         C89 spec.
24570
24571 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
24572
24573         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
24574
24575 2003-09-08  Paul Eggert  <eggert@twinsun.com>
24576
24577         Assume C89 or better; remove K&R cruft.
24578         A few of these changes were first proposed by Derek Robert Price
24579         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
24580
24581         * lib/addext.c: Include <string.h> unconditionally.
24582         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
24583         Don't declare getenv or malloc.
24584
24585         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
24586         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
24587         (NULL): Remove.
24588         (find_stack_direction, alloca): Use prototypes.
24589
24590         * lib/atexit.c (atexit): Define using a prototype.
24591
24592         * lib/basename.c, dirname.c, stripslash.c:
24593         Include <string.h> unconditionally.
24594
24595         * lib/bcopy.c: Include <stddef.h>.
24596         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
24597
24598         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
24599
24600         * lib/error.h (error, error_at_line, error_print_progname)
24601         [! (defined (__STDC__) && __STDC__)]: Remove decls.
24602         * lib/error.c: Include error.h first, to check interface.
24603         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
24604         (VA_START): Remove; all uses changeed to va_start.
24605         (exit, strerror): Remove decls.
24606         (error_print_progname): Prototype uncondionally.
24607         Don't include <errno.h>; no longer needed.
24608         (private_strerror): Remove.
24609         (error_tail): Always define.
24610         (error, error_at_line): Assume C89 or better; always use prototypes.
24611         * lib/fatal.c: Include "fatal.h" first, to test interface.
24612         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
24613         (VA_START): Remove; all uses changed to va_start.
24614         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
24615         this case.
24616         (exit): Remove decl.
24617         (fatal): Prototype unconditionally.  Assume va_start works.
24618         Abort at end, to pacify gcc.
24619
24620         * lib/euidaccess.c (main): Define with a prototype.
24621
24622         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
24623
24624         * lib/exitfail.c: Include <stdlib.h> unconditionally.
24625
24626         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
24627         prototypes.
24628         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
24629         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
24630         (getenv): Remove decl.
24631         (fnmatch): Define using a prototype.
24632         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
24633         (FCT): Define using a prototype.
24634
24635         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
24636
24637         * lib/gethostname.c: Include <stddef.h>.
24638         (gethostname): Define with prototype.  Length is size_t, not int.
24639
24640 2003-09-08  Paul Eggert  <eggert@twinsun.com>
24641
24642         Assume C89 or better; remove K&R cruft.
24643         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
24644         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
24645         string.h, getenv, malloc.
24646         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
24647         headers.
24648         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
24649         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
24650         do not check for strerror.
24651         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
24652         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
24653         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
24654         do not check for doprnt or vprintf.
24655         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
24656         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
24657
24658 2003-09-08  Paul Eggert  <eggert@twinsun.com>
24659
24660         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
24661         getversion.c should have been removed then, but was accidentally
24662         preserved.
24663
24664         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
24665         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
24666
24667 2003-09-08  Karl Berry  <karl@gnu.org>
24668
24669         * config/config.sub, config.guess, srclistvars.sh: update from savannah
24670                 config, forget about prep.
24671
24672         * config/depcomp, missing: update from automake.
24673
24674 2003-09-07  Paul Eggert  <eggert@twinsun.com>
24675
24676         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
24677         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
24678
24679 2003-09-07  Paul Eggert  <eggert@twinsun.com>
24680
24681         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
24682         copy_tm_result.  Bug reported by Simon Josefsson in
24683         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
24684
24685 2003-09-06  Paul Eggert  <eggert@twinsun.com>
24686
24687         * m4/time_r.m4: New file.
24688         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
24689         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
24690         is. Check for timegm declaration.
24691         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
24692         Do not check for gmtime_r.
24693         Replace mktime if __mktime_internal does not exist and if mktime
24694         hasn't been replaced already.
24695
24696 2003-09-06  Paul Eggert  <eggert@twinsun.com>
24697
24698         * lib/time_r.c, lib/time_r.h: New files.
24699
24700         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
24701         __localtime_r.
24702         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
24703         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
24704
24705         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
24706         __gmtime_r.
24707         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
24708         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
24709         Include <time_r.h>.
24710
24711         * lib/timegm.c: Switch to glibc implementation, with the following
24712         changes:
24713         [defined HAVE_CONFIG_H]: Include <config.h>.
24714         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
24715         (__mktime_internal) [!defined _LIBC]: New decl.
24716         (__gmtime_r) [!defined _LIBC]: New macro and function.
24717         (timegm): Use a prototype, since gnulib assumes C89.
24718         Do not bother declaring tmp to be const, as it's not really usefu.
24719         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
24720         (timegm): Declare only if HAVE_DECL_TIMEGM.
24721
24722 2003-09-06  Paul Eggert  <eggert@twinsun.com>
24723
24724         * MODULES.html.sh (func_all_modules): Add time_r.
24725         * modules/time_r: New file.
24726         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
24727         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
24728
24729 2003-09-03  Paul Eggert  <eggert@twinsun.com>
24730
24731         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
24732         Bug reported by Lute Kamstra in
24733         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
24734
24735         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
24736         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
24737         course with correspondingly smaller numbers for tomorrow and
24738         yesterday.  From Tadayoshi Funaba.  Originally installed into
24739         sh-utils on 1999-08-07, but the patch got lost (I guess during the
24740         coreutils merge?).
24741
24742 2003-08-31  Simon Josefsson  <jas@extundo.com>
24743
24744         * modules/timegm: New file.
24745         * MODULES.html.sh (func_all_modules): Add timegm.
24746
24747 2003-08-31  Simon Josefsson  <jas@extundo.com>
24748
24749         * m4/timegm.m4: New file.
24750
24751 2003-08-31  Simon Josefsson  <jas@extundo.com>
24752
24753         * lib/timegm.h: New file.
24754         * lib/timegm.c: New file.  Based on
24755         wget-1.8.2/src/http.c:mktime_from_utc.
24756
24757 2003-08-31  Karl Berry  <karl@gnu.org>
24758
24759         * lib/argp.h: update from libc.
24760
24761 2003-08-28  Bruno Haible  <bruno@clisp.org>
24762
24763         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
24764         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
24765         followed by '#define fnmatch fnmatch_posix' gives an error.
24766
24767 2003-08-28  Bruno Haible  <bruno@clisp.org>
24768
24769         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
24770         warning on QNX, which defines O_BINARY to 000000.
24771
24772 2003-08-27  Jim Meyering  <jim@meyering.net>
24773
24774         * m4/mkstemp.m4: Require that the system mkstemp be able to create
24775         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
24776         would fail after 32.  Reported by Danny Levinson.  Details here:
24777         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
24778
24779 2003-08-24  Bruno Haible  <bruno@clisp.org>
24780
24781         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
24782         MSVC7 <stdio.h> is included later.
24783
24784 2003-08-22  Simon Josefsson  <jas@extundo.com>
24785
24786         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
24787
24788 2003-08-20  Karl Berry  <karl@gnu.org>
24789
24790         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
24791
24792 2003-08-20  Bruno Haible  <bruno@clisp.org>
24793
24794         * modules/progname: New file.
24795         * MODULES.html.sh (func_all_modules): Add progname.
24796
24797 2003-08-20  Bruno Haible  <bruno@clisp.org>
24798
24799         * lib/progname.h: New file, from GNU gettext.
24800         * lib/progname.c: New file, from GNU gettext.
24801         * lib/progreloc.c: New file, from GNU gettext.
24802
24803 2003-08-19  Jim Meyering  <jim@meyering.net>
24804
24805         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
24806         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
24807
24808 2003-08-19  Bruno Haible  <bruno@clisp.org>
24809
24810         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
24811         more.
24812
24813 2003-08-19  Bruno Haible  <bruno@clisp.org>
24814
24815         * lib/xstrdup.c: Assume <string.h> exists.
24816
24817 2003-08-18  Paul Eggert  <eggert@twinsun.com>
24818
24819         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
24820         in makefile rules.
24821
24822 2003-08-18  Jim Meyering  <jim@meyering.net>
24823
24824         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
24825         * m4/lib-ld.m4: Likewise.
24826
24827 2003-08-18  Jim Meyering  <jim@meyering.net>
24828
24829         * lib/setenv.h: Indent nested cpp directive.
24830         * lib/vasnprintf.c: Remove trailing blanks.
24831
24832 2003-08-17  Simon Josefsson  <jas@extundo.com>
24833
24834         * modules/xstrndup: New file.
24835         * MODULES.html.sh (func_all_modules): Add xstrndup.
24836
24837 2003-08-17  Simon Josefsson  <jas@extundo.com>
24838
24839         * modules/argp: Fix autoconf macro name. Add more dependencies.
24840
24841 2003-08-17  Simon Josefsson  <jas@extundo.com>
24842
24843         * m4/xstrndup.m4: New file.
24844
24845 2003-08-17  Simon Josefsson  <jas@extundo.com>
24846
24847         * m4/argp.m4: New file.
24848
24849 2003-08-17  Simon Josefsson  <jas@extundo.com>
24850             Bruno Haible  <bruno@clisp.org>
24851
24852         * lib/xstrndup.h: New file.
24853         * lib/xstrndup.c: New file.
24854
24855 2003-08-17  Bruno Haible  <bruno@clisp.org>
24856
24857         * modules/strndup (Files, Include): Add lib/strndup.h.
24858
24859 2003-08-17  Bruno Haible  <bruno@clisp.org>
24860
24861         * modules/euidaccess (Files): Add lib/euidaccess.h.
24862
24863 2003-08-17  Bruno Haible  <bruno@clisp.org>
24864
24865         * lib/strndup.h: New file.
24866
24867 2003-08-17  Bruno Haible  <bruno@clisp.org>
24868
24869         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
24870         like AC_GNU_SOURCE.
24871         * modules/extensions (configure.ac): Comment out the invocation of
24872         gl_USE_SYSTEM_EXTENSIONS.
24873
24874 2003-08-16  Paul Eggert  <eggert@twinsun.com>
24875
24876         Merges from coreutils, etc.
24877         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
24878         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
24879         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
24880         fixing a typo.
24881         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
24882         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
24883
24884 2003-08-16  Paul Eggert  <eggert@twinsun.com>
24885
24886         Document merge from coreutils.
24887         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
24888         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
24889         * modules/utime: Add m4/utimes-null.m4.
24890
24891 2003-08-16  Paul Eggert  <eggert@twinsun.com>
24892
24893         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
24894         space, undoing this 2003-08-12 change:
24895         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
24896
24897 2003-08-16  Paul Eggert  <eggert@twinsun.com>
24898
24899         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
24900         strtoul.c from libc, undoing this 2003-08-12 change:
24901         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
24902
24903 2003-08-16  Jim Meyering  <jim@meyering.net>
24904
24905         Merges from coreutils.
24906         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
24907         prefix.  Adjust cache variables similarly.  Create 500 rather than
24908         just 300 files, to exercise bug on Darwin6.5, too.
24909         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
24910         $missing_dir.
24911         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
24912         AM_SYS_POSIX_TERMIOS.
24913         Reported by mkc@mathdogs.com.
24914         Also change use of $am_cv_sys_posix_termios
24915         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
24916         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
24917         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
24918         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
24919         in /proc/mounts until it finds one with matching device number.  This
24920         is unnecessary when the FILE argument *is* a mount point.  No stat call
24921         is necessary in that case.  So, disable the statvfs-testing code on
24922         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
24923         as RedHat bug# 84846.
24924         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
24925         to 1MB, so as not to render systems with no stack size limit (e.g.,
24926         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
24927         Include <unistd.h>.  On some systems,
24928         it is required for the definition of _SC_PAGESIZE.
24929
24930 2003-08-16  Jim Meyering  <jim@meyering.net>
24931
24932         Merge from coreutils.
24933         * lib/xstrtoimax.c: #else #if -> #elif.
24934         * lib/xstrtoumax.c: Likewise.
24935
24936 2003-08-16  Jim Meyering  <jim@meyering.net>
24937
24938         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
24939         * m4/utimes.m4: Removed.
24940         * m4/utimes-null.m4: Renamed from utimes.m4.
24941
24942         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
24943         to 1MB, so as not to render systems with no stack size limit (e.g.,
24944         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
24945         Include <unistd.h>.  On some systems,
24946         it is required for the definition of _SC_PAGESIZE.
24947
24948 2003-08-16  Jim Meyering  <jim@meyering.net>
24949         and Paul Eggert  <eggert@cs.ucla.edu>
24950
24951         Merges from coreutils, etc.
24952
24953         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
24954         using the latest version from cvs.  This avoids problems with #line
24955         directives using a vendor (Sun) compiler.
24956         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
24957         Don't set GETGROUPS_LIB here; now it's
24958         done via getgroups.m4's wrapper function.
24959         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
24960         rather than just in sh-util/configure.in, so that the
24961         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
24962         same.
24963         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
24964         AC_FUNC_GETLOADAVG where to find getloadavg.c.
24965         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
24966         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
24967         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
24968         Remove code that is now done by the newly-required macros.
24969         Append $(EXEEXT) to DF_PROG.
24970         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
24971         Do not invoke or require the following here,
24972         since prereq.m4 or some gnulib .m4 now does this for us:
24973         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
24974         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
24975         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
24976         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
24977         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
24978         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
24979         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
24980         AC_FUNC_OBSTACK.
24981         Do not replace the following functions, as this is now the job
24982         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
24983         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
24984         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
24985         atexit getpass, strdup, getpagesize.
24986         Replace 'raise'.
24987         Do not check for the following functions, as this is now the job
24988         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
24989         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
24990         setregid.
24991         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
24992         Check for sys/sysctl.h.
24993         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
24994         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
24995         of checking for ssize_t ourselves.
24996
24997         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
24998         Require every macro that gnulib/modules/* suggests for us.
24999         (jm_PREREQ_ADDEXT): New macro.
25000         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
25001         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
25002
25003         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
25004         (gl_PHYSMEM): Use it.
25005         Also check for `table' function.
25006         Check for new headers and functions.
25007         Add check for sys/sysmp.h.
25008         With suggestions from Kaveh Ghazi.
25009         Ignore headers that are present but cannot be compiled.  This
25010         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
25011         C 5.4.
25012
25013 2003-08-15  Paul Eggert  <eggert@twinsun.com>
25014
25015         Document merge from coreutils.
25016         * modules/userspec: Depend on posixver.
25017         * modules/strftime: Depend on tzset.
25018
25019 2003-08-15  Paul Eggert  <eggert@twinsun.com>
25020
25021         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
25022         rather than tab, after '#' in shell-script copyright notices.
25023         Suggested by Bruno Haible.
25024
25025 2003-08-15  Paul Eggert  <eggert@twinsun.com>
25026
25027         * config/srclist-update: Use three spaces, rather than tab, after '#'
25028         in shell-script copyright notices.  Suggested by Bruno Haible.
25029         Remove unnecessary parenthesization in regular expression.
25030
25031 2003-08-15  Jim Meyering  <jim@meyering.net>
25032
25033         Merge from coreutils.
25034         * lib/xgethostname.c: Include <stdlib.h>.
25035         (xghostname): Don't exit for anything other than memory-related
25036         failure; just return NULL.
25037         * lib/userspec.c: Include "posixver.h".
25038         (parse_user_spec): Accept `.' as a separator only
25039         in pre-POSIX-200112 mode.
25040         * lib/strtoimax.c: Use #elif rather than #else #if.
25041         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
25042         Remove function, now that we can rely on a working tzset function.
25043         [!_LIBC]: Ensure that the required autoconf test has been run.
25044         [!defined _NL_CURRENT && HAVE_STRFTIME]:
25045         Use underlying_strftime for %r.
25046         * lib/sha.c: Merge in some clean-up and optimization changes from
25047         glibc.
25048         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
25049         Ensure that it is a multiple of 64.
25050         Rearrange loop exit tests so as to avoid performing an
25051         additional fread after encountering an error or EOF.
25052         * lib/realloc.c: Update copyright date.
25053
25054 2003-08-15  Jim Meyering  <jim@meyering.net>
25055         and Paul Eggert  <eggert@twinsun.com>
25056
25057         Merge from coreutils.
25058         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
25059         member but strut utmpx does not.  Needed for AIX 4.3.3.
25060         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
25061
25062 2003-08-15  Jim Meyering  <jim@meyering.net>
25063         and Paul Eggert  <eggert@cs.ucla.edu>
25064
25065         Merges from coreutils, etc.
25066         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
25067         Require gl_FUNC_TZSET_CLOBBER.
25068         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
25069         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
25070         members.
25071
25072 2003-08-14  Paul Eggert  <eggert@twinsun.com>
25073
25074         Help the merge from coreutils.
25075         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
25076         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
25077         * m4/tzset.m4: Use it too.
25078
25079 2003-08-14  Paul Eggert  <eggert@twinsun.com>
25080
25081         * modules/tzset: New file.
25082
25083 2003-08-14  Jim Meyering  <jim@meyering.net>
25084
25085         Merges from coreutils.
25086         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
25087         variable names, rather than @FNMATCH_H@.
25088         * modules/alloca: Likewise for $(ALLOCA_H).
25089
25090         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
25091         the three copies of the literal target, `fnmatch.h'.
25092         * modules/alloca (alloca.h): Likewise.
25093
25094 2003-08-14  Jim Meyering  <jim@meyering.net>
25095
25096         Merge from coreutils.
25097         * m4/tzset.m4: New file.
25098         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
25099         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
25100         otherwise, AIX 5.1 systems would end up using the latter.
25101         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
25102         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
25103         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
25104         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
25105
25106 2003-08-14  Jim Meyering  <jim@meyering.net>
25107
25108         Merge from coreutils.
25109         * lib/obstack.h: Whitespace changes.
25110         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
25111         and xcalloc return values.
25112         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
25113         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
25114         hang on OSF/1 5.1 for DIR on both local and remote file systems.
25115         Reported by (and fix confirmed by) Nelson H. F. Beebe.
25116         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
25117         error from mntctl.
25118         Use mntctl's return value to drive the entry-processing loop, since
25119         we can't rely on the value of the vmt_length member in the last
25120         entry.  On some systems doing so could result in exhausting
25121         virtual memory.  Based in part on a patch from Mike Jetzer.
25122
25123 2003-08-14  Jim Meyering  <jim@meyering.net>
25124         and Paul Eggert  <eggert@twinsun.com>
25125
25126         Merges from coreutils, plus other fixes.
25127         * lib/physmem.c: Merge in portability changes from gcc/libiberty
25128         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
25129         for credits and details.  Thanks to Kaveh Ghazi for helping
25130         to keep these files in sync.
25131         (ARRAY_SIZE): Define it.
25132         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
25133         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
25134         (memcasecmp): Don't assume size_t fits in unsigned int.
25135         Remove casts and duplicate code.
25136         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
25137         (memcpy): Remove definition.
25138         Merge in some clean-up and optimization changes from glibc.
25139         [BLOCKSIZE]: Move definition to top of file.
25140         Ensure that it is a multiple of 64.
25141         Rearrange loop exit tests so as to avoid performing an
25142         additional fread after encountering an error or EOF.
25143         * lib/md5.h (md5_uintptr): Define.
25144         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
25145         return to the initial working directory.  Preserve errno
25146         for caller.
25147         * lib/idcache.c: Include "xalloc.h".
25148         (xmalloc, xrealloc): Remove decls.
25149         (getuser): Remove casts no longer required in C89.
25150         * lib/human.c: Include stdio.h, for sprintf.
25151         * lib/group-member.c: Include "xalloc.h".
25152         (xmalloc, xrealloc): Remove decls.
25153         (get_group_info): Remove casts no longer required in C89.
25154         * lib/getusershell.c (readname): Remove casts no longer required in
25155         C89.
25156         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
25157         * lib/getline.c: Whitespace fix, from coreutils.
25158
25159 2003-08-13  Paul Eggert  <eggert@twinsun.com>
25160
25161         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
25162         Check for isascii.
25163
25164         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
25165         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
25166         Undo previous (whitespace-only) change.
25167
25168 2003-08-13  Paul Eggert  <eggert@twinsun.com>
25169
25170         * lib/exclude.c: Include <ctype.h>
25171         (IN_CTYPE_DOMAIN): New macro.
25172         (is_space): New fn.
25173         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
25174         and empty lines.
25175
25176         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
25177         Undo previous (whitespace-only) change.
25178
25179 2003-08-13  Paul Eggert  <eggert@twinsun.com>
25180
25181         * config/srclist-update: Change update back to the old behavior,
25182         leaving whitespace alone.  Use one 'sed' command rather than a
25183         pipeline.
25184         (fixlicense): Now a variable, not a function.
25185         (remove_trailing_blanks): Remove.
25186         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
25187         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
25188         Undo previous (whitespace-only) change.
25189
25190 2003-08-12  Paul Eggert  <eggert@twinsun.com>
25191
25192         Merge from coreutils.
25193         * modules/euidaccess: Add lib_SOURCES, include for new
25194         file euidaccess.h
25195
25196 2003-08-12  Paul Eggert  <eggert@twinsun.com>
25197
25198         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
25199         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
25200         Normalize leading white space and remove trailing white space.
25201
25202         Merge from coreutils
25203         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
25204
25205         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
25206         0.12.1.  These files are now being upgraded automatically by
25207         ../config/srclist-update.
25208
25209 2003-08-12  Paul Eggert  <eggert@twinsun.com>
25210
25211         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
25212         Normalize leading white space and remove trailing white space.
25213         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
25214         notice, as per ../config/srclist-update.
25215
25216         Merge from coreutils.
25217         * lib/euidaccess.h: New file.
25218         * lib/euidaccess.c: Include it.
25219         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
25220         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
25221         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
25222
25223 2003-08-12  Paul Eggert  <eggert@twinsun.com>
25224
25225         * config/srclist-update: Add copyright notice.
25226         (remove_id_lines, remove_trailing_blanks): New constants.
25227         (fixfile): Use them to normalize spacing a bit in copied files.
25228         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
25229         Normalize leading white space and remove trailing white space.
25230
25231         * config/texinfo.tex: Sync with texinfo.
25232
25233         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
25234         strtoul.c from libc, to merge coreutils whitespace changes.
25235
25236         * config/srclist.txt: Get the following m4 files from gettext:
25237         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
25238         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
25239         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
25240         wint_t.m4.
25241
25242 2003-08-12  Karl Berry  <karl@gnu.org>
25243
25244         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
25245         been made.
25246
25247 2003-08-11  Paul Eggert  <eggert@twinsun.com>
25248
25249         * modules/gnu-source, m4/gnu-source.m4:
25250         Remove; we're assuming Autoconf 2.54 or later now.
25251         Suggested by Bruno Haible.
25252         * MODULES.html.sh (func_all_modules): Remove gnu-source.
25253
25254 2003-08-11  Bruno Haible  <bruno@clisp.org>
25255
25256         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
25257
25258 2003-08-11  Bruno Haible  <bruno@clisp.org>
25259
25260         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
25261         (vasnprintf): Use it instead of wcslen.
25262
25263 2003-08-11  Bruno Haible  <bruno@clisp.org>
25264
25265         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
25266         value to ensure that _Bool promotes to int. Use #define for _Bool when
25267         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
25268
25269 2003-08-10  Karl Berry  <karl@gnu.org>
25270
25271         * lib/regex.h: update from libc (whitespace fix).
25272
25273 2003-08-09  Paul Eggert  <eggert@twinsun.com>
25274
25275         Merge some files from coreutils.  These changes were
25276         originally made by Jim Meyering.
25277         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
25278         many older Unixes require this.
25279         * lib/alloca.c (alloca): Remove cast to argument of free;
25280         no longer needed in C89.
25281         * lib/alloca_.h, regex.h: Fix white space to match
25282         what GNU indent does.
25283
25284 2003-08-09  Paul Eggert  <eggert@twinsun.com>
25285
25286         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
25287         apparently Emacs's Unicode mode got confused before my 2003-08-05
25288         checkin.
25289
25290 2003-08-08  Paul Eggert  <eggert@twinsun.com>
25291
25292         * m4/extensions.m4: New file.
25293         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
25294         Require gl_USE_SYSTEM_EXTENSIONS.
25295         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
25296         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
25297
25298 2003-08-08  Paul Eggert  <eggert@twinsun.com>
25299
25300         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
25301         * modules/extensions, modules/gnu-source: New files.
25302         * modules/timespec, modules/unlocked-io: Depend on extensions.
25303
25304 2003-08-07  Paul Eggert  <eggert@twinsun.com>
25305
25306         * modules/restrict: New file.
25307         * MODULES.html.sh (func_all_modules): Add restrict.
25308         * modules/regex: Depend on restrict.
25309
25310 2003-08-07  Paul Eggert  <eggert@twinsun.com>
25311
25312         * m4/restrict.m4: New file.
25313         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
25314
25315 2003-08-07  Bruno Haible  <bruno@clisp.org>
25316
25317         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
25318         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
25319
25320 2003-08-07  Bruno Haible  <bruno@clisp.org>
25321
25322         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
25323         makes the module 'getndelim2' compatible with the module 'getline'.
25324
25325 2003-08-05  Paul Eggert  <eggert@twinsun.com>
25326
25327         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
25328         byte with "\201" to avoid glitches when editing that source file
25329         with multi-gnome-terminal.
25330
25331 2003-08-05  Paul Eggert  <eggert@twinsun.com>
25332
25333         * lib/bumpalloc.h: Remove.
25334
25335 2003-08-05  Paul Eggert  <eggert@twinsun.com>
25336
25337         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
25338         * modules/bumpalloc: Remove.
25339
25340 2003-08-04  Paul Eggert  <eggert@twinsun.com>
25341
25342         * lib/getloadavg.c: Change copyright notice and spacing to conform to
25343         GNU coding style.
25344
25345         Merge from coreutils.
25346         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
25347         1. From glibc.
25348         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
25349         from Karl Berry, implemented by Jim Meyering.
25350         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
25351         from Dmitry V. Levin.
25352         Remove anachronistic cast of xrealloc.
25353         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
25354         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
25355         type. Otherwise, it wouldn't compile with at least /bin/cc on
25356         ymp-cray-unicos9.0.2.X.
25357         Combine two mostly-identical uses of alloca into one.
25358         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
25359
25360 2003-08-04  Dave Love  <d.love@dl.ac.uk>
25361
25362         [From Emacs.]
25363
25364         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
25365         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
25366         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
25367         obsolete NLIST_NAME_UNION.
25368         [__GNU__]: Undef BSD and FSCALE.
25369         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
25370
25371 2003-08-03  Paul Eggert  <eggert@twinsun.com>
25372
25373         * lib/stdbool_.h (_Bool): Make it signed char, instead of
25374         an enum type, so that it's guaranteed to promote to int.  See:
25375         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
25376
25377 2003-08-03  Karl Berry  <karl@gnu.org>
25378
25379         * config/depcomp: update from automake.
25380
25381 2003-07-31  Paul Eggert  <eggert@twinsun.com>
25382
25383         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
25384         (strerror): Don't assume that a printable int fits in 14 bytes.
25385
25386 2003-07-31  Bruno Haible  <bruno@clisp.org>
25387
25388         * modules/getpass-gnu: New file.
25389         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
25390
25391 2003-07-31  Bruno Haible  <bruno@clisp.org>
25392
25393         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
25394
25395 2003-07-24  Karl Berry  <karl@gnu.org>
25396
25397         * config/missing: update from automake.
25398
25399 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
25400             Bruno Haible  <bruno@clisp.org>
25401
25402         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
25403         * lib/getline.c (getline, getdelim): Likewise.
25404         Remove _GNU_SOURCE define; now it's defined in config.h through
25405         m4/getline.m4.
25406
25407 2003-07-23  Karl Berry  <karl@gnu.org>
25408
25409         * config/config.sub: update from prep.
25410
25411 2003-07-22  Paul Eggert  <eggert@twinsun.com>
25412
25413         * modules/xalloc (Depends-on): Add exitfail.
25414         * modules/xmemcoll: Likewise.
25415
25416 2003-07-22  Paul Eggert  <eggert@twinsun.com>
25417
25418         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
25419         over-parenthesization in macros.
25420
25421         Sync with coreutils.
25422
25423         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
25424         required by C99.
25425
25426         Use `exit_failure' for xalloc and xmemcoll instead of their own
25427         private exit-failure variables.
25428         * lib/xalloc.h (xalloc_exit_failure): Remove.
25429         * lib/xmalloc.c: Likewise.  Include exitfail.h.
25430         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
25431         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
25432         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
25433         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
25434
25435 2003-07-20  Jim Meyering  <jim@meyering.net>
25436
25437         * modules/closeout (Depends-on): Add exitfail.
25438         Suggestion from Bruno Haible.
25439
25440 2003-07-19  Karl Berry  <karl@gnu.org>
25441
25442         * config/config.sub: update from prep.
25443
25444 2003-07-18  Paul Eggert  <eggert@twinsun.com>
25445
25446         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
25447         Remove.
25448         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
25449         to test that it can stand by itself.  Include "exitfail.h".
25450         Clients should set exit_failure instead.
25451         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
25452
25453 2003-07-18  Bruno Haible  <bruno@clisp.org>
25454
25455         * modules/getndelim2: New file.
25456         * modules/getline: Share files with module getndelim2.
25457         * modules/getnline: Depend on getndelim2 instead of sharing files with
25458         it. Add getnline.c to lib_SOURCES.
25459         * MODULES.html.sh (func_all_modules): Add getndelim2.
25460
25461 2003-07-18  Bruno Haible  <bruno@clisp.org>
25462
25463         * m4/getndelim2.m4: New file.
25464         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
25465         invoke gl_PREREQ_GETNDELIM2.
25466         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
25467         gl_PREREQ_GETNDELIM2.
25468         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
25469         gl_GETNDELIM2.
25470
25471 2003-07-18  Bruno Haible  <bruno@clisp.org>
25472
25473         * lib/getndelim2.h: New file.
25474         * lib/getndelim2.c: Make into a module of its own. Include config.h,
25475         getndelim2.h.
25476         (getndelim2): Make non-static. Change return type to ssize_t.
25477         * lib/getline.h: Change argument names.
25478         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
25479         * lib/getnline.c: Include getndelim2.h.
25480
25481 2003-07-18  Andreas Schwab  <schwab@suse.de>
25482
25483         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
25484
25485 2003-07-17  Karl Berry  <karl@gnu.org>
25486
25487         * config/config.sub: update from prep.
25488
25489 2003-07-17  Bruno Haible  <bruno@clisp.org>
25490
25491         * modules/getnline: New file.
25492         * modules/getline: Add lib/getndelim2.c to source file list.
25493         * MODULES.html.sh (func_all_modules): Add getnline.
25494
25495 2003-07-17  Bruno Haible  <bruno@clisp.org>
25496
25497         * m4/getnline.m4: New file.
25498
25499 2003-07-17  Bruno Haible  <bruno@clisp.org>
25500
25501         * m4/Makefile.am.in: Remove file.
25502         * m4/Makefile.am: Remove file.
25503         * m4/Makefile.in: Remove file.
25504
25505 2003-07-17  Bruno Haible  <bruno@clisp.org>
25506
25507         * lib/getnline.h: New file.
25508         * lib/getnline.c: New file.
25509         * lib/getndelim2.c: New file, extracted from getline.c.
25510         (getndelim2): Renamed from getdelim2, with added nmax argument.
25511         * lib/getline.c: Include getndelim2.c.
25512         (getdelim2): Moved out to getndelim2.c.
25513         (getline, getdelim): Update.
25514
25515 2003-07-17  Bruno Haible  <bruno@clisp.org>
25516
25517         * lib/Makefile.am: Remove file.
25518         * lib/Makefile.in: Remove file.
25519
25520 2003-07-17  Bruno Haible  <bruno@clisp.org>
25521
25522         * configure.in: Remove file.
25523         * Makefile.in: Remove file.
25524
25525 2003-07-17  Bruno Haible  <bruno@clisp.org>
25526
25527         * MODULES.html.sh: Put the </BODY> right before </HTML>.
25528
25529 2003-07-16  Karl Berry  <karl@gnu.org>
25530
25531         * config/srclist-update: was running fixlicense twice, which caused
25532                 texinfo.tex to be nullified for some reason.  Simplify,
25533                 $gplsrc is no longer needed as far as I can see?
25534
25535 2003-07-16  Jim Meyering  <jim@meyering.net>
25536
25537         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
25538
25539 2003-07-15  Paul Eggert  <eggert@twinsun.com>
25540
25541         * config/srclist.txt: Get the following files from gettext-runtime/intl
25542         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
25543         ref-del.sin.  From Bruno Haible.
25544         * config/srclist-update (fixfile): Change grep pattern again, since the
25545         previous fix didn't work (there was another trailing $).  Use
25546         '[$]' to escape the $s.
25547
25548 2003-07-15  Karl Berry  <karl@gnu.org>
25549
25550         * lib/vasnprintf.c: update from gettext.
25551
25552 2003-07-15  Karl Berry  <karl@gnu.org>
25553
25554         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
25555         gets expanded when surrounded by '$'.
25556
25557 2003-07-15  Jim Meyering  <jim@meyering.net>
25558
25559         * modules/save-cwd: Don't depend on error.  From Derek Price.
25560
25561 2003-07-15  Jim Meyering  <jim@meyering.net>
25562
25563         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
25564
25565 2003-07-14  Simon Josefsson  <jas@extundo.com>
25566
25567         * modules/mempcpy: New file.
25568         * MODULES.html.sh (func_all_modules): Add mempcpy.
25569
25570 2003-07-14  Simon Josefsson  <jas@extundo.com>
25571
25572         * m4/mempcpy.m4: New file.
25573
25574 2003-07-14  Simon Josefsson  <jas@extundo.com>
25575
25576         * lib/mempcpy.h: New file.
25577         * lib/mempcpy.c: New file.
25578
25579 2003-07-14  Paul Eggert  <eggert@twinsun.com>
25580
25581         * modules/getdate, modules/posixtm: Depend on mktime.
25582
25583 2003-07-14  Paul Eggert  <eggert@twinsun.com>
25584
25585         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
25586         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
25587         unicodeio.c, unicodeio.h, unlocked-io.h:
25588         Switch from LGPL to GPL.
25589
25590 2003-07-14  Paul Eggert  <eggert@twinsun.com>
25591
25592         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
25593         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
25594         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
25595         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
25596         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
25597         updated automatically by ../config/srclist-update.  This changes
25598         their license from LPGL to GPL.
25599
25600 2003-07-14  Paul Eggert  <eggert@twinsun.com>
25601
25602         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
25603         assumed to refer to the root of the most recent stable gettext version.
25604         * config/srclistvars.sh: Add defaults for eggert.
25605         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
25606         Match "This program" as well as "The program".  This is needed
25607         for gettext.
25608
25609 2003-07-14  Jim Meyering  <jim@meyering.net>
25610
25611         Don't emit diagnostics.  Let callers do that.
25612         * lib/save-cwd.c: Don't include "error.h".
25613         (save_cwd): Don't call error.  Ensure that errno is valid
25614         when returning nonzero.
25615
25616         * lib/save-cwd.h (restore_cwd): Update prototype.
25617         * lib/save-cwd.c (restore_cwd): Remove two parameters.
25618         Simplify.  Don't call error upon failure.  Let callers do that.
25619         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
25620         when auditing is enabled.  But don't bother updating the #if.
25621
25622 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
25623
25624         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
25625         it breaks C++ compilation.
25626         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
25627
25628 2003-07-10  Simon Josefsson  <jas@extundo.com>
25629
25630         * modules/strchrnul (Makefile.am): Add strchrnul.h.
25631
25632 2003-07-10  Jim Meyering  <jim@meyering.net>
25633
25634         * m4/clock_time.m4: Remove trailing blank.
25635         * m4/intmax_t.m4: Likewise.
25636
25637 2003-07-10  Jim Meyering  <jim@meyering.net>
25638
25639         * lib/vasnprintf.c: Remove trailing blanks.
25640         Make cpp indentation consistent.
25641
25642 2003-07-09  Paul Eggert  <eggert@twinsun.com>
25643
25644         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
25645         posixver.c, strftime.c, strnlen.c, strverscmp.c:
25646         Switch from LGPL to GPL.
25647
25648 2003-07-09  Paul Eggert  <eggert@twinsun.com>
25649
25650         * config/srclist.txt: Sort sublists.  Add
25651         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
25652         that differ from gnulib for one reason or another; we'd like this list
25653         to be smaller but for now let's document what we have.
25654
25655 2003-07-08  Paul Eggert  <eggert@twinsun.com>
25656
25657         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
25658         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
25659         and sweeter "eval x=$x".
25660         * config/srclist.txt: Get lib/argp* from glibc.
25661
25662 2003-07-07  Paul Eggert  <eggert@twinsun.com>
25663
25664         * lib/mktime.c: Fix some boundary cases and remove need for floating
25665         point.
25666
25667         Issue a compile-time diagnostic if time_t is floating point, or if
25668         two's complement arithmetic is not in effect, or if arithmetic
25669         right shift does not propagate the sign.  These assumptions were
25670         all in the original code but they weren't checked.
25671
25672         (TIME_T_MIDPOINT, verify): New macros.
25673         (__isleap): Remove; it has integer overflow problems.
25674         (leapyear): New function, without those problems.
25675         (ydhms_tm_diff): Remove; splitting into two parts.
25676         (ydhms_diff): New function, containing the arithmetic part of
25677         the old ydhms_tm_diff function.  Issue a compile-time
25678         diagnostic if we are not using C99 integer division.
25679         Avoid casts when possible.
25680         (guess_time_tm): New function, containing the checking part of
25681         the old ydhms_tm_diff function.  Return the new value, rather than
25682         the difference between it and the old.  Accept a new argument T
25683         so that *T specifies the old value.  Check for overflow in the result.
25684
25685         (__mktime_internal): Use a time_t offset, not a long int offset.
25686         This undoes the 2003-06-04 change, which is no longer needed now
25687         that we have better overflow checking.
25688         (localtime_offset): Likewise.
25689
25690         (__mktime_internal): Avoid harmful overflow on hosts where time_t
25691         and long are 64-bit but int is only 32-bit.
25692         (ydhms_diff): Use long int to store year1 and yday1.
25693         Issue a compile-time diagnostic if long int is not wide enough.
25694
25695         (__mktime_internal): Use long int to store adjusted year and yday.
25696         Use plain C rather than preprocessor commands, if that doesn't
25697         affect efficiency.
25698         Check for overflow (and try to repair) after each probe
25699         rather than checking only at the very end.  This avoids some bugs
25700         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
25701         does not equal GMT offset at maximum time).
25702         Use integer to check for overflow rather than floating point; this
25703         is more portable to non-IEEE hosts, and is a tad faster.
25704         When we detect that we are oscillating between two values,
25705         don't check whether tm_isdst has the requested value, since
25706         we already know the answer.  When tm_isdst has the wrong value,
25707         use a different heuristic to find the right one, based on the
25708         extreme values actually observed in practice in tz2003a,
25709         rather than the (overly optimistic) "previous 3 calendar quarters".
25710
25711         (not_equal_tm, print_tm, check_result): Use "const T" rather than
25712         "T const" to accommodate glibc style.
25713         (check_result): Use less-confusing report format.  "long" -> "long int.
25714         (main): Likewise.
25715         Don't loop if the iteration overflows time_t.
25716         Allow a negative step in the iteration.
25717
25718 2003-07-06  Karl Berry  <karl@gnu.org>
25719
25720         * config/depcomp: update from automake.
25721         * config/config.sub: update from prep.
25722
25723 2003-07-03  Karl Berry  <karl@gnu.org>
25724
25725         * config/config.guess: update from prep.
25726
25727 2003-07-01  Paul Eggert  <eggert@twinsun.com>
25728
25729         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
25730         xreadlink.c now includes it unconditionally.
25731
25732 2003-07-01  Paul Eggert  <eggert@twinsun.com>
25733
25734         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
25735         having it depend on HAVE_SYS_TYPES_H.
25736
25737 2003-07-01  Bruno Haible  <bruno@clisp.org>
25738
25739         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
25740         <sys/types.h> should be sufficient.
25741         Reported by Paul Eggert.
25742
25743 2003-06-26  Karl Berry  <karl@gnu.org>
25744
25745         * config/depcomp: update from automake.
25746
25747 2003-06-26  Bruno Haible  <bruno@clisp.org>
25748
25749         * modules/human: Depend on module stdbool.
25750
25751 2003-06-25  Bruno Haible  <bruno@clisp.org>
25752
25753         * modules/readlink: New file.
25754         * modules/xreadlink: Depend on it.
25755         * MODULES.html.sh (func_all_modules): Add readlink.
25756
25757 2003-06-25  Bruno Haible  <bruno@clisp.org>
25758
25759         * m4/readlink.m4: New file.
25760
25761 2003-06-25  Bruno Haible  <bruno@clisp.org>
25762
25763         * lib/readlink.c: New file.
25764
25765 2003-06-22  Karl Berry  <karl@gnu.org>
25766
25767         * config/srclist.txt: update mkinstalldirs from automake.
25768         * config/mkinstalldirs: update.
25769
25770 2003-06-22  Bruno Haible  <bruno@clisp.org>
25771
25772         Portability to mingw32.
25773         * m4/ssize_t.m4: New file, from GNU gettext.
25774         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
25775         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
25776
25777 2003-06-22  Bruno Haible  <bruno@clisp.org>
25778
25779         * modules/safe-read: Add m4/ssize_t.m4.
25780         * modules/xreadlink: Add m4/ssize_t.m4.
25781
25782 2003-06-20  Bruno Haible  <bruno@clisp.org>
25783
25784         Assume C89, so PARAMS isn't needed.
25785         * lib/unicodeio.h (PARAMS): Remove.
25786         * lib/unicodeio.c: Don't use PARAMS.
25787
25788 2003-06-18  Karl Berry  <karl@gnu.org>
25789
25790         * config/config.{guess,sub}: update from prep.
25791
25792 2003-06-18  Jim Meyering  <jim@meyering.net>
25793
25794         Merge changes from coreutils.
25795         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
25796         Remove explicit declarations of xmalloc and realloc.
25797         Include xalloc.h.
25798         (read_utmp): Remove anachronistic cast of xmalloc.
25799
25800 2003-06-17  Paul Eggert  <eggert@twinsun.com>
25801
25802         Assume C89, so PARAMS isn't needed.
25803         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
25804         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
25805         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
25806         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
25807         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
25808         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
25809         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
25810         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
25811         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
25812         lib/xstrtod.h, lib/xstrtol.h: Likewise.
25813         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
25814         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
25815         no longer needed. Anyway, config.h should always be included before any
25816         other file.
25817
25818 2003-06-11  Simon Josefsson  <jas@extundo.com>
25819
25820         * modules/sysexits: New file.
25821         * MODULES.html.sh (func_all_modules): Add sysexits.
25822
25823 2003-06-11  Simon Josefsson  <jas@extundo.com>
25824
25825         * lib/sysexit_.h: New file.
25826
25827 2003-06-11  Derek Price  <derek@ximbiot.com>
25828
25829         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
25830         necessary.
25831
25832 2003-06-11  Bruno Haible  <bruno@clisp.org>
25833
25834         * m4/sysexits.m4: New file.
25835
25836 2003-06-10  Simon Josefsson  <jas@extundo.com>
25837
25838         * lib/argp.h: New file, from glibc.
25839         * lib/argp-ba.c: New file, from glibc.
25840         * lib/argp-eexst.c: New file, from glibc.
25841         * lib/argp-fmtstream.c: New file, from glibc.
25842         * lib/argp-fmtstream.h: New file, from glibc.
25843         * lib/argp-fs-xinl.c: New file, from glibc.
25844         * lib/argp-help.c: New file, from glibc.
25845         * lib/argp-namefrob.h: New file, from glibc.
25846         * lib/argp-parse.c: New file, from glibc.
25847         * lib/argp-pv.c: New file, from glibc.
25848         * lib/argp-pvh.c: New file, from glibc.
25849         * lib/argp-xinl.c: New file, from glibc.
25850
25851 2003-06-10  Simon Josefsson  <jas@extundo.com>
25852
25853         * modules/strchrnul: New file.
25854
25855 2003-06-10  Simon Josefsson  <jas@extundo.com>
25856
25857         * modules/argp: New file.
25858
25859 2003-06-10  Simon Josefsson  <jas@extundo.com>
25860
25861         * m4/strchrnul.m4: New file.
25862
25863 2003-06-10  Simon Josefsson  <jas@extundo.com>
25864
25865         * lib/strchrnul.h: New file.
25866         * lib/strchrnul.c: New file.
25867
25868 2003-06-10  Bruno Haible  <bruno@clisp.org>
25869
25870         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
25871
25872 2003-06-07  Karl Berry  <karl@gnu.org>
25873
25874         * config/config.{guess,sub}: update from prep.
25875
25876 2003-06-07  Jim Meyering  <jim@meyering.net>
25877
25878         * modules/strtod: Use $(...) notation, not @...@ for
25879         AC_REPLACE'd variables.
25880         * modules/localcharset: Likewise.
25881
25882 2003-06-07  Jim Meyering  <jim@meyering.net>
25883
25884         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
25885         in place of my name in the copyright comment.
25886         Remove definition and uses of __P.
25887
25888         From coreutils.
25889         * lib/stat.c: Don't declare xmalloc explicitly.
25890         Instead, include "xalloc.h".
25891         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
25892         xrealloc, and xcalloc return values.
25893         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
25894         Improve comment.
25895         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
25896
25897 2003-06-07  Bruno Haible  <bruno@clisp.org>
25898
25899         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
25900         avoid AC_CONFIG_LINKS.
25901         * modules/fnmatch (Makefile.am): Use explicit creation rule for
25902         fnmatch.h, to avoid AC_CONFIG_LINKS.
25903         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
25904
25905 2003-06-07  Bruno Haible  <bruno@clisp.org>
25906
25907         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
25908         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
25909         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
25910         directory.
25911         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
25912         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
25913         directory.
25914
25915 2003-06-06  Jim Meyering  <jim@meyering.net>
25916
25917         Merge from coreutils.
25918         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
25919         Consolidate declarations and initializations of *_base* locals.
25920
25921         Merge from coreutils.
25922         This avoids a core dump on systems without GNU putenv,
25923         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
25924         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
25925         (unsetenv): New static function, from GNU libc.
25926         (rpl_putenv): Use it.
25927
25928         * lib/modechange.c: Remove trailing blanks.
25929
25930         Merge from coreutils.
25931         * lib/fsusage.c: Remove declaration of statfs.
25932         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
25933
25934         * lib/posixtm.c: Include <stdbool.h> unconditionally.
25935
25936 2003-06-06  Jim Meyering  <jim@meyering.net>
25937
25938         * lib/stdbool_.h: Renamed from stdbool.h.in.
25939
25940 2003-06-06  Jim Meyering  <jim@meyering.net>
25941             Bruno Haible  <bruno@clisp.org>
25942
25943         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
25944         Adjust Makefile.am snippet not to redirect directly to target.
25945         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
25946
25947 2003-06-05  Paul Eggert  <eggert@twinsun.com>
25948
25949         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
25950         mismatch, look in future quarters as well as past.  This fixes a
25951         bug when processing fall-backwards gaps immediately after a long
25952         period of daylight-saving time.
25953
25954         * lib/mktime.c: Assume freestanding C89 or better.
25955         (HAVE_LIMITS_H): Remove.  Assume it's 1.
25956         (__P): Remove; not used.
25957         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
25958         (mktime, not_equal_tm, print_tm, check_result,
25959         main): Use prototypes.  Use const * where appropriate.
25960         (main): Fix typo in testing code that uncovered by above changes.
25961         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
25962
25963 2003-06-04  Paul Eggert  <eggert@twinsun.com>
25964
25965         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
25966         locale.h, localeconv.  This merges changes from coreutils.
25967
25968         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
25969         It can be removed after the next Autoconf is released.
25970         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
25971         needed.
25972
25973 2003-06-04  Paul Eggert  <eggert@twinsun.com>
25974
25975         * lib/mktime.c: Fix Debian bug 177940
25976         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
25977         (localtime_offset): Now long int, not time_t, because we want it
25978         to be guaranteed to be signed.  All uses changed.
25979         (__mktime_internal): If overflow would occur when adding offset,
25980         don't add it.
25981
25982         Merge 'human' changes from coreutils.  Rewrite to support
25983         locale-specific notations like thousands separators.
25984         * lib/human.c: Simplify authorship notice.
25985         Include human.h immediately after config.h.
25986         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
25987         <limits.h>: Do not include, since human.h does.
25988         (SIZE_MAX, UINTMAX_MAX): New macros.
25989         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
25990         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
25991         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
25992         (power_letter): Renamed from suffixes.
25993         (generate_suffix_backwards): Remove.
25994         (adjust_value): Now takes int style (because of human.h changes)
25995         and long double value (for greater precision on some platforms).
25996         (group_number): New function.
25997         (human_readable): Use it.  Use integer options, not enum.
25998         Put the options before the sizes in the arg list.
25999         Support all the new options.
26000         The old human_readable function has been removed;
26001         use inttostr.h instead.
26002         (human_readable, default_block_size, humblock):
26003         Use uintmax_t, not int, for block sizes.
26004         (human_readable_inexact, block_size_types): Remove.
26005         (block_size_opts): New constant.
26006         (human_options): Renamed from human_block_size, with new signature
26007         that allows block sizes up to UINTMAX_MAX.  All callers changed.
26008         * lib/human.h: Add copyright and authorship notice.
26009         Include <limits.h> and <stdbool.h> unconditionally.
26010         (PARAMS): Remove.  All uses removed.
26011         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
26012         (enum human_inexact_style): Remove tag; now a nameless enum.
26013         (human_floor, human_ceiling, human_round_to_even): Now have
26014         values 2, 0, 1 rather than -1, 1, 0.
26015         (human_group_digits, human_suppress_point_zero, human_autoscale,
26016         human_base_1024, human_SI, human_B): New constants.
26017         (human_readable_inexact, human_block_size): Remove.
26018         (human_readable): Size args are now uintmax_t, not int.
26019         (human_options): New decl.
26020
26021         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
26022         unnecessary now that we assume C89 or better.  This change
26023         imported from coreutils.
26024
26025         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
26026         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
26027         in the 2003-05-30 sync from glibc.
26028
26029         .h files should stand alone, but we shouldn't include <sys/types.h>
26030         if we can get away with just <stddef.h>.
26031
26032         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
26033         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
26034         rather than <sys/types.h>, as we merely need size_t.
26035         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
26036         to get size_t.
26037         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
26038         Include <stdio.h>, to get FILE.
26039         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
26040         memcasecmp.h has included <stddef.h> and all we need is size_t.
26041         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
26042         our interface, instead of including <sys/types.h>
26043
26044 2003-06-04  Paul Eggert  <eggert@twinsun.com>
26045
26046         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
26047         now, as glibc mktime is buggy on non-glibc systems.
26048
26049 2003-06-03  Karl Berry  <karl@gnu.org>
26050
26051         * config/config.sub: update from prep.
26052
26053 2003-06-02  Paul Eggert  <eggert@twinsun.com>
26054
26055         [from coreutils]
26056         Fix some minor time-related bugs with POSIX time arguments.
26057         Some valid time stamps were being rejected (notably -1, and
26058         time stamps before 1900 on 64-bit hosts).  And some invalid
26059         time stamps were being accepted, e.g. September 31.
26060
26061         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
26062         that we can return (time_t) -1 successfully.
26063         * lib/posixtm.c: Likewise.
26064         [HAVE_STDBOOL_H]: Include <stdbool.h>.
26065         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
26066         (t): Remove static var.
26067         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
26068         of static var.  All uses changed.
26069         (year): Do not reject years before 1900; they can occur with
26070         64-bit time_t.
26071         (posix_time_parse): Do not check for out-of-range components;
26072         that is now the caller's responsibility, since our checks were
26073         only approximations.
26074         (posixtime): Use mktime to check for out-of-range components,
26075         since it knows them exactly.
26076         If mktime returns (time_t) -1, check whether an error actually occurred
26077         by invoking localtime on -1.
26078         (main) [TEST_POSIXTIME]: Check for input data errors, and report
26079         posixtime failures better.
26080         Improve the test data (in comments only).
26081
26082 2003-06-02  Karl Berry  <karl@gnu.org>
26083
26084         * config/mkinstalldirs (version): new variable.
26085         (--version): new option.
26086         (usage): improve message.
26087
26088 2003-05-30  Karl Berry  <karl@gnu.org>
26089
26090         * lib/mktime.c: update from libc.
26091
26092 2003-05-30  Bruno Haible  <bruno@clisp.org>
26093
26094         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
26095         * config/config.rpath: Upgrade to gettext-0.12.1.
26096
26097 2003-05-30  Bruno Haible  <bruno@clisp.org>
26098
26099         * m4/gettext.m4: Upgrade to gettext-0.12.1.
26100         * m4/nls.m4: New file, from gettext-0.12.1.
26101         * m4/po.m4: New file, from gettext-0.12.1.
26102         * m4/progtest.m4: Upgrade to gettext-0.12.1.
26103
26104 2003-05-30  Bruno Haible  <bruno@clisp.org>
26105
26106         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
26107         * lib/localcharset.h: Likewise.
26108         * lib/localcharset.c: Likewise.
26109
26110 2003-05-29  Karl Berry  <karl@gnu.org>
26111
26112         * config/config.rpath: update from gettext.
26113
26114 2003-05-28  Paul Eggert  <eggert@twinsun.com>
26115
26116         Assume the headers required for C89 freestanding compilers.
26117         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
26118         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
26119         * m4/human.m4 (gl_HUMAN): Likewise.
26120         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
26121         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
26122         * m4/userspec.m4 (gl_USERSPEC): Likewise.
26123         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
26124         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
26125         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
26126
26127 2003-05-28  Paul Eggert  <eggert@twinsun.com>
26128
26129         Assume the headers required for C89 freestanding compilers.
26130         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
26131         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
26132         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
26133         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
26134         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
26135         define, since <limits.h> is guaranteed to do that.
26136         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
26137         * lib/exclude.c: Include <stdbool.h> unconditionally.
26138         * lib/tempname.c: Include <stddef.h> unconditionally.
26139         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
26140         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
26141         <stddef.h> does that.
26142         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
26143         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
26144         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
26145         needed.
26146         * lib/xstrtol.c: Likewise.
26147         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
26148         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
26149
26150         * lib/addext.c (addext): Use assignment rather than cast, to avoid
26151         warnings on some platforms.
26152
26153         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
26154         arbitrarily.
26155
26156 2003-05-26  Jim Meyering  <jim@meyering.net>
26157
26158         Merge in a change from coreutils:
26159         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
26160         that is guaranteed to be `no'.  Use `no_such_member' to indicate
26161         that condition, rather than `-1' which is slightly misleading.
26162         Change the name of the cache variable to have the gl_ prefix.
26163         Prompted by a patch from Richard Dawe for DJGPP.
26164
26165 2003-05-24  Karl Berry  <karl@gnu.org>
26166
26167         * config/config.guess: update from prep.
26168
26169 2003-05-22  Karl Berry  <karl@gnu.org>
26170
26171         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
26172
26173 2003-05-20  Karl Berry  <karl@gnu.org>
26174
26175         * config/config.guess: update from prep.
26176
26177 2003-05-18  Karl Berry  <karl@gnu.org>
26178
26179         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
26180         might actually be set by the user.
26181
26182         * config/depcomp, install-sh, mdate-sh: update from automake.
26183
26184 2003-05-17  Bruno Haible  <bruno@clisp.org>
26185
26186         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
26187         invalid expansion for AC_EGREP_CPP.
26188         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
26189         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
26190         Suggested by Akim Demaille <akim@epita.fr> in
26191         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
26192
26193 2003-05-12  Jim Meyering  <jim@meyering.net>
26194
26195         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
26196         the space-padded-by-default conversion specifiers, %e, %k, %l.
26197
26198 2003-05-12  Bruno Haible  <bruno@clisp.org>
26199
26200         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
26201         the string is longer than 4 KB.
26202
26203 2003-05-11  Karl Berry  <karl@gnu.org>
26204
26205         * config/config.{guess,sub}: update from prep.
26206
26207 2003-05-09  Bruno Haible  <bruno@clisp.org>
26208
26209         * modules/error: Add m4/strerror_r.m4 to file list.
26210
26211 2003-05-03  Bruno Haible  <bruno@clisp.org>
26212
26213         Upgrade to Unicode-4.0.
26214         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
26215         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
26216         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
26217         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
26218         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
26219         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
26220         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
26221         Change width of U+E0100..U+E01EF from 1 to 0.
26222
26223 2003-04-25  Jim Meyering  <jim@meyering.net>
26224
26225         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
26226         of type size_t, not int.
26227
26228 2003-04-25  Bruno Haible  <bruno@clisp.org>
26229
26230         * lib/copy-file.c: Include <stddef.h>, for size_t.
26231
26232 2003-04-21  Paul Eggert  <eggert@twinsun.com>
26233
26234         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
26235         code which expansion is under static control.  Patch imported from
26236         Akim Demaille's patch to Bison; see
26237         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
26238
26239 2003-04-14  Bruno Haible  <bruno@clisp.org>
26240
26241         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
26242
26243 2003-04-11  Jim Meyering  <jim@meyering.net>
26244
26245         Merge changes from Coreutils.
26246
26247         2003-03-22  Jim Meyering  <jim@meyering.net>
26248
26249         * lib/strftime.c (widen): Cast alloca return value to proper type.
26250
26251         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
26252
26253         From GNU libc.
26254         * lib/strftime.c (my_strftime): Handle very large width
26255         specifications for numeric values correctly.  Improve checks for
26256         overflow.
26257
26258         2003-01-19  Jim Meyering  <jim@meyering.net>
26259
26260         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
26261         definitions.
26262         (nl_get_alt_digit) [! defined my_strftime]: Define.
26263         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
26264         _nl_get_alt_digit and _nl_get_walt_digit.
26265
26266         * lib/strftime.c (my_strftime): Merge in locale-related changes from
26267         libc. These changes have no effect outside of _LIBC.
26268
26269 2003-04-10  Bruno Haible  <bruno@clisp.org>
26270
26271         * modules/findprog: New file.
26272         * MODULES.html.sh (func_all_modules): Add it.
26273
26274 2003-04-10  Bruno Haible  <bruno@clisp.org>
26275
26276         * m4/findprog.m4: New file.
26277         * m4/eaccess.m4: New file.
26278
26279 2003-04-10  Bruno Haible  <bruno@clisp.org>
26280
26281         * lib/findprog.h: New file, from GNU gettext.
26282         * lib/findprog.c: New file, from GNU gettext.
26283
26284 2003-04-05  Jim Meyering  <jim@meyering.net>
26285
26286         Merge changes from Coreutils.
26287
26288         * lib/exclude.h (PARAMS): Remove definition and uses.
26289         * lib/exclude.c: Remove uses of `PARAMS'.
26290
26291         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
26292         Add test-cases for DOS filenames. Declare program_name.
26293         (main): Set up program_name.  Patch by Rich Dawe.
26294
26295         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
26296         error from mntctl.
26297         Use mntctl's return value to drive the entry-processing loop, since
26298         we can't rely on the value of the vmt_length member in the last
26299         entry.  On some systems doing so could result in exhausting
26300         virtual memory.  Based in part on a patch from Mike Jetzer.
26301
26302 2003-04-04  Bruno Haible  <bruno@clisp.org>
26303
26304         * modules/linebreak: New file.
26305         * MODULES.html.sh (func_all_modules): Add it.
26306
26307 2003-04-04  Bruno Haible  <bruno@clisp.org>
26308
26309         * m4/linebreak.m4: New file.
26310
26311 2003-04-04  Bruno Haible  <bruno@clisp.org>
26312
26313         * lib/linebreak.h: New file, from GNU gettext.
26314         * lib/linebreak.c: New file, from GNU gettext with slight
26315         modifications.
26316         * lib/lbrkprop.h: New file, from GNU gettext.
26317
26318 2003-04-03  Bruno Haible  <bruno@clisp.org>
26319
26320         * modules/utf8-ucs4: New file.
26321         * modules/utf16-ucs4: New file.
26322         * modules/ucs4-utf8: New file.
26323         * modules/ucs4-utf16: New file.
26324         * MODULES.html.sh (func_all_modules): Add them.
26325
26326 2003-04-03  Bruno Haible  <bruno@clisp.org>
26327
26328         * m4/utf-ucs4.m4: New file.
26329         * m4/ucs4-utf.m4: New file.
26330
26331 2003-04-03  Bruno Haible  <bruno@clisp.org>
26332
26333         * lib/utf8-ucs4.h: New file, from GNU gettext.
26334         * lib/utf16-ucs4.h: New file, from GNU gettext.
26335         * lib/ucs4-utf8.h: New file, from GNU gettext.
26336         * lib/ucs4-utf16.h: New file, from GNU gettext.
26337
26338 2003-04-02  Bruno Haible  <bruno@clisp.org>
26339
26340         * modules/binary-io: New file.
26341         * MODULES.html.sh (func_all_modules): Add it.
26342
26343 2003-04-02  Bruno Haible  <bruno@clisp.org>
26344
26345         * lib/binary-io.h: New file, from GNU gettext.
26346
26347 2003-04-01  Bruno Haible  <bruno@clisp.org>
26348
26349         * modules/pathname: New file.
26350         * MODULES.html.sh (func_all_modules): Add it.
26351
26352 2003-04-01  Bruno Haible  <bruno@clisp.org>
26353
26354         * lib/pathname.h: New file, from GNU gettext.
26355         * lib/concatpath.c: New file, from GNU gettext.
26356
26357 2003-03-30  Bruno Haible  <bruno@clisp.org>
26358
26359         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
26360
26361 2003-03-30  Bruno Haible  <bruno@clisp.org>
26362
26363         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
26364         function chown() doesn't exist.
26365
26366 2003-03-28  Bruno Haible  <bruno@clisp.org>
26367
26368         * modules/copy-file: New file.
26369         * MODULES.html.sh (func_all_modules): Add it.
26370
26371 2003-03-28  Bruno Haible  <bruno@clisp.org>
26372
26373         * m4/copy-file.m4: New file.
26374
26375 2003-03-28  Bruno Haible  <bruno@clisp.org>
26376
26377         * lib/copy-file.h: New file, from GNU gettext.
26378         * lib/copy-file.c: New file, from GNU gettext.
26379
26380 2003-03-18  Jim Meyering  <jim@meyering.net>
26381
26382         * lib/quote.c (quote_n): Fix typo in comment.
26383
26384 2003-03-18  Bruno Haible  <bruno@clisp.org>
26385
26386         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
26387         checking.
26388         * m4/onceonly_2_57.m4: Likewise.
26389
26390 2003-03-17  Bruno Haible  <bruno@clisp.org>
26391
26392         * m4/onceonly.m4: Require autoconf 2.54 or newer.
26393         (m4_quote): Remove macro.
26394         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
26395
26396 2003-03-14  Jim Meyering  <jim@meyering.net>
26397
26398         Merge changes from Coreutils.
26399         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
26400         to be const, in order to avoid warnings.
26401         (obstack_room): Likewise.
26402         (obstack_empty_p): Likewise.
26403
26404 2003-03-14  Bruno Haible  <bruno@clisp.org>
26405
26406         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
26407         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
26408
26409 2003-03-13  Paul Eggert  <eggert@twinsun.com>
26410
26411         Merge changes from Bison.
26412         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
26413         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
26414         when compiling Bison 1.875's `bitset bset = obstack_alloc
26415         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
26416         * lib/hash.c: Include <stdbool.h> unconditionally.
26417
26418 2003-03-13  Paul Eggert  <eggert@twinsun.com>
26419
26420         * m4/onceonly.m4 (m4_quote): New macro.
26421         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
26422         Quote AC_FOREACH variable-expansions properly.
26423
26424 2003-03-13  Paul Eggert  <eggert@twinsun.com>
26425
26426         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
26427
26428 2003-03-09  Paul Eggert  <eggert@twinsun.com>
26429
26430         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
26431         Reported by Bruce Becker; see:
26432         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
26433
26434 2003-03-03  Paul Eggert  <eggert@twinsun.com>
26435             Bruno Haible  <bruno@clisp.org>
26436
26437         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
26438         Reported by John Hughes, see
26439         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
26440
26441 2003-02-20  Bruno Haible  <bruno@clisp.org>
26442
26443         * MODULES.html.sh (func_all_modules): Add poll.
26444
26445 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
26446
26447         * modules/poll: New file.
26448
26449 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
26450
26451         * lib/poll_.h: New file.
26452         * lib/poll.c: New file.
26453
26454 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
26455
26456         * m4/poll.m4: New file.
26457
26458 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
26459
26460         * modules/mathl: New file.
26461
26462 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
26463
26464         * lib/mathl.h: New file.
26465         * lib/acosl.c: New file.
26466         * lib/asinl.c: New file.
26467         * lib/atanl.c: New file.
26468         * lib/ceill.c: New file.
26469         * lib/cosl.c: New file.
26470         * lib/expl.c: New file.
26471         * lib/floorl.c: New file.
26472         * lib/frexpl.c: New file.
26473         * lib/ldexpl.c: New file.
26474         * lib/logl.c: New file.
26475         * lib/sincosl.c: New file.
26476         * lib/sinl.c: New file.
26477         * lib/sqrtl.c: New file.
26478         * lib/tanl.c: New file.
26479         * lib/trigl.c: New file.
26480         * lib/trigl.h: New file.
26481
26482 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
26483
26484         * m4/mathl.m4: New file.
26485
26486 2003-02-18  Bruno Haible  <bruno@clisp.org>
26487
26488         * MODULES.html.sh (func_all_modules): Add mathl.
26489
26490 2003-02-17  Bruno Haible  <bruno@clisp.org>
26491
26492         * modules/mkdtemp: New module.
26493         * MODULES.html.sh (func_all_modules): Add it.
26494
26495 2003-02-17  Bruno Haible  <bruno@clisp.org>
26496
26497         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
26498
26499 2003-02-17  Bruno Haible  <bruno@clisp.org>
26500
26501         * lib/mkdtemp.h: New file, from GNU gettext.
26502         * lib/mkdtemp.c: New file, from GNU gettext.
26503
26504 2003-02-02  Jim Meyering  <jim@meyering.net>
26505
26506         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
26507         e.g. glibc-2.2.93.
26508
26509 2003-01-31  Bruno Haible  <bruno@clisp.org>
26510
26511         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
26512         'rpl_rename'.
26513         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
26514         'rpl_strnlen'.
26515         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
26516         'rpl_strtod'.
26517         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
26518         'rpl_utime'.
26519
26520 2003-01-31  Bruno Haible  <bruno@clisp.org>
26521
26522         * lib/rename.c: #undef rename before defining rpl_rename.
26523         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
26524
26525 2003-01-30  Bruno Haible  <bruno@clisp.org>
26526
26527         * modules/vasnprintf, modules/vasprintf: New modules.
26528         * MODULES.html.sh (func_all_modules): Add them.
26529
26530 2003-01-30  Bruno Haible  <bruno@clisp.org>
26531
26532         * m4/signed.m4: New file, from GNU gettext.
26533         * m4/longdouble.m4: New file, from GNU gettext.
26534         * m4/wchar_t.m4: New file, from GNU gettext.
26535         * m4/wint_t.m4: New file, from GNU gettext.
26536         * m4/vasnprintf.m4: New file.
26537         * m4/vasprintf.m4: New file.
26538
26539 2003-01-30  Bruno Haible  <bruno@clisp.org>
26540
26541         * lib/printf-args.h: New file, from GNU gettext.
26542         * lib/printf-args.c: New file, from GNU gettext.
26543         * lib/printf-parse.h: New file, from GNU gettext.
26544         * lib/printf-parse.c: New file, from GNU gettext.
26545         * lib/vasnprintf.h: New file, from GNU gettext.
26546         * lib/vasnprintf.c: New file, from GNU gettext.
26547         * lib/asnprintf.c: New file, from GNU gettext.
26548         * lib/vasprintf.h: New file, from GNU gettext with modifications.
26549         * lib/vasprintf.c: New file, from GNU gettext.
26550         * lib/asprintf.c: New file, from GNU gettext.
26551
26552 2003-01-29  Bruno Haible  <bruno@clisp.org>
26553
26554         * modules/stpncpy: New module.
26555         * MODULES.html.sh (func_all_modules): Add it.
26556
26557 2003-01-29  Bruno Haible  <bruno@clisp.org>
26558
26559         * m4/stpncpy.m4: New file.
26560
26561 2003-01-29  Bruno Haible  <bruno@clisp.org>
26562
26563         * lib/stpncpy.h: New file, from GNU gettext with modifications.
26564         * lib/stpncpy.c: New file, from GNU gettext with modifications.
26565
26566 2003-01-28  Bruno Haible  <bruno@clisp.org>
26567
26568         * modules/c-ctype: New module.
26569         * MODULES.html.sh (func_all_modules): Add it.
26570
26571 2003-01-28  Bruno Haible  <bruno@clisp.org>
26572
26573         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
26574         Paul Eggert.
26575         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
26576         Paul Eggert.
26577
26578 2003-01-27  Bruno Haible  <bruno@clisp.org>
26579
26580         * modules/xsetenv: New module.
26581         * MODULES.html.sh (func_all_modules): Add it.
26582
26583 2003-01-27  Bruno Haible  <bruno@clisp.org>
26584
26585         * lib/xsetenv.h: New file, from GNU gettext.
26586         * lib/xsetenv.c: New file, from GNU gettext.
26587
26588 2003-01-23  Jim Meyering  <jim@meyering.net>
26589
26590         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
26591         from working on systems without dirfd (at least Irix and OSF1/Tru64).
26592
26593 2003-01-23  Bruno Haible  <bruno@clisp.org>
26594
26595         * modules/minmax: New module.
26596         * MODULES.html.sh (func_all_modules): Add it.
26597
26598 2003-01-23  Bruno Haible  <bruno@clisp.org>
26599
26600         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
26601         Eggert.
26602
26603 2003-01-22  Bruno Haible  <bruno@clisp.org>
26604
26605         * modules/exit: New module.
26606         * MODULES.html.sh (func_all_modules): Add it.
26607
26608 2003-01-22  Bruno Haible  <bruno@clisp.org>
26609
26610         * lib/exit.h: New file, from GNU gettext.
26611
26612 2003-01-19  Bruno Haible  <bruno@clisp.org>
26613
26614         * gnulib-tool: Recognize option --extract-maintainer.
26615         (func_get_maintainer): New function.
26616         * modules/*: Add Maintainer entry.
26617
26618 2003-01-16  Jim Meyering  <jim@meyering.net>
26619
26620         * m4/regex.m4: The `regex' struct is both input and output.
26621         Initialize it before each use.  Patch by Tim Waugh.
26622
26623 2003-01-16  Bruno Haible  <bruno@clisp.org>
26624
26625         * MODULES.html.sh: Add a table of contents. Add the module name as
26626         leftmost column. Add hyperlinks.
26627
26628 2003-01-15  Bruno Haible  <bruno@clisp.org>
26629
26630         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
26631
26632 2003-01-15  Bruno Haible  <bruno@clisp.org>
26633
26634         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
26635         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
26636         suffix.
26637
26638 2003-01-15  Bruno Haible  <bruno@clisp.org>
26639
26640         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
26641
26642 2003-01-15  Bruno Haible  <bruno@clisp.org>
26643
26644         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
26645         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
26646
26647 2003-01-14  Jim Meyering  <jim@meyering.net>
26648
26649         * lib/same.c (same_name): Tweak a comment.
26650
26651 2003-01-14  Bruno Haible  <bruno@clisp.org>
26652
26653         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
26654         when a string comparison is sufficient.
26655
26656 2003-01-14  Bruno Haible  <bruno@clisp.org>
26657
26658         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
26659         'unsigned int'.
26660
26661 2003-01-14  Bruno Haible  <bruno@clisp.org>
26662
26663         * lib/hash-pjw.c: Add comment about low quality of this function.
26664
26665 2003-01-13  Bruno Haible  <bruno@clisp.org>
26666
26667         * modules/stpcpy: Distribute lib/stpcpy.h.
26668         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
26669
26670 2003-01-13  Bruno Haible  <bruno@clisp.org>
26671
26672         * modules/*: Add a description.
26673         * modules/strpbrk: Fix Makefile.am snippet.
26674         * modules/strtoimax: Fix dependencies.
26675         * modules/strtoumax: Likewise.
26676
26677 2003-01-13  Bruno Haible  <bruno@clisp.org>
26678
26679         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
26680         * modules/alloca (Makefile.am): All object files depend on alloca.h.
26681         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
26682
26683 2003-01-13  Bruno Haible  <bruno@clisp.org>
26684
26685         * gnulib-tool (func_create_testdir): Store config/* files in the main
26686         directory.
26687         * config.rpath: Move to ...
26688         * config/config.rpath: ... here.
26689         * modules/gettext: Contains config/config.rpath, not config.rpath.
26690         * modules/iconv: Likewise.
26691
26692 2003-01-12  Paul Eggert  <eggert@twinsun.com>
26693
26694         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
26695         to avoid collisions with libcurses and libreadline.
26696
26697         * m4/getstr.m4: Remove.
26698         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
26699
26700 2003-01-12  Paul Eggert  <eggert@twinsun.com>
26701
26702         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
26703         to avoid collisions with libcurses and libreadline.
26704
26705         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
26706         * lib/getstr.h, getstr.c: Remove.
26707         * lib/getline.c: Include "getline.h", to check interface.
26708         Move body of old getstr.c here: this defines MIN_CHUNK and
26709         declares getdelim2, which is renamed from getstr.
26710         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
26711
26712         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
26713         All uses changed.
26714         * lib/linebuffer.h: Likewise.
26715         (readline): Remove backward-compatibility macro.
26716
26717 2003-01-12  Paul Eggert  <eggert@twinsun.com>
26718
26719         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
26720         to avoid collisions with libcurses and libreadline.
26721         * getstr: Remove.
26722         * MODULES.html.sh: Remove getstr.
26723         * modules/getline: Depend on unlocked-io, not getstr.
26724
26725 2003-01-12  Jim Meyering  <jim@meyering.net>
26726
26727         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
26728
26729 2003-01-10  Bruno Haible  <bruno@clisp.org>
26730
26731         * modules/alloca: Change Makefile.am requirements. Simplify Include
26732         requirements. Add lib/alloca_.h to file list.
26733
26734 2003-01-10  Bruno Haible  <bruno@clisp.org>
26735
26736         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
26737
26738 2003-01-10  Bruno Haible  <bruno@clisp.org>
26739
26740         * lib/alloca_.h: New file.
26741         * lib/getdate.y: Unconditionally include alloca.h.
26742         * lib/makepath.c: Likewise.
26743         * lib/setenv.c: Likewise.
26744         * lib/userspec.c: Likewise.
26745
26746 2003-01-09  Karl Berry  <karl@gnu.org>
26747
26748         * MODULES.html.sh: include `dirname $0` in PATH, to find
26749         gnulib-tool.
26750
26751 2003-01-09  Bruno Haible  <bruno@clisp.org>
26752
26753         * modules/stdbool: Change configure.ac, Makefile.am requirements.
26754         Simplify Include requirements. Add lib/stdbool.h.in to file list.
26755
26756 2003-01-09  Bruno Haible  <bruno@clisp.org>
26757
26758         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
26759
26760 2003-01-09  Bruno Haible  <bruno@clisp.org>
26761
26762         * lib/stdbool.h.in: New file.
26763
26764 2003-01-09  Bruno Haible  <bruno@clisp.org>
26765
26766         * gnulib-tool (func_all_modules): Ignore files ending in ~.
26767         * MODULES.html.sh: Likewise.
26768
26769 2003-01-08  Jim Meyering  <jim@meyering.net>
26770
26771         * lib/full-write.c: Undefine and define-away `const' after inclusion
26772         of errno.h, not before.  Suggestion from Bruno Haible.
26773
26774 2003-01-08  Bruno Haible  <bruno@clisp.org>
26775
26776         * modules/full-read: Depend on full-write.
26777
26778 2003-01-08  Bruno Haible  <bruno@clisp.org>
26779
26780         * lib/safe-read.c: Include specification header first, to ensure its
26781         selfcontainedness.
26782         * lib/full-write.c: Likewise.
26783
26784 2003-01-07  Jim Meyering  <jim@meyering.net>
26785
26786         * lib/full-write.c: Rework so that it may serve to define full_read,
26787         too.
26788         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
26789
26790 2003-01-07  Bruno Haible  <bruno@clisp.org>
26791
26792         * lib/strtoimax.c: Include <stdint.h> as an alternative to
26793         <inttypes.h>.
26794         * lib/xstrtol.h: Likewise.
26795         * lib/xstrtoimax.c: Likewise.
26796         * lib/xstrtoumax.c: Likewise.
26797         * lib/human.h: Likewise.
26798
26799         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
26800         on systems that have <inttypes.h> but not <stdint.h>.
26801
26802 2003-01-07  Bruno Haible  <bruno@clisp.org>
26803
26804         * MODULES.html.sh: Add copyright notice.
26805         (missed_files): Omit CVS directory entries.
26806         (func_module): Make it work with sed-3.02.
26807         * MODULES.txt: Remove file.
26808
26809 2003-01-06  Jim Meyering  <jim@meyering.net>
26810
26811         * lib/version-etc.c: Update year in translatable copyright string.
26812
26813 2003-01-03  Karl Berry  <karl@gnu.org>
26814
26815         * config/config.{guess,sub}: update from prep.
26816
26817 2003-01-02  Karl Berry  <karl@gnu.org>
26818
26819         * doc/COPYING.DOC: belatedly updated to 1.2.
26820
26821 2003-01-01  Karl Berry  <karl@gnu.org>
26822
26823         * gnulib-tool (func_verify_module): report module name $module in
26824         error message, not $1.
26825         * gnulib-tool (create-testdir): don't complain if destdir couldn't
26826         be created, only if it doesn't exist.
26827         * gnulib-tool (last_checkin_date): don't expand the $Date here.
26828
26829 2002-12-31  Paul Eggert  <eggert@twinsun.com>
26830
26831         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
26832
26833 2002-12-31  Paul Eggert  <eggert@twinsun.com>
26834
26835         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
26836         memcmp if strcoll doesn't work.
26837
26838 2002-12-31  Bruno Haible  <bruno@clisp.org>
26839
26840         * lib/utime.c (utime_null): No need to call ftruncate if the file was
26841         nonempty.
26842
26843 2002-12-31  Bruno Haible  <bruno@clisp.org>
26844
26845         * lib/memcoll.c (STRCOLL): New macro.
26846         (memcoll): Use it.
26847
26848 2002-12-31  Bruno Haible  <bruno@clisp.org>
26849
26850         * lib/localcharset.h: New file.
26851         * lib/localcharset.c: Include it.
26852         * lib/unicodeio.c: Likewise.
26853
26854 2002-12-31  Bruno Haible  <bruno@clisp.org>
26855
26856         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
26857         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
26858
26859 2002-12-31  Bruno Haible  <bruno@clisp.org>
26860
26861         * lib/getline.h: Include <stddef.h>, for size_t.
26862
26863         * lib/unicodeio.h: Include <stddef.h>, for size_t.
26864         * lib/unicodeio.c: Don't include <stddef.h>.
26865
26866 2002-12-31  Bruno Haible  <bruno@clisp.org>
26867
26868         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
26869         HAVE_TM_ZONE.
26870
26871 2002-12-24  Karl Berry  <karl@gnu.org>
26872
26873         * config/config.guess: update from prep.
26874
26875 2002-12-24  Bruno Haible  <bruno@clisp.org>
26876
26877         General infrasructure.
26878         * m4/README: Rewritten.
26879         * m4/onceonly.m4: New file.
26880         * m4/onceonly_2_57.m4: New file.
26881
26882         Module atexit.
26883         * m4/atexit.m4: New file.
26884
26885         Module strtod.
26886         * m4/strtod.m4: New file.
26887
26888         Module strtol.
26889         * m4/strtol.m4: New file.
26890
26891         Module strtoul.
26892         * m4/strtoul.m4: New file.
26893
26894         Module memchr.
26895         * m4/memchr.m4: New file.
26896
26897         Module memcmp.
26898         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
26899         (jm_FUNC_MEMCMP): Invoke it.
26900
26901         Module memcpy.
26902         * m4/memcpy.m4: New file.
26903
26904         Module memmove.
26905         * m4/memmove.m4: New file.
26906
26907         Module memset.
26908         * m4/memset.m4: New file.
26909
26910         Module strcspn.
26911         * m4/strcspn.m4: New file.
26912
26913         Module strpbrk.
26914         * m4/strpbrk.m4: New file.
26915
26916         Module strstr.
26917         * m4/strstr.m4: New file.
26918
26919         Module strerror.
26920         * m4/strerror.m4: New file.
26921
26922         Module mktime.
26923         * m4/mktime.m4: Renamed from jm-mktime.m4.
26924         (gl_PREREQ_MKTIME): New macro.
26925         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
26926
26927         Module malloc.
26928         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
26929         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
26930         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
26931
26932         Module realloc.
26933         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
26934         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
26935         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
26936
26937         Module strftime.
26938         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
26939         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
26940         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
26941         gl_TM_GMTOFF.
26942         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
26943
26944         Module xalloc.
26945         * m4/xalloc.m4: New file.
26946
26947         Module alloca.
26948         * m4/alloca.m4: New file.
26949
26950         Module putenv.
26951         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
26952         (jm_FUNC_PUTENV): Invoke it.
26953
26954         Module setenv.
26955         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
26956         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
26957         when invoked twice.
26958         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
26959         gt_FUNC_SETENV.
26960
26961         Module memrchr.
26962         * m4/memrchr.m4: New file.
26963
26964         Module stpcpy.
26965         * m4/stpcpy.m4: New file.
26966
26967         Module strcase.
26968         * m4/strcase.m4: New file.
26969
26970         Module strdup.
26971         * m4/strdup.m4: New file.
26972
26973         Module strnlen.
26974         * m4/strnlen.m4: New file.
26975
26976         Module strndup.
26977         * m4/strndup.m4: New file.
26978
26979         Module xstrtod.
26980         * m4/xstrtod.m4: New file.
26981
26982         Module xstrtol.
26983         * m4/xstrtol.m4: New file.
26984
26985         Module getdate.
26986         * m4/getdate.m4: New file.
26987
26988         Module unlocked-io.
26989         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
26990         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
26991         * m4/jm-glibc-io.m4n: Remove file.
26992
26993         Module long-options.
26994         * m4/long-options.m4: New file.
26995
26996         Module md5.
26997         * m4/md5.m4: New file.
26998
26999         Module sha.
27000         * m4/sha.m4: New file.
27001
27002         Module getstr.
27003         * m4/getstr.m4: New file.
27004
27005         Module getline.
27006         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
27007         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
27008         <sys/types.h>, for size_t. Use the function name gnu_getline, not
27009         simply getline. Infoke gl_PREREQ_GETLINE.
27010
27011         Module obstack.
27012         * m4/obstack.m4: New file.
27013
27014         Module hash.
27015         * m4/hash.m4: New file.
27016
27017         Module readtokens.
27018         * m4/readtokens.m4: New file.
27019
27020         Module strverscmp.
27021         * m4/strverscmp.m4: New file.
27022
27023         Module stdbool.
27024         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
27025         OSF/1.
27026
27027         Module strtoll.
27028         * m4/strtoll.m4: New file.
27029
27030         Module strtoull.
27031         * m4/strtoull.m4: New file.
27032
27033         Module strtoimax.
27034         * m4/strtoimax.m4: New file.
27035
27036         Module strtoumax.
27037         * m4/strtoumax.m4: New file.
27038
27039         Module xstrtoimax.
27040         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
27041         jm_AC_PREREQ_XSTRTOIMAX.
27042         Moved the strtol prerequisites to strtol.m4.
27043         Moved the strtoll prerequisites to strtoll.m4.
27044         Moved the strtoimax prerequisites to strtoimax.m4.
27045
27046         Module xstrtoumax.
27047         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
27048         jm_AC_PREREQ_XSTRTOUMAX.
27049         Moved the strtoul prerequisites to strtoul.m4.
27050         Moved the strtoull prerequisites to strtoull.m4.
27051         Moved the strtoumax prerequisites to strtoumax.m4.
27052
27053         Module chown.
27054         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
27055         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
27056
27057         Module dup2.
27058         * m4/dup2.m4: New file.
27059
27060         Module ftruncate.
27061         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
27062         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
27063
27064         Module getgroups.
27065         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
27066         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
27067
27068         Module gettimeofday.
27069         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
27070         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
27071         gl_PREREQ_GETTIMEOFDAY.
27072
27073         Module mkdir.
27074         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
27075         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
27076
27077         Module mkstemp.
27078         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
27079         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
27080         jm_AC_TYPE_UINTMAX_T.
27081         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
27082
27083         Module stat.
27084         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
27085         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
27086
27087         Module lstat.
27088         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
27089         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
27090
27091         Module timespec.
27092         * m4/timespec.m4 (gl_TIMESPEC): New macro.
27093         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
27094         * m4/st_mtim.m4: Indentation.
27095
27096         Module nanosleep.
27097         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
27098         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
27099         gl_PREREQ_NANOSLEEP.
27100
27101         Module regex.
27102         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
27103         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
27104         (gl_REGEX): New macro.
27105
27106         Module rename.
27107         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
27108         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
27109
27110         Module rmdir.
27111         * m4/rmdir.m4: New file.
27112
27113         Module utime.
27114         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
27115         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
27116         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
27117
27118         Module dirname.
27119         * m4/dirname.m4: New file.
27120
27121         Module getopt.
27122         * m4/getopt.m4: New file.
27123
27124         Module unistd-safer.
27125         * m4/unistd-safer.m4: New file.
27126
27127         Module fnmatch.
27128         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
27129         declaration.
27130         (gl_PREREQ_FNMATCH_EXTRA): New macro.
27131         (gl_FUNC_FNMATCH_POSIX): New macro.
27132         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
27133         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
27134         simply fnmatch.
27135
27136         Module exclude.
27137         * m4/exclude.m4: New file.
27138
27139         Module human.
27140         * m4/human.m4: New file.
27141
27142         Module acl.
27143         * m4/acl.m4: Nop.
27144
27145         Module backupfile.
27146         * m4/backupfile.m4: New file.
27147         * m4/d-ino.m4: Indentation.
27148
27149         Module fsusage.
27150         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
27151         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
27152         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
27153
27154         Module dirfd.
27155         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
27156         requirements.
27157
27158         Module euidaccess.
27159         * m4/euidaccess.m4: New file.
27160
27161         Module file-type.
27162         * m4/file-type.m4: New file.
27163
27164         Module fileblocks.
27165         * m4/fileblocks.m4: New file.
27166
27167         Module filemode.
27168         * m4/filemode.m4: New file.
27169
27170         Module isdir.
27171         * m4/isdir.m4: New file.
27172
27173         Module lchown.
27174         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
27175         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
27176
27177         Module makepath.
27178         * m4/makepath.m4: New file.
27179
27180         Module modechange.
27181         * m4/modechange.m4: New file.
27182
27183         Module mountlist.
27184         * m4/mountlist.m4: New file.
27185         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
27186         Indentation.
27187
27188         Module path-concat.
27189         * m4/path-concat.m4: New file.
27190
27191         Module pathmax.
27192         * m4/pathmax.m4: New file.
27193
27194         Module same.
27195         * m4/same.m4: New file.
27196
27197         Module save-cwd.
27198         * m4/save-cwd.m4: New file.
27199
27200         Module savedir.
27201         * m4/savedir.m4: New file.
27202
27203         Module xgetcwd.
27204         * m4/xgetcwd.m4: New file.
27205         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
27206
27207         Module xreadlink.
27208         * m4/xreadlink.m4: New file.
27209
27210         Module safe-read.
27211         * m4/safe-read.m4: New file.
27212
27213         Module safe-write.
27214         * m4/safe-write.m4: New file.
27215
27216         Module closeout.
27217         * m4/closeout.m4: New file.
27218
27219         Module stdio-safer.
27220         * m4/stdio-safer.m4: New file.
27221
27222         Module getpass.
27223         * m4/getpass.m4: New file.
27224
27225         Module getugroups.
27226         * m4/getugroups.m4: New file.
27227
27228         Module group-member.
27229         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
27230         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
27231
27232         Module idcache.
27233         * m4/idcache.m4: New file.
27234
27235         Module userspec.
27236         * m4/userspec.m4: New file.
27237
27238         Module gettime.
27239         * m4/clock_time.m4: New file.
27240         * m4/gettime.m4: New file.
27241
27242         Module settime.
27243         * m4/settime.m4: New file.
27244
27245         Module posixtm.
27246         * m4/posixtm.m4: New file.
27247
27248         Module gethostname.
27249         * m4/gethostname.m4: New file.
27250
27251         Module canon-host.
27252         * m4/canon-host.m4: New file.
27253
27254         Module gettext.
27255         * m4/codeset.m4: New file, from gettext-0.11.5.
27256         * m4/gettext.m4: New file, from gettext-0.11.5.
27257         * m4/glibc21.m4: New file, from gettext-0.11.5.
27258         * m4/iconv.m4: New file, from gettext-0.11.5.
27259         * m4/intdiv0.m4: New file, from gettext-0.11.5.
27260         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
27261         * m4/inttypes.m4: New file, from gettext-0.11.5.
27262         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
27263         * m4/isc-posix.m4: New file, from gettext-0.11.5.
27264         * m4/lcmessage.m4: New file, from gettext-0.11.5.
27265         * m4/lib-ld.m4: New file, from gettext-0.11.5.
27266         * m4/lib-link.m4: New file, from gettext-0.11.5.
27267         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
27268         * m4/progtest.m4: New file, from gettext-0.11.5.
27269         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
27270         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
27271         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
27272
27273         Module localcharset.
27274         * m4/localcharset.m4: New file.
27275
27276         Module hard-locale.
27277         * m4/hard-locale.m4: New file.
27278
27279         Module mbswidth.
27280         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
27281         onceonly macros.
27282         * m4/mbrtowc.m4: Add comment.
27283
27284         Module memcasecmp.
27285         * m4/memcasecmp.m4: New file.
27286
27287         Module memcoll.
27288         * m4/memcoll.m4: New file.
27289
27290         Module unicodeio.
27291         * m4/unicodeio.m4: New file.
27292
27293         Module rpmatch.
27294         * m4/rpmatch.m4: New file.
27295
27296         Module yesno.
27297         * m4/yesno.m4: New file.
27298
27299         Module exitfail.
27300         * m4/exitfail.m4: New file.
27301
27302         Module c-stack.
27303         * m4/c-stack.m4 (gl_C_STACK): New macro.
27304         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
27305
27306         Module error.
27307         * m4/error.m4 (gl_ERROR): New macro.
27308         (jm_PREREQ_ERROR): Use onceonly macros.
27309
27310         Module fatal.
27311         * m4/fatal.m4: New file.
27312
27313         Module getloadavg.
27314         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
27315         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
27316
27317         Module getpagesize.
27318         * m4/getpagesize.m4: New file.
27319
27320         Module getusershell.
27321         * m4/getusershell.m4: New file.
27322
27323         Module physmem.
27324         * m4/physmem.m4: New file.
27325
27326         Module posixver.
27327         * m4/posixver.m4: New file.
27328
27329         Module quotearg.
27330         * m4/quotearg.m4: New file.
27331
27332         Module quote.
27333         * m4/quote.m4: New file.
27334
27335         Module readutmp.
27336         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
27337
27338         Module sig2str.
27339         * m4/sig2str.m4: New file.
27340
27341         Other.
27342         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
27343         ulonglong.m4.
27344         * m4/intmax_t.m4: New file.
27345         * m4/d-type.m4: Indentation.
27346         * m4/jm-macros.m4: Update.
27347         * m4/prereq.m4 (jm_PREREQ): Update.
27348         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
27349         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
27350         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
27351         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
27352         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
27353         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
27354         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
27355         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
27356         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
27357         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
27358         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
27359         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
27360         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
27361         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
27362         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
27363         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
27364         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
27365         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
27366         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
27367
27368 2002-12-24  Bruno Haible  <bruno@clisp.org>
27369
27370         * MODULES.txt: Update according to m4/ changes.
27371
27372         Module gettext.
27373         * config.rpath: New file, from gettext-0.11.5.
27374
27375         * modules/*: New module descriptions.
27376         * gnulib-tool: New file.
27377         * MODULES.html.sh: New file.
27378
27379 2002-12-21  Karl Berry  <karl@gnu.org>
27380
27381         * doc/fdl.texi: update to version 1.2.
27382
27383 2002-12-19  Karl Berry  <karl@gnu.org>
27384
27385         * config/config.guess: update from prep.
27386
27387 2002-12-18  Bruno Haible  <bruno@clisp.org>
27388
27389         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
27390         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
27391
27392 2002-12-17  Bruno Haible  <bruno@clisp.org>
27393
27394         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
27395         stdlib.h, string.h.
27396
27397 2002-12-17  Bruno Haible  <bruno@clisp.org>
27398
27399         * lib/canon-host.c (strdup): Remove unused declaration.
27400
27401         * lib/fsusage.c: Include full_read.h.
27402         (get_fs_usage): Use full_read instead of safe_read.
27403
27404         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
27405
27406 2002-12-12  Karl Berry  <karl@gnu.org>
27407
27408         * config/config.guess: update from prep.
27409
27410 2002-12-11  Bruno Haible  <bruno@clisp.org>
27411
27412         * m4/setenv.m4: New file, from gettext-0.11.5.
27413
27414 2002-12-11  Bruno Haible  <bruno@clisp.org>
27415
27416         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
27417         not unsetenv().
27418         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
27419         modifications:
27420
27421         2002-12-11  Bruno Haible  <bruno@clisp.org>
27422
27423                 * setenv.c (alloca): Fall back to malloc.
27424                 (freea): New macro.
27425                 (setenv): Use freea() to free memory allocated with alloca().
27426
27427         2002-11-13  Bruno Haible  <bruno@clisp.org>
27428
27429                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
27430                 function declarations.
27431                 * unsetenv.c (unsetenv): Likewise.
27432
27433         2002-03-04  Bruno Haible  <bruno@clisp.org>
27434
27435                 Portability to AIX 4.3.3.
27436                 * unsetenv.c: New file, extracted from setenv.c.
27437                 * setenv.c: Move the unsetenv() function to unsetenv.c.
27438
27439         2001-12-20  Bruno Haible  <bruno@clisp.org>
27440
27441                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
27442                 use malloc instead. For SunOS 4.
27443
27444         2001-12-11  Bruno Haible  <bruno@clisp.org>
27445
27446                 * setenv.c: Declare alloca.
27447                 (compar_fn_t): New typedef.
27448                 (KNOWN_VALUE, STORE_VALUE): Use it.
27449
27450         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
27451         setenv.h.
27452
27453 2002-12-10  Paul Eggert  <eggert@twinsun.com>
27454
27455         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
27456         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
27457         Choose values that are less likely to collide with system fnmatch
27458         options.
27459         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
27460         defined (e.g., a pure POSIX system).
27461         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
27462         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
27463
27464 2002-12-06  Paul Eggert  <eggert@twinsun.com>
27465
27466         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
27467         a pain in practice to deal with generated m4 files.  This change
27468         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
27469
27470         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
27471         and jm-glibc-io.m4, as they are no longer a special case.
27472         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
27473         kludge and the auto-generation stuff.  Check only whether the
27474         functions are declared, not whether they exist, since older hosts
27475         that don't declare the functions can't use the optimization anyway.
27476
27477 2002-12-06  Jim Meyering  <jim@meyering.net>
27478
27479         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
27480
27481         Merge in changes from libc's misc/error.c, in preparation
27482         for the merge of gnulib's changes back into libc.
27483
27484         * lib/error.c (_): Define only if not already defined.
27485         Move definition to follow all #include directives.
27486         Include unlocked-io.h only if !_LIBC.
27487         [_LIBC]: Include <libio/libioP.h>.
27488         [USE_IN_LIBIO]: Include <libio/iolibio.h>
27489         (fflush): Tweak definition to use INTUSE.
27490         (putc): Define.
27491
27492 2002-12-05  Paul Eggert  <eggert@twinsun.com>
27493
27494         * lib/alloca.c [defined emacs]: Include "lisp.h".
27495         (xalloc_die) [defined emacs]: New macro.
27496         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
27497         [! defined emacs]: Include <xalloc.h>.
27498         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
27499         (pointer): Typedef to POINTER_TYPE *.
27500         (malloc): Remove decl; we now always use xmalloc.
27501         (alloca): Use old-style definition, since Emacs needs this.
27502         Check for arithmetic overflow when computing combined size.
27503
27504 2002-12-04  Paul Eggert  <eggert@twinsun.com>
27505
27506         Do not generate unlocked-io.h automatically, since it's easier to
27507         maintain it by hand.
27508
27509         * lib/unlocked-io.h: New file, from GNU diffutils,
27510         but with proper copyright notice and attribution.
27511         * lib/gen-uio: Remove.
27512         * lib/Makefile.am: Add copyright notice.
27513         (libfetish_a_SOURCES): Add unlocked-io.h.
27514         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
27515         (DISTCLEANFILES, io_functions): Remove macros.
27516         (EXTRA_DIST): Remove gen_uio.
27517         (unlocked-io.h): Remove rule.
27518
27519 2002-12-04  Jim Meyering  <jim@meyering.net>
27520
27521         Reflect the fact that stat.c and lstat.c are no longer generated.
27522         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
27523         (DISTCLEANFILES): Likewise.
27524         (EXTRA_DIST): Likewise.
27525         (all_local): Don't depend on stat.c or lstat.c.
27526         (stat.c, lstat.c): Remove rules.
27527         (EXTRA_DIST): Remove xstat.in.
27528
27529         * lib/xstat.in: Remove file.  Contents moved into stat.c.
27530         * lib/stat.c: New file.  Contents mostly from xstat.in.
27531         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
27532         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
27533
27534         * lib/safe-read.c: Rework so that it may serve to define safe_write,
27535         too.
27536         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
27537
27538 2002-12-03  Jim Meyering  <jim@meyering.net>
27539
27540         * lib/safe-read.c, safe-write.c: Change variable names and comments,
27541         but not semantics, to minimize the differences between these two files.
27542         (safe_read): Change comment to mention SAFE_READ_ERROR.
27543
27544         * lib/safe-read.c (IS_EINTR): Define.
27545         (safe_read): Use IS_EINTR in place of in-function cpp directives.
27546
27547 2002-12-02  Jim Meyering  <jim@meyering.net>
27548
27549         * lib/safe-read.c (EINTR): Define.
27550         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
27551         (INT_MAX): Provide fallback.
27552         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
27553
27554         * lib/safe-read.h (SAFE_READ_ERROR): Define.
27555
27556 2002-12-02  Bruno Haible  <bruno@clisp.org>
27557
27558         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
27559         Define, taken from safe-read.c.
27560         (INT_MAX): Provide fallback.
27561         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
27562         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
27563
27564         * lib/safe-read.c (EINTR): Remove definition.
27565         (safe_read): Don't use EINTR if it is absent.
27566
27567 2002-12-01  Jim Meyering  <jim@meyering.net>
27568
27569         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
27570         zero.
27571         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
27572
27573 2002-11-27  Paul Eggert  <eggert@twinsun.com>
27574
27575         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
27576         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
27577         with `if (! (value < limit)) abort ();', for readability.
27578
27579 2002-11-26  Karl Berry  <karl@gnu.org>
27580
27581         * lib/strdup.c: copy from libc again, with jim's ok.
27582         * lib/.cppi-disable: re-add strdup.c
27583
27584 2002-11-25  Karl Berry  <karl@gnu.org>
27585
27586         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
27587         instead of "strtol.c".
27588
27589 2002-11-25  Karl Berry  <karl@gnu.org>
27590
27591         * config/install-sh: update from automake for variable quoting, $0 in
27592         error msgs, etc.
27593
27594         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
27595         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
27596         entry.
27597
27598 2002-11-25  Jim Meyering  <jim@meyering.net>
27599
27600         * lib/mktime.c: Sync from libc, now that it has the latest fix.
27601
27602 2002-11-24  Karl Berry  <karl@gnu.org>
27603
27604         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
27605         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
27606
27607 2002-11-24  Jim Meyering  <jim@meyering.net>
27608
27609         Update from coreutils:
27610
27611         * lib/mktime.c: Merge in changes from libc.
27612
27613         Avoid a link-time failure on some Linux systems.
27614         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
27615         (otherwise).
27616         (__mon_yday): Declare with the STATIC attribute.
27617         (__mktime_internal): Likewise.
27618         Based on a report from Greg Schafer.
27619
27620 2002-11-23  Jim Meyering  <jim@meyering.net>
27621
27622         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
27623         Use `unsigned', not `int', as type of index.
27624
27625         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
27626
27627         * lib/fsusage.c: Remove unneeded parentheses around operands of
27628         `defined'.
27629
27630 2002-11-22  Paul Eggert  <eggert@twinsun.com>
27631
27632         * lib/quotearg.h: Allow multiple inclusion by surrounding with
27633         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
27634         so that we can be included first.
27635         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
27636         * lib/quotearg.c: Include quotearg.h immediately after config.h.
27637         No need to include stddef.h or sys/types.h any more.
27638         Surround local include files with "", not "<>".
27639         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
27640         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
27641         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
27642         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
27643         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
27644         (ISPRINT): Remove; no longer needed now that we assume C89.
27645
27646         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
27647         Preserve errno.
27648
27649         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
27650         quotearg_char): Use SIZE_MAX rather than
27651         (size_t) -1 when we are talking about "infinity".
27652
27653         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
27654
27655 2002-11-22  Paul Eggert  <eggert@twinsun.com>
27656
27657         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
27658         hint that one should use `if (! x) abort ();' rather than `assert
27659         (x);', and anyway it's one less thing to worry about configuring.
27660         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
27661         hash_rehash, hash_insert): Use abort rather than assert.
27662
27663 2002-11-22  Bruno Haible  <bruno@clisp.org>
27664
27665         * lib/safe-read.h: Assume C89. Add comments.
27666         (safe_read): Change return type to size_t.
27667         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
27668         byte counts > SSIZE_MAX correctly.
27669         * lib/safe-write.h: New file.
27670         * lib/safe-write.c: New file.
27671         * lib/full-read.h: New file.
27672         * lib/full-read.c: New file.
27673         * lib/full-write.h: Assume C89. Add comments.
27674         * lib/full-write.c: Include safe-write.h.
27675         (full_write): Rewritten to use safe_write.
27676         Suggested by Jim Meyering and Paul Eggert.
27677
27678 2002-11-21  Jim Meyering  <jim@meyering.net>
27679
27680         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
27681
27682         Merge in changes from the coreutils.
27683
27684         2002-09-25  Paul Eggert  <eggert@twinsun.com>
27685         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
27686         <stdint.h>.
27687         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
27688         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
27689         int.  Work more efficiently if X is the same width as uintmax_t.
27690         Do not compare X to -1, to avoid bogus compiler warning.
27691         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
27692         Don't assume that f_frsize and f_bsize are the same type.
27693
27694         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
27695         warning on FreeBSD.
27696
27697         * lib/makepath.c (make_path): Restore umask *before* creating the final
27698         component.
27699         (make_path): Minor reformatting.
27700
27701         * lib/xmalloc.c: Adjust to work with new autoconf macros,
27702         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
27703         HAVE_MALLOC/HAVE_REALLOC.
27704
27705         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
27706         dummy ones.  At least on GNU/Linux systems, `auto' means something
27707         else.
27708         From Michael Stone.
27709
27710 2002-11-21  Bruno Haible  <bruno@clisp.org>
27711
27712         Remove case insensitive option matching.
27713         * lib/argmatch.h (argcasematch): Remove declaration.
27714         (ARGCASEMATCH): Remove macro.
27715         (__xargmatch_internal): Remove case_sensitive argument.
27716         (XARGMATCH): Update.
27717         (XARGCASEMATCH): Remove macro.
27718         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
27719         case_sensitive argument.
27720         (argcasematch): Remove function.
27721         (__xargmatch_internal): Remove case_sensitive argument.
27722         (main): Use XARGMATCH instead of XARGCASEMATCH.
27723
27724         * lib/xmalloc.c: Change compile-time error message. Add comment about
27725         required autoconf version.
27726
27727 2002-11-20  Paul Eggert  <eggert@twinsun.com>
27728
27729         Merge argmatch cleanups from Bison.  Assume C89.
27730
27731         * lib/argmatch.c: Include config.h here, not in argmatch.h.
27732         Include stdlib.h, for EXIT_FAILURE.
27733         Always include <string.h>, since we assume C89.
27734         (EXIT_FAILURE): Remove pre-C89 bug workaround.
27735         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
27736         Include <stddef.h> instead, since it's all we need for size_t.
27737         (PARAMS): Remove.  All uses removed.
27738         (ARRAY_CARDINALITY): Do not bother to #undef.
27739         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
27740         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
27741         Remove unnecessary parentheses.
27742         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
27743         Insert necessary parentheses.
27744         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
27745         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
27746
27747 2002-11-19  Bruno Haible  <bruno@clisp.org>
27748
27749         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
27750         * lib/mbswidth.h: Include <stddef.h>, for size_t.
27751
27752         * lib/mbswidth.h (PARAMS): Remove macro.
27753         (mbswidth, mbsnwidth): Use ANSI C function declarations.
27754         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
27755
27756         * lib/gcd.h (PARAMS): Remove macro.
27757         (gcd): Use ANSI C function declarations.
27758         * lib/gcd.c (gcd): Likewise.
27759
27760 2002-11-15  Bruno Haible  <bruno@clisp.org>
27761
27762         * lib/strcspn.c: Include <stddef.h>.
27763         (strcspn): Use ANSI C function declaration. Change return type to
27764         size_t. Use NULL.
27765         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
27766         (strpbrk): Use NULL.
27767         * lib/strpbrk.h (PARAMS): Remove macro.
27768         (strpbrk): Use ANSI C function declaration.
27769         * lib/strstr.c: Don't include <sys/types.h>.
27770         * lib/strstr.h (PARAMS): Remove macro.
27771         (strstr): Use ANSI C function declarations.
27772
27773 2002-11-14  Karl Berry  <karl@gnu.org>
27774
27775         * config/mkinstalldirs: `do' on separate line, instead of
27776         `for var; do'.
27777
27778 2002-11-06  Bruno Haible  <bruno@clisp.org>
27779
27780         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
27781         * lib/gcd.c (gcd): Likewise.
27782
27783 2002-11-05  Bruno Haible  <bruno@clisp.org>
27784
27785         * lib/gcd.h: New file, from gettext-0.11.5.
27786         * lib/gcd.c: New file, from gettext-0.11.5.
27787
27788 2002-11-05  Bruno Haible  <bruno@clisp.org>
27789
27790         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
27791         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
27792         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
27793         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
27794
27795         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
27796         <libintl.h>.
27797         * lib/makepath.c: Include gettext.h instead of <locale.h> and
27798         <libintl.h>.
27799
27800         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
27801         * lib/human.c: Include gettext.h instead of <libintl.h>.
27802         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
27803         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
27804         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
27805         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
27806         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
27807         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
27808         (textdomain): Remove definition.
27809         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
27810
27811         * lib/long-options.c: Remove include of <libintl.h> and definition of
27812         _.
27813         * lib/same.c: Remove include of <libintl.h> and definition of _.
27814
27815 2002-11-04  Owen Taylor  <otaylor@redhat.com>
27816
27817         * lib/config.charset: A few additions for Solaris.
27818
27819 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
27820
27821         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
27822         * lib/localcharset.c (locale_charset): Declare as extern "C".
27823
27824 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
27825
27826         * lib/config.charset: msdos in uk_UA uses CP1125.
27827
27828 2002-11-04  Bruno Haible  <bruno@clisp.org>
27829
27830         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
27831         * lib/strcase.h: New file, from GNU gettext-0.11.5.
27832         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
27833         * lib/strstr.h: New file, from GNU gettext-0.11.5.
27834         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
27835
27836 2002-11-04  Bruno Haible  <bruno@clisp.org>
27837
27838         * lib/localcharset.c (locale_charset): Don't return an empty string.
27839
27840 2002-11-04  Bruno Haible  <bruno@clisp.org>
27841
27842         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
27843         aliases.
27844
27845 2002-11-04  Bruno Haible  <bruno@clisp.org>
27846
27847         * lib/config.charset: Update for newest glibc. Add canonical names
27848         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
27849
27850 2002-11-04  Bruno Haible  <bruno@clisp.org>
27851
27852         * lib/config.charset: Add support for NetBSD.
27853
27854 2002-11-04  Bruno Haible  <bruno@clisp.org>
27855
27856         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
27857
27858 2002-11-01  Bruno Haible  <bruno@clisp.org>
27859
27860         * configure.in: Add AC_CONFIG_AUX_DIR call.
27861         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
27862         test/Makefile.
27863         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
27864
27865 2002-09-28  Karl Berry  <karl@gnu.org>
27866
27867         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
27868         installed automake until the next release, since changes have been
27869         made.
27870
27871 2002-09-25  Karl Berry  <karl@gnu.org>
27872
27873         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
27874         * lib/getopt*: copy from libc/posix.
27875         * lib/gettext.h: copy from gettext.
27876         * lib/.cppi-disable: add strdup.c, gettext.h.
27877
27878 2002-09-25  Karl Berry  <karl@gnu.org>
27879
27880         * config/srclist.txt: enable gettext.h check.
27881         * config/config.{guess,sub}: update from prep.
27882         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
27883                 from automake 1.6.3.
27884         See srclist*.
27885
27886 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
27887
27888         * regex.c (PATFETCH): Remove the translating fetch.
27889         (PATFETCH_RAW): Rename to PATFETCH.
27890         (set_image_of_range): New fun.
27891         (SET_RANGE_TABLE_WORK_AREA): Use it.
27892         (regex_compile): Don't translate the pattern chars so eagerly.
27893         Only do it when inserting an `exactn' bytecode or when handling
27894         a char-range.
27895         (mutually_exclusive_p): Avoid empty statement.
27896
27897 2002-07-06  Jim Meyering  <meyering@lucent.com>
27898
27899         * m4/README: Don't mention Makefile.am.in.
27900         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
27901
27902 2002-07-01  Jim Meyering  <meyering@lucent.com>
27903
27904         * lib/c-stack.c: Include sys/time.h.
27905         From Volker Borchert.
27906
27907 2002-06-26  Paul Eggert  <eggert@twinsun.com>
27908
27909         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
27910
27911 2002-06-26  Paul Eggert  <eggert@twinsun.com>
27912
27913         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
27914         New macro.  Use it uniformly instead of
27915         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
27916         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
27917         reported by Vin Shelton.
27918
27919 2002-06-22  Paul Eggert  <eggert@twinsun.com>
27920
27921         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
27922         Do not assume SA_SIGINFO behavior.
27923         Bug reported by Jim Meyering on NetBSD 1.5.2.
27924
27925 2002-06-22  Jim Meyering  <meyering@lucent.com>
27926
27927         * m4/c-stack.m4: New file, from diffutils-2.8.2.
27928         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
27929
27930         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
27931         now that configure.ac uses AC_GNU_SOURCE.
27932         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
27933         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
27934
27935         Update to latest tools.  Suggestions from Paul Eggert.
27936         * m4/stdbool.m4: New file, from diffutils-2.8.2.
27937         * m4/gnu-source.m4: Update from diffutils-2.8.2.
27938         * m4/fnmatch.m4: Likewise.
27939         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
27940         to AC_HEADER_STDBOOL
27941
27942 2002-06-22  Jim Meyering  <meyering@lucent.com>
27943
27944         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
27945         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
27946
27947 2002-06-22  Jim Meyering  <meyering@lucent.com>
27948
27949         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
27950
27951         * lib/exitfail.c, exitfail.h: Likewise.
27952         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
27953
27954         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
27955         of fnmatch.h.
27956         (EXTRA_DIST): Add fnmatch_loop.c.
27957         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
27958
27959         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
27960         * lib/fnmatch.c: Update from diffutils-2.8.2.
27961         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
27962         * lib/fnmatch.h: Remove file.
27963
27964 2002-06-21  Jim Meyering  <meyering@lucent.com>
27965
27966         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
27967         * m4/mbrtowc.m4: Likewise.
27968
27969         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
27970         * m4/mbswidth.m4: Reflect name change:
27971         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
27972         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
27973
27974         * m4/lib-link.m4: Update from gettext-0.11.2.
27975         * m4/gettext.m4: Likewise.
27976
27977         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
27978         From Alfred M. Szmidt.
27979
27980 2002-06-18  Paul Eggert  <eggert@twinsun.com>
27981
27982         * lib/file-type.h: Report an error if neither S_ISREG nor
27983         S_IFREG is defined, instead of using a test specific to glibc
27984         2.2.  This should be safe, since POSIX requires S_ISREG and
27985         Unix Version 7 had S_IFREG.  We don't need to check for
27986         <sys/types.h> since we don't use any symbols that it defines.
27987
27988 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
27989
27990         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
27991         $@-t, so that each temporary file name is unique and valid in the first
27992         8 characters, for operation under DOS.
27993
27994 2002-06-15  Paul Eggert  <eggert@twinsun.com>
27995
27996         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
27997
27998 2002-06-15  Jim Meyering  <meyering@lucent.com>
27999
28000         Work even with DJGPP 2.03, which lacks support for symlinks.
28001         From Richard Dawe.
28002         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
28003         is defined.
28004         * lib/lchown.c (S_ISLNK): Likewise.
28005
28006 2002-06-15  Jim Meyering  <meyering@lucent.com>
28007
28008         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
28009         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
28010         have been included before this file.
28011
28012 2002-06-14  Jim Meyering  <meyering@lucent.com>
28013
28014         * lib/file-type.h: Use the version from diffutils-2.8.2.
28015         * lib/file-type.c: Likewise.
28016
28017 2002-06-07  Jim Meyering  <meyering@lucent.com>
28018
28019         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
28020         They're needed at least for NetBSD 1.5.2.
28021         ($statxfs_includes): Include those same headers.
28022         ($statxfs_includes): Include sys/vfs.h if available.
28023         ($statxfs_includes): Likewise for sys/statvfs.h.
28024         Check for the following members in both structs statfs and statvfs:
28025         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
28026
28027 2002-06-01  Jim Meyering  <meyering@lucent.com>
28028
28029         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
28030         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
28031
28032 2002-05-28  Jim Meyering  <meyering@lucent.com>
28033
28034         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
28035         Reported by Volker Borchert.
28036
28037 2002-05-27  Jim Meyering  <meyering@lucent.com>
28038
28039         Fix a problem seen only on nonconforming systems whereby ls.c's
28040         use of localtime, and then of gettimeofday would cause trouble:
28041         the localtime call used to initialize rpl_gettimeofday's save
28042         mechanism would clobber ls's current local time information so
28043         that in any long listing the first file would always be listed
28044         with date 1970-01-01.  Analysis by Volker Borchert.
28045
28046         * lib/gettimeofday.c (localtime): Undefine.
28047         (rpl_localtime): New function.
28048
28049 2002-05-27  Jim Meyering  <meyering@lucent.com>
28050
28051         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
28052         localtime.
28053
28054         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
28055         use the replacement function; it wouldn't resolve at link time.
28056         Reported by Volker Borchert.
28057
28058 2002-05-22  Jim Meyering  <meyering@lucent.com>
28059
28060         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
28061         file-type.h.
28062         * lib/file-type.h: New file.
28063         * lib/file-type.c (file_type): New file/function.  Extracted from
28064         diffutils.
28065
28066 2002-04-30  Jim Meyering  <meyering@lucent.com>
28067
28068         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
28069
28070 2002-04-29  Paul Eggert  <eggert@twinsun.com>
28071
28072         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
28073
28074 2002-04-29  Paul Eggert  <eggert@twinsun.com>
28075
28076         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
28077         Do not check for alloca.h (no longer used) or stdbool.h (was never
28078         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
28079
28080 2002-04-29  Paul Eggert  <eggert@twinsun.com>
28081
28082         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
28083
28084 2002-04-29  Jim Meyering  <meyering@lucent.com>
28085
28086         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
28087         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
28088         Use AC_FUNC_STRNLEN here instead.
28089
28090         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
28091         With autoconf-2.53a, it's part of AC_PROG_CC.
28092
28093 2002-04-28  Paul Eggert  <eggert@twinsun.com>
28094
28095         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
28096         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
28097
28098 2002-04-28  Paul Eggert  <eggert@twinsun.com>
28099
28100         * lib/sig2str.h, lib/sig2str.c: New files.
28101         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
28102
28103 2002-04-28  Paul Eggert  <eggert@twinsun.com>
28104
28105         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
28106         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
28107         of 127, since 64 is the largest conceivable number for ancient
28108         nonstandard hosts.
28109         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
28110
28111 2002-04-28  Jim Meyering  <meyering@lucent.com>
28112
28113         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
28114
28115 2002-04-24  Jim Meyering  <meyering@lucent.com>
28116
28117         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
28118         (jm_PREREQ): Use it.
28119
28120         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
28121         mach/mach.h fcntl.h.
28122         Check for this function: setlocale.
28123
28124 2002-04-24  Jim Meyering  <meyering@lucent.com>
28125
28126         * lib/gettext.h: New file, from Gettext.
28127         * lib/Makefile.am (INCLUDES): Remove -I../intl.
28128         (libfetish_a_SOURCES): Add gettext.h.
28129
28130 2002-04-16  Jim Meyering  <meyering@lucent.com>
28131
28132         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
28133         ut_pid, ut_id, ut_exit.
28134
28135 2002-04-16  Jim Meyering  <meyering@lucent.com>
28136
28137         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
28138         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
28139         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
28140
28141 2002-04-12  Jim Meyering  <meyering@lucent.com>
28142
28143         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
28144         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
28145         existence of the getmntinfo function.  Needed for Darwin 5.3.
28146
28147         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
28148         This is necessary at least on Darwin 5.3.
28149
28150         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
28151         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
28152         strnlen.o in the library, and that makes some versions of ranlib
28153         object.
28154
28155 2002-04-12  Jim Meyering  <meyering@lucent.com>
28156
28157         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
28158
28159 2002-04-09  Jim Meyering  <meyering@lucent.com>
28160
28161         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
28162         to be more precise.  Rather than saying we're checking whether the
28163         function `works', say what we're testing.
28164         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
28165         Reported by Bruno Haible.
28166
28167 2002-03-10  Jim Meyering  <meyering@lucent.com>
28168
28169         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
28170         Suggestion from Santiago Vila.
28171
28172 2002-03-08  Jim Meyering  <meyering@lucent.com>
28173
28174         * lib/rename.c: Mention that this wrapper is needed also on
28175         mips-dec-ultrix4.4 systems.
28176
28177 2002-03-02  Jim Meyering  <meyering@lucent.com>
28178
28179         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
28180         not HAVE_CLOCK_SETTIME.
28181
28182 2002-02-27  Paul Eggert  <eggert@twinsun.com>
28183
28184         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
28185         Check for clock_settime.
28186
28187 2002-02-27  Paul Eggert  <eggert@twinsun.com>
28188
28189         * lib/nanosleep.h: Rename to....
28190         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
28191
28192         * lib/gettime.c: New file.
28193         * lib/settime.c: New file.
28194         * lib/stime.c: Remove.
28195
28196         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
28197         timespec.h.  Remove nanosleep.h.
28198
28199 2002-02-25  Paul Eggert  <eggert@twinsun.com>
28200
28201         * m4/acl.m4: New file.
28202         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
28203         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
28204
28205 2002-02-25  Paul Eggert  <eggert@twinsun.com>
28206
28207         * lib/acl.c, lib/acl.h: New files.
28208         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
28209
28210 2002-02-24  Jim Meyering  <meyering@lucent.com>
28211
28212         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
28213         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
28214         cause trouble.  Reported by Nelson Beebe.
28215
28216 2002-02-23  Paul Eggert  <eggert@twinsun.com>
28217
28218         * lib/path-concat.c (xpath_concat): Reorder code to pacify
28219         compilers that don't know that xalloc_die never returns.
28220
28221 2002-02-20  Jim Meyering  <meyering@lucent.com>
28222
28223         * lib/getdate.c: Regenerate using bison-1.33.
28224
28225 2002-02-17  Jim Meyering  <meyering@lucent.com>
28226
28227         * config/config.guess (main): Don't use `head -1'; it's no longer
28228         portable. Use `sed 1q' instead.
28229
28230 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
28231
28232         * m4/codeset.m4: Upgrade to gettext-0.11.
28233         * m4/gettext.m4: Upgrade to gettext-0.11.
28234         * m4/glibc21.m4: Upgrade to gettext-0.11.
28235         * m4/iconv.m4: Upgrade to gettext-0.11.
28236         * m4/isc-posix.m4: Upgrade to gettext-0.11.
28237         * m4/lcmessage.m4: Upgrade to gettext-0.11.
28238         * m4/lib-ld.m4: New file, from gettext-0.11.
28239         * m4/lib-link.m4: New file, from gettext-0.11.
28240         * m4/lib-prefix.m4: New file, from gettext-0.11.
28241         * m4/progtest.m4: Upgrade to gettext-0.11.
28242
28243 2002-02-15  Paul Eggert  <eggert@twinsun.com>
28244
28245         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
28246         (jm_PREREQ): Use it.
28247
28248 2002-02-15  Paul Eggert  <eggert@twinsun.com>
28249
28250         * lib/posixver.c, lib/posixver.h: New files.
28251         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
28252
28253 2002-02-02  Paul Eggert  <eggert@twinsun.com>
28254             Bruno Haible  <bruno@clisp.org>
28255
28256         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
28257         (fwrite_success_callback): New declaration.
28258         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
28259         print_unicode_char. Call failure callback instead of error.
28260         (fwrite_success_callback): New function.
28261         (exit_failure_callback): New function.
28262         (fallback_failure_callback): New function.
28263         (print_unicode_char): Call unicode_to_mb.
28264
28265 2002-01-26  Jim Meyering  <meyering@lucent.com>
28266
28267         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
28268         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
28269
28270 2002-01-26  Jim Meyering  <meyering@lucent.com>
28271
28272         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
28273
28274 2002-01-22  Paul Eggert  <eggert@twinsun.com>
28275
28276         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
28277
28278 2002-01-22  Jim Meyering  <meyering@lucent.com>
28279
28280         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
28281         Otherwise, some versions of automake would omit the rule that makes
28282         Makefile from Makefile.in.
28283
28284 2002-01-21  Paul Eggert  <eggert@twinsun.com>
28285
28286         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
28287         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
28288         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
28289         (memcoll): Set errno to zero if there is no error.
28290
28291         * lib/quotearg.c (quotearg_buffer_restyled):
28292         Fix bug with quoting buffers containing NUL when backslashing escapes.
28293         This bug was exposed by the other changes in this patch.
28294         (quotearg_n_options): New arg ARGSIZE.
28295         All callers changed.
28296         (quoting_options_from_style): New function.
28297         (quotearg_n_style): Use it.
28298         (quotearg_n_style_mem): New function.
28299
28300         * lib/quotearg.h (quotearg_n_style_mem): New function.
28301
28302 2002-01-19  Jim Meyering  <meyering@lucent.com>
28303
28304         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
28305         Remove useless quotes: DF_PROG="df".
28306         * m4/strnlen.m4: New file.
28307
28308 2002-01-16  Paul Eggert  <eggert@twinsun.com>
28309
28310         * lib/backupfile.c (ISDIGIT): Comment fix.
28311         * lib/getdate.y (ISDIGIT): Likewise.
28312         * lib/posixtm.c (ISDIGIT, year): Likewise.
28313         * lib/strverscmp.c (ISDIGIT): Likewise.
28314         * lib/userspec.c (ISDIGIT): Likewise.
28315
28316 2002-01-16  Jim Meyering  <meyering@lucent.com>
28317
28318         * lib/getdate.y: Add three semicolons, each just before a closing
28319         brace. Bison (as of version 1.31) no longer papers over that mistake.
28320
28321 2002-01-05  Jim Meyering  <meyering@lucent.com>
28322
28323         * lib/version-etc.c (version_etc_copyright): Update copyright year.
28324
28325 2001-12-19  Paul Eggert  <eggert@twinsun.com>
28326
28327         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
28328         not silently exit merely because the output buffer happens to
28329         have nothing pending.
28330
28331 2001-12-18  Paul Eggert  <eggert@twinsun.com>
28332
28333         See the big note in ../ChangeLog.
28334         * lib/human.c (suffixes): Prefer K to k for 1024.
28335         (generate_suffix_backwards): New function.
28336         (human_readable_inexact): Use it.
28337         * lib/xstrtol.c (__xstrtol): If there is no number but there
28338         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
28339         Accept 'K' as well as 'k'.
28340
28341 2001-12-15  Jim Meyering  <meyering@lucent.com>
28342
28343         * lib/regex.h (__restrict_arr): Update from libc.
28344
28345         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
28346         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
28347         (STREQ): Define.
28348
28349 2001-12-14  Jim Meyering  <meyering@lucent.com>
28350
28351         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
28352         Suggestion from Bruno Haible.
28353
28354 2001-12-10  Jim Meyering  <meyering@lucent.com>
28355
28356         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
28357         xrealloc, Instead, include "xalloc.h".
28358         (initbuffer): Don't cast xmalloc return value to char*.
28359         (readline): Reword comment.
28360         Don't cast xrealloc return value to char*
28361         Return NULL, not 0.
28362
28363 2001-12-09  Jim Meyering  <meyering@lucent.com>
28364
28365         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
28366         about `signed and unsigned type in conditional expression'.
28367         * lib/posixtm.c (posix_time_parse): Likewise.
28368
28369         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
28370
28371         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
28372         to avoid a pedantic warning.
28373
28374         * lib/getstr.c: Don't include assert.h.
28375         (getstr): Remove warning-evoking assertions.
28376         Return -1 if offset parameter is out of bounds.
28377         Change the type of a local from int to size_t.
28378
28379         * lib/strftime.c (my_strftime_localtime_r): Include this function
28380         definition in the `#if ! HAVE_TM_GMTOFF' block.
28381
28382         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
28383         Include xalloc.h instead.
28384
28385 2001-12-02  Jim Meyering  <meyering@lucent.com>
28386
28387         * lib/tempname.c: Don't declare getenv, thus reverting the change of
28388         2001-11-18.  It's no longer necessary, now that stdlib.h is always
28389         included.
28390
28391         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
28392         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
28393
28394 2001-11-30  Akim Demaille  <akim@epita.fr>
28395
28396         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
28397         before being defined.
28398
28399 2001-11-27  Paul Eggert  <eggert@twinsun.com>
28400
28401         * lib/quotearg.h (quotearg_n, quotearg_n_style):
28402         First arg is int, not unsigned.
28403         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
28404         (SIZE_MAX, UINT_MAX): New macros.
28405         (quotearg_n_options): Abort if N is negative.
28406         Avoid overflow check on hosts where size_t is 64 bits and int
28407         is 32 bits, as overflow is impossible there.
28408         Fix off-by-one typo that caused unnecessary reallocation.
28409
28410 2001-11-27  Jim Meyering  <meyering@lucent.com>
28411
28412         * lib/tempname.c: Merge with version from libc.
28413         * lib/regex.c: Likewise.
28414
28415         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
28416         systems for which STDC_HEADERS is 0, it was not included, resulting in
28417         a warning about an integer-to-pointer conversion problem with getenv.
28418         Reported by Volker Borchert.
28419
28420 2001-11-26  Jim Meyering  <meyering@lucent.com>
28421
28422         * lib/gtod.h: Remove file.
28423         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
28424         * lib/gettimeofday.c: Don't include gtod.h.
28425         (GTOD_init): Remove function.
28426         (rpl_gettimeofday): Do its job here instead, rather than aborting.
28427         Suggestion from Volker Borchert.
28428
28429 2001-11-23  Jim Meyering  <meyering@lucent.com>
28430
28431         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
28432         it.
28433         * lib/hash.c (struct hash_table): Define it here instead.
28434
28435 2001-11-22  Jim Meyering  <meyering@lucent.com>
28436
28437         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
28438
28439 2001-11-20  Jim Meyering  <meyering@lucent.com>
28440
28441         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
28442         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
28443
28444 2001-11-19  Jim Meyering  <meyering@lucent.com>
28445
28446         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
28447         directory.  Use "conftestXXXXXX" as the template.
28448         Suggestion from Paul Eggert.
28449
28450         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
28451         immediately, so the test doesn't mistakenly hit the max-open-files
28452         limit.
28453
28454 2001-11-18  Paul Eggert  <eggert@twinsun.com>
28455
28456         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
28457         (TEMPORARIES): New macro.
28458         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
28459         removes an artificial limitation (e.g. HP-UX 10.20, where
28460         TMP_MAX is 17576).
28461
28462 2001-11-18  Jim Meyering  <meyering@lucent.com>
28463
28464         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
28465
28466 2001-11-18  Jim Meyering  <meyering@lucent.com>
28467
28468         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
28469         on SunOS 4.
28470
28471         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
28472         files will be created before anything else.
28473
28474 2001-11-17  Paul Eggert  <eggert@twinsun.com>
28475
28476         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
28477         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
28478
28479 2001-11-17  Jim Meyering  <meyering@lucent.com>
28480
28481         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
28482         Prompted by a report from Bob Proulx.
28483
28484         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
28485         Instead, require UTILS_FUNC_MKSTEMP.
28486
28487 2001-11-17  Jim Meyering  <meyering@lucent.com>
28488
28489         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
28490         Now, that's done as part of AC_FUNC_STRTOD.
28491
28492 2001-11-17  Jim Meyering  <meyering@lucent.com>
28493
28494         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
28495         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
28496         rather than group writable.  Patch by Juan F. Codagnone.
28497
28498         * lib/readtokens.c: Remove explicit declarations of xmalloc and
28499         xrealloc, Instead, include "xalloc.h".
28500
28501         * lib/mountlist.c: Include unlocked-io.h after all system headers.
28502         Remove explicit declarations of xmalloc, xrealloc,
28503         and xstrdup.  Instead, include "xalloc.h".
28504
28505         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
28506         unlocked-io.h.
28507         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
28508         Likewise.
28509         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
28510
28511         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
28512         Reported by Padraig Brady.
28513
28514         * lib/mkstemp.c: #undef mkstemp.
28515         Include config.h.
28516         (rpl_mkstemp): Rename from mkstemp.
28517         Protoize.
28518
28519 2001-11-16  Jim Meyering  <meyering@lucent.com>
28520
28521         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
28522         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
28523         determine the amount of total physical memory, use pstat_getstatic.
28524         HPUX-11 doesn't define _SC_PHYS_PAGES.
28525         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
28526         If sysconf couldn't be used to determine the amount of available
28527         physical memory, use both pstat_getstatic and pstat_getdynamic.
28528         Based on a patch from Bob Proulx.
28529
28530 2001-11-10  Jim Meyering  <meyering@lucent.com>
28531
28532         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
28533         (jm_PREREQ): Use it.
28534
28535 2001-11-09  Jim Meyering  <meyering@lucent.com>
28536
28537         * m4/jm-macros.m4: Require autoconf-2.52f.
28538         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
28539         Use these AC_-prefixed names, not the AM_-prefixed ones.
28540
28541         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
28542
28543 2001-11-05  Jim Meyering  <meyering@lucent.com>
28544
28545         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
28546
28547 2001-11-04  Jim Meyering  <meyering@lucent.com>
28548
28549         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
28550         $DEFS.
28551
28552 2001-11-03  Jim Meyering  <meyering@lucent.com>
28553
28554         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
28555         of AC_DEFUN.
28556
28557         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
28558         know the name of the variable in the macro definition.
28559
28560 2001-11-03  Jim Meyering  <meyering@lucent.com>
28561
28562         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
28563         in argmatch_to_argument call.
28564
28565         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
28566         argument.
28567
28568         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
28569         e.g., a fault due to an attempt to free a NULL pointer.
28570
28571 2001-11-01  Jim Meyering  <meyering@lucent.com>
28572
28573         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
28574         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
28575
28576 2001-11-01  Jim Meyering  <meyering@lucent.com>
28577
28578         * lib/dirfd.c, lib/dirfd.h: New files.
28579         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
28580
28581         * lib/hash.c (hash_print) [TESTING]: Clean up.
28582
28583 2001-10-22  Paul Eggert  <eggert@twinsun.com>
28584
28585         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
28586         to avoid a warning if -Wall.
28587
28588 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
28589
28590         * README: New file
28591         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
28592         (per RMS's instructions, this is now the canonical source)
28593         * lgpl/, gpl/: New directories.
28594
28595 2001-10-21  Paul Eggert  <eggert@twinsun.com>
28596
28597         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
28598
28599 2001-10-21  Jim Meyering  <meyering@lucent.com>
28600
28601         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
28602         this code would end up calling gettext even in packages built
28603         with --disable-nls.
28604         * lib/getopt.c (_): Likewise.
28605         * lib/regex.c (_): Likewise.
28606
28607 2001-10-20  Paul Eggert  <eggert@twinsun.com>
28608
28609         * m4/error.m4 (jm_PREREQ_ERROR):
28610         Do not invoke AC_CHECK_FUNCS with strerror_r, as
28611         AC_FUNC_STRERROR_R does that.
28612         Check for strerror declaration.
28613
28614         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
28615         are supposed to have them these days.
28616         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
28617         Merge changes from latest Autoconf CVS.
28618         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
28619         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
28620         POSIX decided to standardize on the int flavor of strerror_r.
28621
28622 2001-10-20  Paul Eggert  <eggert@twinsun.com>
28623
28624         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
28625         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
28626         Use strerror_r that is only a macro, even if it is not a function.
28627         (strerror): Check for HAVE_DECL_STRERROR before declaring.
28628         (private_strerror): Use prototypes, not old-style function definition.
28629         (print_errno_message): New function.
28630         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
28631         char*-flavored one.
28632         (error_tail, error, error_at_line): Use it.
28633
28634 2001-10-11  Jim Meyering  <meyering@lucent.com>
28635
28636         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
28637         and quote_n (1, ... to avoid clobbering a buffer.
28638
28639 2001-10-05  Jim Meyering  <meyering@lucent.com>
28640
28641         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
28642         hash-pjw.h.
28643         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
28644         * lib/hash-pjw.h: New file.
28645
28646 2001-09-30  Jim Meyering  <meyering@lucent.com>
28647
28648         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
28649         `struct fsstat' has the `f_fstypename' member.
28650         Use that to define FS_TYPE, which is now used to make
28651         the getfsstat link test tighter.
28652
28653 2001-09-30  Jim Meyering  <meyering@lucent.com>
28654
28655         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
28656         Include <sys/ucred.h>, for Apple Darwin.
28657         Include sys/mount.h and sys/fs_types.h only if available.
28658         (FS_TYPE): Define.
28659         (read_filesystem_list): Use FS_TYPE.
28660
28661 2001-09-29  Paul Eggert  <eggert@twinsun.com>
28662
28663         * lib/exclude.c (excluded_filename): 0 -> false, since it's
28664         a boolean context.
28665
28666 2001-09-29  Jim Meyering  <meyering@lucent.com>
28667
28668         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
28669         [one-argument getmntent function]): Include stdio.h before mntent.h.
28670         SunOS 4.1.x needs it for the declaration of `FILE'.
28671         Patch by Volker Borchert.
28672
28673         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
28674         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
28675         sys/fs_types.h, and make the link-test for getfsstat guard #include
28676         directives with appropriate #if HAVE_*_H tests so that we can
28677         detect getfsstat on Apple Darwin1.3.7 systems.
28678         Reported by Nelson Beebe.
28679         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
28680
28681 2001-09-28  Paul Eggert  <eggert@twinsun.com>
28682
28683         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
28684         #defines strtoimax.  Also treat the other strto* functions
28685         like strtoimax.
28686
28687         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
28688         Check for strtoul and strtoumax,
28689         as those declarations are made even in the signed case.
28690         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
28691         Likewise, for strtol and strtoimax.
28692
28693 2001-09-28  Paul Eggert  <eggert@twinsun.com>
28694
28695         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
28696         #defines strtoimax.  Also treat the other strto* functions
28697         like strtoimax.
28698
28699         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
28700         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
28701         (strtoimax, strtoumax): Do not declare if already defined as a macro.
28702
28703 2001-09-26  Jim Meyering  <meyering@lucent.com>
28704
28705         Most macros in unlocked-io.h had the wrong number of arguments.
28706         * lib/gen-uio: New script.
28707         (USE_UNLOCKED_IO): Define to 1 if not already defined.
28708         * lib/unlocked-io.hin: Remove file.
28709         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
28710         rather than trying to embed it here.
28711         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
28712         Reported by Padraig Brady.
28713
28714 2001-09-25  Volker Borchert  <bt@teknon.de>
28715
28716         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
28717         `result'.
28718
28719 2001-09-24  Jim Meyering  <meyering@lucent.com>
28720
28721         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
28722
28723 2001-09-23  Jim Meyering  <meyering@lucent.com>
28724
28725         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
28726         instead of the mere test for existence of mntent.h.  The latter
28727         would get a false-positive on AIX 3.4 systems.
28728         In the outer getmntent if-block, don't die if neither of the getmntent
28729         tests succeeds.  Instead, just fall through and continue with the
28730         remaining tests.
28731
28732 2001-09-23  Jim Meyering  <meyering@lucent.com>
28733
28734         * lib/mountlist.c: Remove useless parentheses in #if directives.
28735         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
28736         the deprecated MOUNTED symbol is no longer defined in mntent.h.
28737
28738 2001-09-22  Jim Meyering  <meyering@lucent.com>
28739
28740         * m4/gettext.m4: New file.  From gettext.
28741         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
28742         * m4/progtest.m4: Likewise
28743         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
28744         * m4/glibc21.m4: Likewise.
28745
28746         * m4/libintl.m4: Remove.  No longer used.
28747
28748 2001-09-22  Jim Meyering  <meyering@lucent.com>
28749
28750         * lib/localcharset.c: Update from latest gettext.
28751         * lib/config.charset: Likewise.
28752
28753 2001-09-20  Jim Meyering  <meyering@lucent.com>
28754
28755         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
28756         strtoimax.
28757         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
28758         strtoumax.
28759
28760 2001-09-20  Jim Meyering  <meyering@lucent.com>
28761
28762         * lib/xstrtol.c (strtoimax): Guard declaration with
28763         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
28764         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
28765         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
28766         (strtoumax): Likewise, for completeness (it wasn't necessary).
28767
28768 2001-09-17  Paul Eggert  <eggert@twinsun.com>
28769
28770         * lib/strtoimax.c (HAVE_LONG_LONG):
28771         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
28772         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
28773         to work around bug in IBM C compiler.
28774
28775 2001-09-17  Jim Meyering  <meyering@lucent.com>
28776
28777         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
28778         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
28779         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
28780         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
28781         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
28782         whenever the right hand side need not be expanded by the shell.
28783
28784 2001-09-16  Paul Eggert  <eggert@twinsun.com>
28785
28786         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
28787         library.  It's not correct, as some older glibcs are buggy.
28788         fnmatch wasn't fixed until glibc 2.2.
28789
28790         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
28791         special shell magic here.
28792
28793 2001-09-16  Jim Meyering  <meyering@lucent.com>
28794
28795         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
28796         * m4/jm-macros.m4: Require it.
28797
28798 2001-09-16  Jim Meyering  <meyering@lucent.com>
28799
28800         * lib/mkdir.c: New file.
28801
28802 2001-09-15  Jim Meyering  <meyering@lucent.com>
28803
28804         * m4/jm-macros.m4: Check for help2man.
28805
28806 2001-09-11  Jim Meyering  <meyering@lucent.com>
28807
28808         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
28809         The body, by Paul Eggert, was moved here from configure.in.
28810         * m4/jm-macros.m4: Require UTILS_HOST_OS.
28811
28812 2001-09-04  Paul Eggert  <eggert@twinsun.com>
28813
28814         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
28815         (jm_PREREQ): Use it.
28816
28817 2001-09-04  Paul Eggert  <eggert@twinsun.com>
28818
28819         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
28820         Use ssize_t, not int, to store result of readlink.
28821         Check for ssize_t overflow as well as size_t overflow,
28822         as POSIX says the result of readlink is implementation-defined
28823         when ssize_t overflows.
28824         Remove unnecessary cast to char*.
28825         Use free+malloc instead of realloc, as the storage doesn't need
28826         to be preserved and it's clearer and can be more efficient that way.
28827         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
28828         * lib/xreadlink.h (xreadlink): Update prototype.
28829
28830 2001-09-04  Paul Eggert  <eggert@twinsun.com>
28831
28832         * lib/xgetcwd.c: Revert some of the previous change; intead,
28833         fix the HAVE_GETCWD_NULL code to behave more like the
28834         !HAVE_GETCWD_NULL code used to.
28835
28836         Include "xalloc.h".
28837         (xgetcwd): Do not return NULL when memory is exhausted; instead,
28838         invoke xalloc_die.
28839
28840 2001-09-03  Paul Eggert  <eggert@twinsun.com>
28841
28842         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
28843         sys/param.h, as pathmax.h includes them.
28844
28845 2001-09-03  Paul Eggert  <eggert@twinsun.com>
28846
28847         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
28848         (jm_PREREQ_XGETCWD): New macro.
28849
28850         * m4/getcwd.m4: New file.
28851
28852 2001-09-03  Paul Eggert  <eggert@twinsun.com>
28853
28854         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
28855         like the HAVE_GETCWD_NULL code.
28856         Include pathmax.h if not HAVE_GETCWD.
28857         Do not include xalloc.h.
28858         (INITIAL_BUFFER_SIZE): New symbol.
28859         Do not use xmalloc / xrealloc, since the caller is responsible for
28860         handling errors.  Preserve errno around `free' during failure.
28861         Do not overrun buffer when using getwd.
28862
28863 2001-09-03  Paul Eggert  <eggert@twinsun.com>
28864
28865         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
28866         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
28867         getcwd (NULL, 0).
28868
28869 2001-09-03  Paul Eggert  <eggert@twinsun.com>
28870
28871         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
28872         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
28873         spotted by Jim Meyering.
28874
28875 2001-09-03  Jim Meyering  <meyering@lucent.com>
28876
28877         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
28878         failure.
28879
28880 2001-09-02  Jim Meyering  <meyering@lucent.com>
28881
28882         * lib/error.c: Update from GNU libc.
28883
28884 2001-09-01  Jim Meyering  <meyering@lucent.com>
28885
28886         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
28887         Used by df.
28888
28889 2001-09-01  Jim Meyering  <meyering@lucent.com>
28890
28891         * lib/xreadlink.c: New file.
28892         * lib/xreadlink.h: New file.
28893         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
28894         xreadlink.h.
28895
28896         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
28897         doesn't conflict with sparc Solaris 7's definition in
28898         /usr/include/sys/int_types.h.
28899
28900         * lib/exclude.c: Use `""', not `<>' to #include non-system header
28901         files.
28902         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
28903         and strncasecmp as r-values.  Unixware didn't have declarations.
28904
28905 2001-08-31  Paul Eggert  <eggert@twinsun.com>
28906
28907         * lib/xstrtol.h: Add copyright notice.
28908         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
28909         LONGINT_INVALID_SUFFIX_CHAR.
28910
28911 2001-08-31  Paul Eggert  <eggert@twinsun.com>
28912
28913         * lib/xstrtol.c (strtoimax): New decl.
28914
28915 2001-08-31  Paul Eggert  <eggert@twinsun.com>
28916
28917         * lib/xgetcwd.c: Don't include pathmax.h.
28918         Include stdlib.h and unistd.h if available.
28919         Include xalloc.h.
28920         (xmalloc, xstrdup, free): Remove decls.
28921         (xgetcwd): Don't assume sizes fit in unsigned.
28922         Check for overflow when computing sizes.
28923         Simplify reallocation code.
28924
28925 2001-08-31  Paul Eggert  <eggert@twinsun.com>
28926
28927         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
28928         a directory's st_size can have an arbitrary value, so the old
28929         usage could waste an arbitrary amount of memory.  All uses
28930         changed.
28931         * lib/savedir.h: Update prototype.
28932
28933 2001-08-31  Paul Eggert  <eggert@twinsun.com>
28934
28935         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
28936
28937         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
28938         old strtoimax.c.
28939
28940         Also, make the following further changes to make this file's
28941         configuration more similar to that of strtol.c:
28942         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
28943         (strtoumax, uintmax_t, strtoull, strtol): Remove.
28944         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
28945         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
28946         changed to signed values.
28947
28948         And make the following changes as well:
28949         Fix copyright notice, as 1999 was missing.
28950         (verify): New macro.
28951         (strtoimax): Check sizes at compile-time, not run-time.
28952         Prefer strtol to strtoll if both work.
28953         (main): Remove; it was not that useful and was a pain to maintain.
28954
28955         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
28956
28957 2001-08-31  Jim Meyering  <meyering@lucent.com>
28958
28959         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
28960         Use an initial, malloc'd, buffer of length 128 rather than
28961         a statically allocated one of length 1024.
28962
28963 2001-08-30  Paul Eggert  <eggert@twinsun.com>
28964
28965         Simplify code, partly by assuming autoconf 2.52 semantics.
28966
28967         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
28968
28969         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
28970         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
28971         All uses removed.
28972         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
28973         Move AC_REQUIRE to next-to-top level, to avoid confusion.
28974         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
28975         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
28976         jm_AC_HEADER_INTTYPES_H.
28977         * m4/jm-macros.m4 (jm_MACROS): Likewise.
28978
28979         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
28980
28981         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
28982         Quote first arg of AC_DEFUN.
28983         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
28984         since they are needed to parse the include file even if we need
28985         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
28986         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
28987         but with opposite signedness.
28988
28989 2001-08-30  Paul Eggert  <eggert@twinsun.com>
28990
28991         Merge 'exclude' changes from tar 1.13.22.
28992         This fixes one or two unlikely storage allocation overflow bugs,
28993         but doesn't change user-visible behavior otherwise.
28994
28995 2001-08-30  Paul Eggert  <eggert@twinsun.com>
28996
28997         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
28998         (jm_PREREQ_EXCLUDE): New macro.
28999
29000 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29001
29002         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
29003         tm to be declared.
29004
29005 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29006
29007         * lib/hash.c: Remove '2001' from copyright notice.
29008
29009 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29010
29011         * lib/full-write.h: New file.
29012         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
29013         * lib/full-write.c: Correct credits, as cccp.c no longer
29014         exists and anyway it was so heavily changed from the old cccp
29015         code as to be unrecognizable.  Include full-write.h.
29016         (full_write) Return size_t, with short writes meaning failure.
29017         All callers changed.  This fixes a bug with large buffers
29018         on 64-bit hosts.
29019         * lib/utime.c: Include full-write.h.
29020
29021 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29022
29023         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
29024         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
29025         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
29026         Include if available.
29027         (<xalloc.h>): Include
29028         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
29029         (verify): New macro.  Use it to verify that EXCLUDE macros do not
29030         collide with FNM macros.
29031         (struct patopts): New struct.
29032         (struct exclude): Use it, as exclude patterns now come with options.
29033         (new_exclude): Support above changes.
29034         (new_exclude, add_exclude_file):
29035         Initial size must now be a power of two to simplify overflow checking.
29036         (free_exclude, fnmatch_no_wildcards): New function.
29037         (excluded_filename): No longer requires options arg, as the options
29038         are determined by add_exclude.  Now returns bool, not int.
29039         (excluded_filename, add_exclude):
29040         Add support for the fancy new exclusion options.
29041         (add_exclude, add_exclude_file): Now takes int options arg.
29042         Check for arithmetic overflow when computing sizes.
29043         (add_exclude_file): xrealloc might modify errno, so don't
29044         realloc until after errno might be used.
29045
29046         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
29047         New macros.
29048         (free_exclude): New decl.
29049         (add_exclude, add_exclude_file): Now takes int options arg.
29050         (excluded_filename): No longer requires options arg, as the options
29051         are determined by add_exclude.  Now returns bool, not int.
29052
29053 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29054
29055         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
29056
29057 2001-08-27  Jim Meyering  <meyering@lucent.com>
29058
29059         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
29060
29061         * lib/version-etc.c (N_): Remove definition.
29062         Revert most of last change.
29063         Instead, simply don't mark the `Copyright...' string for translation.
29064         Based on advice from Paul Eggert.
29065
29066         * lib/strtoxmax.c: Tweak comment.
29067
29068 2001-08-26  Jim Meyering  <meyering@lucent.com>
29069
29070         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
29071
29072         * m4/xstrtoimax.m4: New file.
29073         * m4/xstrtoumax.m4: Add comments explaining why we
29074         AC_REPLACE_FUNCS(strtol).
29075
29076 2001-08-26  Jim Meyering  <meyering@lucent.com>
29077
29078         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
29079         of copyright with `%s' so translators don't get an untranslated
29080         message in 2002.
29081         (COPYRIGHT_YEAR): Define.
29082         (version_etc): Use fprintf rather than fputs.
29083         Suggestion from Ulrich Drepper.
29084
29085         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
29086
29087         * lib/strtoll.c: New file, from GNU libc.
29088         * lib/xstrtoimax.c: New file.
29089
29090         * lib/xstrtol.h: Add xstrtoimax.
29091         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
29092         * lib/strtoimax.c: New file.  Likewise, but first define
29093         STRTOUXMAX_SIGNED.
29094
29095         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
29096         ...
29097         * lib/strtoxmax.c: ... then renamed to this.
29098
29099 2001-08-18  Paul Eggert  <eggert@twinsun.com>
29100
29101         * m4/inttypes.m4: Add AC_PREREQ(2.13).
29102         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
29103         (jm_AC_TYPE_INTMAX_T): New macro.
29104         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
29105
29106         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
29107
29108         * m4/longlong.m4: Renamed from ulonglong.m4.
29109         * m4/inttypes.m4: Renamed from inttypes_h.m4.
29110         * m4/uintmax_t.m4: Removed.
29111
29112 2001-08-13  Paul Eggert  <eggert@twinsun.com>
29113
29114         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
29115         Port to Solaris 8, where 'sed' requires a space after the 'r'
29116         command, and where sh dislikes "$/".  Clean up the spacing a bit.
29117         Redirect output to $tmp just once.
29118
29119 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
29120
29121         * lib/addext.c (<errno.h>): Include.
29122         (errno): Declare if not defined.
29123         (addext): Work correctly when pathconf returns -1 and leaves
29124         errno alone because there is no limit.  Also, work even if
29125         pathconf returns a value greater than SIZE_MAX.
29126
29127 2001-08-12  Jim Meyering  <meyering@lucent.com>
29128
29129         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
29130         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
29131         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
29132         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
29133         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
29134         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
29135         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
29136         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
29137         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
29138         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
29139         utime.m4, utimes.m4, xstrtoumax.m4:
29140         Quote the first argument in each use of AC_DEFUN.
29141
29142 2001-08-12  Jim Meyering  <meyering@lucent.com>
29143
29144         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
29145         Simply `return getcwd (NULL, 0);'.
29146         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
29147         Use 1300 as initial value for length, not PATH_MAX.
29148
29149         * lib/pathmax.h: Clean up cpp syntax.
29150
29151 2001-08-12  Jim Meyering  <meyering@lucent.com>
29152
29153         * lib/gettimeofday.c: New file.
29154         * lib/gtod.h: New file.
29155         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
29156
29157 2001-08-05  Jim Meyering  <meyering@lucent.com>
29158
29159         * m4/jm-macros.m4: Require autoconf-2.52.
29160
29161 2001-08-04  Jim Meyering  <meyering@lucent.com>
29162
29163         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
29164         stmt, to get in sync with glibc.
29165
29166 2001-08-03  Paul Eggert  <eggert@twinsun.com>
29167
29168         The following changes are from gettext 0.10.39 as maintained by
29169         Bruno Haible.
29170
29171         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
29172         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
29173         with inverted sense.  All uses changed.
29174
29175         * lib/mbswidth.c: Don't include <limits.h>.
29176         Include <stdlib.h> and <string.h> unconditionally.
29177         (iswcntrl, mbsinit, ISCNTRL): New macros.
29178         (mbsnwidth): Use K&R style function declarations.
29179         Don't bother checking for MB_LEN_MAX == 1, since the compiler
29180         can optimize it when MB_CUR_MAX == 1.
29181         The width of control characters is zero, not 1.
29182
29183 2001-08-03  Paul Eggert  <eggert@twinsun.com>
29184
29185         The following changes are from gettext 0.10.39 as maintained by
29186         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
29187
29188         * m4/codeset.m4: Upgrade to serial AM1.
29189         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
29190         all uses changed.  Quote first arg of AC_DEFUN.
29191         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
29192
29193         * m4/iconv.m4: Upgrade to serial AM2.
29194         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
29195         Add --with-libconv-prefix.
29196         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
29197         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
29198         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
29199         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
29200         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
29201
29202         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
29203         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
29204         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
29205         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
29206         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
29207         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
29208         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
29209         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
29210         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
29211
29212         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
29213         string.h any more.
29214
29215         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
29216         not the default value.
29217
29218         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
29219         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
29220         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
29221         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
29222         Also check for iswcntrl, used for wcwidth fallback.
29223         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
29224         to Autoconf 2.13.
29225
29226 2001-08-03  Jim Meyering  <meyering@lucent.com>
29227
29228         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
29229         as it was in the original.  Reported by Paul Eggert.
29230
29231 2001-07-16  Jim Meyering  <meyering@lucent.com>
29232
29233         * m4/gettimeofday.m4: New file.
29234         Prompted by a report from Bernhard Baehr.
29235
29236 2001-07-15  Jim Meyering  <meyering@lucent.com>
29237
29238         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
29239         stuff. Now it's in ../Makefile.cfg.
29240
29241 2001-07-15  Jim Meyering  <meyering@lucent.com>
29242
29243         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
29244         (BUILT_SOURCES): Add unlocked-io.h.
29245         (io_functions): Define.
29246         (unlocked-io.h): New rule.
29247         (DISTCLEANFILES): Add unlocked-io.h.
29248         (all-local): Depend on unlocked-io.h, to ensure it is created.
29249
29250         * lib/unlocked-io.hin: New file
29251
29252         * lib/regex.c: Update from glibc.
29253
29254 2001-07-05  Jim Meyering  <meyering@lucent.com>
29255
29256         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
29257         recommendation.
29258         (libfetish_a_SOURCES): Put all .h files here instead.
29259         Remove a thus-exposed (better checks in automake) duplicate and
29260         two unnecessary .h files.
29261
29262 2001-07-04  Jim Meyering  <meyering@lucent.com>
29263
29264         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
29265         that generates jm-glibc-io.m4 so that it doesn't trigger any make
29266         distcheck failure.
29267
29268 2001-07-02  Jim Meyering  <meyering@lucent.com>
29269
29270         The following changes were prompted by suggestions from Bruno Haible.
29271
29272         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
29273         is now generated.
29274         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
29275         definition of EXTRA_DIST.
29276         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
29277         ensure that the generated file is created/updated whenever the list
29278         of $(unlocked_functions) is changed.
29279         (jm-glibc-io.m4): New rule.
29280         (unlocked-io.h): New rule -- currently unused.
29281
29282 2001-06-24  Jim Meyering  <meyering@lucent.com>
29283
29284         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
29285         unmatched right bracket, rather than kludging it with an extra,
29286         falsely-matching quote in a comment.  Patch by Akim Demaille.
29287
29288 2001-06-11  Jim Meyering  <meyering@lucent.com>
29289
29290         * lib/regex.c: Update from GNU libc.
29291
29292 2001-05-27  Jim Meyering  <meyering@lucent.com>
29293
29294         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
29295         Check for ut_type in struct utmp.
29296
29297 2001-05-27  Jim Meyering  <meyering@lucent.com>
29298
29299         * lib/readutmp.h (UT_TYPE): Define.
29300
29301 2001-05-24  Jim Meyering  <meyering@lucent.com>
29302
29303         * lib/argmatch.c: Include "quote.h".
29304         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
29305         quote function.  Reported by Göran Uddeborg.
29306
29307 2001-05-22  Jim Meyering  <meyering@lucent.com>
29308
29309         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
29310         now that we use the package-supplied version unconditionally.
29311         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
29312
29313 2001-05-21  Jim Meyering  <meyering@lucent.com>
29314
29315         * m4/regex.m4: Change a couple backticks to single quotes to avoid
29316         shell syntax errors.
29317
29318 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
29319
29320         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
29321
29322 2001-05-20  Paul Eggert  <eggert@twinsun.com>
29323
29324         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
29325         Don't bother to check library strftime, since
29326         we'll be using our own my_strftime function anyway.
29327         Define my_strftime instead of strftime.
29328
29329 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
29330
29331         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
29332         which is not yet declared.
29333
29334 2001-05-15  Jim Meyering  <meyering@lucent.com>
29335
29336         * m4/regex.m4: Use proper quoting so brackets appear in the test
29337         program.
29338         Reported by, and with help from, Bruno Haible.
29339
29340 2001-05-13  Jim Meyering  <meyering@lucent.com>
29341
29342         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
29343         undefined.
29344
29345 2001-05-11  Paul Eggert  <eggert@twinsun.com>
29346
29347         dirname code cleanup.  base_name now behaves more compatibly
29348         with POSIX basename when given file names that have trailing
29349         slashes, and similarly for dir_name.  Add new primitives
29350         base_len and dir_len.  Put the directory-name-related decls
29351         into dirname.h.
29352
29353         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
29354         * lib/backupfile.c (base_name): Likewise.
29355         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
29356         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
29357         * lib/makepath.c (strip_trailing_slashes): Likewise.
29358         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
29359         ISSLASH): Likewise.
29360         * lib/rename.c (strip_trailing_slashes): Likewise.
29361         * lib/same.c (base_name): Likewise.
29362         * lib/stripslash.c (ISSLASH): Likewise.
29363
29364         * lib/addext.c: Include <dirname.h> after size_t is defined.
29365         * lib/backupfile.c: Likewise.
29366
29367         * lib/addext.c (addext): Use base_len to trim redundant
29368         trailing slashes instead of doing it ourselves.
29369         But do not trim the last slash if it is not redundant.
29370
29371         * lib/backupfile.c (find_backup_file_name,
29372         max_backup_version): Use base_len instead of rolling it ourselves.
29373         Handle the case of "" and (on DOS) "C:" correctly.
29374
29375         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
29376         needed. Include <string.h>, <dirname.h>.
29377         (base_name): Allow file names ending in slashes, other than names
29378         that are all slashes.  In this case, return the basename followed
29379         by the slashes.  This is more general, and can be used in places
29380         where the original base_name purposely had an assertion failure.
29381         (base_len): New function.
29382
29383         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
29384         Do not include <assert.h>; no longer needed.
29385         Include xalloc.h.
29386         (memrchr): Remove decl.
29387         (dir_name_r): Remove.
29388         (dir_len): Renamed from dirlen.  All callers changed.
29389         Rewrite in terms of base_name, for simplicity and consistency.
29390         (dir_name): Never return NULL.  All callers changed.
29391         Do not include <stdlib.h> in test program; no longer needed.
29392         return 0; is fine for test program.
29393
29394         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
29395         New macros.
29396         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
29397
29398         * lib/path-concat.c (path_concat): Use base_len to compute
29399         base length, not strlen; this means we cannot rely on memcpy
29400         to null-terminate.
29401
29402         * lib/same.c (STREQ): Remove.
29403         (same_name): Handle the case where the basename ends in trailing '/'.
29404
29405         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
29406         a slash was stripped.  Do not strip the last slash after a
29407         file system prefix.
29408
29409 2001-05-11  Paul Eggert  <eggert@twinsun.com>
29410
29411         * lib/Makefile.am (libfetish_a_SOURCES):
29412         Add strftime.c, since we now compile it on all hosts.
29413
29414         * lib/strftime.c (my_strftime):
29415         Define to nstrftime if emacs, but only if my_strftime is not defined.
29416         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
29417         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
29418         Add one more extra argument: a nanoseconds value.
29419         All uses changed.
29420         (ns): New macro.
29421         (my_strftime function): Add %N format.
29422         (emacs_strftimeu): Renamed from emacs_strftime,
29423         with extra ut argument.
29424
29425 2001-05-09  Paul Eggert  <eggert@twinsun.com>
29426
29427         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
29428
29429 2001-04-21  Jim Meyering  <meyering@lucent.com>
29430
29431         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
29432         doesn't interfere.
29433
29434 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
29435
29436         * m4/ftruncate.m4: Check for chsize.
29437         Link with ftruncate.o unconditionally if ftruncate is missing.
29438         This was required when cross-compiling to i586-mingw32msvc.
29439
29440 2001-04-08  Jim Meyering  <meyering@lucent.com>
29441
29442         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
29443         recomputed; that's necessary when the offset spans a DST transition.
29444         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
29445
29446 2001-04-02  Jim Meyering  <meyering@lucent.com>
29447
29448         * lib/regex.h, regex.c: Update from GNU libc.
29449
29450 2001-03-24  Jim Meyering  <meyering@lucent.com>
29451
29452         * m4/jm-macros.m4: Require autoconf-2.49d.
29453
29454 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
29455
29456         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
29457
29458 2001-03-19  Paul Eggert  <eggert@twinsun.com>
29459
29460         * lib/version-etc.c (version_etc_copyright): Update to 2001.
29461
29462 2001-03-17  Jim Meyering  <meyering@lucent.com>
29463
29464         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
29465         now that the version in autoconf is equivalent.
29466         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
29467
29468         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
29469         Suggestion from Akim Demaille.
29470
29471         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
29472         (jm_PREREQ_TEMPNAME): New function.
29473
29474 2001-03-16  Paul Eggert  <eggert@twinsun.com>
29475
29476         * lib/tempname.c (uint64_t): Define to uintmax_t if
29477         not defined, and if UINT64_MAX is not defined.
29478         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
29479         Reported by John David Anglin.
29480
29481 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
29482
29483         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
29484         resolve alias if codeset is empty.
29485         * lib/config.charset (BeOS): Use wildcard syntax.
29486
29487 2001-03-13  Jim Meyering  <meyering@lucent.com>
29488
29489         * lib/path-concat.c (path_concat)
29490         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
29491         concatenating e.g., `C:' and `foo'.
29492         From Bruno Haible.
29493
29494 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
29495
29496         * lib/localcharset.c (locale_charset): Don't use
29497         setlocale(LC_CTYPE,NULL). Don't return NULL.
29498         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
29499
29500 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
29501
29502         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
29503         support for DOS/DJGPP.
29504
29505 2001-03-01  Paul Eggert  <eggert@twinsun.com>
29506
29507         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
29508         lacks mkstemp.  Compile our own tempname.c if we compile our own
29509         mkstemp.c, as mkstemp relies on tempname.
29510
29511 2001-03-01  Jim Meyering  <meyering@lucent.com>
29512
29513         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
29514         AH_VERBATIM really does output its argument verbatim.
29515
29516 2001-02-28  Paul Eggert  <eggert@twinsun.com>
29517
29518         * lib/Makefile.am (libfetish_a_SOURCES):
29519         Add dup-safer.c, fopen-safer.c.
29520         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
29521
29522         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
29523         * lib/unistd-safer.h: New files.
29524
29525 2001-02-25  Paul Eggert  <eggert@twinsun.com>
29526
29527         The mkstemp replacement is taken from glibc 2.2.2, with some
29528         portability fixes for use outside glibc, as follows:
29529
29530         * lib/tempname.c (struct_stat64): New macro.
29531         (direxists, __gen_tempname): Use it.
29532         This avoids a portability problem with Solaris 8.
29533
29534         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
29535         (<stddef.h>, <stdint.h>, <string.h>):
29536         Include only if STDC_HEADERS || _LIBC.
29537         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
29538         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
29539         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
29540         (__set_errno): Define this macro if <errno.h> doesn't.
29541         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
29542         Define these macros if <stdio.h> doesn't.
29543         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
29544         Define these macros if <sys/stat.h>
29545         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
29546         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
29547         __xstat64): Define if not _LIBC.
29548         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
29549         (__gen_tempname): Invoke gettimeofday only if
29550         HAVE_GETTIMEOFDAY || _LIBC;
29551         otherwise, fall back on plain "time".
29552         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
29553
29554         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
29555
29556         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
29557
29558 2001-02-18  Paul Eggert  <eggert@twinsun.com>
29559
29560         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
29561
29562 2001-02-17  Paul Eggert  <eggert@twinsun.com>
29563
29564         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
29565         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
29566         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
29567         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
29568
29569 2001-02-17  Paul Eggert  <eggert@twinsun.com>
29570
29571         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
29572         Remove workaround macros for hosts that have mbrtowc but not
29573         mbstate_t, as we now insist on proper declarations for both
29574         before using mbrtowc.
29575
29576 2001-02-17  Jim Meyering  <meyering@lucent.com>
29577
29578         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
29579         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
29580         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
29581         UnixWare 7.1.1.
29582
29583         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
29584         rather than AC_CACHE_VAL.
29585
29586 2001-02-17  Jim Meyering  <meyering@lucent.com>
29587
29588         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
29589         around included file name.
29590
29591         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
29592
29593         * lib/strftime.c: Update from GNU libc (the only changes were to
29594         comments).
29595
29596 2001-02-17  Jim Meyering  <meyering@lucent.com>
29597
29598         * lib/regex.c: Update from libc.
29599
29600 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
29601
29602         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
29603         clash.
29604
29605 2001-02-16  Paul Eggert  <eggert@twinsun.com>
29606
29607         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
29608         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
29609         Reported by Mark Hounschell via Paul Eggert.
29610
29611 2001-02-07  Jim Meyering  <meyering@lucent.com>
29612
29613         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
29614
29615 2001-02-05  Jim Meyering  <meyering@lucent.com>
29616
29617         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
29618         it includes the patch required for `large file' support with at least
29619         HP-UX's 10.20 /bin/cc.
29620
29621 2001-02-03  Jim Meyering  <meyering@lucent.com>
29622
29623         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
29624         AS_IF, now that it works once again (mysteriously).
29625         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
29626
29627 2001-01-30  Jim Meyering  <meyering@lucent.com>
29628
29629         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
29630         * m4/chown.m4: Rename conftestchown to conftest.chown.
29631         * m4/rename.m4: s/conftestdir/conftest.d1/ and
29632         s/conftestdir2/conftest.d2/.
29633         * m4/utimes.m4: s/conftestdata/conftest.data/
29634         Inspired by Pavel Roskin's change in autoconf.
29635
29636 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
29637
29638         * lib/config.charset: Update for FreeBSD 4.2.
29639
29640 2001-01-27  Jim Meyering  <meyering@lucent.com>
29641
29642         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
29643         a use of AS_IF.
29644         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
29645
29646 2001-01-26  Jim Meyering  <meyering@lucent.com>
29647
29648         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
29649         quotearg.c includes it.
29650
29651 2001-01-26  Jim Meyering  <meyering@lucent.com>
29652
29653         * lib/quotearg.c: Include stddef.h.
29654         * lib/quote.c: Include stddef.h.
29655         Reported by Axel Kittenberger.
29656
29657         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
29658         line in double quotes so that it evokes a better diagnostic.
29659         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
29660         Reported by Axel Kittenberger.
29661
29662 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
29663
29664         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
29665         as if it was a `charset'.
29666
29667 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
29668
29669         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
29670         has const.
29671
29672 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
29673
29674         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
29675         to avoid a warning.  Add back 'const' to inptr.
29676
29677 2001-01-20  Jim Meyering  <meyering@lucent.com>
29678
29679         Be sure that headers are checked before used in code compiled
29680         for the type checks.
29681         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
29682         In place of that, invoke jm_CHECK_ALL_TYPES.
29683         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
29684         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
29685         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
29686         The check for ssize_t was mistakenly run before the test for unistd.h.
29687
29688         The configure-time check for stdbool.h was missing.
29689         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
29690         (jm_PREREQ_HASH): New function.
29691
29692 2001-01-17  Jim Meyering  <meyering@lucent.com>
29693
29694         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
29695         for autoconf-2.49c.
29696         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
29697
29698 2001-01-16  Jim Meyering  <meyering@lucent.com>
29699
29700         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
29701         From Bruno Haible.
29702
29703 2001-01-14  Jim Meyering  <meyering@lucent.com>
29704
29705         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
29706         foo and bar.  Create conftestdir/ in the script, not in the C code.
29707         Remove directories in the script, not in the C code.
29708         Remove conftestdir{,2} before trying to create the directory.
29709         Make the entire configure script fail if the mkdir fails.
29710
29711 2001-01-14  Jim Meyering  <meyering@lucent.com>
29712
29713         * lib/rename.c: New file.  From Volker Borchert.
29714         Include stdlib.h, string.h or strings.h, and xalloc.h.
29715         Use strip_trailing_slashes rather than open-coding it.
29716
29717 2001-01-03  Paul Eggert  <eggert@twinsun.com>
29718
29719         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
29720
29721 2001-01-03  Jim Meyering  <meyering@lucent.com>
29722
29723         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
29724         of local `inptr' to avoid warning with some system declarations of
29725         iconv.
29726
29727 2001-01-02  Volker Borchert  <bt@teknon.de>
29728
29729         * m4/rename.m4: New file.
29730         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
29731
29732 2001-01-01  Jim Meyering  <meyering@lucent.com>
29733
29734         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
29735         even on systems with utmpx.h.  It's necessary for the declaration of
29736         utmp's ut_user member.  Reported by Andreas Jaeger.
29737
29738         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
29739         available. They are required for the declarations of getgrgid and
29740         getpwuid resp.
29741         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
29742         Reported by Andreas Jaeger.
29743
29744 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
29745
29746         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
29747         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
29748         so `make install' also works in VPATH builds.
29749
29750 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
29751
29752         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
29753         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
29754         can be used in subdirectories.
29755
29756 2000-12-29  Paul Eggert  <eggert@twinsun.com>
29757
29758         * lib/modechange.c: Do not assume that mode_t uses the
29759         traditional octal encoding.  E.g. "chmod 1 FOO" should set
29760         the other-execute bit of FOO even if S_IXOTH != 1.
29761
29762         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
29763         WOTH, XOTH, ALLM): New macros.
29764         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
29765          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
29766         Use them.
29767         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
29768         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
29769         (mode_compile):
29770         No need to use uintmax_t; unsigned long is long enough.
29771         Don't bother to get suffix since we don't use it.
29772
29773 2000-12-26  Jim Meyering  <meyering@lucent.com>
29774
29775         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
29776         better with autoheader.
29777
29778 2000-12-24  Jim Meyering  <meyering@lucent.com>
29779
29780         * lib/hash.c (is_prime): Return explicit boolean values.
29781         (hash_get_first): Return NULL to appease Irix5.6's 89.
29782         Reported by Nelson Beebe.
29783
29784 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
29785
29786         * lib/localcharset.c (locale_charset): Add support for Win32.
29787
29788 2000-12-18  Paul Eggert  <eggert@twinsun.com>
29789
29790         * lib/physmem.h, lib/physmem.c: New files.
29791
29792         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
29793         (noinst_HEADERS): Add physmem.h.
29794
29795         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
29796         't' for compatibility with Solaris 8 sort.
29797
29798 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
29799
29800         * lib/config.charset: Add support for BeOS.
29801
29802 2000-12-17  Jim Meyering  <meyering@lucent.com>
29803
29804         * m4/dos.m4 (jm_AC_DOS): New file and macro.
29805         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
29806
29807 2000-12-16  Jim Meyering  <meyering@lucent.com>
29808
29809         This bug had a serious impact on chown: `chown N:M FILE' (for integer
29810         N and M) would have treated it like `chown N:N FILE'.
29811
29812         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
29813
29814 2000-12-16  Jim Meyering  <meyering@lucent.com>
29815
29816         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
29817         SHELLS_FILE to a file name that's useful on djgpp systems.
29818         Include stdlib.h.
29819         (ADDITIONAL_DEFAULT_SHELLS): Define.
29820         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
29821         Based mostly on a patch from Prashant TR.
29822
29823 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
29824
29825         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
29826         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
29827         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
29828
29829 2000-12-08  Andreas Schwab  <schwab@suse.de>
29830
29831         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
29832         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
29833
29834 2000-12-07  Jim Meyering  <meyering@lucent.com>
29835
29836         * lib/stripslash.c (ISSLASH): Define.
29837         (strip_trailing_slashes): Use ISSLASH rather than comparing against
29838         `/'.
29839         From Prashant TR.
29840
29841         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
29842         (dir_name_r): Declare this function as static.
29843         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
29844         manifest itself on a name containing a mix of slashes and
29845         backslashes.
29846         Make this function work with names starting with a DOS-style
29847         drive letter and colon prefix.
29848         (dir_name): Append `.' if necessary.
29849         Based mostly on patches from Prashant TR and Eli Zaretskii.
29850
29851         * lib/dirname.h (dir_name_r): Remove prototype.
29852
29853 2000-12-06  Paul Eggert  <eggert@twinsun.com>
29854
29855         * m4/off_t-format.m4: Remove this file.
29856         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
29857
29858 2000-12-06  Jim Meyering  <meyering@lucent.com>
29859
29860         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
29861         replacement strtoull, we may well need the replacement strtoul, too.
29862         Check for declarations of strtoul and strtoull.
29863         Check for strtol.  Mainly as a cue to cause automake to include
29864         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
29865         Check for limits.h -- strtol.c needs it.
29866
29867 2000-12-05  Jim Meyering  <meyering@lucent.com>
29868
29869         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
29870
29871 2000-12-04  Jim Meyering  <meyering@lucent.com>
29872
29873         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
29874         Also include memory.h, stdlib.h, unistd.h if appropriate.
29875         Reported by Andreas Jaeger (conflicting declaration of malloc).
29876
29877 2000-12-02  Jim Meyering  <meyering@lucent.com>
29878
29879         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
29880         * m4/jm-macros.m4 (jm_MACROS): require it.
29881
29882 2000-12-02  Jim Meyering  <meyering@lucent.com>
29883
29884         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
29885
29886 2000-12-01  Paul Eggert  <eggert@twinsun.com>
29887
29888         * lib/memrchr.c: Include <config.h> before any system include file.
29889
29890 2000-11-30  Jim Meyering  <meyering@lucent.com>
29891
29892         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
29893
29894 2000-11-30  Jim Meyering  <meyering@lucent.com>
29895
29896         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
29897
29898 2000-11-29  Paul Eggert  <eggert@twinsun.com>
29899
29900         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
29901
29902 2000-11-26  Jim Meyering  <meyering@lucent.com>
29903
29904         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
29905
29906 2000-11-22  Paul Eggert  <eggert@twinsun.com>
29907
29908         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
29909         size of (size_t) -1; it's not portable.
29910
29911 2000-11-17  Jim Meyering  <meyering@lucent.com>
29912
29913         * lib/strstr.c: Update from GNU libc.
29914
29915 2000-11-17  Akim Demaille  <akim@epita.fr>
29916
29917         * lib/obstack.h: Formatting changes.
29918         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
29919         prevent type checking.
29920         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
29921         cast the value to (void *): assigning a `foo *' to a `void *'
29922         variable is valid.
29923         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
29924
29925 2000-11-16  Jim Meyering  <meyering@lucent.com>
29926
29927         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
29928
29929 2000-11-11  Jim Meyering  <meyering@lucent.com>
29930
29931         * lib/error.c: Add a couple #includes, merging from GNU libc version.
29932
29933 2000-11-10  Jim Meyering  <meyering@lucent.com>
29934
29935         * lib/obstack.h: Update from GNU libc.
29936         * lib/obstack.c: Likewise.
29937
29938 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
29939
29940         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
29941
29942 2000-11-06  Paul Eggert  <eggert@twinsun.com>
29943
29944         * lib/getusershell.c (setusershell): Use rewind rather than
29945         fseek/fseeko, to avoid configuration hassles with fseeko.
29946         Don't bother opening SHELLS_FILE if shellstream is NULL;
29947         it's not necessary.
29948
29949 2000-11-05  Jim Meyering  <meyering@lucent.com>
29950
29951         * lib/makepath.h (make_dir): Declare.
29952         * lib/makepath.c (make_dir): Remove `static' attribute.
29953         Tweak a comment.
29954
29955 2000-11-04  Jim Meyering  <meyering@lucent.com>
29956
29957         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
29958
29959 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
29960
29961         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
29962         last one in a bucket, advance to the next bucket.
29963
29964 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
29965
29966         * lib/fnmatch.c: Do not comment out all the code if we are using
29967         the GNU C library, because in some cases we are replacing buggy
29968         code in the GNU C library itself.
29969
29970 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
29971
29972         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
29973         (regex_compile): Catch bogus \(\1\).
29974
29975 2000-10-30  Paul Eggert  <eggert@twinsun.com>
29976
29977         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
29978         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
29979         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
29980
29981 2000-10-30  Paul Eggert  <eggert@twinsun.com>
29982
29983         * lib/error.h, getline.h, modechange.h:
29984         Remove "2000" from Copyright line, as the file hasn't been
29985         changed this year other than in the copyright notice.
29986
29987         * lib/xalloc.h: Add "2000" to Copyright line, as this file
29988         was changed this year.
29989
29990 2000-10-29  Jim Meyering  <meyering@lucent.com>
29991
29992         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
29993         renaming.
29994         * m4/ls-mntd-fs.m4: Likewise
29995
29996 2000-10-29  Jim Meyering  <meyering@lucent.com>
29997
29998         * lib/xstat.in: Fix grammar in comment.
29999
30000 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
30001
30002         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
30003         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
30004         doesn't define __restrict_arr.
30005
30006 2000-10-28  Jim Meyering  <meyering@lucent.com>
30007
30008         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
30009         (jm_PREREQ_MEMCHR): New function.
30010
30011 2000-10-28  Jim Meyering  <meyering@lucent.com>
30012
30013         * lib/memchr.c: Update from libc.
30014         Adjust for portability:
30015         [HAVE_STDLIB_H]: Include stdlib.h.
30016         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
30017         Undef __memchr, too.
30018         [!weak_alias]: Define __memchr to memchr.
30019
30020         * lib/regex.c: Update from libc.
30021         * lib/regex.h: Likewise.
30022         * lib/getopt1.c: Likewise.
30023         * lib/memcmp.c: Likewise.
30024
30025         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
30026         Avoid using fseek, when possible -- it's broken by design.
30027         Patch by Ulrich Drepper.
30028
30029 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
30030
30031         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
30032         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
30033         Giving in to popular pressure to shut up the compiler with casts.
30034
30035 2000-10-26  Jim Meyering  <meyering@lucent.com>
30036
30037         * lib/strftime.c: Update from libc.
30038
30039 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
30040
30041         * regex.c: More `unsigned char' -> `re_char' changes.
30042         Also change several `int' into `re_wchar_t'.
30043         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
30044         (PUSH_FAILURE_POINTER): Don't cast any more.
30045         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
30046         We want GCC to complain, since this piece of code makes
30047         re_match non-reentrant, which *should* be fixed.
30048         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
30049         (EXTEND_BUFFER): Use RETALLOC.
30050         (SET_LIST_BIT): Don't cast.
30051         (re_wchar_t): New type.
30052         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
30053         that those two functions will always properly return.
30054         (IMMEDIATE_QUIT_CHECK): Cast to void.
30055         (analyse_first): Use recursion rather than an explicit stack.
30056         (re_compile_fastmap): Can't fail anymore.
30057         (re_search_2): Don't check re_compile_fastmap for failure.
30058         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
30059         Now also sets the new value (passed in a new argument).
30060         (re_match_2_internal): Use it.
30061         Also, use a new var `reg' of type size_t when looping through regs
30062         rather than reuse the inappropriate `mcnt'.
30063
30064 2000-10-25  Jim Meyering  <meyering@lucent.com>
30065
30066         * lib/obstack.c: Update from libc.
30067
30068 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
30069
30070         * regex.c (regex_compile): Change the way of handling a range from
30071         a char less than 256 to a char not less than 256.
30072
30073 2000-10-24  Andrew Innes  <andrewi@gnu.org>
30074
30075         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
30076         NT-Emacs only.
30077         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
30078         so that re_search functions only quit when callers expect them to.
30079
30080 2000-10-23  Jim Meyering  <meyering@lucent.com>
30081
30082         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
30083         wrong.  That set_locale call must not have any side effects.
30084         From Paul Eggert.
30085
30086 2000-10-22  Jim Meyering  <meyering@lucent.com>
30087
30088         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
30089         [CYCLIC]: Remove now-unused definition.
30090
30091         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
30092         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
30093         Suggestion from Ulrich Drepper.
30094
30095 2000-10-21  Jim Meyering  <meyering@lucent.com>
30096
30097         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
30098         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
30099         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
30100
30101 2000-10-21  Jim Meyering  <meyering@lucent.com>
30102
30103         * lib/dirname.c (memrchr): Declare if necessary.
30104         (dir_name): Remove the restriction that there be no
30105         trailing slashes.  Now, this code skips past them, effectively
30106         ignoring them.
30107         [TEST_DIRNAME] (main): New unit tests.
30108
30109         * lib/memrchr.c: New file from GNU libc.
30110         Undef __memrchr, too.
30111         [!weak_alias]: Define __memrchr to memrchr.
30112         Guard weak_alias use with `#ifdef weak_alias'.
30113
30114 2000-10-21  Jim Meyering  <meyering@lucent.com>
30115
30116         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
30117         (dir_name): Use dir_name_r.
30118         * lib/dirname.h (dir_name_r): Declare it.
30119
30120 2000-10-17  Jim Meyering  <meyering@lucent.com>
30121
30122         * lib/quote.h (PARAMS): Define and use.
30123         Reported by Akim Demaille.
30124
30125         * lib/getopt.c: Update from libc.
30126
30127 2000-10-16  Jim Meyering  <meyering@lucent.com>
30128
30129         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
30130         setlocale.
30131         From Jan Fedak.
30132
30133 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
30134
30135         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
30136
30137 2000-09-25  Jim Meyering  <meyering@lucent.com>
30138
30139         * lib/md5.h (rol): Define (from GnuPG).
30140
30141         * lib/sha.c: Give credit (GnuPG) where due.
30142         (M): Use rol rather than open-coding it.
30143         Add a FIXME comment.
30144
30145 2000-09-21  Jim Meyering  <meyering@lucent.com>
30146
30147         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
30148         Reported by Michael Stone.
30149
30150 2000-09-20  Jim Meyering  <meyering@lucent.com>
30151
30152         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
30153         (noinst_HEADERS): Add sha.h.
30154         Based on code from Scott G. Miller and from GnuPG.
30155
30156 2000-09-18  Jim Meyering  <meyering@lucent.com>
30157
30158         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
30159         LIBS. Otherwise, everyone ends up linking with -lelf for some
30160         configurations.
30161         Reported by Mike Stone.
30162
30163 2000-09-15  Jim Meyering  <meyering@lucent.com>
30164
30165         * lib/regex.c: Update from libc.
30166
30167 2000-09-10  Jim Meyering  <meyering@lucent.com>
30168
30169         * lib/getopt.c (_getopt_internal): Update from glibc.
30170
30171 2000-09-09  Jim Meyering  <meyering@lucent.com>
30172
30173         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
30174         think it should be used as a general replacement for isascii.
30175         * lib/fnmatch.c: Likewise.
30176         * lib/mbswidth.c: Likewise
30177         * lib/regex.c: Likewise.
30178
30179         Don't use atoi.
30180         * lib/userspec.c: Include sys/param.h and limits.h.
30181         Include xstrtol.h.
30182         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
30183         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
30184         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
30185         UID, GID.  Check range.
30186
30187 2000-09-06  Jim Meyering  <meyering@lucent.com>
30188
30189         * lib/getopt.c (_getopt_internal): Update from glibc.
30190
30191 2000-08-30  Jim Meyering  <meyering@lucent.com>
30192
30193         * lib/strftime.c: Merge in changes from GNU libc.
30194
30195 2000-08-26  Jim Meyering  <meyering@lucent.com>
30196
30197         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
30198         * m4/fpending.m4: New file.
30199
30200 2000-08-26  Jim Meyering  <meyering@lucent.com>
30201
30202         * lib/closeout.c: Include "__fpending.h".
30203         (close_stdout_status): Return right away if there's nothing to flush.
30204
30205         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
30206         * lib/__fpending.c: New file.
30207         * lib/__fpending.h: New file.
30208
30209 2000-08-20  Jim Meyering  <meyering@lucent.com>
30210
30211         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
30212         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
30213         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
30214
30215 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
30216
30217         Improve fileutils installation on systems where running
30218         programs (like install) can't be unlinked.
30219         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
30220         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
30221
30222 2000-08-07  Paul Eggert  <eggert@twinsun.com>
30223
30224         Standardize on "memory exhausted" instead of "Memory exhausted"
30225         or "virtual memory exhausted".
30226         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
30227         "virtual memory exhausted".
30228         * lib/same.c (same_name): Invoke xalloc_die instead of printing
30229         our own message.
30230         * lib/userspec.c (parse_user_spec): Likewise.
30231         * lib/bumpalloc.h: comment fix
30232         * lib/same.c, userspec.c: Include xalloc.h.
30233
30234         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
30235         not char *const and pointing to a constant array.
30236         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
30237         (xrealloc): Comment fix.
30238
30239         * lib/userspec.c (parse_user_spec):
30240         Don't translate a message until just before returning,
30241         to avoid unnecessary translation.
30242
30243 2000-08-07  Jim Meyering  <meyering@lucent.com>
30244
30245         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
30246         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
30247         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
30248         getgroups.c, gethostname.c, getopt.h, group-member.c,
30249         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
30250         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
30251         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
30252         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
30253         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
30254         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
30255         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
30256         yesno.c: Back out Copyright date changes for each file with no change
30257         this year.  This eases coordination with other programs using the same
30258         source code modules.  From Paul Eggert.
30259
30260 2000-08-06  Paul Eggert  <eggert@twinsun.com>
30261
30262         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
30263         not char, for compatibility with glibc 2.1.3 strftime.c.
30264
30265 2000-08-03  Greg McGary  <greg@mcgary.org>
30266
30267         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
30268         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
30269         (EXTEND_BUFFER): Use them.
30270
30271 2000-08-01  Jim Meyering  <meyering@lucent.com>
30272
30273         * lib/dirname.c (ISSLASH): Define.
30274         (BACKSLASH_IS_PATH_SEPARATOR): Define.
30275         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
30276         both `\' and `/' may be use as path separators.
30277         Based on a patch from Prashant TR.
30278
30279 2000-07-31  Paul Eggert  <eggert@twinsun.com>
30280
30281         * lib/quotearg.c (quotearg_n_options): Don't make the initial
30282         slot vector a constant, since it might get modified.
30283
30284 2000-07-31  Jim Meyering  <meyering@lucent.com>
30285
30286         * lib/xmalloc.c: Use `virtual memory exhausted', not
30287         `Memory exhausted'.
30288         * lib/obstack.c (print_and_abort): Likewise.
30289
30290 2000-07-30  Paul Eggert  <eggert@twinsun.com>
30291
30292         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
30293         buffer, so that the caller can always quote one small
30294         component of a "memory exhausted" message in slot 0.
30295         From a suggestion by Jim Meyering.
30296
30297 2000-07-30  Jim Meyering  <meyering@lucent.com>
30298
30299         * lib/makepath.c (make_path): Quote the other instance, too.
30300
30301         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
30302         (STATIC_BUF_SIZE): Define.
30303         (quotearg_n_options): Use only statically allocated storage when
30304         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
30305         than STATIC_BUF_SIZE.
30306
30307 2000-07-29  Jim Meyering  <meyering@lucent.com>
30308
30309         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
30310         * lib/dirname.c (dir_name): Likewise.
30311
30312         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
30313         `/'.
30314
30315         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
30316         (dir_name): Assert that there are no trailing slashes.
30317
30318 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
30319
30320         * lib/mbswidth.h (mbswidth): Add a flags argument.
30321         (mbswidth): New declaration.
30322         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
30323         * lib/mbswidth.c (mbswidth): Add a flags argument.
30324         (mbsnwidth): New function.
30325
30326 2000-07-24  Jim Meyering  <meyering@lucent.com>
30327
30328         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
30329
30330 2000-07-23  Paul Eggert  <eggert@twinsun.com>
30331
30332         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
30333
30334 2000-07-23  Paul Eggert  <eggert@twinsun.com>
30335
30336         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
30337         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
30338         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
30339         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
30340         invoke multibyte primitives.
30341
30342 2000-07-23  Paul Eggert  <eggert@twinsun.com>
30343
30344         * lib/quotearg.c:
30345         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
30346         so that mbstate_t is always defined.
30347
30348         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
30349         be 1 in at least one GCC installation, and this configuration
30350         error is likely to be common.  Ignoring MB_LEN_MAX hurts
30351         performance on hosts that have mbrtowc but have only unibyte
30352         locales, but I assume these hosts are rare.
30353
30354 2000-07-23  Paul Eggert  <eggert@twinsun.com>
30355
30356         * lib/mbswidth.c (_XOPEN_SOURCE):
30357         Don't define; this causes problems on Solaris 7.
30358         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
30359
30360 2000-07-23  Jim Meyering  <meyering@lucent.com>
30361
30362         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
30363         too: getgrgid, getpwuid, getuid.
30364
30365 2000-07-23  Jim Meyering  <meyering@lucent.com>
30366
30367         * lib/basename.c (base_name): Add an assertion.
30368
30369 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
30370
30371         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
30372         shadow its mbsinit function.
30373
30374 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
30375
30376         * lib/mbswidth.h: New file.
30377         * lib/mbswidth.c: New file.
30378         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
30379         (noinst_HEADERS): Add mbswidth.h.
30380
30381 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
30382
30383         * lib/config.charset: Add support for FreeBSD. Improve support for
30384         HP-UX and IRIX 6.
30385
30386 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
30387
30388         * m4/mbswidth.m4: New file.
30389         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
30390
30391 2000-07-15  Jim Meyering  <meyering@lucent.com>
30392
30393         * lib/makepath.c: Include quote.h.
30394         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
30395         corresponding argument in a `quote (...)' call.
30396         Give better diagnostics.
30397
30398         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
30399         (noinst_HEADERS): Add quote.h.
30400
30401         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
30402         from tar's src/misc.c.
30403         * lib/quote.h: New file.  Prototypes for same.
30404
30405 2000-07-14  Paul Eggert  <eggert@twinsun.com>
30406
30407         From a suggestion by Bruno Haible.
30408         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
30409         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
30410         to decide whether to define the BeOS workaround macro;
30411         this adjusts to the change to AC_MBSTATE_T.
30412
30413 2000-07-14  Jim Meyering  <meyering@lucent.com>
30414
30415         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
30416         jm_AC_TYPE_UINTMAX_T.
30417
30418 2000-07-13  Paul Eggert  <eggert@twinsun.com>
30419
30420         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
30421
30422         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
30423         quotearg_buffer_restyled): Add support for
30424         clocale_quoting_style.  Undo previous change to
30425         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
30426         and "{RIGHT QUOTATION MARK}" msgids.
30427
30428 2000-07-10  Paul Eggert  <eggert@twinsun.com>
30429
30430         From a suggestion by Bruno Haible.
30431         * m4/mbstate_t.m4 (AC_MBSTATE_T):
30432         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
30433         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
30434         and mbstate_t, to a single-part test that simply defines mbstate_t.
30435         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
30436         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
30437
30438 2000-07-10  Jim Meyering  <meyering@lucent.com>
30439
30440         * m4/strerror_r.m4: Mirror the correction made in autoconf.
30441
30442         * m4/gnu-source.m4: Output to confdefs.h directly.
30443         Suggestion from Akim Demaille.
30444
30445 2000-07-09  Paul Eggert  <eggert@twinsun.com>
30446
30447         The old behavior of quoting `like this' doesn't look good with
30448         newer, ISO-style fonts.  See:
30449         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
30450
30451         Instead, quote "like this" by default.  Let the translator
30452         tailor the locale-specific quoting behavior by providing
30453         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
30454
30455         * lib/quotearg.c (N_): New macro.
30456         (gettext_default): New function.
30457         (quotearg_buffer_restyled): Use
30458         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
30459         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
30460
30461 2000-07-09  Jim Meyering  <meyering@lucent.com>
30462
30463         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
30464         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
30465
30466         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
30467         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
30468
30469 2000-07-09  Jim Meyering  <meyering@lucent.com>
30470
30471         * lib/Most files: Update copyright dates to include 2000.
30472
30473 2000-07-08  Jim Meyering  <meyering@lucent.com>
30474
30475         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
30476         if not defined.
30477         (xgethostname): Remove now-unnecessary #ifdef.
30478         Move declaration of `err' into loop where it's used.
30479
30480 2000-07-05  Paul Eggert  <eggert@twinsun.com>
30481         and Bruno Haible  <haible@clisp.cons.org>
30482
30483         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
30484         only if the test for an object-type mbstate_t fails.  This
30485         prevents us from mistakenly reporting that mbstate_t is a
30486         system object type after we "#define mbstate_t int" to work
30487         around its lack.
30488
30489 2000-07-05  Paul Eggert  <eggert@twinsun.com>
30490         and Bruno Haible  <haible@clisp.cons.org>
30491
30492         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
30493
30494 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
30495
30496         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
30497         to strerror_r.
30498         Include <ctype.h> for use of isalpha.
30499
30500 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
30501
30502         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
30503         by allocating a larger buffer. Test the gethostname return value for
30504         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
30505         returns an error and ENAMETOOLONG isn't defined.
30506
30507 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
30508
30509         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
30510         dimension.
30511
30512 2000-07-04  Jim Meyering  <meyering@lucent.com>
30513
30514         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
30515         of the deprecated AC_CHECKING.
30516
30517 2000-07-04  Jim Meyering  <meyering@lucent.com>
30518
30519         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
30520         Reported by Bruno Haible.
30521
30522 2000-07-04  Jim Meyering  <meyering@lucent.com>
30523
30524         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
30525         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
30526         lacks mbrtowc.
30527
30528 2000-07-03  Paul Eggert  <eggert@twinsun.com>
30529
30530         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
30531         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
30532
30533 2000-07-03  Paul Eggert  <eggert@twinsun.com>
30534         and Bruno Haible  <haible@clisp.cons.org>
30535
30536         * lib/quotearg.c (mbrtowc):
30537         Assign to *pwc, and return 1 only if result is nonzero.
30538         (iswprint): Use ISPRINT when substituting our own mbrtowc.
30539
30540 2000-07-03  Jim Meyering  <meyering@lucent.com>
30541
30542         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
30543
30544 2000-07-03  Jim Meyering  <meyering@lucent.com>
30545
30546         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
30547         This is necessary to get a definition of e.g., UTMP_FILE on
30548         HP-UX 10.20.
30549         From Bob Proulx.
30550
30551 2000-07-02  Jim Meyering  <meyering@lucent.com>
30552
30553         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
30554
30555         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
30556         AC_LIBOBJ(function_name).
30557         * m4/chown.m4: Likewise.
30558         * m4/fnmatch.m4: Likewise.
30559         * m4/ftruncate.m4: Likewise.
30560         * m4/getgroups.m4: Likewise.
30561         * m4/getline.m4: Likewise.
30562         * m4/group-member.m4: Likewise.
30563         * m4/jm-macros.m4: Likewise.
30564         * m4/lstat.m4: Likewise.
30565         * m4/malloc.m4: Likewise.
30566         * m4/memcmp.m4: Likewise.
30567         * m4/nanosleep.m4: Likewise.
30568         * m4/putenv.m4: Likewise.
30569         * m4/realloc.m4: Likewise.
30570         * m4/regex.m4: Likewise.
30571         * m4/stat.m4: Likewise.
30572         * m4/strftime.m4: Likewise.
30573
30574 2000-07-02  Jim Meyering  <meyering@lucent.com>
30575
30576         * lib/quotearg.c (mbstate_t): Don't define here.
30577
30578 2000-07-02  Jim Meyering  <meyering@lucent.com>
30579
30580         * lib/nanosleep.c (SIGCONT): Define if not already defined.
30581
30582 2000-07-01  Jim Meyering  <meyering@lucent.com>
30583
30584         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
30585
30586 2000-07-01  Jim Meyering  <meyering@lucent.com>
30587
30588         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
30589         problem.
30590
30591 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
30592
30593         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
30594         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
30595
30596 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
30597
30598         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
30599         per change in ../m4/ls-mntd-fs.m4.
30600         (read_filesystem_list): Ignore symbolic links.
30601
30602 2000-06-29  Jim Meyering  <meyering@lucent.com>
30603
30604         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
30605         for declaration of strcmp.
30606
30607         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
30608
30609         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
30610         Avoid warning by casting result to `char *' to remove `const'.
30611
30612 2000-06-28  Jim Meyering  <meyering@lucent.com>
30613
30614         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
30615         included by quotearg.c, for which we perform this test.  From
30616         Bruno Haible.
30617
30618 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
30619
30620         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
30621         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
30622         <utmpx.h> exists, put readutmp.o into LIBOBJS.
30623
30624 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
30625
30626         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
30627
30628 2000-06-26  Paul Eggert  <eggert@twinsun.com>
30629
30630         savedir now sets errno on failure and invokes xmalloc to get memory.
30631         Fix a couple of other minor bugs while we're at it.
30632
30633         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
30634         (NAMLEN): Remove macro.
30635         (malloc, realloc): Remove decls.
30636         (stpcpy): Likewise.
30637         ("xalloc.h"): Include.
30638         (NAME_SIZE_DEFAULT): New macro.
30639         (savedir): Use xmalloc / xrealloc to allocate memory.
30640         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
30641         Skip "" directory entries.
30642         Use strlen to calculate directory entry length, since the old method
30643         is rarely used these days and isn't worth supporting.
30644         Don't use a pointer after freeing it.
30645         Check for integer overflow when calculating allocation size.
30646         Use memcpy to copy entries, instead of stpcpy.
30647         Set errno properly when returning NULL.
30648         Check for readdir error.
30649
30650 2000-06-26  Jim Meyering  <meyering@lucent.com>
30651
30652         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
30653
30654 2000-06-25  Jim Meyering  <meyering@lucent.com>
30655
30656         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
30657         Linux header bug when _XOPEN_SOURCE is defined to 500.
30658
30659 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
30660
30661         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
30662         deficiency.
30663
30664 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
30665
30666         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
30667         Include xalloc.h.
30668         Don't include <stdlib.h>.  Don't declare malloc, realloc.
30669
30670 2000-06-24  Jim Meyering  <meyering@lucent.com>
30671
30672         * m4/strerror_r.m4: Revive this file -- to try out an experimental
30673         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
30674         for which strerror does return char*, but which lacks a conveniently
30675         accessible declaration of the function.  If the compile-test says
30676         strerror_r doesn't work, then resort to a `run'-test that works on
30677         BeOS and segfaults on DEC Unix.
30678
30679 2000-06-24  Jim Meyering  <meyering@lucent.com>
30680
30681         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
30682
30683 2000-06-23  Paul Eggert  <eggert@twinsun.com>
30684
30685         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
30686         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
30687
30688 2000-06-23  Paul Eggert  <eggert@twinsun.com>
30689
30690         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
30691         (mbrtowc, mbstate_t): Define substitutes if
30692         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
30693         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
30694         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
30695
30696 2000-06-23  Jim Meyering  <meyering@lucent.com>
30697
30698         * m4/afs.m4: Add missing AC_MSG_RESULT.
30699         Reported by Bruno Haible.
30700
30701         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
30702         Suggestion from Bruno Haible.
30703
30704 2000-06-23  Jim Meyering  <meyering@lucent.com>
30705
30706         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
30707
30708 2000-06-21  Jim Meyering  <meyering@lucent.com>
30709
30710         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
30711
30712 2000-06-21  Jim Meyering  <meyering@lucent.com>
30713
30714         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
30715         (noinst_HEADERS): Add getstr.h.
30716
30717         * lib/getline.c (getstr): Move into a separate file.
30718         * lib/getstr.c (getstr): New file, extracted from getline.c, with
30719         the following changes: new parameter, delim2; both delim[12]
30720         parameters have type `int', not `char'.  The latter would lose
30721         with 8-bit delimiters.
30722         * lib/getstr.h: New file.
30723
30724 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
30725
30726         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
30727         than 1024, return a memory chunk of least possible size, instead
30728         of size PATH_MAX + 2. In the loop, increment the size proportionally.
30729         Use free/xmalloc instead of xrealloc to avoid copying for very long
30730         paths.
30731
30732 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
30733
30734         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
30735         the empty string.
30736
30737 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
30738
30739         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
30740         address, not strdup.  Include <stdlib.h> and don't declare free().
30741
30742 2000-06-19  Jim Meyering  <meyering@lucent.com>
30743
30744         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
30745
30746 2000-06-18  Jim Meyering  <meyering@lucent.com>
30747
30748         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
30749
30750         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
30751         `checking whether...' message to be consistent with that of the
30752         lstat test.
30753
30754 2000-06-18  Jim Meyering  <meyering@lucent.com>
30755
30756         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
30757         Besides, these days every porting target provides a mkdir function.
30758
30759         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
30760         needed. (this snippet comes from src/system.h).
30761
30762 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
30763
30764         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
30765
30766 2000-06-15  Paul Eggert  <eggert@twinsun.com>
30767
30768         * lib/human.c (adjust_value): New function.
30769         (human_readable_inexact): Apply rounding style even when
30770         printing approximate values.
30771
30772 2000-06-14  Paul Eggert  <eggert@twinsun.com>
30773
30774         * lib/human.c (human_readable_inexact): Allow an input block
30775         size that is not a multiple of the output block size, and vice versa.
30776         Reported by Piergiorgio Sartor.
30777
30778 2000-06-14  Paul Eggert  <eggert@twinsun.com>
30779
30780         * lib/getdate.y (get_date): Apply relative times after time
30781         zone indicator, not before.  Reported by Todd A. Jacobs.
30782
30783 2000-06-13  Jim Meyering  <meyering@lucent.com>
30784
30785         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
30786
30787         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
30788
30789 2000-06-12  Paul Eggert  <eggert@twinsun.com>
30790
30791         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
30792
30793 2000-06-12  Jim Meyering  <meyering@lucent.com>
30794
30795         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
30796         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
30797         optional argument.
30798         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
30799         the optional argument, `lib'.
30800
30801 2000-06-08  Jim Meyering  <meyering@lucent.com>
30802
30803         * m4/largefile.m4: Remove file (now that it's part of autoconf).
30804
30805 2000-06-04  Paul Eggert  <eggert@twinsun.com>
30806
30807         Rewrite largefile configuration so that we don't need to run
30808         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
30809         AC_CANONICAL_HOST in configure.in -- jmm]
30810
30811         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
30812         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
30813         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
30814         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
30815         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
30816         All uses changed.
30817         Instead of inspecting the output of getconf, try to compile the
30818         test program without and with the macro definition.
30819         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
30820         for getconf.  Instead, check for the needed flags by compiling
30821         test programs.
30822
30823 2000-06-04  Paul Eggert  <eggert@twinsun.com>
30824
30825         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
30826
30827 2000-06-04  Jim Meyering  <meyering@lucent.com>
30828
30829         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
30830         SunOS 4.1.4 for which gid_t is an unsigned type.
30831
30832 2000-06-03  Jim Meyering  <meyering@lucent.com>
30833
30834         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
30835         now that autoconf requires that.
30836
30837         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
30838         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
30839         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
30840
30841 2000-06-03  Jim Meyering  <meyering@lucent.com>
30842
30843         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
30844
30845 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
30846
30847         * m4/glibc21.m4: New file.
30848         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
30849
30850 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
30851
30852         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
30853         newer, don't install charset.alias.
30854         * lib/config.charset: Change the Linux/glibc rules so they become empty
30855         on glibc-2.1 or newer.
30856
30857 2000-06-02  Jim Meyering  <meyering@lucent.com>
30858
30859         * lib/mountlist.c: Back out last change.  Instead, do this...
30860         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
30861         me_dummy member using the same `ignore'-testing code.
30862         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
30863         fs_type strings.
30864         From Mark D. Roth.
30865
30866 2000-05-29  Jim Meyering  <meyering@lucent.com>
30867
30868         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
30869         mounts with the `ignore' attribute.  Based on a patch from
30870         Mark D. Roth.
30871
30872 2000-05-28  Jim Meyering  <meyering@lucent.com>
30873
30874         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
30875         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
30876         * m4/stat.m4: Likewise.
30877         * m4/lstat.m4: Likewise.
30878         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
30879
30880         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
30881         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
30882
30883 2000-05-26  Jim Meyering  <meyering@lucent.com>
30884
30885         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
30886
30887 2000-05-24  Jim Meyering  <meyering@lucent.com>
30888
30889         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
30890         autoconf requires that.
30891         * m4/lib-check.m4: Likewise.
30892         * m4/jm-macros.m4: Likewise.
30893         * m4/strftime.m4: Likewise.
30894
30895         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
30896         AC_CHECK_DECLS, now that autoconf requires that.
30897
30898 2000-05-22  Jim Meyering  <meyering@lucent.com>
30899
30900         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
30901         * m4/lstat.m4: Likewise.
30902
30903 2000-05-22  Jim Meyering  <meyering@lucent.com>
30904
30905         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
30906
30907 2000-05-20  Jim Meyering  <meyering@lucent.com>
30908
30909         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
30910         (jm_PREREQ): Use it.
30911
30912 2000-05-18  Jim Meyering  <meyering@lucent.com>
30913
30914         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
30915         back, too, since it may have been modified by allocate_entry.
30916         (hash_delete): Rewrite to use neither the assignment operator
30917         nor the comma operator in an if-expression.
30918
30919 2000-05-15  Paul Eggert  <eggert@twinsun.com>
30920
30921         * lib/closeout.c:
30922         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
30923         Remove; no longer needed.
30924         "quotearg.h": Add include.
30925         (file_name): Do not bother to explicitly initialize to NULL; it's less
30926         efficient on some hosts.
30927         (close_stdout_status): Remove test as to whether stdout was already
30928         closed; it breaks for the case "echo x | sort >&-".
30929         Quote file name colons.
30930         Do not assume that _("write error") lacks format strings.
30931
30932 2000-05-15  Jim Meyering  <meyering@lucent.com>
30933
30934         * lib/version-etc.c (version_etc_copyright): Update the copyright
30935         string used in all --version output.
30936
30937 2000-05-14  Jim Meyering  <meyering@lucent.com>
30938
30939         * lib/closeout.c (close_stdout_set_file_name): New function.
30940         (close_stdout_status): Use new file-scoped global.
30941         Return right away if fstat says the stdout file descriptor is invalid.
30942         * lib/closeout.h (close_stdout_set_file_name): Declare.
30943
30944 2000-05-10  Jim Meyering  <meyering@lucent.com>
30945
30946         * lib/closeout.c [default_exit_status]: New file-scoped variable.
30947         (close_stdout_set_status): New function.
30948         * lib/closeout.h (close_stdout_set_status): Declare.
30949
30950 2000-05-09  Jim Meyering  <meyering@lucent.com>
30951
30952         * m4/gettext.m4: Rename this...
30953         * m4/libintl.m4: ...to this.
30954
30955 2000-05-08  Jim Meyering  <meyering@lucent.com>
30956
30957         * lib/long-options.c: Don't include closeout.h.
30958         (parse_long_options): Don't call close_stdout for --version.
30959
30960 2000-05-06  Paul Eggert  <eggert@twinsun.com>
30961
30962         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
30963         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
30964         2.1.3 bug.  This avoids a clash when files like regex.c define
30965         _GNU_SOURCE.
30966
30967 2000-05-06  Jim Meyering  <meyering@lucent.com>
30968
30969         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
30970         (AC_REPLACE_FUNCS): Add strnlen.
30971
30972         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
30973         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
30974
30975         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
30976         AC_SEARCH_LIBS call for nanosleep.
30977         (LIB_NANOSLEEP): Set and AC_SUBST.
30978
30979 2000-05-06  Jim Meyering  <meyering@lucent.com>
30980
30981         * lib/strnlen.c: Undefine __strnlen and strnlen.
30982         [!weak_alias]: Define __strnlen to strnlen.
30983
30984         * lib/atexit.c: New file, from libiberty.
30985
30986 2000-05-06  Jim Meyering  <meyering@lucent.com>
30987
30988         * lib/closeout.c (close_stdout_status): Also check for errors on the
30989         stderr stream.
30990
30991 2000-05-05  Jim Meyering  <meyering@lucent.com>
30992
30993         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
30994         AC_SEARCH_LIBS call for clock_gettime.
30995         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
30996
30997         * m4/search-libs.m4: Update from autoconf.
30998
30999         su doesn't work on Solaris 2.6.
31000         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
31001         <shadow.h>.  Reported by Dragos Harabor.
31002
31003 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
31004
31005         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
31006         memcpy instead of xmalloc, xrealloc, path_concat.
31007         (locale_charset): Treat empty environment variables as absent.
31008         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
31009
31010 2000-05-04  Jim Meyering  <meyering@lucent.com>
31011
31012         * lib/getopt.c: Update from glibc.
31013         * lib/obstack.c: Likewise.
31014         * lib/obstack.h: Likewise.
31015         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
31016         file
31017
31018         * lib/regex.h: Likewise.
31019         * lib/strndup.c: Likewise.
31020         * lib/strnlen.c: New file, from glibc.
31021
31022 2000-05-03  Jim Meyering  <meyering@lucent.com>
31023
31024         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
31025
31026 2000-05-02  Paul Eggert  <eggert@twinsun.com>
31027
31028         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
31029         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
31030         compile-time test, rather than inspecting host and OS, to
31031         decide whether to define _LARGEFILE_SOURCE.
31032
31033 2000-05-01  Jim Meyering  <meyering@lucent.com>
31034
31035         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
31036
31037         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
31038         Based on a patch from Bruno Haible.
31039
31040 2000-05-01  Jim Meyering  <meyering@lucent.com>
31041
31042         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
31043
31044 2000-04-29  Jim Meyering  <meyering@lucent.com>
31045
31046         * lib/path-concat.c: Declare strdup only if it's not defined.
31047         * lib/canon-host.c: Likewise.
31048
31049 2000-04-28  Jim Meyering  <meyering@lucent.com>
31050
31051         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
31052         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
31053         is included first, then limits.h is included by locale.h by libintl.h.
31054         From John David Anglin.
31055
31056 2000-04-25  Jim Meyering  <meyering@lucent.com>
31057
31058         * lib/makepath.c (S_IRWXUGO): Define.
31059         (make_path): Always perform explicit chmod if MODE specifies any
31060         of the `special' permission bits.  Prompted by a bug report against
31061         install from Mate Wierdl and Joost van Baal.
31062
31063 2000-04-18  Jim Meyering  <meyering@lucent.com>
31064
31065         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
31066         (jm_PREREQ): Use it.
31067
31068 2000-04-18  Jim Meyering  <meyering@lucent.com>
31069
31070         * lib/README: New file.
31071
31072         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
31073         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
31074
31075 2000-04-17  Jim Meyering  <meyering@lucent.com>
31076
31077         Get it right :-)
31078         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
31079         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
31080         Suggestion from Akim Demaille.
31081
31082 2000-04-17  Jim Meyering  <meyering@lucent.com>
31083
31084         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
31085         the definition of it to rpl_strftime also defined-away the system's
31086         declaration.
31087
31088 2000-04-15  Jim Meyering  <meyering@lucent.com>
31089
31090         Use `C' to denote so-called `contiguous' files, the same way
31091         that tar does.
31092         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
31093         (ftypelet): Use S_ISCTG.
31094         From Michael Deutschmann.
31095
31096 2000-04-14  Jim Meyering  <meyering@lucent.com>
31097
31098         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
31099         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
31100         clobbered.
31101
31102 2000-04-14  Jim Meyering  <meyering@lucent.com>
31103
31104         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
31105
31106 2000-04-13  Jim Meyering  <meyering@lucent.com>
31107
31108         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
31109         AH_VERBATIM to insert required #ifndef into config.h.in.
31110         Suggestion from Akim Demaille.
31111
31112 2000-04-12  Jim Meyering  <meyering@lucent.com>
31113
31114         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
31115         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
31116         Christian Krackowizer.
31117
31118         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
31119         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
31120         (AC_SYS_LARGEFILE): Require.
31121         (AM_C_PROTOTYPES): Require.
31122
31123 2000-04-08  Jim Meyering  <meyering@lucent.com>
31124
31125         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
31126         names don't conflict.  Reported by Eli Zaretskii.
31127
31128 2000-04-07  Jim Meyering  <meyering@lucent.com>
31129
31130         * lib/putenv.c: Move inclusion of errno.h so it follows that of
31131         sys/types.h, to work around system header problems on AIX 3.2.5.
31132         From Bruno Haible.
31133
31134 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
31135
31136         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
31137         bug.  Deal with the different error behavior of Irix iconv.
31138
31139 2000-04-05  Paul Eggert  <eggert@twinsun.com>
31140
31141         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
31142         IRIX if the installer said otherwise.
31143
31144 2000-04-05  Jim Meyering  <meyering@lucent.com>
31145
31146         Portability tweaks required for ultrix4.3.
31147         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
31148         (jm_CHECK_DECLS): Add getutent to the list of functions.
31149         (_jm_DECL_HEADERS): Add utmpx.h.
31150         From John David Anglin.
31151
31152         * m4/strftime.m4: Back out the 2000-04-02 change.
31153         Instead of that change, simply undefine putenv in the test program.
31154
31155 2000-04-05  Jim Meyering  <meyering@lucent.com>
31156
31157         Portability tweaks required for ultrix4.3.
31158         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
31159         getutent.
31160         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
31161         * lib/canon-host.c: Declare strdup.
31162         * lib/path-concat.c: Likewise.
31163         From John David Anglin.
31164
31165 2000-04-04  Jim Meyering  <meyering@lucent.com>
31166
31167         Be more DOS 8.3-friendly.
31168         * lib/ref-add.sin: Renamed from ref-add.sed.in.
31169         * lib/ref-del.sin: Renamed from ref-del.sed.in.
31170         * lib/Makefile.am: Reflect renaming.
31171         Reported by Eli Zaretskii.
31172
31173         Use a temporary file name that won't clash with `charset.alias'
31174         in the DOS 8.3 name space.
31175         * lib/Makefile.am (charset_tmp): Define.
31176         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
31177         (uninstall-local): Likewise.
31178         Reported by Eli Zaretskii.
31179
31180 2000-04-03  Jim Meyering  <meyering@lucent.com>
31181
31182         * m4/gettext.m4: Fix typo in comment.
31183
31184         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
31185         textutils/configure.in).  Suggestion from Paul Eggert.
31186         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
31187
31188 2000-04-02  Paul Eggert  <eggert@twinsun.com>
31189
31190         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
31191         variable in the shell rather than using putenv, which isn't
31192         portable.  This avoids the configure-time inter-test dependency
31193         on the potentially-renamed putenv function.
31194
31195 2000-03-30  Paul Eggert  <eggert@twinsun.com>
31196
31197         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
31198         before checking struct stat.st_blksize, so that
31199         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
31200
31201 2000-03-29  Paul Eggert  <eggert@twinsun.com>
31202
31203         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
31204         since strftime.c uses HAVE_STRFTIME to decide whether to use
31205         the underlying strftime.
31206
31207 2000-03-29  Paul Eggert  <eggert@twinsun.com>
31208
31209         * lib/time/strftime.c (my_strftime): Make sure we call the system
31210         strftime, not ourselves, when invoking the underlying strftime.
31211
31212 2000-03-24  Jim Meyering  <meyering@lucent.com>
31213
31214         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
31215         (charset_alias): Define.
31216         (install-exec-local): Factor out common code.
31217         (uninstall-local): Split lines longer than 80.
31218         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
31219         (SUFFIXES): Define.
31220         (.sed.in.sed): New rule.  Don't redirect directly to $@.
31221         (CLEANFILES): Add ref-add.sed and ref-del.sed.
31222
31223 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
31224
31225         * lib/config.charset: Output a line containing "Packages using this
31226         file".
31227         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
31228         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
31229         ref-del.sed): New rules.
31230
31231 2000-03-17  Jim Meyering  <meyering@lucent.com>
31232
31233         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
31234         Otherwise, include <strings.h>
31235
31236 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
31237
31238         * lib/unicodeio.c (utf8_wctomb): New function.
31239         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
31240         format instead of in UCS-4 with platform dependent endianness.
31241
31242 2000-03-10  Jim Meyering  <meyering@lucent.com>
31243
31244         * m4/lib-check.m4: Look for getspnam in -lgen, too.
31245         From Marco Franzen.
31246
31247 2000-03-07  Paul Eggert  <eggert@twinsun.com>
31248
31249         * lib/savedir.c (savedir): Work even if directory size is
31250         negative; this can happen with some screwy NFS configurations.
31251
31252 2000-03-06  Jim Meyering  <meyering@lucent.com>
31253
31254         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
31255         if it's NULL (because we ran out of memory).  From Bruno Haible.
31256
31257 2000-03-05  Jim Meyering  <meyering@lucent.com>
31258
31259         * lib/localcharset.c ("path-concat.h"): Include.
31260         (get_charset_aliases): Use path_concat instead of ANSI string
31261         concatenation.
31262
31263         * lib/unicodeio.h (PARAMS): Define.
31264         Use it to guard prototype.
31265
31266 2000-03-04  Jim Meyering  <meyering@lucent.com>
31267
31268         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
31269         for lib/localcharset.c.
31270
31271 2000-03-04  Jim Meyering  <meyering@lucent.com>
31272
31273         * lib/Makefile.am (install-exec-local): Create $(libdir) before
31274         installing into it.
31275         (uninstall-local): Uncomment this rule so `make distcheck' works
31276         once again.
31277
31278         * lib/unicodeio.c (<errno.h>): Include it.
31279         (errno): Declare if not defined.
31280
31281         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
31282
31283         * lib/config.charset: New version, incorporating remarks from a linux
31284         i18n mailing list.  From Bruno Haible.
31285
31286 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
31287
31288         * m4/codeset.m4: New file.
31289         * m4/iconv.m4: New file.
31290         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
31291
31292 2000-03-03  Jim Meyering  <meyering@lucent.com>
31293
31294         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
31295
31296 2000-03-02  Jim Meyering  <meyering@lucent.com>
31297
31298         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
31299         the messages come out on separate lines.
31300
31301         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
31302         rather than jm_CHECK_DECLARATIONS.
31303         * m4/decl.m4: Remove now-unused file.
31304
31305         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
31306         geteuid.
31307
31308 2000-03-02  Jim Meyering  <meyering@lucent.com>
31309
31310         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
31311
31312 2000-03-01  Jim Meyering  <meyering@lucent.com>
31313
31314         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
31315         * lib/unicodeio.c: Likewise.
31316
31317 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
31318
31319         * lib/config.charset: New file.
31320         * lib/localcharset.c: New file.
31321         * lib/unicodeio.h, lib/unicodeio.c: New files.
31322         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
31323         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
31324         (noinst_HEADERS): Add unicodeio.h.
31325         (all-local, install-exec-local, charset.alias): New targets.
31326
31327 2000-02-28  Paul Eggert  <eggert@twinsun.com>
31328
31329         * lib/quotearg.c (ALERT_CHAR): New macro.
31330         (quotearg_buffer_restyled): Use it.
31331
31332 2000-02-27  Jim Meyering  <meyering@lucent.com>
31333
31334         * m4/check-decl.m4: Add getenv to the list.
31335
31336 2000-02-27  Jim Meyering  <meyering@lucent.com>
31337
31338         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
31339         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
31340
31341         * lib/backupfile.c: Guard inclusion of stdlib.h with
31342         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
31343         Declare malloc if needed.
31344
31345         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
31346         `#ifndef HAVE_DECL..'
31347         now that autoconf always defines the HAVE_DECL_ symbols.
31348         * lib/human.c: Likewise.
31349         * lib/same.c: Likewise.
31350         * lib/strtoumax.c: Likewise.
31351
31352         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
31353         declaration check was not run.
31354         * lib/hash.c: Likewise.
31355         * lib/human.c: Likewise.
31356         * lib/same.c: Likewise.
31357         * lib/strtoumax.c: Likewise.
31358
31359         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
31360         `.', then first look up the entire `.'-containing string as a login
31361         name.
31362
31363 2000-02-23  Jim Meyering  <meyering@lucent.com>
31364
31365         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
31366         in place of my hack.
31367
31368 2000-02-18  Paul Eggert  <eggert@twinsun.com>
31369
31370         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
31371         (textint): New typedef.
31372         (parser_control): Member year changed from int to textint.
31373         All uses changed.
31374         (YYSTYPE): Removed; replaced by %union with int and textint members.
31375         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
31376         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
31377         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
31378         (tSNUMBER, tUNUMBER): Now of type <textintval>.
31379         (date, number, to_year): Use width of number in digits, not its value,
31380         to determine whether it's a 2-digit year, or a 2-digit time.
31381         (yylex): Store number of digits of numeric tokens.
31382         Reported by John Kendall.
31383
31384         (parser_control): Changed from struct parser_control to typedef (for
31385         consistency).  All uses changed.
31386
31387         (tID): Removed; not used.
31388         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
31389
31390 2000-02-14  Paul Eggert  <eggert@twinsun.com>
31391
31392         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
31393         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
31394
31395 2000-02-12  Jim Meyering  <meyering@lucent.com>
31396
31397         * lib/userspec.c (ISDIGIT): Define it.
31398         (isdigit): Remove definition.
31399         (is_number): Use ISDIGIT, not isdigit.
31400         <libintl.h>: Include.
31401         (_ and N_): Define.
31402         (parse_user_spec): Mark translatable strings.
31403
31404 2000-02-10  Jim Meyering  <meyering@lucent.com>
31405
31406         With these changes, nanosleep.[ch] are finally enough like the other
31407         lib/* replacement files to compile on a few more losing systems.
31408
31409         * lib/nanosleep.h: Don't include config.h.
31410         Remove prototype from declaration of nanosleep.
31411         (PARAMS): Remove now-unneeded definition.
31412         * lib/nanosleep.c: #undef nanosleep.
31413         (rpl_nanosleep): Rename from nanosleep.
31414
31415 2000-02-10  Jim Meyering  <meyering@lucent.com>
31416
31417         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
31418         gnu_nanosleep to rpl_nanosleep.
31419
31420 2000-02-09  Jim Meyering  <meyering@lucent.com>
31421
31422         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
31423         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
31424
31425 2000-02-08  Akim Demaille  <akim@epita.fr>
31426
31427         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
31428         `[' and `]' and remove uses of `changequote'.
31429         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
31430         (AC_SYS_LARGEFILE): Likewise.
31431         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
31432         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
31433         of changequote.
31434         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
31435         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
31436         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
31437         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
31438
31439 2000-02-05  Jim Meyering  <meyering@lucent.com>
31440
31441         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
31442         Remove explicit use of AC_HEADER_TIME.  It is required by
31443         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
31444         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
31445         in autoconf whereby the expansion of the latter ended up preceding
31446         the expansion of its prerequisite, AC_HEADER_TIME.
31447         Reported by Volker Borchert.
31448
31449 2000-02-03  Jim Meyering  <meyering@lucent.com>
31450
31451         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
31452
31453 2000-02-03  Jim Meyering  <meyering@lucent.com>
31454
31455         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
31456         rather than with `#if HAVE_UTMPNAME'.
31457
31458 2000-02-02  Jim Meyering  <meyering@lucent.com>
31459
31460         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
31461         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
31462         Reported by Eli Zaretskii.
31463
31464 2000-02-01  Jim Meyering  <meyering@lucent.com>
31465
31466         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
31467
31468 2000-01-31  Jim Meyering  <meyering@lucent.com>
31469
31470         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
31471         functions.  Add the time.h and sys/time.h headers along with the
31472         AC_REQUIRE'ment of AC_HEADER_TIME.
31473
31474 2000-01-31  Jim Meyering  <meyering@lucent.com>
31475
31476         * lib/nanosleep.h (nanosleep): Guard declaration with
31477         `#if ! HAVE_DECL_NANOSLEEP'.
31478         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
31479         the declaration in that vendor's sys/timers.h.
31480         Reported by Christian Krackowizer.
31481
31482         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
31483         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
31484         (ISPRINT): Likewise.
31485         Reported by Tom Tromey.
31486
31487 2000-01-30  Jim Meyering  <meyering@lucent.com>
31488
31489         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
31490
31491         * m4/prereq.m4 (utmp_includes): Define.
31492         Check for ut_user and ut_name members in both struct utmpx
31493         and struct utmp.
31494
31495 2000-01-30  Jim Meyering  <meyering@lucent.com>
31496
31497         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
31498         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
31499         header files where only utmpx.ut_user is declared.
31500
31501         * lib/readutmp.h (UT_USER): Define.
31502
31503 2000-01-29  Jim Meyering  <meyering@lucent.com>
31504
31505         * m4/lib-check.m4: New file containing library-related checks from
31506         fileutils and sh-utils (textutils had none).
31507
31508 2000-01-28  Jim Meyering  <meyering@lucent.com>
31509
31510         * m4/perl.m4: Change format of warning message to look more like that
31511         from the missing script.  Suggestion from François Pinard.
31512
31513 2000-01-25  Jim Meyering  <meyering@lucent.com>
31514
31515         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
31516         well as time.h in the compile check.
31517         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
31518         Fix typo in cross-compiling case: s/yes/no/.
31519
31520 2000-01-23  Jim Meyering  <meyering@lucent.com>
31521
31522         * m4/jm-macros.m4: Move df-related tests here from
31523         fileutils/configure.in
31524
31525         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
31526         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
31527
31528         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
31529         s/space/ac_fsusage_space/.
31530         (jm_FILE_SYSTEM_USAGE): Take two parameters.
31531
31532         * m4/ftruncate.m4: New file (derived from part of
31533         fileutils/configure.in).
31534         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
31535         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
31536
31537         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
31538         AC_SUBST these here, rather than just in sh-util/configure.in, so
31539         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
31540         all the same.
31541         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
31542         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
31543         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
31544         (AC_SUBST(POW_LIBM)): Likewise.
31545         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
31546
31547 2000-01-23  Jim Meyering  <meyering@lucent.com>
31548
31549         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
31550         obstack.c.
31551
31552 2000-01-22  Jim Meyering  <meyering@lucent.com>
31553
31554         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
31555
31556         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
31557
31558         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
31559         configure.in
31560         (AC_CHECK_HEADERS): Likewise for sh-utils.
31561         (AC_CHECK_HEADERS): Likewise for textutils.
31562         Merge the three lists of headers.
31563
31564         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
31565         from fileutils' configure.in.
31566
31567         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
31568         code. Moved tests into their own function (_jm_DECL_HEADERS) in
31569         check-decl.m4.
31570
31571         * m4/check-decl.m4: Use #if rather than #ifdef.
31572         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
31573         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
31574         (_jm_DECL_HEADERS): Define new function.
31575         (jm_CHECK_DECLARATIONS): Require it.
31576
31577 2000-01-22  Jim Meyering  <meyering@lucent.com>
31578
31579         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
31580         [! HAVE_DECL_STRTOULL]: Declare strtoull.
31581         Required for some AIX systems.  Reported by Christian Krackowizer.
31582         [TESTING] (main): New function.
31583
31584         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
31585         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
31586         letters.
31587
31588         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
31589         iswprint.
31590
31591         * lib/strverscmp.c (ISDIGIT): Define.
31592         (strverscmp): Use ISDIGIT, not isdigit.
31593
31594 2000-01-19  Jim Meyering  <meyering@lucent.com>
31595
31596         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
31597         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
31598         defines `struct timespec' in <sys/time.h>
31599
31600         * m4/c-bs-a.m4: Remove uses of changequote altogether.
31601         Thanks to Akim for explaining.
31602
31603 2000-01-17  Paul Eggert  <eggert@twinsun.com>
31604
31605         * lib/nanosleep.c (nanosleep):
31606         Don't use SA_INTERRUPT to decide whether to call sigaction, as
31607         POSIX.1 doesn't require SA_INTERRUPT and some systems
31608         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
31609         it's been part of POSIX.1 since day 1 (in 1988).
31610
31611 2000-01-17  Jim Meyering  <meyering@lucent.com>
31612
31613         * lib/interlock: Remove unused file.  Reported by François Pinard.
31614
31615 2000-01-16  Paul Eggert  <eggert@twinsun.com>
31616
31617         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
31618         alert, backslash, formfeed, and vertical tab unnecessarily in
31619         shell quoting style.
31620
31621 2000-01-16  Jim Meyering  <meyering@lucent.com>
31622
31623         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
31624         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
31625         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
31626         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
31627
31628 2000-01-16  Jim Meyering  <meyering@lucent.com>
31629
31630         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
31631         because the latter didn't work.
31632
31633 2000-01-15  Jim Meyering  <meyering@lucent.com>
31634
31635         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
31636         (AC_REPLACE_FUNCS): Add memcpy and memset.
31637         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
31638         Add strpbrk.
31639         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
31640
31641 2000-01-12  Jim Meyering  <meyering@lucent.com>
31642
31643         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
31644         (jm_PREREQ): Use it.
31645         (jm_PREREQ_READUTMP): New macro.
31646         (jm_PREREQ): Use it.
31647
31648 2000-01-11  Paul Eggert  <eggert@twinsun.com>
31649
31650         Quote multibyte characters correctly.
31651         * m4/c-bs-a.m4: New file.
31652         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
31653         (jm_PREREQ): Use it.
31654
31655 2000-01-11  Paul Eggert  <eggert@twinsun.com>
31656
31657         * m4/uintmax_t.m4: Port to autoconf 2.13.
31658
31659 2000-01-08  Jim Meyering  <meyering@ascend.com>
31660
31661         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
31662         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
31663
31664 2000-01-04  Jim Meyering  <meyering@ascend.com>
31665
31666         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
31667         jm_STRUCT_DIRENT_D_TYPE.
31668         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
31669         jm_STRUCT_DIRENT_D_INO.
31670         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
31671         jm_STRUCT_UTIMBUF.
31672         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
31673         renamings.
31674         * m4/utime.m4: Likewise.
31675
31676         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
31677         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
31678
31679 2000-01-03  Paul Eggert  <eggert@twinsun.com>
31680
31681         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
31682         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
31683
31684 2000-01-02  Jim Meyering  <meyering@ascend.com>
31685
31686         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
31687         remember if this is necessary.
31688
31689 1999-12-26  Jim Meyering  <meyering@ascend.com>
31690
31691         * m4/jm-macros.m4: Use it here.
31692         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
31693
31694 1999-12-23  Jim Meyering  <meyering@ascend.com>
31695
31696         * m4/jm-macros.m4: Check for clock_gettime (moved from
31697         fileutils/configure.in)
31698         Check for gettimeofday.
31699
31700 1999-12-20  Jim Meyering  <meyering@ascend.com>
31701
31702         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
31703         autoconf-2.14a-1999-12-20.
31704
31705 1999-12-19  Jim Meyering  <meyering@ascend.com>
31706
31707         * m4/lstat-slash.m4: New file.
31708         * m4/jm-macros.m4: Use the new macro:
31709         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
31710
31711 1999-12-07  Jim Meyering  <meyering@ascend.com>
31712
31713         * m4/perl.m4: Require that File::Compare be available, too.
31714         Too many systems seem to lack it.
31715
31716         * m4/strftime.m4: Add checks for most of the cpp macros tested in
31717         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
31718
31719 1999-11-18  Paul Eggert  <eggert@twinsun.com>
31720
31721         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
31722         problem with the QNX 4.25 shell, which doesn't propagate exit
31723         status of failed commands inside shell assignments.
31724
31725 1999-11-17  Jim Meyering  <meyering@ascend.com>
31726
31727         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
31728
31729 1999-11-07  Jim Meyering  <meyering@ascend.com>
31730
31731         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
31732
31733 1999-11-06  Jim Meyering  <meyering@ascend.com>
31734
31735         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
31736         * m4/jm-macros.m4 (jm_MACROS): Use it here.
31737
31738 1999-11-05  Jim Meyering  <meyering@ascend.com>
31739
31740         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
31741         configure.in of textutils, fileutils, and sh-utils into this one
31742         (shared between those packages) file.
31743         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
31744         AC_STRUCT_ST_BLKSIZE.
31745
31746 1999-11-03  Jim Meyering  <meyering@ascend.com>
31747
31748         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
31749         of AC_CHECK_TYPE checks includes unistd.h.
31750         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
31751         Suggestion from Akim Demaille.
31752
31753 1999-10-30  Jim Meyering  <meyering@ascend.com>
31754
31755         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
31756         m4-quoted string.
31757         * m4/ls-mntd-fs.m4: Likewise.
31758         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
31759         * m4/jm-winsz1.m4: Likewise.
31760
31761         * m4/const.m4: Remove file, since the fix made it into the experimental
31762         version of autoconf.
31763         * m4/mktime.m4: Likewise.
31764
31765         * m4/check-type.m4: Remove file, now that the latest version of
31766         AC_CHECK_TYPE takes a third arg to specify additional #includes.
31767
31768         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
31769         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
31770         AC_CHECK_TYPE.
31771
31772 1999-10-04  Jim Meyering  <meyering@ascend.com>
31773
31774         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
31775
31776 1999-09-22  Paul Eggert  <eggert@twinsun.com>
31777
31778         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
31779         2.95.1 bug with HP-UX 10.20.
31780
31781 1999-09-17  Jim Meyering  <meyering@ascend.com>
31782
31783         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
31784         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
31785         due to missing strdup (against sh-utils-2.0).
31786
31787 1999-08-29  Jim Meyering  <meyering@ascend.com>
31788
31789         * m4/jm-macros.m4: Require jm_BISON.
31790         * m4/bison.m4: New file.
31791
31792 1999-08-17  Paul Eggert  <eggert@twinsun.com>
31793
31794         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
31795         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
31796
31797 1999-08-05  Jim Meyering  <meyering@ascend.com>
31798
31799         * m4/getline.m4: Rename test file from conftestdata to conftest.data
31800         to avoid conflicts with `conftest' on 8+3 filesystems.
31801         Suggestion from Eli Zaretskii.
31802
31803 1999-08-04  Jim Meyering  <meyering@ascend.com>
31804
31805         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
31806         fileutils and sh-utils (textutils's getline test was inadequate).
31807         (AM_FUNC_GETLINE): Run this test.
31808         (AC_CHECK_FUNCS): Check for getdelim.
31809         Reported by Bob Proulx.
31810
31811 1999-08-02  Jim Meyering  <meyering@ascend.com>
31812
31813         * m4/jm-macros.m4: Add a comment.
31814
31815 1999-08-01  Paul Eggert  <eggert@twinsun.com>
31816
31817         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
31818         <inttypes.h> defines strtoumax as a macro (and not as a
31819         function).
31820
31821 1999-08-01  Paul Eggert  <eggert@twinsun.com>
31822
31823         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
31824         that we can shift, multiply and divide unsigned long long
31825         values; Ultrix cc can't do it.
31826
31827 1999-08-01  Paul Eggert  <eggert@twinsun.com>
31828
31829         * m4/mktime.m4: New file, which is a preview of what should appear
31830         in the next public autoconf release.
31831
31832 1999-08-01  Paul Eggert  <eggert@twinsun.com>
31833
31834         * m4/lfs.m4: Remove this file.
31835         * m4/largefile.m4: New file.  It contains the old contents of
31836         lfs.m4, except that all names with prefix AC_LFS have been
31837         changed to use the prefix AC_SYS_LARGEFILE instead, to be
31838         compatible with future autoconf versions.  Also, some minor m4
31839         quoting problems have been fixed.
31840
31841 1999-08-01  Paul Eggert  <eggert@twinsun.com>
31842
31843         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
31844         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
31845         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
31846         and simplify the shell code.
31847
31848 1999-08-01  Jim Meyering  <meyering@ascend.com>
31849
31850         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
31851         m4.
31852
31853 1999-07-20  Jim Meyering  <meyering@ascend.com>
31854
31855         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
31856
31857 1999-07-15  Jim Meyering  <meyering@ascend.com>
31858
31859         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
31860
31861 1999-05-22  Jim Meyering  <meyering@ascend.com>
31862
31863         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
31864
31865 1999-05-20  Jim Meyering  <meyering@ascend.com>
31866
31867         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
31868         Add a colon after each `then' in case $4 is empty.
31869
31870 1999-05-16  Jim Meyering  <meyering@ascend.com>
31871
31872         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
31873
31874 1999-05-10  Jim Meyering  <meyering@ascend.com>
31875
31876         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
31877
31878         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
31879         AC_FUNC_MKTIME.
31880
31881 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
31882
31883         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
31884
31885 1999-05-04  Paul Eggert  <eggert@twinsun.com>
31886
31887         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
31888         not CPPFLAGS, so that linking works correctly in IRIX.
31889
31890 1999-04-30  Paul Eggert  <eggert@twinsun.com>
31891
31892         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
31893
31894 1999-04-20  Paul Eggert  <eggert@twinsun.com>
31895
31896         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
31897         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
31898         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
31899         jm_AC_TYPE_UNSIGNED_LONG_LONG.
31900         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
31901
31902         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
31903
31904 1999-04-20  Jim Meyering  <meyering@ascend.com>
31905
31906         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
31907         AC_REPLACE xstroull if necessary.  From Paul Eggert.
31908         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
31909
31910 1999-04-18  Jim Meyering  <meyering@ascend.com>
31911
31912         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
31913         * m4/jm-macros.m4: Use it.
31914
31915 1999-04-06  Jim Meyering  <meyering@ascend.com>
31916
31917         * m4/strftime.m4: Remove test for %f.
31918
31919 1999-03-29  Jim Meyering  <meyering@ascend.com>
31920
31921         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
31922         superset of the AC_TYPE_* checks in the textutils, fileutils,
31923         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
31924         AC_TYPE_PID_T.
31925
31926 1999-03-28  Jim Meyering  <meyering@ascend.com>
31927
31928         * m4/jm-macros.m4: Define GNU_PACKAGE here.
31929         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
31930         replaced e.g., in the *.sh files of the sh-utils.
31931
31932 1999-03-20  Jim Meyering  <meyering@ascend.com>
31933
31934         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
31935         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
31936         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
31937
31938 1999-03-19  Jim Meyering  <meyering@ascend.com>
31939
31940         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
31941
31942 1999-03-12  Jim Meyering  <meyering@ascend.com>
31943
31944         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
31945
31946 1999-03-07  Jim Meyering  <meyering@ascend.com>
31947
31948         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
31949         declared.
31950
31951 1999-02-17  Jim Meyering  <meyering@ascend.com>
31952
31953         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
31954         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
31955
31956 1999-02-07  Jim Meyering  <meyering@ascend.com>
31957
31958         * m4/group-member.m4: New file -- extracted from sh-utils'
31959         configure.in.
31960
31961         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
31962         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
31963
31964 1999-02-06  Jim Meyering  <meyering@ascend.com>
31965
31966         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
31967         * m4/fnmatch.m4: Likewise.
31968         * m4/getgroups.m4: Likewise.
31969         * m4/lstat.m4: Likewise.
31970         * m4/malloc.m4: Likewise.
31971         * m4/putenv.m4: Likewise.
31972         * m4/realloc.m4: Likewise.
31973         * m4/regex.m4: Likewise.
31974         * m4/stat.m4: Likewise.
31975         * m4/strftime.m4: Likewise.
31976         Suggestion from Alain Magloire.
31977
31978         * m4/chown.m4: Use `.$ac_objext', not `.o'.
31979         * m4/fnmatch.m4: Likewise.
31980         * m4/getgroups.m4: Likewise.
31981         * m4/getline.m4: Likewise.
31982         * m4/lstat.m4: Likewise.
31983         * m4/malloc.m4: Likewise.
31984         * m4/memcmp.m4: Likewise.
31985         * m4/putenv.m4: Likewise.
31986         * m4/realloc.m4: Likewise.
31987         * m4/regex.m4: Likewise.
31988         * m4/stat.m4: Likewise.
31989         * m4/strftime.m4: Likewise.
31990         Suggestion from Alain Magloire.
31991
31992         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
31993         an argument.
31994
31995         * m4/regex.m4: Add a run-time Test for proper operation of
31996         re_compile_pattern.
31997
31998 1999-01-31  Jim Meyering  <meyering@ascend.com>
31999
32000         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
32001
32002 1999-01-30  Jim Meyering  <meyering@ascend.com>
32003
32004         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
32005
32006         * m4/jm-mktime.m4: Make this a wrapper around the official
32007         AM_FUNC_MKTIME rather than my private copy, now that the official one
32008         is up to date.
32009         * m4/mktime.m4: Remove file.
32010
32011         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
32012         * m4/uptime.m4: Likewise.
32013         * m4/uintmax_t.m4: Likewise.
32014
32015 1999-01-28  Jim Meyering  <meyering@ascend.com>
32016
32017         * m4/jm-macros.m4: Use jm_AFS.
32018         * m4/afs.m4: New file (from fileutils' configure.in).
32019
32020         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
32021         * m4/chown.m4: Likewise.
32022         * m4/d-ino.m4: Likewise.
32023         * m4/d-type.m4: Likewise.
32024         * m4/fnmatch.m4: Likewise.
32025         * m4/getgroups.m4: Likewise.
32026         * m4/gettext.m4: Likewise.
32027         * m4/jm-mktime.m4: Likewise.
32028         * m4/jm-winsz2.m4: Likewise.
32029         * m4/lcmessage.m4: Likewise.
32030         * m4/ls-mntd-fs.m4: Likewise.
32031         * m4/malloc.m4: Likewise.
32032         * m4/memcmp.m4: Likewise.
32033         * m4/putenv.m4: Likewise.
32034         * m4/realloc.m4: Likewise.
32035         * m4/st_mtim.m4: Likewise.
32036         * m4/strftime.m4: Likewise.
32037
32038 1999-01-16  Jim Meyering  <meyering@ascend.com>
32039
32040         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
32041         (ARGMATCH_DIE_DECL): Define.
32042
32043 1999-01-12  Jim Meyering  <meyering@ascend.com>
32044
32045         * m4/Makefile.am.in: Rewrite to avoid using fmt.
32046         Reported by Lars Hecking.
32047
32048 1999-01-10  Jim Meyering  <meyering@ascend.com>
32049
32050         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
32051         gross kludge.
32052         * m4/inttypes_h.m4: Likewise.
32053         * m4/lstat.m4: Likewise.
32054         * m4/malloc.m4: Likewise.
32055         * m4/readdir.m4: Likewise.
32056         * m4/realloc.m4: Likewise.
32057         * m4/st_dm_mode.m4: Likewise.
32058         * m4/stat.m4: Likewise.
32059         * m4/utimbuf.m4: Likewise.
32060         * m4/utimes.m4: Likewise.
32061
32062         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
32063         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
32064         comments in config.h.in are meaningful.
32065
32066         * m4/jm-macros.m4: Require autoconf-2.13 here.
32067
32068         * m4/regex.m4: By default, don't use the included regex.c on systems
32069         with glibc 2.  Suggestion from Uli Drepper.
32070
32071 1999-01-02  Jim Meyering  <meyering@ascend.com>
32072
32073         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
32074
32075 1998-12-18  Jim Meyering  <meyering@ascend.com>
32076
32077         * m4/Makefile.am.in (Makefile.am): Simplify rule.
32078         Based on a suggestion from Lars Hecking.
32079
32080 1998-11-16  Paul Eggert  <eggert@twinsun.com>
32081
32082         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
32083
32084 1998-11-16  Jim Meyering  <meyering@ascend.com>
32085
32086         * m4/lfs.m4: Double-quote the `uname...` expression.
32087
32088 1998-11-14  Jim Meyering  <meyering@ascend.com>
32089
32090         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
32091         * m4/stat.m4: Likewise.
32092
32093 1998-11-03  Jim Meyering  <meyering@ascend.com>
32094
32095         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
32096         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
32097
32098 1998-10-18  Jim Meyering  <meyering@ascend.com>
32099
32100         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
32101
32102 1998-10-17  Jim Meyering  <meyering@ascend.com>
32103
32104         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
32105         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
32106         calls for those previously hard-coded headers.  Instead, take a new
32107         parameter.
32108         (jm_CHECK_DECLARATIONS): Reflect interface change.
32109         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
32110         (jm_CHECK_DECL_LOCALTIME_R): New macro.
32111
32112         * m4/mktime.m4: Test for spring-forward gap before long-running test.
32113
32114 1998-10-14  Jim Meyering  <meyering@ascend.com>
32115
32116         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
32117         instead of "TZ=America/Vancouver".  From Paul Eggert.
32118
32119 1998-10-11  Jim Meyering  <meyering@ascend.com>
32120
32121         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
32122         This adds a test for a recently added compatibility fix for mktime.c.
32123         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
32124
32125 1998-09-27  Jim Meyering  <meyering@ascend.com>
32126
32127         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
32128
32129         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
32130         ../configure.in, including a change from Gordon Matzigkeit to allow
32131         cross-compiling for the Hurd.
32132
32133         * m4/glibc.m4: New file/macro to test for the GNU C Library
32134         versions 1 and 2.  From Gordon Matzigkeit.
32135         Indent.
32136
32137 1998-09-21  Jim Meyering  <meyering@ascend.com>
32138
32139         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
32140
32141 1998-08-18  Paul Eggert  <eggert@twinsun.com>
32142
32143         Port nanosecond-resolution times to UnixWare 2.1.2 and
32144         pedantic Solaris 2.6.
32145
32146         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
32147         AC_STRUCT_ST_MTIM.
32148         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
32149         Generate name of ns member, instead of just 1 or undef.
32150         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
32151
32152 1998-08-15  Jim Meyering  <meyering@ascend.com>
32153
32154         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
32155         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
32156         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
32157         instead of jm_TYPE_SSIZE_T.
32158
32159 1998-08-12  Jim Meyering  <meyering@ascend.com>
32160
32161         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
32162
32163 1998-08-02  Jim Meyering  <meyering@ascend.com>
32164
32165         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
32166         in acconfig.h manually.
32167
32168 1998-07-31  Paul Eggert  <eggert@twinsun.com>
32169
32170         * m4/st_mtim.m4: New file.
32171
32172 1998-07-28  Jim Meyering  <meyering@ascend.com>
32173
32174         * m4/utimes.m4: Undef stat.
32175
32176 1998-07-25  Jim Meyering  <meyering@ascend.com>
32177
32178         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
32179         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
32180
32181 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
32182
32183         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
32184         uid and gid actually remain unchanged.
32185
32186 1998-07-07  Jim Meyering  <meyering@ascend.com>
32187
32188         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
32189
32190 1998-07-04  Jim Meyering  <meyering@ascend.com>
32191
32192         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
32193         to prove that this macro can be used in packages without regex.c.
32194
32195 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
32196
32197         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
32198         is to be used.
32199
32200 1998-07-03  Jim Meyering  <meyering@ascend.com>
32201
32202         * m4/gettext.m4: Add -lintl if it's found to be necessary.
32203
32204         * m4/gettext.m4: New file -- from gettext-0.10.35.
32205         * m4/lcmessage.m4: Likewise.
32206         * m4/progtest.m4: Likewise.
32207
32208         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
32209         * m4/jm-macros.m4: Require the new macro.
32210
32211 1998-06-29  Jim Meyering  <meyering@ascend.com>
32212
32213         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
32214         for the definition of NGROUPS (used in a system header included
32215         by sys/mount.h).
32216
32217 1998-06-28  Jim Meyering  <meyering@ascend.com>
32218
32219         * m4/ls-mntd-fs.m4: New file.
32220         * m4/fstypename.m4: New file.
32221
32222         * m4/jm-macros.m4: Require the new macro.
32223         * m4/jm-glibc-io.m4: New file.
32224
32225 1998-05-19  Jim Meyering  <meyering@ascend.com>
32226
32227         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
32228         * m4/lchown.m4: New file.
32229
32230         * m4/Makefile.am.in: New file.
32231         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
32232
32233 1998-05-14  Jim Meyering  <meyering@ascend.com>
32234
32235         * m4/Makefile.am (EXTRA_DIST): Add them.
32236         * m4/jm-macros.m4: New file.
32237         * m4/utimbuf.m4: New file.
32238
32239 1998-05-12  Jim Meyering  <meyering@ascend.com>
32240
32241         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
32242
32243 1998-05-11  Jim Meyering  <meyering@ascend.com>
32244
32245         * m4/isc-posix.m4: New file.
32246
32247 1998-05-10  Jim Meyering  <meyering@ascend.com>