c8c539dc4765b799a8ffeea76ccd6e9f63864ab8
[gnulib.git] / ChangeLog
1 2007-07-23  Ben Pfaff  <blp@gnu.org>
2
3         * lib/popcount.h: Use verify_true instead of if...abort.
4         * modules/popcount: Depend on verify module.
5         Suggested by Jim Meyering.
6
7 2007-07-23  Bruno Haible  <bruno@clisp.org>
8
9         * gnulib-tool (func_import): Create a .cvsignore file also when the
10         directory is not yet in CVS but the toplevel directory is. When
11         creating a .cvsignore file, add ".deps" and ".dirstamp" to it.
12         Reported by Karl Berry.
13
14 2007-07-22  Ben Pfaff  <blp@gnu.org>
15
16         * lib/popcount.h: Use faster, branchless algorithm for non-GCC
17         case.
18         Suggested by Eric Blake.
19
20 2007-07-22  Ben Pfaff  <blp@gnu.org>
21
22         New module: popcount.
23         * MODULES.html.sh: Add popcount.
24         * modules/popcount: New file.
25         * modules/popcount-tests: New file.
26         * tests/test-popcount.c: New file.
27         * lib/popcount.h: New file.
28         * m4/popcount.m4: New file.
29
30 2007-07-22  Paul Eggert  <eggert@cs.ucla.edu>
31
32         * build-aux/announce-gen: Update to GPLv3.
33
34         * build-aux/config.guess: Update from config.
35
36 2007-07-21  Bruno Haible  <bruno@clisp.org>
37
38         * lib/error.c (_) [ENABLE_NLS]: Define to gettext.
39         * lib/verror.c (_) [ENABLE_NLS]: Likewise.
40
41 2007-07-20  Jim Meyering  <jim@meyering.net>
42
43         * check-module: Diagnose a self-dependency.
44
45 2007-07-19  Bruno Haible  <bruno@clisp.org>
46
47         * gnulib-tool (func_import): Don't abort if pobase or po_domain is
48         empty.
49         Reported by Eric Blake.
50
51 2007-07-18  Bruno Haible  <bruno@clisp.org>
52
53         * gnulib-tool: New options --po-base, --po-domain.
54         (func_usage): Document them.
55         (pobase, po_domain): New variables.
56         (func_emit_lib_Makefile_am): Augment AM_CPPFLAGS, defining
57         DEFAULT_TEXT_DOMAIN.
58         (func_emit_po_Makevars, func_emit_po_POTFILES_in): New functions.
59         (func_import): Consider pobase and po_domain. Create a po/ directory.
60         (func_create_testdir): Set pobase and po_domain to empty.
61         * build-aux/po/Makefile.in.in: New file, from GNU gettext 0.16.1.
62         * build-aux/po/remove-potcdate.sin: New file, from GNU gettext 0.16.1.
63
64 2007-07-18  Bruno Haible  <bruno@clisp.org>
65
66         * gnulib-tool (func_get_automake_snippet): Synthesize also an
67         EXTRA_DIST augmentation for files in build-aux/.
68
69 2007-07-16  Bruno Haible  <bruno@clisp.org>
70
71         * modules/lseek (License): Use the synonymous term "LGPLv2+".
72         * modules/getdelim (License): Likewise.
73
74 2007-07-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
75
76         * modules/arpa_inet (License): Use the synonymous term LGPLv2+.
77         * modules/d-type (License): Likewise.
78         * modules/extensions (License): Likewise.
79         * modules/fnmatch (License): Likewise.
80         * modules/fseeko (License): Likewise.
81         * modules/getaddrinfo (License): Likewise.
82         * modules/getline (License): Likewise.
83         * modules/getlogin_r (License): Likewise.
84         * modules/getpass (License): Likewise.
85         * modules/gettimeofday (License): Likewise.
86         * modules/glob (License): Likewise.
87         * modules/inet_ntop (License): Likewise.
88         * modules/malloc (License): Likewise.
89         * modules/malloca (License): Likewise.
90         * modules/memmem (License): Likewise.
91         * modules/mempcpy (License): Likewise.
92         * modules/memset (License): Likewise.
93         * modules/minmax (License): Likewise.
94         * modules/mktime (License): Likewise.
95         * modules/netinet_in (License): Likewise.
96         * modules/pathmax (License): Likewise.
97         * modules/poll (License): Likewise.
98         * modules/regex (License): Likewise.
99         * modules/snprintf (License): Likewise.
100         * modules/stdbool (License): Likewise.
101         * modules/stdint (License): Likewise.
102         * modules/stdio (License): Likewise.
103         * modules/strcase (License): Likewise.
104         * modules/strcasestr (License): Likewise.
105         * modules/strdup (License): Likewise.
106         * modules/string (License): Likewise.
107         * modules/strndup (License): Likewise.
108         * modules/strnlen (License): Likewise.
109         * modules/strpbrk (License): Likewise.
110         * modules/strptime (License): Likewise.
111         * modules/strsep (License): Likewise.
112         * modules/sys_select (License): Likewise.
113         * modules/sys_socket (License): Likewise.
114         * modules/sys_stat (License): Likewise.
115         * modules/sys_time (License): Likewise.
116         * modules/time (License): Likewise.
117         * modules/time_r (License): Likewise.
118         * modules/timegm (License): Likewise.
119         * modules/unistd (License): Likewise.
120         * modules/vsnprintf (License): Likewise.
121         * modules/wctype (License): Likewise.
122
123 2007-07-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
124
125         * modules/argz (License): LGPLv2+.
126
127 2007-07-15  Karl Berry  <karl@gnu.org>
128
129         * doc/gnulib.texi: revise node structure per new fdl.texi.
130
131 2007-07-14  Bruno Haible  <bruno@clisp.org>
132
133         * lib/uniname/gen-uninames.lisp (main): Emit a "do not edit" line to
134         the output file.
135         * lib/uniname/uninames.h: Regenerated.
136
137 2007-07-14  Karl Berry  <karl@gnu.org>
138
139         * doc/*gpl*.texi, doc/fdl.texi: new versions, consistently
140         omitting sectioning and index commands.
141
142 2007-07-13  Bruno Haible  <bruno@clisp.org>
143
144         New gnulib-tool option --more-symlinks.
145         * gnulib-tool (func_usage): Document --more-symlinks.
146         (do_copyrights): New variable.
147         Recognize option --more-symlinks.
148         (func_import): Don't add a copyright notice transform to
149         sed_transform_lib_file if do_copyrights is empty.
150
151 2007-07-13  Bruno Haible  <bruno@clisp.org>
152
153         * lib/vasnprintf.c (decimal_point_char): Define also if
154         (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE)
155         && !NEED_PRINTF_DIRECTIVE_A.
156         Reported by Clemens Koller <clemens.koller@anagramm.de> via
157         Gary V. Vaughan <gary@gnu.org>.
158
159 2007-07-13  Paul Eggert  <eggert@cs.ucla.edu>
160
161         * lib/inttypes_.h: Undo previous change, since it was fixed
162         in a different way in the 2007-07-02 fix to m4/inttypes.m4.
163
164 2007-07-13  Bruno Haible  <bruno@clisp.org>
165
166         * lib/stdint_.h: Fix typo: _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H was
167         misspelled as _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H.
168
169 2007-07-13  Jim Meyering  <jim@meyering.net>
170
171         df: Don't fail for Tru64's "file-on-file mount".
172         * m4/fsusage.m4 (gl_FSUSAGE): Reject Tru64's buggy statvfs,
173         so we fall through and use statfs instead.  Details here:
174         <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/10878>
175         Reported by Albert Chin.
176
177 2007-07-13  Bruno Haible  <bruno@clisp.org>
178
179         * modules/alloca-opt (License): Use the synonymous term "LGPLv2+".
180         * modules/configmake (License): Likewise.
181         * modules/gettext (License): Likewise.
182         * modules/gettext-h (License): Likewise.
183         * modules/include_next (License): Likewise.
184         * modules/link-warning (License): Likewise.
185         * modules/localcharset (License): Likewise.
186         * modules/localename (License): Likewise.
187         * modules/lock (License): Likewise.
188         * modules/relocatable-lib-lgpl (License): Likewise.
189         * modules/size_max (License): Likewise.
190         * modules/vasnprintf (License): Likewise.
191         * modules/wchar (License): Likewise.
192         * modules/xsize (License): Likewise.
193
194 2007-07-13  Bruno Haible  <bruno@clisp.org>
195
196         * gnulib-tool (func_import): Treat LGPLv2 as synonymous to LGPL.
197         (func_create_testdir): Handle copying terms "GPLv2+" and "LGPLv2+".
198
199 2007-07-12  Bruno Haible  <bruno@clisp.org>
200
201         * doc/gnulib-intro.texi (Copyright): Clarify the license abbreviations
202         in the modules files.
203
204 2007-07-11  Karl Berry  <karl@gnu.org>
205
206         * MODULES.html.sh (func_module): use
207          sed -e '\|^'"${includefile}"'$|d'
208          instead of /.../d, to avoid errors on $includefile's containing /.
209
210 2007-07-10  Sergey Poznyakoff  <gray@gnu.org.ua>
211
212         * gnulib-tool (func_import): Avoid duplication of --avoid
213         statements
214         (func_dest_tmpfilename,func_create_testdir): Translate `-' in file
215         names to `_' in variable names.
216
217 2007-07-10  Eric Blake  <ebb9@byu.net>
218
219         * lib/version-etc.c (version_etc_va): Default to GPLv3+.
220         * NEWS: Document this change.
221
222 2007-07-08  Bruno Haible  <bruno@clisp.org>
223
224         Update to Unicode 5.0.
225         * lib/uniwidth/width.c (nonspacing_table_data): Add U+00AD,
226         U+0350..U+035F, U+05A2, U+05BA, U+05C5, U+05C7, U+0600..U+0603,
227         U+0610..U+0615, U+0656..U+065E, U+07EB..U+07F3, U+0A01, U+0AE2..U+0AE3,
228         U+0CBC. Remove U+0CBF, U+0CC6. Add U+0CE2..U+0CE3, U+135F,
229         U+17B4..U+17B5, U+17DD. Remove U+180E. Add U+1920..U+1922,
230         U+1927..U+192B, U+1932, U+1939..U+193B, U+1A17..U+1A18, U+1B00..U+1B03,
231         U+1B34, U+1B36..U+1B3A, U+1B3C, U+1B42, U+1B6B..U+1B73, U+1DC0..U+1DCA,
232         U+1DFE..U+1DFF, U+20EB..U+20EF, U+A802, U+A806, U+A80B, U+A825..U+A826,
233         U+10A01..U+10A03, U+10A05..U+10A06, U+10A0C..U+10A0F, U+10A38..U+10A3A,
234         U+10A3F, U+1D242..U+1D244.
235         (nonspacing_table_ind): Update.
236         (uc_width): Assign width 0 to U+E0100..U+E01EF. Assign width 1 to
237         U+4DC0..U+4DFF. Assign width 2 to U+2329..U+232A, U+FE10..U+FE1F.
238
239 2007-07-08  Bruno Haible  <bruno@clisp.org>
240
241         Update to Unicode 5.0.
242         * lib/uniname/gen-uninames.lisp (main): Add the range 0x12xxx to the
243         code transform. Extend the name index field of unicode_name_to_code and
244         unicode_code_to_name from 16 to 24 bits.
245         * lib/uniname/uniname.c (unicode_character_name,
246         unicode_name_character): Add the range 0x12xxx to the code transform.
247         * lib/uniname/uninames.h: Regenerated.
248         * tests/uniname/UnicodeDataNames.txt: Update to Unicode 5.0.
249
250 2007-07-07  Bruno Haible  <bruno@clisp.org>
251
252         * modules/wcwidth-tests: New file.
253         * tests/test-wcwidth.c: New file.
254
255         Work around MacOS X wcwidth() bug.
256         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Test against MacOS X 10.3 bug.
257         * lib/wcwidth.c: Include localcharset.h, streq.h, uniwidth.h.
258         (rpl_wcwidth): Special-case the UTF-8 locales. Fall back to the
259         original wcwidth in non-UTF-8 locales.
260         * modules/wcwidth (Depends-on): Add localcharset, streq,
261         uniwidth/width.
262         * doc/functions/wcwidth.texi: Update.
263
264 2007-07-07  Bruno Haible  <bruno@clisp.org>
265
266         * lib/wchar_.h: Include the GL_LINK_WARNING macro.
267         (wcwidth): New declaration.
268         * m4/wchar.m4 (gl_WCHAR_MODULE_INDICATOR, gl_WCHAR_H_DEFAULTS): New
269         macros.
270         (gl_WCHAR_H): Require gl_WCHAR_H_DEFAULTS. Don't set WCHAR_H to empty
271         here. Prepare for creating <wchar.h> unconditionally.
272         * modules/wchar (Depends-on): Add link-warning.
273         (Makefile.am): Substitute also GNULIB_WCWIDTH, HAVE_DECL_WCWIDTH,
274         REPLACE_WCWIDTH, and GL_LINK_WARNING.
275         * lib/wcwidth.h: Remove file.
276         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gl_WCHAR_H_DEFAULTS. Set
277         HAVE_DECL_WCWIDTH, REPLACE_WCWIDTH, WCHAR_H.
278         * modules/wcwidth (Files): Remove lib/wcwidth.h.
279         (configure.ac): Invoke gl_WCHAR_MODULE_INDICATOR.
280         (Include): Replace wcwidth.h with <wchar.h>.
281         * lib/wcwidth.c: Include <wchar.h> instead of wcwidth.h.
282         * lib/mbchar.h: Don't include wcwidth.h.
283         * lib/mbswidth.c: Likewise.
284         * NEWS: Mention the change.
285
286 2007-07-07  Bruno Haible  <bruno@clisp.org>
287
288         * lib/wcwidth.c: New file, extracted from lib/wcwidth.h.
289         * lib/wcwidth.h: Don't include wctype.h. Replace inline function
290         definition with an external declaration.
291         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Use wcwidth.c when wcwidth is not
292         defined as a function. Remove AC_C_INLINE requirement.
293         * modules/wcwidth (Files): Add lib/wcwidth.c.
294         (Makefile.am): Remove redundant statement.
295
296 2007-07-07  Bruno Haible  <bruno@clisp.org>
297
298         * MODULES.html.sh (Unicode string functions): Add the new modules.
299
300         * tests/uniwidth/test-u32-strwidth.c: New file.
301         * modules/uniwidth/u32-strwidth-tests: New file.
302
303         * lib/uniwidth/u32-strwidth.c: New file.
304         * modules/uniwidth/u32-strwidth: New file.
305
306         * tests/uniwidth/test-u16-strwidth.c: New file.
307         * modules/uniwidth/u16-strwidth-tests: New file.
308
309         * lib/uniwidth/u16-strwidth.c: New file.
310         * modules/uniwidth/u16-strwidth: New file.
311
312         * tests/uniwidth/test-u8-strwidth.c: New file.
313         * modules/uniwidth/u8-strwidth-tests: New file.
314
315         * lib/uniwidth/u8-strwidth.c: New file.
316         * modules/uniwidth/u8-strwidth: New file.
317
318         * tests/uniwidth/test-u32-width.c: New file.
319         * modules/uniwidth/u32-width-tests: New file.
320
321         * lib/uniwidth/u32-width.c: New file.
322         * modules/uniwidth/u32-width: New file.
323
324         * tests/uniwidth/test-u16-width.c: New file.
325         * modules/uniwidth/u16-width-tests: New file.
326
327         * lib/uniwidth/u16-width.c: New file.
328         * modules/uniwidth/u16-width: New file.
329
330         * tests/uniwidth/test-u8-width.c: New file.
331         * modules/uniwidth/u8-width-tests: New file.
332
333         * lib/uniwidth/u8-width.c: New file.
334         * modules/uniwidth/u8-width: New file.
335
336         * tests/uniwidth/test-uc_width.c: New file.
337         * modules/uniwidth/width-tests: New file.
338
339         * lib/uniwidth/width.c: New file, from GNU libiconv.
340         * lib/uniwidth/cjk.h: New file, from GNU libiconv.
341         * modules/uniwidth/width: New file.
342
343         * lib/uniwidth.h: New file, from GNU libiconv.
344         * modules/uniwidth/base: New file.
345
346 2007-07-07  Bruno Haible  <bruno@clisp.org>
347
348         * lib/uniname.h: New file, from GNU gettext.
349         * lib/uniname/gen-uninames.lisp: New file, from GNU gettext.
350         * lib/uniname/uninames.h: New file, from GNU gettext.
351         * lib/uniname/uniname.c: New file, from GNU gettext.
352         * tests/uniname/test-uninames.sh: New file.
353         * tests/uniname/test-uninames.c: New file, from GNU gettext.
354         * tests/uniname/UnicodeDataNames.txt: New file, from GNU gettext.
355         * modules/uniname/base: New file.
356         * modules/uniname/uniname: New file.
357         * modules/uniname/uniname-tests: New file.
358         * MODULES.html.sh (Unicode string functions): Add the new modules.
359
360 2007-07-06  Bruno Haible  <bruno@clisp.org>
361
362         * doc/Makefile (TEXI2HTML): Specify a --reference-limit.
363
364 2007-07-06  Bruno Haible  <bruno@clisp.org>
365
366         * lib/sys_time_.h: Use a recursion-safe inclusion guard rather than
367         a split double-inclusion guard. Needed for cygwin, where <sys/time.h>
368         includes <cygwin/sys_time.h> which includes <sys/select.h> which
369         include <sys/time.h>.
370         Reported by Eric Blake.
371
372 2007-07-06  Eric Blake  <ebb9@byu.net>
373
374         Fix testing canonicalize on cygwin.
375         * modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
376         Revert patch from 2007-06-19.
377         * tests/test-canonicalize-lgpl.c (main): Instead, skip test when
378         canonicalize module is also in use.
379         * tests/test-canonicalize.c: New file.
380         * tests/test-canonicalize.sh: Likewise.
381         * modules/canonicalize-tests: Likewise.
382
383 2007-07-06  Jim Meyering  <jim@meyering.net>
384
385         * lib/getugroups.c (getugroups): Detect getgrent failure.
386         Adjust comment to reflect reality: this function may return -1.
387
388 2007-07-05  Sergey Poznyakoff  <gray@gnu.org.ua>
389
390         * build-aux/bootstrap (TP_URL,get_translations): Update to use
391         the new TP address.
392         (usage): Fix typo
393         (gnulib_mk): New variable.
394
395 2007-07-05  Jim Meyering  <jim@meyering.net>
396
397         Don't let endgrent clobber errno, no matter how improbable.
398         * lib/getugroups.c (getugroups): Save and restore errno around
399         endgrent call.
400
401         Close the group DB even when failing with 2^31 or more members.
402         * lib/getugroups.c (getugroups): Don't return without calling endgrent.
403
404 2007-07-04  Jim Meyering  <jim@meyering.net>
405
406         * lib/getugroups.h: New file.
407         * lib/getugroups.c: Include "getugroups.h".
408         Remove uses of "register" keyword.
409         Move local variable, "cp", down into scope where used.
410         Give "username" parameter the "const" attribute.
411         * modules/getugroups (Files): Add lib/getugroups.h
412
413 2007-07-04  Karl Berry  <karl@gnu.org>
414
415         * MODULES.html.sh (func_all_modules): Complete rename of
416         gpl/lgpl to gpl-2.0 and lgpl-2.1, and add gpl-3.0.
417
418 2007-07-02  Bruno Haible  <bruno@clisp.org>
419
420         * m4/inttypes.m4 (gl_INTTYPES_H): Define __STDC_LIMIT_MACROS in C++
421         mode, when inttypes.h comes from gnulib.
422         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
423
424 2007-07-02  Simon Josefsson  <simon@josefsson.org>
425
426         * NEWS: Mention lgpl module name change.
427
428         * modules/lgpl-2.1: Renamed from lgpl.
429
430         * NEWS: Mention gpl module name change.
431
432         * modules/gpl-3.0: New file, based on gpl-2.0.
433
434         * modules/gpl-2.0: Renamed from gpl.
435
436         * modules/gpl: Fix filename, doc/gpl.texi is now found at
437         doc/gpl-2.0.texi.
438
439 2007-07-02  Paul Eggert  <eggert@cs.ucla.edu>
440
441         * lib/inttypes_.h [defined __cplusplus&&!defined __STDC_LIMIT_MACROS]:
442         #define __STDC_LIMIT_MACROS temporarily while including
443         <stdint.h>, so that __STDC_LIMIT_MACROS is defined.
444         Problem reported by Joel E. Denny in
445         <http://lists.gnu.org/archive/html/bug-gnulib/2007-07/msg00008.html>.
446
447 2007-07-01  Bruno Haible  <bruno@clisp.org>
448
449         * lib/unistdio.h: New file.
450         * lib/unistdio/u-asnprintf.h: New file.
451         * lib/unistdio/u-asprintf.h: New file.
452         * lib/unistdio/u-printf-args.c: New file.
453         * lib/unistdio/u-printf-args.h: New file.
454         * lib/unistdio/u-printf-parse.h: New file.
455         * lib/unistdio/u-snprintf.h: New file.
456         * lib/unistdio/u-sprintf.h: New file.
457         * lib/unistdio/u-vasprintf.h: New file.
458         * lib/unistdio/u-vsnprintf.h: New file.
459         * lib/unistdio/u-vsprintf.h: New file.
460         * lib/unistdio/ulc-asnprintf.c: New file.
461         * lib/unistdio/ulc-asprintf.c: New file.
462         * lib/unistdio/ulc-fprintf.c: New file, based on lib/fprintf.c.
463         * lib/unistdio/ulc-printf-parse.c: New file.
464         * lib/unistdio/ulc-snprintf.c: New file.
465         * lib/unistdio/ulc-sprintf.c: New file.
466         * lib/unistdio/ulc-vasnprintf.c: New file.
467         * lib/unistdio/ulc-vasprintf.c: New file.
468         * lib/unistdio/ulc-vfprintf.c: New file, based on lib/vfprintf.c.
469         * lib/unistdio/ulc-vsnprintf.c: New file.
470         * lib/unistdio/ulc-vsprintf.c: New file.
471         * lib/unistdio/u8-asnprintf.c: New file.
472         * lib/unistdio/u8-asprintf.c: New file.
473         * lib/unistdio/u8-printf-parse.c: New file.
474         * lib/unistdio/u8-snprintf.c: New file.
475         * lib/unistdio/u8-sprintf.c: New file.
476         * lib/unistdio/u8-vasnprintf.c: New file.
477         * lib/unistdio/u8-vasprintf.c: New file.
478         * lib/unistdio/u8-vsnprintf.c: New file.
479         * lib/unistdio/u8-vsprintf.c: New file.
480         * lib/unistdio/u8-u8-asnprintf.c: New file.
481         * lib/unistdio/u8-u8-asprintf.c: New file.
482         * lib/unistdio/u8-u8-snprintf.c: New file.
483         * lib/unistdio/u8-u8-sprintf.c: New file.
484         * lib/unistdio/u8-u8-vasnprintf.c: New file.
485         * lib/unistdio/u8-u8-vasprintf.c: New file.
486         * lib/unistdio/u8-u8-vsnprintf.c: New file.
487         * lib/unistdio/u8-u8-vsprintf.c: New file.
488         * lib/unistdio/u16-asnprintf.c: New file.
489         * lib/unistdio/u16-asprintf.c: New file.
490         * lib/unistdio/u16-printf-parse.c: New file.
491         * lib/unistdio/u16-snprintf.c: New file.
492         * lib/unistdio/u16-sprintf.c: New file.
493         * lib/unistdio/u16-vasnprintf.c: New file.
494         * lib/unistdio/u16-vasprintf.c: New file.
495         * lib/unistdio/u16-vsnprintf.c: New file.
496         * lib/unistdio/u16-vsprintf.c: New file.
497         * lib/unistdio/u16-u16-asnprintf.c: New file.
498         * lib/unistdio/u16-u16-asprintf.c: New file.
499         * lib/unistdio/u16-u16-snprintf.c: New file.
500         * lib/unistdio/u16-u16-sprintf.c: New file.
501         * lib/unistdio/u16-u16-vasnprintf.c: New file.
502         * lib/unistdio/u16-u16-vasprintf.c: New file.
503         * lib/unistdio/u16-u16-vsnprintf.c: New file.
504         * lib/unistdio/u16-u16-vsprintf.c: New file.
505         * lib/unistdio/u32-asnprintf.c: New file.
506         * lib/unistdio/u32-asprintf.c: New file.
507         * lib/unistdio/u32-printf-parse.c: New file.
508         * lib/unistdio/u32-snprintf.c: New file.
509         * lib/unistdio/u32-sprintf.c: New file.
510         * lib/unistdio/u32-vasnprintf.c: New file.
511         * lib/unistdio/u32-vasprintf.c: New file.
512         * lib/unistdio/u32-vsnprintf.c: New file.
513         * lib/unistdio/u32-vsprintf.c: New file.
514         * lib/unistdio/u32-u32-asnprintf.c: New file.
515         * lib/unistdio/u32-u32-asprintf.c: New file.
516         * lib/unistdio/u32-u32-snprintf.c: New file.
517         * lib/unistdio/u32-u32-sprintf.c: New file.
518         * lib/unistdio/u32-u32-vasnprintf.c: New file.
519         * lib/unistdio/u32-u32-vasprintf.c: New file.
520         * lib/unistdio/u32-u32-vsnprintf.c: New file.
521         * lib/unistdio/u32-u32-vsprintf.c: New file.
522         * tests/unistdio/test-ulc-asnprintf1.c: New file.
523         * tests/unistdio/test-ulc-asnprintf1.h: New file.
524         * tests/unistdio/test-ulc-printf1.h: New file.
525         * tests/unistdio/test-ulc-vasnprintf1.c: New file.
526         * tests/unistdio/test-ulc-vasnprintf2.c: New file.
527         * tests/unistdio/test-ulc-vasnprintf2.sh: New file.
528         * tests/unistdio/test-ulc-vasnprintf3.c: New file.
529         * tests/unistdio/test-ulc-vasnprintf3.sh: New file.
530         * tests/unistdio/test-ulc-vasprintf1.c: New file.
531         * tests/unistdio/test-ulc-vsnprintf1.c: New file.
532         * tests/unistdio/test-ulc-vsprintf1.c: New file.
533         * tests/unistdio/test-u8-asnprintf1.c: New file.
534         * tests/unistdio/test-u8-asnprintf1.h: New file.
535         * tests/unistdio/test-u8-printf1.h: New file.
536         * tests/unistdio/test-u8-vasnprintf1.c: New file.
537         * tests/unistdio/test-u8-vasnprintf2.c: New file.
538         * tests/unistdio/test-u8-vasnprintf2.sh: New file.
539         * tests/unistdio/test-u8-vasnprintf3.c: New file.
540         * tests/unistdio/test-u8-vasnprintf3.sh: New file.
541         * tests/unistdio/test-u8-vasprintf1.c: New file.
542         * tests/unistdio/test-u8-vsnprintf1.c: New file.
543         * tests/unistdio/test-u8-vsprintf1.c: New file.
544         * tests/unistdio/test-u16-asnprintf1.c: New file.
545         * tests/unistdio/test-u16-asnprintf1.h: New file.
546         * tests/unistdio/test-u16-printf1.h: New file.
547         * tests/unistdio/test-u16-vasnprintf1.c: New file.
548         * tests/unistdio/test-u16-vasnprintf2.c: New file.
549         * tests/unistdio/test-u16-vasnprintf2.sh: New file.
550         * tests/unistdio/test-u16-vasnprintf3.c: New file.
551         * tests/unistdio/test-u16-vasnprintf3.sh: New file.
552         * tests/unistdio/test-u16-vasprintf1.c: New file.
553         * tests/unistdio/test-u16-vsnprintf1.c: New file.
554         * tests/unistdio/test-u16-vsprintf1.c: New file.
555         * tests/unistdio/test-u32-asnprintf1.c: New file.
556         * tests/unistdio/test-u32-asnprintf1.h: New file.
557         * tests/unistdio/test-u32-printf1.h: New file.
558         * tests/unistdio/test-u32-vasnprintf1.c: New file.
559         * tests/unistdio/test-u32-vasnprintf2.c: New file.
560         * tests/unistdio/test-u32-vasnprintf2.sh: New file.
561         * tests/unistdio/test-u32-vasnprintf3.c: New file.
562         * tests/unistdio/test-u32-vasnprintf3.sh: New file.
563         * tests/unistdio/test-u32-vasprintf1.c: New file.
564         * tests/unistdio/test-u32-vsnprintf1.c: New file.
565         * tests/unistdio/test-u32-vsprintf1.c: New file.
566         * modules/unistdio/base: New file.
567         * modules/unistdio/u-printf-args: New file.
568         * modules/unistdio/ulc-asnprintf: New file.
569         * modules/unistdio/ulc-asprintf: New file.
570         * modules/unistdio/ulc-fprintf: New file.
571         * modules/unistdio/ulc-printf-parse: New file.
572         * modules/unistdio/ulc-snprintf: New file.
573         * modules/unistdio/ulc-sprintf: New file.
574         * modules/unistdio/ulc-vasnprintf: New file.
575         * modules/unistdio/ulc-vasprintf: New file.
576         * modules/unistdio/ulc-vfprintf: New file.
577         * modules/unistdio/ulc-vsnprintf: New file.
578         * modules/unistdio/ulc-vsprintf: New file.
579         * modules/unistdio/u8-asnprintf: New file.
580         * modules/unistdio/u8-asprintf: New file.
581         * modules/unistdio/u8-printf-parse: New file.
582         * modules/unistdio/u8-snprintf: New file.
583         * modules/unistdio/u8-sprintf: New file.
584         * modules/unistdio/u8-vasnprintf: New file.
585         * modules/unistdio/u8-vasprintf: New file.
586         * modules/unistdio/u8-vsnprintf: New file.
587         * modules/unistdio/u8-vsprintf: New file.
588         * modules/unistdio/u8-u8-asnprintf: New file.
589         * modules/unistdio/u8-u8-asprintf: New file.
590         * modules/unistdio/u8-u8-snprintf: New file.
591         * modules/unistdio/u8-u8-sprintf: New file.
592         * modules/unistdio/u8-u8-vasnprintf: New file.
593         * modules/unistdio/u8-u8-vasprintf: New file.
594         * modules/unistdio/u8-u8-vsnprintf: New file.
595         * modules/unistdio/u8-u8-vsprintf: New file.
596         * modules/unistdio/u16-asnprintf: New file.
597         * modules/unistdio/u16-asprintf: New file.
598         * modules/unistdio/u16-printf-parse: New file.
599         * modules/unistdio/u16-snprintf: New file.
600         * modules/unistdio/u16-sprintf: New file.
601         * modules/unistdio/u16-vasnprintf: New file.
602         * modules/unistdio/u16-vasprintf: New file.
603         * modules/unistdio/u16-vsnprintf: New file.
604         * modules/unistdio/u16-vsprintf: New file.
605         * modules/unistdio/u16-u16-asnprintf: New file.
606         * modules/unistdio/u16-u16-asprintf: New file.
607         * modules/unistdio/u16-u16-snprintf: New file.
608         * modules/unistdio/u16-u16-sprintf: New file.
609         * modules/unistdio/u16-u16-vasnprintf: New file.
610         * modules/unistdio/u16-u16-vasprintf: New file.
611         * modules/unistdio/u16-u16-vsnprintf: New file.
612         * modules/unistdio/u16-u16-vsprintf: New file.
613         * modules/unistdio/u32-asnprintf: New file.
614         * modules/unistdio/u32-asprintf: New file.
615         * modules/unistdio/u32-printf-parse: New file.
616         * modules/unistdio/u32-snprintf: New file.
617         * modules/unistdio/u32-sprintf: New file.
618         * modules/unistdio/u32-vasnprintf: New file.
619         * modules/unistdio/u32-vasprintf: New file.
620         * modules/unistdio/u32-vsnprintf: New file.
621         * modules/unistdio/u32-vsprintf: New file.
622         * modules/unistdio/u32-u32-asnprintf: New file.
623         * modules/unistdio/u32-u32-asprintf: New file.
624         * modules/unistdio/u32-u32-snprintf: New file.
625         * modules/unistdio/u32-u32-sprintf: New file.
626         * modules/unistdio/u32-u32-vasnprintf: New file.
627         * modules/unistdio/u32-u32-vasprintf: New file.
628         * modules/unistdio/u32-u32-vsnprintf: New file.
629         * modules/unistdio/u32-u32-vsprintf: New file.
630         * modules/unistdio/ulc-asnprintf-tests: New file.
631         * modules/unistdio/ulc-vasnprintf-tests: New file.
632         * modules/unistdio/ulc-vasprintf-tests: New file.
633         * modules/unistdio/ulc-vsnprintf-tests: New file.
634         * modules/unistdio/ulc-vsprintf-tests: New file.
635         * modules/unistdio/u8-asnprintf-tests: New file.
636         * modules/unistdio/u8-vasnprintf-tests: New file.
637         * modules/unistdio/u8-vasprintf-tests: New file.
638         * modules/unistdio/u8-vsnprintf-tests: New file.
639         * modules/unistdio/u8-vsprintf-tests: New file.
640         * modules/unistdio/u16-asnprintf-tests: New file.
641         * modules/unistdio/u16-vasnprintf-tests: New file.
642         * modules/unistdio/u16-vasprintf-tests: New file.
643         * modules/unistdio/u16-vsnprintf-tests: New file.
644         * modules/unistdio/u16-vsprintf-tests: New file.
645         * modules/unistdio/u32-asnprintf-tests: New file.
646         * modules/unistdio/u32-vasnprintf-tests: New file.
647         * modules/unistdio/u32-vasprintf-tests: New file.
648         * modules/unistdio/u32-vsnprintf-tests: New file.
649         * modules/unistdio/u32-vsprintf-tests: New file.
650         * MODULES.html.sh (Unicode string functions): Add the new modules.
651
652 2007-07-01  Bruno Haible  <bruno@clisp.org>
653
654         * lib/sprintf.c (sprintf): Limit the available length estimation,
655         to avoid address wraparound.
656         * lib/vsprintf.c (vsprintf): Likewise.
657         * modules/sprintf-posix (Dependencies): Add stdint.
658         * modules/vsprintf-posix (Dependencies): Likewise.
659
660 2007-07-01  Bruno Haible  <bruno@clisp.org>
661
662         * gnulib-tool (self_abspathname): Determine PATH_SEPARATOR and handle
663         Windows PATH as well. Conservative double-quoting. Comments.
664
665 2007-07-01  Bruno Haible  <bruno@clisp.org>
666             Eric Blake  <ebb9@byu.net>
667             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
668
669         * gnulib-tool (self_abspathname): Fix algorithm to cope with
670         empty components in $PATH, denoting '.'.
671
672 2007-07-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
673
674         * gnulib-tool: Fix indentation.
675         (func_create_megatestdir): Likewise.
676         Report by Bruno Haible.
677
678 2007-06-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
679
680         Sync from Automake.
681         * build-aux/gnupload: Fix shell portability issues with for loops.
682         Report by Karl Berry.
683
684 2007-06-29  Simon Josefsson  <simon@josefsson.org>
685
686         * build-aux/maint.mk (POURL): Use translationproject.org.
687
688 2007-06-27  Simon Josefsson  <simon@josefsson.org>
689             Bruno Haible  <bruno@clisp.org>
690
691         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Require gl_HEADER_SYS_SOCKET
692         before using HAVE_WS2TCPIP_H. Check for gai_strerror through an
693         explicit link test, rather than AC_REPLACE_FUNCS - for mingw.
694         (gl_PREREQ_GETADDRINFO): Require gl_HEADER_SYS_SOCKET before using
695         HAVE_SYS_SOCKET_H and HAVE_WS2TCPIP_H.
696
697 2007-06-27  Bruno Haible  <bruno@clisp.org>
698
699         * build-aux/config.rpath: Upgrade to libtool-1.5.24.
700         * build-aux/config.libpath: Upgrade to libtool-1.5.24.
701
702 2007-06-26  Karl Berry  <karl@gnu.org>
703
704         * MODULES.html.sh: remove xreadlink-with-size.
705
706 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
707
708         * lib/time_.h: Port to Solaris 8 with Sun Studio 11, using a
709         method that I hope also handles the double-include problem noted
710         by Bruno Haible in
711         <http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00186.html>.
712
713 2007-06-23  Bruno Haible  <bruno@clisp.org>
714
715         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
716         Don't let the 'mostlyclean' target fail if the last subdirectory could
717         not be removed.
718         Reported by Karl Berry.
719
720 2007-06-23  Bruno Haible  <bruno@clisp.org>
721
722         * gnulib-tool (echo): Add a speedier workaround for ksh.
723         * tests/test-echo.sh: Likewise.
724
725 2007-06-23  Bruno Haible  <bruno@clisp.org>
726
727         * gnulib-tool (echo): Add workarounds also for bash versions < 2.04.
728         * tests/test-echo.sh: Likewise.
729
730 2007-06-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
731
732         * gnulib-tool (IFS): Initialize early, so we don't set it to
733         empty later.
734         (self_abspathname): Rewrite algorithm to set it, reindent.
735         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am)
736         (func_create_megatestdir): Merge some sed scripts.
737
738 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
739
740         * m4/include_next.m4 (gl_CHECK_NEXT_HEADERS): Check some typos
741         exposed by Sun Studio 11 cc on Solaris 8.
742
743 2007-06-22  Bruno Haible  <bruno@clisp.org>
744
745         * gnulib-tool (echo): Ensure the echo primitive does not interpret
746         backslashes.
747         * tests/test-echo.sh: New file.
748
749 2007-06-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
750
751         * gnulib-tool (func_add_or_update, func_create_testdir): Do not
752         simplify `sed_replace_build_aux' scripts, they are portable but
753         echoing them with `echo' is not.
754         Report and analysis by Fernando Ferreira <fernando.prog@netcabo.pt>.
755
756 2007-06-21  Karl Berry  <karl@gnu.org>
757
758         * config/srclist.txt: guess we can't handle the licenses via
759         srclist at the moment.
760
761 2007-06-21  Paul Eggert  <eggert@cs.ucla.edu>
762
763         * MODULES.html.sh: Add include_next.
764         * modules/include_next: New file.
765
766 2007-06-20  Paul Eggert  <eggert@cs.ucla.edu>
767
768         * m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
769         INCLUDE_NEXT.
770         (gl_CHECK_NEXT_HEADERS): New macro.
771         * m4/fcntl_h.m4 (gl_FCNTL_H): use gl_CHECK_NEXT_HEADERS instead of
772         the obsolescent gl_ABSOLUTE_HEADER.
773         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise.
774         * m4/float_h.m4 (gl_FLOAT_H): Likewise.
775         * m4/iconv_h.m4 (gl_ICONV_H): Likewise.
776         * m4/inttypes.m4 (gl_INTTYPES_H): Likewise.
777         * m4/locale_h.m4 (gl_LOCALE_H): Likewise.
778         * m4/math_h.m4 (gl_MATH_H): Likewise.
779         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Likewise.
780         * m4/search_h.m4 (gl_SEARCH_H): Likewise.
781         * m4/signal_h.m4 (gl_SIGNAL_H): Likewise.
782         * m4/stdint.m4 (gl_STDINT_H): Likewise.
783         * m4/stdio_h.m4 (gl_STDIO_H): Likewise.
784         * m4/stdlib_h.m4 (gl_STDLIB_H): Likewise.
785         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Likewise.
786         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
787         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise.
788         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise.
789         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Likewise.
790         * m4/sysexits.m4 (gl_SYSEXITS): Likewise.
791         * m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Likewise.
792         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
793         * m4/wchar.m4 (gl_WCHAR_H): Likewise.
794         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
795         * m4/inttypes.m4 (gl_INTTYPES_H): Define
796         _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H to avoid the problem of unclean
797         builds, since ABSOLUTE_INTTYPES_H is no longer being defined.
798         * m4/stdint.m4 (gl_STDINT_H): Likewise, for
799         _GL_JUST_INCLUDE_SYSTEM_STDINT_H.
800         * lib/fcntl_.h: Use @INCLUDE_NEXT@ @NEXT_foo_H@
801         rather than @HAVE_INCLUDE_NEXT@ and @ABSOLUTE_foo_H@.
802         * lib/float_.h: Likewise.
803         * lib/inttypes_.h: Likewise.
804         * lib/math_.h: Likewise.
805         * lib/search_.h: Likewise.
806         * lib/signal_.h: Likewise.
807         * lib/stdint_.h: Likewise.
808         * lib/stdio_.h: Likewise.
809         * lib/stdlib_.h: Likewise.
810         * lib/string_.h: Likewise.
811         * lib/sys_stat_.h: Likewise.
812         * lib/sys_time_.h: Likewise.
813         * lib/time_.h: Likewise.
814         * lib/unistd_.h: Likewise.
815         * lib/wchar_.h: Likewise.
816         * lib/wctype_.h: Likewise.
817         * lib/dirent_.h: Likewise.
818         * lib/iconv_.h: Likewise.
819         * lib/locale_.h: Likewise.
820         * lib/netinet_in_.h: Likewise.
821         * lib/sys_select_.h: Likewise.
822         * lib/sys_socket_.h: Likewise.
823         * lib/sysexits_.h: Likewise.
824         * modules/fcntl (Depends-on): Depend on include_next, not
825         absolute_header.
826         (Makefile): Substitute INCLUDE_NEXT and NEXT_foo_H, not
827         HAVE_INCLUDE_NEXT and ABSOLUTE_foo_H.
828         * modules/fchdir: Likewise.
829         * modules/float: Likewise.
830         * modules/iconv_open: Likewise.
831         * modules/inttypes: Likewise.
832         * modules/locale: Likewise.
833         * modules/math: Likewise.
834         * modules/netinet_in: Likewise.
835         * modules/search: Likewise.
836         * modules/signal: Likewise.
837         * modules/stdint: Likewise.
838         * modules/stdio: Likewise.
839         * modules/stdlib: Likewise.
840         * modules/string: Likewise.
841         * modules/sys_select: Likewise.
842         * modules/sys_socket: Likewise.
843         * modules/sys_stat: Likewise.
844         * modules/sys_time: Likewise.
845         * modules/sysexits: Likewise.
846         * modules/time: Likewise.
847         * modules/unistd: Likewise.
848         * modules/wchar: Likewise.
849         * modules/wctype: Likewise.
850         * modules/sys_stat: Change maintainer to "all".
851         * modules/unistd: Likewise.
852
853 2007-06-20  Karl Berry  <karl@gnu.org>
854
855         * config/srclist.txt: track www changes in license files.
856
857 2007-06-20  Sergey Poznyakoff  <gray@gnu.org.ua>
858
859         * build-aux/bootstrap: Remove stray dot.
860         Make sure build_aux settings are honored when linking
861         gnulib_extra_files.
862
863 2007-06-19  Eric Blake  <ebb9@byu.net>
864
865         * modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
866         Allow compilation on cygwin.
867
868 2007-06-19  Jim Meyering  <jim@meyering.net>
869
870         xreadlink-with-size: Remove module.  No longer used.
871         Ex-callers now use xreadlink or mreadlink-with-size.
872         * modules/xreadlink-with-size: Remove module.
873         * lib/xreadlink-with-size.c: Remove file.
874         * lib/xreadlink.h (xreadlink_with_size): Remove prototype.
875         (xreadlink): Remove inaccurate comment.  The one in xreadlink.c,
876         just before the function definition *is* accurate.
877
878         Eliminate one way canonicalize_filename_mode could exit.
879         * lib/canonicalize.c (canonicalize_filename_mode):
880         Use mreadlink_with_size, not xreadlink_with_size.
881
882 2007-06-18  Paul Eggert  <eggert@cs.ucla.edu>
883
884         Detect porting problems to FreeBSD/arm, which has time_t wider than
885         long int.  Original problem reported for GNU diff by Xin Li in
886         <http://lists.gnu.org/archive/html/bug-gnu-utils/2007-06/msg00091.html>.
887         * modules/getdate (Depends-on): Add intprops, verify.
888         * lib/getdate.y: Include intprops.h, verify.h.  Verify that time_t
889         is an integer type no wider than long int.
890
891 2007-06-18  Jim Meyering  <jim@meyering.net>
892
893         New module: mreadlink-with-size.
894         * MODULES.html.sh: Add mreadlink-with-size.
895         * modules/mreadlink-with-size: New module
896         * modules/canonicalize (Depends-on): Depend on mreadlink-with-size,
897         not xreadlink-with-size.
898         * lib/mreadlink-with-size.c, lib/mreadlink.h: New files.
899
900 2007-06-16  Bruno Haible  <bruno@clisp.org>
901
902         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Catch the MacOS X 10.4 bug.
903         * doc/functions/frexpl.texi: Document the MacOS X 10.4 bug.
904         Reported by Gary V. Vaughan <gary@gnu.org>.
905
906 2007-06-15  Paul Eggert  <eggert@cs.ucla.edu>
907
908         Revamp lchown so that it lives in unistd.h where it belongs.
909         * lib/lchown.h: Remove.
910         * lib/dirchownmod.c: Don't include lib/lchown.h.
911         * lib/fchownat.c: Likewise.
912         * lib/openat.c: Likewise.
913         * lib/lchown.c (REPLACE_CHOWN): Define to 0 if the system chown
914         does not follow symlinks.
915         (EOPNOTSUPP): Define if not defined.
916         * lib/unistd_.h (chown): Do not replace if REPLADE_CHOWN
917         is defined to 0.
918         (lchown): New decl.
919         * m4/lchown.m4 (gl_FUNC_LCHOWN): Require gl_UNISTD_H_DEFAULTS.
920         Do not check for lchown decl.
921         Set REPLACE_LCHOWN.
922         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Set GNULIB_LCHOWN,
923         REPLACE_LCHOWN.
924         * modules/chown: Make it clear it follows symlinks.
925         * modules/lchown: Make it clear it doesn't follow symlinks.
926         (Files): Remove lib/lchown.h
927         (Depends-on): Add unistd.
928         (configure.ac): Add gl_UNISTD_MODULE_INDICATOR([lchown]).
929         (Include): Include <unistd.h>, not "lchown.h".
930         * modules/unistd (unistd.h): Substitude GNULIB_LCHOWN and
931         REPLACE_LCHOWN.
932
933 2007-06-15  Jim Meyering  <jim@meyering.net>
934
935         Change license (GPL to LGPL) of fsusage and dependents.
936         * modules/fsusage (License): Change to LGPL.
937         * modules/full-read (License): Likewise.
938         * modules/full-write (License): Likewise.
939         * modules/safe-read (License): Likewise.
940         * modules/safe-write (License): Likewise.
941
942 2007-06-14  Ben Pfaff  <blp@gnu.org>
943
944         Missing part of allocsa -> malloca transition.
945         * modules/relocatable-prog-wrapper: gl_ALLOCSA should be
946         gl_MALLOCA.
947
948 2007-06-12  Bruno Haible  <bruno@clisp.org>
949
950         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Guess no when cross-compiling
951         to ia64, x86_64, i386.
952         Reported by Eric Blake.
953
954 2007-06-12  Bruno Haible  <bruno@clisp.org>
955
956         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Guess no also when
957         cross-compiling to x86_64.
958
959 2007-06-12  Paul Eggert  <eggert@cs.ucla.edu>
960
961         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Fix POSIX sed portability
962         glitch reported by Ralf Wildenhues in
963         <http://lists.gnu.org/archive/html/bug-gnulib/2007-06/msg00114.html>.
964
965         * m4/regex.m4 (gl_REGEX): Catch a bug with [[:alnum:]_-] reported by
966         Vin Shelton.
967
968 2007-06-11  Bruno Haible  <bruno@clisp.org>
969
970         * lib/printf-args.c (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Fix NULL
971         replacement string.
972         Reported by Eric Blake.
973
974 2007-06-10  Bruno Haible  <bruno@clisp.org>
975
976         Prepare vasnprintf code for use with Unicode strings.
977         * lib/printf-args.h (PRINTF_FETCHARGS): New macro.
978         (arg_type) [ENABLE_UNISTDIO]: Define TYPE_U8_STRING, TYPE_U16_STRING,
979         TYPE_U32_STRING.
980         (argument) [ENABLE_UNISTDIO]: Add a_u8_string, a_u16_string,
981         a_u32_string variants.
982         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
983         * lib/printf-args.c: Don't include config.h and the specification
984         header if PRINTF_FETCHARGS is already defined.
985         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
986         (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Add code for TYPE_U8_STRING,
987         TYPE_U16_STRING, TYPE_U32_STRING.
988         * lib/printf-parse.h [ENABLE_UNISTDIO] (u8_directive, u8_directives,
989         u16_directive, u16_directives, u32_directive, u32_directives): New
990         types.
991         (ulc_printf_parse, u8_printf_parse, u16_printf_parse, u32_printf_parse):
992         New declarations.
993         * lib/printf-parse.c: Don't include config.h and the specification
994         header if PRINTF_PARSE is already defined. Eliminate the set of
995         parameters for WIDE_CHAR_VERSION; the user of this file must provide
996         them now. Include c-ctype.h.
997         (PRINTF_PARSE) [ENABLE_UNISTDIO]: Add code implementing the 'U'
998         directive and CHAR_T_ONLY_ASCII.
999         * lib/vasnprintf.c: Don't include config.h and the specification header
1000         if VASNPRINTF is already defined.
1001         (DCHAR_IS_TCHAR, DCHAR_CPY): New macros.
1002         (VASNPRINTF): Use PRINTF_FETCHARGS instead of printf_fetchargs. Use
1003         DCHAR_CPY. Handle the case that DCHAR_T and FCHAR_T are not the same
1004         type. Handle the case that TCHAR_T and FCHAR_T are not of the same
1005         size. Handle the case that DCHAR_T and TCHAR_T are not the same type,
1006         add a conversion from TCHAR_T[] to DCHAR_T[], and rework the padding
1007         code accordingly.
1008         (VASNPRINTF) [ENABLE_UNISTDIO]: Implement the 'U' directive. Enable
1009         pad_ourselves also in this case, with the 'c' and 's' directives, and
1010         with a different notion of "width".
1011         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): New macros.
1012
1013 2007-06-10  Bruno Haible  <bruno@clisp.org>
1014
1015         * modules/unistr/u32-mbsnlen: New file.
1016         * lib/unistr/u32-mbsnlen.c: New file.
1017
1018         * modules/unistr/u16-mbsnlen: New file.
1019         * lib/unistr/u16-mbsnlen.c: New file.
1020
1021         * modules/unistr/u8-mbsnlen: New file.
1022         * lib/unistr/u8-mbsnlen.c: New file.
1023
1024         * lib/unistr.h (u8_mbsnlen, u16_mbsnlen, u32_mbsnlen): New
1025         declarations.
1026
1027 2007-06-10  Bruno Haible  <bruno@clisp.org>
1028
1029         * lib/string_.h (mbsnlen): New declaration.
1030         * lib/mbsnlen.c: New file.
1031         * m4/mbsnlen.m4: New file.
1032         * modules/mbsnlen: New file.
1033         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Set GNULIB_MBSNLEN.
1034         * modules/string (string.h): Substitute GNULIB_MBSNLEN.
1035         * MODULES.html.sh (Internationalization functions): Add mbsnlen.
1036
1037 2007-06-10  Bruno Haible  <bruno@clisp.org>
1038
1039         * lib/mbslen.c: Include <stdlib.h>, needed for MB_CUR_MAX.
1040
1041 2007-06-10  Bruno Haible  <bruno@clisp.org>
1042
1043         * lib/mbiter.h: Include <stddef.h>, needed for ptrdiff_t.
1044         * lib/mbuiter.h: Likewise.
1045
1046 2007-06-10  Bruno Haible  <bruno@clisp.org>
1047
1048         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Check for _snprintf
1049         declaration.
1050
1051 2007-06-10  Karl Berry  <karl@gnu.org>
1052
1053         * config/srclist.txt: remove gettext entries, Bruno prefers
1054         to update individually.
1055
1056 2007-06-10  Bruno Haible  <bruno@clisp.org>
1057
1058         * lib/vasnprintf.c (VASNPRINTF) [!USE_SNPRINTF]: Remove variable
1059         'maxlen'. Ensure only length + width bytes are allocated, not
1060         length + 1 + width.
1061
1062 2007-06-09  Bruno Haible  <bruno@clisp.org>
1063
1064         * lib/vasnprintf.c (FCHAR_T, DCHAR_T, TCHAR_T): New macros.
1065         (CHAR_T): Remove macro.
1066         (VASNPRINTF): Update.
1067
1068 2007-06-09  Bruno Haible  <bruno@clisp.org>
1069
1070         * MODULES.html.sh (Unicode string functions): Add the new modules.
1071
1072         * modules/uniconv/u32-conv-to-enc: New file.
1073         * lib/uniconv/u32-conv-to-enc.c: New file.
1074         * modules/uniconv/u32-conv-to-enc-tests: New file.
1075         * tests/uniconv/test-u32-conv-to-enc.c: New file.
1076
1077         * modules/uniconv/u16-conv-to-enc: New file.
1078         * lib/uniconv/u16-conv-to-enc.c: New file.
1079         * lib/uniconv/u-conv-to-enc.h: New file.
1080         * modules/uniconv/u16-conv-to-enc-tests: New file.
1081         * tests/uniconv/test-u16-conv-to-enc.c: New file.
1082
1083         * modules/uniconv/u8-conv-to-enc: New file.
1084         * lib/uniconv/u8-conv-to-enc.c: New file.
1085         * modules/uniconv/u8-conv-to-enc-tests: New file.
1086         * tests/uniconv/test-u8-conv-to-enc.c: New file.
1087
1088         * lib/uniconv.h (u8_conv_to_encoding, u16_conv_to_encoding,
1089         u32_conv_to_encoding): New declarations.
1090
1091 2007-06-09  Bruno Haible  <bruno@clisp.org>
1092
1093         * tests/uniconv/test-u32-strconv-to-enc.c (main): Remove unused code.
1094
1095 2007-06-09  Bruno Haible  <bruno@clisp.org>
1096
1097         Rename 'allocsa' -> 'malloca', 'freesa' -> 'freea'.
1098         * modules/malloca: Renamed from modules/allocsa, updated.
1099         * lib/malloca.h: Renamed from lib/allocsa.h, updated.
1100         * lib/malloca.c: Renamed from lib/allocsa.c, updated.
1101         * lib/malloca.valgrind: Renamed from lib/allocsa.valgrind, updated.
1102         * m4/malloca.m4: Renamed from m4/allocsa.m4, updated.
1103         * modules/malloca-tests: Renamed from modules/allocsa-tests, updated.
1104         * tests/test-malloca.c: Renamed from tests/test-allocsa.c, updated.
1105         * modules/xmalloca: Renamed from modules/xallocsa, updated.
1106         * lib/xmalloca.h: Renamed from lib/xallocsa.h, updated.
1107         * lib/xmalloca.c: Renamed from lib/xallocsa.c, updated.
1108         * modules/c-strcasestr (Depends-on): Update.
1109         * lib/c-strcasestr.c: Update.
1110         * modules/c-strstr (Depends-on): Update.
1111         * lib/c-strstr.c: Update.
1112         * modules/canonicalize-lgpl (Depends-on): Update.
1113         * lib/canonicalize-lgpl.c: Update.
1114         * modules/clean-temp (Depends-on): Update.
1115         * lib/clean-temp.c: Update.
1116         * modules/csharpcomp (Depends-on): Update.
1117         * lib/csharpcomp.c: Update.
1118         * modules/csharpexec (Depends-on): Update.
1119         * lib/csharpexec.c: Update.
1120         * modules/javacomp (Depends-on): Update.
1121         * lib/javacomp.c: Update.
1122         * modules/javaexec (Depends-on): Update.
1123         * lib/javaexec.c: Update.
1124         * modules/mbscasestr (Depends-on): Update.
1125         * lib/mbscasestr.c: Update.
1126         * modules/mbsstr (Depends-on): Update.
1127         * lib/mbsstr.c: Update.
1128         * modules/setenv (Depends-on): Update.
1129         * lib/setenv.c: Update.
1130         * modules/strcasestr (Depends-on): Update.
1131         * lib/strcasestr.c: Update.
1132         * modules/striconveha (Depends-on): Update.
1133         * lib/striconveha.c: Update.
1134         * modules/relocatable-prog-wrapper (Files): Update.
1135         * lib/relocwrapper.c: Update.
1136         * build-aux/install-reloc: Update.
1137         * MODULES.html.sh (Memory management functions <stdlib.h>): Update.
1138
1139 2007-06-08  Bruno Haible  <bruno@clisp.org>
1140
1141         Port to uClibc.
1142         * lib/fbufmode.c (fbufmode): Add special code for uClibc.
1143         * lib/fpurge.c (fpurge): Likewise.
1144         * lib/freading.c (freading): Likewise.
1145         * lib/fseeko.c (rpl_fseeko): Likewise.
1146         * lib/fseterr.c (fseterr): Likewise.
1147         * lib/fwriting.c (fwriting): Likewise.
1148         * tests/test-fflush.c (main): Avoid a failure on uClibc.
1149
1150 2007-06-08  Bruno Haible  <bruno@clisp.org>
1151
1152         * m4/intlmacosx.m4: New file, extracted from gettext.m4.
1153         * m4/gettext.m4 (gt_INTL_MACOSX): Remove macro, moved to intlmacosx.m4.
1154         * modules/gettext (Files): Add m4/intlmacosx.m4.
1155
1156 2007-06-07  Bruno Haible  <bruno@clisp.org>
1157
1158         * modules/localename-tests: New file.
1159         * tests/test-localename.c: New file.
1160
1161         New module 'localename'.
1162         * lib/localename.h: New file.
1163         * lib/localename.c: New file, from GNU gettext.
1164         * m4/localename.m4: New file.
1165         * modules/localename: New file.
1166
1167 2007-06-07  Bruno Haible  <bruno@clisp.org>
1168
1169         Work around the lack of <wchar.h> on some builds of uClibc.
1170         * doc/headers/wchar.texi: Update.
1171         * lib/wchar_.h: Include <wchar.h> only if it exists.
1172         * m4/wchar.m4 (gl_WCHAR_H): Check for <wchar.h>. Set HAVE_WCHAR_H.
1173         * m4/stdint.m4 (gl_STDINT_H): Check for <wchar.h>.
1174         (gl_STDINT_TYPE_PROPERTIES): Don't try to include <wchar.h> if it
1175         doesn't exist.
1176         * modules/wchar (wchar.h): Substitute HAVE_WCHAR_H.
1177         * modules/mbfile (Depends-on): Add wchar.
1178         * modules/mbiter (Depends-on): Likewise.
1179         * modules/mbuiter (Depends-on): Likewise.
1180         Reported by Simon Josefsson.
1181
1182 2007-06-06  Paul Eggert  <eggert@cs.ucla.edu>
1183
1184         Work around problem reported by Steven M. Schweda in
1185         <http://lists.gnu.org/archive/html/bug-tar/2007-06/msg00002.html>:
1186         Tru64 5.1B with the Compaq compiler environment installed declares
1187         an 'isblank' function but does not define it in the C library.
1188         * lib/fnmatch.c (isblank): Check for HAVE_ISBLANK, too.
1189         * lib/regex_internal.h (isblank): Likewise.
1190         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for isblank existence.
1191         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
1192
1193 2007-06-05  Bruno Haible  <bruno@clisp.org>
1194
1195         Fix *printf so that it recognizes non-IEEE numbers on i386, x86_64,
1196         ia64.
1197         * modules/printf-safe: New file.
1198         * modules/fprintf-posix (Depends-on): Add printf-safe.
1199         * modules/printf-posix (Depends-on): Likewise.
1200         * modules/snprintf-posix (Depends-on): Likewise.
1201         * modules/sprintf-posix (Depends-on): Likewise.
1202         * modules/vasnprintf-posix (Depends-on): Likewise.
1203         * modules/vasprintf-posix (Depends-on): Likewise.
1204         * modules/vfprintf-posix (Depends-on): Likewise.
1205         * modules/vprintf-posix (Depends-on): Likewise.
1206         * modules/vsnprintf-posix (Depends-on): Likewise.
1207         * modules/vsprintf-posix (Depends-on): Likewise.
1208         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Require
1209         AC_C_BIGENDIAN. Define CHECK_PRINTF_SAFE if printf-safe is used. Test
1210         non-IEEE numbers on i386, x86_64, ia64. When cross-compiling, guess
1211         "no" on i386, x86_64, ia64.
1212         * tests/test-snprintf-posix.h (LDBL80_WORDS): New macro.
1213         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
1214         on i386, x86_64, ia64.
1215         * tests/test-sprintf-posix.h (LDBL80_WORDS): New macro.
1216         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
1217         on i386, x86_64, ia64.
1218         * tests/test-vasnprintf-posix.c: Include float.h.
1219         (LDBL80_WORDS): New macro.
1220         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
1221         on i386, x86_64, ia64.
1222         * tests/test-vasprintf-posix.c: Include float.h.
1223         (LDBL80_WORDS): New macro.
1224         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
1225         on i386, x86_64, ia64.
1226         * tests/test-snprintf-posix.c: Include float.h.
1227         * tests/test-sprintf-posix.c: Likewise.
1228         * tests/test-vsnprintf-posix.c: Likewise.
1229         * tests/test-vsprintf-posix.c: Likewise.
1230
1231 2007-06-05  Bruno Haible  <bruno@clisp.org>
1232
1233         Fix isnanl so that it recognizes non-IEEE numbers on i386, x86_64, ia64.
1234         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Require AC_C_BIGENDIAN. Test
1235         non-IEEE numbers on i386, x86_64, ia64.
1236         (gl_LONG_DOUBLE_EXPONENT_LOCATION): Require AC_C_BIGENDIAN.
1237         * lib/isnan.c (FUNC): Add special code for i386, x86_64, ia64.
1238         * tests/test-isnanl.h: Include float.h.
1239         (main): Check also non-IEEE numbers on i386, x86_64, ia64.
1240
1241 2007-06-05  Bruno Haible  <bruno@clisp.org>
1242
1243         * lib/vasnprintf.c (VASNPRINTF): Do the extra handling of NaN and Inf
1244         also the %a / %A. Handle the %a / %A code before this extra handling.
1245
1246 2007-06-05  Bruno Haible  <bruno@clisp.org>
1247
1248         * lib/vasnprintf.c [NEED_PRINTF_LONG_DOUBLE ||
1249         NEED_PRINTF_INFINITE_LONG_DOUBLE]: Include fpucw.h.
1250
1251 2007-06-05  Bruno Haible  <bruno@clisp.org>
1252
1253         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): Fix
1254         typo in variable name.
1255
1256 2007-06-05  Eric Blake  <ebb9@byu.net>
1257
1258         * m4/lseek.m4 (gl_FUNC_LSEEK): Work when cross-compiling.
1259         Reported by Simon Josefsson.
1260
1261 2007-06-04  Bruno Haible  <bruno@clisp.org>
1262
1263         Avoid test failures on some PowerPC platforms.
1264         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP):
1265         Define differently for PowerPC.
1266         * tests/test-frexpl.c (MIN_NORMAL_EXP): Likewise.
1267         Reported by Gary V. Vaughan <gary@gnu.org>.
1268
1269 2007-06-02  Bruno Haible  <bruno@clisp.org>
1270
1271         Fix test-stdint failure on FreeBSD/ia64.
1272         * m4/stdint.m4 (gl_STDINT_H): Check the values of PTRDIFF_MIN,
1273         PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN,
1274         WCHAR_MAX, WINT_MIN, WINT_MAX entirely, not only for plausibility.
1275         * doc/headers/stdint.texi: Update.
1276
1277 2007-06-01  Bruno Haible  <bruno@clisp.org>
1278
1279         * tests/test-binary-io.c (main): Pass a third argument to open().
1280         Reported by Gary V. Vaughan <gary@gnu.org>.
1281
1282 2007-06-01  Bruno Haible  <bruno@clisp.org>
1283
1284         * doc/functions/frexpl.texi: Update for mingw.
1285
1286 2007-06-01  Bruno Haible  <bruno@clisp.org>
1287
1288         * tests/test-lseek.c (main): Disable test of errno for invalid third
1289         argument.
1290         * doc/functions/lseek.texi: Update.
1291         Reported by Gary V. Vaughan <gary@gnu.org>.
1292
1293 2007-05-28  Bruno Haible  <bruno@clisp.org>
1294
1295         * m4/intl.m4 (AM_INTL_SUBDIR): Substitute variables WOE32, WINDRES.
1296
1297 2007-05-31  Eric Blake  <ebb9@byu.net>
1298
1299         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Guess no on mingw when
1300         cross compiling.
1301
1302 2007-05-30  Eric Blake  <ebb9@byu.net>
1303         and Bruno Haible  <bruno@clisp.org>
1304
1305         Work around mingw test failures exposed by m4-1.4.9b.
1306         * m4/stdint.m4 (gl_STDINT_H): Detect mingw bug.
1307         * tests/test-unistd.c: Disable uid_t and git_t tests for the
1308         moment.
1309
1310 2007-05-30  Bruno Haible  <bruno@clisp.org>
1311
1312         * tests/test-lseek.c: Explicitly close file descriptors 0 and 1 before
1313         assuming that they are closed. Needed on HP-UX 11.
1314
1315 2007-05-29  Bruno Haible  <bruno@clisp.org>
1316
1317         Fix a problem with #include_next.
1318         * lib/dirent_.h: Split the double-inclusion guard.
1319         * lib/fcntl_.h: Likewise.
1320         * lib/float_.h: Likewise.
1321         * lib/iconv_.h: Likewise.
1322         * lib/inttypes_.h: Likewise.
1323         * lib/locale_.h: Likewise.
1324         * lib/math_.h: Likewise.
1325         * lib/netinet_in_.h: Likewise.
1326         * lib/search_.h: Likewise.
1327         * lib/signal_.h: Likewise.
1328         * lib/stdint_.h: Likewise.
1329         * lib/stdio_.h: Likewise.
1330         * lib/stdlib_.h: Likewise.
1331         * lib/string_.h: Likewise.
1332         * lib/sys_select_.h: Likewise.
1333         * lib/sys_socket_.h: Likewise.
1334         * lib/sys_stat_.h: Likewise.
1335         * lib/sys_time_.h: Likewise.
1336         * lib/sysexits_.h: Likewise.
1337         * lib/time_.h: Likewise.
1338         * lib/unistd_.h: Likewise.
1339         * lib/wchar_.h: Likewise.
1340         * lib/wctype_.h: Likewise.
1341
1342 2007-05-29  Bruno Haible  <bruno@clisp.org>
1343
1344         * tests/test-unistd.c: Disable the tests for useconds_t and intptr_t
1345         for the moment.
1346
1347 2007-05-29  Bruno Haible  <bruno@clisp.org>
1348
1349         * m4/isnan.m4 (gl_DOUBLE_EXPONENT_LOCATION): Silence the AC_C_BIGENDIAN
1350         invocation.
1351         Reported by Eric Blake.
1352
1353 2007-05-29  Bruno Haible  <bruno@clisp.org>
1354
1355         * m4/isnanf.m4 (gl_FLOAT_EXPONENT_LOCATION): Fix typo in cross-
1356         compiling case.
1357
1358 2007-05-29  Eric Blake  <ebb9@byu.net>
1359             Bruno Haible  <bruno@clisp.org>
1360
1361         * m4/isnanf.m4 (gl_FUNC_ISNANF_NO_LIBM): Avoid syntax error on
1362         cross compiles.
1363
1364 2007-05-28  Eric Blake  <ebb9@byu.net>
1365
1366         * modules/closein-tests (test_closein_LDADD): Support test on
1367         cygwin with libtool.
1368
1369 2007-05-28  Bruno Haible  <bruno@clisp.org>
1370
1371         * tests/uniconv/test-u16-conv-from-enc.c: Remove #ifdef HAVE_CONFIG_H.
1372         * tests/uniconv/test-u16-strconv-from-enc.c: Likewise.
1373         * tests/uniconv/test-u16-strconv-to-enc.c: Likewise.
1374         * tests/uniconv/test-u32-conv-from-enc.c: Likewise.
1375         * tests/uniconv/test-u32-strconv-from-enc.c: Likewise.
1376         * tests/uniconv/test-u32-strconv-to-enc.c: Likewise.
1377         * tests/uniconv/test-u8-conv-from-enc.c: Likewise.
1378         * tests/uniconv/test-u8-strconv-from-enc.c: Likewise.
1379         * tests/uniconv/test-u8-strconv-to-enc.c: Likewise.
1380
1381 2007-05-28  Eric Blake  <ebb9@byu.net>
1382
1383         Unconditionally include <config.h> in unit tests.
1384         * tests/test-alloca-opt.c: Remove #ifdef HAVE_CONFIG_H.
1385         * tests/test-allocsa.c, tests/test-arcfour.c,
1386         tests/test-arctwo.c, tests/test-argmatch.c, tests/test-argp.c,
1387         tests/test-array_list.c, tests/test-array_oset.c,
1388         tests/test-atexit.c, test-avltree_list.c, test-avltree_oset.c,
1389         test-avltreehash_list.c, test-base64.c, test-binary-io.c,
1390         test-c-ctype.c, test-c-strcasecmp.c, test-c-strcasestr.c,
1391         test-c-strncasecmp.c, test-c-strstr.c, test-canonicalize-lgpl.c,
1392         test-carray_list.c, test-crc.c, test-des.c, test-dirname.c,
1393         test-fflush.c, test-fprintf-posix.c, test-gc-arcfour.c,
1394         test-gc-arctwo.c, test-gc-des.c, test-gc-hmac-md5.c,
1395         test-gc-hmac-sha1.c, test-gc-md2.c, test-gc-md4.c, test-gc-md5.c,
1396         test-gc-pbkdf2-sha1.c, test-gc-rijndael.c, test-gc-sha1.c,
1397         test-gc.c, test-getpass.c, test-hmac-md5.c, test-hmac-sha1.c,
1398         test-iconv.c, test-linked_list.c, test-linkedhash_list.c,
1399         test-lock.c, test-mbscasecmp.c, test-mbscasestr1.c,
1400         test-mbscasestr2.c, test-mbscasestr3.c, test-mbscasestr4.c,
1401         test-mbschr.c, test-mbscspn.c, test-mbsncasecmp.c, test-mbspbrk.c,
1402         test-mbspcasecmp.c, test-mbsrchr.c, test-mbsspn.c, test-mbsstr1.c,
1403         test-mbsstr2.c, test-mbsstr3.c, test-md2.c, test-md4.c,
1404         test-md5.c, test-memmem.c, test-printf-posix.c,
1405         test-rbtree_list.c, test-rbtree_oset.c, test-rbtreehash_list.c,
1406         test-read-file.c, test-rijndael.c, test-snprintf-posix.c,
1407         test-snprintf.c, test-sprintf-posix.c, test-stdint.c,
1408         test-strcasestr.c, test-striconv.c, test-striconveh.c,
1409         test-striconveha.c, test-tls.c, test-vasnprintf-posix.c,
1410         test-vasnprintf-posix2.c, test-vasnprintf.c,
1411         test-vasprintf-posix.c, test-vasprintf.c, test-verify.c,
1412         test-vfprintf-posix.c, test-vprintf-posix.c,
1413         test-vsnprintf-posix.c, test-vsnprintf.c, test-vsprintf-posix.c,
1414         test-xvasprintf.c: Likewise.
1415
1416 2007-05-28  Bruno Haible  <bruno@clisp.org>
1417
1418         * gnulib-tool (func_import): Remember the --with-tests command-line
1419         option through the macro gl_WITH_TESTS in the gnulib-cache.m4.
1420         Reported by Eric Blake.
1421
1422 2007-05-28  Bruno Haible  <bruno@clisp.org>
1423
1424         * modules/ftell-tests: New file.
1425         * tests/test-ftell.c: New file, based on tests/test-ftello.c.
1426         * tests/test-ftell.sh: New file, based on tests/test-ftello.sh.
1427
1428         * lib/ftell.c: New file.
1429         * modules/ftell: New file.
1430         * m4/ftell.m4: New file.
1431         * doc/functions/ftell.texi: Update.
1432         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELL,
1433         REPLACE_FTELL.
1434         * lib/stdio_.h (rpl_ftell): New declaration.
1435         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELL,
1436         REPLACE_FTELL.
1437
1438 2007-05-28  Eric Blake  <ebb9@byu.net>
1439
1440         * lib/allocsa.h (safe_alloca): Avoid compiler warning.
1441
1442 2007-05-28  Bruno Haible  <bruno@clisp.org>
1443
1444         * modules/fseek-tests: New file.
1445         * tests/test-fseek.c: New file, based on tests/test-fseeko.c.
1446         * tests/test-fseek.sh: New file, based on tests/test-fseeko.sh.
1447
1448         * lib/fseek.c: New file.
1449         * modules/fseek: New file.
1450         * m4/fseek.m4: New file.
1451         * doc/functions/fseek.texi: Update.
1452         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEK,
1453         REPLACE_FSEEK.
1454         * lib/stdio_.h (rpl_fseek): New declaration.
1455         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEK,
1456         REPLACE_FSEEK.
1457
1458 2007-05-28  Bruno Haible  <bruno@clisp.org>
1459
1460         * lib/stdio_.h (fflush): More comments.
1461
1462 2007-05-28  Bruno Haible  <bruno@clisp.org>
1463
1464         * m4/lseek.m4 (gl_FUNC_LSEEK): When not cross-compiling, perform a real
1465         runtime test.
1466
1467 2007-05-28  Eric Blake  <ebb9@byu.net>
1468
1469         Improve lseek module.
1470         * lib/lseek.c (rpl_lseek): Detect EBADF on mingw.
1471         * lib/unistd_.h (lseek): Scale back link warning message.
1472         * tests/test-lseek.c: Beef up test.
1473         * tests/test-lseek.sh: Exercise more facets of lseek.
1474         Reported by Bruno Haible.
1475
1476 2007-05-28  Bruno Haible  <bruno@clisp.org>
1477
1478         * tests/test-unistd.c: Test all the types that <unistd.h> is expected
1479         to define.
1480
1481 2007-05-27  Bruno Haible  <bruno@clisp.org>
1482
1483         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-31 patch.
1484
1485 2007-05-27  Bruno Haible  <bruno@clisp.org>
1486
1487         * modules/openmp: New file.
1488         * m4/openmp.m4: New file, taken from autoconf's CVS with changes by
1489         Noah Misch.
1490
1491 2007-05-26  Bruno Haible  <bruno@clisp.org>
1492
1493         * modules/chdir-long (Depends-on): Add fchdir.
1494         * modules/chdir-safer (Depends-on): Likewise.
1495         * modules/fts (Depends-on): Likewise.
1496         * modules/fts-lgpl (Depends-on): Likewise.
1497         * modules/openat (Depends-on): Likewise.
1498         * modules/savewd (Depends-on): Likewise.
1499
1500 2007-05-24  Eric Blake  <ebb9@byu.net>
1501
1502         Fix lseek on mingw.
1503         * modules/lseek: New module.
1504         * m4/lseek.m4: New file.
1505         * lib/lseek.c: New file.
1506         * modules/lseek-tests: New file.
1507         * tests/test-lseek.c: New file.
1508         * tests/test-lseek.sh: New file.
1509         * MODULES.html.sh: Document lseek module.
1510         * modules/fflush (Depends-on): Add lseek, fseeko.
1511         * modules/fseeko (Depends-on): Likewise.
1512         * modules/ftello (Depends-on): Likewise.
1513         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Replace fseek[o] if lseek is
1514         broken.
1515         * m4/ftello.m4 (gl_FUNC_FTELLO): Replace ftell[o] if lseek is
1516         broken.
1517         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Trigger fseeko module.
1518         * lib/fseeko.c (rpl_fseeko): Quit early on non-seekable files.
1519         * lib/ftello.c (rpl_ftello): Likewise.
1520         * tests/test-fseeko.c (main): Test this.
1521         * tests/test-fseeko.sh: Likewise.
1522         * tests/test-ftello.c (main): Likewise.
1523         * tests/test-ftello.sh: Likewise.
1524         * lib/stdio_.h (fseek, ftell): Simplify, since missing fseeko now
1525         implies replacing fseek.
1526         * modules/stdio (Makefile.am): No longer need HAVE_FSEEKO,
1527         HAVE_FTELLO.
1528         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add lseek info.
1529         * modules/unistd (Makefile.am): Likewise.
1530         * lib/unistd_.h (lseek): Declare a replacement.
1531         * doc/functions/lseek.texi (lseek): Document this fix.
1532         * doc/functions/fseek.texi (fseek): Likewise.
1533         * doc/functions/ftell.texi (ftell): Likewise.
1534
1535 2007-05-24  Bruno Haible  <bruno@clisp.org>
1536
1537         * tests/test-vasnprintf-posix.c (test_function): Allow up to 50 bytes
1538         in the printed representation of a NaN.
1539         * tests/test-vasprintf-posix.c (test_function): Likewise.
1540         * tests/test-snprintf-posix.h (test_function): Likewise.
1541         * tests/test-sprintf-posix.h (test_function): Likewise.
1542         Reported by Eric Blake.
1543
1544 2007-05-23  Eric Blake  <ebb9@byu.net>
1545
1546         Fix fseeko/ftello on cygwin 1.5.24.
1547         * doc/functions/fseeko.texi (fseeko): Document the fix.
1548         * doc/functions/ftello.texi (ftello): Document the fix.
1549         * doc/functions/stdin.texi (stdin): Document the cygwin bug.
1550         * doc/functions/stdout.text (stdout): New file.
1551         * doc/functions/stderr.text (stderr): New file.
1552         * doc/gnulib.texi (Function Substitutes): Use new files.
1553         * tests/test-fseeko.c (main): Check for broken fseeko on cygwin
1554         prior to 1.7.0.
1555         * tests/test-ftello.c (main): Likewise for ftello.
1556         * tests/test-fseeko.sh: New file.
1557         * tests/test-ftello.sh: New file.
1558         * modules/fseeko-tests (Makefile.am): Ensure test-fseeko is run
1559         with seekable stdin.
1560         * modules/ftello-tests (Makefile.am): Likewise for test-ftello.
1561         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Detect the cygwin bug.
1562         (gl_REPLACE_FSEEKO): New macro.
1563         * m4/ftello.m4 (gl_FUNC_FTELLO, gl_REPLACE_FTELLO): Likewise.
1564         * modules/fseeko (Files): Distribute fseeko.c.
1565         * modules/ftello (Files): Distribute ftello.c.
1566         * lib/fseeko.c (rpl_fseeko) [__CYGWIN__]: Convert stdin to 64-bit
1567         mode.
1568         * lib/ftello.c (rpl_ftello): New file.
1569         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Allow replacement of
1570         fseeko, ftello.
1571         (gl_STDIN_LARGE_OFFSET): New macro.
1572         * modules/stdio (Makefile.am): Perform the replacement.
1573         * lib/stdio_.h (rpl_fseeko, rpl_ftello): Define when needed.
1574
1575 2007-05-23  Bruno Haible  <bruno@clisp.org>
1576
1577         * lib/stdio_.h (fseeko, ftello): Provide a link warning only if
1578         GNULIB_POSIXCHECK is defined.
1579
1580 2007-05-21  Bruno Haible  <bruno@clisp.org>
1581
1582         * m4/printf.m4 (gl_PRINTF_INFINITE, gl_PRINTF_INFINITE_LONG_DOUBLE):
1583         Check also the output for NaN arguments. When cross-compiling, guess
1584         no on IRIX.
1585         * lib/vasnprintf.c: Update comments.
1586         * tests/test-vasnprintf-posix.c (strisnan): New function.
1587         (test_function): Use it.
1588         * tests/test-vasprintf-posix.c (strisnan): New function.
1589         (test_function): Use it.
1590         * tests/test-snprintf-posix.h (strisnan): New function.
1591         (test_function): Use it.
1592         * tests/test-sprintf-posix.h (strisnan): New function.
1593         (test_function): Use it.
1594         Reported by Eric Blake.
1595
1596 2007-05-20  Bruno Haible  <bruno@clisp.org>
1597
1598         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Add test for large finite
1599         numbers that fails on BeOS.
1600         * doc/functions/frexpl.texi: Update.
1601
1602 2007-05-20  Jim Meyering  <jim@meyering.net>
1603
1604         * NEWS: Mention the incompatible change (s/futimens/gl_futimens/)
1605         forced upon us by glibc-2.6.
1606
1607 2007-05-20  Bruno Haible  <bruno@clisp.org>
1608
1609         Fix *printf result for NaN, Inf on AIX, Solaris, OSF/1.
1610         * m4/printf.m4 (gl_PRINTF_INFINITE): Update cross-compiling guesses.
1611         (gl_PRINTF_INFINITE_LONG_DOUBLE): New macro.
1612         * lib/vasnprintf.c: Use NEED_PRINTF_INFINITE_DOUBLE instead of
1613         NEED_PRINTF_INFINITE.
1614         (is_infinitel): New function.
1615         (VASNPRINTF): Handle NEED_PRINTF_INFINITE_LONG_DOUBLE case.
1616         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE): Renamed from
1617         gl_PREREQ_VASNPRINTF_INFINITE.
1618         (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): New macro.
1619         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
1620         gl_PRINTF_INFINITE_LONG_DOUBLE and test its result. Invoke
1621         gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE and
1622         gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE instead of
1623         gl_PREREQ_VASNPRINTF_INFINITE.
1624         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
1625         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1626         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1627         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1628         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
1629         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1630         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1631         * doc/functions/fprintf.texi: Update.
1632         * doc/functions/printf.texi: Update.
1633         * doc/functions/snprintf.texi: Update.
1634         * doc/functions/sprintf.texi: Update.
1635         * doc/functions/vfprintf.texi: Update.
1636         * doc/functions/vprintf.texi: Update.
1637         * doc/functions/vsnprintf.texi: Update.
1638         * doc/functions/vsprintf.texi: Update.
1639
1640 2007-05-20  Bruno Haible  <bruno@clisp.org>
1641
1642         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): Set REPLACE_FREXPL if frexpl
1643         was not found in libc.
1644         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Likewise.
1645
1646 2007-05-20  Bruno Haible  <bruno@clisp.org>
1647
1648         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
1649         printed as "-nan" instead of "nan".
1650         * tests/test-vasprintf-posix.c (test_function): Likewise.
1651         * tests/test-snprintf-posix.h (test_function): Likewise.
1652         * tests/test-sprintf-posix.h (test_function): Likewise.
1653         Needed for HP-UX 11.
1654
1655 2007-05-20  Jim Meyering  <jim@meyering.net>
1656
1657         Fix buggy test for the fchownat-deref bug.
1658         * m4/openat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Create the dangling
1659         symlink required for the run-test.  Without it, this test would
1660         always declare that fchownat doesn't work, and client code would
1661         unnecessarily use the replacement function with fixed libc.
1662         (gl_FUNC_FCHOWNAT): Eliminate a variable that wasn't initialized.
1663         Reported by Greg Schafer.
1664
1665 2007-05-19  Bruno Haible  <bruno@clisp.org>
1666
1667         * m4/isnanf.m4 (gl_ISNANF_WORKS): New macro.
1668         (gl_FUNC_ISNANF_NO_LIBM): Invoke it.
1669         * lib/isnan.c (FUNC): Use run-time expressions for SGI compiler.
1670         Needed for IRIX 6.5 and Solaris 2.5.1.
1671
1672 2007-05-19  Bruno Haible  <bruno@clisp.org>
1673
1674         * tests/test-vasnprintf-posix.c (have_minus_zero): New function.
1675         (test_function): Skip tests involving -0.0 on platforms where
1676         -0.0 = 0.0.
1677         * tests/test-vasprintf-posix.c (have_minus_zero): New function.
1678         (test_function): Skip tests involving -0.0 on platforms where
1679         -0.0 = 0.0.
1680         * tests/test-snprintf-posix.h (have_minus_zero): New function.
1681         (test_function): Skip tests involving -0.0 on platforms where
1682         -0.0 = 0.0.
1683         * tests/test-sprintf-posix.h (have_minus_zero): New function.
1684         (test_function): Skip tests involving -0.0 on platforms where
1685         -0.0 = 0.0.
1686         * tests/test-fprintf-posix.h (test_function): Remove all -0.0 related
1687         tests.
1688         * tests/test-printf-posix.h (test_function): Likewise.
1689         * tests/test-printf-posix.output: Remove all -0.0 related results.
1690         Needed for IRIX 6.5.
1691
1692 2007-05-19  Bruno Haible  <bruno@clisp.org>
1693
1694         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
1695         printed as "nan0x7fffffff" instead of "nan".
1696         * tests/test-vasprintf-posix.c (test_function): Likewise.
1697         * tests/test-snprintf-posix.h (test_function): Likewise.
1698         * tests/test-sprintf-posix.h (test_function): Likewise.
1699         * tests/test-fprintf-posix.h (NaN): Remove macro.
1700         (test_function): Remove all NaN related tests.
1701         * tests/test-printf-posix.h (NaN): Remove macro.
1702         (test_function): Remove all NaN related tests.
1703         * tests/test-printf-posix.output: Remove all NaN related results.
1704         Needed for IRIX 6.5.
1705
1706 2007-05-19  Bruno Haible  <bruno@clisp.org>
1707
1708         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Fix C89 syntax error in test code.
1709         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Likewise.
1710
1711 2007-05-19  Bruno Haible  <bruno@clisp.org>
1712
1713         * lib/float_.h: New file.
1714         * m4/float_h.m4: New file.
1715         * modules/float: New file.
1716         * modules/isnanl (Dependencies): Add float.
1717         * modules/isnanl-nolibm (Dependencies): Likewise.
1718         * modules/mathl (Dependencies): Likewise.
1719         * modules/printf-frexpl (Dependencies): Likewise.
1720         * modules/signbit (Dependencies): Likewise.
1721         * modules/vasnprintf (Dependencies): Likewise.
1722         * doc/headers/float.texi: Update.
1723
1724 2007-05-19  Jim Meyering  <jim@meyering.net>
1725
1726         * lib/utimens.c (gl_futimens): Rename from futimens,
1727         now that glibc-2.6 declares futimens.
1728         * lib/utimens.h: Likewise.
1729
1730 2007-05-19  Bruno Haible  <bruno@clisp.org>
1731
1732         Avoid test failures on mingw.
1733         * tests/test-fprintf-posix.sh: Convert CR/LF to LF in output.
1734         * tests/test-printf-posix.sh: Likewise.
1735         * tests/test-vfprintf-posix.sh: Likewise.
1736         * tests/test-vprintf-posix.sh: Likewise.
1737
1738 2007-05-19  Bruno Haible  <bruno@clisp.org>
1739
1740         Fix *printf result for NaN, Inf, -0.0 on mingw.
1741         * m4/printf.m4 (gl_PRINTF_INFINITE): New macro.
1742         * lib/vasnprintf.c: Include math.h and isnan.h.
1743         (is_infinite_or_zero): New function.
1744         (VASNPRINTF): Fix also the handling of infinite or zero 'double'
1745         values in the %f, %F, %e, %E, %g, %G directives.
1746         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE): New macro.
1747         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
1748         gl_PRINTF_INFINITE and test its result. Invoke
1749         gl_PREREQ_VASNPRINTF_INFINITE.
1750         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
1751         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1752         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1753         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1754         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
1755         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1756         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1757         * doc/functions/fprintf.texi: Update.
1758         * doc/functions/printf.texi: Update.
1759         * doc/functions/snprintf.texi: Update.
1760         * doc/functions/sprintf.texi: Update.
1761         * doc/functions/vfprintf.texi: Update.
1762         * doc/functions/vprintf.texi: Update.
1763         * doc/functions/vsnprintf.texi: Update.
1764         * doc/functions/vsprintf.texi: Update.
1765
1766 2007-05-19  Bruno Haible  <bruno@clisp.org>
1767
1768         * lib/vasnprintf.c (convert_to_decimal): Add an extra_zeroes argument.
1769         (scale10_round_decimal_long_double): Inline scale10_round_long_double.
1770         Instead of multiplying with 10^k, set extra_zeroes to k.
1771         (scale10_round_long_double): Remove function.
1772
1773 2007-05-18  Bruno Haible  <bruno@clisp.org>
1774
1775         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Fix logic bug
1776         introduced on 2007-05-06.
1777
1778 2007-05-18  Bruno Haible  <bruno@clisp.org>
1779
1780         * tests/test-vasnprintf-posix.c (test_function): Also test the %e and
1781         %g directives.
1782         * tests/test-vasprintf-posix.c (test_function): Likewise.
1783         * tests/test-snprintf-posix.h (test_function): Likewise.
1784         * tests/test-sprintf-posix.h (test_function): Likewise.
1785
1786 2007-05-18  Bruno Haible  <bruno@clisp.org>
1787
1788         * tests/test-vasnprintf-posix.c (SIZEOF): New macro.
1789         (strmatch): New function.
1790         (test_function): Test the %f directive on numbers of various exponents.
1791         * tests/test-vasprintf-posix.c (SIZEOF): New macro.
1792         (strmatch): New function.
1793         (test_function): Test the %f directive on numbers of various exponents.
1794         * tests/test-snprintf-posix.h (strmatch): New function.
1795         (test_function): Test the %f directive on numbers of various exponents.
1796         * tests/test-sprintf-posix.h (strmatch): New function.
1797         (test_function): Test the %f directive on numbers of various exponents.
1798         * tests/test-snprintf-posix.c (SIZEOF): New macro.
1799         * tests/test-sprintf-posix.c (SIZEOF): New macro.
1800         * tests/test-vsnprintf-posix.c (SIZEOF): New macro.
1801         * tests/test-vsprintf-posix.c (SIZEOF): New macro.
1802
1803 2007-05-18  Bruno Haible  <bruno@clisp.org>
1804
1805         Add support for 'long double' number output.
1806         * m4/printf.m4 (gl_PRINTF_LONG_DOUBLE): New macro.
1807         * lib/vasnprintf.c: Include math.h and float+.h.
1808         (mp_limb_t): New type.
1809         (GMP_LIMB_BITS): New macro.
1810         (mp_twolimb_t): New type.
1811         (GMP_TWOLIMB_BITS): New macro.
1812         (mpn_t): New type.
1813         (multiply, divide, convert_to_decimal, decode_long_double,
1814         scale10_round_long_double, scale10_round_decimal_long_double,
1815         floorlog10l): New functions.
1816         (VASNPRINTF) [NEED_PRINTF_LONG_DOUBLE]: Implement 'long double' support
1817         for the %f, %F, %e, %E, %g, %G directives.
1818         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_LONG_DOUBLE): New macro.
1819         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
1820         gl_PRINTF_LONG_DOUBLE and test its result. Invoke
1821         gl_PREREQ_VASNPRINTF_LONG_DOUBLE.
1822         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
1823         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1824         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1825         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1826         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
1827         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1828         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1829         * modules/fprintf-posix (Depends-on): Add frexpl-nolibm.
1830         * modules/snprintf-posix (Depends-on): Likewise.
1831         * modules/sprintf-posix (Depends-on): Likewise.
1832         * modules/vasnprintf-posix (Depends-on): Likewise.
1833         * modules/vasprintf-posix (Depends-on): Likewise.
1834         * modules/vfprintf-posix (Depends-on): Likewise.
1835         * modules/vsnprintf-posix (Depends-on): Likewise.
1836         * modules/vsprintf-posix (Depends-on): Likewise.
1837         * modules/vasnprintf (Files): Add lib/float+.h.
1838         * doc/functions/fprintf.texi: Update.
1839         * doc/functions/printf.texi: Update.
1840         * doc/functions/snprintf.texi: Update.
1841         * doc/functions/sprintf.texi: Update.
1842         * doc/functions/vfprintf.texi: Update.
1843         * doc/functions/vprintf.texi: Update.
1844         * doc/functions/vsnprintf.texi: Update.
1845         * doc/functions/vsprintf.texi: Update.
1846
1847 2007-05-18  Bruno Haible  <bruno@clisp.org>
1848
1849         * lib/vasnprintf.c (USE_SNPRINTF): Define to 0 on BeOS.
1850
1851 2007-05-18  Bruno Haible  <bruno@clisp.org>
1852
1853         * lib/vasnprintf.c (VASNPRINTF) [WIN32]: Use %I64d instead of %lld
1854         for printing 64-bit integers. Needed for mingw.
1855
1856 2007-05-18  Bruno Haible  <bruno@clisp.org>
1857
1858         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
1859         gl_FUNC_FREXPL_WORKS.
1860         * modules/printf-frexpl (Files): Add m4/frexpl.m4.
1861
1862 2007-05-18  Bruno Haible  <bruno@clisp.org>
1863
1864         * modules/frexpl-nolibm-tests: New file.
1865
1866         * modules/frexpl-nolibm: New file.
1867         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): New macro.
1868
1869 2007-05-17  Paul Eggert  <eggert@cs.ucla.edu>
1870
1871         * lib/dirent_.h: Prefer #include_next <foo.h> to #include
1872         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
1873         GCC 4.2, which otherwise issues a lot of warnings.
1874         * lib/iconv_.h, lib/locale_.h, lib/netinet_in_.h, lib/sys_select_.h:
1875         * lib/sys_socket_.h, lib/sys_stat_.h, lib/sysexits_.h, lib/unistd_.h:
1876         Likewise.
1877         * modules/fchdir (dirent.h): Substitute @HAVE_INCLUDE_NEXT@.
1878         * modules/iconv_open (iconv.h): Likewise.
1879         * modules/locale (locale.h): Likewise.
1880         * modules/netinet_in (netinet/in.h): Likewise.
1881         * modules/sys_select (sys_select.h): Likewise.
1882         * modules/sys_socket (sys/socket.h): Likewise.
1883         * modules/sys_stat (sys/stat.h): Likewise.
1884         * modules/sysexits (sysexits.h): Likewise.
1885         * modules/unistd (unistd.h): Likewise.
1886
1887 2007-05-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1888
1889         * modules/closein-tests (Makefile.am): Distribute
1890         `test-closein.sh'.
1891
1892 2007-05-17  Bruno Haible  <bruno@clisp.org>
1893
1894         * tests/test-printf-posix.output: Renamed from
1895         tests/test-fprintf-posix.out.
1896         * modules/fprintf-posix-tests: Update.
1897         * modules/printf-posix-tests: Update.
1898         * modules/vfprintf-posix-tests: Update.
1899         * modules/vprintf-posix-tests: Update.
1900         * tests/test-fprintf-posix.sh: Update.
1901         * tests/test-printf-posix.sh: Update.
1902         * tests/test-vfprintf-posix.sh: Update.
1903         * tests/test-vprintf-posix.sh: Update.
1904         Reported by Ralf Wildenhues.
1905
1906 2007-05-16  Paul Eggert  <eggert@cs.ucla.edu>
1907
1908         * lib/fcntl_.h: Prefer #include_next <foo.h> to #include
1909         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
1910         GCC 4.2, which otherwise issues a lot of warnings.
1911         * lib/inttypes_.h, lib/math_.h, lib/search_.h, lib/signal_.h:
1912         * lib/stdint_.h, lib/stdio_.h, lib/stdlib_.h, lib/string_.h:
1913         * lib/sys_time_.h, lib/time_.h, lib/wchar_.h, lib/wctype_.h: Likewise.
1914         * lib/stdlib_.h: Don't bother with #pragma GCC system_header, as
1915         it should no longer be needed.
1916         * lib/string_.h: Likewise.
1917         * modules/absolute-header (HAVE_INCLUDE_NEXT): New 'make' define.
1918         * modules/fcntl (fcntl.h): Substitute @HAVE_INCLUDE_NEXT@.
1919         * modules/inttypes (inttypes.h): Likewise.
1920         * modules/math (math.h): Likewise.
1921         * modules/search (search.h): Likewise.
1922         * modules/signal (signal.h): Likewise.
1923         * modules/stdint (stdint.h): Likewise.
1924         * modules/stdio (stdio.h): Likewise.
1925         * modules/stdlib (stdlib.h): Likewise.
1926         * modules/string (string.h): Likewise.
1927         * modules/sys_time (sys/time.h): Likewise.
1928         * modules/time (time.h): Likewise.
1929         * modules/wchar (wchar.h): Likewise.
1930         * modules/wctype (wtype.h): Likewise.
1931
1932 2007-05-16  Thien-Thi Nguyen  <ttn@gnuvola.org>  (tiny change)
1933
1934         * doc/gnulib-tool.texi (CVS Issues): Fix typo.
1935
1936 2007-05-13  Bruno Haible  <bruno@clisp.org>
1937
1938         * stpcpy.m4 (gl_FUNC_STPCPY): Require AC_C_RESTRICT.
1939         * stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
1940         * strsep.m4 (gl_FUNC_STRSEP): Likewise.
1941         * strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
1942         (gl_PREREQ_STRTOK_R): Don't require it here.
1943
1944 2007-05-13  Bruno Haible  <bruno@clisp.org>
1945
1946         * lib/stdlib_.h (mkdtemp, mkstemp): Comment out argument name. Needed
1947         when used in C++ mode.
1948
1949 2007-05-12  Bruno Haible  <bruno@clisp.org>
1950
1951         * lib/linebuffer.h: Tweak doc.
1952         * lib/linebuffer.c: Likewise.
1953
1954 2007-05-12  James Youngman  <jay@gnu.org>
1955
1956         * lib/linebuffer.c (readlinebuffer_delim): New function,
1957         like readlinebuffer, but use a caller-specified delimiter.
1958         (readlinebuffer): Just call readlinebuffer_delim with '\n'
1959         as the delimiter.
1960         * lib/linebuffer.h (readlinebuffer_delim): Declare it.
1961
1962 2007-05-12  Sergey Poznyakoff  <gray@gnu.org.ua>
1963
1964         * m4/openat.m4 (gl_FUNC_OPENAT): Do not require openat-die.
1965         * modules/openat (Files): Remove openat-die.c.
1966         (Depends-on): Add openat-die.
1967         * modules/openat-die: New module.
1968
1969 2007-05-06  Bruno Haible  <bruno@clisp.org>
1970
1971         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING, gl_VSNPRINTF_ZEROSIZE_C99):
1972         Update with info about Cygwin.
1973         * doc/functions/fprintf.texi: Update.
1974         * doc/functions/printf.texi: Update.
1975         * doc/functions/snprintf.texi: Update.
1976         * doc/functions/sprintf.texi: Update.
1977         * doc/functions/vfprintf.texi: Update.
1978         * doc/functions/vprintf.texi: Update.
1979         * doc/functions/vsnprintf.texi: Update.
1980         * doc/functions/vsprintf.texi: Update.
1981         Reported by Eric Blake.
1982
1983 2007-05-06  Bruno Haible  <bruno@clisp.org>
1984
1985         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Perform the
1986         padding ourselves for the floating-point directives.
1987         * m4/printf.m4 (gl_PRINTF_FLAG_ZERO): New macro.
1988         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_ZERO): New macro.
1989         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
1990         gl_PRINTF_FLAG_ZERO and test its result. Invoke
1991         gl_PREREQ_VASNPRINTF_FLAG_ZERO.
1992         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1993         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
1994         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1995         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1996         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
1997         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1998         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1999         * tests/test-snprintf-posix.h (test_function): Also check the width
2000         and some flags in the %f directive.
2001         * tests/test-sprintf-posix.h (test_function): Likewise.
2002         * tests/test-vasnprintf-posix.c (test_function): Likewise.
2003         * tests/test-vasprintf-posix.c (test_function): Likewise.
2004         * doc/functions/fprintf.texi: Update.
2005         * doc/functions/printf.texi: Update.
2006         * doc/functions/snprintf.texi: Update.
2007         * doc/functions/sprintf.texi: Update.
2008         * doc/functions/vfprintf.texi: Update.
2009         * doc/functions/vprintf.texi: Update.
2010         * doc/functions/vsnprintf.texi: Update.
2011         * doc/functions/vsprintf.texi: Update.
2012
2013 2007-05-06  Bruno Haible  <bruno@clisp.org>
2014
2015         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_GROUPING]: Don't
2016         pass the ' flag character to sprintf or snprintf.
2017         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING): New macro.
2018         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_GROUPING): New macro.
2019         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
2020         gl_PRINTF_FLAG_GROUPING and test its result. Invoke
2021         gl_PREREQ_VASNPRINTF_FLAG_GROUPING.
2022         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2023         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
2024         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2025         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2026         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2027         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2028         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2029         * tests/test-snprintf-posix.h (test_function): Also check the grouping
2030         flag.
2031         * tests/test-sprintf-posix.h (test_function): Likewise.
2032         * tests/test-vasnprintf-posix.c (test_function): Likewise.
2033         * tests/test-vasprintf-posix.c (test_function): Likewise.
2034         * doc/functions/fprintf.texi: Update.
2035         * doc/functions/printf.texi: Update.
2036         * doc/functions/snprintf.texi: Update.
2037         * doc/functions/sprintf.texi: Update.
2038         * doc/functions/vfprintf.texi: Update.
2039         * doc/functions/vprintf.texi: Update.
2040         * doc/functions/vsnprintf.texi: Update.
2041         * doc/functions/vsprintf.texi: Update.
2042
2043 2007-05-01  Bruno Haible  <bruno@clisp.org>
2044
2045         * tests/test-argp-2.sh (func_compare): Drop .exe suffix.
2046
2047 2007-05-03  Paul Eggert  <eggert@cs.ucla.edu>
2048
2049         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Use better
2050         comment for D_INO_IN_DIRENT.  Problem reported by James Youngman.
2051
2052 2007-05-02  Paul Eggert  <eggert@cs.ucla.edu>
2053
2054         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Test whether
2055         readdir returns garbage in d_ino.  Problem reported by Kaz Sasayama in
2056         <http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00021.html>.
2057
2058 2007-05-02  Sergey Poznyakoff  <gray@gnu.org.ua>
2059
2060         * lib/argp-help.c (struct hol_entry): New member `ord'.
2061         (HOL_ENTRY_PTRCMP): Use ord for comparison
2062         (hol_sort): Initialize ord.
2063
2064 2007-05-01  Bruno Haible  <bruno@clisp.org>
2065
2066         * doc/functions/_Exit_C99.texi: Renamed from doc/functions/_Exit.texi.
2067         Reported by Eric Blake.
2068         * doc/gnulib.texi (Function Substitutes): Update.
2069
2070 2007-05-01  Bruno Haible  <bruno@clisp.org>
2071
2072         * doc/functions.texi: Remove file, now redundant through
2073         doc/functions/*.texi.
2074
2075 2007-05-01  Bruno Haible  <bruno@clisp.org>
2076
2077         * modules/argp (Depends-on): Add sleep.
2078
2079 2007-05-01  Bruno Haible  <bruno@clisp.org>
2080
2081         * modules/sleep-tests: New file.
2082         * tests/test-sleep.c: New file.
2083
2084         * modules/sleep: New file.
2085         * lib/sleep.c: New file.
2086         * m4/sleep.m4: New file.
2087         * lib/unistd_.h (sleep): New declaration.
2088         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_SLEEP,
2089         HAVE_SLEEP.
2090         * modules/unistd (Makefile.am): Substitute GNULIB_SLEEP, HAVE_SLEEP.
2091         * doc/functions/sleep.texi: Document the sleep module.
2092
2093 2007-05-01  Bruno Haible  <bruno@clisp.org>
2094
2095         * lib/sigprocmask.h: Remove file.
2096         * lib/signal_.h: Incorporate the previous contents of sigprocmask.h.
2097         * lib/sigprocmask.c: Include <signal.h> instead of sigprocmask.h.
2098         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Substitute GNULIB_SIGPROCMASK,
2099         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T.
2100         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Require
2101         gl_SIGNAL_H_DEFAULTS. Set HAVE_POSIX_SIGNALBLOCKING as a shell variable.
2102         (gl_PREREQ_SIGPROCMASK): Require gl_SIGNAL_H_DEFAULTS. Set
2103         HAVE_SIGSET_T as a shell variable.
2104         * modules/signal (Makefile.am): Substitute GNULIB_SIGPROCMASK,
2105         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T into signal.h.
2106         * modules/sigprocmask (Files): Remove lib/sigprocmask.h.
2107         (Depends-on): Add signal. Remove verify.
2108         (configure.ac): Invoke gl_SIGNAL_MODULE_INDICATOR.
2109         (Include): Mention <signal.h> instead of sigprocmask.h.
2110         * NEWS: Mention the change.
2111         * lib/fatal-signal.c: Don't include sigprocmask.h.
2112
2113 2007-05-01  Bruno Haible  <bruno@clisp.org>
2114
2115         * modules/signal: New file.
2116         * lib/signal_.h: New file.
2117         * m4/signal_h.m4: New file.
2118
2119 2007-05-01  Bruno Haible  <bruno@clisp.org>
2120
2121         * lib/wctype_.h: Test HAVE_ISWCNTRL at configure time.
2122         * m4/wctype.m4 (gl_WCTYPE_H): Substitute HAVE_ISWCNTRL.
2123         * modules/wctype (Makefile.am): Substitute HAVE_ISWCNTRL instead of
2124         HAVE_WCTYPE_CTMP_BUG into wctype.h.
2125
2126 2007-05-01  Bruno Haible  <bruno@clisp.org>
2127
2128         * lib/sys_stat_.h: Test HAVE_LSTAT, HAVE_DECL_MKDIR, HAVE_IO_H at
2129         configure time.
2130         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Substitute HAVE_LSTAT,
2131         HAVE_DECL_MKDIR, HAVE_IO_H via AC_SUBST.
2132         * modules/sys_stat (Makefile.am): Substitute their values into
2133         sys/stat.h.
2134
2135 2007-05-01  Bruno Haible  <bruno@clisp.org>
2136
2137         * lib/glob_.h: Test HAVE_SYS_CDEFS_H at configure time.
2138         * m4/glob.m4 (gl_PREREQ_GLOB): Substitute HAVE_SYS_CDEFS_H via AC_SUBST.
2139         * modules/glob (Makefile.am): Put HAVE_SYS_CDEFS_H value into glob.h.
2140
2141 2007-05-01  Bruno Haible  <bruno@clisp.org>
2142
2143         * doc/header/assert.texi: Undo last change: don't mention the gnulib
2144         'assert' module here.
2145
2146 2007-05-01  Bruno Haible  <bruno@clisp.org>
2147
2148         * doc/functions/*.texi: New files.
2149         * doc/functions/google-ranking.txt: New file.
2150         * doc/gnulib.texi (Function Substitutes): New chapter.
2151         (ctime, inet_ntoa): Remove sections.
2152         * doc/ctime.texi: Remove file.
2153         * doc/inet_ntoa.texi: Remove file.
2154         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Update
2155         dependencies.
2156         (%.info): New rule, specifying a --reference-limit.
2157
2158 2007-05-01  Bruno Haible  <bruno@clisp.org>
2159
2160         * MODULES.html.sh (posix_functions): Remove 'exec', 'toc'.
2161
2162 2007-05-01  Bruno Haible  <bruno@clisp.org>
2163
2164         * modules/mkdir (Depends-on): Add sys_stat, because sys_stat provides
2165         the portability of 'mkdir' to mingw systems.
2166
2167 2007-05-01  Bruno Haible  <bruno@clisp.org>
2168
2169         * doc/headers/google-ranking.txt: New file.
2170
2171 2007-04-30  Eric Blake  <ebb9@byu.net>
2172
2173         Prefer fseeko to fseek.
2174         * modules/getpass (Depends-on): Add fseeko.
2175         * lib/getpass.c (getpass): Use fseeko, not fseek.
2176
2177 2007-04-30  Sergey Poznyakoff  <gray@gnu.org.ua>
2178
2179         * lib/argp-help.c (hol_entry_cmp): Option sorting algorithm
2180         assumes the sorting is stable, while most qsort implementations
2181         are not.  Use argument addresses to ensure they never compare as
2182         equal.
2183
2184         * tests/test-argp-2.sh (usage-indent test): Fix output
2185         (func_compare): Restore diff options
2186         * tests/test-argp.c: Restore #include "progname.h"
2187
2188 2007-04-29  Bruno Haible  <bruno@clisp.org>
2189
2190         * m4/printf.m4 (gl_VSNPRINTF_ZEROSIZE_C99): New macro.
2191         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
2192         gl_VSNPRINTF_ZEROSIZE_C99. Test gl_cv_func_vsnprintf_zerosize_c99.
2193         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2194         * modules/snprintf-posix-tests (Files): Add tests/test-snprintf.c.
2195         (configure.ac): Define CHECK_SNPRINTF_POSIX.
2196         (TESTS, check_PROGRAMS): Add test-snprintf.
2197         * modules/vsnprintf-posix-tests (Files): Add tests/test-vsnprintf.c.
2198         (configure.ac): Define CHECK_VSNPRINTF_POSIX.
2199         (TESTS, check_PROGRAMS): Add test-vsnprintf.
2200         * tests/test-snprintf.c (main) [!CHECK_SNPRINTF_POSIX]: Disable
2201         assertions that fail on HP-UX, OSF/1, or IRIX.
2202         * tests/test-vsnprintf.c (main) [!CHECK_VSNPRINTF_POSIX]: Likewise.
2203
2204 2007-04-29  Bruno Haible  <bruno@clisp.org>
2205
2206         * MODULES.html.sh (posix_functions): Remove 'contents'.
2207
2208 2007-04-29  Karl Berry  <karl@gnu.org>
2209
2210         * config/srclist.txt (gendocs_template_min): new entry.
2211
2212 2007-04-29  Bruno Haible  <bruno@clisp.org>
2213
2214         Work around fpurge bug on BSD systems.
2215         * modules/fpurge (Makefile.am): Compile fpurge.c unconditionally.
2216         * m4/fpurge.m4 (gl_FUNC_FPURGE): Don't invoke AC_LIBOBJ.
2217         * lib/fpurge.h (fpurge): Don't handle __fpurge wrapper here. Define
2218         fpurge to rpl_fpurge if the system already has this function.
2219         * lib/fpurge.c (fpurge): Handle also the __fpurge wrapper case and
2220         the case where the system already has this function. Correct invariants
2221         on BSD systems.
2222         * lib/fseeko.c (rpl_fseeko): Update recognition of preceding fflush on
2223         BSD systems.
2224
2225 2007-04-29  Sergey Poznyakoff  <gray@gnu.org.ua>
2226
2227         * lib/argp-help.c (hol_cluster_cmp): Reverse comparison.  Change
2228         proposed by Sven Verdoolaege.
2229
2230         * tests/test-argp.c: Fix option ordering.  Test deeply clustered
2231         options.
2232         * tests/test-argp-2.sh (func_compare): Use diff instead of cmp.
2233         (usage and help tests): Update
2234
2235 2007-04-29  Bruno Haible  <bruno@clisp.org>
2236
2237         * tests/test-fflush.c (main): Use a file of size 17, not 10.
2238         Print more information in case of failure. Disable a test on BeOS.
2239
2240 2007-04-29  Bruno Haible  <bruno@clisp.org>
2241
2242         * tests/**/test-*.[hc] (ASSERT): Use fprintf to show the line number.
2243         This helps debugging on systems on which no gdb is available.
2244
2245 2007-04-29  Bruno Haible  <bruno@clisp.org>
2246
2247         * lib/freading.h: Improve comments.
2248         * lib/fwriting.h: Likewise.
2249         * tests/test-freading.c (main): Don't check freading immediately after
2250         repositioning. Needed for glibc.
2251
2252 2007-04-29  Bruno Haible  <bruno@clisp.org>
2253
2254         * lib/freading.c (freading): Trivial simplification.
2255
2256 2007-04-28  Bruno Haible  <bruno@clisp.org>
2257
2258         * tests/test-fwriting.c (main): Also test the interaction between
2259         fflush and fwriting.
2260         * modules/fwriting-tests (Depends-on): Add fflush.
2261
2262         * tests/test-freading.c (main): Also test the interaction between
2263         fflush and freading.
2264         * modules/freading-tests (Depends-on): Add fflush.
2265
2266 2007-04-28  Bruno Haible  <bruno@clisp.org>
2267
2268         * lib/stdio_.h (fseek, ftell): Provide link warnings suggesting to use
2269         fseeko and ftello.
2270         Suggested by Eric Blake.
2271
2272 2007-04-28  Jim Meyering  <jim@meyering.net>
2273
2274         Avoid false-negative in gl_STDINT_H's C99 conformance test.
2275         * m4/stdint.m4 (gl_STDINT_H): When checking whether stdint.h conforms
2276         to C99, include all of gl_STDINT_INCLUDES, not just <stddef.h>.
2277
2278 2007-04-27  Eric Blake  <ebb9@byu.net>
2279
2280         * doc/headers/assert.texi (assert.h): Document assert module use.
2281
2282 2007-04-27  Bruno Haible  <bruno@clisp.org>
2283
2284         * doc/headers/*.texi: New files.
2285         * doc/gnulib.texi (Header File Substitutes): New chapter.
2286         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Specify
2287         dependencies.
2288         (standards.info ,standards.html, standards.dvi): Update dependencies.
2289         (mostlyclean, clean): New targets.
2290
2291 2007-04-27  Bruno Haible  <bruno@clisp.org>
2292
2293         * lib/sysexits_.h: Renamed from lib/sysexit_.h.
2294         * modules/sysexits (Files, Makefile.am): Update.
2295
2296         * lib/sys_socket_.h: Renamed from lib/socket_.h.
2297         * modules/sys_socket (Files, Makefile.am): Update.
2298
2299         * lib/sys_stat_.h: Renamed from lib/stat_.h.
2300         * modules/sys_stat (Files, Makefile.am): Update.
2301
2302 2007-04-27  Eric Blake  <ebb9@byu.net>
2303
2304         * lib/freading.h: Improve comments.
2305         * lib/fwriting.h: Likewise.
2306         * lib/fflush.c: Likewise.
2307
2308         Fix closein for mingw.
2309         * modules/closein-tests: Add tests for closein.
2310         * tests/test-closein.c: New file.
2311         * tests/test-closein.sh: Likewise.
2312         * lib/unistd_.h [!SEEK_CUR]: Mingw also needs stdlib.h for _exit.
2313         * lib/closein.c (close_stdin): Don't fflush non-seekable streams.
2314
2315 2007-04-27  Bruno Haible  <bruno@clisp.org>
2316
2317         * lib/inttypes_.h [_DECC]: Don't use #include_next if the compiler
2318         version is < 6.
2319         * lib/math_.h [__DECC]: Likewise.
2320         * lib/stdio_.h [__DECC]: Likewise.
2321         * lib/stdlib_.h [__DECC]: Likewise.
2322         * lib/string_.h [__DECC]: Likewise.
2323         * lib/time_.h [__DECC]: Likewise.
2324         * lib/wchar_.h [__DECC]: Likewise.
2325         * lib/wctype_.h [__DECC]: Likewise.
2326
2327 2007-04-27  Bruno Haible  <bruno@clisp.org>
2328
2329         * tests/test-fbufmode.c (main): Relax test, to avoid failure on mingw.
2330
2331 2007-04-27  Bruno Haible  <bruno@clisp.org>
2332
2333         * lib/fflush.c: Add comments.
2334         * modules/fpurge-tests (Depends-on): Add fflush.
2335         * modules/freadable-tests (Depends-on): Likewise.
2336         * modules/fwritable-tests (Depends-on): Likewise.
2337
2338 2007-04-27  Charles Wilson  <libtool@cwilson.fastmail.fm>
2339
2340         * m4/argz.m4 (gl_FUNC_ARGZ): Use !HAVE_WORKING_ARGZ instead of
2341         SYSTEM_ARGZ_IS_BROKEN.  Also, minor stylistic improvements.
2342         Report by Bruno Haible <bruno@clisp.org>.
2343
2344 2007-04-26  Eric Blake  <ebb9@byu.net>
2345
2346         Fix fflush on mingw.
2347         * modules/fflush (Depends-on): Add freading.
2348         * lib/fflush.c (rpl_fflush): Use freading to avoid losing buffered
2349         but unread data.
2350
2351 2007-04-26  Eric Blake  <ebb9@byu.net>
2352         and Bruno Haible  <bruno@clisp.org>
2353
2354         Implement freading and fwriting.
2355         * lib/freading.c: New file.
2356         * lib/freading.h: Likewise.
2357         * m4/freading.m4: Likewise.
2358         * modules/freading: Likewise.
2359         * modules/freading-tests: Likewise.
2360         * tests/test-freading.c: Likewise.
2361         * lib/fwriting.c: New file.
2362         * lib/fwriting.h: Likewise.
2363         * m4/fwriting.m4: Likewise.
2364         * modules/fwriting: Likewise.
2365         * modules/fwriting-tests: Likewise.
2366         * tests/test-fwriting.c: Likewise.
2367         * MODULES.html.sh (File stream based Input/Output): Mention them.
2368
2369 2007-04-26  Bruno Haible  <bruno@clisp.org>
2370
2371         * lib/stdio_.h (fseeko, ftello): Check that off_t has the same size as
2372         'long' when we assume it.
2373         Suggested by Eric Blake.
2374
2375 2007-04-26  Bruno Haible  <bruno@clisp.org>
2376
2377         Ensure fseeko, ftello are declared on glibc systems.
2378         * modules/fflush (configure.ac-early): Require AC_FUNC_FSEEKO.
2379         * modules/fseeko (configure.ac-early): Likewise.
2380         * modules/ftello (configure.ac-early): Likewise.
2381         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Don't define HAVE_FSEEKO, rely on
2382         AC_FUNC_FSEEKO for this.
2383         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Inline gl_CHECK_FSEEKO.
2384         (gl_CHECK_FSEEKO): Remove macro.
2385
2386 2007-04-26  Bruno Haible  <bruno@clisp.org>
2387
2388         * tests/test-fflush.c (main): Also check the ftell result after
2389         fflush and fseek/fseeko.
2390         * lib/fflush.c (rpl_fflush): For BSD implementations, update the
2391         file descriptor position cache in the stream.
2392         * lib/fseeko.c (rpl_fseeko): Likewise.
2393
2394 2007-04-26  Bruno Haible  <bruno@clisp.org>
2395
2396         * modules/fflush-tests (Depends-on): Add fseeko.
2397
2398 2007-04-25  Charles Wilson  <libtool@cwilson.fastmail.fm>
2399             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2400
2401         * lib/argz_.h: ensure error_t definition is obtained in same
2402         mechanism system argz.h would have.
2403         * m4/argz.m4 (gl_FUNC_ARGZ): add new test to check if $host's
2404         argz facilities are known bad.  Err on the side of caution if
2405         cross-compiling.
2406
2407 2007-04-25  Eric Blake  <ebb9@byu.net>
2408
2409         * lib/fpurge.c (includes): Use stdlib.h for free.
2410         * tests/test-fflush.c (main): Also test fflush-fseeko.
2411
2412 2007-04-25  Bruno Haible  <bruno@clisp.org>
2413
2414         Make fflush+fseek POSIX-compliant on FreeBSD and MacOS X.
2415         * lib/fseeko.c: New file.
2416         * lib/stdio_.h: Include <sys/types.h> when off_t is needed.
2417         (fseeko, fseek): Define to replacements if REPLACE_FFLUSH.
2418         * m4/fseeko.m4 (gl_CHECK_FSEEKO): New macro, extracted from
2419         gl_FUNC_FSEEKO.
2420         (gl_FUNC_FSEEKO): Invoke it.
2421         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Arrange to compile fseeko.c. Invoke
2422         gl_CHECK_FSEEKO. Define HAVE_FSEEKO.
2423         * modules/fflush (Files): Add lib/fseeko.c, m4/fseeko.m4.
2424
2425 2007-04-25  Bruno Haible  <bruno@clisp.org>
2426
2427         * modules/fflush (Depends-on): Add ftello.
2428
2429 2007-04-25  Bruno Haible  <bruno@clisp.org>
2430
2431         * modules/ftello-tests: New file.
2432         * tests/test-ftello.c: New file.
2433
2434         * modules/ftello: New file.
2435         * m4/ftello.m4: New file.
2436         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELLO,
2437         HAVE_FTELLO.
2438         * lib/stdio_.h (ftello): New declaration.
2439         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELLO,
2440         HAVE_FTELLO.
2441
2442 2007-04-25  Bruno Haible  <bruno@clisp.org>
2443
2444         * modules/fseeko-tests: New file.
2445         * tests/test-fseeko.c: New file.
2446
2447         * modules/fseeko: New file.
2448         * m4/fseeko.m4: New file.
2449         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEKO,
2450         HAVE_FSEEKO.
2451         * lib/stdio_.h (fseeko): New declaration.
2452         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEKO,
2453         HAVE_FSEEKO.
2454
2455 2007-04-25  Bruno Haible  <bruno@clisp.org>
2456
2457         * lib/stdio_.h (fflush): Add support for GNULIB_POSIXCHECK.
2458
2459 2007-04-25  Bruno Haible  <bruno@clisp.org>
2460
2461         * lib/unistd_.h: Include <stdio.h> if needed to get the SEEK_* macros.
2462         * tests/test-stdio.c: Check that the various SEEK_* macros are defined.
2463         * tests/test-unistd.c: Likewise.
2464         * tests/test-fcntl.c: Likewise.
2465
2466 2007-04-23  Eric Blake  <ebb9@byu.net>
2467
2468         * lib/fflush.c: Fix missing include.
2469         Reported by Bruno Haible.
2470
2471 2007-04-23  Bruno Haible  <bruno@clisp.org>
2472
2473         * lib/fpurge.c (fpurge) [glibc, BSD]: Free a malloc()ed ungetc buffer.
2474         Reported by Eric Blake.
2475
2476 2007-04-23  Bruno Haible  <bruno@clisp.org>
2477
2478         * lib/fbufmode.c (fbufmode): Port to Solaris/SPARC64.
2479
2480 2007-04-23  Bruno Haible  <bruno@clisp.org>
2481
2482         * lib/fseterr.c (fseterr): Don't hardcode the value of _IOERR.
2483
2484 2007-04-23  Bruno Haible  <bruno@clisp.org>
2485
2486         * tests/test-fbufmode.c (main): Be prepared to a failure of setvbuf.
2487         Needed on HP-UX 11.
2488
2489 2007-04-16  Eric Blake  <ebb9@byu.net>
2490
2491         Make fflush rely on fpurge.
2492         * lib/fflush.c (rpl_fflush): Rely on fpurge module, rather than
2493         open coding all variants.
2494         * modules/fflush (Depends-on): Add fpurge and unistd.
2495         * modules/fflush-tests (Depends-on): Unistd is no longer extra.
2496         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Simplify.
2497
2498         Fix --with-tests compilation on cygwin.
2499         * modules/argmatch-tests (Makefile.am): List gnulib library first
2500         in LDADD.
2501         * modules/argp-tests (Makefile.am): Likewise.
2502         * modules/array-list-tests (Makefile.am): Likewise.
2503         * modules/array-oset-tests (Makefile.am): Likewise.
2504         * modules/avltree-list-tests (Makefile.am): Likewise.
2505         * modules/avltree-oset-tests (Makefile.am): Likewise.
2506         * modules/avltreehash-list-tests (Makefile.am): Likewise.
2507         * modules/carray-list-tests (Makefile.am): Likewise.
2508         * modules/dirname-tests (Makefile.am): Likewise.
2509         * modules/frexp-tests (Makefile.am): Likewise.
2510         * modules/isnanl-tests (Makefile.am): Likewise.
2511         * modules/linked-list-tests (Makefile.am): Likewise.
2512         * modules/linkedhash-list-tests (Makefile.am): Likewise.
2513         * modules/lock-tests (Makefile.am): Likewise.
2514         * modules/rbtree-list-tests (Makefile.am): Likewise.
2515         * modules/rbtree-oset-tests (Makefile.am): Likewise.
2516         * modules/rbtreehash-list-tests (Makefile.am): Likewise.
2517         * modules/tls-tests (Makefile.am): Likewise.
2518         * modules/tsearch-tests (Makefile.am): Likewise.
2519         * modules/xvasprintf-tests (Makefile.am): Likewise.
2520
2521         Fix fpurge for cygwin.
2522         * lib/fpurge.c (fpurge): Fix order of operation flub, and return a
2523         value.
2524         * modules/fpurge-tests (Depends-on): Clean up trash.
2525
2526 2007-04-16  Simon Josefsson  <simon@josefsson.org>
2527
2528         * lib/gc-libgcrypt.c (gc_hash_open): Shut up compiler warnings.
2529
2530         * m4/autobuild.m4: Re-indent.
2531
2532 2007-04-13  Bruno Haible  <bruno@clisp.org>
2533
2534         * modules/fpurge-tests: New file.
2535         * tests/test-fpurge.c: New file.
2536
2537         * modules/fpurge: New file.
2538         * lib/fpurge.h: New file.
2539         * lib/fpurge.c: New file.
2540         * m4/fpurge.m4: New file.
2541
2542 2007-04-13  Bruno Haible  <bruno@clisp.org>
2543
2544         * modules/fbufmode-tests: New file.
2545         * tests/test-fbufmode.c: New file.
2546
2547         * modules/fbufmode: New file.
2548         * lib/fbufmode.h: New file.
2549         * lib/fbufmode.c: New file.
2550         * m4/fbufmode.m4: New file.
2551
2552 2007-04-13  Bruno Haible  <bruno@clisp.org>
2553
2554         * modules/fwritable-tests: New file.
2555         * tests/test-fwritable.c: New file.
2556
2557         * modules/fwritable: New file.
2558         * lib/fwritable.h: New file.
2559         * lib/fwritable.c: New file.
2560         * m4/fwritable.m4: New file.
2561
2562 2007-04-13  Bruno Haible  <bruno@clisp.org>
2563
2564         * modules/freadable-tests: New file.
2565         * tests/test-freadable.c: New file.
2566
2567         * modules/freadable: New file.
2568         * lib/freadable.h: New file.
2569         * lib/freadable.c: New file.
2570         * m4/freadable.m4: New file.
2571
2572 2007-04-13  Bruno Haible  <bruno@clisp.org>
2573
2574         * modules/fflush-tests (Makefile.am): Remove EXTRA_DIST. Augment
2575         MOSTLYCLEANFILES.
2576
2577 2007-04-13  Paul Eggert  <eggert@cs.ucla.edu>
2578
2579         * build-aux/bootstrap (gnulib_tool_option_extras): New var, used by
2580         gzip bootstrap.conf to avoid dragging in i18n machinery.
2581         (gnulib_tool_option): Use it.
2582
2583 2007-04-13  Bruno Haible  <bruno@clisp.org>
2584
2585         * tests/test-vasnprintf-posix.c (test_function): Add tests for %f and
2586         %F directives.
2587         * tests/test-vasprintf-posix.c (test_function): Likewise.
2588         * tests/test-snprintf-posix.h (test_function): Likewise.
2589         * tests/test-sprintf-posix.h (test_function): Likewise.
2590         * tests/test-fprintf-posix.h (test_function): Likewise.
2591         * tests/test-printf-posix.h (test_function): Likewise.
2592         * tests/test-fprintf-posix.out: Likewise.
2593
2594 2007-04-13  Bruno Haible  <bruno@clisp.org>
2595
2596         * modules/lock-tests (configure.ac): For LIBSCHED, try also -lposix4.
2597         * modules/tls-tests (configure.ac): Likewise.
2598         Reported by Arto C. Nirkko <anirkko@insel.ch>.
2599
2600 2007-04-13  Bruno Haible  <bruno@clisp.org>
2601
2602         * lib/tls.c (glthread_tls_get): Fix return type.
2603         Patch by Arto C. Nirkko <anirkko@insel.ch>.
2604
2605 2007-04-12  Eric Blake  <ebb9@byu.net>
2606
2607         * modules/gettime (Depends-on): Remove gettime.
2608         Reported by Dmitry V. Levin.
2609
2610 2007-04-12  Bruno Haible  <bruno@clisp.org>
2611
2612         * modules/fflush (Include): Mention <stdio.h>.
2613         * modules/strtoimax (Include): Mention <inttypes.h>.
2614         * modules/strtoumax (Include): Likewise.
2615
2616 2007-04-12  Eric Blake  <ebb9@byu.net>
2617
2618         * .cvsignore: New file.
2619         * .gitignore: Likewise.
2620
2621 2007-04-12  Bruno Haible  <bruno@clisp.org>
2622
2623         * modules/iconv-tests (test_iconv_LDADD): Mention -liconv after LDADD,
2624         not before, since $(LDADD) often contains libgnu.a.
2625         * modules/striconv-tests (test_striconv_LDADD): Likewise.
2626         * modules/striconveh-tests (test_striconveh_LDADD): Likewise.
2627         * modules/striconveha-tests (test_striconveha_LDADD): Likewise.
2628         Needed on Cygwin.
2629
2630 2007-04-12  Eric Blake  <ebb9@byu.net>
2631
2632         Work around glibc's failure to flush stdin on fclose.
2633         * lib/closein.c (close_stdin): Flush stdin before closing.
2634
2635         Work around glibc's failure to reset seekable stdin on exit.
2636         * modules/closein: New module.
2637         * lib/closein.c: New file.
2638         * lib/closein.h: Likewise.
2639         * m4/closein.m4: Likewise.
2640         * MODULES.html.sh (File stream based Input/Output): Document it.
2641
2642 2007-04-12  Simon Josefsson  <simon@josefsson.org>
2643
2644         * gnulib-tool: Rename generated 'autobuild' script to
2645         'do-autobuild' in --create-megatestdir output.
2646
2647         * doc/gnulib.texi (Build robot for gnulib): Fix.
2648
2649 2007-04-12  Simon Josefsson  <simon@josefsson.org>
2650
2651         * modules/sysexits (Depends-on): Add absolute-header.
2652
2653 2007-04-12  Eric Blake  <ebb9@byu.net>
2654
2655         No need to preserve errno on success.
2656         * lib/fflush.c (rpl_fflush): Simplify errno tracking.
2657         Reported by Bruno Haible.
2658
2659 2007-04-12  Simon Josefsson  <simon@josefsson.org>
2660
2661         * MODULES.html.sh (Support for maintaining and releasing
2662         projects): Add autobuild.  Suggested by Eric Blake <ebb9@byu.net>.
2663
2664 2007-04-12  Simon Josefsson  <simon@josefsson.org>
2665
2666         * gnulib-tool (func_modules_add_dummy): Respect --avoid=dummy.
2667
2668 2007-04-12  Simon Josefsson  <simon@josefsson.org>
2669
2670         * modules/autobuild: New module.
2671
2672         * m4/autobuild.m4: New file.
2673
2674 2007-04-11  Bruno Haible  <bruno@clisp.org>
2675
2676         * lib/vasnprintf.c (VASNPRINTF): Implement the %F directive using the
2677         %f directive, if NEED_PRINTF_DIRECTIVE_F is defined.
2678         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_F): New macro.
2679         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_F): New macro.
2680         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
2681         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2682         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2683         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
2684         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2685         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2686         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Invoke
2687         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2688         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2689         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Invoke
2690         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2691         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2692         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Invoke
2693         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2694         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2695         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Invoke
2696         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2697         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2698         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Invoke
2699         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2700         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2701         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Invoke
2702         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2703         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2704         Reported by Eric Blake.
2705
2706 2007-04-11  Bruno Haible  <bruno@clisp.org>
2707
2708         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Fix test. It always failed.
2709
2710 2007-04-10  Bruno Haible  <bruno@clisp.org>
2711
2712         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct result
2713         for NaN and Infinity. Needed on FreeBSD 6.1.
2714         * tests/test-vasnprintf-posix.c (test_function): Undo last change
2715         regarding results for "%010a" of Infinity and NaN.
2716         * tests/test-vasprintf-posix.c (test_function): Likewise.
2717         * tests/test-snprintf-posix.h (test_function): Likewise.
2718         * tests/test-sprintf-posix.h (test_function): Likewise.
2719         * tests/test-fprintf-posix.h (test_function): Likewise.
2720         * tests/test-printf-posix.h (test_function): Likewise.
2721         * tests/test-fprintf-posix.out: Likewise.
2722
2723 2007-04-10  Bruno Haible  <bruno@clisp.org>
2724
2725         * modules/locale-tests: New file.
2726         * tests/test-locale.c: New file.
2727
2728         * modules/locale: New file.
2729         * lib/locale_.h: New file.
2730         * m4/locale_h.m4: New file.
2731
2732 2007-04-10  Paul Eggert  <eggert@cs.ucla.edu>
2733             Bruno Haible  <bruno@clisp.org>
2734
2735         * m4/signbit.m4 (gl_SIGNBIT): When the sign bit position could not
2736         be determined, test for availability of the copysignf, copysign,
2737         copysignl functions.
2738         * lib/signbitf.c (gl_signbitf): Use copysignf if available in libc.
2739         * lib/signbitd.c (gl_signbitd): Use copysign if available in libc.
2740         * lib/signbitl.c (gl_signbitl): Use copysignl if available in libc.
2741
2742 2007-04-09  Eric Blake  <ebb9@byu.net>
2743
2744         * lib/stdio_.h [REPLACE_FFLUSH]: Declare rpl_fflush.
2745         * modules/stdio (Makefile.am): Support fflush.
2746         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
2747         * modules/fflush: New file.
2748         * lib/fflush.c: Likewise.
2749         * m4/fflush.m4: Likewise.
2750         * modules/fflush-tests: New test.
2751         * tests/test-fflush.c: Likewise.
2752         * MODULES.html.sh (Input/output <stdio.h>): Document new module.
2753
2754 2007-04-06  Bruno Haible  <bruno@clisp.org>
2755
2756         * lib/vasnprintf.c: Include <math.h>. Don't include float+.h.
2757         (VASNPRINTF): Use signbit for faster determination whether to print a
2758         minus sign.
2759         * modules/vasnprintf (Files): Remove lib/float+.h.
2760         * modules/fprintf-posix (Depends-on): Add signbit.
2761         * modules/snprintf-posix (Depends-on): Likewise.
2762         * modules/sprintf-posix (Depends-on): Likewise.
2763         * modules/vasnprintf-posix (Depends-on): Likewise.
2764         * modules/vasprintf-posix (Depends-on): Likewise.
2765         * modules/vfprintf-posix (Depends-on): Likewise.
2766         * modules/vsnprintf-posix (Depends-on): Likewise.
2767         * modules/vsprintf-posix (Depends-on): Likewise.
2768
2769 2007-04-06  Bruno Haible  <bruno@clisp.org>
2770
2771         * tests/test-frexp.c (main): Test also the sign bit of zero results.
2772         * tests/test-frexpl.c (main): Likewise.
2773         * tests/test-ldexpl.c (main): Likewise.
2774         * modules/frexp-tests (Depends-on): Add signbit.
2775         * modules/frexpl-tests (Depdends-on): Likewise.
2776         * modules/ldexpl-tests (Depdends-on): Likewise.
2777
2778 2007-04-06  Bruno Haible  <bruno@clisp.org>
2779
2780         * modules/signbit-tests: New file.
2781         * tests/test-signbit.c: New file.
2782
2783         * modules/signbit: New file.
2784         * lib/signbitf.c: New file.
2785         * lib/signbitd.c: New file.
2786         * lib/signbitl.c: New file.
2787         * m4/signbit.m4: New file.
2788         * lib/math_.h (gl_signbitf, gl_signbitd, gl_signbitl): New declarations.
2789         (signbit): New macro.
2790         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_SIGNBIT and
2791         REPLACE_SIGNBIT.
2792         * modules/math (Makefile.am) Substibute also GNULIB_SIGNBIT and
2793         REPLACE_FREXPL into math.h.
2794
2795 2007-04-06  Bruno Haible  <bruno@clisp.org>
2796
2797         * modules/isnanf-nolibm-tests: New file.
2798         * tests/test-isnanf.c: New file.
2799
2800         * modules/isnanf-nolibm: New file.
2801         * lib/isnanf.h: New file.
2802         * lib/isnanf.c: New file.
2803         * lib/isnan.c: Consider the USE_FLOAT macro.
2804         * m4/isnanf.m4: New file.
2805
2806 2007-04-06  Bruno Haible  <bruno@clisp.org>
2807
2808         * modules/gettext-h (configure.ac): AC_SUBST LIBINTL and LTLIBINTL.
2809         (Link): New section.
2810
2811         * modules/canonicalize-lgpl-tests (Makefile.am): Undo last change.
2812
2813 2007-04-06  Bruno Haible  <bruno@clisp.org>
2814
2815         Assume the 'long double' type.
2816         * m4/longdouble.m4: Remove file.
2817         * config/srclist.txt: Don't mention longdouble.m4.
2818         * lib/allocsa.h: Assume HAVE_LONG_DOUBLE to be true.
2819         * lib/float+.h: Likewise.
2820         * lib/frexp.c: Likewise.
2821         * lib/printf-args.h: Likewise.
2822         * lib/printf-args.c: Likewise.
2823         * lib/printf-frexp.c: Likewise.
2824         * lib/printf-parse.c: Likewise.
2825         * lib/vasnprintf.c: Likewise.
2826         * m4/allocsa.m4: Remove gt_TYPE_LONGDOUBLE invocation.
2827         * m4/intl.m4: Likewise.
2828         * m4/isnanl.m4: Likewise.
2829         * m4/printf.m4: Likewise.
2830         * m4/printf-frexpl.m4: Likewise.
2831         * m4/vasnprintf.m4: Likewise.
2832         * modules/allocsa (Files): Remove m4/longdouble.m4.
2833         * modules/gettext (Files): Likewise.
2834         * modules/relocatable-prog-wrapper (Files): Likewise.
2835         * modules/vasnprintf (Files): Likewise.
2836         * modules/isnanl (Files): Likewise.
2837         (Include): Simplify.
2838         * modules/isnanl-nolibm (Files): Remove m4/longdouble.m4.
2839         (Include): Simplify.
2840         * modules/printf-frexpl (Files): Remove m4/longdouble.m4.
2841         (Include): Simplify.
2842         * modules/snprintf-posix-tests (Files): Remove m4/longdouble.m4.
2843         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2844         * modules/sprintf-posix-tests (Files): Remove m4/longdouble.m4.
2845         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2846         * modules/vasnprintf-posix-tests (Files): Remove m4/longdouble.m4.
2847         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2848         * modules/vasprintf-posix-tests (Files): Remove m4/longdouble.m4.
2849         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2850         * modules/vsnprintf-posix-tests (Files): Remove m4/longdouble.m4.
2851         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2852         * modules/vsprintf-posix-tests (Files): Remove m4/longdouble.m4.
2853         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2854         * tests/test-isnanl-nolibm.c: Assume HAVE_LONG_DOUBLE to be true.
2855         * tests/test-isnanl.c: Likewise.
2856         * tests/test-snprintf-posix.h: Likewise.
2857         * tests/test-sprintf-posix.h: Likewise.
2858         * tests/test-vasnprintf-posix.c: Likewise.
2859         * tests/test-vasnprintf-posix2.c: Likewise.
2860         * tests/test-vasprintf-posix.c: Likewise.
2861
2862 2007-04-06  Bruno Haible  <bruno@clisp.org>
2863
2864         Fix problem with Compaq (ex-DEC) Desktop C compiler on Tru64.
2865         * lib/math_.h [__DECC]: Include the overridden include file through
2866         #include_next, outside the double-inclusion guard.
2867         * lib/stdio_.h [__DECC]: Likewise.
2868         * lib/stdlib_.h [__DECC]: Likewise.
2869         * lib/string_.h [__DECC]: Likewise.
2870         * lib/time_.h [__DECC]: Likewise.
2871         * lib/wchar_.h [__DECC]: Likewise.
2872         * lib/wctype_.h [__DECC]: Likewise.
2873         * lib/inttypes_.h [__DECC]: Likewise.
2874         Reported by Albert Chin <china@thewrittenword.com> in
2875         <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00088.html>.
2876
2877 2007-04-04  Eric Blake  <ebb9@byu.net>
2878
2879         * m4/stdint.m4 (gl_STDINT_H): Detect WINT_MAX bug in cygwin
2880         1.5.x.
2881
2882 2007-04-04  Bruno Haible  <bruno@clisp.org>
2883
2884         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct
2885         rounding. Don't assume that FreeBSD 6 and NetBSD 4 pass this test.
2886
2887 2007-04-04  Bruno Haible  <bruno@clisp.org>
2888
2889         * tests/test-vasnprintf-posix.c (test_function): Allow two possible
2890         results for "%010a" of Infinity and NaN.
2891         * tests/test-vasprintf-posix.c (test_function): Likewise.
2892         * tests/test-snprintf-posix.h (test_function): Likewise.
2893         * tests/test-sprintf-posix.h (test_function): Likewise.
2894         * tests/test-fprintf-posix.h (test_function): Remove these tests.
2895         * tests/test-printf-posix.h (test_function): Likewise.
2896         * tests/test-fprintf-posix.out: Update.
2897         Needed for FreeBSD 6.1.
2898
2899 2007-04-04  Bruno Haible  <bruno@clisp.org>
2900
2901         * DEPENDENCIES: Remove mentions of tar and gzip, since they are not
2902         directly used by the gnulib modules nor by gnulib-tool.
2903
2904 2007-04-04  Paul Eggert  <eggert@cs.ucla.edu>
2905
2906         * DEPENDENCIES: Give overall description of version dependency
2907         desirability.  Use more-typical names for apps.
2908         Add shell, coreutils, diffutils, grep, tar, gzip.
2909
2910 2007-04-04  Simon Josefsson  <simon@josefsson.org>
2911
2912         * MODULES.html.sh: Rename crypto modules.  Remove iconvme.
2913
2914 2007-04-04  Karl Berry  <karl@gnu.org>
2915
2916         * MODULES.html.sh (func_module): missing '.
2917
2918 2007-04-03  Bruno Haible  <bruno@clisp.org>
2919
2920         * modules/argmatch-tests (Makefile.am): New variable
2921         test_argmatch_LDADD.
2922         * modules/argp-tests (Makefile.am): New variable test_argp_LDADD.
2923         * modules/array-list-tests (Makefile.am): New variable
2924         test_array_list_LDADD.
2925         * modules/array-oset-tests (Makefile.am): New variable
2926         test_array_oset_LDADD.
2927         * modules/avltree-list-tests (Makefile.am): New variable
2928         test_avltree_list_LDADD.
2929         * modules/avltree-oset-tests (Makefile.am): New variable
2930         test_avltree_oset_LDADD.
2931         * modules/avltreehash-list-tests (Makefile.am): New variable
2932         test_avltreehash_list_LDADD.
2933         * modules/canonicalize-lgpl-tests (Makefile.am): New variable
2934         test_canonicalize_lgpl_LDADD.
2935         * modules/carray-list-tests (Makefile.am): New variable
2936         test_carray_list_LDADD.
2937         * modules/dirname-tests (Makefile.am): New variable
2938         test_dirname_LDADD.
2939         * modules/linked-list-tests (Makefile.am): New variable
2940         test_linked_list_LDADD.
2941         * modules/linkedhash-list-tests (Makefile.am): New variable
2942         test_linkedhash_list_LDADD.
2943         * modules/rbtree-list-tests (Makefile.am): New variable
2944         test_rbtree_list_LDADD.
2945         * modules/rbtree-oset-tests (Makefile.am): New variable
2946         test_rbtree_oset_LDADD.
2947         * modules/rbtreehash-list-tests (Makefile.am): New variable
2948         test_rbtreehash_list_LDADD.
2949         * modules/xvasprintf-tests (Makefile.am): New variable
2950         test_xvasprintf_LDADD.
2951         Reported by Eric Blake.
2952
2953 2007-04-03  Eric Blake  <ebb9@byu.net>
2954
2955         * DEPENDENCIES: Weaken m4 requirements.
2956
2957 2007-04-03  Bruno Haible  <bruno@clisp.org>
2958
2959         * modules/frexp-tests (configure.ac): Remove AC_SUBST.
2960         * modules/isnanl-tests (configure.ac): Likewise.
2961
2962 2007-04-03  Ben Pfaff  <blp@gnu.org>
2963
2964         * modules/iconv_open: Add $(srcdir)/ to source directory
2965         references in Makefile fragments that call gperf, to fix VPATH
2966         builds.
2967
2968 2007-04-03  Bruno Haible  <bruno@clisp.org>
2969
2970         * modules/ldexpl (Depends-on): Add isnanl, remove isnanl-nolibm.
2971         * lib/ldexpl.c: Undo last change.
2972
2973 2007-04-03  Bruno Haible  <bruno@clisp.org>
2974
2975         * modules/printf-frexpl (Depends-on): Undo last change.
2976         (Files): Add m4/ldexpl.m4.
2977
2978 2007-04-03  Bruno Haible  <bruno@clisp.org>
2979
2980         * m4/isnanl.m4 (gl_FUNC_ISNANL): Substitute ISNANL_LIBM.
2981         * modules/isnanl (Link): New section.
2982
2983         * m4/frexp.m4 (gl_FUNC_FREXP): Substitute FREXP_LIBM.
2984         * modules/frexp (Link): New section.
2985
2986         * m4/frexpl.m4 (gl_FUNC_FREXPL): Substitute FREXPL_LIBM.
2987         * modules/frexpl (Link): New section.
2988
2989         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Substitute LDEXPL_LIBM.
2990         * modules/ldexpl (Link): New section.
2991
2992 2007-04-03  Bruno Haible  <bruno@clisp.org>
2993
2994         * modules/TEMPLATE-EXTENDED: New file.
2995         * gnulib-tool (func_all_modules, func_verify_module): Exclude it.
2996
2997 2007-04-03  Bruno Haible  <bruno@clisp.org>
2998
2999         * DEPENDENCIES: New file.
3000         Suggested by Simon Josefsson.
3001
3002 2007-04-03  Bruno Haible  <bruno@clisp.org>
3003
3004         * doc/gnulib.texi: Escape @.
3005
3006 2007-04-03  James Youngman  <jay@gnu.org>
3007         and Paul Eggert  <eggert@cs.ucla.edu>
3008
3009         * lib/stat-time.h (get_stat_birthtime): Check for zero-valued
3010         birthtime on all systems that have birthtime, not just those which
3011         use st_birthtimensec rather than st_birthtim.  Putting zero in
3012         st_birthtim.tv_sec is how (for example) FreeBSD/x86 6.1 indicates
3013         that the birth time is not available for files on an NFS mount.
3014
3015 2007-04-03  Simon Josefsson  <simon@josefsson.org>
3016
3017         * modules/memxor: Move back from crypto/, suggested by Bruno.
3018         * modules/crypto/hmac-sha1: Fix memxor dependency.
3019
3020         * modules/crypto/gc: Moved from ../.
3021
3022 2007-04-02  Eric Blake  <ebb9@byu.net>
3023
3024         * lib/ldexpl.c (includes): Avoid libm.
3025
3026         * modules/printf-frexpl (Depends-on): Depend on ldexpl.
3027
3028 2007-04-02  Bruno Haible  <bruno@clisp.org>
3029
3030         * lib/sysexit_.h (EX_OK): Disable the EX_OK definition from <unistd.h>
3031         on IRIX.
3032
3033 2007-04-02  Bruno Haible  <bruno@clisp.org>
3034
3035         * m4/intdiv0.m4 (gt_INTDIV0): Avoid performing the test for real on
3036         x86 or x86_64 platforms running MacOS X.
3037         Reported by Ryan Schmidt <@ryandesign.com>.
3038
3039 2007-04-02  Bruno Haible  <bruno@clisp.org>
3040
3041         * m4/intdiv0.m4 (gt_INTDIV0): When cross-compiling, treat x86_64 like
3042         i386.
3043
3044 2007-04-01  Simon Josefsson  <simon@josefsson.org>
3045
3046         * modules/crypto/arcfour: Moved from ../.
3047         * modules/crypto/arcfour-tests: Moved from ../.
3048         * modules/crypto/arctwo: Moved from ../.
3049         * modules/crypto/arctwo-tests: Moved from ../.
3050         * modules/crypto/des: Moved from ../.
3051         * modules/crypto/des-tests: Moved from ../.
3052         * modules/crypto/gc-arcfour: Moved from ../.
3053         * modules/crypto/gc-arcfour-tests: Moved from ../.
3054         * modules/crypto/gc-arctwo: Moved from ../.
3055         * modules/crypto/gc-arctwo-tests: Moved from ../.
3056         * modules/crypto/gc-des: Moved from ../.
3057         * modules/crypto/gc-des-tests: Moved from ../.
3058         * modules/crypto/gc-hmac-md5: Moved from ../.
3059         * modules/crypto/gc-hmac-md5-tests: Moved from ../.
3060         * modules/crypto/gc-hmac-sha1: Moved from ../.
3061         * modules/crypto/gc-hmac-sha1-tests: Moved from ../.
3062         * modules/crypto/gc-md2: Moved from ../.
3063         * modules/crypto/gc-md2-tests: Moved from ../.
3064         * modules/crypto/gc-md4: Moved from ../.
3065         * modules/crypto/gc-md4-tests: Moved from ../.
3066         * modules/crypto/gc-md5: Moved from ../.
3067         * modules/crypto/gc-md5-tests: Moved from ../.
3068         * modules/crypto/gc-pbkdf2-sha1: Moved from ../.
3069         * modules/crypto/gc-pbkdf2-sha1-tests: Moved from ../.
3070         * modules/crypto/gc-random: Moved from ../.
3071         * modules/crypto/gc-rijndael: Moved from ../.
3072         * modules/crypto/gc-rijndael-tests: Moved from ../.
3073         * modules/crypto/gc-sha1: Moved from ../.
3074         * modules/crypto/gc-sha1-tests: Moved from ../.
3075         * modules/crypto/gc-tests: Moved from ../.
3076         * modules/crypto/hmac-md5: Moved from ../.
3077         * modules/crypto/hmac-md5-tests: Moved from ../.
3078         * modules/crypto/hmac-sha1: Moved from ../.
3079         * modules/crypto/hmac-sha1-tests: Moved from ../.
3080         * modules/crypto/md2: Moved from ../.
3081         * modules/crypto/md2-tests: Moved from ../.
3082         * modules/crypto/md4: Moved from ../.
3083         * modules/crypto/md4-tests: Moved from ../.
3084         * modules/crypto/md5: Moved from ../.
3085         * modules/crypto/md5-tests: Moved from ../.
3086         * modules/crypto/memxor: Moved from ../.
3087         * modules/crypto/rijndael: Moved from ../.
3088         * modules/crypto/rijndael-tests: Moved from ../.
3089         * modules/crypto/sha1: Moved from ../.
3090
3091 2007-03-30  James Youngman  <jay@gnu.org>
3092
3093         * tests/test-stat-time.c (prepare_test): use chmod() rather than
3094         rename() to change the ctime of a file (because ctime is unaffected
3095         by rename on jfs2 on AIX 5.1).
3096         (main): Start by doing cleanup, in case a previous run failed leaving
3097         test files behind.
3098
3099 2007-03-31  Bruno Haible  <bruno@clisp.org>
3100
3101         Support old proprietary implementations of iconv.
3102         * modules/iconv_open: New file.
3103         * lib/iconv_.h: New file.
3104         * m4/iconv_h.m4: New file.
3105         * lib/iconv_open.c: New file.
3106         * lib/iconv_open-aix.gperf: New file.
3107         * lib/iconv_open-hpux.gperf: New file.
3108         * lib/iconv_open-irix.gperf: New file.
3109         * lib/iconv_open-osf.gperf: New file.
3110         * m4/iconv_open.m4: New file.
3111         * modules/linebreak (Depends-on): Add iconv_open.
3112         * modules/striconv (Depends-on): Likewise.
3113         * modules/striconveh (Depends-on): Likewise.
3114         * modules/unicodeio (Depends-on): Likewise.
3115         * lib/striconveh.h (mem_cd_iconveh, str_cd_iconveh): Allow cd to be
3116         (iconv_t)(-1).
3117         * lib/striconveh.c (mem_cd_iconveh_internal): Use an indirect
3118         conversion if cd is (iconv_t)(-1).
3119         (mem_iconveh, str_iconveh): Don't fail just because a direct conversion
3120         is not possible.
3121
3122 2007-03-31  Bruno Haible  <bruno@clisp.org>
3123
3124         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
3125         work on Solaris either. Protect also second use of "autodetect_jp".
3126
3127 2007-03-31  Bruno Haible  <bruno@clisp.org>
3128
3129         * m4/frexpl.m4 (gl_FUNC_FREXPL): Set HAVE_DECL_FREXPL to 0 when
3130         the function is not present.
3131
3132 2007-03-31  Bruno Haible  <bruno@clisp.org>
3133
3134         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Set HAVE_DECL_LDEXPL to 0 when
3135         the function is not present.
3136
3137 2007-03-31  Bruno Haible  <bruno@clisp.org>
3138
3139         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-29 patch. Test also against
3140         a bug in HP-UX iconv_open().
3141
3142 2007-03-31  Bruno Haible  <bruno@clisp.org>
3143
3144         * MODULES.html.sh (func_module): Don't show gnulib-common.m4.
3145         (Mathematics <math.h>): New section, add fpieee.
3146         (Input/output <stdio.h>): Add fseterr.
3147         (Mathematics <math.h>): New section, add printf-frexp.
3148         (Container data structures): Add sublist.
3149         (Core language properties): Add fpucw, inline.
3150         (Functions for greatest-width integer types <inttypes.h>): Add
3151         imaxabs, imaxdiv, inttypes.
3152         (Mathematics <math.h>): Add frexp, frexpl, isnan-nolibm, isnanl,
3153         isnanl-nolibm, ldexp.
3154         (Mathematics <math.h>): New section, add printf-frexpl.
3155         (Support for systems lacking POSIX:2001): Add fprintf-posix,
3156         printf-posix, snprintf-posix, sprintf-posix, string, search, socklen,
3157         sys_select, sys_socket, vasnprintf-posix, vasprintf-posix,
3158         vfprintf-posix, vprintf-posix, vsnprintf-posix, vsprintf-posix.
3159         (Unicode string functions): Add unistr/u*-mbtoucr.
3160         (Java): Add javacomp-script, javaexec-script.
3161         (C#): Add csharpcomp-script, csharpexec-script.
3162         (Support for building libraries and executables): Add havelib,
3163         relocatable-*.
3164         (Support for maintaining and releasing projects): Renamed from
3165         'Support for maintaining and release projects'. Add announce-gen.
3166
3167 2007-03-31  Bruno Haible  <bruno@clisp.org>
3168
3169         * README: Talk primarily about git.
3170         (git and CVS): Renamed from CVS.
3171         * doc/gnulib.texi (Introduction, Build robot for gnulib): Mention that
3172         gnulib is available through git.
3173         * doc/gnulib-tool.texi (CVS Issues): Mention git and svn as well.
3174
3175 2007-03-30  Bruno Haible  <bruno@clisp.org>
3176
3177         * lib/alloca_.h: Change prefix of double-inclusion guard macro to _GL_.
3178         * lib/poll_.h: Likewise.
3179         * lib/stat_.h: Likewise.
3180         * lib/sys_time_.h: Likewise.
3181         * lib/sysexit_.h: Likewise.
3182         * lib/glob_.h: Prefix double-inclusion guard macro with _GL_.
3183         * lib/stdbool_.h: Likewise.
3184         * lib/byteswap_.h: Add double-inclusion guard.
3185
3186 2007-03-30  Sergey Poznyakoff  <gray@mirddin.farlep.net>
3187
3188         * lib/sysexit_.h: Prefix double-inclusion guard macro with _GNULIB.
3189
3190 2007-03-30  Karl Berry  <karl@gnu.org>
3191
3192         * config/srclist-update: double space after USA in the license
3193         substitution, since that's how it's usually (?) written.
3194
3195 2007-03-30  Paul Eggert  <eggert@cs.ucla.edu>
3196
3197         * lib/write-any-file.c (can_write_any_file): Fix else-else bug
3198         reported by Bruno Haible.
3199
3200 2007-03-29  Bruno Haible  <bruno@clisp.org>
3201
3202         * m4/iconv.m4 (AM_ICONV_LINK): Require AC_CANONICAL_HOST. Test against
3203         a bug in AIX iconv().
3204
3205 2007-03-29  Bruno Haible  <bruno@clisp.org>
3206
3207         * modules/ldexpl-tests: New file.
3208         * tests/test-ldexpl.c: New file.
3209
3210 2007-03-29  Bruno Haible  <bruno@clisp.org>
3211
3212         * lib/ldexpl.c: Include fpucw.h.
3213         (ldexpl): Use BEGIN/END_LONG_DOUBLE_ROUNDING. Skip the last unneeded
3214         multiplication.
3215         * modules/ldexpl (Depends-on): Add fpucw.
3216
3217 2007-03-29  Bruno Haible  <bruno@clisp.org>
3218
3219         * modules/ldexpl: New file.
3220         * m4/ldexpl.m4: New file.
3221         * lib/math_.h (ldexpl): Define to a replacement if REPLACE_LDEXPL is
3222         set.
3223         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize also GNULIB_LDEXPL,
3224         REPLACE_LDEXPL.
3225         * modules/math (Makefile.am): Substitute also GNULIB_LDEXPL,
3226         REPLACE_LDEXPL.
3227         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
3228         gl_FUNC_LDEXPL_WORKS.
3229         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Remove test for ldexpl.
3230         * modules/mathl (Files): Remove lib/ldexpl.c.
3231         (Depends-on): Add ldexpl.
3232
3233 2007-03-29  Bruno Haible  <bruno@clisp.org>
3234
3235         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Declare frexpl.
3236
3237 2007-03-29  Bruno Haible  <bruno@clisp.org>
3238
3239         * tests/test-striconveh.c (main): Don't assume that a direct conversion
3240         between ISO-8859-1 and ISO-8859-2 is possible. Needed for OSF/1, IRIX
3241         and possibly also HP-UX.
3242         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
3243         work on AIX, IRIX, HP-UX, OSF/1.
3244         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
3245         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
3246         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
3247         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
3248         * tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
3249         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
3250
3251 2007-03-29  Bruno Haible  <bruno@clisp.org>
3252
3253         * tests/test-stat-time.c: Include <fcntl.h>, not <sys/fcntl.h>.
3254
3255 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
3256
3257         * lib/acl-internal.h (acl_get_fd, acl_set_fd): undef before defining,
3258         to work around a problem on OSF/1 5.1 reported by Bruno Haible.
3259
3260 2007-03-29  Eric Blake  <ebb9@byu.net>
3261
3262         * lib/acl-internal.h: Remove redundant include.
3263         (ACL_NOT_WELL_SUPPORTED): Also filter on EBUSY, returned by
3264         Cygwin when a file is locked.
3265
3266 2007-03-29  Bruno Haible  <bruno@clisp.org>
3267
3268         * lib/vasprintf.c [IN_LIBASPRINTF]: Include different specification
3269         file.
3270         * lib/asprintf.c [IN_LIBASPRINTF]: Likewise.
3271
3272 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
3273
3274         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Don't bother to
3275         try to remove a parent directory if the child couldn't be removed
3276         (except for the first rmdir, which could fail because the child
3277         doesn't exist).  Problem reported by Jeff Blaine in
3278         <http://lists.gnu.org/archive/html/bug-tar/2007-03/msg00014.html>.
3279
3280 2007-03-28  Bruno Haible  <bruno@clisp.org>
3281
3282         * lib/striconveh.c (utf8conv_carefully): New function.
3283         (mem_cd_iconveh_internal): Invoke it.
3284
3285 2007-03-28  Bruno Haible  <bruno@clisp.org>
3286
3287         * lib/striconveh.c (mem_cd_iconveh_internal): Use u8_mbtoucr instead
3288         of u8_mbtouc in order to distinguish invalid and incomplete UTF-8
3289         input.
3290         * modules/striconveh (Depends-on): Add unistr/u8-mbtoucr. Replace
3291         utf8-ucs4 with unistr/u8-mbtouc. Replace ucs4-utf8 with
3292         unistr/u8-uctomb.
3293
3294 2007-03-28  Bruno Haible  <bruno@clisp.org>
3295
3296         * modules/unistr/u8-mbtoucr: New file.
3297         * lib/unistr/u8-mbtoucr.c: New file.
3298         * modules/unistr/u16-mbtoucr: New file.
3299         * lib/unistr/u16-mbtoucr.c: New file.
3300         * modules/unistr/u16-mbtoucr: New file.
3301         * lib/unistr/u16-mbtoucr.c: New file.
3302         * lib/unistr.h (u8_mbtoucr, u16_mbtoucr, u32_mbtoucr): New declarations.
3303
3304 2007-03-27  Simon Josefsson  <simon@josefsson.org>
3305             Bruno Haible  <bruno@clisp.org>
3306
3307         * m4/vasprintf.m4: Convert AC_SUBST into shell variable for
3308         REPLACE_VASPRINTF.  Set HAVE_VASPRINTF.  Add
3309         AC_REQUIRE([gl_STDIO_H_DEFAULTS]).
3310
3311         * m4/stdio_h.m4: Add stubs for vasprintf too.
3312
3313         * modules/stdio: Support vasprintf in sed command.
3314
3315         * modules/vasprintf: Depend on stdio for prototypes.  Remove
3316         vasprintf.h.  Add stdio module indicator.
3317
3318         * lib/stdio_.h: Declare asprintf and vasprintf, based on
3319         vasprintf.h.
3320
3321         * lib/vasprintf.h: File removed.
3322
3323         * lib/asprintf.c: Use stdio.h instead of vasprintf.h.
3324         * lib/vasprintf.c: Ditto.
3325         * lib/xvasprintf.c: Ditto.
3326         * tests/test-vasprintf-posix.c: Ditto.
3327         * tests/test-vasprintf.c: Ditto.
3328
3329 2007-03-27  Bruno Haible  <bruno@clisp.org>
3330
3331         Make vasnprintf multithread-safe.
3332         * lib/vasnprintf.c (decimal_point_char): New function.
3333         (VASNPRINTF): Use it.
3334         Suggested by Simon Josefsson.
3335
3336 2007-03-27  Eric Blake  <ebb9@byu.net>
3337
3338         Support sub-second birthtime on cygwin.
3339         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Also check for st_birthtim.
3340         * lib/stat-time.h (STAT_TIMESPEC): Adjust comments.
3341         (get_stat_birthtime): Also work with st_birthtim.
3342
3343 2007-03-27  Paul Eggert  <eggert@cs.ucla.edu>
3344
3345         * lib/stat-time.h (USE_BIRTHTIME): Remove.
3346         (get_stat_atime_ns, get_stat_ctime_ns, get_stat_mtime_ns):
3347         (get_stat_birthtime_ns): Do not try to use "spare" fields.
3348         (get_stat_birthtime_ns): Simplify compile-time tests.
3349         (get_stat_birthtime): Change the API to look like
3350         get_stat_mtime etc., except return a negative tv_nsec on error.
3351         * m4/stat-time.m4 (gl_STAT_TIME, gl_STAT_BIRTHTIME):
3352         Don't check for "spare" fields.
3353         (gl_STAT_BIRTHTIME): Don't check for struct stat.st_birthtimespec.tv_sec
3354         or for struct stat.st_birthtime, as these tests aren't used.
3355         * tests/test-stat-time.c (test_birthtime): Adjust to new API.
3356
3357 2007-03-27  Bruno Haible  <bruno@clisp.org>
3358
3359         * lib/stat-time.h: Include <sys/stat.h>.
3360
3361 2007-03-27  James Youngman  <jay@gnu.org>
3362
3363         * lib/stat-time.h (get_stat_birthtime): New function for
3364           retrieving st_birthtime as provided by UFS2 (hence *BSD).
3365         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Probe for st_birthtime
3366           and its variants.
3367         * modules/stat-time (configure.ac): call gl_STAT_BIRTHTIME.
3368         * modules/stat-time-test: New file.
3369         * tests/test-stat-time.c: New test, devised by Bruno Haible.
3370
3371 2007-03-26  Bruno Haible  <bruno@clisp.org>
3372
3373         Better support of signalling NaNs.
3374         * lib/atanl.c: Include isnanl.h.
3375         (atanl): Perform test for NaN at the beginning of the function and
3376         through a call to isnanl.
3377         * lib/cosl.c: Include isnanl.h.
3378         (cosl): Perform test for NaN at the beginning of the function and
3379         through a call to isnanl.
3380         * lib/ldexpl.c: Include isnanl.h.
3381         (ldexpl): Perform test for NaN through a call to isnanl.
3382         * lib/logl.c: Include isnanl.h.
3383         (logl): Perform test for NaN at the beginning of the function and
3384         through a call to isnanl.
3385         * lib/sinl.c: Include isnanl.h.
3386         (sinl): Perform test for NaN at the beginning of the function and
3387         through a call to isnanl.
3388         * lib/sqrtl.c: Include isnanl.h.
3389         (sqrtl): Perform test for NaN at the beginning of the function and
3390         through a call to isnanl.
3391         * lib/tanl.c: Include isnanl.h.
3392         (tanl): Perform test for NaN at the beginning of the function and
3393         through a call to isnanl.
3394         * lib/trigl.c (ieee754_rem_pio2l): Remove test for NaN.
3395         * modules/mathl (Depends-on): Add isnanl.
3396
3397 2007-03-26  Eric Blake  <ebb9@byu.net>
3398
3399         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Fix
3400         regression in logic sense of previous patch.
3401
3402 2007-03-26  Bruno Haible  <bruno@clisp.org>
3403
3404         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Don't use
3405         unportable shell command "if ! ...".
3406         Reported by Ralf Wildenhues.
3407
3408 2007-03-25  Bruno Haible  <bruno@clisp.org>
3409
3410         * lib/sysexit_,h: If HAVE_SYSEXITS_H is defined, include the original
3411         <sysexits.h> file, and only add EX_CONFIG.
3412         * m4/sysexits.m4 (gl_SYSEXITS): If <sysexits.h> exists, check its
3413         absolute file name and whether it is sufficient. Substitute also
3414         HAVE_SYSEXITS_H and ABSOLUTE_SYSEXITS_H.
3415         * modules/sysexits (Makefile.am): Substitute HAVE_SYSEXITS_H and
3416         ABSOLUTE_SYSEXITS_H into sysexits.h.
3417
3418 2007-03-25  Bruno Haible  <bruno@clisp.org>
3419
3420         * lib/getaddrinfo.c (getaddrinfo): Don't access hints->ai_flags when
3421         hints is NULL.
3422
3423 2007-03-25  Bruno Haible  <bruno@clisp.org>
3424
3425         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Add a cast.
3426         * lib/uniconv/u8-strconv-to-enc.c (u8_strconv_to_encoding): Likewise.
3427
3428 2007-03-25  Bruno Haible  <bruno@clisp.org>
3429
3430         * lib/vasnprintf.c: Include langinfo.h.
3431         (VASNPRINTF): Prefer nl_langinfo over localeconv, since it's more
3432         multithread-safe.
3433         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): New macro.
3434         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke it.
3435         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
3436         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
3437         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
3438         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
3439         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
3440         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX: Likewise.
3441         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
3442         Reported by Simon Josefsson.
3443
3444 2007-03-25  Bruno Haible  <bruno@clisp.org>
3445
3446         * lib/printf-parse.c [!IN_LIBINTL]: Include <stdint.h>, for intmax_t.
3447         (PRINTF_PARSE): Make the support for size specifier 'j' unconditional.
3448         * modules/vasnprintf (Depends-on): Add stdint.
3449
3450 2007-03-25  Bruno Haible  <bruno@clisp.org>
3451
3452         * modules/fpieee: New file.
3453         * m4/fpieee.m4: New file.
3454         * modules/isnan-nolibm (Depends-on): Add fpieee.
3455         * modules/isnanl-nolibm (Depends-on): Add fpieee.
3456         * modules/isnanl (Depends-on): Add fpieee.
3457
3458 2007-03-25  Bruno Haible  <bruno@clisp.org>
3459
3460         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Test also finite numbers.
3461
3462 2007-03-25  Bruno Haible  <bruno@clisp.org>
3463
3464         Avoid test failures on IRIX 6.5.
3465         * tests/test-frexpl.c (MIN_NORMAL_EXP): New macro.
3466         (main): Use it.
3467         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP): New
3468         macros.
3469         (main): Use them.
3470
3471 2007-03-25  Bruno Haible  <bruno@clisp.org>
3472
3473         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): New macro.
3474         (gl_FUNC_FREXPL): Invoke it. Set REPLACE_FREXPL to 1 if it frexpl
3475         exists but doesn't work.
3476         * lib/math_.h (frexpl): Define as a replacement macro if REPLACE_FREXPL
3477         is set. Don't provide a prototype if REPLACE_FREXPL is not set.
3478         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FREXPL.
3479         * modules/math (Makefile.am) Substibute also REPLACE_FREXPL into math.h.
3480
3481 2007-03-25  Bruno Haible  <bruno@clisp.org>
3482
3483         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Add check whether frexp(inf)
3484         returns inf. Needed on IRIX 6.5.
3485
3486 2007-03-25  Bruno Haible  <bruno@clisp.org>
3487
3488         * tests/test-frexpl.c: Include isnanl-nolibm.h.
3489         (main): Use isnanl instead of x != x idiom.
3490         * modules/frexpl-tests (Depends-on): Add isnanl-nolibm.
3491
3492         * tests/test-frexp.c: Include isnan.h.
3493         (main): Use isnan instead of x != x idiom.
3494         * modules/frexp-tests (Depends-on): Add isnan-nolibm.
3495
3496 2007-03-25  Bruno Haible  <bruno@clisp.org>
3497
3498         * tests/test-frexp.c (NaN): New function/macro.
3499         (main): Use it instead of 0.0 / 0.0.
3500         * tests/test-isnan.c (NaN): New function/macro.
3501         (main): Use it instead of 0.0 / 0.0.
3502         * tests/test-vasnprintf-posix.c (NaN): New function/macro.
3503         (test_function): Use it instead of 0.0 / 0.0.
3504         * tests/test-vasprintf-posix.c (NaN): New function/macro.
3505         (test_function): Use it instead of 0.0 / 0.0.
3506         * tests/test-snprintf-posix.h (NaN): New function/macro.
3507         (test_function): Use it instead of 0.0 / 0.0.
3508         * tests/test-sprintf-posix.h (NaN): New function/macro.
3509         (test_function): Use it instead of 0.0 / 0.0.
3510         * tests/test-fprintf-posix.h (NaN): New function/macro.
3511         (test_function): Use it instead of 0.0 / 0.0.
3512         * tests/test-printf-posix.h (NaN): New function/macro.
3513         (test_function): Use it instead of 0.0 / 0.0.
3514
3515         * lib/isnan.c (FUNC): Work around a DEC C compiler bug.
3516
3517 2007-03-25  Bruno Haible  <bruno@clisp.org>
3518
3519         * lib/glob_.h: Include <sys/stat.h>. Avoids warnings on AIX 5.1.
3520
3521 2007-03-25  Bruno Haible  <bruno@clisp.org>
3522
3523         * lib/regexec.c (merge_state_with_log): Make static.
3524
3525 2007-03-25  Bruno Haible  <bruno@clisp.org>
3526
3527         * lib/trigl.c (kernel_rem_pio2): Make static.
3528
3529 2007-03-25  Bruno Haible  <bruno@clisp.org>
3530
3531         * lib/sincosl.c (sincosl_table): Make static.
3532
3533 2007-03-25  Bruno Haible  <bruno@clisp.org>
3534
3535         * lib/argp.h (__restrict): Define to empty, rather than to 'restrict',
3536         if the compiler does not support C99.
3537
3538 2007-03-25  Bruno Haible  <bruno@clisp.org>
3539
3540         * modules/time (Makefile.am): Ensure all rule action lines start with a
3541         tab.
3542
3543 2007-03-24  Bruno Haible  <bruno@clisp.org>
3544
3545         * modules/tsearch-tests: New file.
3546         * tests/test-tsearch.sh: New file.
3547         * tests/test-tsearch.c: New file, mostly copied from glibc.
3548
3549         * modules/search-tests: New file.
3550         * tests/test-search.c: New file.
3551
3552         * modules/search: New file.
3553         * lib/search_.h: New file, incorporating lib/tsearch.h.
3554         * m4/search_h.m4: New file.
3555         * lib/tsearch.h: Remove file.
3556         * lib/tsearch.c: Include search.h instead of tsearch.h.
3557         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Require gl_SEARCH_H_DEFAULTS. Set
3558         HAVE_TSEARCH.
3559         * modules/tsearch (Files): Remove lib/tsearch.h.
3560         (Depends-on): Add search.
3561         (configure.ac): Invoke gl_SEARCH_MODULE_INDICATOR.
3562         (Include): Change tsearch.h into search.h.
3563
3564 2007-03-24  Bruno Haible  <bruno@clisp.org>
3565
3566         * modules/fpucw: New file.
3567         * lib/fpucw.h: New file.
3568         * lib/frexp.c: Include fpucw.h.
3569         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
3570         (FUNC): Use them.
3571         * lib/printf-frexp.c: Include fpucw.h.
3572         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
3573         (FUNC): Use them.
3574         * lib/vasnprintf.c: Include fpucw.h.
3575         (VASNPRINTF): Invoke BEGIN/END_LONG_DOUBLE_ROUNDING around the
3576         'long double' calculations.
3577         * tests/test-frexpl.c: Include fpucw.h.
3578         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
3579         * tests/test-printf-frexpl.c: Include fpucw.h.
3580         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
3581         * modules/frexpl (Depends-on): Add fpucw.
3582         * modules/printf-frexpl (Depends-on): Likewise.
3583         * modules/fprintf-posix (Depends-on): Likewise.
3584         * modules/snprintf-posix (Depends-on): Likewise.
3585         * modules/sprintf-posix (Depends-on): Likewise.
3586         * modules/vasnprintf-posix (Depends-on): Likewise.
3587         * modules/vasprintf-posix (Depends-on): Likewise.
3588         * modules/vfprintf-posix (Depends-on): Likewise.
3589         * modules/vsnprintf-posix (Depends-on): Likewise.
3590         * modules/vsprintf-posix (Depends-on): Likewise.
3591         * modules/frexpl-tests (Depends-on): Likewise.
3592         * modules/printf-frexpl-tests (Depends-on): Likewise.
3593
3594 2007-03-24  Bruno Haible  <bruno@clisp.org>
3595
3596         * lib/float+.h: New file.
3597         * lib/isnan.c: Include float+.h.
3598         (SIZE): New macro.
3599         (FUNC): Compare only SIZE bytes of the value.
3600         * lib/vasnprintf.c: Include float+.h.
3601         (VASNPRINTF): When comparing agains +0.0L or +0.0, compare only
3602         SIZEOF_LDBL or SIZEOF_DBL bytes.
3603         * modules/isnan-nolibm (Files): Add lib/float+.h.
3604         * modules/isnanl-nolibm (Files): Add lib/float+.h.
3605         * modules/isnanl (Files): Add lib/float+.h.
3606         * modules/vasnprintf (Files): Add lib/float+.h.
3607
3608 2007-03-24  Bruno Haible  <bruno@clisp.org>
3609
3610         * lib/vasnprintf.c [!HAVE_LONG_DOUBLE]: Include printf-frexp.h. Don't
3611         include isnanl-nolibm.h.
3612
3613 2007-03-24  Bruno Haible  <bruno@clisp.org>
3614
3615         * tests/test-read-file.c (main): Don't produce spurious output for
3616         expected situations. Make the test fail if it encountered unexpected
3617         results.
3618
3619 2007-03-24  Bruno Haible  <bruno@clisp.org>
3620
3621         * m4/locale-fr.m4 (gt_LOCALE_FR): Remove the special-casing of NetBSD,
3622         since its fr_FR.ISO8859-1 locale wouldn't pass the tests.
3623
3624 2007-03-24  Bruno Haible  <bruno@clisp.org>
3625
3626         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Fix last change.
3627
3628 2007-03-24  Bruno Haible  <bruno@clisp.org>
3629
3630         * modules/unistr/base (Depends-on): Remove utf8-ucs4-unsafe,
3631         utf16-ucs4-unsafe, utf8-ucs4, utf16-ucs4, ucs4-utf8, ucs4-utf16.
3632
3633         * modules/unistr/u8-mbtouc: Add source files from module utf8-ucs4.
3634         * modules/utf8-ucs4: Turn into a symbolic link to module
3635         unistr/u8-mbtouc.
3636
3637         * modules/unistr/u8-mbtouc-unsafe: Add source files from module
3638         utf8-ucs4-unsafe.
3639         * modules/utf8-ucs4-unsafe: Turn into a symbolic link to module
3640         unistr/u8-mbtouc-unsafe.
3641
3642         * modules/unistr/u16-mbtouc: Add source files from module utf16-ucs4.
3643         * modules/utf16-ucs4: Turn into a symbolic link to module
3644         unistr/u16-mbtouc.
3645
3646         * modules/unistr/u16-mbtouc-unsafe: Add source files from module
3647         utf16-ucs4-unsafe.
3648         * modules/utf16-ucs4-unsafe: Turn into a symbolic link to module
3649         unistr/u16-mbtouc-unsafe.
3650
3651         * modules/unistr/u8-uctomb: Add source files from module utf4-utf8.
3652         * modules/ucs4-utf8: Turn into a symbolic link to module
3653         unistr/u8-ubtomb.
3654
3655         * modules/unistr/u16-uctomb: Add source files from module utf4-utf16.
3656         * modules/ucs4-utf16: Turn into a symbolic link to module
3657         unistr/u16-ubtomb.
3658
3659 2007-03-24  Bruno Haible  <bruno@clisp.org>
3660
3661         * lib/unistr/u8-mbtouc-aux.c: Renamed from lib/unistr/utf8-ucs4.c.
3662         Enable the function only if HAVE_INLINE.
3663         * lib/unistr/u8-mbtouc-unsafe-aux.c: Renamed from
3664         lib/unistr/utf8-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
3665         * lib/unistr/u16-mbtouc-aux.c: Renamed from lib/unistr/utf16-ucs4.c.
3666         Enable the function only if HAVE_INLINE.
3667         * lib/unistr/u16-mbtouc-unsafe-aux.c: Renamed from
3668         lib/unistr/utf16-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
3669         * lib/unistr/u8-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf8.c.
3670         Enable the function only if HAVE_INLINE.
3671         * lib/unistr/u16-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf16.c.
3672         Enable the function only if HAVE_INLINE.
3673         * modules/utf8-ucs4: Update.
3674         * modules/utf8-ucs4-unsafe: Update.
3675         * modules/utf16-ucs4: Update.
3676         * modules/utf16-ucs4-unsafe: Update.
3677         * modules/ucs4-utf8: Update.
3678         * modules/ucs4-utf16: Update.
3679
3680 2007-03-24  Bruno Haible  <bruno@clisp.org>
3681
3682         * lib/utf8-ucs4.h: Remove file.
3683         * lib/utf8-ucs4-unsafe.h: Remove file.
3684         * lib/utf16-ucs4.h: Remove file.
3685         * lib/utf16-ucs4-unsafe.h: Remove file.
3686         * lib/ucs4-utf8.h: Remove file.
3687         * lib/ucs4-utf16.h: Remove file.
3688         * lib/unistr.h: Include their previous contents.
3689         * m4/utf-ucs4.m4: Remove file.
3690         * m4/ucs4-utf.m4: Remove file.
3691         * modules/utf8-ucs4 (Files): Remove lib/utf8-ucs4.h.
3692         (Depends-on): Add unistr/base.
3693         (configure.ac): Remove gl_UTF_UCS4.
3694         (Makefile.am): Update.
3695         (Include): Change to unistr.h.
3696         * modules/utf8-ucs4-unsafe (Files): Remove lib/utf8-ucs4-unsafe.h.
3697         (Depends-on): Add unistr/base.
3698         (configure.ac): Remove gl_UTF_UCS4.
3699         (Makefile.am): Update.
3700         (Include): Change to unistr.h.
3701         * modules/utf16-ucs4 (Files): Remove lib/utf16-ucs4.h.
3702         (Depends-on): Add unistr/base.
3703         (configure.ac): Remove gl_UTF_UCS4.
3704         (Makefile.am): Update.
3705         (Include): Change to unistr.h.
3706         * modules/utf16-ucs4-unsafe (Files): Remove lib/utf16-ucs4-unsafe.h.
3707         (Depends-on): Add unistr/base.
3708         (configure.ac): Remove gl_UTF_UCS4.
3709         (Makefile.am): Update.
3710         (Include): Change to unistr.h.
3711         * modules/ucs4-utf8 (Files): Remove lib/ucs4-utf8.h.
3712         (Depends-on): Add unistr/base.
3713         (configure.ac): Remove gl_UCS4_UTF.
3714         (Makefile.am): Update.
3715         (Include): Change to unistr.h.
3716         * modules/ucs4-utf16 (Files): Remove lib/ucs4-utf16.h.
3717         (Depends-on): Add unistr/base.
3718         (configure.ac): Remove gl_UCS4_UTF.
3719         (Makefile.am): Update.
3720         (Include): Change to unistr.h.
3721         * lib/unistr/utf8-ucs4.c: Include unistr.h instead of utf8-ucs4.h.
3722         * lib/unistr/utf8-ucs4-unsafe.c: Include unistr.h instead of
3723         utf8-ucs4-unsafe.h.
3724         * lib/unistr/utf16-ucs4.c: Include unistr.h instead of utf16-ucs4.h.
3725         * lib/unistr/utf16-ucs4-unsafe.c: Include unistr.h instead of
3726         utf16-ucs4-unsafe.h.
3727         * lib/unistr/ucs4-utf8.c: Include unistr.h instead of ucs4-utf8.h.
3728         * lib/unistr/ucs4-utf16.c: Include unistr.h instead of ucs4-utf16.h.
3729         * lib/unistr/u8-chr.c: Don't include ucs4-utf8.h.
3730         * lib/unistr/u8-strchr.c: Likewise.
3731         * lib/unistr/u8-strrchr.c: Likewise.
3732         * lib/unistr/u16-chr.c: Don't include ucs4-utf16.h.
3733         * lib/unistr/u16-strchr.c: Likewise.
3734         * lib/unistr/u16-strrchr.c: Likewise.
3735         * lib/striconveh.c: Update.
3736         * lib/linebreak.c: Update.
3737
3738 2007-03-24  Bruno Haible  <bruno@clisp.org>
3739
3740         * lib/argp-help.c (fill_in_uparams, canon_doc_option): Cast the
3741         arguments of isspace, isalpha, isalnum, isdigit to 'unsigned char'.
3742
3743 2007-03-22  Bruno Haible  <bruno@clisp.org>
3744
3745         * lib/strptime.c (__strptime_internal): Use ANSI C syntax.
3746
3747 2007-03-23  Paul Eggert  <eggert@cs.ucla.edu>
3748
3749         * MODULES.html.sh (File system functions): New module write-any-file.
3750         * modules/write-any-file, lib/write-any-file.c, lib/write-any-file.h:
3751         * m4/write-any-file.m4: New files.
3752
3753 2007-03-23  Eric Blake  <ebb9@byu.net>
3754
3755         * gnulib-tool: Rearrange space-tab sequences, since some editors
3756         like to eat them.
3757
3758 2007-03-23  Eric Blake  <ebb9@byu.net>
3759
3760         * lib/version-etc.c (version_etc_va): Update license wording to
3761         be more concise.  Recommended by Richard Stallman.
3762
3763 2007-03-22  Bruno Haible  <bruno@clisp.org>
3764
3765         * lib/poll.c (MSG_PEEK): New fallback definition.
3766
3767 2007-03-22  Bruno Haible  <bruno@clisp.org>
3768
3769         * modules/sys_socket-tests (configure.ac): Check for shutdown function.
3770         * tests/test-sys_socket.c (a): Test only if shutdown() exists.
3771         (main): Update.
3772         Fixes a compilation error on BeOS.
3773
3774 2007-03-22  Bruno Haible  <bruno@clisp.org>
3775
3776         * modules/frexpl-tests: New file.
3777         * tests/test-frexpl.c: New file.
3778
3779         * modules/frexpl: New file.
3780         * m4/frexpl.m4: New file.
3781         * modules/math (Makefile.am): Also substitute GNULIB_FREXPL into math.h.
3782         * lib/math_.h (frexpl): Test GNULIB_FREXPL instead of GNULIB_MATHL.
3783         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FREXPL.
3784         * modules/mathl (Files): Remove lib/frexpl.c, lib/frexp.c.
3785         (Depends-on): Add frexpl. Remove isnanl-nolibm.
3786         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Don't test for frexpl.
3787
3788 2007-03-22  Bruno Haible  <bruno@clisp.org>
3789
3790         * lib/frexpl.c: Share code with lib/frexp.c.
3791         * modules/mathl (Files): Add lib/frexp.c.
3792         (Depends-on): Add isnanl-nolibm.
3793
3794 2007-03-22  Bruno Haible  <bruno@clisp.org>
3795
3796         * modules/printf-frexp (Files): Add m4/frexp.m4.
3797         * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Define HAVE_FREXP_IN_LIBC
3798         only if the found frexp function actually works.
3799
3800 2007-03-22  Bruno Haible  <bruno@clisp.org>
3801
3802         * lib/frexp.c: Remove older implementation that uses divisions.
3803
3804 2007-03-21  Bruno Haible  <bruno@clisp.org>
3805
3806         * modules/frexp-tests: New file.
3807         * tests/test-frexp.c: New file.
3808
3809         * modules/frexp: New file.
3810         * lib/frexp.c: New file.
3811         * m4/frexp.m4: New file.
3812         * lib/math_.h (frexp): New declaration.
3813         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Also initialize GNULIB_FREXP and
3814         REPLACE_FREXP.
3815         * modules/math (math.h): Also substitute GNULIB_FREXP, REPLACE_FREXP.
3816
3817 2007-03-21  Bruno Haible  <bruno@clisp.org>
3818
3819         * modules/isnanl-tests: New file.
3820         * tests/test-isnanl.c: New file.
3821
3822         * modules/isnanl: New file.
3823         * lib/isnanl.h: New file.
3824         * m4/isnanl.m4 (gl_FUNC_ISNANL): New macro.
3825         (gl_FUNC_ISNANL_NO_LIBM): Invoke gl_HAVE_ISNANL_NO_LIBM,
3826         gl_FUNC_ISNANL_WORKS.
3827         (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM, gl_FUNC_ISNANL_WORKS):
3828         New macros.
3829
3830 2007-03-21  Bruno Haible  <bruno@clisp.org>
3831
3832         * modules/isnanl-nolibm (Files): Add lib/isnanl-nolibm.h, remove
3833         lib/isnanl.h.
3834         (Include): Update.
3835         * lib/isnanl-nolibm.h: Renamed from lib/isnanl.h.
3836         * lib/vasnprintf.c: Update.
3837         * modules/isnanl-nolibm-tests (Files): Add tests/test-isnanl-nolibm.c,
3838         tests/test-isnanl.h, remove tests/test-isnanl.c.
3839         (Makefile.am): Update.
3840         * tests/test-isnanl-nolibm.c: New file.
3841         * tests/test-isnanl.h: New file.
3842         * tests/test-isnanl.c: Remove file.
3843
3844 2007-03-21  Jim Meyering  <jim@meyering.net>
3845
3846         When trying to open ".", treat ESTALE like EACCES.
3847         * lib/savewd.c (savewd_save): Resort to forking not just upon
3848         failure with EACCES, but also when errno is ESTALE.
3849
3850 2007-03-20  Bruno Haible  <bruno@clisp.org>
3851
3852         * lib/string_.h (strndup): Enable declaration also if HAVE_STRNDUP.
3853         Needed on AIX 5.1. Reported by Matthew Woehlke.
3854
3855 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
3856
3857         Suggestions by Bruno Haible:
3858         * lib/acl-internal.h: Include "gettext.h" rather than rolling
3859         our own.
3860         (ACL_NOT_WELL_SUPPORTED): Parenthesize arg when used.
3861         * modules/acl (Depends-on): Add gettext.
3862
3863 2007-03-19  Bruno Haible  <bruno@clisp.org>
3864
3865         * modules/iconvme: Remove file.
3866         * lib/iconvme.h: Remove file.
3867         * lib/iconvme.c: Remove file.
3868         * m4/iconvme.m4: Remove file.
3869
3870 2007-03-19  Bruno Haible  <bruno@clisp.org>
3871
3872         * doc/relocatable-maint.texi: Break long shell script line.
3873         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
3874
3875 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
3876
3877         Add limited support for Solaris 10 ZFS-style ACLs: just enough to
3878         handle file_has_acl.
3879         * lib/acl-internal.h, lib/acl_entries.c, lib/file-has-acl.c: New files.
3880         * lib/acl.c: Move header inclusions and related macro defns into
3881         lib/acl-internal.h.
3882         (S_ISLNK): Remove defn, since that's now done for us.
3883         (file_has_acl): Move to lib/file-has-acl.c.
3884         Call acl_trivial if available.  This is the crucial part of the fix.
3885         (acl_entries): Move to lib/acl_entries.c.  Now extern, since it's
3886         shared within the library.  Rewrite a bit, partly to make it compatible
3887         with the GNU coding style.
3888         * m4/acl.m4 (AC_FUNC_ACL): Add AC_LIBOBJ([file-has-acl]).
3889         Remove unnecessary double-quotes.
3890         Don't test for acl_to_text; the build will catch that.
3891         Replace acl_entries if it doesn't exist and it is needed.
3892         Check for -lsec and acl_trivial (as used on Solaris 10).
3893         * modules/acl (Files): Add lib/acl-internal.h, lib/acl_entries.c,
3894         lib/file-has-acl.c.
3895         (Depends-on): Add sys_stat, for S_ISLNK.
3896
3897 2007-03-19  Ben Pfaff  <blp@gnu.org>
3898
3899         * doc/gnulib.texi: Fix typos.
3900         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
3901
3902 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
3903
3904         * lib/getcwd.c (__getcwd): Remove redundant comparison of buf to NULL.
3905         If size is zero here, buf must be zero.
3906
3907 2007-03-19  Simon Josefsson  <simon@josefsson.org>
3908
3909         * des.c: Remove weak_keys_chksum.  Reported by Bruno Haible
3910         <bruno@clisp.org>.
3911
3912 2007-03-18  Bruno Haible  <bruno@clisp.org>
3913
3914         * lib/vasnprintf.c (VASNPRINTF): Undo first part of last patch.
3915         Suggested by Eric Blake.
3916
3917 2007-03-18  Ben Pfaff  <blp@gnu.org>
3918
3919         * doc/relocatable.texi: Recommend using as prefix a directory
3920         that does not exist and will never be created.  Based on
3921         discussion with Bruno Haible, Ralf Wildenhues, Matthew Woehlke,
3922         and others.
3923
3924 2007-03-17  Bruno Haible  <bruno@clisp.org>
3925
3926         * lib/fchownat.c: Include lchown.h.
3927
3928 2007-03-17  Bruno Haible  <bruno@clisp.org>
3929
3930         Fix endless loop when the given allocated size was > INT_MAX.
3931         * lib/vasnprintf.c (EOVERFLOW): New fallback definition.
3932         (VASNPRINTF): Fail with EOVERFLOW when the given allocated size is
3933         larger than INT_MAX, or when it grow to a value larger than INT_MAX.
3934         * lib/vsprintf.c (vsprintf): Don't pass a size > INT_MAX to vasnprintf.
3935         * lib/sprintf.c (sprintf): Likewise.
3936
3937 2007-03-17  Bruno Haible  <bruno@clisp.org>
3938
3939         * tests/test-argp-2.sh (func_compare): Output a context diff.
3940
3941 2007-03-17  Bruno Haible  <bruno@clisp.org>
3942
3943         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Check also the
3944         locale's decimal-point character.
3945
3946 2007-03-17  Bruno Haible  <bruno@clisp.org>
3947
3948         * lib/vasnprintf.c (VASNPRINTF): Clear out the memory used for arg_mem
3949         before comparing it. Needed because on some platforms (e.g. x86) a
3950         'long double' occupies less bytes than sizeof (long double).
3951
3952 2007-03-17  Bruno Haible  <bruno@clisp.org>
3953
3954         * tests/test-crc.c (main): Make printf statements 64-bit clean.
3955         * tests/test-gc-pbkdf2-sha1.c (main): Likewise.
3956         * tests/test-getaddrinfo.c (simple): Likewise.
3957         * tests/test-read-file.c (main): Likewise.
3958
3959 2007-03-17  Bruno Haible  <bruno@clisp.org>
3960
3961         * tests/test-dirname.c (main): Make printf statements 64-bit clean.
3962
3963 2007-03-17  Bruno Haible  <bruno@clisp.org>
3964
3965         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Remove
3966         unused variable.
3967
3968 2007-03-17  Bruno Haible  <bruno@clisp.org>
3969
3970         * tests/test-c-strcasecmp.c: Include c-strcase.h.
3971         * tests/test-c-strncasecmp.c: Likewise.
3972
3973 2007-03-17  Bruno Haible  <bruno@clisp.org>
3974
3975         * modules/stdlib (Depends-on): Add unistd.
3976         * lib/stdlib_.h: Include <unistd.h> if mkstemp is desired.
3977         Needed for MacOS X 10.3.
3978
3979 2007-03-17  Bruno Haible  <bruno@clisp.org>
3980
3981         * lib/unistr/u-strdup.h: Include <stdlib.h>.
3982
3983 2007-03-17  Bruno Haible  <bruno@clisp.org>
3984
3985         * lib/unistr/u-cpy-alloc.h: Include <stdlib.h>.
3986
3987 2007-03-17  Bruno Haible  <bruno@clisp.org>
3988
3989         * gnulib-tool (func_import): Update .cvsignore and .gitignore files
3990         to reflect files copied from gnulib (with or without modifications).
3991         Suggested by Jim Meyering.
3992
3993 2007-03-17  Eric Blake  <ebb9@byu.net>
3994
3995         * NEWS: Document stdlib change from 2007-02-18.
3996
3997 2007-03-17  Jim Meyering  <jim@meyering.net>
3998
3999         Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
4000         * build-aux/bootstrap: Put ""s around use of $build_aux, in case
4001         someone uses a name containing shell meta-characters.
4002         Reported by Alfred M. Szmidt.
4003
4004         * build-aux/bootstrap: Don't use \> in grep regexp.  For HP-UX.
4005
4006 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
4007
4008         * build-aux/bootstrap (with_gettext): New variable.  Run autopoint
4009         and copy gettext configuration files only if configure.ac contains
4010         a use of AM_GNU_GETTEXT_VERSION.
4011
4012 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
4013
4014         * build-aux/bootstrap (gnulib_name): New variable.
4015         (gnulib_tool_options): Use it.
4016
4017 2007-03-13  Simon Josefsson  <simon@josefsson.org>
4018
4019         * tests/test-des.c: Use new namespace.
4020
4021 2007-03-15  Bruno Haible  <bruno@clisp.org>
4022
4023         * lib/dummy.c (gl_dummy_symbol): Renamed from 'dummy'.
4024         Reported by James Youngman <jay@gnu.org>.
4025
4026 2007-03-15  Bruno Haible  <bruno@clisp.org>
4027
4028         * lib/glob.c (glob): Add 'restrict' so that prototype matches the
4029         declared prototype. Needed with cc on OSF/1 5.1.
4030
4031 2007-03-15  Bruno Haible  <bruno@clisp.org>
4032
4033         * lib/gl_list.h (gl_listelement_dispose_fn): New type.
4034         (gl_list_create_empty, gl_list_create): Add dispose_fn argument.
4035         (struct gl_list_implementation): Add dispose_fn argument to the
4036         'create_empty', 'create' methods.
4037         (struct gl_list_impl_base): Add field 'dispose_fn'.
4038         * lib/gl_list.c (gl_list_create_empty, gl_list_create): Add dispose_fn
4039         argument.
4040         * lib/gl_array_list.c (gl_array_create_empty, gl_array_create): Add
4041         dispose_fn argument.
4042         (gl_array_remove_node, gl_array_remove_at, gl_array_list_free): Call
4043         dispose_fn on the dropped values.
4044         * lib/gl_carray_list.c (gl_carray_create_empty, gl_carray_create): Add
4045         dispose_fn argument.
4046         (gl_carray_remove_at, gl_carray_list_free): Call dispose_fn on the
4047         dropped values.
4048         * lib/gl_anyavltree_list2.h (gl_tree_create): Add dispose_fn argument.
4049         (gl_tree_remove_node): Call dispose_fn on the dropped value.
4050         * lib/gl_anyrbtree_list2.h (gl_tree_create): Add dispose_fn argument.
4051         (gl_tree_remove_node): Call dispose_fn on the dropped value.
4052         * lib/gl_anytree_list2.h (gl_tree_create_empty): Add dispose_fn
4053         argument.
4054         (gl_tree_list_free): Call dispose_fn on the dropped values.
4055         * lib/gl_anytreehash_list2.h (gl_tree_list_free): Call dispose_fn on
4056         the dropped values.
4057         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
4058         Add dispose_fn argument.
4059         (gl_linked_remove_node, gl_linked_remove_at, gl_linked_list_free):
4060         Call dispose_fn on the dropped values.
4061         * lib/gl_sublist.c (gl_sublist_create_empty, gl_sublist_create_fill):
4062         Add dispose_fn argument.
4063         (gl_sublist_create): Initialize the 'dispose_fn' field.
4064         * lib/clean-temp.c (create_temp_dir, register_fd): Update.
4065         * tests/test-array_list.c (main): Update.
4066         * tests/test-carray_list.c (main): Update.
4067         * tests/test-avltree_list.c (main): Update.
4068         * tests/test-rbtree_list.c (main): Update.
4069         * tests/test-avltreehash_list.c (main): Update.
4070         * tests/test-rbtreehash_list.c (main): Update.
4071         * tests/test-linked_list.c (main): Update.
4072         * tests/test-linkedhash_list.c (main): Update.
4073         * tests/test-array_oset.c (main): Update.
4074
4075 2007-03-15  Bruno Haible  <bruno@clisp.org>
4076
4077         * lib/gl_oset.h (gl_setelement_dispose_fn): New type.
4078         (gl_oset_create_empty): Add dispose_fn argument.
4079         (struct gl_oset_implementation): Add dispose_fn argument to
4080         'create_empty' method.
4081         (struct gl_oset_impl_base): Add dispose_fn field.
4082         * lib/gl_oset.c (gl_oset_create_empty): Add dispose_fn argument.
4083         * lib/gl_array_oset.c (gl_array_create_empty): Add dispose_fn argument.
4084         (gl_array_remove_at, gl_array_free): Call dispose_fn on the dropped
4085         values.
4086         * lib/gl_anytree_oset.h (gl_tree_create_empty): Add dispose_fn argument.
4087         (gl_tree_oset_free): Call dispose_fn on the dropped values.
4088         * lib/gl_avltree_oset.c (gl_tree_remove_node): Call dispose_fn on the
4089         dropped value.
4090         * lib/gl_rbtree_oset.c (gl_tree_remove_node): Call dispose_fn on the
4091         dropped value.
4092         * tests/test-array_oset.c (main): Update.
4093         * tests/test-avltree_oset.c (main): Update.
4094         * tests/test-rbtree_oset.c (main): Update.
4095         * lib/gl_anytreehash_list1.h (add_to_bucket): Update.
4096
4097 2007-03-13  Bruno Haible  <bruno@clisp.org>
4098
4099         * tests/test-stdbool.c (i): Update after last patch.
4100
4101 2007-03-12  Bruno Haible  <bruno@clisp.org>
4102
4103         * lib/quotearg.c: Include <wctype.h> early, before the definition of
4104         the iswprint macro. Needed on Solaris 2.5.1.
4105
4106 2007-03-12  Bruno Haible  <bruno@clisp.org>
4107
4108         * tests/test-printf-frexp.c (main): Declare x as volatile.
4109
4110 2007-03-12  Simon Josefsson  <simon@josefsson.org>
4111
4112         * doc/gnulib.texi (Build robot for gnulib): New section.
4113
4114 2007-03-12  Jim Meyering  <jim@meyering.net>
4115
4116         * build-aux/bootstrap: New file.
4117         * build-aux/bootstrap.conf: New file, from coreutils.
4118
4119 2007-03-11  Bruno Haible  <bruno@clisp.org>
4120
4121         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Require AC_C_INLINE.
4122
4123 2007-03-12  Simon Josefsson  <simon@josefsson.org>
4124
4125         * lib/des.h, lib/des.c, lib/gc-gnulib.c: Use gl_ namespace, to
4126         avoid collisions with 'des_setkey'.  Reported by Bruno Haible
4127         <bruno@clisp.org>.  Also change 'tripledes_' to '3des_'.
4128
4129 2007-03-11  Bruno Haible  <bruno@clisp.org>
4130
4131         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): If the test program fails to
4132         compile, set LOCALE_TR_UTF8 to 'none' instead of empty.
4133
4134 2007-03-11  Bruno Haible  <bruno@clisp.org>
4135
4136         * lib/stdint_.h (INT64_MIN, INTMAX_MIN): Avoid using the ~INT..._MAX
4137         formula. Needed for SunPRO C 5.0.
4138
4139 2007-03-11  Bruno Haible  <bruno@clisp.org>
4140
4141         * modules/long-options (Depends-on): Add getopt.
4142
4143 2007-03-11  Bruno Haible  <bruno@clisp.org>
4144
4145         * modules/modechange (Depends-on): Add stdbool.
4146
4147 2007-03-11  Bruno Haible  <bruno@clisp.org>
4148
4149         * modules/i-ring (Depends-on): Add stdbool.
4150
4151 2007-03-11  Bruno Haible  <bruno@clisp.org>
4152
4153         * modules/gc-des (Depends-on): Add stdbool.
4154
4155 2007-03-11  Bruno Haible  <bruno@clisp.org>
4156
4157         * m4/mktime.m4 (gl_PREREQ_MKTIME): Require AC_C_INLINE.
4158
4159 2007-03-11  Bruno Haible  <bruno@clisp.org>
4160
4161         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Require AC_C_RESTRICT.
4162
4163 2007-03-11  Bruno Haible  <bruno@clisp.org>
4164
4165         * lib/unistr/u32-mbtouc-unsafe.c (u32_mbtouc_unsafe): Fix syntax error.
4166
4167 2007-03-11  Bruno Haible  <bruno@clisp.org>
4168
4169         * lib/vasnprintf.c (sprintf): Undefine.
4170
4171 2007-03-11  Bruno Haible  <bruno@clisp.org>
4172
4173         * lib/isnan.c (rpl_isnan, rpl_isnanl): Work around bug regarding
4174         initializers in SunPRO C and Compaq C compilers.
4175
4176 2007-03-11  Bruno Haible  <bruno@clisp.org>
4177
4178         * lib/gl_array_oset.c (gl_array_iterator_next): Make pointer
4179         decrementing code ANSI C compliant.
4180
4181 2007-03-11  Bruno Haible  <bruno@clisp.org>
4182
4183         * lib/dummy.c [__sun]: Define a dummy variable, not just a typedef.
4184         Needed for Solaris 2.5.1 ranlib and SunPRO C 5.0.
4185
4186 2007-03-11  Bruno Haible  <bruno@clisp.org>
4187
4188         * tests/test-stdbool.c (s, d, e, xlcbug): Disable checks that gnulib's
4189         <stdbool.h> substitute doesn't pass.
4190
4191 2007-03-11  Bruno Haible  <bruno@clisp.org>
4192
4193         * lib/vasnprintf.c (snprintf): Undefine. Avoids an endless recursion.
4194
4195 2007-03-11  Bruno Haible  <bruno@clisp.org>
4196
4197         * gnulib-tool (func_create_megatestdir): Create also an autobuild
4198         script, for submission to autobuild.josefsson.org.
4199
4200 2007-03-10  Bruno Haible  <bruno@clisp.org>
4201
4202         * modules/canonicalize-lgpl-tests: New file.
4203         * tests/test-canonicalize-lgpl.sh: New file.
4204         * tests/test-canonicalize-lgpl.c: New file.
4205
4206         * modules/c-strcase-tests: New file.
4207         * tests/test-c-strcase.sh: New file.
4208         * tests/test-c-strcasecmp.c: New file.
4209         * tests/test-c-strncasecmp.c: New file.
4210
4211         * modules/atexit-tests: New file.
4212         * tests/test-atexit.sh: New file.
4213         * tests/test-atexit.c: New file.
4214
4215 2007-03-10  Bruno Haible  <bruno@clisp.org>
4216
4217         * tests/test-binary-io.sh: Use temporary filenames that are not so
4218         likely to clash with those of other tests (in a parallel make).
4219         * tests/test-binary-io.c: Likewise.
4220
4221 2007-03-10  Bruno Haible  <bruno@clisp.org>
4222
4223         * lib/fseterr.c (fseterr): Port to Solaris/SPARC64. Deactivate the
4224         fallback; use #error instead.
4225         Suggested by Simon Josefsson.
4226
4227 2007-03-10  Bruno Haible  <bruno@clisp.org>
4228
4229         * gnulib-tool (func_create_testdir): Treat MOSTLYCLEANFILES like
4230         CLEANFILES. Put spaces in each line of $cleaned_files, not only the
4231         first and the last.
4232
4233 2007-03-10  Bruno Haible  <bruno@clisp.org>
4234
4235         * lib/stdint_.h (uint_least64_t): Fix typo in last patch.
4236
4237 2007-03-10  Bruno Haible  <bruno@clisp.org>
4238
4239         * modules/snprintf-posix-tests (EXTRA_DIST): New variable. Needed for
4240         "make distcheck".
4241         * modules/sprintf-posix-tests (EXTRA_DIST): Likewise.
4242         * modules/vsnprintf-posix-tests (EXTRA_DIST): Likewise.
4243         * modules/vsprintf-posix-tests (EXTRA_DIST): Likewise.
4244
4245 2007-03-10  Bruno Haible  <bruno@clisp.org>
4246
4247         * modules/allocsa-tests (test_allocsa_SOURCES): Remove redundant
4248         variable.
4249         * modules/dirname-tests (test_dirname_SOURCES): Remove redundant
4250         variable.
4251
4252 2007-03-09  Eric Blake  <ebb9@byu.net>
4253         and Matthew Woehlke  <mw_triad@users.sourceforge.net>  (tiny change)
4254
4255         * lib/stdint_.h (int64_t, uint64_t): Don't undefine if 64-bit
4256         types are not being provided by gnulib.
4257         (GL_INT64_T, GL_UINT64_T): New witnesses of whether gnulib 64-bit
4258         types are supported.
4259
4260 2007-03-10  Bruno Haible  <bruno@clisp.org>
4261
4262         * lib/stdio_.h (__attribute__): New macro.
4263         (fprintf, vfprintf, printf, vprintf, snprintf, vsnprintf, sprintf,
4264         vsprintf): Specify __attribute__ __format__ for GCC.
4265         Suggested by Eric Blake.
4266
4267 2007-03-09  Bruno Haible  <bruno@clisp.org>
4268
4269         * modules/printf-posix-tests: New file.
4270         * tests/test-printf-posix.sh: New file.
4271         * tests/test-printf-posix.c: New file.
4272
4273         * modules/printf-posix: New file.
4274         * lib/printf.c: New file.
4275         * m4/printf-posix-rpl.m4: New file.
4276         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_PRINTF_POSIX,
4277         REPLACE_PRINTF.
4278         * lib/stdio_.h (printf): New declaration.
4279         (format, __format__, ____printf____, ____scanf____, ____strftime____,
4280         ____strfmon____): New macros.
4281         * modules/stdio (Makefile.am): Substitute also GNULIB_PRINTF_POSIX,
4282         REPLACE_PRINTF.
4283
4284 2007-03-09  Bruno Haible  <bruno@clisp.org>
4285
4286         * tests/test-vasnprintf-posix2.sh: New file.
4287         * tests/test-vasnprintf-posix2.c: New file.
4288         * modules/vasnprintf-posix-tests (Files): Add them and m4/locale-fr.m4.
4289         (configure.ac): Invoke gt_LOCALE_FR and gt_LOCALE_FR_UTF8.
4290         (Makefile.am): Activate test-vasnprintf-posix2.sh.
4291
4292         * lib/vasnprintf.c (VASNPRINTF): For the 'a' and 'A' directives, use
4293         a locale dependent decimal point, rather than always '.'.
4294
4295 2007-03-09  Eric Blake  <ebb9@byu.net>
4296
4297         * lib/stdlib_.h (EXIT_FAILURE): GNU code expects this to be 1, in
4298         spite of platforms like Tandem/NSK that define it to -1.
4299
4300 2007-03-08  Bruno Haible  <bruno@clisp.org>
4301
4302         * modules/vprintf-posix-tests: New file.
4303         * tests/test-vprintf-posix.sh: New file.
4304         * tests/test-vprintf-posix.c: New file.
4305         * tests/test-printf-posix.h: New file.
4306
4307         * modules/vprintf-posix: New file.
4308         * lib/vprintf.c: New file.
4309         * m4/vprintf-posix.m4: New file.
4310         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VPRINTF_POSIX,
4311         REPLACE_VPRINTF.
4312         * lib/stdio_.h (vprintf): New declaration.
4313         * modules/stdio (Makefile.am): Substitute also GNULIB_VPRINTF_POSIX,
4314         REPLACE_VPRINTF.
4315
4316 2007-03-08  Bruno Haible  <bruno@clisp.org>
4317
4318         * modules/fprintf-posix-tests: New file.
4319         * tests/test-fprintf-posix.sh: New file.
4320         * tests/test-fprintf-posix.c: New file.
4321
4322         * modules/fprintf-posix: New file.
4323         * lib/fprintf.c: New file.
4324         * m4/fprintf-posix.m4: New file.
4325         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FPRINTF_POSIX,
4326         REPLACE_FPRINTF.
4327         * lib/stdio_.h (fprintf): New declaration.
4328         * modules/stdio (Makefile.am): Substitute also GNULIB_FPRINTF_POSIX,
4329         REPLACE_FPRINTF.
4330
4331 2007-03-08  Bruno Haible  <bruno@clisp.org>
4332
4333         * modules/vfprintf-posix-tests: New file.
4334         * tests/test-vfprintf-posix.sh: New file.
4335         * tests/test-vfprintf-posix.c: New file.
4336         * tests/test-fprintf-posix.h: New file.
4337         * tests/test-fprintf-posix.out: New file.
4338
4339         * modules/vfprintf-posix: New file.
4340         * lib/vfprintf.c: New file.
4341         * m4/vfprintf-posix.m4: New file.
4342         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VFPRINTF_POSIX,
4343         REPLACE_VFPRINTF.
4344         * lib/stdio_.h (vfprintf): New declaration.
4345         * modules/stdio (Makefile.am): Substitute also GNULIB_VFPRINTF_POSIX,
4346         REPLACE_VFPRINTF.
4347
4348 2007-03-08  Bruno Haible  <bruno@clisp.org>
4349
4350         * lib/stdio_.h: Treat __need___FILE like __need_FILE.
4351
4352 2007-03-08  Bruno Haible  <bruno@clisp.org>
4353
4354         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Use 'case' statements
4355         instead of 'expr' invocations.
4356         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
4357         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
4358         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
4359         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
4360         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
4361         Suggested by Paul Eggert.
4362
4363 2007-03-08  Bruno Haible  <bruno@clisp.org>
4364
4365         * modules/fseterr-tests: New file.
4366         * tests/test-fseterr.c: New file.
4367
4368         * modules/fseterr: New file.
4369         * lib/fseterr.h: New file.
4370         * lib/fseterr.c: New file.
4371
4372 2007-03-08  Bruno Haible  <bruno@clisp.org>
4373
4374         * lib/fnmatch_.h: Convert tabs in the middle of lines to spaces.
4375         * lib/getopt_.h: Likewise.
4376         * lib/mbswidth.h: Likewise.
4377         * lib/setenv.h: Likewise.
4378         * lib/vasnprintf.h: Likewise.
4379         * lib/vasprintf.h: Likewise.
4380         * lib/verror.h: Likewise.
4381         * lib/xsetenv.h: Likewise.
4382         * lib/xvasprintf.h: Likewise.
4383
4384 2007-03-08  Jim Meyering  <jim@meyering.net>
4385
4386         * users.txt: Add parted.
4387
4388         * ChangeLog: Restore 1500 lines mistakenly removed from the end.
4389
4390 2007-03-07  Bruno Haible  <bruno@clisp.org>
4391
4392         * m4/printf.m4: Make the shell script snippets copy&pastable.
4393
4394 2007-03-02  Bruno Haible  <bruno@clisp.org>
4395
4396         * lib/netinet_in_.h: New file.
4397         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Test whether netinet/in.h
4398         is self-contained. Set ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H.
4399         * modules/netinet_in (Files): Add lib/netinet_in_.h.
4400         (Depends-on): Add absolute-header.
4401         (Makefile.am): Substitute ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H
4402         into netinet/in.h.
4403
4404 2007-03-03  Bruno Haible  <bruno@clisp.org>
4405
4406         * lib/sys_select_.h: New file.
4407         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SELECT): Test whether sys/select.h
4408         is self-contained. Set ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H.
4409         * modules/sys_select (Files): Add lib/sys_select_.h.
4410         (Depends-on): Add absolute-header.
4411         (Makefile.am): Substitute ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H
4412         into sys/select.h.
4413
4414 2007-03-02  Bruno Haible  <bruno@clisp.org>
4415
4416         * lib/socket_.h: If sys/socket.h exists, include that and <sys/types.h>
4417         before it. Turn HAVE_WINSOCK2_H and HAVE_WS2TCPIP_H into configute-time
4418         values.
4419         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Test also whether
4420         <sys/socket.h> is self-contained. Set ABSOLUTE_SYS_SOCKET_H,
4421         HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H.
4422         * modules/sys_socket (Depends-on): Add absolute-header.
4423         (Makefile.am): Substitute ABSOLUTE_SYS_SOCKET_H, HAVE_SYS_SOCKET_H,
4424         HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H into sys/socket.h.
4425         (Include): Remove requirement of inclusion of <sys/types.h>.
4426
4427 2007-03-02  Bruno Haible  <bruno@clisp.org>
4428
4429         * lib/byteswap_.h (bswap_32): Fix formula.
4430
4431 2007-03-06  Bruno Haible  <bruno@clisp.org>
4432
4433         * modules/sprintf-posix-tests: New file.
4434         * tests/test-sprintf-posix.c: New file.
4435
4436         * modules/sprintf-posix: New file.
4437         * lib/sprintf.c: New file.
4438         * m4/sprintf-posix.m4: New file.
4439         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_SPRINTF_POSIX,
4440         REPLACE_SPRINTF.
4441         * lib/stdio_.h (sprintf): New declaration.
4442         * modules/stdio (Makefile.am): Substitute also GNULIB_SPRINTF_POSIX,
4443         REPLACE_SPRINTF.
4444
4445 2007-03-06  Bruno Haible  <bruno@clisp.org>
4446
4447         * modules/vsprintf-posix-tests: New file.
4448         * tests/test-vsprintf-posix.c: New file.
4449         * tests/test-sprintf-posix.h: New file.
4450
4451         * modules/vsprintf-posix: New file.
4452         * lib/vsprintf.c: New file.
4453         * m4/vsprintf-posix.m4: New file.
4454         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VSPRINTF_POSIX,
4455         REPLACE_VSPRINTF.
4456         * lib/stdio_.h (vsprintf): New declaration.
4457         * modules/stdio (Makefile.am): Substitute also GNULIB_VSPRINTF_POSIX,
4458         REPLACE_VSPRINTF.
4459
4460 2007-03-06  Bruno Haible  <bruno@clisp.org>
4461
4462         * modules/vsnprintf (Depend-on): Remove minmax.
4463
4464 2007-03-06  Bruno Haible  <bruno@clisp.org>
4465
4466         * modules/snprintf-posix-tests: New file.
4467         * tests/test-snprintf-posix.c: New file.
4468
4469         * modules/snprintf-posix: New file.
4470         * m4/snprintf-posix.m4: New file.
4471         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): New macro, extracted from
4472         gl_FUNC_SNPRINTF.
4473         (gl_FUNC_SNPRINTF): Invoke it.
4474         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_SNPRINTF.
4475         * lib/stdio_.h (snprintf): Define as a replacement if REPLACE_SNPRINTF
4476         is set.
4477         * modules/stdio (Makefile.am): Substitute also REPLACE_SNPRINTF.
4478
4479 2007-03-06  Bruno Haible  <bruno@clisp.org>
4480
4481         * modules/vsnprintf-posix-tests: New file.
4482         * tests/test-vsnprintf-posix.c: New file.
4483         * tests/test-snprintf-posix.h: New file.
4484
4485         * modules/vsnprintf-posix: New file.
4486         * m4/vsnprintf-posix.m4: New file.
4487         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): New macro, extracted from
4488         gl_FUNC_VSNPRINTF.
4489         (gl_FUNC_VSNPRINTF): Invoke it.
4490         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_VSNPRINTF.
4491         * lib/stdio_.h (vsnprintf): Define as a replacement if
4492         REPLACE_VSNPRINTF is set.
4493         * modules/stdio (Makefile.am): Substitute also REPLACE_VSNPRINTF.
4494
4495 2007-03-06  Bruno Haible  <bruno@clisp.org>
4496
4497         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Test for vasnprintf here.
4498         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): ... not here.
4499
4500 2007-03-06  Bruno Haible  <bruno@clisp.org>
4501
4502         * lib/math_.h (acosl): Declare also if HAVE_DECL_ACOSL is set.
4503         (asinl): Declare also if HAVE_DECL_ASINL is set.
4504         (atanl): Declare also if HAVE_DECL_ATANL is set.
4505         (ceill): Declare also if HAVE_DECL_CEILL is set.
4506         (cosl): Declare also if HAVE_DECL_COSL is set.
4507         (expl): Declare also if HAVE_DECL_EXPL is set.
4508         (floorl): Declare also if HAVE_DECL_FLOORL is set.
4509         (frexpl): Declare also if HAVE_DECL_FREXPL is set.
4510         (ldexpl): Declare also if HAVE_DECL_LDEXPL is set.
4511         (logl): Declare also if HAVE_DECL_LOGL is set.
4512         (sinl): Declare also if HAVE_DECL_SINL is set.
4513         (sqrtl): Declare also if HAVE_DECL_SQRTL is set.
4514         (tanl): Declare also if HAVE_DECL_TANL is set.
4515         * modules/math (Makefile.am): Substitute the values of HAVE_DECL_*.
4516         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Set HAVE_DECL_* to 1.
4517         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Fix tests for the
4518         declaration of frexpl, ldexpl.
4519         * modules/printf-frexpl (Depends-on): Add math.
4520         * lib/printf-frexp.c (frexpl, ldexpl): Undo last change.
4521
4522 2007-03-05  Bruno Haible  <bruno@clisp.org>
4523
4524         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Also test whether
4525         frexpl and ldexpl are declared.
4526         * lib/printf-frexp.c (frexpl, ldexpl): Provide fallback declarations.
4527
4528 2007-03-05  Bruno Haible  <bruno@clisp.org>
4529
4530         * gnulib-tool (func_get_automake_snippet): Don't synthesize an
4531         EXTRA_lib_SOURCES augmentation for the relocatable-prog-wrapper module.
4532
4533 2007-03-05  Bruno Haible  <bruno@clisp.org>
4534
4535         * lib/stdio_.h: Include <stddef.h>.
4536
4537 2007-03-05  Bruno Haible  <bruno@clisp.org>
4538
4539         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): New macro.
4540
4541 2007-03-05  Bruno Haible  <bruno@clisp.org>
4542
4543         * m4/printf.m4: Update with info about OpenBSD 3.9, HP-UX 10.20,
4544         NetBSD 4, from Ralf Wildenhues.
4545
4546 2007-03-04  Bruno Haible  <bruno@clisp.org>
4547
4548         * lib/vasprintf.h: Update #if logic for the case when the functions
4549         exist but are overridden.
4550
4551 2007-03-04  Bruno Haible  <bruno@clisp.org>
4552
4553         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Exclude two buggy
4554         implementations: glibc-2.4 and MacOS X 10.3.
4555         * tests/test-vasnprintf-posix.c (test_function): Test also the case
4556         that exhibits the bugs in glibc-2.4 and MacOS X 10.3.
4557         * tests/test-vasprintf-posix.c (test_function): Likewise.
4558
4559 2007-03-04  Bruno Haible  <bruno@clisp.org>
4560
4561         * modules/vasprintf-posix-tests: New file.
4562         * tests/test-vasprintf-posix.c: New file.
4563
4564         * modules/vasprintf-posix: New file.
4565         * lib/vasprintf.h (asprintf, vasprintf): Rename if REPLACE_VASPRINTF is
4566         defined.
4567         * m4/vasprintf-posix.m4: New file.
4568         * m4/vasprintf.m4 (gl_REPLACE_VASPRINTF): New macro, extracted from
4569         gl_FUNC_VASPRINTF.
4570         (gl_FUNC_VASPRINTF): Invoke it.
4571         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Define REPLACE_VASNPRINTF
4572         here.
4573         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Not here.
4574
4575 2007-03-04  Bruno Haible  <bruno@clisp.org>
4576
4577         * lib/sys_time_.h: Rename GETTIMEOFDAY_REPLACEMENT to
4578         REPLACE_GETTIMEOFDAY.
4579         * modules/sys_time (Makefile.am): Likewise.
4580         * m4/sys_time_h.m4: Likewise.
4581         * m4/gettimeofday.m4: Likewise.
4582
4583 2007-03-04  Bruno Haible  <bruno@clisp.org>
4584
4585         * modules/vasnprintf-posix-tests: New file.
4586         * tests/test-vasnprintf-posix.c: New file.
4587
4588         * modules/vasnprintf-posix: New file.
4589         * lib/vasnprintf.c: Include isnan.h, isnanl.h, printf-frexp.h,
4590         printf-frexpl.h.
4591         (VASNPRINTF): Handle the 'a' and 'A' directives here, if needed.
4592         * lib/vasnprintf.h (asnprintf, vasnprintf): Rename if
4593         REPLACE_VASNPRINTF is defined.
4594         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): New macro, extracted from
4595         gl_FUNC_VASNPRINTF.
4596         (gl_FUNC_VASNPRINTF): Invoke it.
4597         * m4/vasnprintf-posix.m4: New file.
4598         * m4/printf.m4: New file.
4599
4600 2007-03-04  Bruno Haible  <bruno@clisp.org>
4601
4602         Compile progreloc.c only if --enable-relocatable is specified.
4603         * m4/relocatable.m4 (gl_RELOCATABLE): Arrange to compile progreloc.c
4604         if --enable-relocatable was specified.
4605         * modules/relocatable-prog (Makefile.am): Remove progreloc.c from
4606         lib_SOURCES.
4607
4608 2007-03-04  Jim Meyering  <jim@meyering.net>
4609
4610         * lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
4611         Use it consistently, rather than enumerating errno constants.
4612
4613 2007-03-04  Bruno Haible  <bruno@clisp.org>
4614
4615         * modules/xvasprintf-tests: New file.
4616         * tests/test-xvasprintf.c: New file.
4617
4618         * modules/vasprintf-tests: New file.
4619         * tests/test-vasprintf.c: New file.
4620
4621         * modules/vasnprintf-tests: New file.
4622         * tests/test-vasnprintf.c: New file.
4623
4624         * modules/vsnprintf-tests: New file.
4625         * tests/test-vsnprintf.c: New file.
4626
4627         * modules/snprintf-tests: New file.
4628         * tests/test-snprintf.c: New file.
4629
4630 2007-03-04  Bruno Haible  <bruno@clisp.org>
4631
4632         Compile relocatable.c only if --enable-relocatable is specified.
4633         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Renamed from
4634         gl_RELOCATABLE_LIBRARY.
4635         (gl_RELOCATABLE_LIBRARY, gl_RELOCATABLE_LIBRARY_SEPARATE): New macros.
4636         * m4/relocatable.m4 (gl_RELOCATABLE): Invoke gl_RELOCATABLE_LIBRARY.
4637         (gl_RELOCATABLE_BODY): Require gl_RELOCATABLE_LIBRARY_BODY instead of
4638         gl_RELOCATABLE_LIBRARY.
4639         * modules/relocatable-lib (configure.ac): Invoke gl_RELOCATABLE_LIBRARY.
4640         (Makefile.am): Remove lib_SOURCES.
4641         * modules/relocatable-lib-lgpl (configure.ac): Invoke
4642         gl_RELOCATABLE_LIBRARY.
4643         (Makefile.am): Remove lib_SOURCES.
4644         * modules/relocatable-prog (Makefile.am): Don't compile relocatable.c
4645         always.
4646         * modules/relocatable-prog-wrapper (configure.ac): Invoke
4647         gl_RELOCATABLE_LIBRARY_SEPARATE instead of gl_RELOCATABLE_LIBRARY.
4648
4649 2007-03-04  Bruno Haible  <bruno@clisp.org>
4650
4651         * modules/argmatch-tests: New file.
4652         * tests/test-argmatch.c: New file.
4653
4654         * tests/test-allocsa.c (main): Halve the number of loop runs.
4655
4656         * modules/alloca-opt-tests: New file.
4657         * tests/test-alloca-opt.c: New file.
4658
4659 2007-03-04  Jim Meyering  <jim@meyering.net>
4660
4661         Work around difference between Linux ACLs and Solaris 10 ZFS.
4662         * lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
4663         for EINVAL.
4664
4665 2007-03-03  Bruno Haible  <bruno@clisp.org>
4666
4667         * modules/relocatable-prog (Depends-on): Add back progreloc's
4668         dependencies: canonicalize-lgpl, xalloc, xreadlink, stdbool, unistd.
4669
4670 2007-03-03  Bruno Haible  <bruno@clisp.org>
4671
4672         * modules/relocatable-lib-lgpl: Renamed from modules/relocatable-lib.
4673         * modules/relocatable-lib: New file.
4674
4675 2007-03-03  Bruno Haible  <bruno@clisp.org>
4676
4677         * modules/relocatable-prog: Renamed from modules/relocatable.
4678         * doc/relocatable-maint.texi: Talk about module 'relocatable-prog'.
4679
4680 2007-03-03  Bruno Haible  <bruno@clisp.org>
4681
4682         * modules/relocatable-script (Files): Add doc/relocatable.texi,
4683         m4/relocatable-lib.m4.
4684         (Depends-on): Remove 'relocatable'.
4685         (configure.ac): Add gl_RELOCATABLE_NOP.
4686
4687 2007-03-03  Bruno Haible  <bruno@clisp.org>
4688
4689         * modules/relocatable-prog-wrapper: New file.
4690         * modules/relocatable (Depends-on): Add it. Remove all other
4691         dependencies except progname.
4692         (Files): Remove build-aux/install-reloc, lib/relocwrapper.c.
4693
4694         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): New macro.
4695         (gl_FUNC_STRERROR): Nop.
4696         * lib/strerror.c: Compile the file only if !HAVE_STRERROR.
4697
4698         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): New macro.
4699         * lib/setenv.c: Compile the file only if _LIBC || !HAVE_SETENV.
4700
4701         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): New macro.
4702         (gl_FUNC_READLINK): Update.
4703
4704         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL_SEPARATE): New macro.
4705
4706 2007-03-03  Bruno Haible  <bruno@clisp.org>
4707
4708         * lib/xreadlink.c: Include <unistd.h> unconditionally.
4709         * modules/xreadlink (Depends-on): Add unistd.
4710         * modules/xreadlink-with-size (Depends-on): Likewise.
4711
4712 2007-03-03  Bruno Haible  <bruno@clisp.org>
4713
4714         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_UNSETENV): New macros,
4715         extracted from gt_FUNC_SETENV.
4716         (gt_FUNC_SETENV): Remove macro.
4717         * modules/setenv (configure.ac): Add gl_FUNC_SETENV, gl_FUNC_UNSETENV,
4718         remove gt_FUNC_SETENV.
4719
4720 2007-03-03  Bruno Haible  <bruno@clisp.org>
4721
4722         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY): Define
4723         ENABLE_RELOCATABLE here.
4724         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Don't define it here.
4725
4726 2007-03-03  Bruno Haible  <bruno@clisp.org>
4727
4728         * modules/rbtreehash-list-tests (Depends-on): Add progname.
4729         * tests/test-rbtreehash_list.c: Include progname.h.
4730         (main): Call set_program_name.
4731
4732         * modules/rbtree-oset-tests (Depends-on): Add progname.
4733         * tests/test-rbtree_oset.c: Include progname.h.
4734         (main): Call set_program_name.
4735
4736         * modules/rbtree-list-tests (Depends-on): Add progname.
4737         * tests/test-rbtree_list.c: Include progname.h.
4738         (main): Call set_program_name.
4739
4740         * modules/linked-list-tests (Depends-on): Add progname.
4741         * tests/test-linked_list.c: Include progname.h.
4742         (main): Call set_program_name.
4743
4744 2007-03-03  Bruno Haible  <bruno@clisp.org>
4745
4746         * lib/glob-libc.h (_Restrict_): New macro, copied from lib/regex.h.
4747         All uses of __restrict changed to _Restrict_.
4748         * lib/glob_.h (__restrict): Remove macro.
4749
4750 2007-03-02  Bruno Haible  <bruno@clisp.org>
4751
4752         * modules/gettext (configure.ac): Require gettext infrastructure
4753         from version 0.16.1.
4754
4755 2007-03-02  Bruno Haible  <bruno@clisp.org>
4756
4757         * modules/linkedhash-list-tests (Depends-on): Add progname.
4758         * tests/test-linkedhash_list.c: Include progname.h.
4759         (main): Call set_program_name.
4760
4761         * modules/carray-list-tests (Depends-on): Add progname.
4762         * tests/test-carray_list.c: Include progname.h.
4763         (main): Call set_program_name.
4764
4765         * modules/avltreehash-list-tests (Depends-on): Add progname.
4766         * tests/test-avltreehash_list.c: Include progname.h.
4767         (main): Call set_program_name.
4768
4769         * modules/avltree-oset-tests (Depends-on): Add progname.
4770         * tests/test-avltree_oset.c: Include progname.h.
4771         (main): Call set_program_name.
4772
4773         * modules/avltree-list-tests (Depends-on): Add progname.
4774         * tests/test-avltree_list.c: Include progname.h.
4775         (main): Call set_program_name.
4776
4777         * modules/array-oset-tests (Depends-on): Add progname.
4778         * tests/test-array_oset.c: Include progname.h.
4779         (main): Call set_program_name.
4780
4781         * modules/array-list-tests (Depends-on): Add progname.
4782         * tests/test-array_list.c: Include progname.h.
4783         (main): Call set_program_name.
4784
4785         * modules/argp-tests (Depends-on): Add progname.
4786         * tests/test-argp.c: Include argp.h first. Include progname.h.
4787         (main): Call set_program_name.
4788
4789 2007-03-02  Paul Eggert  <eggert@cs.ucla.edu>
4790
4791         * doc/gnulib-tool.texi (Initial import): Reword description of
4792         _FILE_OFFSET_BITS and _GNU_SOURCE, since they sometimes have a
4793         limited effect even if defined after the first system include.
4794
4795 2007-03-01  Bruno Haible  <bruno@clisp.org>
4796
4797         * build-aux/config.libpath: Update to libtool-1.5.22.
4798         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
4799
4800 2007-03-01  Bruno Haible  <bruno@clisp.org>
4801
4802         * doc/relocatable-maint.texi: Recommend to set foo_CPPFLAGS, not
4803         foo_CFLAGS.
4804         Reported by Ralf Wildenhues.
4805
4806 2007-03-01  Bruno Haible  <bruno@clisp.org>
4807
4808         * build-aux/install-reloc: Remove object files left over by some
4809         compilers.
4810         Reported by Ralf Wildenhues.
4811
4812 2007-03-01  Bruno Haible  <bruno@clisp.org>
4813
4814         * build-aux/install-reloc: Break long lines.
4815
4816 2007-03-01  Bruno Haible  <bruno@clisp.org>
4817
4818         * doc/relocatable.texi: Document that it may not work on OpenBSD.
4819         Reported by Ralf Wildenhues.
4820
4821 2007-03-01  Bruno Haible  <bruno@clisp.org>
4822
4823         * doc/gnulib-tool.texi (Initial import): Remove paragraph about
4824         include ordering constraints.
4825
4826 2007-03-01  Paul Eggert  <eggert@cs.ucla.edu>
4827
4828         Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
4829         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00136.html>.
4830         * doc/gnulib-tool.texi (Initial import): Mention _FILE_OFFSET_BITS
4831         as another example.
4832         * lib/time_.h: Fix misspelling.
4833         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
4834         Require gl_HEADER_TIME_H_DEFAULTS.
4835         * m4/strptime.m4 (gl_FUNC_STRPTIME): Likewise.
4836         * m4/time_r.m4 (gl_TIME_R): Likewise.
4837         * m4/timegm.m4 (gl_FUNC_TIMEGM): Likewise.
4838
4839 2007-03-01  Bruno Haible  <bruno@clisp.org>
4840
4841         * m4/utimecmp.m4 (gl_UTIMECMP): Don't require gl_TIMESPEC.
4842         * m4/utimens.m4 (gl_UTIMENS): Likewise.
4843
4844 2007-03-01  Jim Meyering  <jim@meyering.net>
4845
4846         * modules/xreadlink (Maintainer): Add my name.
4847         * modules/xreadlink-with-size (Depends-on): Alphabetize.
4848
4849 2007-02-26  Ben Pfaff  <blp@cs.stanford.edu>
4850             Bruno Haible  <bruno@clisp.org>
4851
4852         * build-aux/install-reloc: Compile also c-ctype.c.
4853         * build-aux/relocatable.sh.in: New file.
4854         * doc/relocatable.texi: New file.
4855         * doc/relocatable-maint.texi: New file.
4856         * doc/gnulib.texi: Include relocatable-maint.texi.
4857         * lib/progreloc.c: Include unistd.h unconditionally.
4858         * lib/relocwrapper.c: Include unistd.h unconditionally.
4859         Include c-ctype.h.
4860         (add_dotbin): Use c_tolower.
4861         * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
4862         (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
4863         (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
4864         * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
4865         to m4/relocatable-lib.m4.
4866         (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
4867         RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
4868         (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
4869         require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
4870         SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
4871         * modules/relocatable: New file.
4872         * modules/relocatable-lib: New file.
4873         * modules/relocatable-script: New file.
4874
4875 2007-02-28  Bruno Haible  <bruno@clisp.org>
4876
4877         Import --enable-relocatable infrastructure.
4878         * build-aux/config.libpath: New file, from GNU gettext.
4879         * build-aux/install-reloc: New file, from GNU gettext.
4880         * build-aux/reloc-ldflags: New file, from GNU gettext.
4881         * lib/relocatable.h: New file, from GNU gettext.
4882         * lib/relocatable.c: New file, from GNU gettext.
4883         * lib/relocwrapper.c: New file, from GNU gettext.
4884         * m4/relocatable.m4: New file, from GNU gettext.
4885
4886 2007-02-28  Bruno Haible  <bruno@clisp.org>
4887
4888         * MODULES.html.sh (File system functions): Add xreadlink-with-size.
4889
4890         * modules/xreadlink: New file, from GNU gettext with modifications.
4891         * lib/xreadlink.c: New file, from GNU gettext.
4892         * lib/xreadlink.h: Add comments.
4893         (xreadlink): New declaration.
4894
4895         * modules/xreadlink-with-size: Renamed from modules/xreadlink.
4896         (Files): Remove m4/xreadlink.m4. Replace lib/xreadlink.c with
4897         lib/xreadlink-with-size.c.
4898         (configure.ac): Remove gl_XREADLINK invocation.
4899         (Makefile.am): Augment lib_SOURCES.
4900         * m4/xreadlink.m4: Remove file.
4901         * lib/xreadlink-with-size.c: Renamed from lib/xreadlink.c.
4902         (xreadlink_with_size): Renamed from xreadink.
4903         * lib/xreadlink.h (xreadlink_with_size): Renamed from xreadink.
4904         * modules/canonicalize (Depends-on): Replace xreadlink with
4905         xreadlink-with-size.
4906         * lib/canonicalize.c (canonicalize_filename_mode): Update.
4907
4908 2007-02-25  Jim Meyering  <jim@meyering.net>
4909
4910         * build-aux/announce-gen: When complaining about excess arguments,
4911         list them.
4912
4913 2007-02-25  Paul Eggert  <eggert@cs.ucla.edu>
4914
4915         * README: Document signed integer overflow situation more
4916         accurately.
4917
4918 2007-02-25  Bruno Haible  <bruno@clisp.org>
4919
4920         * lib/vasnprintf.c (VASNPRINTF): Fix estimate of size needed for a
4921         'a' or 'A' conversion.
4922
4923 2007-02-25  Bruno Haible  <bruno@clisp.org>
4924
4925         * modules/filename: Renamed from modules/pathname.
4926         (Files): Replace lib/pathname.h with lib/filename.h. Replace
4927         lib/concatpath.c with lib/concat-filename.c.
4928         (Makefile.am): Update.
4929         (Include): Replace pathname.h with filename.h.
4930         * lib/filename.h: Renamed from lib/pathname.h.
4931         (concatenated_filename): Renamed from concatenated_pathname.
4932         * lib/concat-filename.c: Renamed from lib/concatpath.c.
4933         (concatenated_filename): Renamed from concatenated_pathname.
4934         * lib/findprog.c: Include filename.h instead of pathname.h.
4935         (find_in_path): Update.
4936         * lib/javacomp.c: Include filename.h instead of pathname.h.
4937         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
4938         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
4939         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
4940         is_oldgcj_14_13_usable, is_javac_usable): Update.
4941         * lib/javaexec.c: Include filename.h instead of pathname.h.
4942         (execute_java_class): Update.
4943         * modules/findprog: Update.
4944         * modules/javacomp: Update.
4945         * modules/javaexec: Update.
4946         * MODULES.html.sh (File system functions): Add 'filename', remove
4947         'pathname'.
4948
4949 2007-02-25  Bruno Haible  <bruno@clisp.org>
4950
4951         * modules/printf-frexpl-tests: New file.
4952         * tests/test-printf-frexpl.c: New file.
4953
4954         * modules/printf-frexpl: New file.
4955         * lib/printf-frexpl.h: New file.
4956         * lib/printf-frexpl.c: New file.
4957         * m4/printf-frexpl.m4: New file.
4958
4959 2007-02-25  Bruno Haible  <bruno@clisp.org>
4960
4961         * modules/printf-frexp-tests: New file.
4962         * tests/test-printf-frexp.c: New file.
4963
4964         * modules/printf-frexp: New file.
4965         * lib/printf-frexp.h: New file.
4966         * lib/printf-frexp.c: New file.
4967         * m4/printf-frexp.m4: New file.
4968
4969 2007-02-25  Bruno Haible  <bruno@clisp.org>
4970
4971         Assume automake >= 1.10 for the tests.
4972         * modules/arcfour-tests (TESTS): Remove $(EXEEXT) suffix.
4973         * modules/arctwo-tests: Likewise.
4974         * modules/argp-tests: Likewise.
4975         * modules/avltree-list-tests: Likewise.
4976         * modules/avltree-oset-tests: Likewise.
4977         * modules/avltreehash-list-tests: Likewise.
4978         * modules/carray-list-tests: Likewise.
4979         * modules/crc-tests: Likewise.
4980         * modules/des-tests: Likewise.
4981         * modules/gc-arcfour-tests: Likewise.
4982         * modules/gc-arctwo-tests: Likewise.
4983         * modules/gc-des-tests: Likewise.
4984         * modules/gc-hmac-md5-tests: Likewise.
4985         * modules/gc-hmac-sha1-tests: Likewise.
4986         * modules/gc-md2-tests: Likewise.
4987         * modules/gc-md4-tests: Likewise.
4988         * modules/gc-md5-tests: Likewise.
4989         * modules/gc-pbkdf2-sha1-tests: Likewise.
4990         * modules/gc-rijndael-tests: Likewise.
4991         * modules/gc-sha1-tests: Likewise.
4992         * modules/gc-tests: Likewise.
4993         * modules/getaddrinfo-tests: Likewise.
4994         * modules/hmac-md5-tests: Likewise.
4995         * modules/hmac-sha1-tests: Likewise.
4996         * modules/linked-list-tests: Likewise.
4997         * modules/linkedhash-list-tests: Likewise.
4998         * modules/lock-tests: Likewise.
4999         * modules/md2-tests: Likewise.
5000         * modules/md4-tests: Likewise.
5001         * modules/md5-tests: Likewise.
5002         * modules/rbtree-list-tests: Likewise.
5003         * modules/rbtree-oset-tests: Likewise.
5004         * modules/rbtreehash-list-tests: Likewise.
5005         * modules/read-file-tests: Likewise.
5006         * modules/rijndael-tests: Likewise.
5007         * modules/stdint-tests: Likewise.
5008         * modules/tls-tests: Likewise.
5009
5010 2007-02-24  Bruno Haible  <bruno@clisp.org>
5011
5012         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
5013         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
5014         function; instead check whether isnan with a double argument links.
5015         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
5016         function; instead check whether isnan with a 'long double' argument
5017         links.
5018         Reported by Eric Blake <ebb9@byu.net>.
5019
5020 2007-02-24  Bruno Haible  <bruno@clisp.org>
5021
5022         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
5023         defined.
5024         * lib/isnanl.c: Remove all code. Just include isnan.c.
5025         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
5026
5027 2007-02-25  Jim Meyering  <jim@meyering.net>
5028
5029         Avoid conflicting types for 'unsetenv' on FreeBSD.
5030         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
5031         conflicting with FreeBSD's (5.0 and 6.1) function declaration
5032         in stdlib.h.
5033
5034 2007-02-24  Bruno Haible  <bruno@clisp.org>
5035
5036         * modules/isnanl-nolibm-tests: New file.
5037         * tests/test-isnanl.c: New file.
5038
5039         * modules/isnanl-nolibm: New file.
5040         * lib/isnanl.h: New file.
5041         * lib/isnanl.c: New file.
5042         * m4/isnanl.m4: New file.
5043
5044 2007-02-24  Bruno Haible  <bruno@clisp.org>
5045
5046         * modules/isnan-nolibm-tests: New file.
5047         * tests/test-isnan.c: New file.
5048
5049         * modules/isnan-nolibm: New file.
5050         * lib/isnan.h: New file.
5051         * lib/isnan.c: New file.
5052         * m4/isnan.m4: New file.
5053
5054 2007-02-24  Bruno Haible  <bruno@clisp.org>
5055
5056         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
5057         assume that an exponent fits in 20 bits.
5058
5059 2007-02-24  Jim Meyering  <jim@meyering.net>
5060
5061         * m4/regex.m4: Update the description of the configure-time option,
5062         --without-included-regex, to state accurately what the defaults are,
5063         and perhaps to give people an idea why using this option is risky.
5064
5065 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
5066
5067         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
5068         loops on small arguments.  This attempts to avoid the problem
5069         Bruno Haible reported for AIX 4.3.2 in
5070         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00309.html>.
5071
5072 2007-02-23  Bruno Haible  <bruno@clisp.org>
5073
5074         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
5075         Needed for help2man.
5076
5077 2007-02-23  Karl Berry  <karl@gnu.org>
5078
5079         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
5080         exists, foo.h should be cvs-ignored, not committed.
5081
5082 2007-02-23  Eric Blake  <ebb9@byu.net>
5083
5084         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
5085         * lib/stat-time.h (includes): Likewise.
5086         * lib/utimecmp.c (includes): Likewise.
5087         * lib/utimens.h (includes): Likewise.
5088         * lib/getdate.y (includes): Also include "timespec.h" for use
5089         internal to the module.
5090         * modules/utimens (Depends-on): Revert yesterday's patch.
5091         * modules/nanosleep (Depends-on): Add missing dependency.
5092
5093 2007-02-22  Bruno Haible  <bruno@clisp.org>
5094
5095         * lib/glob.c: Don't include getlogin_r.h.
5096
5097 2007-02-22  Jim Meyering  <jim@meyering.net>
5098
5099         * modules/utimens (Depends-on): Add timespec, required for
5100         utimens.h's inclusion of timespec.h.
5101
5102 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
5103
5104         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
5105         long unreadable paths in GNU/Linux.  Problem reported by Andreas
5106         Schwab in
5107         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
5108         I'll try to think of a better way to fix the Solaris problem.
5109
5110         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
5111         like glibc; on Solaris 10, it fails with errno == EINVAL.
5112         POSIX says the behavior is unspecified if the first argument is NULL,
5113         so play it safe and never pass NULL to the system getcwd.
5114
5115 2007-02-21  Jim Meyering  <jim@meyering.net>
5116
5117         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
5118         of gettimeofday.  It would conflict with the one now always
5119         provided via sys_time_.h.  Reported by Matthew Woehlke, as
5120         an IRIX 6.5 build failure.
5121
5122 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
5123
5124         Minor fixups to port to Solaris 10 with Sun C 5.8.
5125         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
5126         * modules/getcwd (Depends-on): Add dirfd.
5127         * lib/putenv.c (putenv): #undef it.
5128         (rpl_putenv): New decl.
5129         (malloc, free): Include <stdlib.h> rather than prototyping separately.
5130
5131 2007-02-20  Bruno Haible  <bruno@clisp.org>
5132
5133         * modules/stdio-tests: New file.
5134         * tests/test-stdio.c: New file.
5135
5136         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
5137         (Depends-on): Add stdio.
5138         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
5139         (Include): Use <stdio.h> instead of vsnprintf.h.
5140         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
5141         HAVE_DECL_VSNPRINTF.
5142         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
5143
5144         * modules/snprintf (Files): Remove lib/snprintf.h.
5145         (Depends-on): Add stdio.
5146         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
5147         (Include): Use <stdio.h> instead of snprintf.h.
5148         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
5149         HAVE_DECL_SNPRINTF.
5150         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
5151         * lib/getaddrinfo.c: Likewise.
5152
5153         * modules/stdio: New file.
5154         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
5155         * lib/snprintf.h: Remove file.
5156         * lib/vsnprintf.h: Remove file.
5157         * lib/.cppi-disable: Remove snprintf.h.
5158         * m4/stdio_h.m4: New file.
5159         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
5160
5161 2007-02-20  Jim Meyering  <jim@meyering.net>
5162
5163         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
5164         used by e.g., mingw.  From Bruno Haible.
5165
5166 2007-02-19  Bruno Haible  <bruno@clisp.org>
5167
5168         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
5169         warnings.
5170         Reported by Ben Pfaff <blp@cs.stanford.edu>.
5171
5172 2007-02-19  Bruno Haible  <bruno@clisp.org>
5173
5174         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
5175         from mingw users.
5176
5177 2007-02-19  Bruno Haible  <bruno@clisp.org>
5178
5179         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
5180         warnings.
5181         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
5182
5183 2007-02-19  Jim Meyering  <jim@meyering.net>
5184
5185         Don't use FD after a successful "fdopendir (fd)".
5186         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
5187         Reset it by calling dirfd on the just-obtained DIR*.
5188
5189         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
5190         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
5191
5192 2007-02-18  Bruno Haible  <bruno@clisp.org>
5193
5194         * lib/readlink.c: Include <unistd.h>.
5195         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
5196         HAVE_READLINK.
5197         * modules/readlink (Depends-on): Add unistd.
5198         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5199         (Include): Add <unistd.h>.
5200
5201         * lib/getlogin_r.h: Remove file.
5202         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
5203         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
5204         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
5205         HAVE_DECL_GETLOGIN_R.
5206         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
5207         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5208         (Include): Use <unistd.h> instead of getlogin_r.h.
5209
5210         * lib/getcwd.h: Remove file.
5211         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
5212         * lib/xgetcwd.c: Likewise.
5213         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
5214         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
5215         * modules/getcwd (Files): Remove lib/getcwd.h.
5216         (Depends-on): Add unistd.
5217         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5218         (Include): Use <unistd.h> instad of getcwd.h.
5219
5220         * lib/ftruncate.c: Include <unistd.h> first.
5221         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
5222         Set HAVE_FTRUNCATE.
5223         * modules/ftruncate (Depends-on): Add unistd.
5224         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5225
5226         * lib/fchdir.c: Include <unistd.h> first.
5227         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
5228         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
5229         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
5230         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5231         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
5232
5233         * lib/dup2.c: Include <unistd.h> first.
5234         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
5235         HAVE_DUP2.
5236         * modules/dup2 (Depends-on): Add unistd.
5237         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5238
5239         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
5240         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
5241         REPLACE_CHOWN. Don't define chown as a macro here.
5242         * modules/chown (Depends-on): Add unistd.
5243         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
5244
5245         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
5246         Add definition for GL_LINK_WARNING.
5247         (chown, dup2): New declarations.
5248         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
5249         link warning.
5250         (ftruncate): New declaration.
5251         (getcwd): New declaration, taken from old getcwd.h.
5252         (getlogin_r): New declaration, taken from old getlogin_r.h.
5253         (readlink): New declaration.
5254         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
5255         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
5256         (gl_PREREQ_UNISTD): Remove macro.
5257         (gl_UNISTD_MODULE_INDICATOR): New macro.
5258         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
5259         many new variables. Don't set UNISTD_H.
5260         * modules/unistd (Description): Change.
5261         (Depends-on): Add link-warning.
5262         (configure.ac): Update.
5263         (Makefile.am): Create unistd.h always. Substitute many new variables
5264         into it.
5265
5266 2007-02-18  Bruno Haible  <bruno@clisp.org>
5267
5268         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
5269         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
5270         HAVE_GETSUBOPT.
5271         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
5272         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
5273         * lib/getsubopt.h: Remove file.
5274         * modules/getsubopt (Files): Remove lib/getsubopt.h.
5275         (Depends-on): Add stdlib.
5276         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
5277         (Includes): Use <stdlib.h> instead of getsubopt.h.
5278         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
5279         Set HAVE_GETSUBOPT.
5280         * lib/getsubopt.c: Don't include getsubopt.h.
5281
5282 2007-02-18  Bruno Haible  <bruno@clisp.org>
5283
5284         * modules/fchdir (Depends-on): Add dup2.
5285
5286 2007-02-18  Bruno Haible  <bruno@clisp.org>
5287
5288         * lib/stdlib_.h: Handle glibc's special invocation convention
5289         specially.
5290
5291 2007-02-18  Bruno Haible  <bruno@clisp.org>
5292
5293         * modules/stdlib-tests: New file.
5294         * tests/test-stdlib.c: New file.
5295
5296         * modules/mkstemp (Files): Remove lib/mkstemp.h.
5297         (Depends-on): Add stdlib.
5298         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
5299         (Includes): Use <stdlib.h> instead of mkstemp.h.
5300         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
5301         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
5302         * lib/mkstemp.c: Don't include mkstemp.h.
5303         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
5304         * lib/stdlib--.h: Don't include mkstemp.h.
5305
5306         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
5307         (Depends-on): Add stdlib.
5308         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
5309         (Includes): Use <stdlib.h> instead of mkdtemp.h.
5310         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
5311         HAVE_MKDTEMP.
5312         * lib/mkdtemp.c: Don't include mkdtemp.h.
5313         * lib/clean-temp.c: Don't include mkdtemp.h.
5314
5315         * modules/exit (Files): Remove lib/exit.h.
5316         (Depends-on): Add stdlib.
5317         (Makefile.am): Remove lib_SOURCES.
5318         (Include): Use <stdlib.h> instead of exit.h.
5319         * lib/argmatch.c: Don't include exit.h.
5320         * lib/execute.c: Likewise.
5321         * lib/pagealign_alloc.c: Likewise.
5322         * lib/pipe.c: Likewise.
5323         * lib/wait-process.c: Likewise.
5324         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
5325         * lib/exitfail.c: Likewise.
5326         * lib/savewd.c: Likewise.
5327         * lib/xsetenv.c: Likewise.
5328
5329         * modules/stdlib: New file.
5330         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
5331         and extra comments about mkstemp().
5332         * lib/exit.h: Remove file.
5333         * lib/mkdtemp.h: Remove file.
5334         * lib/mkstemp.h: Remove file.
5335         * m4/stdlib_h.m4: New file.
5336         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
5337
5338 2007-02-18  Bruno Haible  <bruno@clisp.org>
5339
5340         * modules/math-tests: New file.
5341         * tests/test-math.c: New file.
5342
5343         * modules/math: New file.
5344         * modules/mathl (Files): Remove lib/mathl.h.
5345         (Depends-on): Add math.
5346         (Makefile.am): Don't mention mathl.h.
5347         (Include): Use <math.h> instead of mathl.h.
5348         * lib/math_.h: New file.
5349         * lib/mathl.h: Remove file.
5350         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
5351         mathl.h.
5352         * lib/asinl.c: Likewise.
5353         * lib/atanl.c: Likewise.
5354         * lib/ceill.c: Likewise.
5355         * lib/cosl.c: Likewise.
5356         * lib/expl.c: Likewise.
5357         * lib/floorl.c: Likewise.
5358         * lib/frexpl.c: Likewise.
5359         * lib/ldexpl.c: Likewise.
5360         * lib/logl.c: Likewise.
5361         * lib/sincosl.c: Likewise.
5362         * lib/sinl.c: Likewise.
5363         * lib/sqrtl.c: Likewise.
5364         * lib/tanl.c: Likewise.
5365         * lib/trigl.c: Likewise.
5366         * m4/math_h.m4: New file.
5367         * MODULES.html.sh (Mathematics): Add math.
5368
5369 2007-02-17  Bruno Haible  <bruno@clisp.org>
5370
5371         * modules/wctype-tests: New file.
5372         * tests/test-wctype.c: New file.
5373
5374         * modules/wchar-tests: New file.
5375         * tests/test-wchar.c: New file.
5376
5377         * modules/unistd-tests: New file.
5378         * tests/test-unistd.c: New file.
5379
5380         * modules/time-tests: New file.
5381         * tests/test-time.c: New file.
5382
5383         * modules/sysexits-tests: New file.
5384         * tests/test-sysexits.c: New file.
5385
5386         * modules/sys_time-tests: New file.
5387         * tests/test-sys_time.c: New file.
5388
5389         * modules/sys_stat-tests: New file.
5390         * tests/test-sys_stat.c: New file.
5391
5392         * modules/sys_socket-tests: New file.
5393         * tests/test-sys_socket.c: New file.
5394
5395         * modules/sys_select-tests: New file.
5396         * tests/test-sys_select.c: New file.
5397
5398         * modules/string-tests: New file.
5399         * tests/test-string.c: New file.
5400
5401         * modules/stdbool-tests: New file.
5402         * tests/test-stdbool.c: New file.
5403
5404         * modules/netinet_in-tests: New file.
5405         * tests/test-netinet_in.c: New file.
5406
5407         * modules/inttypes-tests: New file.
5408         * tests/test-inttypes.c: New file.
5409
5410         * modules/fcntl-tests: New file.
5411         * tests/test-fcntl.c: New file.
5412
5413         * modules/byteswap-tests: New file.
5414         * tests/test-byteswap.c: New file.
5415
5416         * modules/arpa_inet-tests: New file.
5417         * tests/test-arpa_inet.c: New file.
5418
5419 2007-02-17  Bruno Haible  <bruno@clisp.org>
5420
5421         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
5422         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
5423         if the corresponding module is not enabled. Emit link warnings if
5424         the function is used nevertheless.
5425         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
5426         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
5427         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
5428         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
5429         * modules/inttypes (Depends-on): Add link-warning.
5430         (Makefile.am): Copy the contents of build-aux/link-warning.h into
5431         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
5432         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
5433         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
5434         * modules/imaxdiv (configure.ac): Likewise.
5435         * modules/strtoimax (configure.ac): Likewise.
5436         * modules/strtoumax (configure.ac): Likewise.
5437
5438 2007-02-17  Bruno Haible  <bruno@clisp.org>
5439
5440         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
5441         gl_STRING_MODULE_INDICATOR_DEFAULTS.
5442         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
5443         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
5444
5445 2007-02-17  Bruno Haible  <bruno@clisp.org>
5446
5447         * modules/link-warning: New file.
5448         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
5449         * lib/string_.h (GL_LINK_WARNING): Remove definition.
5450         * modules/string (Depends-on): Add link-warning.
5451         (Makefile.am): Copy the contents of build-aux/link-warning.h into
5452         string.h.
5453         * MODULES.html.sh (Support for building libraries and executables): Add
5454         link-warning.
5455
5456 2007-02-17  Bruno Haible  <bruno@clisp.org>
5457
5458         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
5459         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
5460         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
5461         long lines.
5462
5463 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
5464             Bruno Haible  <bruno@clisp.org>
5465
5466         * modules/tmpfile: New file.
5467         * lib/tmpfile.c: New file.
5468         * m4/tmpfile.m4: New file.
5469         * MODULES.html.sh (func_all_modules): New section "Input/output".
5470
5471 2007-02-15  Bruno Haible  <bruno@clisp.org>
5472
5473         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
5474         (supports_delete_on_close): New function.
5475         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
5476
5477 2007-02-14  Bruno Haible  <bruno@clisp.org>
5478
5479         * modules/mbspcasecmp-tests: New file.
5480         * tests/test-mbspcasecmp.sh: New file.
5481         * tests/test-mbspcasecmp.c: New file.
5482
5483         New module mbspcasecmp.
5484         * modules/mbspcasecmp: New file.
5485         * lib/mbspcasecmp.c: New file.
5486         * lib/string_.h (strncasecmp): Change warning message.
5487         (mbspcasecmp): New declaration.
5488         * m4/mbspcasecmp.m4: New file.
5489         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5490         GNULIB_MBSPCASECMP.
5491         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
5492         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
5493
5494 2007-02-14  Bruno Haible  <bruno@clisp.org>
5495
5496         * modules/mbsncasecmp-tests: New file.
5497         * tests/test-mbsncasecmp.sh: New file.
5498         * tests/test-mbsncasecmp.c: New file.
5499
5500         New module mbsncasecmp.
5501         * modules/mbsncasecmp: New file.
5502         * lib/mbsncasecmp.c: New file.
5503         * lib/string_.h (mbsncasecmp): New declaration.
5504         * m4/mbsncasecmp.m4: New file.
5505         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5506         GNULIB_MBSNCASECMP.
5507         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
5508         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
5509
5510 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
5511
5512         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
5513         Verify that it doesn't overlap with our flags.
5514         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
5515         do not have the desired effect in multibyte locales; instead, use
5516         mbscasecmp.
5517         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
5518         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
5519         we don't require GNU fnmatch ourselves (if our users require it, they
5520         should do so explicitly).
5521
5522         Fix regex code so it doesn't rely on strcasecmp.
5523         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
5524         Otherwise, include gnulib's langinfo.h.
5525         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
5526         undesirable behavior in non-C locales.  Instead, rely on localecharset.
5527         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
5528         * modules/regex (FILES): Remove m4/codeset.m4.
5529         (Depends-on): Add localcharset.  Remove strcase.
5530
5531 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5532
5533         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
5534         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
5535
5536 2007-02-13  Bruno Haible  <bruno@clisp.org>
5537
5538         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
5539         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5540
5541 2007-02-12  Bruno Haible  <bruno@clisp.org>
5542
5543         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
5544         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
5545         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
5546         time warning rather than a link error.
5547
5548 2007-02-12  Bruno Haible  <bruno@clisp.org>
5549
5550         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
5551         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
5552         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5553
5554 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
5555
5556         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
5557         args, not 2.
5558
5559 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
5560
5561         New module 'time', so that apps can include <time.h> as per
5562         POSIX and GNU instead of separate include files like time_r.h
5563         and timegm.h.  This implementation tries out a simpler approach
5564         for replacing decls in standard include files (as compared to
5565         the string module), somewhat as an experiment.
5566
5567         * config/srclist.txt: Comment out mktime.c for now.
5568         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
5569         since it doesn't apply any more.  Use generic wording instead.
5570         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
5571         'time'.
5572         * lib/time_.h, m4/time_h.m4, modules/time: New files.
5573         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
5574         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
5575         Don't include <sys/types.h>; no longer needed since we assume C89.
5576         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
5577         * lib/strftime.c: Likewise.
5578         * lib/time_r.c: Likewise.
5579         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
5580         * lib/nanosleep.c: Include <time.h> first, to check interface.
5581         * lib/strptime.c: Likewise.
5582         * lib/time_r.c: Likewise.
5583         * lib/timegm.c: Likewise.
5584         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
5585         needed.
5586         * lib/timegm.c: Don't include timegm.h; no longer needed.
5587         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
5588         time.h now handles any problems in that area.
5589         (struct timespec, nanosleep): Remove; time.h now arranges for these.
5590         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
5591         that time.h defines struct timespec.
5592         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
5593         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
5594         handles that.
5595         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
5596         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
5597         needed.  Set REPLACE_LOCALTIME.
5598         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
5599         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
5600         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
5601         nanosleep; time_h.m4 now does that.  Don't require
5602         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
5603         module handles this now.
5604         * modules/getdate (Depends-on): Remove timespec.  Add time.
5605         * modules/nanosleep (Depends-on): Likewise.
5606         * modules/stat-time (Depends-on): Likewise.
5607         * modules/nanosleep (Include): Include time.h, not timespec.h.
5608         * modules/strptime (Files): Remove lib/strptime.h.
5609         (Depends-on): Add extensions, time.
5610         (Include): Include time.h, not strptime.h.
5611         * modules/time_r (Files): Remove lib/time_r.h.
5612         (Depends-on): Add time.
5613         (Include): Include time.h, not time_r.h.
5614         * modules/timegm: Likewise.
5615         * modules/timespec (Description): Now does timespec-related decls
5616         of our own, instead of struct timespec itself.
5617         (Depends-on): Add time; remove extensions.
5618         (Maintainer): Add self.
5619         * modules/utimecmp (Depends-on): Add time; remove timespec.
5620         * modules/utimens (Depends-on): Likewise.
5621         * modules/xnanosleep (Depends-on): Likewise.
5622
5623 2007-02-11  Bruno Haible  <bruno@clisp.org>
5624
5625         * lib/c-strstr.c: Include allocsa.h.
5626         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
5627         * lib/c-strcasestr.c: Include allocsa.h.
5628         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
5629         * lib/strcasestr.c: Include allocsa.h.
5630         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
5631         * lib/mbsstr.c: Include allocsa.h.
5632         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
5633         allocsa/freesa instead of malloc/free.
5634         * lib/mbscasestr.c: Include allocsa.h.
5635         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
5636         allocsa/freesa instead of malloc/free.
5637         * modules/c-strstr (Depends-on): Add allocsa.
5638         * modules/c-strcasestr (Depends-on): Likewise.
5639         * modules/strcasestr (Depends-on): Likewise.
5640         * modules/mbsstr (Depends-on): Likewise.
5641         * modules/mbscasestr (Depends-on): Likewise.
5642
5643 2007-02-11  Bruno Haible  <bruno@clisp.org>
5644
5645         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
5646
5647         * modules/mbsspn-tests: New file.
5648         * tests/test-mbsspn.sh: New file.
5649         * tests/test-mbsspn.c: New file.
5650
5651 2007-02-11  Bruno Haible  <bruno@clisp.org>
5652
5653         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
5654
5655         * modules/mbspbrk-tests: New file.
5656         * tests/test-mbspbrk.sh: New file.
5657         * tests/test-mbspbrk.c: New file.
5658
5659 2007-02-11  Bruno Haible  <bruno@clisp.org>
5660
5661         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
5662         unneeded cast.
5663
5664         * modules/mbscspn-tests: New file.
5665         * tests/test-mbscspn.sh: New file.
5666         * tests/test-mbscspn.c: New file.
5667
5668 2007-02-11  Bruno Haible  <bruno@clisp.org>
5669
5670         * modules/mbscasecmp-tests: New file.
5671         * tests/test-mbscasecmp.sh: New file.
5672         * tests/test-mbscasecmp.c: New file.
5673
5674 2007-02-11  Bruno Haible  <bruno@clisp.org>
5675
5676         Ensure O(n) worst-case complexity of mbscasestr.
5677         * lib/mbscasestr.c: Include stdbool.h.
5678         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
5679         functions.
5680         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
5681         the bookkeeping indicates that it's worth it.
5682         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
5683
5684         * modules/mbscasestr-tests: New file.
5685         * tests/test-mbscasestr1.c: New file.
5686         * tests/test-mbscasestr2.sh: New file.
5687         * tests/test-mbscasestr2.c: New file.
5688         * tests/test-mbscasestr3.sh: New file.
5689         * tests/test-mbscasestr3.c: New file.
5690         * tests/test-mbscasestr4.sh: New file.
5691         * tests/test-mbscasestr4.c: New file.
5692         * m4/locale-tr.m4: New file.
5693
5694 2007-02-11  Bruno Haible  <bruno@clisp.org>
5695
5696         Ensure O(n) worst-case complexity of mbsstr.
5697         * lib/mbsstr.c: Include stdbool.h.
5698         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
5699         functions.
5700         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
5701         bookkeeping indicates that it's worth it.
5702         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
5703
5704         * modules/mbsstr-tests: New file.
5705         * tests/test-mbsstr1.c: New file.
5706         * tests/test-mbsstr2.sh: New file.
5707         * tests/test-mbsstr2.c: New file.
5708         * tests/test-mbsstr3.sh: New file.
5709         * tests/test-mbsstr3.c: New file.
5710         * m4/locale-fr.m4: New file.
5711
5712 2007-02-11  Bruno Haible  <bruno@clisp.org>
5713
5714         * lib/mbsrchr.c (mbsrchr): Fix bug.
5715
5716         * modules/mbsrchr-tests: New file.
5717         * tests/test-mbsrchr.sh: New file.
5718         * tests/test-mbsrchr.c: New file.
5719
5720 2007-02-11  Bruno Haible  <bruno@clisp.org>
5721
5722         * lib/mbschr.c (mbschr): Fix bug.
5723
5724         * modules/mbschr-tests: New file.
5725         * tests/test-mbschr.sh: New file.
5726         * tests/test-mbschr.c: New file.
5727         * m4/locale-zh.m4: New file.
5728
5729 2007-02-11  Bruno Haible  <bruno@clisp.org>
5730
5731         Support for copying multibyte string iterators.
5732         * lib/mbiter.h: Include <string.h>.
5733         (mbiter_multi_copy): New function.
5734         (mbi_copy): New macro.
5735         * lib/mbuiter.h: Include <string.h>.
5736         (mbuiter_multi_copy): New function.
5737         (mbui_copy): New macro.
5738
5739 2007-02-11  Bruno Haible  <bruno@clisp.org>
5740
5741         New module mbslen.
5742         * modules/mbslen: New file.
5743         * lib/mbslen.c: New file.
5744         * lib/string_.h (mbslen): New declaration.
5745         * m4/mbslen.m4: New file.
5746         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5747         GNULIB_MBSLEN.
5748         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
5749         * MODULES.html.sh (Internationalization functions): Add mbslen.
5750
5751 2007-02-11  Bruno Haible  <bruno@clisp.org>
5752
5753         Ensure O(n) worst-case complexity of strcasestr substitute.
5754         * lib/strcasestr.c: Include stdbool.h.
5755         (knuth_morris_pratt): New function.
5756         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
5757         bookkeeping indicates that it's worth it.
5758         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
5759
5760         * modules/strcasestr-tests: New file.
5761         * tests/test-strcasestr.c: New file.
5762
5763 2007-02-11  Bruno Haible  <bruno@clisp.org>
5764
5765         Ensure O(n) worst-case complexity of c_strcasestr.
5766         * lib/c-strcasestr.c: Include stdbool.h, string.h.
5767         (knuth_morris_pratt): New function.
5768         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
5769         the bookkeeping indicates that it's worth it.
5770         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
5771
5772         * modules/c-strcasestr-tests: New file.
5773         * tests/test-c-strcasestr.c: New file.
5774
5775 2007-02-11  Bruno Haible  <bruno@clisp.org>
5776
5777         Ensure O(n) worst-case complexity of c_strstr.
5778         * lib/c-strstr.c: Include stdbool.h, string.h.
5779         (knuth_morris_pratt): New function.
5780         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
5781         bookkeeping indicates that it's worth it.
5782         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
5783
5784         * lib/c-strstr.c: Complete rewrite for maintainability.
5785
5786         * modules/c-strstr-tests: New file.
5787         * tests/test-c-strstr.c: New file.
5788
5789 2007-02-11  Bruno Haible  <bruno@clisp.org>
5790
5791         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
5792         5.2.1 and earlier, whereby \055 was treated just like the range
5793         delimiter '-'.
5794         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
5795
5796 2007-02-08  Bruno Haible  <bruno@clisp.org>
5797
5798         * modules/regex (Depends-on): Add stdbool.
5799         Reported by Dalibor Topic <robilad@kaffe.org>.
5800
5801 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
5802
5803         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
5804         Prefer returning from main to exiting from it.
5805         Remove unnecessary parens after sizeof.
5806
5807 2007-02-05  Bruno Haible  <bruno@clisp.org>
5808
5809         New module mbssep.
5810         * modules/mbssep: New file.
5811         * lib/mbssep.c: New file.
5812         * lib/string_.h (strsep): Add a conditional link warning.
5813         (mbssep): New declaration.
5814         * m4/mbssep.m4: New file.
5815         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5816         GNULIB_MBSSEP.
5817         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
5818         * MODULES.html.sh (Internationalization functions): Add mbssep.
5819
5820 2007-02-05  Bruno Haible  <bruno@clisp.org>
5821
5822         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
5823         Optimize search in case of 1 delimiter.
5824
5825 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
5826
5827         * lib/acl.h: Include sys/types.h before sys/acl.h.
5828
5829 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
5830
5831         Merge upstream fix for glibc bugzilla #3957:
5832
5833         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
5834
5835         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
5836         bit for RE_HAT_LISTS_NOT_NEWLINE.
5837         (build_charclass_op): Remove bogus comment.
5838
5839 2007-02-05  Simon Josefsson  <simon@josefsson.org>
5840
5841         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
5842
5843 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
5844
5845         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
5846         * lib/memmem.c [!defined _LIBC]: Include config.h.
5847
5848 2007-02-04  Bruno Haible  <bruno@clisp.org>
5849
5850         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
5851         warning message.
5852
5853 2007-02-04  Bruno Haible  <bruno@clisp.org>
5854
5855         New module mbstok_r.
5856         * modules/mbstok_r: New file.
5857         * lib/mbstok_r.c: New file.
5858         * lib/string_.h (strtok_r): Change argument names to match the
5859         comments. Add a conditional link warning.
5860         (mbstok_r): New declaration.
5861         * m4/mbstok_r.m4: New file.
5862         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5863         GNULIB_MBSTOK_R.
5864         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
5865         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
5866
5867 2007-02-04  Bruno Haible  <bruno@clisp.org>
5868
5869         New module mbsspn.
5870         * modules/mbsspn: New file.
5871         * lib/mbsspn.c: New file.
5872         * lib/string_.h (strspn): Add a conditional link warning.
5873         (mbsspn): New declaration.
5874         * m4/mbsspn.m4: New file.
5875         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5876         GNULIB_MBSSPN.
5877         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
5878         * MODULES.html.sh (Internationalization functions): Add mbsspn.
5879
5880 2007-02-04  Bruno Haible  <bruno@clisp.org>
5881
5882         New module mbspbrk.
5883         * modules/mbspbrk: New file.
5884         * lib/mbspbrk.c: New file.
5885         * lib/string_.h (strpbrk): Add a conditional link warning.
5886         (mbspbrk): New declaration.
5887         * m4/mbspbrk.m4: New file.
5888         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5889         GNULIB_MBSPBRK.
5890         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
5891         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
5892
5893 2007-02-04  Bruno Haible  <bruno@clisp.org>
5894
5895         New module mbscspn.
5896         * modules/mbscspn: New file.
5897         * lib/mbscspn.c: New file.
5898         * lib/string_.h (strcspn): Add a conditional link warning.
5899         (mbscspn): New declaration.
5900         * m4/mbscspn.m4: New file.
5901         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5902         GNULIB_MBSCSPN.
5903         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
5904         * MODULES.html.sh (Internationalization functions): Add mbscspn.
5905
5906 2007-02-04  Bruno Haible  <bruno@clisp.org>
5907
5908         New module mbscasestr, reduced goal of strcasestr.
5909         * modules/mbscasestr: New file.
5910         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
5911         (mbscasestr): Renamed from strcasestr.
5912         * lib/strcasestr.c: Don't include mbuiter.h.
5913         (strcasestr): Remove support for multibyte locales.
5914         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
5915         Change the conditional link warning.
5916         (mbscasestr): New declaration.
5917         * m4/mbscasestr.m4: New file.
5918         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
5919         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
5920         REPLACE_STRCASESTR.
5921         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
5922         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
5923         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
5924         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
5925         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
5926         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
5927         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
5928         (Depends-on): Remove mbuiter.
5929         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
5930
5931 2007-02-04  Bruno Haible  <bruno@clisp.org>
5932
5933         Simplify handling of strncasecmp.
5934         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
5935         the conditional link warning.
5936         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
5937         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
5938         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
5939         * modules/strcase (configure.ac): Don't invoke
5940         gl_STRING_MODULE_INDICATOR.
5941         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
5942
5943 2007-02-04  Bruno Haible  <bruno@clisp.org>
5944
5945         New module mbscasecmp, reduced goal of strcasecmp.
5946         * modules/mbscasecmp: New file.
5947         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
5948         (mbscasecmp): Renamed from strcasecmp.
5949         * lib/strcasecmp.c: Don't include mbuiter.h.
5950         (strcasecmp): Remove support for multibyte locales.
5951         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
5952         Change the conditional link warning.
5953         (mbscasecmp): New declaration.
5954         * m4/mbscasecmp.m4: New file.
5955         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
5956         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
5957         REPLACE_STRCASECMP.
5958         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
5959         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5960         GNULIB_MBSCASECMP.
5961         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
5962         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
5963         * modules/strcase (Files): Remove m4/mbrtowc.m4.
5964         (Depends-on): Remove mbuiter.
5965         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
5966
5967 2007-02-04  Bruno Haible  <bruno@clisp.org>
5968
5969         New module mbsstr. Remove module strstr.
5970         * modules/mbsstr: New file.
5971         * modules/strstr: Remove file.
5972         * lib/mbsstr.c: Renamed from lib/strstr.c.
5973         (mbsstr): Renamed from strstr.
5974         * lib/string_.h (strstr): Remove declaration. Change the conditional
5975         link warning.
5976         (mbsstr): New declaration.
5977         * m4/mbsstr.m4: New file.
5978         * m4/strstr.m4: Remove file.
5979         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
5980         REPLACE_STRSTR.
5981         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
5982         Don't initialize GNULIB_STRSTR.
5983         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
5984         substitute GNULIB_STRSTR and REPLACE_STRSTR.
5985         * MODULES.html.sh (Internationalization functions): Add mbsstr.
5986         (Support for systems lacking ANSI C 89): Remove strstr.
5987
5988 2007-02-04  Bruno Haible  <bruno@clisp.org>
5989
5990         New module mbsrchr.
5991         * modules/mbsrchr: New file.
5992         * lib/mbsrchr.c: New file.
5993         * lib/string_.h (strrchr): Add a conditional link warning.
5994         (mbsrchr): New declaration.
5995         * m4/mbsrchr.m4: New file.
5996         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5997         GNULIB_MBSRCHR.
5998         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
5999         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
6000
6001 2007-02-04  Bruno Haible  <bruno@clisp.org>
6002
6003         New module mbschr.
6004         * modules/mbschr: New file.
6005         * lib/mbschr.c: New file.
6006         * lib/string_.h (strchr): Add a conditional link warning.
6007         (mbschr): New declaration.
6008         * m4/mbschr.m4: New file.
6009         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6010         GNULIB_MBSCHR.
6011         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
6012         * MODULES.html.sh (Internationalization functions): Add mbschr.
6013
6014 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
6015
6016         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
6017
6018         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
6019
6020 2007-02-04  Bruno Haible  <bruno@clisp.org>
6021
6022         New module description section 'configure.ac-early'.
6023         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
6024         (func_get_autoconf_early_snippet): New function.
6025         (func_import, func_create_testdir): Use it. Remove special cases for
6026         modules 'extensions' and 'lock'.
6027         * modules/extensions (configure.ac-early): Require
6028         gl_USE_SYSTEM_EXTENSIONS.
6029         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
6030
6031 2007-02-04  Bruno Haible  <bruno@clisp.org>
6032
6033         Make use of gcj-4.3's -fsource and -ftarget option.
6034         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
6035         and if so try the options -fsource and -ftarget.
6036         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
6037         source_version, ftarget_option, target_version arguments.
6038         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
6039         (is_envjavac_oldgcj_14_14_usable): Renamed from
6040         is_envjavac_gcj_14_14_usable.
6041         (is_envjavac_oldgcj_14_13_usable): Renamed from
6042         is_envjavac_gcj_14_13_usable.
6043         (is_gcj_present): Update.
6044         (is_gcj_43, is_gcj43_usable): New functions.
6045         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
6046         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
6047         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
6048         try the options -fsource and -ftarget.
6049
6050 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
6051
6052         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
6053         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
6054         larger value.
6055
6056 2007-02-03  Jim Meyering  <jim@meyering.net>
6057
6058         Give tools a better chance to allocate space for very large buffers.
6059         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
6060
6061         Make pwd and readlink work also when run with an unreadable parent dir
6062         on systems with openat support.
6063         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
6064         provided getcwd function, even when we have openat support.
6065         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
6066
6067 2007-02-02  Bruno Haible  <bruno@clisp.org>
6068
6069         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
6070         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
6071         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
6072         portability problems if one of these functions is only used on specific
6073         platforms.
6074         Reported by Paul Eggert.
6075
6076 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
6077
6078         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
6079         is causing more trouble than it's curing.
6080         * lib/regex_internal.h (__mempcpy): Remove.
6081         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
6082         (and make the code a tad smaller to boot).
6083         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
6084
6085 2007-02-02  Jim Meyering  <jim@meyering.net>
6086
6087         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
6088         section, not in the Makefile.am: one.
6089
6090 2007-02-02  Eric Blake  <ebb9@byu.net>
6091
6092         * lib/strchrnul.c: Always include config.h first.
6093
6094         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
6095         gnulib strstr is not necessary here.
6096
6097 2007-02-02  Simon Josefsson  <simon@josefsson.org>
6098
6099         * m4/socklen.m4: Fix typo.
6100
6101 2007-02-02  Eric Blake  <ebb9@byu.net>
6102
6103         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
6104         * modules/netinet_in (Makefile.am): Likewise.
6105
6106 2007-02-01  Bruno Haible  <bruno@clisp.org>
6107
6108         * lib/string_.h (GL_LINK_WARNING): New macro.
6109         (strcasecmp, strstr, strcasestr): If provided by the system,
6110         conditionally define as a macro that leads to a warning instead of to
6111         an error.
6112         (strncasecmp): Conditionally define as a macro that leads to a warning.
6113
6114 2007-02-01  Karl Berry  <karl@gnu.org>
6115
6116         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
6117
6118 2007-02-01  Bruno Haible  <bruno@clisp.org>
6119
6120         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
6121         renamings.
6122
6123 2007-02-01  Eric Blake  <ebb9@byu.net>
6124
6125         * modules/regex (Depends-on): Revert dependence on mempcpy.
6126         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
6127         module's definition of mempcpy.
6128         Reported by Paul Eggert.
6129
6130 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
6131
6132         * lib/string_.h: If the gnulib module XYZ is not present, undefine
6133         the symbol XYZ before redefining it.  This fixes a problem with
6134         programs that don't use XYZ, when compiled on systems that define
6135         XYZ to something else.
6136
6137 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
6138
6139         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
6140         occurs when "mkdir -m foo" creates a setgid directory that is (1)
6141         writeable to group or other and (2) is intended to have a special
6142         mode bit that is set or cleared.  In such a case, the directory
6143         should be neither group- nor other-writeable until the special
6144         mode bits are right.
6145
6146 2007-01-31  Eric Blake  <ebb9@byu.net>
6147
6148         * modules/mountlist (Depends-on): Add strstr.
6149
6150         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
6151         bug.
6152         * modules/string (Makefile.am): Remove redundant replacement.
6153         * modules/regex (Depends-on): Add mempcpy.
6154
6155 2007-01-31  Bruno Haible  <bruno@clisp.org>
6156
6157         New module description field 'Link'.
6158         * gnulib-tool (func_usage): Document --extract-link-directive.
6159         (sed_extract_prog): Recognize 'Link' directive.
6160         (func_get_link_directive): New function.
6161         (func_import): Show summary of link directives.
6162         Handle --extract-link-directive option.
6163         * modules/acl (Link): New section.
6164         * modules/clock-time (Link): New section.
6165         * modules/euidaccess (Link): New section.
6166         * modules/gettext (Link): New section.
6167         * modules/iconv (Link): New section.
6168         * modules/lock (Link): New section.
6169         * modules/nanosleep (Link): New section.
6170         * modules/readline (Link): New section.
6171
6172 2007-01-27  Bruno Haible  <bruno@clisp.org>
6173
6174         Enforce the use of gnulib modules for unportable <string.h> functions.
6175         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
6176         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
6177         (gl_HEADER_STRING_H_BODY): Require it.
6178         * lib/string_.h: If the gnulib module XYZ is not present, redefine
6179         the symbol XYZ to one that gives a link error.
6180         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
6181         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
6182         * modules/mempcpy (configure.ac): Likewise.
6183         * modules/memrchr (configure.ac): Likewise.
6184         * modules/stpcpy (configure.ac): Likewise.
6185         * modules/stpncpy (configure.ac): Likewise.
6186         * modules/strcase (configure.ac): Likewise.
6187         * modules/strcasestr (configure.ac): Likewise.
6188         * modules/strchrnul (configure.ac): Likewise.
6189         * modules/strdup (configure.ac): Likewise.
6190         * modules/strndup (configure.ac): Likewise.
6191         * modules/strnlen (configure.ac): Likewise.
6192         * modules/strpbrk (configure.ac): Likewise.
6193         * modules/strsep (configure.ac): Likewise.
6194         * modules/strstr (configure.ac): Likewise.
6195         * modules/strtok_r (configure.ac): Likewise.
6196
6197 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
6198
6199         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
6200
6201 2007-01-30  Jim Meyering  <jim@meyering.net>
6202
6203         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
6204
6205 2007-01-29  Bruno Haible  <bruno@clisp.org>
6206
6207         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
6208         * lib/execute.c: Likewise.
6209         * lib/pipe.c: Likewise.
6210         * lib/printf-args.h: Likewise.
6211         * lib/printf-args.c: Likewise.
6212         * lib/printf-parse.c: Likewise.
6213         * lib/vasnprintf.c: Likewise.
6214
6215 2007-01-29  Eric Blake  <ebb9@byu.net>
6216
6217         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
6218         declaration.
6219
6220 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
6221
6222         * lib/strptime.h (strptime): Use 'restrict' for args where
6223         POSIX requires this.
6224         * lib/strptime.c (strptime): Likewise.
6225         Change license notice from LGPL to GPL, since gnulib-tool will
6226         change this as needed.
6227         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
6228         defined.
6229         Include "strptime.h" first, to check interface.
6230         Do not #undef _LIBC and _NL_CURRENT.
6231         Do not include <stdlib.h>; no longer needed.
6232         Include "time_r.h" and declare ptime_locale_status
6233         only if _LIBC is not defined.
6234         (__P): Remove unused macro.
6235         (match_string): Bring back glibc version, but use it only if _LIBC
6236         is defined.
6237         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
6238         Remove unnecessary assertion and abort() call.
6239         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
6240         * m4/strptime.m4: Fix serial number comment.
6241         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
6242         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
6243         (Depends-on): Add time_r.
6244
6245 2007-01-29  Bruno Haible  <bruno@clisp.org>
6246
6247         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
6248         strptime.
6249         * modules/strptime (Depends-on): Add stdbool.
6250         * lib/strptime.h: Include <time.h> always. Add comments.
6251
6252 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
6253
6254         * modules/strptime: New file.
6255         * lib/strptime.h: New file.
6256         * lib/strptime.c: New file.
6257         * m4/strptime.m4: New file.
6258
6259 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
6260
6261         * MODULES.html.sh: New module mpsort.
6262         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
6263
6264         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
6265         a circularity problem with HP-UX ia64 reported by Bob Proulx in
6266         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
6267         All uses changed.
6268         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
6269         All uses changed.
6270         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
6271         to _Restrict_.
6272         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
6273         the parameter matches the prototype.
6274
6275 2007-01-28  Jim Meyering  <jim@meyering.net>
6276
6277         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
6278         sys/time.h here, reverting that part of the previous patch:
6279         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
6280
6281 2007-01-28  Bruno Haible  <bruno@clisp.org>
6282
6283         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
6284         value of $(SYS_TIME_H).
6285         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
6286         remove it conditionally, too. [added by Jim Meyering]
6287         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
6288         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
6289         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
6290         GETTIMEOFDAY_REPLACEMENT to 1.
6291
6292 2007-01-28  Bruno Haible  <bruno@clisp.org>
6293
6294         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
6295         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
6296         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
6297         Set UNISTD_H instead of UNISTD_H2.
6298         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
6299
6300 2007-01-28  Bruno Haible  <bruno@clisp.org>
6301
6302         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
6303         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
6304
6305 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6306
6307         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
6308         (func_create_testdir): Ensure C locale for `grep' and `tr'
6309         character ranges.
6310         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
6311         ACLOCAL_AMFLAGS parsing state machine.
6312
6313 2007-01-27  Bruno Haible  <bruno@clisp.org>
6314
6315         * modules/unistr/base: Update.
6316
6317 2007-01-27  Bruno Haible  <bruno@clisp.org>
6318
6319         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
6320         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
6321         * modules/unistr/u32-mbtouc-unsafe: Renamed from
6322         modules/unistr/u32-mbtouc.
6323         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
6324         * lib/unistr.h: Update.
6325         * lib/linebreak.c: Update.
6326         * modules/unistr/u32-mbtouc: Renamed from
6327         modules/unistr/u32-mbtouc-safe.
6328         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
6329         * lib/unistr.h: Update.
6330         * lib/unistr/u32-to-u8.c: Update.
6331         * lib/unistr/u32-to-u16.c: Update.
6332
6333 2007-01-27  Bruno Haible  <bruno@clisp.org>
6334
6335         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
6336         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
6337         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
6338         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
6339         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
6340         * modules/unistr/u16-mbtouc-unsafe: Renamed from
6341         modules/unistr/u16-mbtouc.
6342         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
6343         * lib/unistr.h: Update.
6344         * lib/linebreak.c: Update.
6345         * modules/linebreak: Update.
6346         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
6347         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
6348         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
6349         * modules/unistr/u16-mbtouc: Renamed from
6350         modules/unistr/u16-mbtouc-safe.
6351         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
6352         * lib/unistr.h: Update.
6353         * lib/unistr/u16-to-u8.c: Update.
6354         * modules/unistr/u16-to-u8: Update.
6355         * lib/unistr/u16-to-u32.c: Update.
6356         * modules/unistr/u16-to-u32: Update.
6357
6358 2007-01-27  Bruno Haible  <bruno@clisp.org>
6359
6360         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
6361         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
6362         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
6363         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
6364         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
6365         * modules/unistr/u8-mbtouc-unsafe: Renamed from
6366         modules/unistr/u8-mbtouc.
6367         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
6368         * lib/unistr.h: Update.
6369         * lib/striconveh.c: Update.
6370         * modules/striconveh: Update.
6371         * lib/linebreak.c: Update.
6372         * modules/linebreak: Update.
6373         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
6374         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
6375         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
6376         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
6377         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
6378         * lib/unistr.h: Update.
6379         * lib/striconveh.c: Update.
6380         * modules/striconveh: Update.
6381         * lib/unistr/u8-to-u16.c: Update.
6382         * modules/unistr/u8-to-u16: Update.
6383         * lib/unistr/u8-to-u32.c: Update.
6384         * modules/unistr/u8-to-u32: Update.
6385
6386 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6387
6388         Sync from Libtool.
6389         * lib/argz.c: Do not include strings.h nor memory.h, include
6390         string.h unconditionally.  Patch by Simon Josefsson.
6391
6392 2007-01-27  Bruno Haible  <bruno@clisp.org>
6393
6394         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
6395         from gl_HEADER_STRING_H_BODY.
6396         (gl_HEADER_STRING_H_BODY): Require it.
6397         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
6398         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
6399         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
6400         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
6401         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
6402         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
6403         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
6404         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
6405         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
6406         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
6407         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
6408         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
6409         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
6410         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
6411         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
6412
6413 2007-01-27  Bruno Haible  <bruno@clisp.org>
6414
6415         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
6416         check_PROGRAMS into noinst_PROGRAMS.
6417         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
6418         check_PROGRAMS in this case.
6419         (func_import): Set for_test to false.
6420         (func_create_testdir): Set for_test to true.
6421
6422 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
6423             Bruno Haible  <bruno@clisp.org>
6424
6425         * modules/strcasestr (Files): Remove lib/strcasestr.h.
6426         (Depends-on): Add string.
6427         (Includes): Use <string.h> instead of strcasestr.h.
6428         * modules/string (Makefile.am): Also substitute the value of
6429         REPLACE_STRCASESTR.
6430         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
6431         assume strcasestr is declared in <string.h> not <strings.h>. Also
6432         set REPLACE_STRCASESTR.
6433         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
6434         REPLACE_STRCASESTR.
6435         * lib/strcasestr.h: Remove file.
6436         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
6437         * lib/string_.h (strcasestr): New declaration.
6438
6439 2007-01-27  Bruno Haible  <bruno@clisp.org>
6440
6441         * lib/string_.h: Use 'extern'.
6442
6443 2007-01-27  Jim Meyering  <jim@meyering.net>
6444
6445         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
6446         of set-but-not-used local, "q".
6447
6448         * lib/mempcpy.c: Include <config.h> before <string.h>.
6449         This fixes a compilation error on HP-UX, due to the system's
6450         "restrict"-using mempcpy prototype.
6451
6452 2007-01-26  Bruno Haible  <bruno@clisp.org>
6453
6454         Small optimization.
6455         * lib/javacomp.c: Include c-strstr.h.
6456          (is_envjavac_gcj): Use c_strstr instead of strstr.
6457         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
6458
6459 2007-01-26  Bruno Haible  <bruno@clisp.org>
6460
6461         * MODULES.html.sh (Unicode string functions): Add the new modules.
6462
6463         * modules/uniconv/u32-strconv-to-locale: New file.
6464         * lib/uniconv/u32-strconv-to-locale.c: New file.
6465
6466         * modules/uniconv/u16-strconv-to-locale: New file.
6467         * lib/uniconv/u16-strconv-to-locale.c: New file.
6468
6469         * modules/uniconv/u8-strconv-to-locale: New file.
6470         * lib/uniconv/u8-strconv-to-locale.c: New file.
6471
6472         * modules/uniconv/u32-strconv-from-locale: New file.
6473         * lib/uniconv/u32-strconv-from-locale.c: New file.
6474
6475         * modules/uniconv/u16-strconv-from-locale: New file.
6476         * lib/uniconv/u16-strconv-from-locale.c: New file.
6477
6478         * modules/uniconv/u8-strconv-from-locale: New file.
6479         * lib/uniconv/u8-strconv-from-locale.c: New file.
6480
6481         * modules/uniconv/u32-strconv-to-enc: New file.
6482         * lib/uniconv/u32-strconv-to-enc.c: New file.
6483         * modules/uniconv/u32-strconv-to-enc-tests: New file.
6484         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
6485
6486         * modules/uniconv/u16-strconv-to-enc: New file.
6487         * lib/uniconv/u16-strconv-to-enc.c: New file.
6488         * lib/uniconv/u-strconv-to-enc.h: New file.
6489         * modules/uniconv/u16-strconv-to-enc-tests: New file.
6490         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
6491
6492         * modules/uniconv/u8-strconv-to-enc: New file.
6493         * lib/uniconv/u8-strconv-to-enc.c: New file.
6494         * modules/uniconv/u8-strconv-to-enc-tests: New file.
6495         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
6496
6497         * modules/uniconv/u32-strconv-from-enc: New file.
6498         * lib/uniconv/u32-strconv-from-enc.c: New file.
6499         * modules/uniconv/u32-strconv-from-enc-tests: New file.
6500         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
6501
6502         * modules/uniconv/u16-strconv-from-enc: New file.
6503         * lib/uniconv/u16-strconv-from-enc.c: New file.
6504         * modules/uniconv/u16-strconv-from-enc-tests: New file.
6505         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
6506
6507         * modules/uniconv/u8-strconv-from-enc: New file.
6508         * lib/uniconv/u8-strconv-from-enc.c: New file.
6509         * lib/uniconv/u-strconv-from-enc.h: New file.
6510         * modules/uniconv/u8-strconv-from-enc-tests: New file.
6511         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
6512
6513         * modules/uniconv/u32-conv-from-enc: New file.
6514         * lib/uniconv/u32-conv-from-enc.c: New file.
6515         * modules/uniconv/u32-conv-from-enc-tests: New file.
6516         * tests/uniconv/test-u32-conv-from-enc.c: New file.
6517
6518         * modules/uniconv/u16-conv-from-enc: New file.
6519         * lib/uniconv/u16-conv-from-enc.c: New file.
6520         * lib/uniconv/u-conv-from-enc.h: New file.
6521         * modules/uniconv/u16-conv-from-enc-tests: New file.
6522         * tests/uniconv/test-u16-conv-from-enc.c: New file.
6523
6524         * modules/uniconv/u8-conv-from-enc: New file.
6525         * lib/uniconv/u8-conv-from-enc.c: New file.
6526         * modules/uniconv/u8-conv-from-enc-tests: New file.
6527         * tests/uniconv/test-u8-conv-from-enc.c: New file.
6528
6529         * modules/uniconv/base: New file.
6530         * lib/uniconv.h: New file.
6531
6532 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
6533
6534         * doc/gnulib-tool.texi (Initial import): Update to match current
6535         behavior with strdup module.
6536         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
6537         * lib/memmem.h: Remove; all uses removed.  This is now done
6538         by <string.h>.
6539         * lib/mempcpy.h: Likewise.
6540         * lib/memrchr.h: Likewise.
6541         * lib/stpcpy.h: Likewise.
6542         * lib/stpncpy.h: Likewise.
6543         * lib/strcase.h: Likewise.
6544         * lib/strchrnul.h: Likewise.
6545         * lib/strdup.h: Likewise.
6546         * lib/strndup.h: Likewise.
6547         * lib/strnlen.h: Likewise.
6548         * lib/strpbrk.h: Likewise.
6549         * lib/strsep.h: Likewise.
6550         * lib/strstr.h: Likewise.
6551         * lib/strtok_r.h: Likewise.
6552         * lib/string_.h: New file.
6553         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
6554         Rely on <string.h> instead.
6555         * lib/canon-host.c: Likewise.
6556         * lib/chdir-long.c: Likewise.
6557         * lib/concatpath.c: Likewise.
6558         * lib/exclude.c: Likewise.
6559         * lib/fchdir.c: Likewise.
6560         * lib/getaddrinfo.c: Likewise.
6561         * lib/getcwd.c: Likewise.
6562         * lib/getsubopt.c: Likewise.
6563         * lib/glob.c: Likewise.
6564         * lib/hard-locale.c: Likewise.
6565         * lib/iconvme.c: Likewise.
6566         * lib/javacomp.c: Likewise.
6567         * lib/mempcpy.c: Likewise.
6568         * lib/memrchr.c: Likewise.
6569         * lib/regex_internal.h: Likewise.
6570         * lib/stpncpy.c: Likewise.
6571         * lib/strcasecmp.c: Likewise.
6572         * lib/strchrnul.c: Likewise.
6573         * lib/strdup.c: Likewise.
6574         * lib/striconv.c: Likewise.
6575         * lib/striconveh.c: Likewise.
6576         * lib/striconveha.c: Likewise.
6577         * lib/strncasecmp.c: Likewise.
6578         * lib/strndup.c: Likewise.
6579         * lib/strnlen.c: Likewise.
6580         * lib/strsep.c: Likewise.
6581         * lib/strstr.c: Likewise.
6582         * lib/strtok_r.c: Likewise.
6583         * lib/userspec.c: Likewise.
6584         * lib/w32spawn.h: Likewise.
6585         * lib/xstrndup.c: Likewise.
6586         * lib/mountlist.c (strstr): Remove decl.
6587         * m4/string_h.m4: New file.
6588         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
6589         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
6590         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
6591         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
6592         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
6593         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
6594         Set REPLACE_STRCASECMP if necessary.
6595         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
6596         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
6597         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
6598         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
6599         HAVE_DECL_STRDUP if necessary.
6600         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
6601         since gl_FUNC_STRNDUP does that now.
6602         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
6603         Check for decl here...
6604         (gl_PREREQ_STRNLEN): ... not here.
6605         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
6606         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
6607         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
6608         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
6609         necessary.
6610         * modules/string: New file.
6611         * modules/memmem (Files): Remove special-purpose include file.
6612         (Depends-on): Add string.
6613         (Include): Include <string.h>, not the removed file.
6614         * modules/mempcpy: Likewise.
6615         * modules/memrchr: Likewise.
6616         * modules/stpcpy: Likewise.
6617         * modules/stpncpy: Likewise.
6618         * modules/strcase: Likewise.
6619         * modules/strchrnul: Likewise.
6620         * modules/strdup: Likewise.
6621         * modules/strndup: Likewise.
6622         * modules/strnlen: Likewise.
6623         * modules/strpbrk: Likewise.
6624         * modules/strsep: Likewise.
6625         * modules/strstr: Likewise.
6626         * modules/strtok_r: Likewise.
6627         * tests/test-dirname.c: Don't include "strdup.h", since
6628         <string.h> now suffices.
6629         * tests/test-memmem.c: Don't include "memmem.h", since
6630         <string.h> now suffices.
6631
6632 2007-01-25  Bruno Haible  <bruno@clisp.org>
6633
6634         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
6635         *resultp is 0.
6636
6637         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
6638         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
6639         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
6640         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
6641
6642         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
6643         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
6644         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
6645         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
6646         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
6647         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
6648
6649 2007-01-24  Bruno Haible  <bruno@clisp.org>
6650
6651         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
6652         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
6653         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
6654         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
6655         gl_FUNC_FTS_CORE.
6656         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
6657         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
6658         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
6659         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
6660         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
6661         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
6662         gl_FUNC_FCHOWNAT.
6663         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
6664         gl_FUNC_STRFTIME.
6665         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
6666         Reported by Ralf Wildenhues.
6667
6668 2007-01-24  Bruno Haible  <bruno@clisp.org>
6669
6670         Drop AC_REQUIRE calls that are redundant with the module dependencies.
6671         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
6672         gl_GETADDRINFO.
6673         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
6674         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
6675         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
6676
6677 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
6678
6679         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
6680         Don't use 'exit'; just return from 'main'.
6681         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
6682
6683         * lib/fnmatch_.h: Readjust white space and comments to match
6684         glibc, to avoid spurious diffs.
6685
6686 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
6687
6688         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
6689         2004-12-01 change by Jakub Jelinek, since this code won't compile
6690         if !LIBC.  Problem reported by Bob Proulx.
6691
6692 2007-01-23  Bruno Haible  <bruno@clisp.org>
6693
6694         * lib/striconveh.c: Include c-strcaseeq.h.
6695         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
6696         * modules/striconveh (Depends-on): Add c-strcaseeq.
6697
6698 2007-01-23  Bruno Haible  <bruno@clisp.org>
6699
6700         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
6701
6702         * modules/c-strcaseeq: New file.
6703         * lib/c-strcaseeq.h: New file.
6704
6705         * modules/streq: New file.
6706         * lib/streq.h: New file.
6707
6708 2007-01-23  Bruno Haible  <bruno@clisp.org>
6709
6710         * modules/striconveha-tests: New file.
6711         * tests/test-striconveha.c: New file.
6712
6713         * lib/striconveha.h: Include <stdbool.h>.
6714         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
6715         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
6716         (mem_iconveha_notranslit): Renamed from mem_iconveha.
6717         (mem_iconveha): New function.
6718         (str_iconveha_notranslit): Renamed from str_iconveha.
6719         (str_iconveha): New function.
6720         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
6721         c-strcase.
6722
6723 2007-01-23  Bruno Haible  <bruno@clisp.org>
6724
6725         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
6726         encodings without forgiving before trying any encoding with handler.
6727         (str_iconveha): Try all encodings without forgiving before trying any
6728         encoding with handler.
6729
6730 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
6731
6732         Import the following changes from libc.
6733
6734         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
6735
6736         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
6737
6738         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
6739
6740         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
6741         normal_bracket label.
6742
6743         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
6744
6745         [BZ #361]
6746         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
6747         to normal_bracket after fetching the next character.
6748
6749 2007-01-22  Bruno Haible  <bruno@clisp.org>
6750
6751         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
6752         argument.
6753         * lib/striconveh.c (iconv_carefully_1): New function.
6754         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
6755         argument.
6756         (str_cd_iconveh): Update.
6757         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
6758         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
6759         * tests/test-striconveh.c (MAGIC): New macro.
6760         (new_offsets): New function.
6761         (main): Test call with and without offsets.
6762
6763 2007-01-22  Bruno Haible  <bruno@clisp.org>
6764
6765         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
6766         * modules/sys_select (Makefile.am): Likewise.
6767         * modules/sys_socket (Makefile.am): Likewise.
6768         * modules/sys_time (Makefile.am): Likewise.
6769
6770 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
6771
6772         * modules/gettimeofday (License): Change from GPL to LGPL, since
6773         gettimeofday is a library function.
6774
6775 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6776
6777         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
6778
6779 2007-01-21  Bruno Haible  <bruno@clisp.org>
6780
6781         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
6782
6783 2007-01-21  Bruno Haible  <bruno@clisp.org>
6784
6785         * modules/striconveha: New file.
6786         * lib/striconveha.h: New file.
6787         * lib/striconveha.c: New file.
6788         * MODULES.html.sh (Internationalization functions): Add striconveha.
6789         * lib/striconv.c (str_iconv): Optimize the case of an empty input
6790         string.
6791         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
6792
6793 2007-01-21  Bruno Haible  <bruno@clisp.org>
6794
6795         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
6796         * lib/striconveh.c (str_iconveh): Likewise.
6797
6798 2007-01-21  Bruno Haible  <bruno@clisp.org>
6799
6800         * lib/striconveh.h (mem_iconveh): New declaration.
6801         * lib/striconveh.c (mem_iconveh): New function.
6802         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
6803
6804 2007-01-21  Bruno Haible  <bruno@clisp.org>
6805
6806         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
6807
6808         * lib/striconveh.h (mem_cd_iconveh): Change specification.
6809         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
6810         original result buffer.
6811         (str_cd_iconveh): Update.
6812         * tests/test-striconveh.c (main): Update.
6813
6814         * lib/striconv.h (mem_cd_iconv): Change specification.
6815         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
6816         result buffer.
6817         (str_cd_iconv): Update.
6818         * tests/test-striconv.c (main): Update.
6819
6820 2007-01-21  Bruno Haible  <bruno@clisp.org>
6821
6822         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
6823
6824 2007-01-20  Jim Meyering  <jim@meyering.net>
6825
6826         * lib/userspec.c (parse_with_separator): If a user or group string
6827         starts with "+", skip the corresponding name-to-ID look-up, since
6828         such a look-up must fail: user and group names may not include "+".
6829
6830 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
6831
6832         * lib/poll.c: Include sys/time.h and time.h unconditionally,
6833         since we now assume the sys_time module.
6834         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
6835         check for sys/time.h; no longer needed.
6836         * modules/poll (Depends-on): Depend on sys_time.
6837
6838 2007-01-18  Bruno Haible  <bruno@clisp.org>
6839
6840         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
6841         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
6842
6843         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
6844         gettimeofday.
6845
6846         * tests/test-gettimeofday.c: Include <time.h>.
6847         (dummy): Remove variable.
6848
6849         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
6850         gl_HEADER_SYS_TIME_H.
6851         (gl_HEADER_SYS_TIME_H): New macro.
6852
6853         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
6854         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6855         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
6856         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
6857         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6858         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
6859         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
6860         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6861         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
6862         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
6863         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6864
6865         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
6866         last change; it caused a compilation error when cross-compiling to
6867         Cygwin.
6868
6869 2007-01-18  Jim Meyering  <jim@meyering.net>
6870
6871         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
6872         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
6873         than the race-prone "test -d sys || mkdir sys".
6874         (configure.ac): Use AC_PROG_MKDIR_P.
6875         * modules/sys_select: Likewise.
6876         * modules/sys_socket: Likewise.
6877         * modules/sys_time: Likewise.
6878
6879 2007-01-18  Eric Blake  <ebb9@byu.net>
6880
6881         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
6882         replace gettimeofday.
6883         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
6884         name, to avoid infinite recursion.
6885
6886 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
6887
6888         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
6889         module sys_time.
6890         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
6891         assume timespec.h defines struct timeval.
6892         * lib/settime.c: Likewise.
6893         * lib/utimens.c: Likewise.
6894         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
6895         since we now assume the gettimeofday module.
6896         * lib/tempname.c (__gen_tempname): Likewise.
6897         * lib/gettimeofday.h: Remove.
6898         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
6899         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
6900         Include <time.h>, for 'time()'.
6901         (localtime_buffer_addr): Also use this workaround if
6902         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
6903         to simplify the uses.  All uses changed.
6904         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
6905         that #undef is inside {}, and 'const' follows type name consistently.
6906         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
6907         (gettimeofday): Do not use the maximum possible value for
6908         tv->tv_usec, since that might break usages other than ls.c.
6909         Instead, we'll leave ls.c alone.  This undoes today's patch
6910         by Bruno.  Add a compile-time warning for 1s-clock resolution;
6911         we've never observed the problem but might as well keep the
6912         canary.
6913         * lib/nanosleep.c: Include timespec.h first, for interface check.
6914         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
6915         now assume the sys_time module.
6916         * lib/tempname.c: Likewise.
6917         * lib/timespec.h: Likewise.
6918         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
6919         needed.
6920         * lib/strftime.c: Likewise.
6921         * lib/timespec.h: Likewise.
6922         * lib/posixtm.c: Include posixtm.h first, for interface check.
6923         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
6924         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
6925         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
6926         * lib/sys_time_.h: New file.
6927         * lib/timespec.h (struct timespec): Use long int, not long.
6928         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
6929         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
6930         Remove obsolescent call to AC_HEADER_TIME.
6931         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
6932         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
6933         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
6934         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
6935         Likewise.
6936         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
6937         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
6938         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
6939         into the sys_time module.  Check for gettimeofday just once.
6940         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
6941         for gettimeofday signature to just check the signature.  Merely
6942         compile it, since linking doesn't test signature.  Improve test for
6943         whether gettimeofday.o is actually needed.
6944         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
6945         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
6946         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
6947         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6948         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
6949         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
6950         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
6951         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
6952         than worrying about sys/time.h.
6953         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
6954         Don't bother worrying about TIME_WITH_SYS_TIME.
6955         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
6956         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
6957         * m4/sys_time_h.m4: New file.
6958         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
6959         Don't include sys/time.h.  Return from main rather than exiting.
6960         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
6961         all uses changed.
6962         * modules/gethrxtime (Depends-on): Add sys_time.
6963         * modules/gettime (Depends-on): Likewise.
6964         * modules/gettimeofday (Depends-on): Likewise.
6965         * modules/nanosleep (Depends-on): Likewise.
6966         * modules/settime (Depends-on): Likewise.
6967         * modules/tempname (Depends-on): Likewise.
6968         * modules/utimens (Depends-on): Likewise.
6969         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
6970         (Include:) Change back to <sys/time.h>.
6971         (Maintainer:) Add self.
6972         * modules/sys_time: New file.
6973         * modules/tempname (Depends-on): Add gettimeofday.
6974         * tests/test-gettimeofday.c: Include <sys/time.h>
6975         rather than gettimeofday.h.
6976
6977 2007-01-17  Bruno Haible  <bruno@clisp.org>
6978
6979         * gnulib-tool (func_get_license): Revert last patch. Instead, let
6980         the license default to GPL.
6981         (func_create_testdir): Don't complain if a module is LGPL and its
6982         tests module depends on GPLed modules.
6983
6984 2007-01-17  Bruno Haible  <bruno@clisp.org>
6985
6986         * lib/gettimeofday.c (gettimeofday): Add code for the case
6987         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
6988         maximum possible value for tv->tv_usec, rather than the minimum one.
6989
6990 2005-10-08  Martin Lambers  <marlam@marlam.de>
6991 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
6992 2007-01-16  Bruno Haible  <bruno@clisp.org>
6993
6994         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
6995         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
6996         gl_FUNC_GETTIMEOFDAY.
6997         (Include): Add gettimeofday.h.
6998         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
6999         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
7000         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
7001         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
7002         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
7003         * lib/gettimeofday.h: New file.
7004         * lib/gettimeofday.c: Include <sys/timeb.h>.
7005         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
7006         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7007         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
7008         fall back on time().
7009
7010         * tests/test-gettimeofday.c: New file.
7011         * modules/gettimeofday-tests: New file.
7012
7013 2007-01-16  Eric Blake  <ebb9@byu.net>
7014
7015         * modules/fnmatch (Depends-on): Depend on wchar.
7016         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
7017         * m4/fnmatch.m4: Likewise.
7018         * modules/mbchar (Makefile.am): Assume <wchar.h>.
7019         * m4/mbchar.m4: Likewise.
7020         * modules/mbswidth (Depends-on): Depend on wchar.
7021         * lib/mbswidth.c: Assume <wchar.h>.
7022         * m4/mbswidth.m4: Likewise.
7023         * modules/quotearg (Depends-on): Depend on wchar.
7024         * lib/quotearg.c: Assume <wchar.h>.
7025         * m4/quotearg.m4: Likewise.
7026         * modules/regex (Depends-on): Depend on wchar.
7027         * lib/regex_internal.h: Assume <wchar.h>.
7028         * m4/regex.m4: Likewise.
7029         * modules/stdint (Depends-on): Depend on wchar.
7030         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
7031         * m4/stdint.m4: Likewise.
7032         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
7033         * modules/strftime (Depends-on): Depend on wchar.
7034         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
7035         * modules/strtol (Depends-on): Depend on wchar.
7036         * lib/strtol.c: Assume <wchar.h>.
7037         * modules/wcwidth (Depends-on): Depend on wchar.
7038         * lib/wcwidth.h: Assume <wchar.h>.
7039         * m4/wcwidth.m4: Likewise.
7040
7041 2007-01-16  Bruno Haible  <bruno@clisp.org>
7042
7043         * modules/csharpexec-script: New, created from...
7044         * modules/csharpexec: ... this.
7045
7046 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
7047
7048         * modules/javaexec-script: New, created from...
7049         * modules/javaexec: ... this.
7050
7051 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7052
7053         * modules/poll (Dependencies): Add sys_select.
7054
7055 2007-01-15  Jim Meyering  <jim@meyering.net>
7056
7057         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
7058         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
7059         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
7060         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
7061
7062 2007-01-15  Bruno Haible  <bruno@clisp.org>
7063
7064         * modules/striconveh: New file.
7065         * lib/striconveh.h: New file.
7066         * lib/striconveh.c: New file.
7067         * MODULES.html.sh (Internationalization functions): Add striconveh.
7068
7069         * modules/striconveh-tests: New file.
7070         * tests/test-striconveh.c: New file.
7071
7072 2007-01-15  Bruno Haible  <bruno@clisp.org>
7073
7074         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
7075         not from GNU libiconv or GNU libc.
7076
7077 2007-01-15  Bruno Haible  <bruno@clisp.org>
7078
7079         * doc/gnulib-intro.texi (Copyright): Explain the different license
7080         terms for module descriptions, autoconf macros, tests, documentation.
7081
7082 2007-01-14  Bruno Haible  <bruno@clisp.org>
7083
7084         * modules/striconv-tests: New file.
7085         * tests/test-striconv.c: New file.
7086
7087 2007-01-14  Bruno Haible  <bruno@clisp.org>
7088
7089         * modules/iconv-tests: New file.
7090         * tests/test-iconv.c: New file.
7091
7092 2007-01-14  Bruno Haible  <bruno@clisp.org>
7093
7094         * gnulib-tool (func_get_license): For test modules, use the license of
7095         the main module.
7096
7097 2007-01-14  Bruno Haible  <bruno@clisp.org>
7098
7099         * modules/iconv (Include): Clarify that <iconv.h> can only be included
7100         if iconv is found to exist.
7101
7102 2007-01-14  Bruno Haible  <bruno@clisp.org>
7103
7104         * modules/c-ctype-tests: New file.
7105         * tests/test-c-ctype.c: New file.
7106
7107 2007-01-14  Bruno Haible  <bruno@clisp.org>
7108
7109         * modules/binary-io-tests: New file.
7110         * tests/test-binary-io.sh: New file.
7111         * tests/test-binary-io.c: New file.
7112
7113 2007-01-14  Bruno Haible  <bruno@clisp.org>
7114
7115         * modules/array-oset-tests: New file.
7116         * tests/test-array_oset.c: New file.
7117
7118 2007-01-14  Bruno Haible  <bruno@clisp.org>
7119
7120         * modules/array-list-tests: New file.
7121         * tests/test-array_list.c: New file.
7122
7123 2007-01-14  Bruno Haible  <bruno@clisp.org>
7124
7125         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
7126         and make.
7127         Reported by Simon Josefsson in
7128         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
7129
7130 2007-01-14  Bruno Haible  <bruno@clisp.org>
7131
7132         * modules/allocsa-tests: New file.
7133         * tests/test-allocsa.c: New file.
7134
7135 2007-01-14  Bruno Haible  <bruno@clisp.org>
7136
7137         * modules/fchdir (Depends-on): Add absolute-header.
7138         * modules/unistd (Depends-on): Likewise.
7139
7140 2006-12-30  Bruno Haible  <bruno@clisp.org>
7141
7142         * modules/fchdir: New file.
7143         * modules/unistd (Files): Add lib/unistd_.h.
7144         (Makefile.am): Generate unistd.h from unistd_.h.
7145         * lib/fchdir.c: New file.
7146         * lib/dirent_.h: New file.
7147         * lib/unistd_.h: New file.
7148         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
7149         * m4/fchdir.m4: New file.
7150         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
7151         (gl_HEADER_UNISTD): Invoke it.
7152         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
7153         function.
7154         * lib/backupfile.c (opendir, closedir): Undefine.
7155         * lib/chown.c (open, close): Undefine.
7156         * lib/clean-temp.c (open, close): Undefine.
7157         * lib/copy-file.c (open, close): Undefine.
7158         * lib/execute.c (open, close): Undefine.
7159         * lib/fsusage.c (open, close): Undefine.
7160         * lib/gc-gnulib.c (open, close): Undefine.
7161         * lib/getcwd.c (opendir, closedir): Undefine.
7162         * lib/glob.c (opendir, closedir): Undefine.
7163         * lib/javacomp.c (open, close): Undefine.
7164         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
7165         * lib/openat-proc.c (open, close): Undefine.
7166         * lib/pagealign_alloc.c (open, close): Undefine.
7167         * lib/pipe.c (open, close): Undefine.
7168         * lib/progreloc.c (open, close): Undefine.
7169         * lib/savedir.c (opendir, closedir): Undefine.
7170         * lib/utime.c (open, close): Undefine.
7171         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
7172
7173 2007-01-10  Bruno Haible  <bruno@clisp.org>
7174
7175         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
7176
7177 2007-01-12  Eric Blake  <ebb9@byu.net>
7178
7179         Provide a robust <wchar.h>.  Further simplifications are now
7180         possible in other modules, but not included here.
7181         * modules/wchar: New module.
7182         * m4/wchar.m4: New file.
7183         * lib/wchar_.h: Likewise.
7184         * modules/mbchar (Depends-on): Depend on wchar, as the first use
7185         of the new module.
7186         * MODULES.html.sh (Extended multibyte and wide character utilities):
7187         New section.
7188
7189 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
7190
7191         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
7192         to a reasonable default for memory allocation.
7193         (xreadlink): Don't allocate a huge buffer, to work around a buggy
7194         file system that reports garbage st_size values for symlinks.
7195         Problem reported by Liyang Hu.
7196
7197 2007-01-11  Simon Josefsson  <simon@josefsson.org>
7198
7199         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
7200         Emacs .#* auto-save files).
7201
7202 2007-01-11  Bruno Haible  <bruno@clisp.org>
7203
7204         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
7205         directory.
7206
7207 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
7208
7209         Use @...@ consistently in lib/wctype_.h.
7210         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
7211         on it being set to 1 or 0.
7212         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
7213         go back to AC_SUBSTing it.
7214         * modules/wctype (Makefile.am): Undo previous change.
7215
7216 2007-01-10  Eric Blake  <ebb9@byu.net>
7217
7218         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
7219         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
7220         * modules/wctype (Makefile.am): Likewise.
7221         Reported by Chris McGuire.
7222
7223 2007-01-10  Jim Meyering  <jim@meyering.net>
7224
7225         fts.c: a small readability/maintainability improvement
7226         * lib/fts.c (fts_read): Make this code slightly more readable and
7227         maintainable by hoisting the "sp->fts_cur = p" assignments to
7228         immediately follow the statements that set P.  Derived from
7229         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
7230
7231 2007-01-10  Eric Blake  <ebb9@byu.net>
7232
7233         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
7234         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
7235         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
7236         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
7237         Reported by Chris McGuire.
7238
7239 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7240
7241         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
7242         in sed script.
7243
7244 2007-01-09  Bruno Haible  <bruno@clisp.org>
7245
7246         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
7247         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
7248         variables.
7249         (func_module): Use them.
7250
7251 2007-01-09  Bruno Haible  <bruno@clisp.org>
7252
7253         * modules/unistr/base: New file.
7254         * lib/unistr.h: New file.
7255
7256         * modules/unistr/u8-to-u16: New file.
7257         * lib/unistr/u8-to-u16.c: New file.
7258
7259         * modules/unistr/u8-to-u32: New file.
7260         * lib/unistr/u8-to-u32.c: New file.
7261
7262         * modules/unistr/u16-to-u8: New file.
7263         * lib/unistr/u16-to-u8.c: New file.
7264
7265         * modules/unistr/u16-to-u32: New file.
7266         * lib/unistr/u16-to-u32.c: New file.
7267
7268         * modules/unistr/u32-to-u8: New file.
7269         * lib/unistr/u32-to-u8.c: New file.
7270
7271         * modules/unistr/u32-to-u16: New file.
7272         * lib/unistr/u32-to-u16.c: New file.
7273
7274         * modules/unistr/u8-check: New file.
7275         * modules/unistr/u16-check: New file.
7276         * modules/unistr/u32-check: New file.
7277         * lib/unistr/u8-check.c: New file.
7278         * lib/unistr/u16-check.c: New file.
7279         * lib/unistr/u32-check.c: New file.
7280
7281         * modules/unistr/u8-chr: New file.
7282         * modules/unistr/u16-chr: New file.
7283         * modules/unistr/u32-chr: New file.
7284         * lib/unistr/u8-chr.c: New file.
7285         * lib/unistr/u16-chr.c: New file.
7286         * lib/unistr/u32-chr.c: New file.
7287
7288         * modules/unistr/u8-cmp: New file.
7289         * modules/unistr/u16-cmp: New file.
7290         * modules/unistr/u32-cmp: New file.
7291         * lib/unistr/u8-cmp.c: New file.
7292         * lib/unistr/u16-cmp.c: New file.
7293         * lib/unistr/u32-cmp.c: New file.
7294
7295         * modules/unistr/u8-cpy: New file.
7296         * modules/unistr/u16-cpy: New file.
7297         * modules/unistr/u32-cpy: New file.
7298         * lib/unistr/u8-cpy.c: New file.
7299         * lib/unistr/u16-cpy.c: New file.
7300         * lib/unistr/u32-cpy.c: New file.
7301         * lib/unistr/u-cpy.h: New file.
7302
7303         * modules/unistr/u8-cpy-alloc: New file.
7304         * modules/unistr/u16-cpy-alloc: New file.
7305         * modules/unistr/u32-cpy-alloc: New file.
7306         * lib/unistr/u8-cpy-alloc.c: New file.
7307         * lib/unistr/u16-cpy-alloc.c: New file.
7308         * lib/unistr/u32-cpy-alloc.c: New file.
7309         * lib/unistr/u-cpy-alloc.h: New file.
7310
7311         * modules/unistr/u8-endswith: New file.
7312         * modules/unistr/u16-endswith: New file.
7313         * modules/unistr/u32-endswith: New file.
7314         * lib/unistr/u8-endswith.c: New file.
7315         * lib/unistr/u16-endswith.c: New file.
7316         * lib/unistr/u32-endswith.c: New file.
7317         * lib/unistr/u-endswith.h: New file.
7318
7319         * modules/unistr/u8-mblen: New file.
7320         * modules/unistr/u16-mblen: New file.
7321         * modules/unistr/u32-mblen: New file.
7322         * lib/unistr/u8-mblen.c: New file.
7323         * lib/unistr/u16-mblen.c: New file.
7324         * lib/unistr/u32-mblen.c: New file.
7325
7326         * modules/unistr/u8-mbtouc: New file.
7327         * modules/unistr/u16-mbtouc: New file.
7328         * modules/unistr/u32-mbtouc: New file.
7329         * lib/unistr/u8-mbtouc.c: New file.
7330         * lib/unistr/u16-mbtouc.c: New file.
7331         * lib/unistr/u32-mbtouc.c: New file.
7332
7333         * modules/unistr/u8-mbtouc-safe: New file.
7334         * modules/unistr/u16-mbtouc-safe: New file.
7335         * modules/unistr/u32-mbtouc-safe: New file.
7336         * lib/unistr/u8-mbtouc-safe.c: New file.
7337         * lib/unistr/u16-mbtouc-safe.c: New file.
7338         * lib/unistr/u32-mbtouc-safe.c: New file.
7339
7340         * modules/unistr/u8-move: New file.
7341         * modules/unistr/u16-move: New file.
7342         * modules/unistr/u32-move: New file.
7343         * lib/unistr/u8-move.c: New file.
7344         * lib/unistr/u16-move.c: New file.
7345         * lib/unistr/u32-move.c: New file.
7346         * lib/unistr/u-move.h: New file.
7347
7348         * modules/unistr/u8-next: New file.
7349         * modules/unistr/u16-next: New file.
7350         * modules/unistr/u32-next: New file.
7351         * lib/unistr/u8-next.c: New file.
7352         * lib/unistr/u16-next.c: New file.
7353         * lib/unistr/u32-next.c: New file.
7354
7355         * modules/unistr/u8-prev: New file.
7356         * modules/unistr/u16-prev: New file.
7357         * modules/unistr/u32-prev: New file.
7358         * lib/unistr/u8-prev.c: New file.
7359         * lib/unistr/u16-prev.c: New file.
7360         * lib/unistr/u32-prev.c: New file.
7361
7362         * modules/unistr/u8-set: New file.
7363         * modules/unistr/u16-set: New file.
7364         * modules/unistr/u32-set: New file.
7365         * lib/unistr/u8-set.c: New file.
7366         * lib/unistr/u16-set.c: New file.
7367         * lib/unistr/u32-set.c: New file.
7368         * lib/unistr/u-set.h: New file.
7369
7370         * modules/unistr/u8-startswith: New file.
7371         * modules/unistr/u16-startswith: New file.
7372         * modules/unistr/u32-startswith: New file.
7373         * lib/unistr/u8-startswith.c: New file.
7374         * lib/unistr/u16-startswith.c: New file.
7375         * lib/unistr/u32-startswith.c: New file.
7376         * lib/unistr/u-startswith.h: New file.
7377
7378         * modules/unistr/u8-stpcpy: New file.
7379         * modules/unistr/u16-stpcpy: New file.
7380         * modules/unistr/u32-stpcpy: New file.
7381         * lib/unistr/u8-stpcpy.c: New file.
7382         * lib/unistr/u16-stpcpy.c: New file.
7383         * lib/unistr/u32-stpcpy.c: New file.
7384         * lib/unistr/u-stpcpy.h: New file.
7385
7386         * modules/unistr/u8-stpncpy: New file.
7387         * modules/unistr/u16-stpncpy: New file.
7388         * modules/unistr/u32-stpncpy: New file.
7389         * lib/unistr/u8-stpncpy.c: New file.
7390         * lib/unistr/u16-stpncpy.c: New file.
7391         * lib/unistr/u32-stpncpy.c: New file.
7392         * lib/unistr/u-stpncpy.h: New file.
7393
7394         * modules/unistr/u8-strcat: New file.
7395         * modules/unistr/u16-strcat: New file.
7396         * modules/unistr/u32-strcat: New file.
7397         * lib/unistr/u8-strcat.c: New file.
7398         * lib/unistr/u16-strcat.c: New file.
7399         * lib/unistr/u32-strcat.c: New file.
7400         * lib/unistr/u-strcat.h: New file.
7401
7402         * modules/unistr/u8-strchr: New file.
7403         * modules/unistr/u16-strchr: New file.
7404         * modules/unistr/u32-strchr: New file.
7405         * lib/unistr/u8-strchr.c: New file.
7406         * lib/unistr/u16-strchr.c: New file.
7407         * lib/unistr/u32-strchr.c: New file.
7408
7409         * modules/unistr/u8-strcmp: New file.
7410         * modules/unistr/u16-strcmp: New file.
7411         * modules/unistr/u32-strcmp: New file.
7412         * lib/unistr/u8-strcmp.c: New file.
7413         * lib/unistr/u16-strcmp.c: New file.
7414         * lib/unistr/u32-strcmp.c: New file.
7415
7416         * modules/unistr/u8-strcpy: New file.
7417         * modules/unistr/u16-strcpy: New file.
7418         * modules/unistr/u32-strcpy: New file.
7419         * lib/unistr/u8-strcpy.c: New file.
7420         * lib/unistr/u16-strcpy.c: New file.
7421         * lib/unistr/u32-strcpy.c: New file.
7422         * lib/unistr/u-strcpy.h: New file.
7423
7424         * modules/unistr/u8-strcspn: New file.
7425         * modules/unistr/u16-strcspn: New file.
7426         * modules/unistr/u32-strcspn: New file.
7427         * lib/unistr/u8-strcspn.c: New file.
7428         * lib/unistr/u16-strcspn.c: New file.
7429         * lib/unistr/u32-strcspn.c: New file.
7430         * lib/unistr/u-strcspn.h: New file.
7431
7432         * modules/unistr/u8-strdup: New file.
7433         * modules/unistr/u16-strdup: New file.
7434         * modules/unistr/u32-strdup: New file.
7435         * lib/unistr/u8-strdup.c: New file.
7436         * lib/unistr/u16-strdup.c: New file.
7437         * lib/unistr/u32-strdup.c: New file.
7438         * lib/unistr/u-strdup.h: New file.
7439
7440         * modules/unistr/u8-strlen: New file.
7441         * modules/unistr/u16-strlen: New file.
7442         * modules/unistr/u32-strlen: New file.
7443         * lib/unistr/u8-strlen.c: New file.
7444         * lib/unistr/u16-strlen.c: New file.
7445         * lib/unistr/u32-strlen.c: New file.
7446         * lib/unistr/u-strlen.h: New file.
7447
7448         * modules/unistr/u8-strmblen: New file.
7449         * modules/unistr/u16-strmblen: New file.
7450         * modules/unistr/u32-strmblen: New file.
7451         * lib/unistr/u8-strmblen.c: New file.
7452         * lib/unistr/u16-strmblen.c: New file.
7453         * lib/unistr/u32-strmblen.c: New file.
7454
7455         * modules/unistr/u8-strmbtouc: New file.
7456         * modules/unistr/u16-strmbtouc: New file.
7457         * modules/unistr/u32-strmbtouc: New file.
7458         * lib/unistr/u8-strmbtouc.c: New file.
7459         * lib/unistr/u16-strmbtouc.c: New file.
7460         * lib/unistr/u32-strmbtouc.c: New file.
7461
7462         * modules/unistr/u8-strncat: New file.
7463         * modules/unistr/u16-strncat: New file.
7464         * modules/unistr/u32-strncat: New file.
7465         * lib/unistr/u8-strncat.c: New file.
7466         * lib/unistr/u16-strncat.c: New file.
7467         * lib/unistr/u32-strncat.c: New file.
7468         * lib/unistr/u-strncat.h: New file.
7469
7470         * modules/unistr/u8-strncmp: New file.
7471         * modules/unistr/u16-strncmp: New file.
7472         * modules/unistr/u32-strncmp: New file.
7473         * lib/unistr/u8-strncmp.c: New file.
7474         * lib/unistr/u16-strncmp.c: New file.
7475         * lib/unistr/u32-strncmp.c: New file.
7476
7477         * modules/unistr/u8-strncpy: New file.
7478         * modules/unistr/u16-strncpy: New file.
7479         * modules/unistr/u32-strncpy: New file.
7480         * lib/unistr/u8-strncpy.c: New file.
7481         * lib/unistr/u16-strncpy.c: New file.
7482         * lib/unistr/u32-strncpy.c: New file.
7483         * lib/unistr/u-strncpy.h: New file.
7484
7485         * modules/unistr/u8-strnlen: New file.
7486         * modules/unistr/u16-strnlen: New file.
7487         * modules/unistr/u32-strnlen: New file.
7488         * lib/unistr/u8-strnlen.c: New file.
7489         * lib/unistr/u16-strnlen.c: New file.
7490         * lib/unistr/u32-strnlen.c: New file.
7491         * lib/unistr/u-strnlen.h: New file.
7492
7493         * modules/unistr/u8-strpbrk: New file.
7494         * modules/unistr/u16-strpbrk: New file.
7495         * modules/unistr/u32-strpbrk: New file.
7496         * lib/unistr/u8-strpbrk.c: New file.
7497         * lib/unistr/u16-strpbrk.c: New file.
7498         * lib/unistr/u32-strpbrk.c: New file.
7499         * lib/unistr/u-strpbrk.h: New file.
7500
7501         * modules/unistr/u8-strrchr: New file.
7502         * modules/unistr/u16-strrchr: New file.
7503         * modules/unistr/u32-strrchr: New file.
7504         * lib/unistr/u8-strrchr.c: New file.
7505         * lib/unistr/u16-strrchr.c: New file.
7506         * lib/unistr/u32-strrchr.c: New file.
7507
7508         * modules/unistr/u8-strspn: New file.
7509         * modules/unistr/u16-strspn: New file.
7510         * modules/unistr/u32-strspn: New file.
7511         * lib/unistr/u8-strspn.c: New file.
7512         * lib/unistr/u16-strspn.c: New file.
7513         * lib/unistr/u32-strspn.c: New file.
7514         * lib/unistr/u-strspn.h: New file.
7515
7516         * modules/unistr/u8-strstr: New file.
7517         * modules/unistr/u16-strstr: New file.
7518         * modules/unistr/u32-strstr: New file.
7519         * lib/unistr/u8-strstr.c: New file.
7520         * lib/unistr/u16-strstr.c: New file.
7521         * lib/unistr/u32-strstr.c: New file.
7522         * lib/unistr/u-strstr.h: New file.
7523
7524         * modules/unistr/u8-strtok: New file.
7525         * modules/unistr/u16-strtok: New file.
7526         * modules/unistr/u32-strtok: New file.
7527         * lib/unistr/u8-strtok.c: New file.
7528         * lib/unistr/u16-strtok.c: New file.
7529         * lib/unistr/u32-strtok.c: New file.
7530         * lib/unistr/u-strtok.h: New file.
7531
7532         * modules/unistr/u8-uctomb: New file.
7533         * modules/unistr/u16-uctomb: New file.
7534         * modules/unistr/u32-uctomb: New file.
7535         * lib/unistr/u8-uctomb.c: New file.
7536         * lib/unistr/u16-uctomb.c: New file.
7537         * lib/unistr/u32-uctomb.c: New file.
7538
7539         * MODULES.html.sh (Unicode string functions): Add the new modules.
7540
7541 2007-01-08  Bruno Haible  <bruno@clisp.org>
7542
7543         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
7544         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
7545         subdirectories.
7546
7547 2007-01-08  Karl Berry  <karl@gnu.org>
7548
7549         * doc/error.texi: mention that main() fns must set program_name
7550         when progname is used.
7551
7552 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
7553
7554         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
7555         WCTYPE_H is empty, for the benefit of builds from non-distclean
7556         directories.  Problem reported by Eric Blake in
7557         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
7558
7559 2007-01-08  Bruno Haible  <bruno@clisp.org>
7560
7561         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
7562         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
7563         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
7564         PROVIDE_CANONICALIZE_FILENAME_MODE.
7565         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
7566
7567 2007-01-08  Bruno Haible  <bruno@clisp.org>
7568
7569         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
7570         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
7571         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
7572         * lib/fts.c: Likewise.
7573         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
7574
7575 2006-12-25  Bruno Haible  <bruno@clisp.org>
7576
7577         * modules/utf8-ucs4-safe: New file.
7578         * lib/utf8-ucs4-safe.h: New file.
7579         * lib/unistr/utf8-ucs4-safe.c: New file.
7580
7581         * modules/utf16-ucs4-safe: New file.
7582         * lib/utf16-ucs4-safe.h: New file.
7583         * lib/unistr/utf16-ucs4-safe.c: New file.
7584
7585         * MODULES.html.sh (Unicode string functions): Add the new modules.
7586
7587 2007-01-08  Bruno Haible  <bruno@clisp.org>
7588
7589         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
7590         (Depends-on): Add unitypes.
7591         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
7592         (u8_mbtouc_aux): Move out to separate file.
7593         (u8_mbtouc): Use ucs4_t, uint8_t types.
7594         * lib/unistr/utf8-ucs4.c: New file.
7595
7596         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
7597         (Depends-on): Add unitypes.
7598         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
7599         (u16_mbtouc_aux): Move out to separate file.
7600         (u16_mbtouc): Use ucs4_t, uint16_t types.
7601         * lib/unistr/utf16-ucs4.c: New file.
7602
7603         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
7604         (Depends-on): Add unitypes.
7605         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
7606         (u8_uctomb_aux): Move out to separate file.
7607         (u8_uctomb): Use ucs4_t, uint8_t types.
7608         * lib/unistr/ucs4-utf8.c: New file.
7609
7610         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
7611         (Depends-on): Add unitypes.
7612         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
7613         (u16_uctomb_aux): Move out to separate file.
7614         (u16_uctomb): Use ucs4_t, uint16_t types.
7615         * lib/unistr/ucs4-utf16.c: New file.
7616
7617 2006-12-25  Bruno Haible  <bruno@clisp.org>
7618
7619         * modules/unitypes: New file.
7620         * lib/unitypes.h: New file.
7621         * MODULES.html.sh (func_all_modules): New section "Unicode string
7622         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
7623         this section. Add unitypes.
7624
7625 2007-01-08  Bruno Haible  <bruno@clisp.org>
7626
7627         Avoid variable names that conflict with those from libtool.
7628         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
7629         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
7630         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
7631         library_names_spec to acl_library_names_spec, hardcode_* to
7632         acl_hardcode_*.
7633         Reported by Ralf Wildenhues.
7634
7635 2007-01-08  Bruno Haible  <bruno@clisp.org>
7636
7637         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
7638         definition.
7639         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
7640         definition.
7641         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
7642         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
7643         definition.
7644         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
7645         definition.
7646         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
7647         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
7648         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
7649         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
7650         definition.
7651         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
7652         definition.
7653         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
7654         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
7655         GC_USE_<algorithm>.
7656         * lib/gc-libgcrypt.c: Likewise.
7657         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
7658         * modules/gc-arctwo (configure.ac): Likewise.
7659         * modules/gc-des (configure.ac): Likewise.
7660         * modules/gc-hmac-md5 (configure.ac): Likewise.
7661         * modules/gc-hmac-sha1 (configure.ac): Likewise.
7662         * modules/gc-md2 (configure.ac): Likewise.
7663         * modules/gc-md4 (configure.ac): Likewise.
7664         * modules/gc-md5 (configure.ac): Likewise.
7665         * modules/gc-random (configure.ac): Likewise.
7666         * modules/gc-rijndael (configure.ac): Likewise.
7667         * modules/gc-sha1 (configure.ac): Likewise.
7668
7669 2007-01-08  Bruno Haible  <bruno@clisp.org>
7670
7671         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
7672         macro definition.
7673         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
7674         definition.
7675         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
7676         definition.
7677         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
7678         * modules/fcntl-safer (configure.ac): Likewise.
7679         * modules/fopen-safer (configure.ac): Likewise.
7680         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
7681         GNULIB_FWRITEERROR macro definition.
7682
7683 2007-01-08  Bruno Haible  <bruno@clisp.org>
7684
7685         * m4/gnulib-common.m4: New file.
7686         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
7687         (func_get_filelist): Add m4/gnulib-common.m4.
7688
7689 2007-01-08  Bruno Haible  <bruno@clisp.org>
7690
7691         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
7692         command.
7693
7694 2007-01-08  Jim Meyering  <jim@meyering.net>
7695
7696         Use a more robust test for a "can't happen" condition.
7697         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
7698         narrowed the st_size value.  Presuming the "can't happen" condition
7699         is true, that narrowing could conceivably convert an invalid st_size
7700         value into a valid one.  Instead, use a change based on Matthew
7701         Woehlke's original patch.
7702
7703         Slight readability improvement: use an assert-like macro
7704         in place of literal "abort ()" uses.
7705         * lib/fts.c (fts_assert): Define.
7706         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
7707         Use this macro instead of a bare 'abort'.
7708
7709 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
7710
7711         Don't worry about using IRIX 5.3's wctype.h broken definitions;
7712         simply work around them.
7713         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
7714         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
7715         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before
7716         declaring.
7717         Don't bother to define as macros, since the standard doesn't require it.
7718         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
7719         longer worry about IRIX 5.3.
7720         (HAVE_WCTYPE_CTMP_BUG): Remove.
7721
7722 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
7723
7724         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
7725         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
7726         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
7727         Problems reported by Georg Schwarz for IRIX 5.3.
7728
7729         * gnulib-tool (autoconf_minversion): Take the maximum version number
7730         found, not the minimum.  Problem reported by James Youngman.
7731
7732 2007-01-03  Karl Berry  <karl@gnu.org>
7733
7734         * doc/error.texi: new file, explaining interaction with progname.
7735         * doc/gnulib.texi: include it.  Update copyright.
7736
7737 2007-01-03  Simon Josefsson  <simon@josefsson.org>
7738
7739         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
7740         AC_CANONICAL_HOST, to improve autobuild outputs.
7741
7742 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
7743             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
7744
7745         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
7746         sockets, server sockets, and other file descriptors.  Count errors
7747         to compute the return value.  Reorder the code a bit to be easier
7748         to follow.  Don't set event bits that were not requested (except
7749         POLLERR and POLLHUP).
7750
7751 2007-01-01  Bruno Haible  <bruno@clisp.org>
7752
7753         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
7754
7755 2007-01-03  Jim Meyering  <jim@meyering.net>
7756
7757         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
7758
7759 2007-01-02  Bruno Haible  <bruno@clisp.org>
7760
7761         * modules/settime (Include): Require timespec.h.
7762         * modules/nanosleep (Include): Likewise.
7763
7764 2007-01-01  Bruno Haible  <bruno@clisp.org>
7765
7766         * gnulib-tool (func_emit_copyright_notice): Bump year.
7767         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
7768
7769 2007-01-01  Bruno Haible  <bruno@clisp.org>
7770
7771         Improve support for OpenBSD.
7772         * build-aux/config.rpath (libname_spec): Export.
7773         (library_names_spec): New variable. Export.
7774         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
7775         library_names_spec from the config.rpath output. Locate shared library
7776         through the name pattern in library_names_spec.
7777
7778 2007-01-01  Eric Blake  <ebb9@byu.net>
7779
7780         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
7781
7782 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
7783
7784         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
7785         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
7786         assume the C locale, and avoid an "eval" that could cause trouble.
7787         Problem with SORT reported by Bob Proulx.
7788
7789         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
7790         Define.  Trivial patch from Henning Nielsen Lund, originally
7791         sent to bug-grep@gnu.org today.
7792
7793 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
7794
7795         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
7796         struct stat.  Problem reported by Henning Nielsen Lund.
7797         * lib/acl.c: Include acl.h first, to check interface.  Don't
7798         bother to include sys/types.h and sys/stat.h again.
7799
7800 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
7801
7802         Import the following change from libc; problem reported by
7803         Sven Verdoolaege.
7804
7805         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
7806
7807         [BZ #1373]
7808         * lib/argp.h: Remove __NTH for __argp_usage inline function.
7809
7810 2006-12-28  Jim Meyering  <jim@meyering.net>
7811
7812         * build-aux/announce-gen: Do not assume that the package
7813         builds any of tar.gz, tar.bz2, and .xdelta files.
7814         Suggestion from Simon Josefsson.
7815
7816 2006-12-28  Simon Josefsson  <simon@josefsson.org>
7817
7818         * modules/announce-gen: New file.
7819
7820 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
7821
7822         * lib/mbchar.h: Just include <wctype.h>; the wctype module
7823         handles its gotchas now.
7824         * lib/mbswidth.c: Likewise.
7825         * lib/wcwidth.h: Likewise.
7826         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
7827         and iswcntrl; the wctype module does this stuff now.
7828         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
7829         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
7830         * modules/mbchar (Depends-on): Add wctype.
7831         * modules/mbswidth (Depends-on): Likewise.
7832         * modules/wcwidth (Depends-on): Likewise.
7833
7834 2006-12-27  Eric Blake  <ebb9@byu.net>
7835
7836         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
7837         module uses more than what <wctype.h> is required to provide.
7838
7839 2006-12-26  Eric Blake  <ebb9@byu.net>
7840
7841         * gnulib-tool (sed_extract_prog): Avoid space-tab.
7842
7843 2006-12-26  Eric Blake  <ebb9@byu.net>
7844
7845         * modules/absolute-header: New module.
7846         * modules/fcntl (Depends-on): Depend on it.
7847         * modules/inttypes (Depends-on): Likewise.
7848         * modules/stdint (Depends-on): Likewise.
7849         * modules/sys_stat (Depends-on): Likewise.
7850         * modules/wctype (Depends-on): Likewise.
7851         * MODULES.html.sh (Support for building libraries and
7852         executables): Document it.
7853
7854 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
7855
7856         * gnulib-tool (SED): Remove, undoing previous change.
7857         The problem was that it broke coreutils on Solaris, because
7858         "sed --posix" leaked into a makefile.
7859         (sed): New alias, if 'alias' and GNU sed.
7860
7861 2006-12-24  Jim Meyering  <jim@meyering.net>
7862
7863         Work around an fchownat bug in glibc-2.4:
7864         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
7865         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
7866         in spite of the -P option.
7867         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
7868         New macros.
7869         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
7870         * modules/openat (Files): Add lib/fchownat.c.
7871         * lib/openat.c (fchownat): Don't define here.  Move to...
7872         * lib/fchownat.c: ...this new file.
7873
7874 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
7875
7876         Fix bug reported by Bruno Haible in
7877         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
7878         where quotearg.c didn't compile on Mac OS X 10.2 because it
7879         lacks <wchar.h> and wint_t.
7880         * lib/wctype_.h (__wctype_wint_t): New type.
7881         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
7882         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
7883         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
7884         Arg is now of type __wctype_wint_t, not wint_t.
7885         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
7886         substitute HAVE_WINT_T.
7887         * modules/wctype (Files): Add m4/wint_t.m4.
7888         (wctype.h): Substitute HAVE_WINT_T.
7889
7890 2006-12-23  Bruno Haible  <bruno@clisp.org>
7891
7892         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
7893
7894 2006-12-23  Bruno Haible  <bruno@clisp.org>
7895
7896         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
7897         S_ISLNK.
7898         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
7899         mingw.
7900
7901 2006-12-22  Bruno Haible  <bruno@clisp.org>
7902
7903         * lib/copy-file.c: Include acl.h.
7904         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
7905         Close the file descriptors only after being done with copy_acl.
7906         * modules/copy-file (Depends-on): Add acl.
7907
7908 2006-12-22  Bruno Haible  <bruno@clisp.org>
7909
7910         * gnulib-tool (SED): New variable.
7911         Use $SED instead of sed everywhere.
7912
7913 2006-12-22  Bruno Haible  <bruno@clisp.org>
7914
7915         * modules/no-c++: New file.
7916         * m4/no-c++.m4: New file.
7917         * MODULES.html.sh (Support for building libraries and executables):
7918         Add no-c++.
7919
7920 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
7921
7922         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
7923         Include <limits.h>, and use its INT_MAX to rewrite the
7924         j loop so that it does not overflow 'int'.  Problem reported by
7925         Ralf Wildenhues in
7926         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
7927         Play it safe by shifting left by 1 rather than multiplying by 2,
7928         as GCC is less likely to optimize this away when the value
7929         is signed (when it assumes overflow leads to undefined behavior).
7930         Also, don't assume time_t uses two's complement.
7931
7932 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
7933
7934         * MODULES.html.sh: New module wctype.
7935         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
7936         * lib/fnmatch.c: Don't bother to include <wchar.h> before
7937         <wctype.h>, since the new wctype module should fix this.
7938         * lib/quotearg.c: Include <wctype.h> unconditionally, since
7939         the wctype module should arrange for it.
7940         * lib/regex_internal.h: Likewise.
7941         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
7942         since the wctype module should handle this now.
7943         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
7944         * modules/fnmatch (Depends-on): Add wctype.
7945         * modules/quotearg (Depends-on): Likewise.
7946         * modules/regex (Depends-on): Likewise.
7947
7948 2006-12-19  Bruno Haible  <bruno@clisp.org>
7949
7950         * lib/strdup.h [C++]: Wrap definitions in extern "C".
7951         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
7952
7953 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7954
7955         * modules/savewd (Depends-on): Fix dependency on fcntl.
7956
7957 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
7958
7959         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
7960         conforms to C99, rather than relying on the user's environment
7961         setting of STDINT_H.
7962
7963 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
7964         and Eric Blake  <ebb9@byu.net>
7965
7966         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
7967         This is more consistent with the other defines here.
7968         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
7969         Port to z/OS.  Problem reported by Paul Gilmartin.
7970         Change local vars to use gl_ prefix rather than ac_.
7971         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
7972         with other defines.
7973         * modules/double-slash-root: New module.
7974         * modules/dirname (Files): Remove m4/double-slash-root.m4.
7975         (Depends-on): Add double-slash-root.
7976         * MODULES.html.sh (File system functions): Mention new module.
7977
7978 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
7979
7980         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
7981         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
7982         This is for the benefit of gzip, which doesn't do i18n.
7983
7984 2006-12-12  Jim Meyering  <jim@meyering.net>
7985
7986         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
7987         Reported by Andreas Schwab <schwab@suse.de>.
7988
7989 2006-12-12  Bruno Haible  <bruno@clisp.org>
7990
7991         Merge these changes.
7992         2006-09-05  Bruno Haible  <bruno@clisp.org>
7993         * lib/iconvme.c (iconv_string): No need to save and restore errno when
7994         iconv_alloc succeeded.
7995         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
7996         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
7997         test for " && dest " at the end - dest is always != NULL there. Call
7998         iconv with 4xNULL arguments initially, to reset the state. Call iconv
7999         with 2xNULL arguments, also to flush the state storage. Handle the
8000         IRIX iconv behaviour. Realloc the final result, to throw away unused
8001         memory.
8002
8003 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
8004
8005         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
8006         and fchmodat unconditionally, since glibc 2.4 has them.
8007         Problem reported by Arkadiusz Miskiewicz.
8008
8009 2006-12-10  Bruno Haible  <bruno@clisp.org>
8010
8011         * gnulib-tool (func_import): Show the include files only for those
8012         modules that are copied and specified.
8013         Reported by Karl Berry.
8014
8015 2006-12-08  Jim Meyering  <jim@meyering.net>
8016
8017         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
8018         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
8019
8020         * build-aux/announce-gen: Add two new options, both optional:
8021         --bootstrap-tools=TOOL_LIST
8022               a comma-separated list of tools, e.g.,
8023               autoconf,automake,bison,gnulib
8024         --gnulib-snapshot-date=DATE
8025               if gnulib is in the bootstrap tool list,
8026               then report this as the snapshot date.
8027               If not specified, use the current date/time.
8028               If you specify a date here, be sure it's UTC.
8029
8030 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8031
8032         * tests/test-argp-2.sh: Fix test to match actual output.
8033         (func_compare): Fix sed script to be portable.
8034
8035 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
8036
8037         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
8038         workaround for this case.  It is not autoconfigured now; offhand
8039         it's hard to see how to autoconfigure it.
8040
8041 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
8042
8043         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
8044         a directory that is about to be chowned.  Such a directory's
8045         initial file permissions should permit the owner only and this
8046         should not be changed until after the chown, since the group and
8047         other bits would be incorrect if they granted permission before
8048         the chown.
8049
8050         Fix porting problem for iswctype reported by Georg Schwarz in:
8051         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
8052         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
8053         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
8054         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
8055         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
8056
8057 2006-12-03  Jim Meyering  <jim@meyering.net>
8058
8059         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
8060         p->fts_statp may not yet be defined.
8061         (fts_read): Instead, set it in the caller, once p->fts_statp is
8062         sure to be defined, and corresponds to a top-level directory.
8063         This bug made du -x fail.  Here's the coreutils test case:
8064         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
8065         Reported by Mike Frysinger.
8066
8067 2006-12-01  Jim Meyering  <jim@meyering.net>
8068
8069         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
8070         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
8071         Reported by Simon Josefsson.
8072
8073 2006-11-30  Jim Meyering  <jim@meyering.net>
8074
8075         * m4/warning.m4: Use the all-permissive copyright notice
8076         recommended by RMS (rather than LGPL).
8077         * m4/vararrays.m4: Likewise.
8078         * m4/flexmember.m4: Likewise.
8079
8080 2006-11-29  Bruno Haible  <bruno@clisp.org>
8081
8082         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
8083         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
8084         using +=.
8085         Reported by Simon Josefsson <simon@josefsson.org>.
8086
8087 2006-11-28  James Youngman <jay@gnu.org>
8088
8089         * README: Advise users that they might find the bug-gnulib@gnu.org
8090         and autotools-announce@gnu.org mailing lists useful.
8091
8092 2006-11-28  Bruno Haible  <bruno@clisp.org>
8093
8094         * m4/ptrdiff_max.m4: Remove file.
8095
8096 2006-11-21  Bruno Haible  <bruno@clisp.org>
8097
8098         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
8099         _AC_COMPUTE_INT.
8100         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
8101         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
8102         _AC_COMPUTE_INT.
8103         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
8104         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
8105         _AC_COMPUTE_INT.
8106         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
8107
8108 2006-11-28  Jim Meyering  <jim@meyering.net>
8109
8110         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
8111         warning from "gcc -Wshadow" about shadowing the builtin.
8112
8113 2006-11-27  Bruno Haible  <bruno@clisp.org>
8114
8115         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
8116         _AC_COMPUTE_INT.
8117         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
8118
8119 2006-11-27  Bruno Haible  <bruno@clisp.org>
8120             Paul Eggert  <eggert@cs.ucla.edu>
8121
8122         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
8123
8124 2006-11-26  Bruno Haible  <bruno@clisp.org>
8125
8126         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
8127         noinst_LTLIBRARIES.
8128
8129 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
8130             Bruno Haible  <bruno@clisp.org>
8131
8132         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
8133         if compiling with "gcc -ansi".
8134
8135 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
8136
8137         Fix some incompatibilities with gcc -ansi -pedantic.
8138         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
8139         if compiling pedantically with GCC, unless it's C99 or later.
8140         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
8141         it mishandles gcc -ansi -pedantic as well.
8142         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
8143         if gcc -pedantic.
8144         * lib/regexec.c (check_node_accept_bytes): Don't use auto
8145         initializers for struct if -pedantic, unless it's C99 or later.
8146
8147 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
8148
8149         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
8150         Don't close an fd more than once. Identical atimes indicate
8151         success, not failure.
8152
8153 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
8154
8155         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
8156
8157 2006-11-23  Jim Meyering  <jim@meyering.net>
8158
8159         * build-aux/announce-gen: New file.  From coreutils.
8160
8161 2006-11-22  Jim Meyering  <jim@meyering.net>
8162
8163         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
8164         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
8165         (fts_read): Use a temporary to narrow the overused st_size member
8166         before using it in a switch statement.  Reported by Matthew Woehlke.
8167
8168         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
8169         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
8170
8171 2006-11-20  Bruno Haible  <bruno@clisp.org>
8172
8173         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
8174         changequote instead of pairs of brackets.
8175         Reported by Andreas Schwab <schwab@suse.de>.
8176
8177 2006-11-21  Jim Meyering  <jim@meyering.net>
8178
8179         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
8180         so as to remain compatible with older compilers.
8181         Patch from Michael Deutschmann.
8182
8183 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
8184
8185         * MODULES.html.sh (File system functions): Add openat.
8186
8187         * lib/openat.h (rpl_fstatat): New macro, if
8188         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
8189         (fstatat): Define to rpl_fstatat under the same conditions,
8190         unless COMPILING_FSTATAT.
8191         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
8192         seems to have the bug.
8193         * lib/fstatat.c: New file.
8194         * modules/openat (Files): Add it.
8195
8196 2006-11-20  Bruno Haible  <bruno@clisp.org>
8197
8198         * Makefile: New file.
8199
8200 2006-11-20  Jim Meyering  <jim@meyering.net>
8201
8202         The beginnings of syntax-related checks for gnulib.
8203         * lib/Makefile: New file.
8204         * lib/t-idcache: New script.  Ensure that the two halves of
8205         idcache.c stay in sync.
8206
8207         * lib/idcache.c: Adjust comments in user- and group- portions to
8208         be more accurate, and to be consistent with one another.
8209
8210 2006-11-20  Jim Meyering  <jim@meyering.net>
8211
8212         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
8213         continue using the flexible array member (thus, this module performs
8214         half as many malloc calls), with the addition that...
8215         (getgroup, getuser): Consistently record a non-match via an empty
8216         "name" string, and map an empty string match to a NULL return value.
8217         * modules/idcache (Depends-on): Re-add flexmember.
8218
8219         * lib/idcache.c (getuser): Remove all uses of the register keyword.
8220         (getuidbyname, getgroup, getgidbyname): Likewise.
8221
8222         Use cleaner syntax: NULL rather than 0.
8223         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
8224
8225 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
8226
8227         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
8228         It mishandled the case where the group was missing.
8229         Problem reported by Greg Schafer.
8230         * modules/idcache: Likewise.
8231
8232 2006-11-18  Jim Meyering  <jim@meyering.net>
8233
8234         * check-module (%exempt_header): Add exception for some
8235         conditionally-included headers.
8236
8237         * modules/i-ring (Depends-on): Add verify.
8238         (License): Change to LGPL.
8239
8240 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
8241
8242         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
8243         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
8244         and inttostr.h.  Use snprintf rather than uinttostr, so that
8245         LGPLed code doesn't depend on GPLed.
8246
8247 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
8248
8249         * modules/inline (License): Change from GPL to LGPL.
8250
8251 2006-11-17  Jim Meyering  <jim@meyering.net>
8252
8253         * modules/d-type (License): Switch to LGPL.
8254
8255 2006-11-15  Bruno Haible  <bruno@clisp.org>
8256
8257         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
8258
8259 2006-11-15  Eric Blake  <ebb9@byu.net>
8260
8261         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
8262         the module dependency.
8263
8264 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8265             Bruno Haible  <bruno@clisp.org>
8266
8267         * gnulib-tool (func_create_testdir): Add license consistency check.
8268
8269 2006-11-15  Eric Blake  <ebb9@byu.net>
8270
8271         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
8272         random "(cached)" in configure output.
8273
8274 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8275
8276         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
8277         test for conforming inttypes.h is both announced and cached.
8278
8279         * MODULES.html.sh (seen_modules, seen_files): New variables.
8280         (func_module): Rewrite to use a few less gnulib-tool and sed
8281         invocations.  Avoid a couple of quadratic algorithms for ...
8282         (missed_modules, missed_files): ... these, with ...
8283         (func_append, func_tmpdir): ... these new functions, from
8284         gnulib-tool.  Analogously, install traps for cleanup.
8285
8286         * tests/test-gc.c (main): Remove unused variables.
8287         * tests/test-read-file.c: Include stdlib.h, for 'free'.
8288
8289 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
8290
8291         * modules/inttostr (License): Change to LGPL.
8292
8293 2006-11-14  Eric Blake  <ebb9@byu.net>
8294
8295         * modules/tempname (License): Change to LGPL.
8296
8297 2006-11-14  Eric Blake  <ebb9@byu.net>
8298
8299         * doc/functions.texi (Function Portability): *printf functions on
8300         Cygwin now understand all POSIX size specifiers.
8301
8302 2006-11-14  Bruno Haible  <bruno@clisp.org>
8303
8304         * modules/c-ctype (License): Change to LGPL.
8305
8306 2006-11-12  Bruno Haible  <bruno@clisp.org>
8307
8308         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
8309         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
8310         for GNOME libraries, for which the include files are installed in
8311         subdirectories of $prefix/include.
8312
8313 2006-11-12  Bruno Haible  <bruno@clisp.org>
8314
8315         * m4/lib-link.m4: Require at least autoconf-2.54.
8316         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
8317         name to underscores for the --with option.
8318
8319 2006-11-13  Bruno Haible  <bruno@clisp.org>
8320
8321         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
8322         the tests directory.
8323         Reported by Ralf Wildenhues.
8324
8325 2006-11-13  Bruno Haible  <bruno@clisp.org>
8326
8327         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
8328         (func_emit_initmacro_end): Undo the override here.
8329         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
8330         Works around the famous automake error in coreutils.
8331
8332 2006-11-13  Eric Blake  <ebb9@byu.net>
8333
8334         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
8335         element, not its node.
8336
8337 2006-11-12  Bruno Haible  <bruno@clisp.org>
8338
8339         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
8340         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
8341
8342 2006-11-12  Bruno Haible  <bruno@clisp.org>
8343
8344         * gnulib-tool: New option --local-symlink.
8345         (func_usage): Document it.
8346         (lsymbolic): New variable.
8347         (func_import, func_create_testdir): If --symlink was not specified,
8348         test whether --local-symlink was specified and the file comes from
8349         the local_gnulib_dir.
8350
8351 2006-11-12  Bruno Haible  <bruno@clisp.org>
8352
8353         * gnulib-tool (func_ln): New function.
8354         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
8355
8356 2006-11-12  Bruno Haible  <bruno@clisp.org>
8357
8358         Finish support for source files in subdirectories.
8359         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
8360         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
8361         AUTOMAKE_OPTIONS.
8362         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
8363
8364 2006-11-12  Bruno Haible  <bruno@clisp.org>
8365
8366         * gnulib-tool (func_get_automake_snippet): Synthesize also an
8367         EXTRA_lib_SOURCES augmentation.
8368         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
8369
8370 2006-11-12  Jim Meyering  <jim@meyering.net>
8371
8372         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
8373         file descriptors.  This also averts a failure on systems with
8374         native openat support when a traversed directory lacks "x" access.
8375         * lib/fts_.h: Include "i-ring.h"
8376         (struct FTS) [fts_fd_ring]: New member.
8377         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
8378         (FCHDIR): Add parentheses.
8379         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
8380         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
8381         When descending, rather than simply closing the previous
8382         fts_cwd_fd value, push that file descriptor onto the ring.
8383         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
8384         (fts_open): Initialize the new fd_ring member.
8385         (fts_close): Clear the ring.
8386         (fts_safe_changedir): When possible, use our new fd_ring to skip
8387         the diropen and fstat and dev/ino comparison that would normally
8388         accompany a virtual `chdir ("..")'.
8389
8390         * modules/fts (Depends-on): Add i-ring.
8391         * modules/i-ring: New module.
8392         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
8393         * m4/i-ring.m4: New file.
8394
8395 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8396
8397         * gnulib-tool (func_create_testdir): Fix replacement of
8398         `build-aux' in configure.ac.  Run autotools in gltests
8399         subdirectory.
8400         (func_create_testdir, func_create_megatestdir, test): There is
8401         no need for '--force' in most autotool invocations in a new
8402         tree.  Actually fail the whole test if any of the tools, or the
8403         configure or make stages fail.
8404
8405         Sync from Automake.
8406         * build-aux/gnupload: Revert last change.  Add pointer to upload
8407         instructions of the GNU Maintenance Instructions.
8408         Suggestion by Karl Berry.
8409
8410 2006-11-10  Jim Meyering  <jim@meyering.net>
8411
8412         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
8413
8414 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
8415
8416         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
8417         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
8418         (bind_textdomain_codeset) [! ENABLE_NLS]:
8419         Evaluate all the arguments.  That way, callers get compatible behavior
8420         if the arguments have side effects.  Also, it avoids some GCC
8421         diagnostics in some cases; Joel E. Denny reported problems when Bison
8422         was configured with --enable-gcc-warnigs.
8423
8424 2006-11-10  Jim Meyering  <jim@meyering.net>
8425
8426         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
8427         relevant options in CFLAGS (like -O, -fno-inline) are taken into
8428         account.
8429
8430 2006-11-10  Jim Meyering  <jim@meyering.net>
8431
8432         * modules/inline: New file/module.
8433         * modules/xalloc (Files): Remove m4/inline.m4.
8434         (Depends-on): Add inline, instead.
8435         * modules/oset: Likewise.
8436         * modules/list: Likewise.
8437
8438 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
8439
8440         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
8441         Problem reported by Matthew Woehlke.
8442
8443 2006-11-09  Bruno Haible  <bruno@clisp.org>
8444
8445         * lib/tempname.c (gen_tempname): Remove variant that invokes
8446         __gen_tempname.
8447         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
8448         __gen_tempname.
8449
8450 2006-11-08  Bruno Haible  <bruno@clisp.org>
8451
8452         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
8453         to 'yes' instead of 'cross-compiling'.
8454
8455 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
8456
8457         * lib/quotearg.h (quotearg_free): New decl.
8458         * lib/quotearg.c (quotearg_free): New function.
8459         (slot0, nslots, slotvec0, slotvec):
8460         Now file-scope so that quotearg_free can get at them.
8461
8462 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8463
8464         Sync from Automake.
8465         * build-aux/gnupload: Add missing 'gnu' to example URL.
8466         Report by Karl Berry.
8467
8468 2006-11-08  Bruno Haible  <bruno@clisp.org>
8469
8470         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
8471         Suggested by Paul Eggert.
8472
8473 2006-11-08  Jim Meyering  <jim@meyering.net>
8474
8475         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
8476         It's already included if !_LIBC.
8477         (fts_safe_changedir): Add a comment.
8478
8479 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
8480
8481         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
8482         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
8483         Matthew Woehlke.
8484
8485         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
8486         definitions up, to avoid colliding with change below.
8487         (static_inline) [HAVE_INLINE]: New macro.
8488         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
8489         Provide extern decls when !HAVE_INLINE.  Do not define unless
8490         static_inline is defined, either by us or by xmalloc.c.  Use
8491         static_inline rather than static inline.
8492         (XCALLOC): Optimize sizeof(T) = 1 case.
8493         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
8494
8495 2006-11-07  Bruno Haible  <bruno@clisp.org>
8496
8497         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
8498         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
8499         AC_C_INLINE.
8500         * modules/xalloc (Files): Add m4/inline.m4.
8501
8502 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8503
8504         * README: Fix typo.
8505         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
8506         (Miscellanous Notes): ...from this.
8507
8508 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
8509
8510         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
8511         Mention that offsetof should be used instead of sizeof.
8512         From Bruno Haible.
8513
8514 2006-11-07  Bruno Haible  <bruno@clisp.org>
8515
8516         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
8517
8518 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
8519
8520         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
8521         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
8522         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
8523         (gl_tree_add_before, gl_tree_add_after):
8524         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
8525         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
8526         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
8527         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
8528         (gl_linked_add_after, gl_linked_add_at): Likewise.
8529         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
8530         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
8531         (gl_tree_add_before, gl_tree_add_after): Likewise.
8532         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
8533         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
8534         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
8535
8536 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8537
8538         * lib/gl_oset.h: Use C comment style, not C++ comment style.
8539
8540 2006-11-06  Bruno Haible  <bruno@clisp.org>
8541
8542         * m4/inline.m4: New file.
8543         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
8544         * modules/list (Files): Add m4/inline.m4.
8545         * modules/oset (Files): Likewise.
8546
8547 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
8548
8549         * lib/idcache.c: Include <stddef.h>, for offsetof.
8550         (struct userid.name): Change from char * to a flexible array member.
8551         All uses changed.
8552         * modules/idcache (Depends-on): Add flexmember.
8553
8554         * MODULES.html.sh (Core language properties): New module flexmember.
8555         * modules/flexmember, m4/flexmember.m4: New files.
8556
8557         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
8558         inline functions that are identical with the old xnmalloc_inline,
8559         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
8560         that we can avoid some unnecessary integer multiplications and
8561         divisions in the common case where the element size is known at
8562         compile time.
8563         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
8564         needed.
8565         (xnboundedmalloc): Remove.
8566         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
8567         arguments, for consistency with rest of this header.
8568         (xcharalloc): Rewrite using XNMALLOC.
8569         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
8570         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
8571         versions have been moved to lib/xalloc.h and renamed to be the
8572         non-*_inline versions.
8573         (xmalloc, xrealloc): Implement without reference to the xnmalloc
8574         and xnrealloc functions, since those functions are now inline and
8575         now call us.
8576         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
8577         renaming described above.
8578         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
8579         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
8580         captures the dependency in AC_C_INLINE.
8581
8582         New module canonicalize-lgpl, proposed by Charles Wilson in
8583         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
8584         with a few small changes afterwards.
8585         * MODULES.html.sh (File system functions): New module
8586         canonicalize-lgpl.
8587         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
8588         and canonicalize_file_name.
8589         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
8590         * modules/canonicalize-lgpl: New files.
8591
8592 2006-11-05  Bruno Haible  <bruno@clisp.org>
8593
8594         * gnulib-tool (func_import, func_create_testdir): Create directories
8595         also for files in subdirectories of lib/.
8596
8597 2006-11-05  Bruno Haible  <bruno@clisp.org>
8598
8599         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
8600         ANSI C compliant.
8601
8602 2006-11-03  Bruno Haible  <bruno@clisp.org>
8603
8604         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
8605         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
8606         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
8607         (xnboundedmalloc): New inline function.
8608         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
8609         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
8610         xmalloc.
8611         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
8612         xmalloc.
8613         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
8614         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
8615         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
8616         xmalloc.
8617         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
8618         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
8619         xmalloc.
8620         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
8621         gl_tree_add_after): Use XMALLOC instead of xmalloc.
8622         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
8623         xmalloc.
8624         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
8625         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
8626         gl_tree_add_after): Use XMALLOC instead of xmalloc.
8627         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
8628         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
8629         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
8630         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
8631
8632 2006-11-03  Bruno Haible  <bruno@clisp.org>
8633
8634         * lib/c-ctype.h [C++]: Define functions without name mangling.
8635         * lib/fwriteerror.h [C++]: Likewise.
8636         * lib/gcd.h [C++]: Likewise.
8637         * lib/linebreak.h [C++]: Likewise.
8638
8639 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
8640
8641         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
8642         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
8643         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
8644         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
8645         Check for functions and headers just once.
8646         Check for declaration of canonicalize_file_name.
8647         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
8648
8649 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
8650
8651         * gnulib-tool (func_import): Fix typo in actioncmd.
8652
8653 2006-11-02  Bruno Haible  <bruno@clisp.org>
8654
8655         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
8656         newline sequence in the Makefile.am snippet as a space, like "make"
8657         does.
8658         Reported by Roger Persson <perrog@gmail.com>.
8659
8660 2006-11-01  Bruno Haible  <bruno@clisp.org>
8661
8662         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
8663         already declared in <string.h>.
8664         * lib/strcase.h (strncasecmp): Don't declare it if yes.
8665
8666 2006-11-01  Bruno Haible  <bruno@clisp.org>
8667
8668         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
8669         * lib/strcase.h: Include <string.h>.
8670         (strcasecmp): Define to rpl_strcasecmp here.
8671
8672 2006-11-01  Bruno Haible  <bruno@clisp.org>
8673
8674         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
8675
8676 2006-11-01  Eric Blake  <ebb9@byu.net>
8677
8678         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
8679
8680         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
8681
8682 2006-10-29  Bruno Haible  <bruno@clisp.org>
8683
8684         Make it compile in C++ mode.
8685         * lib/full-write.c (full_rw): Add a cast.
8686
8687 2006-11-01  Bruno Haible  <bruno@clisp.org>
8688
8689         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
8690         be POSIX compliant.
8691         Reported by Roger Persson <perrog@gmail.com>.
8692
8693 2006-11-01  Eric Blake  <ebb9@byu.net>
8694
8695         * lib/getopt_.h: Fix comments.
8696
8697 2006-10-31  Eric Blake  <ebb9@byu.net>
8698
8699         * modules/tmpdir (Depends-on): Add sys_stat.
8700         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
8701         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
8702         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
8703         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
8704         tempname.
8705
8706 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
8707
8708         Avoid some C++ diagnostics reported by Bruno Haible.
8709         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
8710         xmalloc.
8711         (quotearg_alloc): Use xcharalloc rather than xmalloc.
8712         (struct slotvec): Move to top level.
8713         (quotearg_n_options): Rewrite to avoid xmalloc.
8714         * lib/xalloc.h (xcharalloc): New function.
8715         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
8716         [defined __cplusplus]: Add function template that provides result
8717         type propagation.  This part of the change is from Bruno Haible.
8718
8719 2006-10-29  Bruno Haible  <bruno@clisp.org>
8720
8721         Make it compile in C++ mode.
8722         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
8723         * lib/strnlen1.c (strnlen1): Cast memchr result.
8724         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
8725         * lib/clean-temp.c (string_equals, string_hash): Add casts.
8726         (create_temp_dir): Rename local variable 'template'.
8727         (compile_csharp_using_sscli): Add cast.
8728         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
8729         * lib/findprog.c (find_in_path): Likewise.
8730         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
8731         * lib/wait-process.c (register_slave_subprocess): Likewise.
8732
8733 2006-10-22  Bruno Haible  <bruno@clisp.org>
8734
8735         * modules/tsearch: New file.
8736         * lib/tsearch.h: New file.
8737         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
8738         * m4/tsearch.m4: New file.
8739         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
8740
8741 2006-10-29  Eric Blake  <ebb9@byu.net>
8742
8743         * lib/arcfour.c: Assume config.h.
8744         * lib/arctwo.c: Likewise.
8745         * lib/base64.c: Likewise.
8746         * lib/check-version.c: Likewise.
8747         * lib/crc.c: Likewise.
8748         * lib/des.c: Likewise.
8749         * lib/gc-gnulib.c: Likewise.
8750         * lib/gc-libgcrypt.c: Likewise.
8751         * lib/gc-pbkdf2-sha1.c: Likewise.
8752         * lib/getaddrinfo.c: Likewise.
8753         * lib/getdelim.c: Likewise.
8754         * lib/getline.c: Likewise.
8755         * lib/hmac-md5.c: Likewise.
8756         * lib/hmac-sha1.c: Likewise.
8757         * lib/iconvme.c: Likewise.
8758         * lib/md2.c: Likewise.
8759         * lib/md4.c: Likewise.
8760         * lib/memxor.c: Likewise.
8761         * lib/read-file.c: Likewise.
8762         * lib/readline.c: Likewise.
8763         * lib/rijndael-alg-fst.c: Likewise.
8764         * lib/rijndael-api-fst.c: Likewise.
8765         * lib/xgetdomainname.c: Likewise.
8766
8767 2006-10-28  Eric Blake  <ebb9@byu.net>
8768
8769         * lib/xstrndup.c: Assume config.h.
8770
8771 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
8772
8773         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
8774         stat-macros.h is now for our own macros, whereas stat_h is for
8775         macros in the <sys/stat.h> name space.
8776         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
8777         (STAT_MACROS_H): Remove.
8778         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
8779         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
8780         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
8781         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
8782         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
8783         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
8784         Move these macros to ...
8785         * lib/stat_.h: here.  Don't include stat-macros.h.
8786         * lib/canonicalize.c: Don't include stat-macros.h.
8787         * lib/chown.c: Likewise.
8788         * lib/euidaccess.c: Likewise.
8789         * lib/file-type.c: Likewise.
8790         * lib/filemode.c: Likewise.
8791         * lib/glob.c: Likewise.
8792         * lib/isapipe.c: Likewise.
8793         * lib/lchown.c: Likewise.
8794         * lib/lstat.c: Likewise.
8795         * lib/mkdir-p.c: Likewise.
8796         * lib/rmdir.c: Likewise.
8797         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
8798         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
8799         unless mkdir isn't declared, to speed up 'configure'.
8800         Always create sys/stat.h, since it's unlikely any real sys/stat.h
8801         would define all the S_* symbols.
8802         * modules/canonicalize (Depends-on):
8803         Depend on sys_stat, not stat-macros.
8804         * modules/chown: Likewise.
8805         * modules/euidaccess: Likewise.
8806         * modules/filemode: Likewise.
8807         * modules/file-type: Likewise.
8808         * modules/glob: Likewise.
8809         * modules/isapipe: Likewise.
8810         * modules/lchown: Likewise.
8811         * modules/lstat: Likewise.
8812         * modules/mkancesdirs: Likewise.
8813         * modules/rmdir: Likewise.
8814         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
8815         * modules/modechange: Likewise.
8816         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
8817         (configure.ac): Remove gl_STAT_MACROS.
8818         * modules/sys_stat (Depends-on): Remove stat-macros.
8819
8820 2006-10-27  Bruno Haible  <bruno@clisp.org>
8821
8822         * m4/signed.m4: Remove file.
8823         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
8824         invocation.
8825         * modules/vasnprintf (Files): Remove m4/signed.m4.
8826
8827 2006-10-27  Bruno Haible  <bruno@clisp.org>
8828
8829         Update to GNU gettext 0.16.
8830         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
8831         m4/inttypes-h.m4, m4/signed.m4.
8832         * m4/gettext.m4: Update to GNU gettext 0.16.
8833         * m4/intl.m4: New file, from GNU gettext.
8834         * m4/intldir.m4: New file, from GNU gettext.
8835         * config/srclist.txt: Update
8836
8837 2006-10-27  Eric Blake  <ebb9@byu.net>
8838
8839         * MODULES.html.sh: Document tempname.
8840         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
8841         dependencies.
8842         (Files): Move lib/tempname.c...
8843         * modules/tempname: ...to this new module.
8844         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
8845         (gl_PREREQ_TEMPNAME): Move...
8846         * m4/tempname.m4: ...to this new file.
8847         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
8848         * modules/sys_stat (Depends-on): Add stat-macros.
8849         * lib/stat_.h (includes): Pick up stat macros.
8850         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
8851         if stat macros are broken.
8852         * lib/tempname.c (includes): No need to include "stat-macros.h".
8853         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
8854         (direxists, __path_search) [!_LIBC]: Don't compile these in
8855         gnulib; the tmpdir module covers that.
8856         * lib/tempname.h: New file.
8857
8858 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
8859
8860         * COPYING: Explain how gnulib-tool converts licence headers.
8861         Almost all wording by Eric Blake.
8862
8863 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
8864
8865         * lib/mbchar.h (is_basic_table): Make read-only.
8866         * lib/mbchar.c (is_basic_table): Likewise.
8867         Reported by John Darrington.
8868
8869 2006-10-25  Bruno Haible  <bruno@clisp.org>
8870
8871         * lib/progname.h (set_program_name): Undefine before defining.
8872
8873 2006-10-25  Bruno Haible  <bruno@clisp.org>
8874
8875         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
8876         false for non-gcc C++ compilers.
8877         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
8878
8879 2006-10-24  Bruno Haible  <bruno@clisp.org>
8880
8881         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
8882         iconv implementations like Irix iconv.
8883
8884 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
8885
8886         * modules/vararrays: New file.
8887         * m4/vararrays.m4: New file, taken from diffutils.
8888         * MODULES.html.sh: New module vararrays.
8889
8890 2006-10-24  Karl Berry  <karl@gnu.org>
8891
8892         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
8893         Don't call GNU Unix.
8894
8895 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8896
8897         * users.txt: Add Libtool.
8898
8899         Sync from Libtool:
8900
8901         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
8902
8903         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
8904         to gnulib's policy of including config.h unconditionally.
8905
8906 2006-10-24  Bruno Haible  <bruno@clisp.org>
8907
8908         * modules/wcwidth (Files): Add m4/wint_t.m4.
8909         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
8910         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
8911
8912 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
8913
8914         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
8915         to pacify GCC with some -W flags enabled.  Problem reported by
8916         Bruno Haible.
8917
8918 2006-10-24  Jim Meyering  <jim@meyering.net>
8919
8920         * MODULES.html.sh: Remove uinttostr.  It's not a module.
8921         Reported by Karl Berry.
8922
8923 2006-10-23  Bruno Haible  <bruno@clisp.org>
8924
8925         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
8926
8927 2006-10-24  Bruno Haible  <bruno@clisp.org>
8928
8929         * lib/gl_list.h: Use C comment style, not C++ comment style.
8930
8931 2006-10-23  Eric Blake  <ebb9@byu.net>
8932
8933         * lib/getaddrinfo.c (includes): Add missing include.
8934
8935 2006-10-23  Bruno Haible  <bruno@clisp.org>
8936             Paul Eggert  <eggert@cs.ucla.edu>
8937
8938         Ability to rename obstack_free.
8939         * lib/obstack.h (__obstack_free): New macro. Declare instead of
8940         obstack_free.
8941         (obstack_free): Invoke the __obstack_free macro.
8942         * lib/obstack.c (obstack_free): Use __obstack_free macro.
8943
8944 2006-10-23  Bruno Haible  <bruno@clisp.org>
8945             Paul Eggert  <eggert@cs.ucla.edu>
8946
8947         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
8948         __argc, __argv from the declaration. (They are defined as macros on
8949         mingw.)
8950
8951 2006-10-22  Bruno Haible  <bruno@clisp.org>
8952
8953         * doc/gnulib-intro.texi: New file.
8954         * doc/gnulib.texi: Include it.
8955
8956 2006-10-21  Bruno Haible  <bruno@clisp.org>
8957
8958         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
8959         "Introduction", "Miscellanous Notes", "Particular Modules".
8960
8961 2006-10-21  Bruno Haible  <bruno@clisp.org>
8962
8963         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
8964         Change mostlyclean-local rule to avoid sh syntax error from bash
8965         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
8966
8967 2006-10-23  Jim Meyering  <jim@meyering.net>
8968
8969         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
8970         in place of snprintf.
8971
8972         * modules/inttostr (Files): Add lib/uinttostr.c.
8973         * lib/uinttostr.c (inttostr): New file/function.
8974         * lib/inttostr.h (uinttostr): Declare.
8975         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
8976         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
8977         Add uinttostr.
8978         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
8979
8980 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
8981
8982         * lib/canonicalize.c (ELOOP): Define if not already defined.
8983         Problem reported by Bruno Haible in
8984         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
8985
8986 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
8987
8988         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
8989         Problem reported by Perry Smith and Ville Laurikari.
8990
8991         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
8992         uses.
8993
8994 2006-10-19  Bruno Haible  <bruno@clisp.org>
8995
8996         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
8997         for mingw.
8998
8999 2006-10-19  Bruno Haible  <bruno@clisp.org>
9000
9001         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
9002         Needed for mingw.
9003
9004 2006-10-19  Bruno Haible  <bruno@clisp.org>
9005
9006         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
9007
9008 2006-10-19  Bruno Haible  <bruno@clisp.org>
9009
9010         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
9011         it.
9012
9013 2006-10-19  Bruno Haible  <bruno@clisp.org>
9014
9015         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
9016         invocation.
9017
9018 2006-10-19  Bruno Haible  <bruno@clisp.org>
9019
9020         * gnulib-tool (func_create_testdir): Don't include ftruncate and
9021         mountlist by default.
9022
9023 2006-10-16  Bruno Haible  <bruno@clisp.org>
9024
9025         * lib/c-strstr.c: Include c-strstr.h.
9026
9027 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
9028
9029         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
9030         in a slash.
9031
9032 2006-10-18  Bruno Haible  <bruno@clisp.org>
9033
9034         * lib/lock.h [C++]: Wrap definitions in extern "C".
9035
9036 2006-10-18  Bruno Haible  <bruno@clisp.org>
9037
9038         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
9039         gl_LIBOBJS list.
9040
9041 2006-10-18  Bruno Haible  <bruno@clisp.org>
9042
9043         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
9044
9045 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
9046
9047         * lib/xstrtol.h: Include gettext.h.
9048         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
9049         Problem reported by Eric Blake.
9050         * modules/xstrtol (Depends-on): Add gettext-h.
9051
9052 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
9053
9054         * lib/strftime.c (advance): New macro.
9055         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
9056         incomplete type, so you can't add 0 to it.  Problem and patch
9057         reported by Eelco Dolstra for dietlibc.
9058
9059 2006-10-18  Jim Meyering  <jim@meyering.net>
9060
9061         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
9062         type for a local, and rename it: s/up/user_proc/.
9063
9064 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
9065
9066         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
9067         READ_UTMP_USER_PROCESS.
9068         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
9069
9070 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
9071
9072         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
9073         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
9074
9075 2006-10-17  Eric Blake  <ebb9@byu.net>
9076
9077         * lib/sigprocmask.c (sigprocmask): Fix typo.
9078
9079         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
9080
9081         * modules/clean-temp (Makefile.am): Don't add to make output...
9082         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
9083         config.h.
9084
9085 2006-10-17  Bruno Haible  <bruno@clisp.org>
9086
9087         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
9088         differently if DEFAULT_TEXT_DOMAIN is set.
9089
9090 2006-10-16  Bruno Haible  <bruno@clisp.org>
9091
9092         * lib/clean-temp.c: Include fwriteerror.h.
9093
9094 2006-10-16  Bruno Haible  <bruno@clisp.org>
9095
9096         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
9097
9098 2006-10-16  Bruno Haible  <bruno@clisp.org>
9099
9100         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
9101         * lib/sigprocmask.h: Include <sys/types.h>.
9102         (sigset_t): Use the system's definition if present.
9103
9104 2006-10-17  Eric Blake  <ebb9@byu.net>
9105
9106         * lib/xvasprintf.c (includes): Assume config.h.
9107         * lib/xasprintf.c (includes): Likewise.
9108
9109 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
9110
9111         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
9112         at least as wide as intmax_t.
9113
9114 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
9115
9116         (Imported from Automake.)
9117         * build-aux/gnupload: Update to version 1.1 of directive file.
9118
9119 2006-10-16  Eric Blake  <ebb9@byu.net>
9120
9121         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
9122         match Automake 1.10a.
9123
9124 2006-10-14  Bruno Haible  <bruno@clisp.org>
9125
9126         * modules/sigprocmask: New file.
9127         * lib/sigprocmask.h: New file.
9128         * lib/sigprocmask.c: New file.
9129         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
9130         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
9131         request sigprocmask.o.
9132         (gl_PREREQ_SIGPROCMASK): New macro.
9133         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
9134         (Depends-on): Add sigprocmask.
9135         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
9136         gt_SIGNALBLOCKING. Test for 'raise' only once.
9137         * lib/fatal-signal.c: Include sigprocmask.h.
9138         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
9139         unblock_fatal_signals): Define always.
9140         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
9141         sigprocmask.
9142
9143 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
9144
9145         Sync from Automake.
9146         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
9147         which incorrectly sets the mode of an existing destination
9148         directory.  In some cases the unpatched install-sh could do the
9149         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
9150         system.  We hope this is rare in practice, but it's clearly worth
9151         fixing.  Problem reported by Alex Unleashed in
9152         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
9153         Also, don't bother to check for -m bugs unless we're using -m;
9154         suggested by Stepan Kasal.
9155
9156 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9157
9158         Sync from Automake.
9159         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
9160         `-c' flag, so they appear at the same position as in %FASTDEP%
9161         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
9162         which ignores unknown options only after the first non-option.
9163         Bug report against M4 by Nelson H. F. Beebe.
9164
9165 2006-10-13  Jim Meyering  <jim@meyering.net>
9166
9167         Fix a bug in yesterday's change.
9168         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
9169         p->fts_statp->st_dev would be used uninitialized.
9170         Ensures that we always call fts_stat on the very first entry.
9171         Miklos Szeredi reported that find -xdev stopped working.
9172
9173 2006-10-12  Bruno Haible  <bruno@clisp.org>
9174
9175         * gnulib-tool (func_get_automake_snippet): Append an automatically
9176         computed EXTRA_DIST augmentation.
9177         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
9178         * modules/alloca-opt (Makefile.am): Likewise.
9179         * modules/allocsa (Makefile.am): Likewise.
9180         * modules/arcfour (Makefile.am): Likewise.
9181         * modules/arctwo (Makefile.am): Likewise.
9182         * modules/argmatch (Makefile.am): Likewise.
9183         * modules/argz (Makefile.am): Likewise.
9184         * modules/atexit (Makefile.am): Likewise.
9185         * modules/backupfile (Makefile.am): Likewise.
9186         * modules/byteswap (Makefile.am): Likewise.
9187         * modules/c-strtod (Makefile.am): Likewise.
9188         * modules/c-strtold (Makefile.am): Likewise.
9189         * modules/calloc (Makefile.am): Likewise.
9190         * modules/canon-host (Makefile.am): Likewise.
9191         * modules/canonicalize (Makefile.am): Likewise.
9192         * modules/chdir-long (Makefile.am): Likewise.
9193         * modules/chdir-safer (Makefile.am): Likewise.
9194         * modules/check-version (Makefile.am): Likewise.
9195         * modules/chown (Makefile.am): Likewise.
9196         * modules/cloexec (Makefile.am): Likewise.
9197         * modules/close-stream (Makefile.am): Likewise.
9198         * modules/closeout (Makefile.am): Likewise.
9199         * modules/crc (Makefile.am): Likewise.
9200         * modules/csharpexec (Makefile.am): Likewise.
9201         * modules/cycle-check (Makefile.am): Likewise.
9202         * modules/des (Makefile.am): Likewise.
9203         * modules/dev-ino (Makefile.am): Likewise.
9204         * modules/dirfd (Makefile.am): Likewise.
9205         * modules/dirname (Makefile.am): Likewise.
9206         * modules/dup2 (Makefile.am): Likewise.
9207         * modules/eealloc (Makefile.am): Likewise.
9208         * modules/error (Makefile.am): Likewise.
9209         * modules/euidaccess (Makefile.am): Likewise.
9210         * modules/exclude (Makefile.am): Likewise.
9211         * modules/exitfail (Makefile.am): Likewise.
9212         * modules/fcntl-safer (Makefile.am): Likewise.
9213         * modules/fcntl (Makefile.am): Likewise.
9214         * modules/file-type (Makefile.am): Likewise.
9215         * modules/fileblocks (Makefile.am): Likewise.
9216         * modules/filemode (Makefile.am): Likewise.
9217         * modules/filenamecat (Makefile.am): Likewise.
9218         * modules/fnmatch (Makefile.am): Likewise.
9219         * modules/fopen-safer (Makefile.am): Likewise.
9220         * modules/fpending (Makefile.am): Likewise.
9221         * modules/fprintftime (Makefile.am): Likewise.
9222         * modules/free (Makefile.am): Likewise.
9223         * modules/fsusage (Makefile.am): Likewise.
9224         * modules/ftruncate (Makefile.am): Likewise.
9225         * modules/fts (Makefile.am): Likewise.
9226         * modules/gc-arcfour (Makefile.am): Likewise.
9227         * modules/gc-des (Makefile.am): Likewise.
9228         * modules/gc-hmac-md5 (Makefile.am): Likewise.
9229         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
9230         * modules/gc-md4 (Makefile.am): Likewise.
9231         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
9232         * modules/gc-sha1 (Makefile.am): Likewise.
9233         * modules/gc (Makefile.am): Likewise.
9234         * modules/getaddrinfo (Makefile.am): Likewise.
9235         * modules/getcwd (Makefile.am): Likewise.
9236         * modules/getdelim (Makefile.am): Likewise.
9237         * modules/getdomainname (Makefile.am): Likewise.
9238         * modules/getgroups (Makefile.am): Likewise.
9239         * modules/gethostname (Makefile.am): Likewise.
9240         * modules/gethrxtime (Makefile.am): Likewise.
9241         * modules/getline (Makefile.am): Likewise.
9242         * modules/getloadavg (Makefile.am): Likewise.
9243         * modules/getlogin_r (Makefile.am): Likewise.
9244         * modules/getndelim2 (Makefile.am): Likewise.
9245         * modules/getopt (Makefile.am): Likewise.
9246         * modules/getpagesize (Makefile.am): Likewise.
9247         * modules/getpass-gnu (Makefile.am): Likewise.
9248         * modules/getpass (Makefile.am): Likewise.
9249         * modules/getsubopt (Makefile.am): Likewise.
9250         * modules/gettime (Makefile.am): Likewise.
9251         * modules/gettimeofday (Makefile.am): Likewise.
9252         * modules/getugroups (Makefile.am): Likewise.
9253         * modules/getusershell (Makefile.am): Likewise.
9254         * modules/glob (Makefile.am): Likewise.
9255         * modules/group-member (Makefile.am): Likewise.
9256         * modules/hard-locale (Makefile.am): Likewise.
9257         * modules/hash (Makefile.am): Likewise.
9258         * modules/hmac-md5 (Makefile.am): Likewise.
9259         * modules/hmac-sha1 (Makefile.am): Likewise.
9260         * modules/human (Makefile.am): Likewise.
9261         * modules/idcache (Makefile.am): Likewise.
9262         * modules/imaxabs (Makefile.am): Likewise.
9263         * modules/imaxdiv (Makefile.am): Likewise.
9264         * modules/inet_ntop (Makefile.am): Likewise.
9265         * modules/inet_pton (Makefile.am): Likewise.
9266         * modules/intprops (Makefile.am): Likewise.
9267         * modules/inttostr (Makefile.am): Likewise.
9268         * modules/inttypes (Makefile.am): Likewise.
9269         * modules/isapipe (Makefile.am): Likewise.
9270         * modules/javaversion (Makefile.am): Likewise.
9271         * modules/lchmod (Makefile.am): Likewise.
9272         * modules/lchown (Makefile.am): Likewise.
9273         * modules/localcharset (Makefile.am): Likewise.
9274         * modules/long-options (Makefile.am): Likewise.
9275         * modules/lstat (Makefile.am): Likewise.
9276         * modules/malloc (Makefile.am): Likewise.
9277         * modules/mathl (Makefile.am): Likewise.
9278         * modules/mbchar (Makefile.am): Likewise.
9279         * modules/md2 (Makefile.am): Likewise.
9280         * modules/md4 (Makefile.am): Likewise.
9281         * modules/md5 (Makefile.am): Likewise.
9282         * modules/memcasecmp (Makefile.am): Likewise.
9283         * modules/memchr (Makefile.am): Likewise.
9284         * modules/memcmp (Makefile.am): Likewise.
9285         * modules/memcoll (Makefile.am): Likewise.
9286         * modules/memcpy (Makefile.am): Likewise.
9287         * modules/memmem (Makefile.am): Likewise.
9288         * modules/memmove (Makefile.am): Likewise.
9289         * modules/mempcpy (Makefile.am): Likewise.
9290         * modules/memrchr (Makefile.am): Likewise.
9291         * modules/memset (Makefile.am): Likewise.
9292         * modules/memxor (Makefile.am): Likewise.
9293         * modules/mkancesdirs (Makefile.am): Likewise.
9294         * modules/mkdir-p (Makefile.am): Likewise.
9295         * modules/mkdir (Makefile.am): Likewise.
9296         * modules/mkdtemp (Makefile.am): Likewise.
9297         * modules/mkstemp (Makefile.am): Likewise.
9298         * modules/mktime (Makefile.am): Likewise.
9299         * modules/modechange (Makefile.am): Likewise.
9300         * modules/mountlist (Makefile.am): Likewise.
9301         * modules/nanosleep (Makefile.am): Likewise.
9302         * modules/obstack (Makefile.am): Likewise.
9303         * modules/openat (Makefile.am): Likewise.
9304         * modules/pagealign_alloc (Makefile.am): Likewise.
9305         * modules/pathmax (Makefile.am): Likewise.
9306         * modules/physmem (Makefile.am): Likewise.
9307         * modules/poll (Makefile.am): Likewise.
9308         * modules/posixtm (Makefile.am): Likewise.
9309         * modules/posixver (Makefile.am): Likewise.
9310         * modules/putenv (Makefile.am): Likewise.
9311         * modules/quote (Makefile.am): Likewise.
9312         * modules/quotearg (Makefile.am): Likewise.
9313         * modules/raise (Makefile.am): Likewise.
9314         * modules/read-file (Makefile.am): Likewise.
9315         * modules/readline (Makefile.am): Likewise.
9316         * modules/readlink (Makefile.am): Likewise.
9317         * modules/readtokens (Makefile.am): Likewise.
9318         * modules/readutmp (Makefile.am): Likewise.
9319         * modules/realloc (Makefile.am): Likewise.
9320         * modules/regex (Makefile.am): Likewise.
9321         * modules/rename-dest-slash (Makefile.am): Likewise.
9322         * modules/rename (Makefile.am): Likewise.
9323         * modules/rijndael (Makefile.am): Likewise.
9324         * modules/rmdir (Makefile.am): Likewise.
9325         * modules/rpmatch (Makefile.am): Likewise.
9326         * modules/safe-read (Makefile.am): Likewise.
9327         * modules/safe-write (Makefile.am): Likewise.
9328         * modules/same-inode (Makefile.am): Likewise.
9329         * modules/same (Makefile.am): Likewise.
9330         * modules/save-cwd (Makefile.am): Likewise.
9331         * modules/savedir (Makefile.am): Likewise.
9332         * modules/setenv (Makefile.am): Likewise.
9333         * modules/settime (Makefile.am): Likewise.
9334         * modules/sha1 (Makefile.am): Likewise.
9335         * modules/sig2str (Makefile.am): Likewise.
9336         * modules/snprintf (Makefile.am): Likewise.
9337         * modules/stat-macros (Makefile.am): Likewise.
9338         * modules/stat-time (Makefile.am): Likewise.
9339         * modules/stdbool (Makefile.am): Likewise.
9340         * modules/stdint (Makefile.am): Likewise.
9341         * modules/stdlib-safer (Makefile.am): Likewise.
9342         * modules/stpcpy (Makefile.am): Likewise.
9343         * modules/stpncpy (Makefile.am): Likewise.
9344         * modules/strcase (Makefile.am): Likewise.
9345         * modules/strcasestr (Makefile.am): Likewise.
9346         * modules/strchrnul (Makefile.am): Likewise.
9347         * modules/strcspn (Makefile.am): Likewise.
9348         * modules/strdup (Makefile.am): Likewise.
9349         * modules/strerror (Makefile.am): Likewise.
9350         * modules/strftime (Makefile.am): Likewise.
9351         * modules/strndup (Makefile.am): Likewise.
9352         * modules/strnlen (Makefile.am): Likewise.
9353         * modules/strpbrk (Makefile.am): Likewise.
9354         * modules/strsep (Makefile.am): Likewise.
9355         * modules/strstr (Makefile.am): Likewise.
9356         * modules/strtod (Makefile.am): Likewise.
9357         * modules/strtoimax (Makefile.am): Likewise.
9358         * modules/strtok_r (Makefile.am): Likewise.
9359         * modules/strtol (Makefile.am): Likewise.
9360         * modules/strtoll (Makefile.am): Likewise.
9361         * modules/strtoul (Makefile.am): Likewise.
9362         * modules/strtoull (Makefile.am): Likewise.
9363         * modules/strtoumax (Makefile.am): Likewise.
9364         * modules/strverscmp (Makefile.am): Likewise.
9365         * modules/sys_socket (Makefile.am): Likewise.
9366         * modules/sys_stat (Makefile.am): Likewise.
9367         * modules/sysexits (Makefile.am): Likewise.
9368         * modules/time_r (Makefile.am): Likewise.
9369         * modules/timegm (Makefile.am): Likewise.
9370         * modules/timespec (Makefile.am): Likewise.
9371         * modules/tmpfile-safer (Makefile.am): Likewise.
9372         * modules/trim (Makefile.am): Likewise.
9373         * modules/unistd-safer (Makefile.am): Likewise.
9374         * modules/unlinkdir (Makefile.am): Likewise.
9375         * modules/unlocked-io (Makefile.am): Likewise.
9376         * modules/userspec (Makefile.am): Likewise.
9377         * modules/utime (Makefile.am): Likewise.
9378         * modules/utimecmp (Makefile.am): Likewise.
9379         * modules/utimens (Makefile.am): Likewise.
9380         * modules/vasnprintf (Makefile.am): Likewise.
9381         * modules/vasprintf (Makefile.am): Likewise.
9382         * modules/vsnprintf (Makefile.am): Likewise.
9383         * modules/xalloc (Makefile.am): Likewise.
9384         * modules/xgetcwd (Makefile.am): Likewise.
9385         * modules/xnanosleep (Makefile.am): Likewise.
9386         * modules/xreadlink (Makefile.am): Likewise.
9387         * modules/xstrtod (Makefile.am): Likewise.
9388         * modules/xstrtol (Makefile.am): Likewise.
9389         * modules/xstrtold (Makefile.am): Likewise.
9390         * modules/yesno (Makefile.am): Likewise.
9391         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
9392
9393 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
9394
9395         * modules/error (Makefile.am): Distribute files through
9396         EXTRA_DIST, not lib_SOURCES.
9397
9398 2006-10-12  Eric Blake  <ebb9@byu.net>
9399
9400         * modules/error (Makefile.am): Distribute files in /lib.
9401         * modules/obstack (Makefile.am): Likewise.
9402
9403 2006-10-12  Bruno Haible  <bruno@clisp.org>
9404
9405         * modules/acl (Makefile.am): Distribute all files in lib/ through
9406         EXTRA_DIST.
9407         * modules/arcfour (Makefile.am): Likewise.
9408         * modules/arctwo (Makefile.am): Likewise.
9409         * modules/argmatch (Makefile.am): Likewise.
9410         * modules/argz (Makefile.am): Likewise.
9411         * modules/atexit (Makefile.am): Likewise.
9412         * modules/backupfile (Makefile.am): Likewise.
9413         * modules/c-strtod (Makefile.am): Likewise.
9414         * modules/c-strtold (Makefile.am): Likewise.
9415         * modules/calloc (Makefile.am): Likewise.
9416         * modules/canon-host (Makefile.am): Likewise.
9417         * modules/canonicalize (Makefile.am): Likewise.
9418         * modules/chdir-long (Makefile.am): Likewise.
9419         * modules/chdir-safer (Makefile.am): Likewise.
9420         * modules/check-version (Makefile.am): Likewise.
9421         * modules/chown (Makefile.am): Likewise.
9422         * modules/cloexec (Makefile.am): Likewise.
9423         * modules/close-stream (Makefile.am): Likewise.
9424         * modules/closeout (Makefile.am): Likewise.
9425         * modules/crc (Makefile.am): Likewise.
9426         * modules/cycle-check (Makefile.am): Likewise.
9427         * modules/des (Makefile.am): Likewise.
9428         * modules/dirfd (Makefile.am): Likewise.
9429         * modules/dirname (Makefile.am): Likewise.
9430         * modules/dup2 (Makefile.am): Likewise.
9431         * modules/euidaccess (Makefile.am): Likewise.
9432         * modules/exclude (Makefile.am): Likewise.
9433         * modules/exitfail (Makefile.am): Likewise.
9434         * modules/fcntl-safer (Makefile.am): Likewise.
9435         * modules/file-type (Makefile.am): Likewise.
9436         * modules/fileblocks (Makefile.am): Likewise.
9437         * modules/filemode (Makefile.am): Likewise.
9438         * modules/filenamecat (Makefile.am): Likewise.
9439         * modules/fnmatch (Makefile.am): Likewise.
9440         * modules/fopen-safer (Makefile.am): Likewise.
9441         * modules/fpending (Makefile.am): Likewise.
9442         * modules/fprintftime (Makefile.am): Likewise.
9443         * modules/free (Makefile.am): Likewise.
9444         * modules/fsusage (Makefile.am): Likewise.
9445         * modules/ftruncate (Makefile.am): Likewise.
9446         * modules/fts (Makefile.am): Likewise.
9447         * modules/gc (Makefile.am): Likewise.
9448         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
9449         * modules/getaddrinfo (Makefile.am): Likewise.
9450         * modules/getcwd (Makefile.am): Likewise.
9451         * modules/getdelim (Makefile.am): Likewise.
9452         * modules/getdomainname (Makefile.am): Likewise.
9453         * modules/getgroups (Makefile.am): Likewise.
9454         * modules/gethostname (Makefile.am): Likewise.
9455         * modules/gethrxtime (Makefile.am): Likewise.
9456         * modules/getline (Makefile.am): Likewise.
9457         * modules/getloadavg (Makefile.am): Likewise.
9458         * modules/getlogin_r (Makefile.am): Likewise.
9459         * modules/getopt (Makefile.am): Likewise.
9460         * modules/getpass (Makefile.am): Likewise.
9461         * modules/getpass-gnu (Makefile.am): Likewise.
9462         * modules/getsubopt (Makefile.am): Likewise.
9463         * modules/gettime (Makefile.am): Likewise.
9464         * modules/gettimeofday (Makefile.am): Likewise.
9465         * modules/getugroups (Makefile.am): Likewise.
9466         * modules/getusershell (Makefile.am): Likewise.
9467         * modules/glob (Makefile.am): Likewise.
9468         * modules/group-member (Makefile.am): Likewise.
9469         * modules/hard-locale (Makefile.am): Likewise.
9470         * modules/hash (Makefile.am): Likewise.
9471         * modules/hmac-md5 (Makefile.am): Likewise.
9472         * modules/hmac-sha1 (Makefile.am): Likewise.
9473         * modules/human (Makefile.am): Likewise.
9474         * modules/idcache (Makefile.am): Likewise.
9475         * modules/imaxabs (Makefile.am): Likewise.
9476         * modules/imaxdiv (Makefile.am): Likewise.
9477         * modules/inet_ntop (Makefile.am): Likewise.
9478         * modules/inet_pton (Makefile.am): Likewise.
9479         * modules/inttostr (Makefile.am): Likewise.
9480         * modules/isapipe (Makefile.am): Likewise.
9481         * modules/lchown (Makefile.am): Likewise.
9482         * modules/long-options (Makefile.am): Likewise.
9483         * modules/lstat (Makefile.am): Likewise.
9484         * modules/malloc (Makefile.am): Likewise.
9485         * modules/mathl (Makefile.am): Likewise.
9486         * modules/mbchar (Makefile.am): Likewise.
9487         * modules/md2 (Makefile.am): Likewise.
9488         * modules/md4 (Makefile.am): Likewise.
9489         * modules/md5 (Makefile.am): Likewise.
9490         * modules/memcasecmp (Makefile.am): Likewise.
9491         * modules/memchr (Makefile.am): Likewise.
9492         * modules/memcmp (Makefile.am): Likewise.
9493         * modules/memcoll (Makefile.am): Likewise.
9494         * modules/memcpy (Makefile.am): Likewise.
9495         * modules/memmem (Makefile.am): Likewise.
9496         * modules/memmove (Makefile.am): Likewise.
9497         * modules/mempcpy (Makefile.am): Likewise.
9498         * modules/memrchr (Makefile.am): Likewise.
9499         * modules/memset (Makefile.am): Likewise.
9500         * modules/memxor (Makefile.am): Likewise.
9501         * modules/mkancesdirs (Makefile.am): Likewise.
9502         * modules/mkdir (Makefile.am): Likewise.
9503         * modules/mkdir-p (Makefile.am): Likewise.
9504         * modules/mkdtemp (Makefile.am): Likewise.
9505         * modules/mkstemp (Makefile.am): Likewise.
9506         * modules/mktime (Makefile.am): Likewise.
9507         * modules/modechange (Makefile.am): Likewise.
9508         * modules/mountlist (Makefile.am): Likewise.
9509         * modules/nanosleep (Makefile.am): Likewise.
9510         * modules/openat (Makefile.am): Likewise.
9511         * modules/pagealign_alloc (Makefile.am): Likewise.
9512         * modules/physmem (Makefile.am): Likewise.
9513         * modules/poll (Makefile.am): Likewise.
9514         * modules/posixtm (Makefile.am): Likewise.
9515         * modules/posixver (Makefile.am): Likewise.
9516         * modules/putenv (Makefile.am): Likewise.
9517         * modules/quote (Makefile.am): Likewise.
9518         * modules/quotearg (Makefile.am): Likewise.
9519         * modules/raise (Makefile.am): Likewise.
9520         * modules/read-file (Makefile.am): Likewise.
9521         * modules/readline (Makefile.am): Likewise.
9522         * modules/readlink (Makefile.am): Likewise.
9523         * modules/readtokens (Makefile.am): Likewise.
9524         * modules/readutmp (Makefile.am): Likewise.
9525         * modules/realloc (Makefile.am): Likewise.
9526         * modules/regex (Makefile.am): Likewise.
9527         * modules/rename (Makefile.am): Likewise.
9528         * modules/rename-dest-slash (Makefile.am): Likewise.
9529         * modules/rijndael (Makefile.am): Likewise.
9530         * modules/rmdir (Makefile.am): Likewise.
9531         * modules/rpmatch (Makefile.am): Likewise.
9532         * modules/safe-read (Makefile.am): Likewise.
9533         * modules/safe-write (Makefile.am): Likewise.
9534         * modules/same (Makefile.am): Likewise.
9535         * modules/save-cwd (Makefile.am): Likewise.
9536         * modules/savedir (Makefile.am): Likewise.
9537         * modules/setenv (Makefile.am): Likewise.
9538         * modules/settime (Makefile.am): Likewise.
9539         * modules/sha1 (Makefile.am): Likewise.
9540         * modules/sig2str (Makefile.am): Likewise.
9541         * modules/snprintf (Makefile.am): Likewise.
9542         * modules/stdlib-safer (Makefile.am): Likewise.
9543         * modules/stpcpy (Makefile.am): Likewise.
9544         * modules/stpncpy (Makefile.am): Likewise.
9545         * modules/strcase (Makefile.am): Likewise.
9546         * modules/strcasestr (Makefile.am): Likewise.
9547         * modules/strchrnul (Makefile.am): Likewise.
9548         * modules/strcspn (Makefile.am): Likewise.
9549         * modules/strdup (Makefile.am): Likewise.
9550         * modules/strerror (Makefile.am): Likewise.
9551         * modules/strftime (Makefile.am): Likewise.
9552         * modules/strndup (Makefile.am): Likewise.
9553         * modules/strnlen (Makefile.am): Likewise.
9554         * modules/strpbrk (Makefile.am): Likewise.
9555         * modules/strsep (Makefile.am): Likewise.
9556         * modules/strstr (Makefile.am): Likewise.
9557         * modules/strtod (Makefile.am): Likewise.
9558         * modules/strtoimax (Makefile.am): Likewise.
9559         * modules/strtok_r (Makefile.am): Likewise.
9560         * modules/strtol (Makefile.am): Likewise.
9561         * modules/strtoll (Makefile.am): Likewise.
9562         * modules/strtoul (Makefile.am): Likewise.
9563         * modules/strtoull (Makefile.am): Likewise.
9564         * modules/strtoumax (Makefile.am): Likewise.
9565         * modules/strverscmp (Makefile.am): Likewise.
9566         * modules/time_r (Makefile.am): Likewise.
9567         * modules/timegm (Makefile.am): Likewise.
9568         * modules/tmpfile-safer (Makefile.am): Likewise.
9569         * modules/unistd-safer (Makefile.am): Likewise.
9570         * modules/unlinkdir (Makefile.am): Likewise.
9571         * modules/userspec (Makefile.am): Likewise.
9572         * modules/utime (Makefile.am): Likewise.
9573         * modules/utimecmp (Makefile.am): Likewise.
9574         * modules/utimens (Makefile.am): Likewise.
9575         * modules/vasnprintf (Makefile.am): Likewise.
9576         * modules/vasprintf (Makefile.am): Likewise.
9577         * modules/vsnprintf (Makefile.am): Likewise.
9578         * modules/xalloc (Makefile.am): Likewise.
9579         * modules/xgetcwd (Makefile.am): Likewise.
9580         * modules/xnanosleep (Makefile.am): Likewise.
9581         * modules/xreadlink (Makefile.am): Likewise.
9582         * modules/xstrtod (Makefile.am): Likewise.
9583         * modules/xstrtol (Makefile.am): Likewise.
9584         * modules/xstrtold (Makefile.am): Likewise.
9585         * modules/yesno (Makefile.am): Likewise.
9586
9587 2006-10-12  Jim Meyering  <jim@meyering.net>
9588
9589         * m4/getloadavg.m4: Revert the change below.
9590
9591         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
9592         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
9593         fail with a symlink, which is what coreutils' ./bootstrap now
9594         creates by default.
9595
9596 2006-10-12  Bruno Haible  <bruno@clisp.org>
9597
9598         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
9599         mingw.
9600         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
9601         MSVC and mingw explicitly.
9602
9603 2006-10-11  Simon Josefsson  <jas@extundo.com>
9604             Bruno Haible  <bruno@clisp.org>
9605
9606         Add support for multiple gnulib-tool invocations in the scope of a
9607         single configure.ac file.
9608         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
9609         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
9610         with the same contents as the _LIBADD variable.
9611         (func_emit_initmacro_start, func_emit_initmacro_end,
9612         func_emit_initmacro_done): New functions.
9613         (func_import, func_create_testdir): Invoke them. Allow the identifiers
9614         gl_LIBOBJS and gl_LTLIBOBJS.
9615
9616 2006-10-11  Bruno Haible  <bruno@clisp.org>
9617
9618         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
9619         (func_create_testdir): Don't create po/Makefile.am, don't invoke
9620         autoreconf. Instead, invoke autopoint explicitly but move back the
9621         *.m4 files from gnulib.
9622
9623 2006-10-11  Bruno Haible  <bruno@clisp.org>
9624
9625         * gnulib-tool (func_usage): Make module names after --create-testdir
9626         optional.
9627         (func_create_testdir): If no module was specified, use nearly all
9628         modules.
9629
9630 2006-10-12  Jim Meyering  <jim@meyering.net>
9631
9632         Big performance improvement for fts-based tools that use FTS_NOSTAT.
9633         Avoid spurious inode-mismatch problems on non-POSIX file systems.
9634         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
9635         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
9636         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
9637         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
9638         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
9639         (fts_set_stat_required): New function.
9640         (fts_open): Defer the calls to fts_stat, if possible or requested.
9641         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
9642         into fts_stat itself.
9643         (fts_read): Perform any required (deferred) fts_stat call.
9644         (fts_build): Likewise, for the directory we're about to open and read.
9645         In the readdir loop, carefully decide whether each entry will require
9646         an eventual call to fts_stat, using dirent.d_type info if available.
9647         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
9648         a command line argument into this function.  Update all callers.
9649         Map a return value of FTS_DOT to FTS_D for a command line argument.
9650         * modules/fts (Depends-on): Add d-type.  Alphabetize.
9651         Thanks to Miklos Szeredi for his tenacity and for the initial
9652         bug report about "find" failing on a FUSE-based file system.
9653
9654         * lib/fts.c (fts_open): Use consistent indentation.
9655
9656 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
9657
9658         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
9659         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
9660         reported by Jim Meyering.  All uses of cache variables renamed
9661         to match Autoconf's.
9662         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
9663         the other one.
9664
9665         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
9666         Fix misspelling in diagnostic.
9667
9668 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
9669
9670         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
9671         defined.  Problem reported by Matthew Woehlke.
9672
9673         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
9674         Add support for Tandem NonStop R series.
9675         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
9676         Use new macro.
9677
9678         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
9679         (has_trailing_slash): Omit size arg; all callers changed.
9680         Omit 'inline', since it doesn't help performance and we'd
9681         need to configure it.
9682         Don't count //, ///, etc. as having a trailing slash.
9683         As a side effect, this removes a C99ism reported by Matthew Woehlke.
9684         (rpl_rename_dest_slash): On failure, use rename's errno rather
9685         than (in some cases) an incorrect or junk errno.
9686         Simplify code by removing need to compute length; this does
9687         cause it to make two passes instead of one over the file name,
9688         but it's worth it.
9689
9690         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
9691         change, since Autoconf's version may no longer be appropriate now
9692         that we are using CVS Autoconf's version.  Add support for Tandem.
9693
9694 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
9695             Bruno Haible  <bruno@clisp.org>
9696
9697         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
9698         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
9699         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
9700         gl_AC_TYPE_LONG_LONG.
9701
9702         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
9703         instead of HAVE_LONG_LONG.
9704         * lib/printf-args.c (printf_fetchargs): Likewise.
9705         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
9706         * lib/vasnprintf.c (VASNPRINTF): Likewise.
9707         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
9708         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
9709         gl_AC_TYPE_LONG_LONG.
9710
9711 2006-10-11  Bruno Haible  <bruno@clisp.org>
9712
9713         * m4/longlong.m4: Add comments.
9714         * m4/ulonglong.m4: Likewise.
9715
9716 2006-10-10  Bruno Haible  <bruno@clisp.org>
9717
9718         Make it possible to #define stpcpy, strdup to aliases.
9719         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
9720         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
9721
9722 2006-10-10  Bruno Haible  <bruno@clisp.org>
9723
9724         Make it possible to #define gcd to an alias.
9725         * lib/gcd.c: Include config.h.
9726
9727 2006-10-10  Bruno Haible  <bruno@clisp.org>
9728
9729         Make it possible to #define c_isascii to an alias.
9730         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
9731         defined. Undefine the macros before defining them, to avoid gcc
9732         warnings.
9733         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
9734         define NO_C_CTYPE_MACROS early.
9735
9736 2006-10-10  Bruno Haible  <bruno@clisp.org>
9737
9738         Make it possible to #define set_program_name to an alias.
9739         * lib/progname.c: Don't undefine set_program_name; instead, undefine
9740         ENABLE_RELOCATABLE early.
9741
9742 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
9743
9744         Port to Tandem NSK OSS, which has 64-bit signed int but at most
9745         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
9746         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
9747         More generally, don't assume that 64-bit signed int is available
9748         if unsigned int is, and vice versa.
9749         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
9750         unsigned symbols, not on their signed counterparts.
9751         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
9752         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
9753         (UINT64_C, UINTMAX_C):
9754         Likewise.
9755         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
9756         unsigned counterparts.
9757         (Have_long_long, Unsigned): New macros.
9758         (Int): Renamed from INT.
9759         (strtoimax): Use the new macros.
9760         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
9761         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
9762         * modules/inttypes (inttypes.h): Substitute
9763         HAVE_UNSIGNED_LONG_LONG_INT.
9764         * modules/stdint (stdint.h): Likewise.
9765         (Files): Add m4/ulonglong.m4.
9766
9767 2006-10-10  Bruno Haible  <bruno@clisp.org>
9768
9769         Fix a gcc -Wshadow warning.
9770         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
9771         to 'bucket'.
9772         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
9773         gl_linked_indexof_from_to): Likewise.
9774         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
9775         Likewise.
9776         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
9777         Likewise.
9778         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
9779         Reported by Eric Blake.
9780
9781 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
9782
9783         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
9784         for NetBSD.  Problem reported by Bruno Haible.
9785
9786 2006-10-09  Jim Meyering  <jim@meyering.net>
9787
9788         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
9789         Patch from Bruno Haible.
9790
9791 2006-10-09  Jim Meyering  <jim@meyering.net>
9792
9793         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
9794         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
9795         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
9796
9797 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
9798
9799         Don't include <config.h> twice; this doesn't work in some cases,
9800         e.g., when config.h has "#define intmax_t long long int" and
9801         we include <config.h>, <inttypes.h>, <config.h> in that order.
9802         Problem reported by Matthew Woehlke in:
9803         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
9804         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
9805         * lib/fts-cycle.c: Don't include config.h.
9806         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
9807         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
9808         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
9809         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
9810         inttypes.h.
9811         * lib/xstrtoumax.c: Likewise.
9812         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
9813         __strtol and the like, so that this module is more like its siblings.
9814         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
9815         Remove; no longer needed now that we assume gnulib inttypes.h.
9816
9817 2006-10-08  Bruno Haible  <bruno@clisp.org>
9818
9819         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
9820         option.
9821
9822 2006-10-07  Jim Meyering  <jim@meyering.net>
9823
9824         * modules/inttypes (inttypes.h): Revert what seems to have been
9825         an inadvertent part of today's change: use "|", not "/" in the
9826         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
9827
9828 2006-10-07  Bruno Haible  <bruno@clisp.org>
9829
9830         * modules/sublist: New file.
9831
9832 2006-10-07  Bruno Haible  <bruno@clisp.org>
9833
9834         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
9835         * modules/argz (argz.h): Likewise.
9836         * modules/arpa_inet (arpa/inet.h): Likewise.
9837         * modules/byteswap (byteswap.h): Likewise.
9838         * modules/configmake (configmake.h): Likewise.
9839         * modules/fcntl (fcntl.h): Likewise.
9840         * modules/fnmatch (fnmatch.h): Likewise.
9841         * modules/getopt (getopt.h): Likewise.
9842         * modules/glob (glob.h): Likewise.
9843         * modules/inttypes (inttypes.h): Likewise.
9844         * modules/netinet_in (netinet/in.h): Likewise.
9845         * modules/poll (poll.h): Likewise.
9846         * modules/stdbool (stdbool.h): Likewise.
9847         * modules/stdint (stdint.h): Likewise.
9848         * modules/sys_select (sys/select.h): Likewise.
9849         * modules/sys_socket (sys/socket.h): Likewise.
9850         * modules/sys_stat (sys/stat.h): Likewise.
9851         * modules/sysexits (sysexits.h): Likewise.
9852         * modules/unistd (unistd.h): Likewise.
9853         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9854         Add a "DO NOT EDIT" comment to the generated file.
9855         (func_import): Likewise for gnulib-comp.m4.
9856
9857 2006-10-07  Bruno Haible  <bruno@clisp.org>
9858
9859         * lib/gl_sublist.h: New file.
9860         * lib/gl_sublist.c: New file.
9861
9862 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
9863
9864         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
9865         name (relative to the original working directory) and the file
9866         name component (relative to the temporary working directory).  All
9867         callers changed.
9868         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
9869         * lib/mkdir-p.c (make_dir_parents): Likewise.
9870         * lib/mkdir-p.h (make_dir_parents): Likewise.
9871
9872 2006-10-06  Eric Blake  <ebb9@byu.net>
9873
9874         Define several macros for use by the clean-temp module.
9875         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
9876         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
9877         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
9878
9879         * lib/clean-temp.h (close_stream_temp): New declaration.
9880         * lib/clean-temp.c (includes): Pull in headers according to what
9881         other modules are in use.
9882         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
9883
9884 2006-10-06  Bruno Haible  <bruno@clisp.org>
9885
9886         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
9887         instead of fopen, fwriteerror.
9888
9889 2006-10-06  Bruno Haible  <bruno@clisp.org>
9890
9891         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
9892         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
9893         int.
9894         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
9895         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
9896         Return an error indicator.
9897         Suggested by Eric Blake.
9898
9899 2006-10-06  Bruno Haible  <bruno@clisp.org>
9900
9901         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
9902         Reported by Eric Blake.
9903
9904 2006-10-06  Bruno Haible  <bruno@clisp.org>
9905
9906         * modules/closeout (Description): Mention stderr too.
9907
9908 2006-10-06  Bruno Haible  <bruno@clisp.org>
9909         and Paul Eggert  <eggert@cs.ucla.edu>
9910
9911         * lib/closeout.c (close_stdout): Also close stderr.
9912         * lib/closeout.h: Update comment.
9913
9914 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
9915
9916         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
9917         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
9918         * lib/dirchownmod.c: Include lchown.h.
9919         * lib/lchown.c: Don't include files that lchown.h now includes.
9920         Don't declare chown, since lchown.h now does that.
9921         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
9922         (lchown): Define to rpl_chown if lchown is declared but
9923         does not exist.  Declare using a prototype if lchown is not
9924         declared.  Add a copyright notice.
9925         * lib/mkstemp.h: Include <unistd.h>.
9926         * lib/openat.c: Include lchown.h.
9927
9928         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
9929         we now test for that separately.
9930         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
9931         rather than O_NOFOLLOW, when testing whether it's possible to
9932         avoid a race condition reliably.
9933         * lib/savewd.c (savewd_chdir): Likewise.
9934
9935         Remove macros that are no longer needed now that stdint.h is
9936         reliable.
9937         * lib/fsusage.c (UINTMAX_MAX): Remove.
9938         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
9939         * lib/utimecmp.c (SIZE_MAX): Remove.
9940
9941         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
9942
9943         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
9944         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
9945         O_NOATIME works.
9946
9947 2006-10-05  Bruno Haible  <bruno@clisp.org>
9948
9949         * lib/gl_list.h (gl_sortedlist_search_from_to,
9950         gl_sortedlist_indexof_from_to): New declarations.
9951         (gl_list_implementation): New fields sortedlist_search_from_to,
9952         sortedlist_indexof_from_to.
9953         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
9954         inline functions.
9955         * lib/gl_list.c (gl_sortedlist_search_from_to,
9956         gl_sortedlist_indexof_from_to): New functions.
9957         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
9958         function.
9959         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
9960         (gl_array_sortedlist_search_from_to): New function.
9961         (gl_array_list_implementation): Update.
9962         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
9963         function.
9964         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
9965         (gl_carray_sortedlist_search_from_to): New function.
9966         (gl_carray_list_implementation): Update.
9967         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
9968         gl_linked_sortedlist_indexof_from_to): New functions.
9969         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
9970         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
9971         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
9972         gl_tree_sortedlist_indexof_from_to): New functions.
9973         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
9974         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
9975         Update.
9976         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
9977         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
9978         Update.
9979
9980 2006-10-05  Bruno Haible  <bruno@clisp.org>
9981
9982         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
9983         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
9984         (struct gl_list_implementation): Add fields search_from_to,
9985         indexof_from_to. Remove fields search, indexof.
9986         (gl_list_search): Use the search_from_to method.
9987         (gl_list_search_from, gl_list_search_from_to): New functions.
9988         (gl_list_indexof): Use the indexof_from_to method.
9989         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
9990         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
9991         (gl_list_search_from, gl_list_search_from_to): New functions.
9992         (gl_list_indexof): Use the indexof_from_to method.
9993         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
9994         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
9995         gl_array_indexof. Add start_index, end_index arguments.
9996         (gl_array_search_from_to): Renamed from gl_array_search. Add
9997         start_index, end_index arguments.
9998         (gl_array_remove, gl_array_list_implementation): Update.
9999         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
10000         gl_carray_indexof. Add start_index, end_index arguments.
10001         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
10002         start_index, end_index arguments.
10003         (gl_carray_remove, gl_carray_list_implementation): Update.
10004         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
10005         gl_linked_search. Add start_index, end_index arguments.
10006         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
10007         start_index, end_index arguments.
10008         (gl_linked_remove): Update.
10009         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
10010         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
10011         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
10012         field to 'size_t'.
10013         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
10014         gl_tree_search. Add start_index, end_index arguments.
10015         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
10016         start_index, end_index arguments.
10017         (gl_tree_remove): Update.
10018         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
10019         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
10020         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
10021         function.
10022         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
10023         gl_tree_search. Add start_index, end_index arguments.
10024         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
10025         start_index, end_index arguments.
10026         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
10027         Update.
10028         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
10029
10030 2006-10-05  Bruno Haible  <bruno@clisp.org>
10031
10032         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
10033
10034         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
10035         fwriteerror_temp): New declarations.
10036         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
10037         (descriptors): New variable.
10038         (cleanup): First, close the descriptors.
10039         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
10040         fclose_temp, fwriteerror_temp): New functions.
10041
10042 2006-10-04  Jim Meyering  <jim@meyering.net>
10043
10044         * lib/fts.c (fts_open): Tiny comment change.
10045
10046 2006-10-04  Bruno Haible  <bruno@clisp.org>
10047
10048         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
10049         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
10050         gl_LOCK_BODY.
10051         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
10052         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
10053         gl_LOCK_EARLY_BODY.
10054         (gl_LOCK): Require gl_LOCK_BODY.
10055
10056 2006-10-04  Bruno Haible  <bruno@clisp.org>
10057
10058         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
10059         (gl_oset_search_atleast): New declaration.
10060         (struct gl_oset_implementation): Add field 'search_atleast'.
10061         (gl_oset_search_atleast): New inline function.
10062         * lib/gl_oset.c (gl_oset_search_atleast): New function.
10063         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
10064         (gl_array_oset_implementation): Update.
10065         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
10066         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
10067         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
10068
10069 2006-10-04  Bruno Haible  <bruno@clisp.org>
10070
10071         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
10072
10073 2006-10-03  Bruno Haible  <bruno@clisp.org>
10074
10075         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
10076         from gl_avltreehash_list_implementation.
10077
10078 2006-10-03  Bruno Haible  <bruno@clisp.org>
10079
10080         * lib/gl_oset.c (gl_oset_add): Fix return type.
10081
10082 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
10083
10084         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
10085
10086 2006-10-02  Eric Blake  <ebb9@byu.net>
10087
10088         * modules/strnlen (Depends-on): Add extensions.
10089
10090 2006-10-02  Eric Blake  <ebb9@byu.net>
10091
10092         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
10093         definition in 2.60+.
10094
10095 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
10096
10097         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
10098         checks.
10099
10100 2006-10-02  Bruno Haible  <bruno@clisp.org>
10101
10102         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
10103         to the AUTOMAKE_OPTIONS.
10104         Reported by Jim Meyering.
10105
10106 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
10107
10108         Work around bug in Solaris 10 /proc file system:
10109         /proc/self/fd/NNN/.. isn't the parent directory of
10110         the directory whose file descriptor is NNN.  This needs to
10111         be worked around at run time, not compile time, since a
10112         program might be built on Solaris 8, where things work, and
10113         run on Solaris 10.
10114         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
10115         to use the following interface instead:
10116         (OPENAT_BUFFER_SIZE): New macro.
10117         (openat_proc_name): New function.
10118         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
10119         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
10120         Likewise.
10121         * lib/openat-proc.c: New file.
10122         * modules/openat (Files): Add lib/openat-proc.c.
10123         (Depends-on): Add same-inode, stdbool.
10124         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
10125
10126 2006-09-29  Bruno Haible  <bruno@clisp.org>
10127
10128         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
10129         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
10130         argument. Set stdout_closed before testing for ferror, not after.
10131         (fwriteerror, fwriteerror_no_ebadf): New functions.
10132
10133 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10134
10135         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
10136
10137 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
10138
10139         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
10140         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
10141
10142 2006-09-28  Jim Meyering  <jim@meyering.net>
10143
10144         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
10145         Include <unistd.h>.
10146
10147 2006-09-28  Bruno Haible  <bruno@clisp.org>
10148
10149         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
10150         * modules/linkedhash-list (Depends-on): Likewise.
10151         * modules/rbtreehash-list (Depends-on): Likewise.
10152
10153 2006-09-28  Bruno Haible  <bruno@clisp.org>
10154
10155         * lib/strndup.h: Simplify the redefinition of strndup.
10156         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
10157         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
10158
10159 2006-09-28  Bruno Haible  <bruno@clisp.org>
10160
10161         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
10162         * lib/gl_linkedhash_list.c: Likewise.
10163         * lib/gl_rbtreehash_list.c: Likewise.
10164
10165 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
10166
10167         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
10168         getaddrinfo.
10169
10170         * lib/__fpending.h: Don't include <stdio_ext.h> unless
10171         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
10172         it causes <stdio_ext.h> to cause a compile-time error.
10173         Problem reported by Nelson H. F. Beebe.
10174         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
10175         of HAVE_DECL___PENDING.
10176
10177         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
10178         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
10179         declaration.
10180
10181 2006-09-27  Jim Meyering  <jim@meyering.net>
10182
10183         This file could end up with a definition for a function
10184         named __strndup, rather than rpl_strndup on a system with
10185         incomplete weak_alias support.
10186         * lib/strndup.c (strndup): Rename from __strndup.
10187         Remove #defines that used to map __strndup to strndup.
10188         Don't use K&R prototypes.
10189         Remove LIBC-related code, since this file is not sync'd with glibc.
10190         * lib/strndup.h: Revamp, accordingly.
10191         * m4/strndup.m4: Modernize.
10192
10193 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
10194
10195         * modules/savewd (Depends-on): Add 'raise'.
10196         * lib/savewd.c: Include <signal.h>, for 'raise'.
10197
10198 2006-09-26  Jim Meyering  <jim@meyering.net>
10199
10200         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
10201         when we detect Darwin 8.7.0's acl_get_file bug.
10202         Rearrange to perform the new (below) run-test while $LIBS
10203         contains any acl-related library.  Set USE_ACL at the end.
10204         (gl_ACL_GET_FILE): New function.
10205
10206 2006-09-26  Eric Blake  <ebb9@byu.net>
10207
10208         * lib/verror.c: Include <config.h> unconditionally.
10209
10210 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
10211
10212         * modules/clock-time (Maintainer): Add self.
10213         * modules/getlogin_r (Depends-on): Add extensions.
10214
10215 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10216
10217         * modules/clock-time: New module.
10218         * modules/nanosleep (Depends-on): Add clock-time.
10219         * modules/gethrxtime (Depends-on): Likewise.
10220         * modules/gettime (Depends-on): Likewise.
10221         * modules/settime (Depends-on): Likewise.
10222
10223         * modules/fts-lgpl: Depend on openat.
10224         * modules/mkancesdirs: Depend on savewd.
10225         * modules/mkdir-p: Likewise.
10226
10227 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10228
10229         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
10230
10231         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
10232         `gl_have_arbitrary_file_name_length_limit' to
10233         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
10234         actually works between configure runs.
10235
10236 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10237             Bruno Haible  <bruno@clisp.org>
10238
10239         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
10240
10241 2006-09-25  Jim Meyering  <jim@meyering.net>
10242
10243         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
10244         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
10245
10246 2006-09-25  Eric Blake  <ebb9@byu.net>
10247
10248         * gnulib-tool (func_import, func_create_testdir): Fix typos in
10249         exec's in 2006-09-18 patch when shuffling fds.
10250
10251 2006-09-25  Bruno Haible  <bruno@clisp.org>
10252
10253         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
10254         Reported by Jim Meyering.
10255
10256 2006-09-24  Jim Meyering  <jim@meyering.net>
10257
10258         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
10259         compare a pointer against a literal "0".  That caused failures with
10260         at least HP-UX's hpcc.
10261
10262 2006-09-22  Simon Josefsson  <jas@extundo.com>
10263
10264         * modules/gc-sha1:
10265         * modules/gc-md4:
10266         * modules/gc-hmac-sha1:
10267         * modules/gc-hmac-md5:
10268         * modules/gc-des:
10269         * modules/gc-arcfour: Distribute more files.
10270
10271 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10272
10273         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
10274         (gl_linked_iterator_from_to): Initialize struct completely.
10275         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
10276         (gl_tree_iterator_from_to): Likewise
10277         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
10278         * lib/gl_array_list.c [lint] (gl_array_iterator)
10279         (gl_array_iterator_from_to): Likewise.
10280         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
10281         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
10282         (gl_carray_iterator_from_to): Likewise.
10283
10284         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
10285         * lib/md4.c (md4_process_block): Remove unused variable.
10286         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
10287         parentheses for clarity.
10288
10289 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10290
10291         * modules/bison-i18n (Depends-on): Add gettext.
10292
10293 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10294
10295         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
10296         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
10297         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
10298         also add missing comma that caused broken test.
10299         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
10300         stdlib.h, for `abort'.
10301         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
10302         variables.
10303         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
10304         include unistd.h if present, for `rmdir'.
10305         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
10306         variables.
10307         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
10308         in the process include standard headers for prototypes.
10309         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
10310         gets declared on GNU/Linux.
10311         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
10312         unistd.h, for `rmdir'.
10313         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
10314
10315         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
10316         always true.
10317         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
10318
10319         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
10320
10321 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10322
10323         * gnulib-tool (func_version): Create output all at once.  This
10324         may help avoid triggering unnecessary SIGPIPEs, and at any
10325         rate it doesn't hurt.
10326
10327 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10328             Bruno Haible  <bruno@clisp.org>
10329
10330         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
10331         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
10332         * m4/signed.m4 (bh_C_SIGNED): Likewise.
10333
10334         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
10335         (gl_FUNC_VASPRINTF): Invoke it.
10336
10337 2006-09-22  Bruno Haible  <bruno@clisp.org>
10338
10339         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
10340         getloadavg.c as first argument.
10341
10342 2006-09-22  Bruno Haible  <bruno@clisp.org>
10343
10344         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
10345         at the beginning of the gl_INIT macro.
10346         * modules/getloadavg (configure.ac): Pass $gl_source_base to
10347         gl_GETLOADAVG.
10348
10349 2006-09-22  Bruno Haible  <bruno@clisp.org>
10350
10351         * gnulib-tool (func_create_megatestdir): Don't include the config-h
10352         module.
10353         Suggested by Ralf Wildenhues.
10354
10355 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
10356
10357         Import this patch from libc:
10358
10359         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
10360
10361         * lib/regex_internal.c (re_string_reconstruct): Handle
10362         offset < pstr->valid_raw_len && pstr->offsets_needed case.
10363         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
10364         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
10365         re_string_context_at.
10366
10367         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
10368         now requires it.
10369         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
10370         gl_REGEX now does it for us.
10371         (gl_REGEX): Add test taken from
10372         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
10373
10374         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
10375         Check that large offsets work.  Modernize Autoconf usages.
10376         Prefer "yes" to mean a good thing rather than a bad.
10377         Don't put "#define mkstemp" in config.h, as this might interfere
10378         with standard system headers that "#define mkstemp mkstemp64".
10379
10380         * modules/mkstemp (Depends-on): Add extensions, so that
10381         mkstemp is visible on some platforms.
10382         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
10383         (Include): Change to "mkstemp.h" from <stdlib.h>.
10384         (Files): Add mkstemp.h.
10385
10386         * lib/mkstemp.h: New file, since some standard headers
10387         #define mkstemp.
10388         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
10389         Include "mkstemp.h".
10390         Make the _LIBC code resemble glibc original more,
10391         e.g., use K&R style.
10392         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
10393         (mkstemp): Remove, since mkstemp.h does this for us.
10394         * lib/stdlib--.h: Include mkstemp.h.
10395
10396         Import this patch from libc:
10397
10398         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
10399
10400         * lib/tempname.c (__gen_tempname): Change attempts_min
10401         into a macro.  Use preprocessor to decide how to initialize
10402         attempts [Coverity CID 67].
10403
10404 2006-09-20  Bruno Haible  <bruno@clisp.org>
10405
10406         * lib/mkdtemp.c: Import from libc.
10407         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
10408                 * sysdeps/posix/tempname.c (__gen_tempname): Change
10409                 attempts_min into a macro.  Use preprocessor to decide how to
10410                 initialize attempts [Coverity CID 67].
10411         2001-11-27  Paul Eggert  <eggert@twinsun.com>
10412                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
10413                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
10414
10415 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10416
10417         * gnulib-tool (func_exit): New function, to allow to pass the
10418         exit status portably through the trap.  Use everywhere.
10419         (--help, --version): Signal a write error.
10420         (trap): catch SIGPIPE, for write errors.
10421         Exit at the end of the trap, with the correct exit status.
10422
10423 2006-09-19  Karl Berry  <karl@gnu.org>
10424
10425         * doc/gnulib.texi: note about the license texinfo files.
10426
10427 2006-09-19  Eric Blake  <ebb9@byu.net>
10428
10429         * gnulib-tool: Avoid space-tab.
10430
10431 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
10432
10433         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
10434         that prevented coreutils 6.1 from building.  Problem reported
10435         by Petter Reinholdtsen.
10436
10437 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
10438
10439         * gnulib-tool (avoidlist): Fix typo that broke options like
10440         --avoid=lock that are used by coreutils bootstrap.
10441
10442 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
10443
10444         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
10445         more systematically.
10446
10447 2006-09-18  Jim Meyering  <jim@meyering.net>
10448
10449         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
10450
10451 2006-09-18  Bruno Haible  <bruno@clisp.org>
10452
10453         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
10454
10455 2006-09-18  Bruno Haible  <bruno@clisp.org>
10456
10457         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
10458         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
10459         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
10460         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
10461         * m4/gettext.m4: Require autoconf >= 2.52.
10462         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
10463         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
10464         of gl_cv_header_inttypes_h.
10465
10466 2006-09-18  Bruno Haible  <bruno@clisp.org>
10467
10468         * lib/javaversion.c: Include configmake.h.
10469
10470 2006-09-18  Bruno Haible  <bruno@clisp.org>
10471
10472         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
10473         avoid that the while loops be executed in a subshell.
10474
10475 2006-09-18  Bruno Haible  <bruno@clisp.org>
10476
10477         * MODULES.html.sh (func_module): Break long lines.
10478         Suggested by Bruce Korb <bkorb@gnu.org>.
10479
10480 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10481
10482         Speed up by a factor of 1.12.
10483         * gnulib-tool (nl): New variable.
10484         (func_import): Rewrite include directive extraction to only read each
10485         directive once.
10486
10487 2006-09-17  Bruno Haible  <bruno@clisp.org>
10488
10489         * modules/javaversion (Makefile.am): Remove DEFS setting.
10490         (Depends-on): Add configmake, for PKGDATADIR definition.
10491
10492 2006-09-17  Bruno Haible  <bruno@clisp.org>
10493
10494         * gnulib-tool (func_create_testdir): Rewrite all files at once.
10495
10496 2006-09-17  Bruno Haible  <bruno@clisp.org>
10497
10498         * gnulib-tool (func_append): New function, stolen from libtool.m4.
10499         (func_modules_transitive_closure, func_modules_add_dummy,
10500         func_modules_to_filelist, func_import, func_create_testdir,
10501         func_create_megatestdir, ...): Use it wherever possible.
10502         Suggested by Ralf Wildenhues.
10503
10504 2006-09-16  Karl Berry  <karl@gnu.org>
10505
10506         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
10507         to avoid sectioning errors.
10508         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
10509         [ifinfo]: blank line after @center-ed titles.
10510         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
10511         Spell FSF address consistently with others.
10512         (These changes approved by rms.)
10513
10514 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10515
10516         Speed up by a factor of 1.61.
10517         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
10518         already checked module names again.
10519
10520 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10521
10522         Speed up by a factor of 1.13.
10523         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
10524         for new_files, and the input to func_add_or_update.
10525
10526 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10527
10528         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
10529         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
10530
10531 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
10532
10533         * modules/mkancesdirs (Depends-on): Add fcntl.
10534         * modules/savewd: New file.
10535         * MODULES.html.sh (File system functions): Add savewd.
10536
10537         * modules/configmake (Makefile.am): Add support for the
10538         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
10539
10540 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
10541
10542         * m4/savewd.m4: New file.
10543
10544 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
10545
10546         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
10547         (dirchownmod): New arg FD.  All callers changed.
10548         Use FD rather than opening the directory ourself, as opening is
10549         now the caller's responsibility.
10550         * lib/dirchownmod.h: Likewise.
10551         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
10552         hosts that require <sys/types.h> before <sys/stat.h>.  Include
10553         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
10554         (test_dir): Remove.
10555         (mkancesdirs): Return length of prefix of FILE that has already
10556         been made, or -2 if there is a child doing the work.  Redo
10557         algorithm so that it is O(N) rather than O(N**2).  Optimize away
10558         ".", and treat ".." specially since it might stray back into
10559         already-created areas.  Use a subprocess if necessary.  New arg
10560         WD; all users changed.  MAKE_DIR function should now return 1
10561         if it creates a directory that is not readable.  Return -2 if
10562         a child process is spun off.
10563         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
10564         Adjust signature to match code.
10565         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
10566         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
10567         all users changed.
10568         * lib/savewd.c, lib/savewd.h: New files.
10569
10570 2006-09-15  Jim Meyering  <jim@meyering.net>
10571
10572         * modules/rename-dest-slash: New module.
10573         * MODULES.html.sh (posix_compat): Add it here.
10574
10575         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
10576
10577 2006-09-15  Jim Meyering  <jim@meyering.net>
10578
10579         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
10580         file.
10581
10582         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
10583
10584 2006-09-15  Jim Meyering  <jim@meyering.net>
10585
10586         * lib/rename-dest-slash.c (has_trailing_slash): Use
10587         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
10588         (rpl_rename_dest_slash): Perform the cheaper trailing slash
10589         test before testing whether SRC is a directory.
10590         Suggestions from Bruno Haible.
10591
10592         Avoid a warning about an unused variable.
10593         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
10594         into the #ifdef block where it's used.
10595
10596         * lib/rename-dest-slash.c: New file.
10597
10598 2006-09-14  Bruno Haible  <bruno@clisp.org>
10599
10600         * lib/allocsa.c: Include <config.h> unconditionally.
10601         * lib/asnprintf.c: Likewise.
10602         * lib/asprintf.c: Likewise.
10603         * lib/c-strcasecmp.c: Likewise.
10604         * lib/c-strcasestr.c: Likewise.
10605         * lib/c-strncasecmp.c: Likewise.
10606         * lib/c-strstr.c: Likewise.
10607         * lib/classpath.c: Likewise.
10608         * lib/clean-temp.c: Likewise.
10609         * lib/concatpath.c: Likewise.
10610         * lib/copy-file.c: Likewise.
10611         * lib/csharpcomp.c: Likewise.
10612         * lib/csharpexec.c: Likewise.
10613         * lib/execute.c: Likewise.
10614         * lib/fatal-signal.c: Likewise.
10615         * lib/findprog.c: Likewise.
10616         * lib/fwriteerror.c: Likewise.
10617         * lib/gl_array_list.c: Likewise.
10618         * lib/gl_array_oset.c: Likewise.
10619         * lib/gl_avltree_list.c: Likewise.
10620         * lib/gl_avltree_oset.c: Likewise.
10621         * lib/gl_avltreehash_list.c: Likewise.
10622         * lib/gl_carray_list.c: Likewise.
10623         * lib/gl_linked_list.c: Likewise.
10624         * lib/gl_linkedhash_list.c: Likewise.
10625         * lib/gl_list.c: Likewise.
10626         * lib/gl_oset.c: Likewise.
10627         * lib/gl_rbtree_list.c: Likewise.
10628         * lib/gl_rbtree_oset.c: Likewise.
10629         * lib/gl_rbtreehash_list.c: Likewise.
10630         * lib/imaxabs.c: Likewise.
10631         * lib/imaxdiv.c: Likewise.
10632         * lib/javacomp.c: Likewise.
10633         * lib/javaexec.c: Likewise.
10634         * lib/javaversion.c: Likewise.
10635         * lib/linebreak.c: Likewise.
10636         * lib/localcharset.c: Likewise.
10637         * lib/lock.c: Likewise.
10638         * lib/mbchar.c: Likewise.
10639         * lib/mbswidth.c: Likewise.
10640         * lib/mkdtemp.c: Likewise.
10641         * lib/pipe.c: Likewise.
10642         * lib/printf-args.c: Likewise.
10643         * lib/printf-parse.c: Likewise.
10644         * lib/progname.c: Likewise.
10645         * lib/progreloc.c: Likewise.
10646         * lib/readlink.c: Likewise.
10647         * lib/sh-quote.c: Likewise.
10648         * lib/stpcpy.c: Likewise.
10649         * lib/stpncpy.c: Likewise.
10650         * lib/strcasecmp.c: Likewise.
10651         * lib/strcasestr.c: Likewise.
10652         * lib/strcspn.c: Likewise.
10653         * lib/striconv.c: Likewise.
10654         * lib/strncasecmp.c: Likewise.
10655         * lib/strnlen1.c: Likewise.
10656         * lib/strstr.c: Likewise.
10657         * lib/strtok_r.c: Likewise.
10658         * lib/tls.c: Likewise.
10659         * lib/tmpdir.c: Likewise.
10660         * lib/unicodeio.c: Likewise.
10661         * lib/unsetenv.c: Likewise.
10662         * lib/vasnprintf.c: Likewise.
10663         * lib/vasprintf.c: Likewise.
10664         * lib/wait-process.c: Likewise.
10665         * lib/xallocsa.c: Likewise.
10666         * lib/xsetenv.c: Likewise.
10667         * lib/xstriconv.c: Likewise.
10668
10669 2006-09-13  Simon Josefsson  <jas@extundo.com>
10670
10671         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
10672         that internally, suggested by Ralf Wildenhues
10673         <Ralf.Wildenhues@gmx.de>.
10674
10675 2006-09-13  Simon Josefsson  <jas@extundo.com>
10676
10677         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
10678         @LIBOBJS@.
10679         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10680
10681 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
10682
10683         * lib/_fpending.c: Include <config.h> unconditionally, since we no
10684         longer worry about uses that don't define HAVE_CONFIG_H.
10685         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
10686         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
10687         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
10688         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
10689         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
10690         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
10691         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
10692         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
10693         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
10694         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
10695         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
10696         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
10697         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
10698         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
10699         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
10700         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
10701         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
10702         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
10703         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
10704         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
10705         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
10706         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
10707         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
10708         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
10709         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
10710         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
10711         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
10712         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
10713         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
10714         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
10715         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
10716         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
10717         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
10718         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
10719         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
10720         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
10721         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
10722         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
10723         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
10724         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
10725         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
10726         Likewise.
10727
10728 2006-09-13  Eric Blake  <ebb9@byu.net>
10729
10730         * lib/getopt.c: Fix typo in last commit.
10731
10732 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
10733
10734         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
10735         dgettext.
10736
10737 2006-09-12  Jim Meyering  <jim@meyering.net>
10738
10739         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
10740         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
10741         Reported by Nelson H. F. Beebe.
10742
10743 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
10744
10745         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
10746         program_invocation_name and program_invocation_short_name are
10747         initialized.
10748         * lib/argp-namefrob.h: Move declarations of program_invocation_name
10749         and program_invocation_short_name to argp.h, so they are visible
10750         to user programs.
10751         * lib/argp.h: Likewise
10752
10753 2006-09-10  Bruno Haible  <bruno@clisp.org>
10754
10755         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
10756         m4/inttypes_h.m4, m4/uintmax_t.m4.
10757
10758 2006-09-10  Bruno Haible  <bruno@clisp.org>
10759
10760         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
10761         gl_AC_TYPE_UINTMAX_T.
10762
10763 2006-09-10  Bruno Haible  <bruno@clisp.org>
10764
10765         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
10766
10767 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10768
10769         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
10770         convention.  Text proposed by Bruno Haible.
10771         (struct argp_option): Document the use of N_() wrappers.
10772
10773         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
10774         '\v', and translate the two parts separately, instead of feeding
10775         the whole string to gettext.  This allows to exclude
10776         '\v' from the strings visible to the translator by writing doc
10777         strings as N_("..") "\v" N_("..").
10778
10779 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
10780
10781         * config/srclist.txt: Undo latest change; the bug was fixed.
10782
10783 2006-09-09  Bruno Haible  <bruno@clisp.org>
10784
10785         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
10786         assignments if building a library without libtool.
10787         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
10788         in func_emit_lib_Makefile_am.
10789         (func_import): When building a static library libfoo.a, arrange to
10790         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
10791         (func_create_testdir): Likewise.
10792         * modules/gc (configure.ac, Makefile.am): If building statically,
10793         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
10794         * modules/iconvme (configure.ac, Makefile.am): Likewise.
10795         * modules/striconv (configure.ac, Makefile.am): Likewise.
10796         Based on a suggestion by Ralf Wildenhues.
10797
10798 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10799
10800         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
10801         Check for unistd.h too, since Autoconf doesn't assume POSIX.
10802         Also:
10803
10804         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10805         Add year_2050_test to catch glibc bug 2821
10806         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
10807
10808         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
10809         Prefer #ifdef to #if.
10810
10811         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
10812         Return from 'main' instead of calling 'exit'.
10813
10814 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10815
10816         * lib/mktime.c (guess_time_tm): Fix bug where mktime
10817         returned the maximum time_t value rather than (time_t) -1.
10818         Problem originally reported by William Bardwell
10819         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
10820
10821         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
10822         Moved to here ...
10823         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
10824         ... from here.
10825
10826 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10827
10828         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
10829         2821 is fixed.
10830
10831 2006-09-08  Jim Meyering  <jim@meyering.net>
10832
10833         Don't make generated files read-only.  That would bother too many
10834         people.  However, do retain the ability to work when targets are
10835         read-only: remove the destination and temporary files before writing
10836         them (when generated via sed or echo), or by using the -f option for
10837         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
10838         * modules/alloca-opt, modules/argz, modules/arpa_inet:
10839         * modules/byteswap, modules/configmake, modules/fcntl:
10840         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
10841         * modules/localcharset, modules/netinet_in, modules/poll:
10842         * modules/stdbool, modules/stdint, modules/sys_select:
10843         * modules/sys_socket, modules/sys_stat, modules/sysexits:
10844
10845 2006-09-08  Jim Meyering  <jim@meyering.net>
10846
10847         Avoid new build failure on FreeBSD 6.0.
10848         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
10849         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
10850         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
10851
10852 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10853
10854         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
10855
10856 2006-09-07  Jim Meyering  <jim@meyering.net>
10857
10858         Fix global typo in last change: use chmod u-w, not chmod u-x.
10859         Spotted by Paul Eggert and Bruce Korb.
10860         * modules/alloca-opt, modules/argz, modules/arpa_inet:
10861         * modules/byteswap, modules/configmake, modules/fcntl:
10862         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
10863         * modules/localcharset, modules/netinet_in, modules/poll:
10864         * modules/stdbool, modules/stdint, modules/sys_select:
10865         * modules/sys_socket, modules/sys_stat, modules/sysexits:
10866
10867 2006-09-06  Jim Meyering  <jim@meyering.net>
10868
10869         Make generated files be read-only.
10870         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
10871         Ensure that each generated file is now read-only.
10872         * modules/argz: Likewise.
10873         * modules/arpa_inet: Likewise.
10874         * modules/byteswap: Likewise.
10875         * modules/configmake: Likewise.
10876         * modules/fcntl: Likewise.
10877         * modules/fnmatch: Likewise.
10878         * modules/getopt: Likewise.
10879         * modules/glob: Likewise.
10880         * modules/inttypes: Likewise.
10881         * modules/netinet_in: Likewise.
10882         * modules/poll: Likewise.
10883         * modules/stdbool: Likewise.
10884         * modules/stdint: Likewise.
10885         * modules/sys_select: Likewise.
10886         * modules/sys_socket: Likewise.
10887         * modules/sys_stat: Likewise.
10888         * modules/sysexits: Likewise.
10889         * modules/localcharset: Same as above, but continue using temporary
10890         file named "t-$@" (why different?) rather than the "$@-t" used
10891         everywhere else.
10892
10893         * modules/sysexits (Makefile.am): Replace literal occurrences
10894         of "sysexit.h" more readable, and more consistent, "$@".
10895
10896 2006-09-06  Bruno Haible  <bruno@clisp.org>
10897
10898         * modules/striconv: New file.
10899         * modules/xstriconv: New file.
10900         * MODULES.html.sh (Internationalization functions): Add striconv,
10901         xstriconv.
10902
10903 2006-09-06  Bruno Haible  <bruno@clisp.org>
10904
10905         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
10906         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
10907         not using libtool correctly.
10908
10909 2006-09-06  Bruno Haible  <bruno@clisp.org>
10910
10911         * lib/striconv.h: New file.
10912         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
10913         iconvstring.c.
10914         * lib/xstriconv.h: New file.
10915         * lib/xstriconv.c: New file.
10916
10917 2006-09-06  Bruno Haible  <bruno@clisp.org>
10918
10919         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
10920         lib_..._LDFLAGS.
10921
10922 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10923
10924         * lib/argz_.h: Sync from Libtool.
10925
10926         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
10927                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10928
10929         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
10930
10931 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
10932
10933         * modules/trim: New file.
10934
10935 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
10936
10937         * lib/trim.h: New file.
10938         * lib/trim.c: New file.
10939
10940 2006-09-05  Bruno Haible  <bruno@clisp.org>
10941
10942         * MODULES.html.sh (String handling): Add trim.
10943
10944 2006-09-04  Karl Berry  <karl@gnu.org>
10945
10946         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
10947         until next release.
10948
10949 2006-09-03  Bruno Haible  <bruno@clisp.org>
10950
10951         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
10952         correctly.
10953
10954 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
10955
10956         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
10957         not gl_GETLOADAVG.  Omit unneeded semicolons.
10958         Problems reported by Ralf Wildenhues in
10959         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
10960         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
10961         at the end, which is the usual gnulib style.
10962
10963         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
10964         of doing all the work ourselves.
10965         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
10966         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
10967
10968 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
10969
10970         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
10971         Problem reported by Ralf Wildenhues in
10972         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
10973
10974         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
10975         HAVE_STRUCT_STATFS_F_FSTYPENAME.
10976
10977 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
10978
10979         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
10980         yesterday's patch by changing test -n to test -z.
10981
10982 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10983
10984         * modules/getloadavg (Files): Add m4/getloadavg.m4.
10985         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
10986         the former is now obsolescent.
10987
10988         * modules/chdir-long (Depends-on): Add fcntl.
10989
10990 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10991
10992         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
10993         obsolescent, and programs should use gnulib instead.
10994         * m4/getloadavg.m4: New file, with contents taken from Autoconf
10995         but with prefixes changed.
10996
10997 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10998
10999         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
11000         or stdbool.h, because they might not exist while configuring.
11001
11002         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
11003         Don't include unistd.h or limits.h; not needed, since chdir-long.h
11004         does that for us.
11005         (O_DIRECTORY): Remove.
11006
11007 2006-08-31  Eric Blake  <ebb9@byu.net>
11008
11009         * gnulib-tool: Don't let emacs change spaces to TAB.
11010
11011 2006-08-31  Bruno Haible  <bruno@clisp.org>
11012
11013         * gnulib-tool: When calling func_import more than once, do it in a
11014         subshell.
11015         Reported by Eric Blake <ebb9@byu.net>.
11016
11017 2006-08-31  Bruno Haible  <bruno@clisp.org>
11018
11019         * gnulib-tool (nl): Remove variable.
11020         (sed_transform_lib_file): Use more robust test for config-h module.
11021         (func_import): Fix typo in 2006-08-25 patch.
11022
11023 2006-08-31  Bruno Haible  <bruno@clisp.org>
11024
11025         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
11026         specified, augment Makefile.am variables instead of assigning them.
11027
11028 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
11029
11030         Work around a bug in both the Linux and SunOS 64-bit kernels:
11031         nanosleep mishandles sleeps for longer than 2**31 seconds.
11032         Problem reported by Frank v Waveren in
11033         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
11034         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
11035         Check for nanosleep bug.
11036         (LIB_NANOSLEEP): Append clock_gettime library if needed.
11037
11038 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
11039
11040         Work around a bug in both the Linux and SunOS 64-bit kernels:
11041         nanosleep mishandles sleeps for longer than 2**31 seconds.
11042         Problem reported by Frank v Waveren in
11043         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
11044         * lib/nanosleep.c (BILLION): New constant.
11045         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
11046         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
11047         implementation.
11048
11049 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
11050
11051         * modules/nanosleep (Depends-on): Add gettime.
11052
11053 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
11054         and Simon Josefsson  <jas@extundo.com>
11055         and Oskar Liljeblad  <oskar@osk.mine.nu>
11056
11057         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
11058         * gnulib-tool (func_import): New license type 'unmodifiable license
11059         text'.
11060         * modules/fdl: Use it.  Longer description.
11061         * module/gpl, module/lgpl: New files.
11062
11063 2006-08-30  Jim Meyering  <jim@meyering.net>
11064
11065         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
11066         shadowing the parameter.
11067
11068 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11069
11070         Sync from Libtool:
11071
11072         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11073
11074         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
11075         sharing with gnulib.  Report by Eric Blake.
11076
11077 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11078
11079         * modules/isapipe: New file.
11080         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
11081
11082 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11083
11084         * modules/configmake (Makefile.am): Add a comment, and omit
11085         the CONFIGMAKE_ prefix from generated macro names.  Suggested
11086         by Bruno Haible.
11087
11088 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11089
11090         * m4/isapipe.m4: New file.
11091
11092 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11093
11094         * lib/isapipe.c, lib/isapipe.h: New files.
11095
11096 2006-08-29  Jim Meyering  <jim@meyering.net>
11097
11098         * modules/configmake (Makefile.am): Make configmake.h depend on
11099         Makefile.  Otherwise, a stale configmake.h could hang around.
11100
11101 2006-08-29  Eric Blake  <ebb9@byu.net>
11102
11103         * lib/error.c (error_at_line, print_errno_message): Match libc, after
11104         resolution of upstream bug 3044.
11105
11106 2006-08-29  Bruno Haible  <bruno@clisp.org>
11107
11108         * modules/localcharset (Depends-on): Add configmake.
11109         (Makefile.am): Remove setting of LIBDIR through DEFS.
11110
11111 2006-08-29  Bruno Haible  <bruno@clisp.org>
11112
11113         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
11114         defined.
11115
11116 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
11117
11118         * modules/fcntl: New file.
11119         * modules/chdir-safer (Depends-on): Add fcntl.
11120         * modules/fts: Likewise.
11121         * modules/mkdir-p: Likewise.
11122
11123         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
11124         This undoes the most recent change, since we're now addressing the
11125         problem in a different way.
11126
11127         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
11128         into output, since the output might be called Makefile.am even
11129         if $makefile_name is something different.
11130         (func_import): Use $makefile_am rather than
11131         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
11132         empty.
11133
11134         * modules/inttypes (Files): Add m4/inttypes-h.m4.
11135
11136 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
11137
11138         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
11139         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
11140         recent change to stdint.m4, since we're now addressing the problem in a
11141         different way.
11142
11143 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
11144
11145         * m4/fcntl_h.m4: New file.
11146
11147 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
11148
11149         * lib/fcntl_.h: New file.
11150         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
11151         the fcntl module.
11152         * lib/dirchownmod.c: Likewise.
11153         * lib/fts.c: Likewise.
11154
11155         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
11156         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
11157         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
11158         just before including <inttypes.h>, to avoid circular inclusion.
11159
11160 2006-08-28  Jim Meyering  <jim@meyering.net>
11161
11162         * doc/visibility.texi: Actually read and correct the grammar of the
11163         sentence affected by yesterday's change.
11164
11165 2006-08-28  Eric Blake  <ebb9@byu.net>
11166
11167         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
11168         needs wrapper.
11169
11170 2006-08-28  Eric Blake  <ebb9@byu.net>
11171
11172         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
11173
11174 2006-08-28  Eric Blake  <ebb9@byu.net>
11175
11176         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
11177
11178 2006-08-28  Bruno Haible  <bruno@clisp.org>
11179
11180         * modules/c-strstr: New file, from GNU gettext.
11181         * MODULES.html.sh (String handling): Add c-strstr.
11182
11183 2006-08-28  Bruno Haible  <bruno@clisp.org>
11184
11185         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
11186         macros.
11187         Reported by Eric Blake.
11188
11189 2006-08-28  Bruno Haible  <bruno@clisp.org>
11190
11191         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
11192         (VASNPRINTF): Return a string of length > INT_MAX without failing.
11193         * lib/vasprintf.c: Include errno.h, limits.h.
11194         (EOVERFLOW): New fallback definition.
11195         (vasprintf): Test here whether the string length is > INT_MAX.
11196         * lib/vsnprintf.c: Include errno.h, limits.h.
11197         (EOVERFLOW): New fallback definition.
11198         (vsnprintf): Fix bug when generated string was too long for the buffer.
11199         Test here whether the string length is > INT_MAX.
11200
11201 2006-08-28  Bruno Haible  <bruno@clisp.org>
11202
11203         * lib/inttypes_.h (SCNX*): Remove definitions.
11204         Reported by Eric Blake.
11205
11206 2006-08-28  Bruno Haible  <bruno@clisp.org>
11207
11208         * lib/c-strstr.h: New file, from GNU gettext.
11209         * lib/c-strstr.c: New file, from GNU gettext.
11210
11211 2006-08-28  Bruno Haible  <bruno@clisp.org>
11212
11213         * gnulib-tool: Reorder some statements.
11214
11215 2006-08-28  Bruno Haible  <bruno@clisp.org>
11216
11217         * gnulib-tool: New option --makefile-name.
11218         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
11219         $makefile_name.
11220         (func_import): Write $makefile_name to the cache file, and read it from
11221         there unless explicitly specified. Use $makefile_name as file name
11222         instead of Makefile.am. Adjust the recommendations accordingly.
11223
11224 2006-08-28  Bruno Haible  <bruno@clisp.org>
11225
11226         * gnulib-tool (func_verify_module): Check against misapplying patch.
11227
11228 2006-08-28  Bruno Haible  <bruno@clisp.org>
11229
11230         * gnulib-tool (func_relativize, func_relconcat): New functions.
11231         Give an error if --local-dir is given with --update.
11232         Remove trailing slashes from $local_gnulib_dir.
11233         (func_import): Store the relativized $local_gnulib_dir in
11234         gnulib-cache.m4, and read it from there if not specified explicitly.
11235
11236 2006-08-28  Bruno Haible  <bruno@clisp.org>
11237
11238         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
11239         is the current directory. Respect also $local_gnulib_dir.
11240
11241 2006-08-28  Bruno Haible  <bruno@clisp.org>
11242             Simon Josefsson  <jas@extundo.com>
11243
11244         BeOS portability.
11245         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
11246
11247 2006-08-27  Jim Meyering  <jim@meyering.net>
11248
11249         * doc/visibility.texi: Remove duplicate word: "pointer".
11250
11251 2006-08-26  Bruno Haible  <bruno@clisp.org>
11252
11253         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
11254         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
11255         (Makefile.am): Create inttypes.h from inttypes_.h.
11256         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
11257
11258         * modules/imaxabs: New file.
11259
11260         * modules/imaxdiv: New file.
11261
11262 2006-08-26  Bruno Haible  <bruno@clisp.org>
11263
11264         * m4/inttypes.m4: New file.
11265         * m4/_inttypes_h.m4: Remove file.
11266         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
11267         PRI_MACROS_BROKEN.
11268         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
11269
11270         * m4/imaxabs.m4: New file.
11271
11272         * m4/imaxdiv.m4: New file.
11273
11274 2006-08-26  Bruno Haible  <bruno@clisp.org>
11275
11276         * lib/inttypes_.h: New file.
11277         * lib/inttypes.h: Remove file.
11278         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
11279
11280         * lib/imaxabs.c: New file.
11281
11282         * lib/imaxdiv.c: New file.
11283
11284 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11285
11286         New config-h module, so that "make" output needn't be cluttered
11287         by -DHAVE_CONFIG_H.
11288         * MODULES.html.sh (Support for building libraries and executables):
11289         Add config-h.
11290         * modules/config-h: New file.
11291         * gnulib-tool (nl, sed_transform_lib_file): New vars.
11292         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
11293         the config-h module is used.
11294
11295         New configmake module, so that "make" output needn't be cluttered
11296         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
11297         * MODULES.html.sh (Support for building libraries and executables):
11298         Add configmake.
11299         * modules/configmake: New file.
11300
11301 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11302
11303         * m4/config-h.m4: New file.
11304
11305 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11306
11307         * config/srclist.txt: Add elisp-comp.
11308
11309 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11310
11311         * MODULES.html.sh (Support for building libraries and executables):
11312         Add elisp-comp.
11313         * build-aux/elisp-comp: New file.
11314         * modules/elisp-comp: New file.
11315
11316 2006-08-24  Bruno Haible  <bruno@clisp.org>
11317
11318         * gnulib-tool (func_create_testdir): Use non-default values of
11319         sourcebase and m4base.
11320
11321 2006-08-24  Bruno Haible  <bruno@clisp.org>
11322
11323         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
11324         HTML structure.
11325
11326 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11327
11328         * modules/openat (Depends-on): Add lchown.
11329
11330 2006-08-23  Bruno Haible  <bruno@clisp.org>
11331
11332         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
11333         of gl_LOCK_EARLY instead of gl_LOCK.
11334
11335 2006-08-23  Bruno Haible  <bruno@clisp.org>
11336
11337         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
11338         on OSF/1 to no.
11339         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
11340
11341 2006-08-23  Bruno Haible  <bruno@clisp.org>
11342
11343         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
11344         as unusable.
11345
11346         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
11347         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
11348         (gl_LOCK): New macro.
11349
11350 2006-08-22  Simon Josefsson  <jas@extundo.com>
11351
11352         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
11353         to md5 module.
11354
11355 2006-08-22  Simon Josefsson  <jas@extundo.com>
11356
11357         * MODULES.html.sh: Add "Support for maintaining and release
11358         projects".
11359
11360         * build-aux/gnupload: New file, from coreutils.
11361
11362 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
11363
11364         Avoid the need for AC_LIBSOURCES in m4 macros.
11365         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
11366         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
11367         * modules/check-version (EXTRA_DIST): Add check-version.h.
11368         * modules/crc (EXTRA_DIST): Add crc.h.
11369         * modules/des (EXTRA_DIST): Add des.h.
11370         * modules/gc (EXTRA_DIST): Add gc.h.
11371         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
11372         * modules/getline (EXTRA_DIST): Add getline.h.
11373         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
11374         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
11375         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
11376         * modules/md2 (EXTRA_DIST): Add md2.h.
11377         * modules/md4 (EXTRA_DIST): Add md4.h.
11378         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
11379         * modules/read-file (EXTRA_DIST): Add read-file.h.
11380         * modules/readline (EXTRA_DIST): Add readline.h.
11381         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
11382         rijndael-api-fst.h.
11383
11384 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
11385
11386         * m4/rijndael.m4 (gl_ARCFOUR):
11387         * m4/arctwo.m4 (gl_ARCTWO):
11388         * m4/check-version.m4 (gl_CHECK_VERSION):
11389         * m4/crc.m4 (gl_CRC):
11390         * m4/des.m4 (gl_DES):
11391         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
11392         * m4/gc.m4 (gl_GC):
11393         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
11394         * m4/getline.m4 (gl_FUNC_GETLINE):
11395         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
11396         * m4/hmac-md5.m4 (gl_HMAC_MD5):
11397         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
11398         * m4/md2.m4 (gl_MD2):
11399         * m4/md4.m4 (gl_MD4):
11400         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
11401         * m4/read-file.m4 (gl_FUNC_READ_FILE):
11402         * m4/readline.m4 (gl_FUNC_READLINE):
11403         * m4/rijndael.m4 (gl_RIJNDAEL):
11404         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
11405         to get the necessary .h files and whatnot.
11406
11407 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
11408
11409         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
11410         gnulib rather than the other way around.
11411         * config/srclistvars.sh (COREUTILS): Remove.
11412
11413 2006-08-22  Jim Meyering  <jim@meyering.net>
11414
11415         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
11416
11417         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
11418
11419 2006-08-22  Eric Blake  <ebb9@byu.net>
11420
11421         * modules/regexprops-generic: New file.
11422         * MODULES.html.sh (Support for building documentation): List it.
11423
11424 2006-08-22  Eric Blake  <ebb9@byu.net>
11425
11426         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
11427         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
11428         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
11429         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
11430
11431 2006-08-22  Bruno Haible  <bruno@clisp.org>
11432
11433         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
11434         and lib_LTLIBRARIES like the other lib_* variables.
11435
11436 2006-08-22  Bruno Haible  <bruno@clisp.org>
11437
11438         * build-aux/x-to-1.in: New file, from GNU gettext.
11439
11440 2006-08-22  Bruno Haible  <bruno@clisp.org>
11441
11442         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
11443         <utmpx.h> exists.
11444
11445 2006-08-22  Bruno Haible  <bruno@clisp.org>
11446
11447         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
11448         <utmpx.h> exists.
11449
11450 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
11451
11452         BeOS portability.
11453         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
11454         exist.
11455         Problem reported by Bruno Haible.
11456
11457 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
11458
11459         Avoid the need for AC_LIBSOURCES in m4 macros.
11460         * modules/acl (EXTRA_DIST): Add acl.h.
11461         * modules/argmatch (Files): Add m4/argmatch.m4.
11462         (configure.ac): Add gl_ARGMATCH.
11463         (EXTRA_DIST): Renamed from lib_SOURCES, for
11464         consistency with the other modules.  Remove argmatch.c.
11465         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
11466         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
11467         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
11468         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
11469         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
11470         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
11471         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
11472         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
11473         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
11474         * modules/closeout (EXTRA_DIST): Add closeout.h.
11475         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
11476         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
11477         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
11478         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
11479         dirname.h; remove basename.c and stripslash.c.
11480         * modules/exclude (EXTRA_DIST): Add exclude.h.
11481         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
11482         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
11483         * modules/file-type (EXTRA_DIST): Add file-type.h.
11484         * modules/filemode (EXTRA_DIST): Add filemode.h.
11485         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
11486         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
11487         * modules/fpending (EXTRA_DIST): Add __fpending.h.
11488         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
11489         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
11490         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
11491         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
11492         * modules/getdate (EXTRA_DIST): Add getdate.c.
11493         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
11494         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
11495         * modules/getpass (EXTRA_DIST): Add getpass.h.
11496         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
11497         * modules/group-member (EXTRA_DIST): Add group-member.h.
11498         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
11499         * modules/hash (EXTRA_DIST): Add hash.h.
11500         * modules/human (EXTRA_DIST): Add human.h.
11501         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
11502         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
11503         * modules/lchown (EXTRA_DIST): Add lchown.h.
11504         * modules/long-options (EXTRA_DIST): Add long-options.h.
11505         * modules/lstat (EXTRA_DIST): Add lstat.h.
11506         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
11507         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
11508         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
11509         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
11510         * modules/memxor (EXTRA_DIST): Add memxor.h.
11511         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
11512         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
11513         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
11514         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
11515         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
11516         * modules/physmem (EXTRA_DIST): Add physmem.h.
11517         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
11518         * modules/posixver (EXTRA_DIST): Add posixver.h.
11519         * modules/quote (EXTRA_DIST): Add quote.h.
11520         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
11521         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
11522         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
11523         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
11524         regex_internal.h regexec.c.
11525         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
11526         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
11527         * modules/same (EXTRA_DIST): Add same.h.
11528         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
11529         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
11530         * modules/savedir (EXTRA_DIST): Add savedir.h.
11531         * modules/sha1 (EXTRA_DIST): Add sha1.h.
11532         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
11533         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
11534         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
11535         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
11536         * modules/strdup (EXTRA_DIST): Add strdup.h.
11537         * modules/strftime (EXTRA_DIST): Add strftime.h.
11538         * modules/strndup (EXTRA_DIST): Add strndup.h.
11539         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
11540         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
11541         * modules/time_r (EXTRA_DIST): Add time_r.h.
11542         * modules/timespec (EXTRA_DIST): Add timespec.h.
11543         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
11544         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
11545         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
11546         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
11547         * modules/userspec (EXTRA_DIST): Add userspec.h.
11548         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
11549         * modules/utimens (EXTRA_DIST): Add utimens.h.
11550         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
11551         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
11552         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
11553         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
11554         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
11555         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
11556         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
11557         * modules/yesno (EXTRA_DIST): Add yesno.h.
11558
11559 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
11560
11561         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
11562
11563         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
11564         * m4/dev-ino.m4, same-inode.m4: Remove.
11565
11566         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
11567         * m4/acl.m4 (AC_FUNC_ACL):
11568         * m4/backupfile.m4 (gl_BACKUPFILE):
11569         * m4/c-strtod.m4 (gl_C99_STRTOLD):
11570         * m4/canon-host.m4 (gl_CANON_HOST):
11571         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
11572         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
11573         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
11574         * m4/cloexec.m4 (gl_CLOEXEC):
11575         * m4/close-stream.m4 (gl_CLOSE_STREAM):
11576         * m4/closeout.m4 (gl_CLOSEOUT):
11577         * m4/dirfd.m4 (gl_FUNC_DIRFD):
11578         * m4/dirname.m4 (gl_DIRNAME):
11579         * m4/exclude.m4 (gl_EXCLUDE):
11580         * m4/exitfail.m4 (gl_EXITFAIL):
11581         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
11582         * m4/file-type.m4 (gl_FILE_TYPE):
11583         * m4/filemode.m4 (gl_FILEMODE):
11584         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
11585         * m4/fpending.m4 (gl_FUNC_FPENDING):
11586         * m4/fprintftime.m4 (gl_FPRINTFTIME):
11587         * m4/fts.m4 (gl_FUNC_FTS):
11588         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
11589         * m4/getdate.m4 (gl_GETDATE):
11590         * m4/gethrxtime.m4 (gl_GETHRXTIME):
11591         * m4/getpagesize.m4 (gl_GETPAGESIZE):
11592         * m4/getpass.m4 (gl_FUNC_GETPASS):
11593         * m4/gettime.m4 (gl_GETTIME):
11594         * m4/getugroups.m4 (gl_GETUGROUPS):
11595         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
11596         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
11597         * m4/hard-locale.m4 (gl_HARD_LOCALE):
11598         * m4/hash.m4 (gl_HASH):
11599         * m4/idcache.m4 (gl_IDCACHE):
11600         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
11601         * m4/lchown.m4 (gl_FUNC_LCHOWN):
11602         * m4/long-options.m4 (gl_LONG_OPTIONS):
11603         * m4/lstat.m4 (gl_FUNC_LSTAT):
11604         * m4/md5.m4 (gl_MD5):
11605         * m4/memcasecmp.m4 (gl_MEMCASECMP):
11606         * m4/memcoll.m4 (gl_MEMCOLL):
11607         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
11608         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
11609         * m4/memxor.m4 (gl_MEMXOR):
11610         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
11611         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
11612         * m4/modechange.m4 (gl_MODECHANGE):
11613         * m4/mountlist.m4 (gl_MOUNTLIST):
11614         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
11615         * m4/openat.m4 (gl_FUNC_OPENAT):
11616         * m4/pathmax.m4 (gl_PATHMAX):
11617         * m4/physmem.m4 (gl_PHYSMEM):
11618         * m4/posixtm.m4 (gl_POSIXTM):
11619         * m4/posixver.m4 (gl_POSIXVER):
11620         * m4/quote.m4 (gl_QUOTE):
11621         * m4/quotearg.m4 (gl_QUOTEARG):
11622         * m4/readtokens.m4 (gl_READTOKENS):
11623         * m4/readutmp.m4 (gl_READUTMP):
11624         * m4/regex.m4 (gl_REGEX):
11625         * m4/safe-read.m4 (gl_SAFE_READ):
11626         * m4/safe-write.m4 (gl_SAFE_WRITE):
11627         * m4/same.m4 (gl_SAME):
11628         * m4/save-cwd.m4 (gl_SAVE_CWD):
11629         * m4/savedir.m4 (gl_SAVEDIR):
11630         * m4/settime.m4 (gl_SETTIME):
11631         * m4/sha1.m4 (gl_SHA1):
11632         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
11633         * m4/stat-macros.m4 (gl_STAT_MACROS):
11634         * m4/stat-time.m4 (gl_STAT_TIME):
11635         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
11636         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
11637         * m4/strdup.m4 (gl_FUNC_STRDUP):
11638         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
11639         * m4/strndup.m4 (gl_FUNC_STRNDUP):
11640         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
11641         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
11642         * m4/time_r.m4 (gl_TIME_R):
11643         * m4/timespec.m4 (gl_TIMESPEC):
11644         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
11645         * m4/unlinkdir.m4 (gl_UNLINKDIR):
11646         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
11647         * m4/userspec.m4 (gl_USERSPEC):
11648         * m4/utimecmp.m4 (gl_UTIMECMP):
11649         * m4/utimens.m4 (gl_UTIMENS):
11650         * m4/xalloc.m4 (gl_XALLOC):
11651         * m4/xgetcwd.m4 (gl_XGETCWD):
11652         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
11653         * m4/xreadlink.m4 (gl_XREADLINK):
11654         * m4/xstrtod.m4 (gl_XSTRTOD):
11655         * m4/yesno.m4 (gl_YESNO):
11656         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
11657         to get the necessary .h files and whatnot.
11658
11659 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
11660             Bruno Haible  <bruno@clisp.org>
11661
11662         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
11663         /bin/sh understanding of '!' conditional negation.
11664
11665 2006-08-21  Jim Meyering  <jim@meyering.net>
11666
11667         * modules/openat (Depends-on): Really alphabetize.
11668
11669         * modules/acl (Depends-on): Add error and quote.
11670
11671         * check-module (find_included_lib_files): Add at-func.c to the
11672         ok-to-include-more-than-once white list.
11673
11674         * modules/openat (Depends-on): Add lstat.  Alphabetize.
11675
11676 2006-08-21  Bruno Haible  <bruno@clisp.org>
11677
11678         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
11679         Emit a pkgdata_DATA variable only if some snippets add contents to it.
11680         Reported by Martin Lambers <marlam@marlam.de>.
11681
11682 2006-08-21  Bruno Haible  <bruno@clisp.org>
11683
11684         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
11685         specify an installation location, don't emit a noinst_LIBRARIES or
11686         noinst_LTLIBRARIES assignment.
11687
11688 2006-08-21  Bruno Haible  <bruno@clisp.org>
11689
11690         BeOS portability.
11691         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
11692         BeOS has mbrtowc() but no <wctype.h>.
11693
11694 2006-08-21  Bruno Haible  <bruno@clisp.org>
11695
11696         BeOS portability.
11697         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
11698         exist.
11699
11700 2006-08-21  Bruno Haible  <bruno@clisp.org>
11701
11702         BeOS portability.
11703         * lib/mbchar.h: Include <wctype.h> only if it exists.
11704
11705 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11706
11707         Remove files that are no longer needed by their respective modules.
11708         * m4/obstack.m4: Remove.
11709         * m4/strerror_r.m4: Remove.
11710         * m4/uint32_t.m4: Remove.
11711         * m4/uintptr_t.m4: Remove.
11712         * m4/ullong_max.m4: Remove.
11713         * m4/xstrtoimax.m4: Remove.
11714         * m4/xstrtoumax.m4: Remove.
11715
11716         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
11717         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
11718         dependencies now capture this.
11719
11720         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
11721         Do not use AC_LIBSOURCES, since gnulib modules now do this.
11722         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
11723         * m4/human.m4 (gl_HUMAN): Likewise.
11724         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
11725         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
11726
11727         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
11728
11729         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
11730         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
11731         stdint.
11732         * m4/human.m4 (gl_HUMAN): Likewise.
11733         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
11734         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
11735         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
11736         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
11737         * m4/xstrtol (gl_XSTRTOL): Likewise.
11738
11739         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
11740         AC_TYPE_LONG_LONG_INT.
11741         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
11742         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
11743         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
11744         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
11745
11746         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
11747         on stdbool.
11748
11749         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
11750         (gl_PREREQ_XSTRTOUL): Remove.
11751
11752         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
11753
11754         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
11755         mode.
11756
11757 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11758
11759         Add and change modules to make it easier for coreutils to use
11760         gnulib-tool.
11761         * modules/backupfile (Files): Remove m4/d-ino.m4.
11762         (Depends-on): Add d-ino.
11763         * modules/cycle-check (Depends-on): Add stdint.
11764         (lib_SOURCES): Add cycle-check.h.
11765         * modules/d-ino: New module.
11766         * modules/d-type: New module.
11767         * modules/error (Files): Remove m4/strerror_r.m4.
11768         * modules/filemode (Files): Add m4/st_dm_mode.m4.
11769         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
11770         m4/inttypes_h.m4, m4/uintmax_t.m4.
11771         (Depends-on): Add stdint.
11772         (lib_SOURCES): Add fsusage.h.
11773         * modules/getcwd (Files): Remove d-ino.m4.
11774         (Depends-on): Add d-ino.
11775         * modules/getndelim2 (Depends-on): Add stdint.
11776         * modules/glob (Files): Remove m4/d-type.m4.
11777         (Depends-on): Add d-type.
11778         * modules/host-os: New module.
11779         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
11780         m4/inttypes_h.m4, m4/uintmax_t.m4.
11781         * Depends-on: Add stdint.
11782         (lib_SOURCES): Add human.h.
11783         * modules/inttostr (Files): Remove m4/intmax_t.m4,
11784         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
11785         m4/uintmax_t.m4, m4/ulonglong.m4.
11786         (Depends-on): Add stdint.
11787         (EXTRA_DIST): Add inttostr.h.
11788         * modules/lchmod: New module.
11789         * modules/link-follow: New module.
11790         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
11791         (Depends-on): Add lchmod.
11792         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
11793         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
11794         (Depends-on): Add stdint.
11795         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
11796         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
11797         (Depends-on): Add stdint.
11798         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
11799         * modules/perl: New module.
11800         * modules/regex (Depends-on): Add stdint.
11801         * modules/rmdir-errno: New module.
11802         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
11803         m4/intmax_t.m4.
11804         (Depends-on): Add stdint.
11805         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
11806         m4/uintmax_t.m4.
11807         (Depends-on): Add stdint.
11808         * modules/unlink-busy: New module.
11809         * modules/utimecmp (Depends-on): Add stdint.
11810         * modules/uptime: New module.
11811         * modules/winsz-ioctl: New module.
11812         * modules/winsz-termios: New module.
11813         * modules/xnanosleep (Depends-on): Add nanosleep.
11814         * modules/ullong_max: Remove.
11815         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
11816         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
11817         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
11818         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
11819         (Depends-on): Add inttypes.
11820         (lib_SOURCES): Add xstrtol.h.
11821         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
11822         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
11823         * MODULES.html.sh: Move 'assert' into the assert section.
11824         Move 'dummy' into the linking section.
11825         Remove ullong_max.
11826         Add section for compatibility checks for POSIX:2001 functions,
11827         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
11828         winsz-ioctl, and winsz-termios into it.
11829         Add lchmod.
11830         Add top-level Misc section and put host-os, perl, and uptime
11831         into it.
11832
11833 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11834
11835         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
11836         now assume the stdint module.  Do not include inttypes.h.
11837         * lib/fsusage.h: Likewise.
11838         * lib/getndelim2.c: Likewise.
11839         * lib/human.h: Likewise.
11840         * lib/inttostr.h: Likewise.
11841         * lib/obstack.c: Likewise.
11842         * lib/regex_internal.h: Likewise.
11843         * lib/tempname.c: Likewise.
11844         * lib/utimecmp.c: Likewise.
11845         * lib/xstrtol.h: Likewise.
11846
11847         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
11848
11849         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
11850         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
11851         * lib/xtime.h: Likewise.
11852
11853 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
11854
11855         * modules/openat (Files): Add lib/fchmodat.c.
11856         Fixes problem reported by Jay Youngman.
11857
11858 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
11859
11860         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
11861         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
11862
11863 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
11864             Bruno Haible  <bruno@clisp.org>
11865
11866         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
11867         and is a script that invokes bison. Tighten the code. Add comments.
11868
11869 2006-08-18  Jim Meyering  <jim@meyering.net>
11870
11871         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
11872         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
11873         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
11874         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
11875
11876 2006-08-18  Bruno Haible  <bruno@clisp.org>
11877
11878         * modules/bison-i18n: New file.
11879         * MODULES.html.sh (Internationalization functions): Add it.
11880
11881 2006-08-18  Bruno Haible  <bruno@clisp.org>
11882
11883         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
11884         sys/statvfs.h. When getmntinfo was found, check its declaration and
11885         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
11886
11887 2006-08-18  Bruno Haible  <bruno@clisp.org>
11888
11889         * m4/bison-i18n.m4: New file, from bison.
11890
11891 2006-08-18  Bruno Haible  <bruno@clisp.org>
11892
11893         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
11894         (ME_DUMMY): Treat "kernfs" as a dummy.
11895         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
11896
11897 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
11898
11899         Update from coreutils.
11900
11901         2006-08-15  Jim Meyering  <jim@meyering.net>
11902
11903         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
11904
11905         2006-01-17  Jim Meyering  <jim@meyering.net>
11906
11907         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
11908
11909         2006-01-11  Jim Meyering  <jim@meyering.net>
11910
11911         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
11912         Check for the lchmod function.
11913
11914 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
11915
11916         Update from coreutils.
11917
11918         * lib/__fpending.h: Add copyright notice.
11919         * lib/fprintftime.h: Likewise.
11920         * lib/savedir.c: Use (C) in copyright notice.
11921         * lib/savedir.h: Likewise.
11922
11923         2006-08-15  Jim Meyering  <jim@meyering.net>
11924
11925         * lib/at-func.c: New file, with the logic of all emulated at-functions.
11926         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
11927         in support of the EXPECTED_ERRNO macro.
11928         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
11929         definitions.  Instead, define the appropriate symbols and include
11930         "at-func.c".
11931         * lib/mkdirat.c (mkdirat): Likewise.
11932         * lib/fchmodat.c (fchmodat): Likewise.
11933         (ENOSYS): Remove definition.
11934         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
11935         it.  Don't include "unistd--.h" -- it wasn't ever used.
11936
11937         2006-01-17  Jim Meyering  <jim@meyering.net>
11938
11939         Rewrite fts.c not to change the current working directory,
11940         by using openat, fstatat, fdopendir, etc..
11941
11942         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
11943         (HAVE_OPENAT_SUPPORT): Define.
11944         [_LIBC] (fchdir): Don't undef or define; no longer used.
11945         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
11946         Now, this `function' always succeeds, and consumes its file descriptor
11947         parameter -- so callers must not close such FDs.  Update callers.
11948         (diropen_fd, opendirat, cwd_advance_fd): New functions.
11949         (diropen): Add parameter, SP.  Adjust all callers.
11950         Implement using diropen_fd, rather than open.
11951         (fts_open): Initialize new member, fts_cwd_fd.
11952         Remove fts_rft-setting code.
11953         (fts_close): Close fts_cwd_fd, if necessary.
11954         (__opendir2): Define in terms of opendir or opendirat,
11955         depending on whether the FST_NOCHDIR flag is set.
11956         (fts_build): Since fts_safe_changedir consumes its FD, and since
11957         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
11958         and close the dup'd file descriptor upon failure.
11959         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
11960         (fts_safe_changedir): Tweak semantics to reflect that this function
11961         now calls cwd_advance_fd and hence consumes its FD argument.
11962         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
11963         [struct FTS] (fts_rft): Remove now-unused member.
11964         [struct FTS] (fts_cycle.state): Improve comment.
11965
11966         * lib/openat.c (openat_needs_fchdir): New function.
11967         * lib/openat.h (openat_needs_fchdir): Declare it.
11968
11969 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
11970
11971         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
11972         Problem and fix reported by Pádraig Brady in
11973         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
11974
11975 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
11976
11977         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
11978
11979 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
11980
11981         * lib/memcoll.c (memcoll): Optimize for the common case where the
11982         arguments are bytewise equal.
11983
11984 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
11985
11986         * doc/regexprops-generic.texi: Add a copyright notice.
11987
11988 2006-08-15  Bruno Haible  <bruno@clisp.org>
11989
11990         * modules/tmpdir (License): Change to LGPL.
11991
11992 2006-08-15  Bruno Haible  <bruno@clisp.org>
11993
11994         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
11995         module.
11996
11997 2006-08-14  Simon Josefsson  <jas@extundo.com>
11998
11999         * config/srclist.txt: Add gnupload.
12000
12001 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
12002
12003         Change copyright notice from LGPL 2 to GPL 2, since that's the
12004         standard form used in the gnulib repository.
12005         * tests/test-lock.c: Likewise.
12006         * tests/test-stdint.c: Likewise.
12007         * tests/test-tls.c: Likewise.
12008
12009         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
12010         prelude-manager.  User shorter URLs for GNU projects, without '?'.
12011         Add copyright notice.
12012
12013         * check-module: Add copyright notice.  Output a copyright
12014         notice if "--version" is specified.
12015         * modules/COPYING: New file.
12016         * tests/test-getaddrinfo.c: Add copyright notice.
12017         * tests/test-verify.c: Likewise.
12018
12019 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
12020
12021         Change copyright notice from LGPL 2 to GPL 2, since that's the
12022         standard form used in the gnulib repository.
12023         * lib/lock.c: LGPL -> GPL.
12024         * lib/lock.h: Likewise.
12025         * lib/strnlen1.c: Likewise.
12026         * lib/strnlen1.h: Likewise.
12027         * lib/tls.c: Likewise.
12028         * lib/tls.h: Likewise.
12029         * lib/tmpdir.c: Likewise.
12030
12031         * lib/TODO: Remove; this belongs only in coreutils.
12032
12033 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
12034
12035         Add copyright notices to long-enough files that lack them, since
12036         otherwise the files aren't clearly free.  Use the same notice that
12037         getdate.texi already uses.
12038         * doc/alloca-opt.texi: Add copyright notice.
12039         * doc/alloca.texi: Likewise.
12040         * doc/ctime.texi: Likewise.
12041         * doc/functions.texi: Likewise.
12042         * doc/gcd.texi: Likewise.
12043         * doc/gnulib-tool.texi: Likewise.
12044         * doc/inet_ntoa.texi: Likewise.
12045         * doc/visibility.texi: Likewise.
12046
12047         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
12048         * doc/quote.texi: Add copyright notice.
12049
12050         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
12051         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
12052         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
12053         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
12054         is now obsolete, and give a pointer to the Sun list.
12055         Add copyright notice.
12056
12057 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
12058
12059         * config/srclistvars.sh: Add copyright notice.
12060
12061 2006-08-14  Eric Blake  <ebb9@byu.net>
12062
12063         Import the following change from libc:
12064
12065         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
12066
12067         Upstream bug 2997.
12068         * lib/misc/error.c: Add space between program name and message if file
12069         name is missing.
12070
12071 2006-08-12  Karl Berry  <karl@gnu.org>
12072
12073         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
12074         remove, these originate in gnulib now.
12075
12076 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12077
12078         * doc/Makefile (standards.info standards.html standards.dvi):
12079         Also depend on make-stds.texi.
12080
12081 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
12082
12083         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
12084         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
12085
12086         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
12087         in wchar_t.  Problem reported by Eric Blake.
12088
12089         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
12090         LEN is smaller than SIZE.  Suggested by Bruno Haible.
12091         Also, help the compiler to keep LEN in a register.
12092
12093 2006-08-11  Eric Blake  <ebb9@byu.net>
12094
12095         * users.txt: Sort.  Add tar.
12096
12097 2006-08-11  Bruno Haible  <bruno@clisp.org>
12098
12099         * users.txt: New file.
12100
12101 2006-08-11  Bruno Haible  <bruno@clisp.org>
12102
12103         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
12104         before <wchar.h>. Needed for OSF/1 and BSD/OS.
12105
12106 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
12107
12108         * modules/snprintf (Depends-on): Remove minmax.
12109         (Maintainer): Add self and Bruno.
12110
12111 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
12112
12113         * lib/.cppi-disable: Add snprintf.h, socket_.h.
12114         * lib/snprintf.c: Include <errno.h> and <limits.h>.
12115         (EOVERFLOW): Define if the system does not.
12116         Do not include "minmax.h"; it wasn't used.
12117         (snprintf): Don't assume size_t promotes to an unsigned type.
12118         Fix bug when generated string was too long for the buffer: the
12119         buffer's contents are supposed to be the initial prefix of the
12120         output.  Don't assume vasnprintf returns EOVERFLOW if the size
12121         exceeds INT_MAX; do the check ourselves.
12122
12123         Import the following changes from libc:
12124
12125         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
12126
12127         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
12128         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
12129         set wc to the byte which couldn't be converted.
12130         (re_string_reconstruct): Don't clear valid_raw_len before calling
12131         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
12132         tip_context using re_string_context_at.
12133
12134         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
12135
12136         * lib/posix/regex.h: g++ still cannot handled [restrict].
12137
12138         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
12139
12140         * lib/posix/regex.h: Remove special handling for VMS.
12141
12142 2006-08-10  Jim Meyering  <jim@meyering.net>
12143
12144         * modules/same-inode: New module.
12145         * modules/dev-ino: New module.
12146         * modules/cycle-check: Depend on these modules, rather than simply
12147         including their .h files.
12148         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
12149         required via m4/cycle-check.m4.
12150         * modules/same: Depend on new same-inode module, rather than
12151         including same-inode.h.
12152         * modules/chdir-safer: New file.
12153
12154         * modules/chown (Depends-on): Add stat-macros.
12155
12156 2006-08-10  Jim Meyering  <jim@meyering.net>
12157
12158         * m4/cycle-check.m4: New file.
12159         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
12160         * m4/dev-ino.m4, m4/same-inode.m4: New files.
12161
12162 2006-08-10  Eric Blake  <ebb9@byu.net>
12163
12164         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
12165         in from original proposal.
12166
12167 2006-08-10  Eric Blake  <ebb9@byu.net>
12168         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12169
12170         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
12171         namespace.
12172
12173 2006-08-10  Bruno Haible  <bruno@clisp.org>
12174
12175         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
12176         as well.
12177
12178 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
12179
12180         Sync from coreutils.
12181
12182         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
12183
12184         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
12185         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
12186
12187 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
12188
12189         * modules/restrict: Remove; no longer needed now that we assume
12190         Autoconf 2.59 or later.
12191         * MODULES.html.sh: Remove 'restrict'.
12192         * modules/argp (Depends-on): Remove 'restrict'.
12193         * modules/base64 (Depends-on): Likewise.
12194         * modules/gc (Depends-on): Likewise.
12195         * modules/getaddrinfo (Depends-on): Likewise.
12196         * modules/glob (Depends-on): Likewise.
12197         * modules/inet_ntop (Depends-on): Likewise.
12198         * modules/inet_pton (Depends-on): Likewise.
12199         * modules/memxor (Depends-on): Likewise.
12200         * modules/regex (Depends-on): Likewise.
12201         * modules/strtok_r (Depends-on): Likewise.
12202         * modules/time_r (Depends-on): Likewise.
12203
12204 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
12205
12206         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
12207         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
12208         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
12209         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
12210         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
12211         * m4/memxor.m4 (gl_MEMXOR): Likewise.
12212         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
12213         gl_C_RESTRICT replaced by AC_C_RESTRICT.
12214
12215         Merge from coreutils.
12216         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
12217         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
12218         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
12219         * m4/time_r.m4 (gl_TIME_R): Likewise.
12220
12221 2006-08-09  Karl Berry  <karl@gnu.org>
12222
12223         * config/srclist.txt: no more gettext-tools, per Bruno.
12224
12225 2006-08-08  Eric Blake  <ebb9@byu.net>
12226
12227         * modules/verror: New module.
12228         * MODULES.html.sh: Document it.
12229
12230 2006-08-08  Eric Blake  <ebb9@byu.net>
12231
12232         * lib/verror.h, lib/verror.c: New files.
12233
12234 2006-08-08  Eric Blake  <ebb9@byu.net>
12235
12236         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
12237         verror_at_line output complies with GNU Coding Standards even when
12238         file is NULL.
12239
12240 2006-08-07  Bruno Haible  <bruno@clisp.org>
12241
12242         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
12243         versions of AIX.
12244         Reported by Ralf Wildenhues.
12245
12246 2006-08-07  Bruno Haible  <bruno@clisp.org>
12247
12248         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
12249         in an AC_DEFUN. Needed so that the autoconf snippets can use
12250         AC_REQUIRE.
12251
12252 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12253
12254         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
12255         Initialize pkgdata_DATA.
12256         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
12257         overriding it.
12258
12259 2006-08-06  Eric Blake  <ebb9@byu.net>
12260
12261         * lib/error.h: Fold in some upstream changes from glibc.
12262         * lib/error.c: Likewise.
12263
12264 2006-08-04  Bruno Haible  <bruno@clisp.org>
12265
12266         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
12267         Make the mostlyclean-local rule depend on mostlyclean-generic.
12268         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
12269
12270 2006-07-31  Bruno Haible  <bruno@clisp.org>
12271
12272         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
12273         <stdlib.h>, <string.h>.
12274
12275 2006-07-30  Bruno Haible  <bruno@clisp.org>
12276
12277         * modules/readlink (License): Change to LGPL.
12278
12279 2006-07-30  Bruno Haible  <bruno@clisp.org>
12280
12281         * modules/javaversion (Makefile.am): Distribute javaversion.java and
12282         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
12283         set PKGDATADIR to point to it.
12284
12285 2006-07-30  Bruno Haible  <bruno@clisp.org>
12286
12287         * modules/csharpexec (configure.ac): Comment out macro invocation.
12288         * modules/javaexec (configure.ac): Likewise.
12289         * modules/javacomp-script (configure.ac): Likewise.
12290
12291         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
12292
12293 2006-07-30  Bruno Haible  <bruno@clisp.org>
12294
12295         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
12296         linked-list.
12297
12298 2006-07-30  Bruno Haible  <bruno@clisp.org>
12299
12300         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
12301
12302 2006-07-30  Bruno Haible  <bruno@clisp.org>
12303
12304         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
12305         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
12306         get removed.
12307
12308 2006-07-29  Bruno Haible  <bruno@clisp.org>
12309
12310         Make it possible for gnulib-tool to work with locally modified or
12311         augmented gnulib repositories.
12312         * gnulib-tool (func_usage): Document --local-dir option.
12313         (local_gnulib_dir): New variable.
12314         Handle --local-dir option.
12315         (func_lookup_file): New function.
12316         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
12317         (func_get_description, func_get_filelist, func_get_description,
12318         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
12319         func_get_automake_snippet, func_get_include_directive,
12320         func_get_license, func_get_maintainer): Use func_lookup_file.
12321         (func_import, func_create_testdir): Use func_lookup_file.
12322
12323 2006-07-29  Bruno Haible  <bruno@clisp.org>
12324
12325         * modules/setenv (Depends-on): Add unistd.
12326
12327 2006-07-29  Bruno Haible  <bruno@clisp.org>
12328
12329         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
12330
12331 2006-07-29  Bruno Haible  <bruno@clisp.org>
12332
12333         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
12334
12335 2006-07-29  Bruno Haible  <bruno@clisp.org>
12336
12337         * gnulib-tool (import, update): If there is no Makefile.am, look at
12338         aclocal.m4, instead of bailing out.
12339
12340 2006-07-29  Bruno Haible  <bruno@clisp.org>
12341
12342         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
12343         Categorize the options by when they are useful.
12344
12345 2006-07-29  Bruno Haible  <bruno@clisp.org>
12346
12347         * gnulib-tool (func_usage): Document option --no-libtool.
12348         Handle option --no-libtool.
12349         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
12350         for changed semantics of $libtool variable.
12351         (func_import): Likewise. If libtool is not used, show this through
12352         an option --no-libtool.
12353         (func_create_testdir): Update.
12354
12355 2006-07-29  Bruno Haible  <bruno@clisp.org>
12356
12357         * gnulib-tool (func_import): Extend error message about missing
12358         --doc-base.
12359
12360 2006-07-29  Bruno Haible  <bruno@clisp.org>
12361
12362         * gnulib-tool (func_import): Don't create the $docbase directory if
12363         there is no file to store there.
12364
12365 2006-07-29  Bruno Haible  <bruno@clisp.org>
12366
12367         * gnulib-tool (autoconf_minversion): If a --dir option is given and
12368         relevant, look for configure.ac there, not in the current directory.
12369         Also use a simple search for AC_PREREQ, not "autoconf --trace".
12370
12371 2006-07-29  Bruno Haible  <bruno@clisp.org>
12372
12373         * gnulib-tool (SORT): New variable.
12374         (func_usage): Undocument --assume-autoconf option.
12375         Remove --assume-autoconf option handling.
12376         (autoconf_minversion): Determine from the contents of configure.ac.
12377         (func_import): Remove autoconf_minversion handling.
12378         Suggested by Eric Blake.
12379
12380 2006-07-29  Bruno Haible  <bruno@clisp.org>
12381
12382         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
12383
12384 2006-07-29  Bruno Haible  <bruno@clisp.org>
12385
12386         * config/srclist.txt (*setenv.[ch]): Remove rules.
12387
12388 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12389
12390         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
12391
12392 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12393
12394         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
12395         arpa/inet.h.
12396
12397 2006-07-28  Simon Josefsson  <jas@extundo.com>
12398
12399         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
12400         * modules/inet_pton (Depends-on): Likewise.
12401
12402 2006-07-28  Simon Josefsson  <jas@extundo.com>
12403
12404         * m4/netinet_in_h.m4: New file.
12405
12406 2006-07-28  Simon Josefsson  <jas@extundo.com>
12407
12408         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
12409         #include's.
12410
12411 2006-07-28  Simon Josefsson  <jas@extundo.com>
12412
12413         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
12414         #include's.
12415
12416 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
12417
12418         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
12419         setgid on directories only if they set these bits.
12420         * lib/modechange.h: Remove obsolete comment about masks.
12421
12422 2006-07-28  Eric Blake  <ebb9@byu.net>
12423
12424         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
12425         macro expansion.
12426
12427 2006-07-28  Bruno Haible  <bruno@clisp.org>
12428
12429         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
12430
12431 2006-07-28  Bruno Haible  <bruno@clisp.org>
12432
12433         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
12434
12435 2006-07-28  Bruno Haible  <bruno@clisp.org>
12436
12437         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
12438         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
12439         Define fallbacks.
12440         Avoids link error on FreeBSD 4.x.
12441         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
12442
12443         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
12444         encoding.
12445         * lib/mbswidth.c (iswcntrl): Likewise.
12446
12447 2006-07-27  Bruno Haible  <bruno@clisp.org>
12448
12449         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
12450         test.
12451
12452 2006-07-27  Bruno Haible  <bruno@clisp.org>
12453
12454         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
12455         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
12456         defined.
12457
12458 2006-07-26  Eric Blake  <ebb9@byu.net>
12459
12460         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
12461
12462 2006-07-26  Eric Blake  <ebb9@byu.net>
12463
12464         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
12465         like mingw that lack mkstemp.
12466         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
12467         avoid compilation warning on mingw.
12468
12469 2006-07-26  Bruno Haible  <bruno@clisp.org>
12470
12471         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
12472         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
12473         INT_FAST*_MIN, INTPTR_MIN.
12474
12475 2006-07-25  Bruno Haible  <bruno@clisp.org>
12476
12477         * modules/version-etc (Depends-on): Add stdarg.
12478
12479 2006-07-25  Bruno Haible  <bruno@clisp.org>
12480
12481         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
12482         complex commands.
12483
12484 2006-07-25  Bruno Haible  <bruno@clisp.org>
12485
12486         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
12487         defined in <stdarg.h> or config.h.
12488
12489 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
12490
12491         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
12492         (gl_STDIO_SAFER): Remove.
12493
12494 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
12495
12496         * MODULES.html.sh (File stream based Input/Output):
12497         Add fopen-safer, tmpfile-safer; remove stdio-safer.
12498         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
12499         * modules/fopen-safer, modules/tmpfile-safer: New files.
12500         * modules/stdio-safer: Remove.
12501
12502 2006-07-24  Bruno Haible  <bruno@clisp.org>
12503
12504         * modules/tmpdir: New file.
12505         * MODULES.html.sh (File system functions): Add it.
12506
12507 2006-07-24  Bruno Haible  <bruno@clisp.org>
12508
12509         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
12510         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
12511
12512 2006-07-24  Bruno Haible  <bruno@clisp.org>
12513
12514         * modules/clean-temp: New file.
12515
12516 2006-07-24  Bruno Haible  <bruno@clisp.org>
12517
12518         * m4/tmpdir.m4: New file, from GNU gettext.
12519
12520 2006-07-24  Bruno Haible  <bruno@clisp.org>
12521
12522         * lib/tmpdir.h: New file, from GNU gettext.
12523         * lib/tmpdir.c: New file, from GNU gettext.
12524
12525 2006-07-24  Bruno Haible  <bruno@clisp.org>
12526
12527         * lib/clean-temp.h: New file, from GNU gettext.
12528         * lib/clean-temp.c: New file, from GNU gettext.
12529
12530 2006-07-23  Eric Blake  <ebb9@byu.net>
12531
12532         * modules/stdio-safer (Files): Add tmpfile-safer.c.
12533         (Depends-on): Add binary-io.
12534
12535 2006-07-23  Eric Blake  <ebb9@byu.net>
12536
12537         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
12538
12539 2006-07-23  Eric Blake  <ebb9@byu.net>
12540
12541         * lib/tmpfile-safer.c: New file.
12542         * lib/stdio-safer.h (fopen_safer): Add prototype.
12543         * lib/stdio--.h (tmpfile): Make safer.
12544
12545 2006-07-23  Bruno Haible  <bruno@clisp.org>
12546
12547         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
12548         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
12549         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
12550         gl_linked_remove_at): Use it.
12551
12552 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12553         and Simon Josefsson <jas@extundo.com>
12554
12555         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
12556
12557         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
12558
12559 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
12560
12561         * modules/close-stream: New file.
12562         * modules/closeout (Description): Make it clear that it exits
12563         with a diagnostic on error.
12564         (Depends-on): Add close-stream.  Remove fpending, stdbool.
12565         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
12566
12567 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
12568
12569         * m4/close-stream.m4: New file.
12570
12571 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
12572
12573         * lib/close-stream.c, lib/close-stream.h: New files.
12574
12575 2006-07-22  Bruno Haible  <bruno@clisp.org>
12576
12577         Merge from GNU gettext 0.15.
12578
12579         2006-05-01  Bruno Haible  <bruno@clisp.org>
12580
12581                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
12582
12583         2006-07-22  Bruno Haible  <bruno@clisp.org>
12584
12585                 * modules/javaversion: New file.
12586                 * MODULES.html.sh (Java): Add javaversion.
12587
12588         2006-03-12  Bruno Haible  <bruno@clisp.org>
12589
12590                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
12591
12592         2005-12-04  Bruno Haible  <bruno@clisp.org>
12593
12594                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
12595                 (untested).
12596
12597         2006-06-21  Bruno Haible  <bruno@clisp.org>
12598
12599                 Avoid warnings from recent versions of mcs.
12600                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
12601                 -o, -L, -r any more. Use options documented since mcs-1.0
12602                 instead. Similarly for -g.
12603
12604         2005-12-04  Bruno Haible  <bruno@clisp.org>
12605
12606                 * build-aux/csharpcomp.sh.in: Suffix for resources is
12607                 .resources, not .resource.
12608
12609         2005-07-09  Bruno Haible  <bruno@clisp.org>
12610
12611                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
12612                 add a .dll suffix.
12613                 Reported by Mark Junker <mjscod@gmx.de>.
12614
12615         2006-07-22  Bruno Haible  <bruno@clisp.org>
12616
12617                 * modules/gettext: Upgrade to gettext-0.15.
12618                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
12619                 m4/visibility.m4.
12620                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
12621
12622 2006-07-22  Bruno Haible  <bruno@clisp.org>
12623
12624         Merge from GNU gettext 0.15.
12625
12626         2006-03-25  Bruno Haible  <bruno@clisp.org>
12627
12628                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
12629
12630         2006-07-21  Bruno Haible  <bruno@clisp.org>
12631
12632                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
12633                 "1.1".
12634
12635         2006-05-09  Bruno Haible  <bruno@clisp.org>
12636
12637                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
12638                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
12639                 for the conftestver execution.
12640
12641         2006-05-01  Bruno Haible  <bruno@clisp.org>
12642
12643                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
12644                 optional target-version argument. Verify that the compiler
12645                 groks source of the specified source-version, or add -source
12646                 option as necessary. Verify that the compiler produces
12647                 bytecode in the specified target-version, or add -target and
12648                 -source options as necessary. Make the result of the test
12649                 available as variable CONF_JAVAC. Also log error output in
12650                 config.log.
12651
12652         2006-03-11  Bruno Haible  <bruno@clisp.org>
12653
12654                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
12655
12656         2006-05-09  Bruno Haible  <bruno@clisp.org>
12657
12658                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
12659                 CLASSPATH_SEPARATOR to a semicolon.
12660
12661         2006-03-12  Bruno Haible  <bruno@clisp.org>
12662
12663                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
12664                 available as variable CONF_JAVA, for subsequent autoconf
12665                 tests. Also log error output in config.log.
12666
12667         2006-07-19  Bruno Haible  <bruno@clisp.org>
12668
12669                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
12670                 that getline works on glibc2 systems. Needed to avoid trouble
12671                 in relocatable.c.
12672                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
12673
12674         2005-12-04  Bruno Haible  <bruno@clisp.org>
12675
12676                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
12677                 launcher (untested).
12678
12679         2005-12-04  Bruno Haible  <bruno@clisp.org>
12680
12681                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
12682
12683         2006-07-22  Bruno Haible  <bruno@clisp.org>
12684
12685                 * gettext.m4: Update from GNU gettext-0.15.
12686                 * nls.m4: Likewise.
12687                 * po.m4: Likewise.
12688                 * inttypes-pri.m4: Likewise.
12689                 * inttypes-h.m4: Renamed from inttypes.m4.
12690                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
12691
12692 2006-07-22  Bruno Haible  <bruno@clisp.org>
12693
12694         Merge from GNU gettext 0.15.
12695
12696         2005-07-05  Bruno Haible  <bruno@clisp.org>
12697
12698                 * printf-args.c (printf_fetchargs): Work around broken
12699                 definition of wint_t on mingw.
12700
12701         2005-02-12  Bruno Haible  <bruno@clisp.org>
12702
12703                 * xallocsa.h: Add extern "C" for C++.
12704
12705         2006-05-17  Bruno Haible  <bruno@clisp.org>
12706
12707                 Cygwin portability.
12708                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
12709
12710         2006-04-30  Bruno Haible  <bruno@clisp.org>
12711
12712                 * progreloc.c: Include <mach-o/dyld.h> if available.
12713                 (find_executable): Use _NSGetExecutablePath when possible.
12714
12715         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
12716
12717                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
12718                 function.
12719
12720         2005-12-29  Bruno Haible  <bruno@clisp.org>
12721
12722                 * progreloc.c (set_program_name_and_installdir): Fix
12723                 compilation error.
12724
12725         2005-12-04  Bruno Haible  <bruno@clisp.org>
12726
12727                 Cygwin portability.
12728                 * progreloc.c: Include <windows.h> also on Cygwin.
12729                 (find_executable): Add support for Cygwin.
12730                 (set_program_name_and_installdir): Handle also platforms with
12731                 nonempty EXEEXT.
12732
12733         2006-07-11  Bruno Haible  <bruno@clisp.org>
12734
12735                 * javacomp.c: Fix a comment.
12736                 Reported by Jim Meyering.
12737
12738         2006-04-30  Bruno Haible  <bruno@clisp.org>
12739
12740                 * javacomp.h (compile_java_class): Add source_version,
12741                 target_version arguments.
12742                 * javacomp.c: Rewritten to choose only a compiler that
12743                 respects the specified source_version and target_version.
12744
12745         2006-06-27  Bruno Haible  <bruno@clisp.org>
12746
12747                 Assume correct S_ISDIR macro.
12748                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
12749
12750         2006-07-22  Bruno Haible  <bruno@clisp.org>
12751
12752                 * javaversion.h: New file, from GNU gettext.
12753                 * javaversion.c: New file, from GNU gettext.
12754                 * javaversion.java: New file, from GNU gettext.
12755                 * javaversion.class: New file, from GNU gettext.
12756
12757         2006-05-17  Bruno Haible  <bruno@clisp.org>
12758
12759                 Cygwin portability.
12760                 * javaexec.c (execute_java_class): Test for jview program
12761                 also on Cygwin.
12762
12763         2006-04-09  Bruno Haible  <bruno@clisp.org>
12764
12765                 * fatal-signal.c: Don't include string.h.
12766                 (at_fatal_signal): Use a copying loop instead of memcpy.
12767
12768         2005-12-04  Bruno Haible  <bruno@clisp.org>
12769
12770                 * csharpexec.c: Add support for 'clix' launcher (untested).
12771                 (execute_csharp_using_sscli): New function.
12772                 (execute_csharp_program): Call it.
12773
12774         2006-06-21  Bruno Haible  <bruno@clisp.org>
12775
12776                 Avoid warnings from recent versions of mcs.
12777                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
12778                 -o, -L, -r any more. Use options documented since mcs-1.0
12779                 instead. Similarly for -g.
12780
12781         2005-07-09  Bruno Haible  <bruno@clisp.org>
12782
12783                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
12784                 add a .dll suffix.
12785                 Reported by Mark Junker <mjscod@gmx.de>.
12786
12787         2006-06-17  Bruno Haible  <bruno@clisp.org>
12788
12789                 * config.charset: Update for NetBSD 3.0.
12790
12791         2006-05-17  Bruno Haible  <bruno@clisp.org>
12792
12793                 Cygwin portability.
12794                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
12795
12796         2006-05-16  Bruno Haible  <bruno@clisp.org>
12797
12798                 * localcharset.c [CYGWIN]: Include <windows.h>.
12799                 (get_charset_aliases): For Cygwin, return the same CPxxx
12800                 aliases list as under WIN32.
12801                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
12802                 the environment variables. Fall back to GetACP().
12803
12804         2006-04-05  Bruno Haible  <bruno@clisp.org>
12805
12806                 * config.charset: Update Juan Manuel Guerrero's address.
12807
12808         2005-02-12  Bruno Haible  <bruno@clisp.org>
12809
12810                 * allocsa.h: Add extern "C" for C++.
12811
12812         2005-02-10  Bruno Haible  <bruno@clisp.org>
12813
12814                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
12815                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
12816
12817         2006-07-22  Bruno Haible  <bruno@clisp.org>
12818
12819                 * gettext.h: Update to GNU gettext-0.15.
12820
12821 2006-07-22  Bruno Haible  <bruno@clisp.org>
12822
12823         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
12824         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
12825         lib-prefix.m4, longdouble.m4, ssize_t.m4.
12826
12827 2006-07-21  Eric Blake  <ebb9@byu.net>
12828
12829         * modules/stdlib-safer: New file.
12830         * MODULES.html.sh (File stream based Input/Output): Add
12831         stdlib-safer.
12832
12833 2006-07-21  Eric Blake  <ebb9@byu.net>
12834
12835         * lib/stdlib-safer.h: New file from coreutils, required by
12836         stdlib--.h.
12837
12838 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
12839
12840         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
12841
12842 2006-07-20  Bruno Haible  <bruno@clisp.org>
12843
12844         * gnulib-tool: Recognize new option --assume-autoconf.
12845         (autoconf_minversion): New variable.
12846         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
12847
12848 2006-07-20  Bruno Haible  <bruno@clisp.org>
12849
12850         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
12851
12852 2006-07-19  Derek R. Price  <derek@ximbiot.com>
12853
12854         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
12855         Reindent and repaginate.
12856
12857 2006-07-19  Derek Price  <derek@ximbiot.com>
12858
12859         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
12860         Correct grammar.
12861
12862 2006-07-17  Bruno Haible  <bruno@clisp.org>
12863
12864         * modules/list: New file.
12865         * modules/array-list: New file.
12866         * modules/carray-list, modules/carray-list-tests: New files.
12867         * modules/linked-list, modules/linked-list-tests: New files.
12868         * modules/avltree-list, modules/avltree-list-tests: New files.
12869         * modules/rbtree-list, modules/rbtree-list-tests: New files.
12870         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
12871         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
12872         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
12873         * modules/oset: New file.
12874         * modules/array-oset: New file.
12875         * modules/avltree-oset, modules/avltree-oset-tests: New files.
12876         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
12877         * tests/test-carray_list.c: New file.
12878         * tests/test-linked_list.c: New file.
12879         * tests/test-avltree_list.c: New file.
12880         * tests/test-rbtree_list.c: New file.
12881         * tests/test-linkedhash_list.c: New file.
12882         * tests/test-avltreehash_list.c: New file.
12883         * tests/test-rbtreehash_list.c: New file.
12884         * tests/test-avltree_oset.c: New file.
12885         * tests/test-rbtree_oset.c: New file.
12886         * MODULES.html.sh (Container data structures): New section.
12887
12888 2006-07-17  Bruno Haible  <bruno@clisp.org>
12889
12890         * m4/gl_list.m4: New file.
12891
12892 2006-07-17  Bruno Haible  <bruno@clisp.org>
12893
12894         * lib/gl_list.h: New file.
12895         * lib/gl_list.c: New file.
12896         * lib/gl_array_list.h: New file.
12897         * lib/gl_array_list.c: New file.
12898         * lib/gl_carray_list.h: New file.
12899         * lib/gl_carray_list.c: New file.
12900         * lib/gl_linked_list.h: New file.
12901         * lib/gl_linked_list.c: New file.
12902         * lib/gl_anylinked_list1.h: New file.
12903         * lib/gl_anylinked_list2.h: New file.
12904         * lib/gl_avltree_list.h: New file.
12905         * lib/gl_avltree_list.c: New file.
12906         * lib/gl_anyavltree_list1.h: New file.
12907         * lib/gl_anyavltree_list2.h: New file.
12908         * lib/gl_rbtree_list.h: New file.
12909         * lib/gl_rbtree_list.c: New file.
12910         * lib/gl_anyrbtree_list1.h: New file.
12911         * lib/gl_anyrbtree_list2.h: New file.
12912         * lib/gl_anytree_list1.h: New file.
12913         * lib/gl_anytree_list2.h: New file.
12914         * lib/gl_linkedhash_list.h: New file.
12915         * lib/gl_linkedhash_list.c: New file.
12916         * lib/gl_anyhash_list1.h: New file.
12917         * lib/gl_anyhash_list2.h: New file.
12918         * lib/gl_avltreehash_list.h: New file.
12919         * lib/gl_avltreehash_list.c: New file.
12920         * lib/gl_rbtreehash_list.h: New file.
12921         * lib/gl_rbtreehash_list.c: New file.
12922         * lib/gl_anytreehash_list1.h: New file.
12923         * lib/gl_anytreehash_list2.h: New file.
12924
12925         * lib/gl_oset.h: New file.
12926         * lib/gl_oset.c: New file.
12927         * lib/gl_array_oset.h: New file.
12928         * lib/gl_array_oset.c: New file.
12929         * lib/gl_avltree_oset.h: New file.
12930         * lib/gl_avltree_oset.c: New file.
12931         * lib/gl_rbtree_oset.h: New file.
12932         * lib/gl_rbtree_oset.c: New file.
12933         * lib/gl_anytree_oset.h: New file.
12934
12935 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
12936
12937         * m4/mkancesdirs.m4: New file.
12938         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
12939         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
12940         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
12941         it.
12942
12943 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
12944
12945         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
12946         * lib/mkancesdirs.h: New files.
12947         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
12948         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
12949         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
12950         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
12951         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
12952         callers changed.  Revamp internals significantly, by not
12953         attempting to create directories that are temporarily more
12954         permissive than the final results.  Do not attempt to use
12955         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
12956         This removes some race conditions, fixes some bugs, and simplifies
12957         things.  Use new dirchownmod function to do owner and mode changes.
12958         * lib/mkdir-p.h: Likewise.
12959         * lib/modechange.c (octal_to_mode): New function.
12960         (struct mode_change): New member mentioned.
12961         (make_node_op_equals): New arg mentioned.  All callers changed.
12962         (mode_compile): Keep track of which mode bits the user has explicitly
12963         mentioned.
12964         (mode_adjust): New arg DIR, so that we implement the X op correctly.
12965         New arg PMODE_BITS, to keep track of which mode bits the user
12966         mentioned; it treats S_ISUID and S_ISGID speciall.
12967         All callers changed.
12968         * lib/modechange.h: Likewise.
12969
12970 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
12971
12972         * MODULES.html.sh: Add mkancestors.
12973         * modules/mkancesdirs: New module.
12974         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
12975         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
12976         The chdir-safer and afs files are now orphans; I'll remove them
12977         unless someone speaks up.
12978         Add lib/dirchownmod.c, lib/dirchownmod.h.
12979         (Depends-on): Remove alloca, chown, save-cwd, dirname.
12980         Add lchown, mkancesdirs.
12981         (Maintainer): Add self.
12982
12983 2006-07-15  Karl Berry  <karl@gnu.org>
12984
12985         * gnulib-tool: help message wording/arrangement.
12986
12987 2006-07-14  Simon Josefsson  <jas@extundo.com>
12988
12989         * doc/gnulib.texi (Libtool and Windows): New section.
12990
12991 2006-07-12  Simon Josefsson  <jas@extundo.com>
12992
12993         * modules/gendocs (License): Fix license, approved by Karl.
12994
12995 2006-07-12  Eric Blake  <ebb9@byu.net>
12996
12997         * MODULES.html.sh: Add gendocs.
12998
12999 2006-07-11  Eric Blake  <ebb9@byu.net>
13000
13001         * modules/fdl: New module, to install doc/fdl.texi.
13002         * MODULES.html.sh: Add new section for documentation modules.
13003         * gnulib-tool: Avoid space-tab.
13004         (--doc-base): New option, to manage files from doc.
13005
13006 2006-07-11  Eric Blake  <ebb9@byu.net>
13007
13008         * m4/absolute-header.m4: Fix comments to match recent change.
13009
13010 2006-07-11  Eric Blake  <ebb9@byu.net>
13011
13012         * gnulib-tool: List --doc-base before --tests-base.
13013
13014 2006-07-11  Derek R. Price  <derek@ximbiot.com>
13015
13016         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
13017
13018 2006-07-11  Bruno Haible  <bruno@clisp.org>
13019
13020         * README: Mention where to put documentation.
13021
13022 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13023
13024         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
13025
13026 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
13027
13028         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
13029         to stdint.m4.
13030
13031 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
13032
13033         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
13034         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
13035         "no/such/file/stdint.h" when there is no such file, so that
13036         the resulting C code can be parsed by dodgy compilers.
13037         Problems reported by Bob Proulx.
13038
13039 2006-07-10  Derek R. Price  <derek@ximbiot.com>
13040
13041         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
13042         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
13043         macros into the GNU _D_EXACT_NAMLEN.
13044         * lib/savedir.c:  Likewise.
13045         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
13046
13047 2006-07-10  Derek R. Price  <derek@ximbiot.com>
13048         and Paul Eggert  <eggert@cs.ucla.edu>
13049
13050         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
13051         * m4/savedir.m4:
13052         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
13053         macros into the GNU _D_EXACT_NAMLEN.
13054
13055 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
13056
13057         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
13058         around the absolute name, to work around a problem with the HP-UX
13059         11.23 native C compiler, reported by Bob Proulx.
13060
13061 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
13062
13063         * doc/maintain.texi, make-stds.texi: Sync from
13064         <http://savannah.gnu.org/projects/gnustandards>.
13065
13066 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
13067
13068         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
13069
13070 2006-07-09  Jim Meyering  <jim@meyering.net>
13071
13072         * m4/glob.m4: Remove a doubled word in a comment.
13073
13074 2006-07-09  Jim Meyering  <jim@meyering.net>
13075
13076         * lib/argp-pv.c: Remove a doubled word in a comment.
13077         * lib/check-version.c (check_version): Likewise.
13078         * lib/javacomp.c (compile_java_class): Likewise.
13079
13080 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
13081
13082         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
13083         for the benefit of people using Autoconf 2.60.  If you want to
13084         support older Autoconf versions you can copy m4/onceonly_2_57.m4
13085         (or m4/onceonly.m4, if pre-2.57) manually.
13086
13087 2006-07-08  Jim Meyering  <jim@meyering.net>
13088
13089         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
13090         comment.
13091         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
13092         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
13093         comment.
13094
13095 2006-07-08  Jim Meyering  <jim@meyering.net>
13096
13097         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
13098
13099 2006-07-07  Simon Josefsson  <jas@extundo.com>
13100
13101         * tests/test-crc.c: Change expected crc value, the test vector
13102         were probably computed using the old broken crc.c?
13103
13104 2006-07-06  Simon Josefsson  <jas@extundo.com>
13105
13106         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
13107         now the canonical place for the M4 file).
13108
13109         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
13110         from the sys_socket dependency now.
13111
13112         * modules/inet_pton (Files): Ditto.
13113
13114         * modules/inet_ntop (Files): Ditto.
13115
13116 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
13117
13118         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
13119         not gl_PREREQ_GETUSERSHELL.
13120
13121 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13122
13123         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
13124         with only one argument, for Autoconf 2.60.
13125         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
13126         expand to nothing, so add a shell command to avoid syntax error.
13127         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
13128
13129 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13130
13131         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
13132
13133 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
13134
13135         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
13136         no longer needed.  Check for isblank decl.
13137         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
13138         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
13139         of existence.
13140
13141 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
13142
13143         * lib/getloadavg.c: Use __VMS, not VMS.
13144         * lib/getopt.c: Likewise.
13145         * lib/getpagesize.h: Likewise.
13146         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
13147         and probably does not work.
13148
13149 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
13150
13151         * lib/.cppi-disable: Add wcwidth.
13152         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
13153         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
13154         (ISGRAPH): Remove.  All uses changed to isgraph.
13155         (FOLD) [!defined _LIBC]: Remove special case.
13156         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
13157         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
13158         HAVE_ISBLANK.
13159         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
13160         case.
13161
13162 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
13163
13164         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
13165         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
13166         brackets.  Other minor changes to suppress some compiler
13167         warnings.
13168
13169 2006-07-06  Derek R. Price  <derek@ximbiot.com>
13170         and Paul Eggert  <eggert@cs.ucla.edu>
13171
13172         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
13173         of invoking obsolescent AC_HEADER_DIRENT macro.
13174         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
13175         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
13176         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
13177         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
13178         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
13179         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
13180         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
13181         * m4/readdir.m4: Remove; no longer needed.
13182
13183 2006-07-06  Derek R. Price  <derek@ximbiot.com>
13184         and Paul Eggert  <eggert@cs.ucla.edu>
13185
13186         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
13187         Don't worry about this obsolete case any more.
13188         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
13189         directories.
13190         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
13191         worry about this obsolete case any more.
13192         * lib/fts.c: Likewise.
13193         * lib/getcwd.c: Likewise.
13194         * lib/glob.h: Likewise.
13195         * lib/savedir.c: Likewise.
13196
13197 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
13198
13199         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
13200         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
13201         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
13202         needed.
13203         All uses removed.
13204         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
13205         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
13206         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
13207         needed.
13208         * m4/getdate.m4 (gl_GETDATE): Likewise.
13209         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
13210         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
13211         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
13212         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
13213         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
13214         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
13215         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
13216         needed.
13217
13218 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
13219
13220         * lib/memcasecmp.c: Include <limits.h>.
13221         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
13222         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
13223         Don't assume isdigit succeeds only on '0' through '9'.
13224
13225 2006-07-05  Eric Blake  <ebb9@byu.net>
13226
13227         * modules/getaddrinfo (Depends-on): Add snprintf.
13228
13229 2006-07-05  Eric Blake  <ebb9@byu.net>
13230
13231         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
13232         to avoid 'header present but could not be compiled' on cygwin.
13233
13234 2006-07-05  Eric Blake  <ebb9@byu.net>
13235
13236         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
13237         missing from netdb.h.
13238         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
13239
13240 2006-07-05  Derek R. Price  <derek@ximbiot.com>
13241
13242         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
13243         no longer needed.
13244         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
13245         * m4/getdate.m4 (gl_GETDATE): Likewise.
13246         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
13247         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
13248         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
13249         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
13250         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
13251
13252 2006-07-05  Derek R. Price  <derek@ximbiot.com>
13253
13254         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
13255         All uses of is_space replaced by isspace.
13256         * lib/exit.h: Don't talk about STDC_HEADERS.
13257         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
13258         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
13259         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
13260         replaced by isprint etc.
13261         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
13262         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
13263         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
13264         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
13265         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
13266         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
13267
13268 2006-07-05  Bruno Haible  <bruno@clisp.org>
13269
13270         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
13271         the function exists, before testing against AIX.
13272         Reported by Martin Lambers <marlam@marlam.de>.
13273
13274 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
13275
13276         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
13277         From Mark D. Baushke.
13278
13279 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
13280
13281         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
13282         to the absolute name, not just one, to bypass Sun C 5.8's
13283         "warning: #include of /usr/include/... may be non-portable".
13284
13285 2006-07-04  Eric Blake  <ebb9@byu.net>
13286
13287         * modules/dirname-tests: New test module.
13288         * tests/test-dirname.c: New file, replacing dirname.c
13289         TEST_DIRNAME section that was recently deleted.
13290
13291 2006-07-04  Bruno Haible  <bruno@clisp.org>
13292
13293         Assume ANSI C header files and <ctype.h> functions.
13294         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
13295         (mbsnwidth): Use isprint, iscntrl instead.
13296
13297 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13298
13299         Merge from coreutils.
13300         * MODULES.html.sh: Add xstrtold.
13301         * modules/xstrtold: New file.
13302         * modules/cycle-check (Files): Add lib/same-inode.h.
13303         * modules/dirname (Files): Add m4/double-slash-root.m4.
13304         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
13305         * modules/mkdir-p (Files): Add lib/same-inode.h.
13306         * modules/same (Files): Add lib/same-inode.h.
13307
13308 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13309
13310         * m4/absolute-header.m4: Renamed from full-header-path.m4.
13311         This is to keep the terminology clean; POSIX talks about
13312         "absolute pathnames", not "full pathnames", but the GNU
13313         Coding Standards say to use "path" for something else;
13314         so use "absolute" to keep both sides happy.
13315         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
13316         Set gl_absolute_header, not gl_full_header_path.
13317         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
13318         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
13319         All uses changed.
13320
13321         Merge from coreutils.
13322
13323         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
13324
13325         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
13326         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
13327         want to require the building of c-strtod.o.
13328         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
13329         needs -lm directly.
13330         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
13331
13332         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
13333
13334         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
13335         --as-needed option if available.  Problem reported by Albert Chin in
13336         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
13337         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
13338         cc merely issues a bunch of annoying warnings for --as-needed
13339         (this problem was reported by Bob Proulx).  Also, try linking with
13340         -lm to detect a bug in binutils 2.16 (this problem was reported
13341         by Ralf Wildenhues).
13342
13343         2006-06-18  Jim Meyering  <jim@meyering.net>
13344
13345         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
13346         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
13347         macro.
13348         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
13349         also check for glibc-2.4's abort-inducing bug.
13350
13351         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
13352         Low-probability clean-up should be to use rmdir to get rid of
13353         the just-created directory, not unlink.
13354
13355         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
13356         configure fail, and request a bug report to inform us about it.
13357         Add a comment that, barring reports to the contrary, in 2007 we'll
13358         assume ftruncate is universally available.
13359
13360         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
13361
13362         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
13363
13364         2006-03-12  Jim Meyering  <jim@meyering.net>
13365
13366         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
13367         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
13368         * m4/same.m4 (gl_SAME): Likewise.
13369         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
13370
13371         2006-03-11  Eric Blake  <ebb9@byu.net>
13372
13373         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
13374         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
13375         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
13376         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
13377
13378 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13379
13380         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
13381         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
13382         reported by Mark D. Baushke, one in
13383         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
13384
13385         Merge from coreutils.
13386
13387         * lib/.cppi-disable: Add stdint_.h.
13388         * lib/.cvsignore: Add stdint.h.
13389
13390         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
13391
13392         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
13393         both double and long double versions.
13394         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
13395         * lib/xstrtold.c: New file.
13396         * lib/xstrtod.h (xstrtold): New decl.
13397
13398         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
13399
13400         * lib/filemode.c (setst): Remove.
13401         (strmode): Rewrite to avoid setst.  This makes the code shorter,
13402         (arguably) clearer, and the generated code is a bit smaller on my
13403         Debian GNU/Linux stable x86 host.
13404
13405         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
13406
13407         * lib/filemode.c: Include "filemode.h" first, to test the interface.
13408         Assume that filemode.h includes sys/types.h and sys/stat.h.
13409         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
13410         (ftypelet): Reorder to put common cases first, for efficiency.
13411         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
13412         to do 'M'.
13413         (strmode): Renamed from mode_string, and now stores 12 bytes instead
13414         of 10, for compatibility with FreeBSD.  All callers changed.
13415         (filemodestring): Now stores 12 bytes instead of 10, and sets file
13416         types that can't be deduced solely from st_mode.  First arg is now a
13417         const pointer.
13418         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
13419         (strmode): Renamed from mode_string.
13420         (filemodestring): New decl.
13421         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
13422         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
13423         needed.
13424         (S_ISPORT, S_ISWHT): New macros, if not already defined.
13425
13426         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
13427
13428         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
13429         fsusage.h now does that.  Include fsusage.h first, to test interface.
13430         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
13431         at most one method (the old code could have generated decls that
13432         didn't conform to C89, not that this was ever exercised).
13433         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
13434
13435         2006-03-19  Jim Meyering  <jim@meyering.net>
13436
13437         Work even in a chroot where d_ino values for entries in "/"
13438         don't match the stat.st_ino values for the same names.
13439         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
13440         number, iterate through all entries again, using lstat instead.
13441         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
13442         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
13443
13444         * lib/getcwd.c (__getcwd): Clarify a comment.
13445         Use memcpy in place of a call to strcpy.
13446
13447         2006-03-12  Jim Meyering  <jim@meyering.net>
13448
13449         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
13450         matches that of the current directory (which we're about to chdir ".."
13451         out of), then save the dev-ino of the parent, instead.
13452
13453         * lib/same-inode.h (SAME_INODE): New file/macro.
13454         * lib/chdir-safer.c (SAME_INODE): Remove definition.
13455         Include "same-inode.h", instead.
13456         * lib/same.c: Likewise.
13457         * lib/cycle-check.h: Include "same-inode.h".
13458         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
13459         * lib/cycle-check.c (SAME_INODE): Remove definition.
13460         * lib/root-dev-ino.h: Include "same-inode.h".
13461
13462         2006-03-11  Eric Blake  <ebb9@byu.net>
13463
13464         * lib/same.c (same_name): s/base_name/last_component/
13465         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
13466         * lib/filenamecat.c (file_name_concat): Likewise.
13467
13468         2006-03-11  Eric Blake  <ebb9@byu.net>,
13469                     Paul Eggert  <eggert@cs.ucla.edu>
13470
13471         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
13472         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
13473         drive prefix.
13474         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
13475         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
13476         (last_component): New method.
13477         * lib/dirname.c (dir_len): Determine when drive letters need a
13478         subsequent slash.  Preserve // when it is special.
13479         (dir_name): Don't append dot when drive letter is absolute.
13480         [TEST_DIRNAME]: Move into a full-blown gnulib test.
13481         * lib/basename.c (base_name): New semantics - malloc the result.
13482         Preserve // when it is special.  Preserve relative files that look
13483         like drive letters.
13484         (base_len): Preserve // when it is special.
13485         (last_component): New method, similar to old base_name semantics.
13486         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
13487         base_name.  Strip redundant slashes from ///.
13488
13489 2006-07-03  Jim Meyering  <jim@meyering.net>
13490
13491         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
13492         macro is used before the first cycle_check call.
13493
13494 2006-07-03  Eric Blake  <ebb9@byu.net>
13495
13496         * modules/dirname (Depends-on): Add xstrndup.
13497
13498 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
13499
13500         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
13501         test cases, so that config.log is a bit easier to follow.
13502
13503 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
13504
13505         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
13506         both are 64 bits, since this seems to be the tradition, and this
13507         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
13508         we ever run into a host that prefers long long to long in this
13509         case, we'll need another configure-time test.  Problem reported by
13510         Jim Meyering.
13511
13512 2006-07-02  Eric Blake  <ebb9@byu.net>
13513
13514         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
13515
13516 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13517
13518         * modules/inttypes (Depends-on): No longer depends on stdint.
13519         * modules/stdint (Description): Say more about assumptions.
13520         Say that the fast types might differ.  Say macros are used.
13521         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
13522         (Makefile.am): Revise list of substituted symbols to match
13523         new stdint.m4.
13524         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
13525         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
13526         * tests/test-stdint.c (verify_same_types)
13527         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
13528         the code conforms to C99/C89.
13529         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
13530         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
13531
13532 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13533
13534         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
13535         but fix a bug, by requiring at least 64 bits.
13536         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
13537         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
13538         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
13539         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
13540
13541         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
13542         changes.  Make 2.59 a prerequisite.  Check and substitute for
13543         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
13544         inttypes.h.  Do not use special include files; just use the
13545         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
13546         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
13547         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
13548         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
13549         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
13550         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
13551         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
13552         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
13553         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
13554         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
13555         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
13556         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
13557         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
13558         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
13559         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
13560         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
13561         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
13562         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
13563         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
13564         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
13565         WINT_MAX.  Check for C99 conformance more strictly, by detecting
13566         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
13567         not check for things that C99 does not require, e.g., int8_t.  If
13568         a test isn't needed unless <stdint.h> isn't working, and is
13569         unlikely to be needed for any other reason, then don't do it
13570         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
13571         size_t, since we assume C89 freestanding at least.  Do not check
13572         for sig_atomic_t, wchar_t, or wint_t, since the code now does
13573         the right thing even if the types are not defined.  Instead use:
13574         (gl_STDINT_TYPE_PROPERTIES): New macro.
13575         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
13576         testing whether <sys/types.h> clashes, as Autoconf does this for
13577         us now.  All uses removed.
13578         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
13579         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
13580         (gl_CHECK_TYPE_SAME):
13581         Remove; no longer needed.
13582         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
13583         exists, since we'll return 0 anyway in that case.
13584         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
13585
13586 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13587
13588         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
13589         possible collision with system files.
13590         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
13591         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
13592         WCHAR_MIN and WCHAR_MAX in this case.
13593         (<stddef.h>): Do not include; no longer needed.
13594         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
13595         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
13596         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
13597         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
13598         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
13599         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
13600         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
13601         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
13602         !defined(__c99))]: Include in this case too, since it's harmless
13603         now.
13604         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
13605         dangerous to do so.
13606         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
13607         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
13608         (_STDINT_MIN, _STDINT_MAX): New macros.
13609         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
13610         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
13611         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
13612         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
13613         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
13614         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
13615         macros, not typedefs; this simplifies things quite a bit.
13616         Use long int for all types narrower than int64_t.
13617         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
13618         Define in terms of long long int or int64_t or long int,
13619         not int64_t or int32_t.  This saves some compile-time testing.
13620         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
13621         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
13622         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
13623         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
13624         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
13625         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
13626         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
13627         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
13628         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
13629         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
13630         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
13631         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
13632         undef any previous version and define our own version, for
13633         simplicity and consistency with the new macros for types.
13634         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
13635         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
13636         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
13637         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
13638         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
13639         @WINT_T_SUFFIX@ to keep things simple here.
13640         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
13641         Simplify by assuming typical 8/16/32/64 host, since we're
13642         already doing that elsewhere anyway.
13643         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
13644         and assume long long int is 64 bits if available.  This
13645         speeds up 'configure'.
13646
13647 2006-07-01  Eric Blake  <ebb9@byu.net>
13648
13649         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
13650         Reported by Andreas Buening.
13651
13652 2006-07-01  Eric Blake  <ebb9@byu.net>
13653
13654         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
13655
13656 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
13657
13658         * lib/getaddrinfo.c: fixed typo
13659
13660 2006-06-29  Jim Meyering  <jim@meyering.net>
13661
13662         * modules/strftime (Maintainer): Add my name, since with the
13663         FPRINTFTIME changes strftime.c has forked from glibc.
13664
13665 2006-06-29  Eric Blake  <ebb9@byu.net>
13666
13667         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
13668
13669 2006-06-29  Eric Blake  <ebb9@byu.net>
13670
13671         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
13672
13673 2006-06-29  Eric Blake  <ebb9@byu.net>
13674
13675         * lib/stat_.h: New file.
13676
13677 2006-06-29  Eric Blake  <ebb9@byu.net>
13678
13679         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
13680         unused static function.
13681
13682 2006-06-29  Eric Blake  <ebb9@byu.net>
13683
13684         * doc/functions.texi (Function Portability): Document missing lstat
13685         on mingw.
13686
13687 2006-06-29  Eric Blake  <ebb9@byu.net>
13688
13689         * MODULES.html.sh: Add sys_stat.
13690         * modules/sys_stat: New module.
13691         * modules/mkstemp (Depends-on): Add sys_stat.
13692
13693 2006-06-29  Derek R. Price  <derek@ximbiot.com>
13694
13695         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
13696
13697 2006-06-29  Derek R. Price  <derek@ximbiot.com>
13698
13699         * m4/c-bs-a.m4: Removed.
13700
13701 2006-06-29  Derek R. Price  <derek@ximbiot.com>
13702
13703         * lib/strftime.c: Assume strftime() exists.
13704
13705 2006-06-29  Derek Price  <derek@ximbiot.com>
13706
13707         * modules/c-bs-a: Removed - \a is C89.
13708         * MODULES.html.sh: Remove c-bs-a.
13709
13710 2006-06-29  Bruno Haible  <bruno@clisp.org>
13711
13712         * modules/wcwidth (License): Change to LGPL.
13713
13714 2006-06-28  Simon Josefsson  <jas@extundo.com>
13715
13716         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
13717         on _WIN32.
13718
13719         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
13720         getnameinfo.
13721
13722 2006-06-28  Simon Josefsson  <jas@extundo.com>
13723
13724         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
13725
13726 2006-06-28  Simon Josefsson  <jas@extundo.com>
13727
13728         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
13729         functions there.  It will succeed on Windows XP, but on Windows
13730         2000 and (presumably) earlier, it will fail, and use the internal
13731         re-implementation.
13732         (use_win32_p): New function.
13733         (getaddrinfo): Use strtoul on servname, to support numeric ports.
13734         Support AI_NUMERICSERV to disable getservbyname.
13735         (getnameinfo): New function, only supports
13736         NI_NUMERICHOST|NI_NUMERICSERV for now.
13737
13738         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
13739         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
13740         getnameinfo.
13741
13742 2006-06-28  Eric Blake  <ebb9@byu.net>
13743
13744         * modules/wcwidth: New file.
13745         * modules/mbchar (Depends-on): Add wcwidth.
13746         * modules/mbswidth (Depends-on): Add wcwidth.
13747         * MODULES.html.sh: Add wcwidth.
13748
13749 2006-06-28  Eric Blake  <ebb9@byu.net>
13750
13751         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
13752         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
13753
13754 2006-06-28  Eric Blake  <ebb9@byu.net>
13755
13756         * lib/xvasprintf.h: Fix comments.
13757
13758 2006-06-28  Eric Blake  <ebb9@byu.net>
13759
13760         * lib/mbchar.h (wcwidth): Include wcwidth.h.
13761         * lib/mbswidth.c (wcwidth): Move from here...
13762         * lib/wcwidth.h: ...to this new file.
13763
13764 2006-06-28  Derek R. Price  <derek@ximbiot.com>
13765
13766         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
13767
13768         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
13769         it's obsolete.
13770         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
13771
13772 2006-06-28  Derek R. Price  <derek@ximbiot.com>
13773
13774         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
13775         Autoconf 2.60 says this stuff was obsolete.
13776
13777 2006-06-28  Bruno Haible  <bruno@clisp.org>
13778
13779         * modules/wcwidth (Files): Add m4/wchar_t.m4.
13780
13781 2006-06-28  Bruno Haible  <bruno@clisp.org>
13782
13783         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
13784         gt_TYPE_WCHAR_T.
13785
13786 2006-06-28  Bruno Haible  <bruno@clisp.org>
13787
13788         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
13789         declaration for wcwidth.
13790         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
13791
13792 2006-06-28  Bruno Haible  <bruno@clisp.org>
13793
13794         * lib/mkdtemp.c [MINGW]: Include <io.h>.
13795         (mkdir): Define using _mkdir.
13796
13797 2006-06-28  Bruno Haible  <bruno@clisp.org>
13798
13799         * lib/getaddrinfo.h: Fix POSIX URL.
13800         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
13801         _WIN32.
13802         (use_win32_p): Make static.
13803         (getaddrinfo): Reject service name if it is empty or does not consist
13804         solely of decimal digits, or if its value is > 65535.
13805         (getnameinfo): Remove useless casts.
13806
13807 2006-06-27  Simon Josefsson  <jas@extundo.com>
13808
13809         * modules/sys_select: New file, suggested by Bruno Haible, Paul
13810         Eggert and Martin Lambers.
13811
13812 2006-06-27  Simon Josefsson  <jas@extundo.com>
13813
13814         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
13815         Eggert and Martin Lambers.
13816
13817 2006-06-27  Bruno Haible  <bruno@clisp.org>
13818
13819         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
13820         result to 0, not to empty.
13821         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
13822
13823 2006-06-27  Bruno Haible  <bruno@clisp.org>
13824
13825         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
13826
13827 2006-06-26  Simon Josefsson  <jas@extundo.com>
13828
13829         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
13830         present.
13831
13832 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
13833
13834         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
13835         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
13836         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
13837
13838 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
13839
13840         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
13841
13842 2006-06-26  Bruno Haible  <bruno@clisp.org>
13843
13844         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
13845
13846 2006-06-26  Bruno Haible  <bruno@clisp.org>
13847
13848         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
13849
13850 2006-06-26  Bruno Haible  <bruno@clisp.org>
13851
13852         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
13853         SGI C compiler in pre-C99 mode.
13854         Suggested by Mark D. Baushke and Larry Jones.
13855
13856 2006-06-26  Bruno Haible  <bruno@clisp.org>
13857
13858         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
13859         WCHAR_MAX.
13860         Reported by Mark D. Baushke and Larry Jones.
13861
13862 2006-06-26  Bruno Haible  <bruno@clisp.org>
13863
13864         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
13865         in pre-C99 mode.
13866         Suggested by Mark D. Baushke and Larry Jones.
13867
13868 2006-06-23  Simon Josefsson  <jas@extundo.com>
13869             Bruno Haible  <bruno@clisp.org>
13870
13871         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
13872         Emit mostlyclean-local rule.
13873         (func_emit_tests_Makefile_am): Likewise.
13874         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
13875
13876 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
13877
13878         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
13879
13880 2006-06-23  Bruno Haible  <bruno@clisp.org>
13881
13882         * tests/test-stdint.c: Update to match ISO C 99 Technical
13883         Corrigendum 1.
13884
13885 2006-06-23  Bruno Haible  <bruno@clisp.org>
13886
13887         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
13888
13889 2006-06-23  Bruno Haible  <bruno@clisp.org>
13890
13891         * lib/stdint_.h: Treat IRIX like OpenBSD.
13892
13893 2006-06-23  Bruno Haible  <bruno@clisp.org>
13894
13895         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
13896         ISO C 99 Technical Corrigendum 1.
13897
13898 2006-06-22  Simon Josefsson  <jas@extundo.com>
13899
13900         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
13901         MinGW.
13902
13903 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
13904
13905         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
13906         needed.  Some compiler complained about some of them.  Problem reported
13907         by Larry Jones in
13908         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
13909
13910 2006-06-21  Simon Josefsson  <jas@extundo.com>
13911
13912         * tests/test-getaddrinfo.c: New file.
13913
13914         * modules/getaddrinfo-tests: New file.
13915
13916         * MODULES.html.sh: Add inet_pton.
13917
13918         * modules/inet_pton: New file.
13919
13920 2006-06-21  Simon Josefsson  <jas@extundo.com>
13921
13922         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
13923         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
13924         of using the (limited) gnulib implementation on Windows XP.
13925
13926         * m4/inet_pton.m4: New file.
13927
13928 2006-06-21  Simon Josefsson  <jas@extundo.com>
13929
13930         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
13931         variable.
13932
13933         * lib/socket_.h: Don't define WINVER.
13934
13935         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
13936         slightly modified to work in gnulib.
13937
13938 2006-06-21  Simon Josefsson  <jas@extundo.com>
13939
13940         * doc/gnulib.texi (Windows sockets): Add.
13941
13942 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
13943
13944         * lib/read-file.c (fread_file): Start with buffer allocation of
13945         0 bytes rather than 1 byte; this simplifies the code.
13946         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
13947         code to free buffer and save/restore errno.
13948         (internal_read_file): Remove unused local.
13949
13950 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
13951
13952         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
13953         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
13954         Problem reported by Denis Excoffier in
13955         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
13956
13957 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13958
13959         * modules/sys_socket, modules/socklen: Include sys/types since
13960         FreeBSD 4.x's sys/socket.h needs it.
13961
13962 2006-06-19  Simon Josefsson  <jas@extundo.com>
13963
13964         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
13965
13966 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
13967
13968         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
13969
13970 2006-06-19  Bruno Haible  <bruno@clisp.org>
13971
13972         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
13973         and FULL_PATH_INTTYPES_H in angle brackets.
13974         Reported by Mark D. Baushke <mdb@gnu.org>.
13975
13976 2006-06-17  Eric Blake  <ebb9@byu.net>
13977
13978         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
13979         errno.
13980
13981 2006-06-17  Bruno Haible  <bruno@clisp.org>
13982
13983         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
13984         <sys/inttypes.h>.
13985
13986 2006-06-17  Bruno Haible  <bruno@clisp.org>
13987
13988         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
13989         whether errno is declared. Assume <errno.h> declares errno.
13990
13991 2006-06-17  Bruno Haible  <bruno@clisp.org>
13992
13993         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
13994
13995 2006-06-17  Bruno Haible  <bruno@clisp.org>
13996
13997         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
13998         problem on Solaris 2.5.1.
13999
14000 2006-06-16  Eric Blake  <ebb9@byu.net>
14001
14002         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
14003         * lib/unicodeio.c [!defined errno]: Likewise.
14004         * lib/strtol.c [!defined errno]: Likewise.
14005         * lib/strtod.c [!defined errno]: Likewise.
14006
14007 2006-06-15  Eric Blake  <ebb9@byu.net>
14008
14009         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
14010
14011 2006-06-15  Eric Blake  <ebb9@byu.net>
14012
14013         * config/srclist.txt (ssize_t.m4): Lose sync.
14014
14015 2006-06-15  Bruno Haible  <bruno@clisp.org>
14016
14017         * modules/stdint (Files): Include m4/full-header-path.m4,
14018         m4/size_max.m4, m4/wchar_t.m4.
14019         (Makefile.am): Many more substitutions.
14020         * modules/stdint-tests: New file.
14021         * tests/test-stdint.c: New file.
14022
14023 2006-06-15  Bruno Haible  <bruno@clisp.org>
14024
14025         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
14026         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
14027         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
14028         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
14029         gl_CHECK_TYPE_SAME): New macros.
14030
14031 2006-06-15  Bruno Haible  <bruno@clisp.org>
14032
14033         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
14034
14035 2006-06-15  Bruno Haible  <bruno@clisp.org>
14036
14037         * lib/stdint_.h: Rewritten to be fully auto-configured.
14038         Fixes bug on HP-UX/IA64.
14039
14040 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
14041
14042         * lib/getdate.y (__attribute__): Don't define if already defined.
14043         Problem reported by Larry Jones.
14044         * lib/utimens.c (__attribute__): Likewise.
14045
14046 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
14047
14048         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
14049         reported by Andreas Schwab.
14050
14051 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14052             Bruno Haible  <bruno@clisp.org>
14053
14054         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
14055         check for the declaration of strnlen and a run test that exposes the
14056         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
14057         rpl_strndup.
14058
14059 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14060             Bruno Haible  <bruno@clisp.org>
14061
14062         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
14063
14064 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14065
14066         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
14067         compile test, for Tru64 4.0D.
14068
14069 2006-05-28  Karl Berry  <karl@gnu.org>
14070
14071         * config/srclist.txt (printf-args.c): lose sync.
14072
14073 2006-05-26  Martin Lambers  <marlam@marlam.de>
14074
14075         * lib/getpass.c: Updates the test for the native W32 API, and adds
14076         missing includes, thus fixing compilation warnings.
14077
14078 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
14079
14080         * lib/exclude.c (exclude_fnmatch): New function.
14081         (excluded_file_name): Call exclude_fnmatch.
14082         * lib/exclude.h (excluded_file_name): New prototype
14083
14084 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
14085
14086         * lib/tempname.c (small_open, large_open): New macros.
14087         (__open, __open64) [!_LIBC]: Remove.
14088         (__gen_tempname): Use small_open and large_open instead of __open
14089         and __open64.  This fixes a portability bug on HP-UX 11.11i
14090         reported by Simon Wing-Tang in
14091         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
14092
14093 2006-05-24  Bruno Haible  <bruno@clisp.org>
14094
14095         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
14096         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
14097         Reported by Thorsten Maerz <torte@netztorte.de> via
14098         Aaron Stone <aaron@serendipity.cx>.
14099
14100 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
14101
14102         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
14103         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
14104         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
14105         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
14106         not really conditional on the cache.
14107         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
14108
14109 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
14110
14111         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
14112         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
14113         (my_usleep): Don't mishandle maximum value.
14114
14115 2006-05-19  Jim Meyering  <jim@meyering.net>
14116
14117         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
14118
14119 2006-05-17  Bruno Haible  <bruno@clisp.org>
14120
14121         Cygwin portability.
14122         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
14123
14124 2006-05-17  Bruno Haible  <bruno@clisp.org>
14125
14126         * lib/stdint_.h: Fix recognition of Cygwin.
14127
14128 2006-05-15  Bruno Haible  <bruno@clisp.org>
14129
14130         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
14131         on libtool patch by Ralf Wildenhues.
14132
14133 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14134
14135         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
14136         test for C99 conformance; (bool) 0.5 is an integer constant
14137         expression, but (bool) -0.5 is not.  Problem reported by Fedor
14138         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
14139
14140 2006-05-11  Simon Josefsson  <jas@extundo.com>
14141
14142         * m4/xvasprintf.m4: Fix obvious typo.
14143
14144 2006-05-11  Jim Meyering  <jim@meyering.net>
14145
14146         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
14147         James Lemley.
14148
14149 2006-05-10  Simon Josefsson  <jas@extundo.com>
14150
14151         * lib/md4.c: Typo fix, update copyright years.
14152         (K1, K2): Don't use L because it turn computations into 64-bit on
14153         64-bit platforms.
14154
14155 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
14156
14157         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
14158         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
14159         unwanted sign propagation, e.g., on hosts with 64-bit int.
14160         There still are some problems with reeelly weird theoretical hosts
14161         (e.g., 33-bit int) but it's not worth worrying about now.
14162         * lib/sha1.c (rol): Likewise.
14163         (K1, K2, K3, K4): Remove unnecessary L suffix.
14164
14165 2006-05-10  Bruno Haible  <bruno@clisp.org>
14166
14167         * lib/des.c: Cast to avoid warnings.
14168
14169 2006-05-09  Bruno Haible  <bruno@clisp.org>
14170
14171         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
14172         (Depends-on): Depend also on xsize, stdarg.
14173         (configure.ac): Add gl_XVASPRINTF.
14174
14175 2006-05-09  Bruno Haible  <bruno@clisp.org>
14176
14177         * m4/xvasprintf.m4: New file.
14178
14179 2006-05-09  Bruno Haible  <bruno@clisp.org>
14180
14181         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
14182         (EOVERFLOW): Define fallback value.
14183         (xstrcat): New function.
14184         (xvasprintf): Recognize the special case of a string concatenation.
14185
14186 2006-05-08  Eric Blake  <ebb9@byu.net>
14187
14188         * gnulib-tool (func_version): Base copyright year on CVS date.
14189         (func_emit_copyright_notice): New function.
14190         (func_emit_lib_Makefile_am): Use it.
14191         (func_emit_tests_Makefile_am): Likewise.
14192         (func_import): Likewise.
14193
14194 2006-05-08  Bruno Haible  <bruno@clisp.org>
14195
14196         * modules/stdarg: New file.
14197         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
14198
14199 2006-05-08  Bruno Haible  <bruno@clisp.org>
14200
14201         * m4/stdarg.m4: New file, from GNU gettext.
14202
14203 2006-05-08  Bruno Haible  <bruno@clisp.org>
14204
14205         * config/srclist.txt (build-aux/config.rpath): different from latest
14206         release.
14207
14208 2006-05-08  Bruno Haible  <bruno@clisp.org>
14209
14210         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
14211
14212 2006-05-05  Jim Meyering  <jim@meyering.net>
14213
14214         * m4/warning.m4: New file, derived from bison's file by the same name.
14215
14216 2006-05-03  Bruno Haible  <bruno@clisp.org>
14217
14218         * lib/stdint_.h: Shorter URL.
14219         * lib/inttypes.h: Likewise.
14220
14221 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
14222
14223         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
14224
14225 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
14226
14227         * lib/verify.h: Document the internals better.  Most of this change
14228         was written by Bruno Haible.
14229
14230 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
14231
14232         * doc/verify.texi: New file, partly based on a proposal by
14233         Bruno Haible.
14234
14235 2006-05-02  Bruno Haible  <bruno@clisp.org>
14236
14237         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
14238         test from here...
14239         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
14240
14241 2006-04-29  Bruno Haible  <bruno@clisp.org>
14242
14243         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
14244         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
14245
14246 2006-04-29  Bruno Haible  <bruno@clisp.org>
14247
14248         * gnulib-tool: Make --update option actually work.
14249
14250 2006-04-29  Bruno Haible  <bruno@clisp.org>
14251
14252         * doc/gcd.texi: New file.
14253         * doc/gnulib.texi: Include it.
14254
14255 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
14256
14257         * lib/getdate.y (get_date): When adding relative date, start with the
14258         initial time, not with the result of the first mktime call.
14259
14260 2006-04-25  Bruno Haible  <bruno@clisp.org>
14261
14262         * gnulib-tool (func_import): Output the include directives in three
14263         blocks, sorted separately.
14264         Reported by Ben Pfaff <blp@cs.stanford.edu>.
14265
14266 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
14267
14268         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
14269         to define main with arguments, for C++.  Reported by Eric Blake.
14270         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
14271         Prefer 'int main ()' to 'int main (void)', for C++.
14272         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
14273         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
14274         for 'main', for C99 and C++.
14275
14276 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
14277
14278         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
14279         Don't assume that exit status -1 is valid.
14280         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
14281         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
14282         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
14283         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
14284         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
14285         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
14286         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
14287         functions can be used without declaring them, or that you can
14288         exit with status -1.
14289         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
14290
14291 2006-04-24  Karl Berry  <karl@gnu.org>
14292
14293         * config/srclist.txt (longdouble.m4): sync lost.
14294
14295 2006-04-24  Eric Blake  <ebb9@byu.net>
14296
14297         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
14298
14299 2006-04-24  Bruno Haible  <bruno@clisp.org>
14300
14301         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
14302         poll() implementation in AIX.
14303         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
14304
14305 2006-04-24  Bruno Haible  <bruno@clisp.org>
14306
14307         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
14308         assigned exactly once.
14309
14310 2006-04-23  Claudio Fontana  <claudio@gnu.org>
14311             Bruno Haible  <bruno@clisp.org>
14312
14313         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
14314         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
14315         for AM_CPPFLAGS.
14316
14317 2006-04-23  Bruno Haible  <bruno@clisp.org>
14318
14319         * modules/copy-file: Depend on unistd.
14320         * modules/execute: Likewise.
14321         * modules/fatal-signal: Likewise.
14322         * modules/findprog: Likewise.
14323         * modules/mkdtemp : Likewise.
14324         * modules/pipe: Likewise.
14325         * modules/wait-process: Likewise.
14326
14327 2006-04-23  Bruno Haible  <bruno@clisp.org>
14328
14329         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
14330         condition was already detected.
14331         Reported by Ben Pfaff <blp@cs.stanford.edu>.
14332
14333 2006-04-23  Bruno Haible  <bruno@clisp.org>
14334
14335         * lib/copy-file.c: Include <unistd.h> unconditionally.
14336         * lib/execute.c: Likewise.
14337         * lib/fatal-signal.c: Likewise.
14338         * lib/findprog.c: Likewise.
14339         * lib/mkdtemp.c: Likewise.
14340         * lib/pipe.h: Likewise.
14341         * lib/pipe.c: Likewise.
14342         * lib/wait-process.h: Likewise.
14343
14344 2006-04-23  Bruno Haible  <bruno@clisp.org>
14345
14346         * gnulib-tool (func_usage): Fix --import description. Document
14347         --update.
14348         (func_import): Create temporary file in a temporary directory, if
14349         --dry-run is specified. Silence errors from 'grep' when there are no
14350         m4 files in $m4dir.
14351         (func_create_testdir): Silence errors from 'grep' when there are no
14352         m4 files in $m4dir.
14353         Reported by Karl Berry <karl@freefriends.org>.
14354
14355 2006-04-20  Bruno Haible  <bruno@clisp.org>
14356
14357         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
14358         one argument, so that the code will be portable to Autoconf 2.60.
14359         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
14360         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
14361         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
14362
14363 2006-04-19  Derek Price  <derek@ximbiot.com>
14364             Eric Blake  <ebb9@byu.net>
14365
14366         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
14367         rather than "/full/path.h".  Update comment to match.  Shorten &
14368         generalize m4_translit call via AS_TR_CPP.
14369
14370 2006-04-19  Derek Price  <derek@ximbiot.com>
14371             Eric Blake  <ebb9@byu.net>
14372
14373         * lib/inttypes.h: Correct grammar in comment.
14374
14375 2006-04-18  Derek Price  <derek@ximbiot.com>
14376             Paul Eggert  <eggert@cs.ucla.edu>
14377
14378         * modules/inttypes: New file.
14379         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
14380
14381 2006-04-18  Derek Price  <derek@ximbiot.com>
14382             Paul Eggert  <eggert@cs.ucla.edu>
14383
14384         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
14385         New files.
14386
14387 2006-04-18  Derek Price  <derek@ximbiot.com>
14388             Paul Eggert  <eggert@cs.ucla.edu>
14389
14390         * lib/inttypes.h: New file.
14391         * lib/strtoimax.c: Assume <inttypes.h>.
14392
14393 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
14394
14395         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
14396         isn't mounted.  Problem reported by Kir Kolyshkin.
14397
14398 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
14399
14400         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
14401         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
14402         Derek R. Price.
14403         * lib/regex.h (RE_DUP_MAX): Update comment to match current
14404         implementation.
14405
14406 2006-04-12  Eric Blake  <ebb9@byu.net>
14407
14408         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
14409         is now done automatically by the corresponding Autoconf macro.
14410
14411 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
14412
14413         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
14414         time_r.h.
14415
14416 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
14417
14418         Merge regex changes from libc, removing some of our
14419         POSIX-conformance changes that were rejected and redoing them in a
14420         less-intrusive way.
14421
14422         * lib/regcomp.c (re_compile_internal, init_dfa):
14423         Length arg is now size_t, not Idx.  All uses changed.
14424         (peek_token): Forward decl now says internal_function.
14425         (__re_error_msgid, __re_error_msgid_idx):
14426         Now static rather than extern with attribute_hidden.
14427         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
14428         For some reason libc prefers K&R style defns for external functions.
14429         (regerror) [!defined _LIBC]: Likewise.
14430         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
14431         (seek_collating_symbol_entry, lookup_collation_sequence_value):
14432         (build_range_exp, build_collating_symbol):
14433         Use K&R-style defn.
14434         (re_compile_fastmap): Use '\0' to memset, not 0.
14435         (utf8_sb_map): Make the calculations more obvious.
14436         (init_dfa, parse_bracket_exp, build_charclass_op):
14437         Call calloc and cast result, as glibc does.
14438         (init_word_char, fetch_token, peek_token, peek_token_bracket):
14439         (build_range_exp, build_collating_symbol):
14440         Now internal functions.
14441
14442         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
14443
14444         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
14445         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
14446         Don't depend on VMS; depend on __VMS instead, for POSIX
14447         namespace cleanness.
14448         (regoff_t): Define to ssize_t, not long int.
14449
14450         Remove the REG_ macros named below.  Instead, make the old names
14451         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
14452         __USE_GNU_REGEX.
14453         (REG_BACKSLASH_ESCAPE_IN_LISTS):
14454         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
14455         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
14456         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
14457         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
14458         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
14459         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
14460         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
14461         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
14462         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
14463         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
14464         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
14465         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
14466         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
14467         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
14468         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
14469         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
14470         (REG_NREGS):
14471         Remove.  All uses replaced by the old RE_* names.
14472         (RE_BACKSLASH_ESCAPE_IN_LISTS):
14473         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
14474         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
14475         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
14476         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
14477         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
14478         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
14479         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
14480         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
14481         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
14482         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
14483         Don't bother having these macros be independent of each others'
14484         values, since they no longer exist in the POSIX name space.
14485
14486         Rename the following member names back to their old names,
14487         unless !__USE_GNU_REGEX.  All uses changed back.
14488         (buffer): Renamed from re_buffer.
14489         (allocated): Renamed from re_allocated.
14490         (used): Renamed from re_used.
14491         (syntax): Renamed from re_syntax.
14492         (fastmap): Renamed from re_fastmap.
14493         (translate): Renamed from re_translate.
14494         (can_be_null): Renamed from re_can_be_null.
14495         (regs_allocated): Renamed from re_regs_allocated.
14496         (fastmap_accurate): Renamed from re_fastmap_accurate.
14497         (no_sub): Renamed from re_no_sub.
14498         (not_bol): Renamed from re_not_bol.
14499         (not_eol): Renamed from re_not_eol.
14500         (newline_anchor): Renamed from re_newline_anchor.
14501         (num_regs): Renamed from rm_num_regs.
14502         (start): Renamed from rm_start.
14503         (end): Renamed from rm_end.
14504
14505         (free_state): Move up a bit.
14506
14507         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
14508         #define to be empty.
14509         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
14510         when that is what is intended.
14511         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
14512         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
14513         (MAX): New macro.
14514         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
14515         All uses changed back to re_malloc, etc.  It's now the caller's
14516         responsibility to check for overflow; all callers changed.
14517         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
14518         (re_x2nrealloc): Remove.
14519         (free_state): Remove decl.
14520
14521         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
14522         (re_set_registers, re_exec):
14523         Use K&R-style defn.
14524
14525         2006-01-31  Roland McGrath  <roland@redhat.com>
14526
14527         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
14528         Reported by Mike Frysinger <vapier@gentoo.org>.
14529
14530         2006-01-15  Andreas Jaeger  <aj@suse.de>
14531
14532         [BZ #1950]
14533         * lib/regex_internal.c (re_string_reconstruct): Adjust for
14534         build_wcs_upper_buffer change.
14535         (build_wcs_upper_buffer): Change return type.
14536
14537         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
14538
14539         * lib/regex_internal.h: Include <stdint.h> if available.
14540
14541         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
14542
14543         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
14544
14545         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
14546
14547         * lib/regcomp.c: Adjust for changed secondary hash function.
14548
14549         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
14550
14551         * lib/regex.h: Pretty printing.
14552         Clean up namespace a bit.
14553
14554         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
14555
14556         * lib/regexec.c (update_cur_sifted_state, check_arrival,
14557         check_arrival_add_next_nodes): Avoid using uninitialized variable.
14558
14559         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
14560                     Ulrich Drepper  <drepper@redhat.com>
14561
14562         [BZ #1302]
14563         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
14564         changed.
14565         (bitset_word_t): Renamed from bitset_word.  All uses changed.
14566
14567         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
14568
14569         [BZ #281]
14570         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
14571         * lib/regcomp.c: Remove unnecessary uses of
14572         unsigned RE_TRANSLATE_TYPE.
14573         * lib/regex_internal.h: Likewise.
14574         * lib/regex_internal.c: Likewise.
14575         * lib/regexec.c: Likewise.
14576         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
14577
14578         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
14579
14580         * lib/regexec.c (find_recover_state): Remove unnecessary
14581         initialization.
14582         (transit_state_bkref): Make DFA a const pointer.
14583         (get_subexp): Likewise.
14584         (check_arrival): Likewise.
14585         (update_cur_sifted_state): Likewise.
14586         (re_search_internal): Likewise.
14587         (prune_impossible_nodes): Likewise.
14588         (acquire_init_state_context): Likewise.
14589         (proceed_next_node): Likewise.
14590         (set_regs): Likewise.
14591         (free_fail_stack_return): Likewise.
14592         (check_arrival_expand_ecl): Mark DFA parameter as const.
14593         (check_arrival_expand_ecl_sub): Likewise.
14594         (check_subexp_limits): Likewise.
14595         (sub_epsilon_src_nodes):  Likewise.
14596         (add_epsilon_src_nodes):  Likewise.
14597         (merge_state_array): Likewise.
14598         (update_regs): Likewise.
14599         (build_trtable): Likewise.
14600         (sift_states_backward): Mark MCTX parameter as const.
14601         (build_sifted_states): Likewise.
14602         (update_cur_sifted_state): Likewise.
14603         (sift_states_mkref): Likewise.
14604         (check_arrival_expand_ecl): Mark eclosure as const.
14605         (check_dst_limits_calc_pos_1): Likewise.
14606         * lib/regex_internal.h (re_match_context_t): Make dfa a const
14607         pointer.
14608
14609         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
14610
14611         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
14612         (transit_state_sb): Likewise.
14613         (transit_state_mb): Likewise.
14614         (sift_states_iter_mb): Likewise.
14615         (check_arrival_add_next_nodes): Likewise.
14616         (check_node_accept_bytes): Change first parameter to pointer-to-const.
14617         [_LIBC] (re_search_2_stub): Use mempcpy.
14618
14619         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
14620         mbrtowc for very simple UTF-8 case.
14621
14622         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
14623         a pointer-to-const.
14624         (re_acquire_state_context): Likewise.
14625         * lib/regex_internal.h: Adjust prototypes.
14626
14627         * lib/regex.c: Prevent using C++ compilers.
14628
14629         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
14630         (re_acquire_state_context): Likewise.
14631
14632 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
14633
14634         * modules/regex (Depends-on): Add ssize_t.
14635
14636 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
14637
14638         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
14639         translation table.
14640
14641 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
14642
14643         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
14644
14645 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
14646             Bruno Haible  <bruno@clisp.org>
14647
14648         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
14649         <sys/types.h> and <inttypes.h>.
14650
14651 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14652
14653         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
14654         `__error_t_defined', so argp.h will not typedef the former.
14655
14656 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
14657
14658         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
14659         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
14660         glibc names.  Even if glibc is changed to conform to POSIX, the
14661         traditional names will be available anyway, since regex depends on
14662         the extensions module.  Also, fix a longstanding typo in the
14663         implementation of Spencer ERE test #75 from grep 2.3.  Problems
14664         reported by Emanuele Giaquinta.  Also, change sense of cached
14665         variable, so that the message makes sense.
14666
14667 2006-03-24  Simon Josefsson  <jas@extundo.com>
14668
14669         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
14670         including some doc fixes.
14671         (base64_encode_alloc): Fix +1 bug on allocation failures.
14672
14673 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14674
14675         * lib/base64.c (base64_encode): Do not read past end of array with
14676         unsanitized input on systems with CHAR_BIT > 8.
14677
14678 2006-03-24  Eric Blake  <ebb9@byu.net>
14679
14680         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
14681
14682 2006-03-22  Karl Berry  <karl@gnu.org>
14683
14684         * config/srclist.txt (*setenv.[ch]): get from coreutils.
14685         * config/srclistvars.sh (COREUTILS): new var.
14686
14687 2006-03-17  Jim Meyering  <jim@meyering.net>
14688
14689         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
14690         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
14691
14692 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
14693
14694         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
14695         no longer needs it.  Instead, check that regoff_t is as least
14696         as wide as ptrdiff_t.
14697
14698         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
14699         so that our regex.h stays compatible with the installed regex.
14700         This is helpful for installers who configure --without-included-regex.
14701         Problem reported by Emanuele Giaquinta.
14702
14703 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
14704
14705         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
14706         Typedef to long int, not to off_, as POSIX will likely change
14707         in that direction.
14708
14709 2006-03-15  Eric Blake  <ebb9@byu.net>
14710
14711         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
14712
14713 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
14714
14715         * lib/argp-help.c (validate_uparams): Fix typo
14716         * lib/argp-parse.c (argp_default_options): Consistently begin help
14717         messages with a lowercase letter.
14718
14719 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
14720
14721         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
14722         overrun buffers and shouldn't be used (much as gets shouldn't be
14723         used).
14724         * lib/time_r.c (asctime_r, ctime_r): Likewise.
14725
14726 2006-03-08  Simon Josefsson  <jas@extundo.com>
14727
14728         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
14729         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
14730
14731 2006-03-08  Simon Josefsson  <jas@extundo.com>
14732
14733         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
14734         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
14735
14736 2006-03-08  Simon Josefsson  <jas@extundo.com>
14737
14738         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
14739         signal that configure disabled the device.
14740
14741 2006-03-08  Simon Josefsson  <jas@extundo.com>
14742
14743         * build-aux/maint.mk: Fix refresh-po, to handle no translated
14744         languages.
14745
14746 2006-03-07  Simon Josefsson  <jas@extundo.com>
14747
14748         * modules/getopt (Depends-on): Add unistd.
14749
14750         * modules/unistd: New file.
14751
14752 2006-03-07  Simon Josefsson  <jas@extundo.com>
14753
14754         * modules/gc-random: New file.
14755
14756 2006-03-07  Simon Josefsson  <jas@extundo.com>
14757
14758         * m4/unistd_h.m4: New file.
14759
14760 2006-03-07  Simon Josefsson  <jas@extundo.com>
14761
14762         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
14763         test to be side-effect free by storing the result in the cache
14764         variable gl_cv_lib_readline, and moving the assignment of
14765         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
14766         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
14767
14768 2006-03-07  Simon Josefsson  <jas@extundo.com>
14769
14770         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
14771         error on missing devices (the functions will return an error).
14772
14773         * m4/gc.m4: Move random stuff to gc-random.m4
14774
14775 2006-03-07  Simon Josefsson  <jas@extundo.com>
14776
14777         * lib/unistd_.h: New file.
14778
14779 2006-03-07  Simon Josefsson  <jas@extundo.com>
14780
14781         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
14782
14783 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
14784
14785         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
14786         Problem reported by Juan Manuel Guerrero.
14787
14788 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
14789
14790         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
14791         the unistd module.
14792         * lib/getlogin_r.c: Likewise.
14793         * lib/getlogin_r.h: Likewise.
14794         * lib/glob.c: Likewise.
14795         * lib/pagealign_alloc.c: Likewise.
14796         * lib/unistd_.h: Remove; no longer needed.
14797
14798 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
14799
14800         * MODULES.html.sh (Support for systems lacking POSIX:2001):
14801         Add unistd.
14802         * modules/c-stack (Depends-on): Add unistd.
14803         * modules/getlogin_r: Likewise.
14804         * modules/glob: Likewise.
14805         * modules/pagealign_alloc: Likewise.
14806         * modules/unistd (Files): Remove lib/unistd_.h.
14807         (EXTRA_DIST): Remove.
14808         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
14809         need unistd_.h.
14810         (MOSTLYCLEANFILES): Remove unistd.h-t.
14811
14812 2006-03-03  Simon Josefsson  <jas@extundo.com>
14813
14814         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
14815
14816 2006-03-03  Simon Josefsson  <jas@extundo.com>
14817
14818         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
14819         libidn and bison.
14820
14821 2006-03-03  Simon Josefsson  <jas@extundo.com>
14822
14823         * build-aux/maint.mk: Add indent target.
14824
14825 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
14826
14827         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
14828         our replacement poll.h in any case, to avoid a differing
14829         declaration from a system header.  Seen on AIX.
14830
14831 2006-03-01  Simon Josefsson  <jas@extundo.com>
14832
14833         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
14834         <kasal@ucw.cz>.
14835
14836 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14837
14838         * modules/gettime (Depends-on): Add extensions module.
14839         * modules/nanosleep (Depends-on): Likewise.
14840         * modules/settime (Depends-on): Likewise.
14841
14842 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14843
14844         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
14845         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
14846         pedantically.
14847         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
14848         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
14849
14850         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
14851         not "==".  Reported by Ralf Wildenhues.
14852
14853 2006-03-01  Karl Berry  <karl@gnu.org>
14854
14855         * doc/Copyright/request-*: new files, synced from gnuorg.
14856
14857 2006-03-01  Karl Berry  <karl@gnu.org>
14858
14859         * config/srclist.txt (Copyright/*): new entries.
14860
14861 2006-02-28  Simon Josefsson  <jas@extundo.com>
14862
14863         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
14864
14865 2006-02-27  Simon Josefsson  <jas@extundo.com>
14866
14867         * lib/base64.h: Indent #define's.  From Jim Meyering
14868         <jim@meyering.net>.
14869
14870 2006-02-27  Jim Meyering  <jim@meyering.net>
14871
14872         Revert the change of 2006-02-24, so these files can continue
14873         to be sync'd from gettext.
14874         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
14875         of `config.h'.
14876
14877 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
14878
14879         * modules/intprops: New file.
14880         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
14881         Add intprops.
14882         * modules/getloadavg (Files): Remove lib/intprops.h.
14883         (Depends-on): Add intprops.
14884         * modules/human: Likewise.
14885         * modules/inttostr: Likewise.
14886         * modules/openat: Likewise.
14887         * modules/sig2str: Likewise.
14888         * modules/userspec: Likewise.
14889         * modules/utimecmp: Likewise.
14890         * modules/xnanosleep: Likewise.
14891         * modules/xstrtol: Likewise.
14892
14893 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
14894
14895         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
14896         * modules/lock-tests (TESTS): Use $(EXEEXT).
14897         * modules/tls-tests: Likewise.
14898         * modules/argp-tests: Likewise.
14899         (check_PROGRAMS): New var, replacing...
14900         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
14901
14902 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14903
14904         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
14905         `config.h'.
14906
14907 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
14908
14909         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
14910
14911 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14912
14913         Sync from coreutils.
14914         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
14915         gl_CHDIR_SAFER.
14916
14917 2006-02-22  Jim Meyering  <jim@meyering.net>
14918
14919         Sync from coreutils.
14920         * m4/chdir-safer.m4: New file.
14921
14922 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
14923
14924         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
14925         AT_FDCWD exceeds INT_MAX.
14926         * lib/openat.h (AT_FDCWD): Likewise.
14927
14928 2006-02-17  Eric Blake  <address@hidden>
14929
14930         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
14931
14932 2006-02-16  Simon Josefsson  <jas@extundo.com>
14933
14934         * modules/getaddrinfo (Depends-on): Add sys_socket.
14935
14936 2006-02-15  Simon Josefsson  <jas@extundo.com>
14937
14938         * build-aux/maint.mk: Add dsyntax-check rule.
14939
14940 2006-02-15  Eric Blake  <ebb9@byu.net>
14941
14942         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
14943         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
14944         'present but cannot compile' warnings on cygwin.
14945         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
14946         use ws2tcpip.h if sys/socket.h works.
14947         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
14948         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
14949
14950 2006-02-14  Simon Josefsson  <jas@extundo.com>
14951
14952         * modules/maintainer-makefile (Files): Rename.
14953
14954         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
14955         and (the local) Makefile.cfg to maint-cfg.mk.
14956
14957         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
14958         to the latter.
14959
14960         * modules/maintainer-makefile: New module.
14961
14962         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
14963         severaly stripped to make it possible to build it up from scratch
14964         with reliable tests.
14965
14966         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
14967         fixes to permit overriding the default actions when configure and
14968         makefile are not available.
14969
14970 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
14971
14972         Sync from coreutils.
14973         * modules/lstat (Depends-on): Don't depend on xalloc.
14974         (License): Change from GPL to LGPL, since this is now simply a
14975         replacement for a libc function.
14976
14977 2006-02-14  Jim Meyering  <jim@meyering.net>
14978
14979         Sync from coreutils.
14980
14981         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
14982         failure on deficient systems, and simplify gnulib lgpl dependencies.
14983         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
14984         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
14985
14986         * lib/xalloc-die.c: Remove unused definition of N_.
14987
14988 2006-02-14  Jim Meyering  <jim@meyering.net>
14989
14990         Sync from coreutils.
14991         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
14992         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
14993         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
14994         double-quote uses of that variable, to accommodate the rare case in
14995         which getmntent is available in none of the libraries checked.  This
14996         happens at least on FreeBSD 5.0.
14997
14998 2006-02-13  Simon Josefsson  <jas@extundo.com>
14999
15000         * gnulib-tool (Usage): Fix --import, from
15001         karl@freefriends.org (Karl Berry).
15002
15003 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
15004
15005         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
15006
15007 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
15008
15009         * lib/argp-namefrob.h: Restore changes accidentally lost during the
15010         "autoupdate" on 2005-12-12.
15011
15012 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
15013
15014         * modules/closeout (Depends-on): Remove atexit.
15015
15016 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
15017
15018         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
15019         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
15020
15021 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
15022
15023         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
15024         __EXTENSIONS__ if this causes compilation to fail.  Problem
15025         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
15026         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
15027
15028 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
15029
15030         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
15031         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
15032         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
15033         All uses changed.
15034
15035 2006-01-26  Simon Josefsson  <jas@extundo.com>
15036
15037         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
15038         prototype is visible on mingw32.
15039
15040         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
15041         for mingw32.
15042
15043         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
15044         mingw32).
15045
15046 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
15047
15048         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
15049         attempt to open for write; this always fails, at least on POSIX
15050         hosts.  This reinstates the 2006-01-09 change, which was
15051         inadvertently removed.
15052
15053 2006-01-26  Bruno Haible  <bruno@clisp.org>
15054
15055         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
15056         Reported by Paul Eggert.
15057
15058 2006-01-26  Bruno Haible  <bruno@clisp.org>
15059             Paul Eggert  <eggert@cs.ucla.edu>
15060
15061         * lib/stdbool_.h (_Bool)
15062         [(! (defined __cplusplus || defined __BEOS__)
15063           && !defined __GNUC__
15064           && !(defined __HP_cc || defined __xlc__
15065                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
15066                || defined __sgi))]:
15067         #define to signed char in these cases too; this simplifies
15068         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
15069         etc., separately) and makes it more conservative.
15070
15071 2006-01-25  Simon Josefsson  <jas@extundo.com>
15072
15073         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
15074         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
15075         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
15076
15077 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
15078
15079         * lib/argp-namefrob.h: Bugfix. Remove stray #
15080
15081 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
15082
15083         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
15084         so that we test the test.
15085         Check for yet another HP-UX cc bug involving *bool |= bool.
15086
15087 2006-01-25  Karl Berry  <karl@gnu.org>
15088
15089         * config/srclist.txt (vasnprintf.c): sync lost.
15090
15091 2006-01-25  Jim Meyering  <jim@meyering.net>
15092
15093         Sync from the stable (b5) branch of coreutils:
15094
15095         * lib/fts.c (fts_children): Don't let close() clobber errno from
15096         failed fchdir().
15097
15098         * lib/fts.c (fts_stat): When following a symlink-to-directory,
15099         don't necessarily interpret stat-fails+lstat-succeeds as indicating
15100         a dangling symlink.  That can also happen at least for ELOOP.
15101         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
15102         FYI, this bug predates the inclusion of fts.c in coreutils.
15103
15104         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
15105         in their own block, so pre-c99 compilers don't object.
15106
15107         Avoid the double-free (first in fts_read, second in fts_close) that
15108         would occur when an `active' directory is made inaccessible (e.g.,
15109         via chmod a-x) during a traversal.
15110         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
15111         before returning.  Reproduce this failure by
15112         mkdir -p a/b; cd a; chmod a-x . b
15113         Reported by Stavros Passas.
15114
15115 2006-01-25  Jim Meyering  <jim@meyering.net>
15116
15117         * lib/fileblocks.c: Remove more useless parentheses.
15118         * lib/readutmp.h: Likewise.
15119
15120 2006-01-25  Bruno Haible  <bruno@clisp.org>
15121
15122         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
15123         warnings.
15124         Reported by Paul Eggert.
15125
15126 2006-01-25  Bruno Haible  <bruno@clisp.org>
15127
15128         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
15129         rid of a trap command. For Solaris sh.
15130         Reported by Mark D. Baushke <mdb@gnu.org>.
15131
15132 2006-01-24  Simon Josefsson  <jas@extundo.com>
15133
15134         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
15135         Bruno.
15136
15137 2006-01-24  Karl Berry  <karl@gnu.org>
15138
15139         * config/srclist.txt (argp-namefrob.h): sync lost.
15140
15141 2006-01-24  Jim Meyering  <jim@meyering.net>
15142
15143         * modules/openat (Files): Add lib/intprops.h.
15144         From Mark D. Baushke.
15145
15146 2006-01-24  Jim Meyering  <jim@meyering.net>
15147
15148         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
15149         Reported by Mark D. Baushke.
15150
15151 2006-01-24  Jim Meyering  <jim@meyering.net>
15152
15153         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
15154
15155 2006-01-24  Bruno Haible  <bruno@clisp.org>
15156
15157         * modules/strnlen (Maintainer): Change from glibc to all.
15158
15159 2006-01-24  Bruno Haible  <bruno@clisp.org>
15160
15161         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
15162         Patch by Paul Eggert.
15163
15164 2006-01-24  Bruno Haible  <bruno@clisp.org>
15165
15166         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
15167         already has it.
15168         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
15169         2005-11-26.
15170
15171         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
15172         'signed char' to avoid problems with the built-in _Bool type.
15173         Reported by Paul Eggert on 2005-11-26.
15174
15175 2006-01-24  Bruno Haible  <bruno@clisp.org>
15176
15177         * gnulib-tool (func_import): Avoid constructing complicated sed
15178         expressions inside backquote.
15179         Report and solution by Mark D. Baushke <mdb@gnu.org>.
15180
15181 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
15182
15183         These changes imported from libc.
15184         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
15185         test and two separate function calls.
15186         * lib/strndup.c (__strndup): Add libc_hidden_def.
15187
15188 2006-01-23  Simon Josefsson  <jas@extundo.com>
15189
15190         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
15191         Remove the test_*_SOURCES variable: automake infers it by default.
15192         * modules/tls-tests: Likewise.
15193
15194 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
15195
15196         Work around porting bugs reported by Dieter in
15197         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
15198         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
15199         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
15200         Include "getopt.h" first, to check interface.
15201         (getenv): Declare only if defined HAVE_DECL_GETENV &&
15202         !HAVE_DECL_GETENV.
15203         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
15204         (__strndup): Revert to K&R-style function dfns, the glibc style.
15205         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
15206         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
15207         Include strnlen.h first, to get prototype properly.
15208         (strnlen): Renamed from __strnlen.
15209         Remove weak alias.
15210
15211 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
15212
15213         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
15214
15215 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
15216
15217         * config/srclist.txt: Adjust to reflect glibc reorganization.
15218         This affects only comments.
15219
15220 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
15221
15222          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
15223          Reported by Bruce Korb <bkorb@gnu.org>.
15224
15225 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
15226
15227         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
15228         to pacify gcc -Wswitch-default.
15229
15230 2006-01-22  Bruno Haible  <bruno@clisp.org>
15231
15232         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
15233         temporary buffer for sprintf, take into account the precision also
15234         for 'd', 'i', 'u', 'o', 'x', 'X'.
15235
15236 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
15237
15238         * modules/argp-tests: New module
15239         * tests/test-argp.c: New file
15240         * tests/test-argp-2.sh: New file
15241
15242 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
15243
15244         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
15245         (__argp_base_name): Removed
15246         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
15247         typo.
15248         (__argp_base_name): Provide macro definition or extern declaration
15249         depending on the configuration
15250
15251 2006-01-20  Simon Josefsson  <jas@extundo.com>
15252
15253         * modules/inet_ntop (Depends-on): Depend on sys_socket.
15254
15255 2006-01-20  Simon Josefsson  <jas@extundo.com>
15256
15257         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
15258
15259 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15260
15261         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
15262         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
15263         Suggested by Bruno Haible.
15264
15265 2006-01-20  Karl Berry  <karl@gnu.org>
15266
15267         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
15268         until changes propagate, I guess.
15269
15270 2006-01-19  Simon Josefsson  <jas@extundo.com>
15271
15272         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
15273
15274 2006-01-19  Simon Josefsson  <jas@extundo.com>
15275
15276         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
15277
15278 2006-01-19  Simon Josefsson  <jas@extundo.com>
15279
15280         * gnulib-tool: Set check_PROGRAMS.
15281
15282         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
15283         modules/des-tests, modules/gc-arcfour-tests,
15284         modules/gc-arctwo-tests, modules/gc-des-tests,
15285         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
15286         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
15287         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
15288         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
15289         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
15290         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
15291         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
15292         test_*_SOURCES.
15293
15294 2006-01-18  Simon Josefsson  <jas@extundo.com>
15295
15296         * modules/socklen (Depends-on): Depend on sys_socket.
15297
15298 2006-01-18  Simon Josefsson  <jas@extundo.com>
15299
15300         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
15301         modules/des-tests, modules/gc-arcfour-tests,
15302         modules/gc-arctwo-tests, modules/gc-des-tests,
15303         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
15304         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
15305         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
15306         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
15307         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
15308         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
15309         $(EXEEXT) to automake TESTS variable, for mingw32.
15310
15311 2006-01-17  Simon Josefsson  <jas@extundo.com>
15312
15313         * modules/socklen (Include): Need sys/socket.h.
15314
15315 2006-01-17  Bruno Haible  <bruno@clisp.org>
15316
15317         * modules/ssize_t (Include): Add <sys/types.h>.
15318
15319 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
15320
15321         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
15322         it's not portable and it doesn't work with cross-compiles.
15323         Problem reported by Bruno Haible.  Fix missing-$ typo in
15324         'test "gl_cv_ignore_unused_libraries" ...' that prevented
15325         -zignore from being used with Sun's C compiler.
15326
15327 2006-01-12  Simon Josefsson  <jas@extundo.com>
15328
15329         * lib/base64.c: Fix warning, reported by Bruno Haible
15330         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
15331
15332 2006-01-12  Bruno Haible  <bruno@clisp.org>
15333
15334         * modules/ldd: New file.
15335         * build-aux/ldd.sh.in: New file.
15336         * MODULES.html.sh (Support for building libraries and executables): Add
15337         ldd.
15338
15339 2006-01-12  Bruno Haible  <bruno@clisp.org>
15340
15341         * m4/ldd.m4: New file.
15342
15343 2006-01-12  Bruno Haible  <bruno@clisp.org>
15344
15345         * gnulib-tool (func_import, func_create_testdir): Don't go into an
15346         endless loop while replacing $auxdir with build-aux.
15347
15348 2006-01-11  Simon Josefsson  <jas@extundo.com>
15349
15350         * lib/stdint_.h (SIZE_MAX): Add missing (.
15351
15352 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
15353
15354         Sync from coreutils.
15355         * lib/md5.c: Fix commentary typos.
15356         (alignof, UNALIGNED_P): No need for a GCC-specific version.
15357         * lib/md5.h (__attribute__): Remove; unused.
15358         * lib/sha1.c: Fix commentary to match md5 better.
15359         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
15360         so that we don't need to worry about alignment.  All uses changed.
15361         This merges the 2005-10-28 md5 change into sha1.
15362
15363 2006-01-11  Jim Meyering  <jim@meyering.net>
15364
15365         Sync from coreutils.
15366         * lib/md5.c (OP): Fix spacing.
15367
15368 2006-01-11  Bruno Haible  <bruno@clisp.org>
15369
15370         Ensure automatic ordering between gl_LOCK and gl_ARGP.
15371         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
15372         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
15373
15374 2006-01-11  Bruno Haible  <bruno@clisp.org>
15375
15376         Ensure automatic ordering between gl_LOCK and gl_ARGP.
15377         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
15378         the "early" section as well.
15379
15380 2006-01-11  Bruno Haible  <bruno@clisp.org>
15381
15382         Avoid "ar: no archive members specified" error on MacOS X.
15383         * gnulib-tool (func_modules_add_dummy): New function.
15384         (func_import, func_create_testdir): Invoke it.
15385
15386 2006-01-11  Bruno Haible  <bruno@clisp.org>
15387
15388         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
15389         with $auxdir in AC_CONFIG_FILES statements.
15390
15391 2006-01-11  Bruno Haible  <bruno@clisp.org>
15392
15393         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
15394         Initialize also noinst_HEADERS to empty.
15395
15396 2006-01-11  Bruno Haible  <bruno@clisp.org>
15397
15398         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
15399         variables.
15400         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
15401         autoreconf.
15402
15403 2006-01-11  Bruno Haible  <bruno@clisp.org>
15404
15405         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
15406         overridable by the user.
15407         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15408
15409 2006-01-10  Simon Josefsson  <jas@extundo.com>
15410
15411         * modules/sys_socket: New file.
15412
15413 2006-01-10  Simon Josefsson  <jas@extundo.com>
15414
15415         * m4/sys_socket_h.m4: New file.
15416
15417 2006-01-10  Simon Josefsson  <jas@extundo.com>
15418
15419         * lib/socket_.h: New file.
15420
15421 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
15422
15423         * modules/readutmp (Maintainer): Add myself.
15424
15425 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
15426
15427         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
15428         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
15429         People who are still concerned with buggy memcmp implementations
15430         can invoke gl_FUNC_MEMCMP themselves.
15431
15432 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
15433
15434         * lib/regex_internal.h (BITSET_WORD_BITS):
15435         Work around a bug in 64-bit PGC (before version 6.1-2), where the
15436         preprocessor mishandles large unsigned values as if they were signed.
15437         Problem reported by Claudio Fontana in
15438         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
15439
15440 2006-01-10  Jim Meyering  <jim@meyering.net>
15441
15442         Avoid the double-free (first in fts_read, second in fts_close) that
15443         would occur when an `active' directory is made inaccessible (e.g.,
15444         via chmod a-x) during a traversal.
15445         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
15446         before returning.  Reproduce this failure by
15447         mkdir -p a/b; cd a; chmod a-x . b
15448         Reported by Stavros Passas.
15449
15450         Sync from coreutils.
15451         * lib/sha1.c: Tweak grammar in a comment.
15452
15453 2006-01-10  Jim Meyering  <jim@meyering.net>
15454
15455         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
15456         Patch by Joerg Sonnenberger.
15457
15458 2006-01-10  Bruno Haible  <bruno@clisp.org>
15459
15460         * modules/readutmp: Depend on module free.
15461         * modules/strtok_r: Depend on module restrict.
15462
15463 2006-01-10  Bruno Haible  <bruno@clisp.org>
15464
15465         * modules/gettext (configure.ac): Add an invocation of
15466         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
15467
15468 2006-01-10  Bruno Haible  <bruno@clisp.org>
15469
15470         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
15471         Reported by Werner Lemberg <wl@gnu.org>.
15472
15473 2006-01-10  Bruno Haible  <bruno@clisp.org>
15474
15475         * lib/localcharset.c: Update from GNU gettext.
15476
15477 2006-01-10  Bruno Haible  <bruno@clisp.org>
15478
15479         * lib/argp.h (__const): Remove macro. Use const instead.
15480         * lib/argp-fmtstream.h (__const): Likewise.
15481         * lib/glob_.h (__const): Remove macro.
15482         * lib/glob-libc.h: Use const instead of __const.
15483
15484 2006-01-10  Bruno Haible  <bruno@clisp.org>
15485
15486         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
15487         variable.
15488         Needed to avoid an automake error regarding the 'gettext' module.
15489
15490 2006-01-09  Simon Josefsson  <jas@extundo.com>
15491
15492         * modules/inet_ntop (Depends-on): Add restrict.
15493
15494 2006-01-09  Simon Josefsson  <jas@extundo.com>
15495
15496         * modules/gc-rijndael-tests (License): Put under LGPL.
15497
15498         * modules/gc-des-tests (License): Likewise.
15499
15500         * modules/gc-arcfour-tests (License): Likewise.
15501
15502         * modules/gc-arctwo-tests (License): Likewise.
15503
15504         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
15505
15506         * modules/gc-hmac-sha1-tests (Files): Likewise.
15507
15508         * modules/gc-hmac-md5-tests (License): Likewise.
15509
15510         * modules/gc-sha1-tests (License): Likewise.
15511
15512         * modules/gc-md5-tests (License): Likewise.
15513
15514         * modules/gc-md4-tests (License): Likewise.
15515
15516         * modules/gc-md2-tests (License): Likewise.
15517
15518         * modules/gc-tests (License): Likewise.
15519
15520         * modules/des-tests (License): Likewise.
15521
15522         * modules/md4-tests (License): Likewise.
15523
15524         * modules/md2-tests (License): Likewise.
15525
15526 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
15527
15528         Sync from coreutils:
15529
15530         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
15531         * modules/lib-ignore: New file.
15532         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
15533         chdir-safer.m4, lchmod.m4.
15534         * modules/openat: Add mkdirat.c, openat-priv.h.
15535
15536 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
15537
15538         Sync from coreutils.
15539         * m4/lib-ignore.m4: New file.
15540         * m4/lchmod.m4: New file.
15541
15542 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
15543
15544         Sync from coreutils.
15545         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
15546         for write access: POSIX says that must fail.
15547         * lib/fts.c (diropen): Likewise.
15548         * lib/save-cwd.c (save_cwd): Likewise.
15549         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
15550         well, for minor improvements on hosts that lack O_DIRECTORY.
15551         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
15552         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
15553         Fall back on chown if open failed with EACCES.
15554
15555         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
15556         Report an error at compile-time if only a 1-second nominal clock
15557         resolution is found.
15558
15559         * lib/lchmod.h: New file.
15560         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
15561         (make_dir_parents): Use lchown rather than chown, and
15562         lchmod rather than chmod.
15563
15564         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
15565         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
15566         "proc" reported by n0dalus.
15567
15568         * lib/mountlist.c: Include <limits.h>.
15569         (dev_from_mount_options)
15570         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
15571         New function.  It no longer assumes "dev=" has the System V meaning
15572         on Linux (since it doesn't).  It also parses "dev=" more carefully.
15573         (read_file_system_list)
15574         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
15575         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
15576         dev= in that case.
15577
15578         * lib/posixtm.h (PDS_PRE_2000): New macro.
15579         * lib/posixtm.c (year): Arg is now syntax_bits rather than
15580         allow_century.  All usages changed.  Reject dates outside the range
15581         1969-1999 if PDS_PRE_2000 is used.
15582
15583 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
15584
15585         Sync from coreutils.
15586         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
15587         (Time of day items): Mention the possibility of leap seconds.
15588         Problem reported by Dr. David Alan Gilbert.
15589
15590 2006-01-09  Jim Meyering  <jim@meyering.net>
15591
15592         Sync from coreutils.
15593
15594         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
15595
15596         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
15597
15598         * lib/modechange.c (mode_compile): Reject an invalid mode string
15599         that starts with an octal digit.  From Andreas Gruenbacher.
15600
15601         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
15602         and dup to open_safer and dup_safer, respectively.
15603         (openat_permissive): Fix typo in comment.
15604
15605         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
15606         "gettext.h"; either no longer needed or are guaranteed by openat.h.
15607         (_): Remove; no longer needed.
15608         (openat): Renamed from rpl_openat; no need for rpl_openat
15609         since openat.h renames openat for us.
15610         Replace most of the body with a call to openat_permissive,
15611         to avoid duplicate code.
15612         Port to (probably hypothetical) environments were mode_t is
15613         wider than int.
15614         (openat_permissive): Require mode arg, so that we can check
15615         types better.  Put it just after flags.  Change cwd failure
15616         indicator from pointer-to-bool to pointer-to-errno-value.
15617         All callers changed.
15618         Invoke openat_save_fail and/or openat_restore_fail if
15619         cwd_errno is null, so that openat can call us.
15620         (openat_permissive, fdopendir, fstatat, unlinkat):
15621         Simplify errno handling to avoid some duplicate code,
15622         as it's OK to set errno on success.
15623         * lib/openat.h: Revamp code so that function macros depend on
15624         __OPENAT_PREFIX only, not also on AT_FDCWD.
15625         (openat_ro): Remove.  Caller changed to use openat_permissive.
15626         (openat_permissive): Now a macro, if not a function.
15627         (openat_restore_fail, openat_save_fail): Now always functions,
15628         since mkdirat needs them even if __OPENAT_PREFIX is defined.
15629
15630         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
15631         and openat.c.
15632         * lib/mkdirat.c: Include openat-priv.h.
15633         Remove definitions of macros defined therein.
15634         * lib/openat.c: Likewise.
15635
15636         * lib/mkdirat.c (mkdirat): New file and function.
15637         * lib/openat.h (mkdirat): Declare.
15638
15639         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
15640
15641         * lib/openat.h (openat_permissive): Declare.
15642         (openat_ro): Define.
15643
15644         * lib/openat.c (EXPECTED_ERRNO): New macro.
15645         (openat_permissive): New function -- used in remove.c rewrite.
15646         (all functions): Set errno just before returning, only if there
15647         was an actual failure.
15648         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
15649
15650         Emulate openat-family functions using Linux's procfs, if possible.
15651         Idea and some code based on Ulrich Drepper's glibc changes.
15652
15653         * lib/openat.c: (BUILD_PROC_NAME): New macro.
15654         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
15655         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
15656         before falling back on save_cwd and restore_cwd.
15657         (fdopendir, fstatat, unlinkat): Likewise.
15658
15659         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
15660         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
15661
15662         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
15663         as second argument to va_arg.  Otherwise, some versions of gcc
15664         warn that `if this code is reached, the program will abort'.
15665
15666 2006-01-09  Jim Meyering  <jim@meyering.net>
15667
15668         Sync from coreutils.
15669         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
15670         Require openat-priv.h.
15671
15672 2006-01-09  Bruno Haible  <bruno@clisp.org>
15673
15674         * modules/strnlen (Include): Use strnlen.h.
15675
15676 2006-01-09  Bruno Haible  <bruno@clisp.org>
15677
15678         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
15679
15680 2006-01-09  Bruno Haible  <bruno@clisp.org>
15681
15682         * lib/sysexit_.h (EX_OK): New macro.
15683         Suggested by Martin Lambers <marlam@marlam.de>.
15684
15685 2006-01-09  Bruno Haible  <bruno@clisp.org>
15686
15687         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
15688         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
15689
15690 2006-01-09  Bruno Haible  <bruno@clisp.org>
15691
15692         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
15693         numbers.
15694
15695 2006-01-09  Bruno Haible  <bruno@clisp.org>
15696
15697         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
15698         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
15699         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
15700         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
15701
15702 2006-01-09  Bruno Haible  <bruno@clisp.org>
15703
15704         * build-aux/javacomp.sh.in: New file, moved from lib/.
15705         * modules/javacomp-script (Files): Update.
15706         (configure.ac): Add AC_CONFIG_FILES invocation.
15707         (EXTRA_DIST): Remove variable.
15708
15709         * build-aux/javaexec.sh.in: New file, moved from lib/.
15710         * modules/javaexec (Files): Update.
15711         (configure.ac): Add AC_CONFIG_FILES invocation.
15712         (EXTRA_DIST): Remove javaexec.sh.in.
15713
15714         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
15715         * modules/csharpcomp-script (Files): Update.
15716         (configure.ac): Add AC_CONFIG_FILES invocation.
15717         (EXTRA_DIST): Remove variable.
15718
15719         * build-aux/csharpexec.sh.in: New file, moved from lib/.
15720         * modules/csharpexec (Files): Update.
15721         (configure.ac): Add AC_CONFIG_FILES invocation.
15722         (EXTRA_DIST): Remove csharpexec.sh.in.
15723
15724 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
15725
15726         Sync from coreutils.
15727
15728         Add POSIX ACL support
15729         * lib/acl.h (copy_acl, set_acl): Add declarations.
15730         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
15731         systems other than Linux.
15732         (chmod_or_fchmod): New function: use fchmod when possible,
15733         and chmod otherwise.
15734         (file_has_acl): Add a POSIX ACL implementation, with a
15735         Linux-specific subcase.
15736         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
15737         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
15738         acls are unsupported.
15739         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
15740         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
15741         are unsupported.
15742
15743 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
15744
15745         Sync from coreutils.
15746         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
15747
15748 2006-01-07  Bruno Haible  <bruno@clisp.org>
15749
15750         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
15751         gl_EARLY.
15752
15753 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
15754
15755         * lib/strftime.c (tzname): Don't declare if it is already #defined.
15756         Problem reported for Mingw by Mark Junker.
15757
15758 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
15759
15760         * README: Gnulib normally doesn't generate a tarball.
15761
15762 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
15763
15764         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
15765         long int, not int, for nanosecond counts, so that people who are
15766         used to POSIX struct timespec won't be surprised.  Reported by Jim
15767         Meyering.
15768
15769 2005-12-28  Bruno Haible  <bruno@clisp.org>
15770
15771         * build-aux/config.rpath: Update from GNU gettext.
15772
15773 2005-12-16  Jim Meyering  <jim@meyering.net>
15774
15775         * modules/fprintftime: New module.
15776         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
15777
15778 2005-12-16  Jim Meyering  <jim@meyering.net>
15779
15780         * m4/fprintftime.m4: New file.
15781
15782 2005-12-16  Jim Meyering  <jim@meyering.net>
15783
15784         * lib/fprintftime.c, lib/fprintftime.h: New files.
15785
15786 2005-12-15  Simon Josefsson  <jas@extundo.com>
15787
15788         * modules/socklen (configure.ac): Fix M4 macro name, to align with
15789         new m4/socklen.m4.
15790
15791 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
15792
15793         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
15794         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
15795
15796 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
15797
15798         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
15799         * lib/argp-help.c (fill_in_uparams): Check if the constructed
15800         struct uparams is valid. Fall back to the default values if it is
15801         not.
15802
15803 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
15804
15805         * modules/argp (Files): Add argp-pin.c
15806         (Depends-on): dirname
15807         (lib_SOURCES): Add argp-pin.c
15808
15809 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
15810
15811         * m4/argp.m4:  Check if program_invocation_name and
15812         program_invocation_short_name are declared and define appropriate
15813         macros if they are not.
15814
15815 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
15816
15817         * lib/argp-help.c (__argp_base_name): New function
15818         (__argp_short_program_name): Rewrite using __argp_base_name
15819         * lib/argp-namefrob.h: Define program_invocation_name and
15820         program_invocation_short_name if requested
15821         (__argp_base_name): Add prototype
15822         * lib/argp-parse.c (argp_def): Use gettext wrappers
15823         (argp_default_parser): Use __argp_base_name
15824         * lib/argp-pin.c: New file. Defines program_invocation_name and
15825         program_invocation_short_name on systems that lack them.
15826
15827 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
15828
15829         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
15830         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
15831         porting problem reported by Georg Schwarz in
15832         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
15833
15834 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
15835
15836         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
15837         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
15838         porting problem reported by Georg Schwarz in
15839         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
15840
15841 2005-12-05  Bruno Haible  <bruno@clisp.org>
15842
15843         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
15844         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
15845         Reported by Mark Junker <mjscod@gmx.de>.
15846
15847 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
15848
15849         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
15850         Use implementation from Albert Chin, with some
15851         comments/corrections by Stepan Kasal and myself.
15852
15853 2005-12-02  Bruno Haible  <bruno@clisp.org>
15854
15855         * gnulib-tool (func_import): Accept GPLed build tool modules when
15856         --lgpl is given.
15857         * modules/csharpcomp-script: New file.
15858         * modules/csharpcomp: Depend on it.
15859         * modules/javacomp-script: New file.
15860         * modules/javacomp: Depend on it.
15861         Suggested by Simon Josefsson.
15862
15863 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
15864
15865         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
15866         statement, to work around an HP-UX 10.20 compiler bug reported by
15867         Peter O'Gorman.
15868
15869 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
15870
15871         * modules/savedir (Depends-on): Add openat.
15872
15873 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
15874
15875         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
15876         (uintmax_t) [defined uintmax_t]: Do not declare.
15877         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
15878         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
15879         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
15880         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
15881         sake of portability to weird hosts that C allows (though we don't
15882         know of any practical examples).
15883
15884         * lib/savedir.h (fdsavedir): New decl.
15885         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
15886         contains most of the former guts of savedir.
15887         (savedir): Use savedirstream.
15888         Include "openat.h".
15889
15890 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
15891
15892         * modules/obstack (Files): Add m4/ulonglong.m4.
15893         Problem reported by Davide Angelocola.
15894
15895 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
15896
15897         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
15898         coreutils no longer futzes with rounding modes.
15899
15900 2005-11-14  Jim Meyering  <jim@meyering.net>
15901
15902         * lib/mkstemp-safer.c: Include <config.h>, required for possible
15903         replacement of mkstemp.
15904
15905 2005-11-10  Simon Josefsson  <jas@extundo.com>
15906
15907         * lib/readline.c: Remove EOL.
15908
15909 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15910
15911         * modules/gethrxtime (Depends-on): Add gettime.
15912
15913 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15914
15915         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
15916         or gettimeofday; no longer needed.
15917
15918 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15919
15920         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
15921         time business.
15922         (gethrxtime) [! (HAVE_NANOUPTIME
15923         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
15924         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
15925         our own approximation.
15926
15927 2005-11-08  Eric Blake  <ebb9@byu.net>
15928
15929         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
15930
15931 2005-11-08  Eric Blake  <ebb9@byu.net>
15932
15933         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
15934
15935 2005-11-04  Bruno Haible  <bruno@clisp.org>
15936
15937         * gnulib-tool: Implement --update mode.
15938
15939 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
15940
15941         Fix porting problem reported by Theodoros V. Kalamatianos.
15942         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
15943         Don't assume that futimes failing means we must fail.
15944
15945 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
15946
15947         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
15948         variables to suggest the intended function of the PATH_MAX check.
15949
15950 2005-10-30  Kean Johnston  <jkj@sco.com>
15951
15952         Trivial changes to support SCO systems.
15953         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
15954         as PATH_MAX.
15955         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
15956         where __ptr is null when no I/O is pending.
15957
15958 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15959
15960         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
15961         leave errno alone.  Problem reported by Dmitry V. Levin.
15962
15963 2005-10-28  Simon Josefsson  <jas@extundo.com>
15964
15965         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
15966         Test more.
15967
15968         * tests/test-gc-md2.c, tests/test-md2.c: New files.
15969
15970         * modules/md2, modules/md2-tests: New files.
15971
15972 2005-10-28  Simon Josefsson  <jas@extundo.com>
15973
15974         * m4/inet_ntop.m4: More tests.
15975
15976         * m4/gc-md2.m4, md2.m4: New file.
15977
15978 2005-10-28  Simon Josefsson  <jas@extundo.com>
15979
15980         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
15981         "restrict" keywords, as per POSIX.  Protect the function
15982         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
15983         Don't use K&R prototypes.  Check the sprintf return values.
15984         Re-define EAFNOSUPPORT if not present.  Indent.
15985
15986         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
15987         suggested by Bruno Haible <bruno@clisp.org>.
15988
15989         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
15990
15991         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
15992
15993         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
15994         libgcrypt).
15995
15996         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
15997
15998         * lib/md2.h, lib/md2.c: New files.
15999
16000 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
16001
16002         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
16003         errno alone.  Problem reported by Frederic Jolliton.
16004
16005 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
16006
16007         * modules/verify (License): Change from GPL to LGPL.  This is a
16008         tiny module and there are apparently near-equivalents that are
16009         under the BSD license.
16010
16011 2005-10-24  Simon Josefsson  <jas@extundo.com>
16012
16013         * modules/sha1: Relicense to LGPL.
16014
16015 2005-10-24  Simon Josefsson  <jas@extundo.com>
16016
16017         * lib/md4.h: Shrink buffer size, now that we changed the type.
16018
16019 2005-10-23  Simon Josefsson  <jas@extundo.com>
16020
16021         * gnulib-tool (func_import): Fix --tests-base.
16022
16023 2005-10-22  Simon Josefsson  <jas@extundo.com>
16024
16025         * modules/arcfour (Depends-on): Need stdint.
16026
16027 2005-10-22  Simon Josefsson  <jas@extundo.com>
16028
16029         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
16030         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
16031
16032 2005-10-22  Simon Josefsson  <jas@extundo.com>
16033
16034         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
16035         suggested by Bruno Haible <bruno@clisp.org>.
16036
16037 2005-10-22  Simon Josefsson  <jas@extundo.com>
16038
16039         * lib/crc.h: Include stddef.h, for size_t.
16040
16041 2005-10-22  Simon Josefsson  <jas@extundo.com>
16042
16043         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
16044         arcfour_context struct (simplify test vector testing in GNU
16045         Shishi).
16046
16047 2005-10-21  Simon Josefsson  <jas@extundo.com>
16048
16049         * modules/des, modules/des-tests: New files.
16050
16051         * modules/gc-des, modules/gc-des-tests: New files.
16052
16053         * tests/test-des.c, tests/test-gc-des.c: New file.
16054
16055 2005-10-21  Simon Josefsson  <jas@extundo.com>
16056
16057         * modules/arctwo, modules/arctwo-tests: New files.
16058
16059         * tests/test-arctwo.c: New file.
16060
16061         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
16062
16063         * tests/test-gc-arctwo.c: New file.
16064
16065 2005-10-21  Simon Josefsson  <jas@extundo.com>
16066
16067         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
16068         Bruno Haible <bruno@clisp.org>.
16069
16070         * m4/gc-des.m4: New file.
16071
16072 2005-10-21  Simon Josefsson  <jas@extundo.com>
16073
16074         * m4/arctwo.m4: New file.
16075
16076         * m4/gc-arctwo.m4: New file.
16077
16078 2005-10-21  Simon Josefsson  <jas@extundo.com>
16079
16080         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
16081         block.
16082
16083 2005-10-21  Simon Josefsson  <jas@extundo.com>
16084
16085         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
16086         <bruno@clisp.org>.
16087
16088         * lib/hmac-sha1.c (hmac_sha1): Likewise.
16089
16090         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
16091         Bruno Haible <bruno@clisp.org>.
16092
16093         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
16094         <bruno@clisp.org>.
16095
16096 2005-10-21  Simon Josefsson  <jas@extundo.com>
16097
16098         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
16099
16100 2005-10-21  Simon Josefsson  <jas@extundo.com>
16101
16102         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
16103
16104 2005-10-21  Simon Josefsson  <jas@extundo.com>
16105
16106         * lib/des.h, lib/des.c: New files.
16107
16108         * lib/gc-gnulib.c: Support DES.c
16109
16110 2005-10-21  Simon Josefsson  <jas@extundo.com>
16111
16112         * lib/arctwo.h, lib/arctwo.c: New files.
16113
16114         * lib/gc-gnulib.c: Support ARCTWO.
16115
16116 2005-10-21  Simon Josefsson  <jas@extundo.com>
16117
16118         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
16119         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
16120
16121 2005-10-21  Simon Josefsson  <jas@extundo.com>
16122
16123         * gnulib-tool (func_import, func_create_testdir): Define automake
16124         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
16125         Makefile.am snippet),
16126         suggested by Bruno Haible <bruno@clisp.org>.
16127
16128         * modules/gc (Makefile.am): Use it.
16129
16130 2005-10-21  Bruno Haible  <bruno@clisp.org>
16131
16132         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
16133         patch.
16134
16135 2005-10-19  Simon Josefsson  <jas@extundo.com>
16136
16137         * tests/test-gc-rijndael.c: New file.
16138
16139         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
16140
16141 2005-10-19  Simon Josefsson  <jas@extundo.com>
16142
16143         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
16144         interface too.
16145
16146 2005-10-19  Simon Josefsson  <jas@extundo.com>
16147
16148         * tests/test-gc-arcfour.c: New file.
16149
16150         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
16151
16152 2005-10-19  Simon Josefsson  <jas@extundo.com>
16153
16154         * modules/gc-md4, modules/gc-md4-tests: New file.
16155
16156         * tests/test-gc-md4.c: New file.
16157
16158 2005-10-19  Simon Josefsson  <jas@extundo.com>
16159
16160         * m4/gc-md4.m4: New file.
16161
16162 2005-10-19  Simon Josefsson  <jas@extundo.com>
16163
16164         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
16165         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
16166         <kasal@ucw.cz>.
16167
16168 2005-10-19  Simon Josefsson  <jas@extundo.com>
16169
16170         * m4/gc-arcfour.m4: New file.
16171
16172         * m4/gc-rijndael.m4: New file.
16173
16174 2005-10-19  Simon Josefsson  <jas@extundo.com>
16175
16176         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
16177
16178 2005-10-19  Simon Josefsson  <jas@extundo.com>
16179
16180         * lib/gc-gnulib.c: Support ARCFOUR.
16181
16182 2005-10-19  Simon Josefsson  <jas@extundo.com>
16183
16184         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
16185         support.
16186
16187         * lib/gc.h: Add ECB enum type.
16188
16189         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
16190
16191 2005-10-18  Simon Josefsson  <jas@extundo.com>
16192
16193         * tests/test-md5.c: New file.
16194
16195         * modules/md5-tests: New file.
16196
16197 2005-10-18  Simon Josefsson  <jas@extundo.com>
16198
16199         * tests/test-md4.c: New file.
16200
16201         * modules/md4, modules/md4-tests: New files.
16202
16203 2005-10-18  Simon Josefsson  <jas@extundo.com>
16204
16205         * m4/md4.m4: New file.
16206
16207 2005-10-18  Simon Josefsson  <jas@extundo.com>
16208
16209         * lib/md4.h, lib/md4.c: New files, based on md5.?.
16210
16211 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
16212
16213         * gnulib-tool (func_create_testdir): Omit the second check whether
16214         BUILT_SOURCES in nonempty.
16215
16216 2005-10-17  Simon Josefsson  <jas@extundo.com>
16217
16218         * tests/test-rijndael.c: New file.
16219
16220 2005-10-17  Simon Josefsson  <jas@extundo.com>
16221
16222         * modules/sha1: Depend on stdint instead of md5.
16223
16224         * modules/md5: Depend on stdint, remove uint32_t.
16225
16226 2005-10-17  Simon Josefsson  <jas@extundo.com>
16227
16228         * modules/gc-sha1-tests: New file.
16229
16230         * tests/test-gc-sha1.c: New file.
16231
16232 2005-10-17  Simon Josefsson  <jas@extundo.com>
16233
16234         * m4/md5.m4: Remove call to uint32_t.m4.
16235
16236 2005-10-17  Simon Josefsson  <jas@extundo.com>
16237
16238         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
16239
16240         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
16241         md5.h.
16242
16243         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
16244
16245         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
16246
16247 2005-10-17  Simon Josefsson  <jas@extundo.com>
16248
16249         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
16250
16251 2005-10-17  Simon Josefsson  <jas@extundo.com>
16252
16253         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
16254
16255 2005-10-17  Simon Josefsson  <jas@extundo.com>
16256
16257         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
16258
16259         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
16260
16261 2005-10-17  Bruno Haible  <bruno@clisp.org>
16262
16263         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
16264         that it can also be used in a test.
16265
16266 2005-10-16  Bruno Haible  <bruno@clisp.org>
16267
16268         * gnulib-tool (func_emit_tests_Makefile_am): Also define
16269         TESTS_ENVIRONMENT, so that individual tests can augment it.
16270
16271         * gnulib-tool (func_create_testdir): Use an intermediate target for
16272         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
16273         macros, like $(ALLOCA_H), which cannot be passed through the command
16274         line.
16275
16276 2005-10-15  Simon Josefsson  <jas@extundo.com>
16277
16278         * modules/rijndael-tests: New file.
16279
16280         * modules/rijndael: New file.
16281
16282 2005-10-15  Simon Josefsson  <jas@extundo.com>
16283
16284         * m4/rijndael.m4: New file.
16285
16286 2005-10-15  Simon Josefsson  <jas@extundo.com>
16287
16288         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
16289
16290         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
16291
16292 2005-10-14  Simon Josefsson  <jas@extundo.com>
16293
16294         * tests/test-arcfour.c: New file.
16295
16296         * modules/arcfour, modules/arcfour-tests: New files.
16297
16298 2005-10-14  Simon Josefsson  <jas@extundo.com>
16299
16300         * m4/arcfour.m4: New file.
16301
16302 2005-10-14  Simon Josefsson  <jas@extundo.com>
16303
16304         * lib/arcfour.h, lib/arcfour.c: New files.
16305
16306 2005-10-14  Roland McGrath  <roland@redhat.com>
16307
16308         Import from libc.  [BZ #1331]
16309         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
16310         macro argument.
16311         Reported by Matej Vela <vela@debian.org>.
16312
16313 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
16314
16315         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
16316         include <wchar.h>; no longer needed.
16317
16318 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
16319
16320         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
16321
16322 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
16323         and  Ulrich Drepper  <drepper@redhat.com>
16324
16325         Import from libc.
16326         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
16327         instead of inline stream orientation test and two separate
16328         function calls.  Pay no attention to USE_IN_LIBIO.
16329
16330 2005-10-13  Simon Josefsson  <jas@extundo.com>
16331
16332         * modules/gc-hmac-md5-tests: New file.
16333
16334         * tests/test-gc-hmac-sha1.c: New file.
16335
16336         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
16337
16338         * modules/gc-hmac-md5-tests: New file.
16339
16340         * tests/test-gc-md5.c: New file.
16341
16342         * modules/gc-md5-tests: New file.
16343
16344 2005-10-13  Simon Josefsson  <jas@extundo.com>
16345
16346         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
16347         Move memory allocation outside of loop.
16348
16349 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
16350
16351         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
16352         intermediate directory is in a read-only file system.  Problem
16353         reported by Eric Blake.
16354
16355 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
16356
16357         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
16358
16359 2005-10-12  Simon Josefsson  <jas@extundo.com>
16360
16361         * tests/test-hmac-sha1.c: New file.
16362
16363         * modules/hmac-sha1-tests: New file.
16364
16365         * modules/hmac-sha1: New file.
16366
16367 2005-10-12  Simon Josefsson  <jas@extundo.com>
16368
16369         * modules/gc-sha1: New file.
16370
16371 2005-10-12  Simon Josefsson  <jas@extundo.com>
16372
16373         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
16374
16375         * tests/test-gc-pbkdf2-sha1.c: New file.
16376
16377 2005-10-12  Simon Josefsson  <jas@extundo.com>
16378
16379         * modules/gc-md5, modules/gc-hmac-md5: New files.
16380
16381         * modules/gc (Files): Remove md5, memxor and hmac files.
16382
16383 2005-10-12  Simon Josefsson  <jas@extundo.com>
16384
16385         * m4/gc-pbkdf2-sha1.m4: New file.
16386
16387         * m4/gc-hmac-sha1.m4: New file.
16388
16389         * m4/gc-sha1: New file.
16390
16391         * m4/hmac-sha1.m4: New file.
16392
16393 2005-10-12  Simon Josefsson  <jas@extundo.com>
16394
16395         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
16396
16397         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
16398
16399 2005-10-12  Simon Josefsson  <jas@extundo.com>
16400
16401         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
16402         suggested by Bruno Haible <bruno@clisp.org>.
16403
16404 2005-10-12  Simon Josefsson  <jas@extundo.com>
16405
16406         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
16407
16408 2005-10-12  Simon Josefsson  <jas@extundo.com>
16409
16410         * lib/gc-pbkdf2-sha1.c: New file.
16411
16412         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
16413
16414 2005-10-12  Simon Josefsson  <jas@extundo.com>
16415
16416         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
16417
16418         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
16419
16420 2005-10-12  Simon Josefsson  <jas@extundo.com>
16421
16422         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
16423         GC_USE_HMAC_MD5, respectively.
16424
16425         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
16426         (gc_md5): Fix typo.
16427
16428         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
16429
16430         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
16431
16432         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
16433
16434 2005-10-12  Bruno Haible  <bruno@clisp.org>
16435
16436         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
16437         Reported by Stepan Kasal <kasal@ucw.cz>.
16438
16439 2005-10-11  Simon Josefsson  <jas@extundo.com>
16440
16441         * tests/test-crc.c: New file.
16442
16443         * modules/crc, modules/crc-tests: New files.
16444
16445 2005-10-11  Simon Josefsson  <jas@extundo.com>
16446
16447         * m4/crc.m4: New file.
16448
16449 2005-10-11  Simon Josefsson  <jas@extundo.com>
16450
16451         * lib/gc.h: Add gc_hash and gc_hash_buffer.
16452
16453         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
16454
16455         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
16456
16457 2005-10-11  Simon Josefsson  <jas@extundo.com>
16458
16459         * lib/crc.h, lib/crc.c: New files.
16460
16461         * lib/gc.h (gc_hash_buffer): Add doc.
16462
16463 2005-10-11  Bruno Haible  <bruno@clisp.org>
16464
16465         * modules/c-strcasestr: New file.
16466         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
16467
16468 2005-10-11  Bruno Haible  <bruno@clisp.org>
16469
16470         * modules/c-strcase: New file.
16471         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
16472
16473 2005-10-11  Bruno Haible  <bruno@clisp.org>
16474
16475         * lib/strcasecmp.c: Include limits.h.
16476         (strcasecmp): Avoid integer overflow on exotic platforms.
16477         * lib/strncasecmp.c: Include limits.h.
16478         (strncasecmp): Avoid integer overflow on exotic platforms.
16479         Reported by Paul Eggert.
16480
16481 2005-10-11  Bruno Haible  <bruno@clisp.org>
16482
16483         * lib/c-strcasestr.h: New file, from GNU gettext.
16484         * lib/c-strcasestr.c: New file, from GNU gettext.
16485
16486 2005-10-11  Bruno Haible  <bruno@clisp.org>
16487
16488         * lib/c-strcase.h: New file, from GNU gettext.
16489         * lib/c-strcasecmp.c: New file, from GNU gettext.
16490         * lib/c-strncasecmp.c: New file, from GNU gettext.
16491
16492 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
16493
16494         * modules/mempcpy (License): GPL -> LGPL.
16495         * modules/strchrnul (License): Likewise.
16496         * modules/sysexits (License): Likewise.
16497
16498 2005-10-08  Simon Josefsson  <jas@extundo.com>
16499
16500         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
16501
16502 2005-10-07  Simon Josefsson  <jas@extundo.com>
16503
16504         * m4/memxor.m4: Remove gl_C_RESTRICT call.
16505
16506 2005-10-06  Simon Josefsson  <jas@extundo.com>
16507
16508         * tests/test-hmac-md5.c: New file.
16509
16510         * modules/hmac-md5-tests: New file.
16511
16512         * modules/hmac-md5: New file.
16513
16514 2005-10-06  Simon Josefsson  <jas@extundo.com>
16515
16516         * m4/hmac-md5.m4: New file.
16517
16518         * m4/memxor.m4: Require gl_C_RESTRICT.
16519
16520 2005-10-06  Simon Josefsson  <jas@extundo.com>
16521
16522         * lib/memxor.c (memxor): Avoid casts and warnings.
16523
16524 2005-10-06  Simon Josefsson  <jas@extundo.com>
16525
16526         * lib/hmac-md5.c: New file.
16527
16528         * lib/hmac.h: New file.
16529
16530 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
16531
16532         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
16533         promotes to int, not unsigned int, to catch the AIX 5.3
16534         compiler bug.
16535
16536 2005-10-05  Simon Josefsson  <jas@extundo.com>
16537
16538         * modules/memxor: New file.
16539
16540         * modules/iconv (Files): Move config.rpath to havelib, it is used
16541         there.
16542
16543         * modules/havelib (Files): Add config.rpath.
16544
16545 2005-10-05  Simon Josefsson  <jas@extundo.com>
16546
16547         * m4/memxor.m4: New file.
16548
16549 2005-10-05  Simon Josefsson  <jas@extundo.com>
16550
16551         * lib/memxor.c (memxor): Fix compiler error.
16552
16553         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
16554         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
16555
16556         * lib/memxor.h, lib/memxor.c: New files.
16557
16558         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
16559         we assume all systems have it, suggested by Jim Meyering
16560         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
16561         any systems lack sys/socket.h; mingw32 is known to lack it, but we
16562         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
16563         same reasons.
16564
16565 2005-10-05  Simon Josefsson  <jas@extundo.com>
16566
16567         * config/srclist.txt: Add glibc bug 1423 for md5.h.
16568
16569 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
16570
16571         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
16572         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
16573         needed, since the source code now assumes these .h files.
16574
16575 2005-10-05  Derek Price  <derek@ximbiot.com>
16576
16577         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
16578
16579 2005-10-05  Bruno Haible  <bruno@clisp.org>
16580
16581         * modules/stdint (License): Change to LGPL.
16582
16583 2005-10-04  Simon Josefsson  <jas@extundo.com>
16584
16585         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
16586         D. Baushke" <mdb@gnu.org>.
16587
16588 2005-10-04  Bruno Haible  <bruno@clisp.org>
16589
16590         * lib/verify.h (verify_true): Provide alternative definition for C++.
16591
16592 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
16593
16594         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
16595         (SSIZE_MAX): New macro, if not already defined.
16596         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
16597         than 2 GiB.
16598
16599 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
16600
16601         Sync from coreutils.
16602         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
16603         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
16604         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
16605         ULLONG_MAX doesn't work with 2.7.2.1.
16606
16607 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
16608
16609         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
16610         From Ben Pfaff.
16611
16612         * modules/exclude (Depends-on): Depend on verify.
16613         * modules/strtoimax (Depends-on): Likewise.
16614         * modules/utimecmp (Depends-on): Likewise.
16615
16616 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
16617
16618         * lib/exclude.c: Include verify.h.
16619         (verify): Remove.  All callers changed to use verify.h's version.
16620         * lib/strtoimax.c: Likewise.
16621         * lib/utimecmp.c: Likewis.e
16622
16623         Sync from coreutils.
16624         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
16625         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
16626         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
16627         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
16628         bother returning ENOSYS if settimeofday or stime fails; just let
16629         them return whatever errno they want to return.
16630         * lib/utimens.c: Include unistd.h, for dup2.
16631         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
16632         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
16633
16634 2005-10-02  Jim Meyering  <jim@meyering.net>
16635
16636         Sync from coreutils.
16637         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
16638         from glibc-2.2.5 that fails for read-only files.
16639
16640 2005-10-02  Jim Meyering  <jim@meyering.net>
16641
16642         Sync from coreutils.
16643         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
16644         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
16645         `#if HAVE_CONFIG_H'.
16646         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
16647         Remove AT_FDCWD test.
16648         Do not consume the fd unless successful.
16649         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
16650         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
16651         block, so that we don't even try to compile it if settimeofday is
16652         available.  This works around a compilation failure on OSF1 V5.1,
16653         due to stime requiring a `long int*' while tv_sec is `int'.
16654
16655 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
16656
16657         Sync from coreutils.
16658         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
16659         against `yes', rather than just testing for nonempty.
16660
16661 2005-10-01  Simon Josefsson  <jas@extundo.com>
16662
16663         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
16664         and Darwin.
16665
16666         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
16667         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
16668         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
16669         freeaddrinfo and gai_strerror are declared by the POSIX headers.
16670         Check if struct addrinfo is declared.
16671
16672 2005-10-01  Simon Josefsson  <jas@extundo.com>
16673
16674         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
16675         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
16676         AI_* and EAI_* definitions.  Protect function declarations.
16677
16678 2005-10-01  Jim Meyering  <jim@meyering.net>
16679
16680         Sync from coreutils.
16681
16682         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
16683         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
16684         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
16685         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
16686         in the inet and nsl libraries.  Required on Solaris 5.7.
16687
16688 2005-10-01  Jim Meyering  <jim@meyering.net>
16689
16690         Sync from coreutils.
16691         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
16692         in the inet and nsl libraries.  Required on Solaris 5.7.
16693
16694 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
16695
16696         * lib/getdelim.c (getdelim): Remove unused variables.
16697
16698 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
16699
16700         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
16701         so that the code works even with ancient cpp.  Portability problem
16702         with GCC 2.7.2.1 reported by Thomas M.Ott.
16703
16704 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
16705
16706         * modules/regex (Depends-on): Add strcase.
16707
16708         * modules/gethostname (Licence): Change from GPL to LGPL, since
16709         gethostname.c is a trivial implementation of a standard library
16710         function.
16711         * modules/poll (License): Change from GPL to LGPL, since it's
16712         derived from LGPL code.
16713
16714 2005-09-27  Jim Meyering  <jim@meyering.net>
16715
16716         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
16717         HAVE_CONFIG_H.
16718
16719         * lib/intprops.h (signed_type_or_expr__): Define.
16720         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
16721         for unsigned types.
16722
16723 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
16724
16725         * lib/verify.h (verify_expr): Remove, replacing with:
16726         (verify_true): New macro that returns true instead of void.
16727         (verify_type__): Remove.
16728         (verify): Use verify_true rather than verify_type__.
16729
16730 2005-09-26  Bruno Haible  <bruno@clisp.org>
16731
16732         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
16733         is necessary.
16734         (lib_SOURCES): Remove mbchar.c.
16735         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
16736         (Files): Add m4/mbrtowc.m4.
16737         * modules/mbiter: Likewise.
16738         * modules/mbuiter: Likewise.
16739
16740 2005-09-26  Bruno Haible  <bruno@clisp.org>
16741
16742         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
16743         compile mbchar.c if they are not both present.
16744         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
16745         * m4/mbiter.m4 (gl_MBITER): Likewise.
16746         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
16747         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
16748         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
16749
16750 2005-09-25  Jim Meyering  <jim@meyering.net>
16751
16752         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
16753         also uses socklen_t.
16754
16755 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
16756
16757         * lib/utimens.c (ENOSYS): Define if not already defined.
16758         (futimens): Support having a null PATH if the file descriptor
16759         is nonnegative.
16760
16761         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
16762         Remove.
16763         (__attribute): Define to empty unless GCC 3.1 or later.
16764         This works around a core dump on OpenBSD 3.4, which has GCC
16765         2.95.3, which dumps core when given __attribute__(()).  It also
16766         simplifies other tests, since we really don't want to bother with
16767         worrying about which ancient version of GCC supported what.
16768         Original problem reported by Yoann Vandoorselaere, with part of
16769         the fix suggested by Derek Price.
16770
16771 2005-09-24  Jim Meyering  <jim@meyering.net>
16772
16773         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
16774         so we can once again use a positive bitfield width of 1 -- now we
16775         don't have to explain why we were using a bitfield width of 2.
16776
16777 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
16778
16779         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
16780         and similarly for the other external symbols.  Problem reported
16781         by James Gallager.
16782
16783         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
16784         bug reported by Jim Meyering.
16785
16786         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
16787         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
16788         not needed, since socklen is a prerequisite module.
16789
16790 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
16791
16792         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
16793         Problem reported by Eric Blake.
16794         (getaddrinfo): Initialize se so that it's not garbage.
16795         Redo internal storage allocation so that it doesn't make unportable
16796         assumptions about alignment.
16797         Fix a memory leak.
16798
16799         * lib/utimens.c (futimens): Use futimesat if available.
16800         Prefer it to futimes since it doesn't have the futimes bug.
16801
16802         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
16803         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
16804         Instead, declare a function that returns a pointer to an array,
16805         and use verify_type__ to declare the size of the array.
16806         Problem and germ of a solution reported by Bruno Haible.
16807         (verify_type__): Use 2, not 1, for bitfield size, to avoid
16808         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
16809
16810 2005-09-23  Jim Meyering  <jim@meyering.net>
16811
16812         Sync from coreutils.
16813         Correct build failure (socklen_t not defined) on at least
16814         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
16815         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
16816
16817 2005-09-23  Jim Meyering  <jim@meyering.net>
16818
16819         * modules/getaddrinfo (Depends-on): Add socklen.
16820
16821 2005-09-23  Bruno Haible  <bruno@clisp.org>
16822
16823         * tests/test-verify.c: New file.
16824
16825 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
16826
16827         Sync from coreutils.
16828
16829         * modules/argmatch (Depends-on): Add verify.
16830         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
16831         unistd-safer.
16832         * modules/save-cwd (Depends-on): Likewise.
16833
16834         * modules/openat (Files): Add lib/openat-die.c.
16835         (Depends-on): Remove error, exitfail.
16836         Add dirname.
16837
16838         * modules/verify: New file.
16839         * MODULES.html.sh (Diagnostics <assert.h>): New section,
16840         with "verify" module.
16841
16842 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
16843
16844         Sync from coreutils.
16845
16846         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
16847         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
16848         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
16849         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
16850         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
16851         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
16852         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
16853         Don't bother checking for string.h, stdlib.h, unistd.h.
16854         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
16855         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
16856         module's job.
16857         * m4/jm-macros.m4 (gl_MACROS): Likewise.
16858         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
16859
16860         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
16861         (gl_GETDATE): Use it.
16862
16863         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
16864
16865 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
16866
16867         Sync from coreutils.
16868
16869         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
16870         stat-time.h.
16871         * lib/argmatch.h: Include verify.h
16872         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
16873         (ARGMATCH_ASSERT): Remove; unused.
16874         * lib/canonicalize.c: Assume STDC_HEADERS.
16875         * lib/exclude.c: Include "strcase.h".
16876         * lib/regex_internal.h [!defined _LIBC]: Likewise.
16877         * lib/getusershell.c: Include stdio--.h rather than stdio.h
16878         and stdio-safer.h.
16879         (getusershell): Call fopen, not fopen_safer.
16880         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
16881         Do not include unistd-safer.h.
16882         (save_cwd): Don't call fd_safer; no longer needed
16883         now that we include fcntl--.h.
16884
16885         * lib/getdate.y (relative_time): New type.
16886         (RELATIVE_TIME_0): New constant.
16887         (parser_control): Use relative_time instead of doing it ourselves.
16888         (%union): Add new relative_time rel member.
16889         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
16890         Now typeless.
16891         (relunit, relunit_snumber): Now of type rel.
16892         (zone, rel, relunit, get_date): Adjust to above changes.
16893
16894         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
16895         Do not include unistd-safer.h.
16896         (getloadavg): Don't call fd_safer; no longer needed
16897         now that we include fcntl--.h.
16898
16899         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
16900         (make_dir_parents): Treat ENOSYS like EEXIST.
16901
16902         Improve quality of diagnostics on restore_cwd failure.
16903         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
16904         (make_dir_parents): Last arg is now int * (for errno), not bool *.
16905         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
16906         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
16907         each time through the loop.  Do not diagnose restore_cwd failure;
16908         that is the caller's job (and perhaps the caller does not care).
16909
16910         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
16911         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
16912         If the file already exists but is not a directory, don't bother
16913         to try to make its parents.
16914         Close potential file descriptor leak if we can't chdir("/") (!).
16915         Don't always return true if chdir($PWD) fails; return true only
16916         if the requested action was done successfully (except for the
16917         chdir($PWD)).
16918         Don't log final directory unless we actually made it.
16919         Refactor to avoid duplicate code to fix up permissions.
16920         Don't attempt to fix up parent permissions if chdir($PWD) fails.
16921
16922         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
16923         to make it a bit faster and (I hope) clearer.
16924         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
16925         Fix bug in formats like %2N.
16926
16927         * lib/verify.h: New file.
16928
16929 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
16930
16931         Sync from coreutils.
16932         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
16933
16934 2005-09-22  Jim Meyering  <jim@meyering.net>
16935
16936         Sync from coreutils.
16937
16938         * m4/lstat.m4 (gl_FUNC_LSTAT):
16939         Use AC_LIBSOURCES to require lstat.c and lstat.h.
16940         Remove obsolete comment.
16941         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
16942         * m4/xstrtod.m4: Likewise.
16943
16944         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
16945
16946 2005-09-22  Jim Meyering  <jim@meyering.net>
16947
16948         Sync from coreutils.
16949
16950         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
16951
16952         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
16953         the .tm_year member, since otherwise gcc-4.0 would now warn about
16954         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
16955
16956         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
16957         order to avoid an unsuppressible warning from gcc on 64-bit systems.
16958
16959         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
16960         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
16961         when run in a time zone for which daylight savings time is in effect
16962         for the starting date.
16963
16964         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
16965         stop us from restricting permissions of just-created absolute-named
16966         directories.
16967         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
16968         to restore initial working directory.
16969         * lib/mkdir-p.c (make_dir_parents): New parameter:
16970         different_working_dir, to tell caller if/when we change the working
16971         directory and are unable to return to the initial one.
16972         * lib/mkdir-p.h (make_dir_parents): Update prototype.
16973         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
16974         `return false'.  This fixes a bug introduced on 2004-07-30.
16975
16976         * lib/openat.c (fdopendir): Be sure to close the supplied
16977         file descriptor before returning.  This makes our replacement
16978         implementation a little closer to Solaris's, where fdopendir
16979         ties the file descriptor to the returned DIR* pointer.
16980         * lib/openat.c (unlinkat): New function.
16981         * lib/openat.h (unlinkat): Add prototype.
16982         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
16983         (openat_restore_fail): Rename from openat_restore_die.
16984         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
16985
16986         Provide an alternative to exiting immediately upon save_cwd or
16987         restore_cwd failure.  Now, an application can arrange e.g.,
16988         to perform a longjump in that case.
16989         * lib/openat.c: Include dirname.h.
16990         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
16991         (rpl_openat, fdopendir, fstatat): Call openat_save_die
16992         and openat_restore_die rather than calling error directly.
16993         Don't include "error.h" or "exitfail.h"; they're no longer needed.
16994
16995         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
16996         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
16997         define.
16998
16999         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
17000         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
17001                             int utc, int nanoseconds);
17002         Background:
17003         date should not have to allocate a megabyte of virtual memory to
17004         handle a format argument like +%1048575T.  When implemented with
17005         strftime, it must allocate such a buffer, use strftime to fill it
17006         in, print it, then free it.
17007         With fprintftime, it simply prints everything and exits.
17008         With no need for memory allocation, that's one fewer way to fail.
17009         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
17010         optional field width, not before, so we accept %9:z, not %:9z.
17011         (my_strftime): Be sure to use L_('x') for literals.
17012
17013         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
17014         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
17015         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
17016         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
17017         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
17018         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
17019         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
17020         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
17021         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
17022         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
17023         * lib/xgethostname.c, lib/xreadlink.c:
17024         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
17025
17026         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
17027         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
17028         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
17029         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
17030         and don't include <sys/file.h>).
17031
17032 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
17033
17034         Sync from coreutils.
17035
17036         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
17037         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
17038         [!LDAV_DONE]: Avoid unused variable warning.
17039
17040 2005-09-21  Bruno Haible  <bruno@clisp.org>
17041
17042         * lib/unicodeio.h (unicode_to_mb): New declaration.
17043
17044 2005-09-20  Derek Price  <derek@ximbiot.com>
17045
17046         * lib/getaddrinfo.c: Don't include <netdb.h> included from
17047         getaddrinfo.h.
17048
17049 2005-09-20  Bruno Haible  <bruno@clisp.org>
17050
17051         * gnulib-tool: Remove trailing slashes from the values specified for
17052         --source-base, --m4-base, --tests-base, --aux-dir.
17053         Suggested by Simon Josefsson <jas@extundo.com>.
17054
17055 2005-09-20  Bruno Haible  <bruno@clisp.org>
17056
17057         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
17058         func_modules_to_filelist, func_import, func_create_testdir): Make all
17059         sorting results locale-independent, so that gnulib-cache.m4 doesn't
17060         change when gnulib-tool is invoked in a different locale.
17061
17062 2005-09-19  Simon Josefsson  <jas@extundo.com>
17063
17064         * m4/socklen.m4: Fix typo.
17065
17066 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
17067
17068         Use a consistent style for including <config.h>.
17069         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
17070         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
17071         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
17072         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
17073         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
17074         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
17075         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
17076         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
17077         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
17078         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
17079         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
17080         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
17081         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
17082         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
17083         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
17084         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
17085         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
17086         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
17087         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
17088         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
17089         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
17090         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
17091         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
17092         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
17093         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
17094         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
17095         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
17096         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
17097         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
17098         lib/xstrtoumax.c, lib/yesno.c:
17099         Standardize inclusion of config.h.
17100         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
17101         lib/inttostr.h:  Removed inclusion of config.h from header files.
17102         * lib/inttostr.c:  Adjusted in-tree users.
17103         * lib/timespec.h: Remove superfluous warning to include config.h.
17104         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
17105         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
17106         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
17107         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
17108         config.h with HAVE_CONFIG_H.
17109
17110 2005-09-19  Jim Meyering  <jim@meyering.net>
17111
17112         * modules/pathmax (License): Change to LGPL.
17113
17114 2005-09-19  Derek Price  <derek@ximbiot.com>
17115
17116         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
17117
17118 2005-09-19  Bruno Haible  <bruno@clisp.org>
17119
17120         * gnulib-tool (import): Provide default for --tests-base.
17121
17122 2005-09-19  Bruno Haible  <bruno@clisp.org>
17123
17124         * doc/quote.texi: New file, extracted from gnulib.texi.
17125         * doc/ctime.texi: New file, extracted from gnulib.texi.
17126         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
17127         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
17128         * doc/gnulib.texi: Include them.
17129
17130 2005-09-18  Bruno Haible  <bruno@clisp.org>
17131
17132         Portability fix.
17133         * gnulib-tool (func_readlink): New function.
17134         (func_ln_if_changed): Use it.
17135
17136 2005-09-18  Bruno Haible  <bruno@clisp.org>
17137
17138         * gnulib-tool: Support --with-tests also with --import.
17139         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
17140         (func_import): Use variables $testsbase and $inctests. Emit a
17141         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
17142         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
17143         SUBDIRS += $testsdir.
17144         (func_create_testdir): Update.
17145
17146 2005-09-18  Bruno Haible  <bruno@clisp.org>
17147
17148         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
17149         instead of $dry_run.
17150         (func_cp_if_changed, func_mv_if_changed): Remove functions.
17151         (func_ln_if_changed): Don't handle dry-run here.
17152         (func_import): In dry-run mode, detect more precisely which actions
17153         would be performed, and don't use "...ing" verbs.
17154
17155 2005-09-18  Bruno Haible  <bruno@clisp.org>
17156
17157         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
17158         (func_import): Use join on two temporary files instead of three nested
17159         loops, in order to determine which files are new or old.
17160
17161 2005-09-18  Bruno Haible  <bruno@clisp.org>
17162
17163         * gnulib-tool (func_import): Comment out code that spits out the
17164         new files with --dry-run.
17165
17166 2005-09-18  Bruno Haible  <bruno@clisp.org>
17167
17168         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
17169
17170 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
17171
17172         * lib/stat-time.h: New file.
17173         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
17174         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
17175         in a different way.
17176         (timespec_cmp): New function.
17177         * lib/utimecmp.c: Include stat-time.h.
17178         (SYSCALL_RESOLUTION): Depend on whether various struct stat
17179         members exist, not on the obsolescent ST_MTIM_NSEC.
17180         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
17181
17182 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
17183
17184         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
17185
17186 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
17187
17188         * MODULES.html.sh (File system functions): Add stat-time.
17189         * modules/stat-time: New file.
17190         * modules/timespec (Files): Remove m4/st_mtim.m4; this
17191         is now done in a different way, by the stat-time module.
17192         * modules/utimecmp (Depends-on): Add stat-time.
17193
17194 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
17195
17196         * m4/st_mtim.m4: Remove.  Superseded by...
17197         * m4/stat-time.m4: New file.
17198         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
17199         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
17200
17201 2005-09-15  Derek Price  <derek@ximbiot.com>
17202
17203         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
17204
17205 2005-09-15  Derek Price  <derek@ximbiot.com>
17206
17207         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
17208         * lib/regex_internal.c: Ditto, using this...
17209         (__GNUC_PREREQ): ...new macro.
17210         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
17211         using...
17212         (__GNUC_PREREQ): ...this new macro.
17213
17214         * lib/strstr.h: Include string.h. Define strstr as a macro here.
17215
17216 2005-09-15  Derek Price  <derek@ximbiot.com>
17217             Paul Eggert  <eggert@cs.ucla.edu>
17218
17219         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
17220         changes, consolidating in...
17221         * lib/regex_internal.h: ...this file.
17222
17223 2005-09-13  Jim Meyering  <jim@meyering.net>
17224
17225         * lib/canon-host.c: Filter through gnu indent and reword comments
17226         slightly.
17227         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
17228
17229 2005-09-13  Derek Price  <derek@ximbiot.com>
17230
17231         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
17232         failure.
17233         Reported by Jim Meyering  <jim@meyering.net>.
17234
17235 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
17236
17237         * lib/base64.c: Typo.
17238         (base64_encode): Put b64str in initialized data section.
17239
17240 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
17241
17242         Merge glibc and coreutils changes into gnulib, plus a few
17243         extra fixes.
17244         * lib/md5.c: Use #error rather than a string.
17245         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
17246         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
17247         (__attribute__): Define to empty for non recent-GCC.
17248         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
17249         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
17250         Renamed from their non-__ counterparts, with new macros replacing
17251         them if not _LIBC.  Add __THROW attribute.
17252         (rol): Remove.
17253         (struct md5_ctx): Align buffer if using GCC.
17254         * lib/sha1.h (struct sha1_ctx): Likewise.
17255         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
17256         The old name was backwards.
17257         (NOTSWAP): Remove; not used.
17258         (rol): New macro, moved here from md5.h.
17259         (sha1_process_block): Remove a FIXME that doesn't make sense.
17260
17261 2005-09-12  Derek Price  <derek@ximbiot.com>
17262
17263         Return usable errors from canon-host.
17264         * lib/canon-host.h: New file.
17265         * lib/canon-host.c (canon_host): Wrap...
17266         (canon_host_r): ...this new function, which now relies exclusively on
17267         getaddrinfo.
17268         (ch_strerror): New function.
17269         (last_cherror): New global.
17270         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
17271         interface.
17272         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
17273         void *.
17274         (freeaddrinfo): Free ai->ai_canonname when set.
17275
17276 2005-09-12  Derek Price  <derek@ximbiot.com>
17277
17278         Make canon-host require getaddrinfo.
17279         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
17280         AC_LIBSOURCE canon-host.h.  Call...
17281         (gl_PREREQ_CANON_HOST): ...this new function, which requires
17282         gl_GETADDRINFO.
17283         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
17284
17285 2005-09-12  Derek Price  <derek@ximbiot.com>
17286
17287         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
17288         LGPL.
17289         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
17290
17291 2005-09-12  Derek Price  <derek@ximbiot.com>
17292
17293         * lib/gai_strerror.c: Include config.h when available.  Include
17294         getaddrinfo.h before other headers to test interface.
17295         Reported by Larry Jones <lawrence.jones@ugs.com>.
17296
17297 2005-09-12  Derek Price  <derek@ximbiot.com>
17298             Paul Eggert  <eggert@cs.ucla.edu>
17299
17300         * modules/glob (Files): Add glob-libc.h.
17301
17302 2005-09-12  Derek Price  <derek@ximbiot.com>
17303             Paul Eggert  <eggert@cs.ucla.edu>
17304
17305         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
17306         glob_.h, glob-libc.h.
17307         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
17308
17309 2005-09-12  Derek Price  <derek@ximbiot.com>
17310             Paul Eggert  <eggert@cs.ucla.edu>
17311
17312         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
17313         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
17314         protecting things that should be done only in gnulib contexts.
17315         * lib/glob_.h: New file, containing only the glob things needed for
17316         gnulib.
17317         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
17318         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
17319         (glob, globfree, glob_pattern_p): Now defined simply in terms of
17320         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
17321         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
17322         and to respect the namespace rules better.
17323
17324 2005-09-08  Simon Josefsson  <jas@extundo.com>
17325
17326         * modules/socklen: New file.
17327
17328 2005-09-08  Simon Josefsson  <jas@extundo.com>
17329
17330         * m4/socklen.m4: New file.
17331
17332 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
17333
17334         * modules/utimens (Files): Add m4/utimbuf.m4, since
17335         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
17336         Reported by Sergey Poznyakoff.
17337
17338 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
17339
17340         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
17341         definitions, since that's the preferred style in glibc.
17342         Fix a minor spacing issue, and update copyright notice to match
17343         glibc's.
17344
17345 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
17346
17347         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
17348
17349 2005-09-06  Simon Josefsson  <jas@extundo.com>
17350
17351         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
17352         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
17353
17354 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
17355
17356         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
17357         warning.
17358
17359 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
17360
17361         * config/srclist.txt: Add glibc bug 1302.
17362
17363 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
17364
17365         Change bitset word type from unsigned int to unsigned long int,
17366         as this has better performance on typical 64-bit hosts.
17367         Port bitset code to hosts with unusual word sizes.
17368         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
17369         (build_collating_symbol):
17370         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
17371         argument is a bitset.  This is merely a style issue, but it makes
17372         it clearer that an entire array is expected.
17373         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
17374         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
17375         Port to the case where bitset_word is not the same as unsigned int.
17376         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
17377         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
17378         Likewise.
17379         * lib/regexec.c (check_dst_limits_calc_pos_1,
17380         check_subexp_matching_top):
17381         (build_trtable, group_nodes_into_DFAstates):
17382         Likewise.
17383         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
17384         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
17385         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
17386         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
17387         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
17388         * lib/regcomp.c (optimize_subexps, lower_subexp):
17389         Work even if bitset_word has holes in its bitwise representation.
17390         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
17391         * lib/regexec.c (check_dst_limits_calc_pos_1,
17392         check_subexp_matching_top):
17393         Likewise.
17394         * lib/regex_internal.c (re_string_reconstruct):
17395         Don't assume UCHAR_MAX == 255.
17396         * lib/regex_internal.h (bitset_set_all): Likewise.
17397         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
17398         All uses changed.
17399         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
17400         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
17401         All uses changed.
17402         (BITSET_WORD_MAX): New macro.
17403         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
17404         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
17405         (bitset_empty, bitset_copy):
17406         Prefer sizeof (bitset) to multiplying it out ourselves.
17407         (bitset_not_merge): Remove; unused.
17408         (bitset_contain): Return bool, not unsigned int with one bit on.
17409         All callers changed.
17410         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
17411         alignment than re_node_set; do this by defining a new internal
17412         type struct dests_alloc and using it to allocate memory.
17413
17414 2005-09-05  Bruno Haible  <bruno@clisp.org>
17415
17416         * gnulib-tool (func_import): Fix comparison in handling of symbolic
17417         links.
17418
17419 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
17420
17421         * modules/size_max (Makefile.am): Add size_max.h
17422
17423 2005-09-04  Derek Price  <derek@ximbiot.com>
17424
17425         * gnulib-tool (func_import): Fix reversed $symbolic logic.
17426
17427 2005-09-03  Simon Josefsson  <jas@extundo.com>
17428
17429         * gnulib-tool: Fix typo.
17430
17431 2005-09-03  Simon Josefsson  <jas@extundo.com>
17432
17433         * config/srclist.txt: Add glibc bug 1293.
17434
17435 2005-09-03  Derek Price  <derek@ximbiot.com>
17436
17437         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
17438         From Larry Jones <lawrence.jones@ugs.com>.
17439
17440 2005-09-02  Simon Josefsson  <jas@extundo.com>
17441
17442         * modules/socklen: New file.
17443
17444 2005-09-02  Simon Josefsson  <jas@extundo.com>
17445
17446         * modules/havelib: New module.
17447
17448         * modules/gettext, modules/iconv, modules/lock, modules/readline:
17449         Use havelib.
17450
17451 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
17452
17453         Check for arithmetic overflow when calculating sizes, to prevent
17454         some buffer-overflow issues.  These patches are conservative, in the
17455         sense that when I couldn't determine whether an overflow was possible,
17456         I inserted a run-time check.
17457         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
17458         macros.
17459         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
17460         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
17461         (re_xnrealloc, re_x2nrealloc): New inline functions.
17462         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
17463         parse_bracket_exp):
17464         (build_equiv_class, build_charclass): Check for arithmetic overflow
17465         in size expression calculations.
17466         * lib/regex_internal.c (re_string_realloc_buffers):
17467         (build_wcs_upper_buffer, re_node_set_add_intersect):
17468         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
17469         (re_dfa_add_node, register_state): Likewise.
17470         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
17471         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
17472         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
17473         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
17474
17475 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
17476
17477         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
17478         m4/ulonglong.m4.  Problem reported by Martin Lambers.
17479
17480 2005-09-02  Bruno Haible  <bruno@clisp.org>
17481
17482         Support for lib vs. lib64 distinction on biarch platforms.
17483         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
17484         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
17485         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
17486
17487 2005-09-02  Bruno Haible  <bruno@clisp.org>
17488
17489         * gnulib-tool (import): In the other first-use case, provide defaults
17490         as well.
17491
17492 2005-09-02  Bruno Haible  <bruno@clisp.org>
17493
17494         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
17495         patches not yet found in the latest gettext release.
17496
17497 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
17498
17499         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
17500         to avoid a collision with bits/local_lim.h in glibc.
17501         All uses changed.  Problem reported by Dmitry V. Levin in
17502         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
17503
17504         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
17505         bugs in int versus size_t comparisons.
17506         (re_string_context_at): Fix bug where the code assumed that
17507         Idx is signed.
17508
17509         Use bool where appropriate.
17510         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
17511         All callers changed.
17512         (calc_eclosure_iter): Likewise, for ROOT arg.
17513         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
17514         (build_charclass_op): Likewise, for NON_MATCH arg.
17515         * lib/regex_internal.c (re_string_allocate, re_string_construct):
17516         (re_string_construct_common): Likewise, for ICASE arg.
17517         * lib/regexec.c (re_search_2_stub, re_search_stub):
17518         Likewise, for RET_LEN arg.
17519         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
17520         (set_regs): Likewise, for FL_BACKTRACK arg.
17521         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
17522         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
17523         (calc_eclosure_iter, parse_bracket_exp):
17524         Use bool for internal variables that are booleans.
17525         * lib/regexec.c (re_search_internal, check_matching,
17526         proceed_next_node):
17527         (set_regs, build_sifted_states, sift_states_bkref):
17528         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
17529         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
17530         (find_collation_sequence_value):
17531         Likewise.
17532         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
17533         (re_node_set_compare):
17534         Return bool, not int. All callers changed.
17535         * lib/regexec.c (check_halt_node_context, check_dst_limits):
17536         (build_trtable, check_node_accept): Likewise.
17537         * lib/regex_internal.h: Include stdbool.h.
17538
17539         Fix bugs uncovered when converting to bool.
17540         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
17541         failure instead of charging ahead blindly.
17542         * lib/regex_internal.c (register_state): Likewise.
17543         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
17544         for freeing internal storage.
17545         (group_nodes_into_DFA_states): Use unsigned int, not int, for
17546         bitset pieces used as boolean, to avoid undefined behavior
17547         on hosts that do int overflow checking.
17548
17549 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
17550
17551         * config/srclist.txt: Add glibc bugs 1285-1287.
17552
17553 2005-09-01  Jim Meyering  <jim@meyering.net>
17554
17555         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
17556         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
17557         Require gl_STAT_MACROS, too.
17558
17559 2005-09-01  Bruno Haible  <bruno@clisp.org>
17560
17561         * gnulib-tool (import): In the first-use case, provide defaults.
17562
17563 2005-09-01  Bruno Haible  <bruno@clisp.org>
17564
17565         * gnulib-tool (func_import): Remove the .tmp files.
17566
17567 2005-09-01  Bruno Haible  <bruno@clisp.org>
17568
17569         * gnulib-tool (func_import): Fix handling of symbolic links.
17570
17571 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
17572
17573         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
17574         old glibc regex code mishandles strings longer than 2**31 bytes.
17575         This patch fixes this when the regex code is used in gnulib
17576         (i.e., outside glibc).
17577
17578         This patch should not affect the use of the regex code inside
17579         glibc.  No doubt this problem also needs to be handled for glibc
17580         as well, but the result will be an incompatible change to the
17581         glibc ABI, and the old ABI will have to be supported too.  That
17582         can be the the subject for another patch.
17583
17584         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
17585         governing whether the rest of this patch is active.  By default,
17586         the macro is disabled and the patch has no effect.
17587         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
17588         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
17589         (struct re_pattern_buffer, re_search, re_search_2, re_match):
17590         (re_match_2, re_set_registers): Use the new types.
17591         * lib/regex_internal.h (Idx, re_hashval_t): New types.
17592         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
17593         New macros.
17594         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
17595         (re_string_context_at, bin_tree_t, re_dfastate_t):
17596         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
17597         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
17598         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
17599         (re_string_char_size_at, re_string_wchar_at):
17600         (re_string_elem_size_at):
17601         Use the new types and macros to port to 64-bit hosts.
17602         Use unsigned types for internal values, so that the code
17603         mostly works even for arrays larger than SSIZE_MAX.
17604         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
17605         (search_duplicated_node, calc_eclosure_iter, fetch_number):
17606         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
17607         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
17608         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
17609         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
17610         (calc_inveclosure, parse_dup_op, build_range_exp):
17611         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
17612         (fetch_number, create_token_tree, mark_opt_subexp):
17613         Likewise.
17614         * lib/regex_internal.c (re_string_construct_common,
17615         create_ci_newstate):
17616         (create_cd_newstate, re_string_allocate, re_string_construct):
17617         (re_string_realloc_buffers, build_wcs_upper_buffer):
17618         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
17619         (re_string_reconstruct, re_string_peek_byte_case):
17620         (re_string_fetch_byte_case, re_string_context_at):
17621         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
17622         (re_node_set_init_copy, re_node_set_add_intersect):
17623         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
17624         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
17625         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
17626         (re_acquire_state, re_acquire_state_context, register_state):
17627         Likewise.
17628         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
17629         search_cur_bkref_entry):
17630         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
17631         (re_search_internal, re_search_2_stub, re_search_stub)
17632         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
17633         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
17634         (update_cur_sifted_state, check_dst_limits):
17635         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
17636         (check_subexp_limits, sift_states_bkref, merge_state_array):
17637         (check_subexp_matching_top, get_subexp, get_subexp_sub):
17638         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
17639         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
17640         (expand_bkref_cache, check_node_accept_bytes):
17641         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
17642         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
17643         (acquire_init_state_context, check_halt_node_context):
17644         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
17645         (sift_states_backward, clean_state_log_if_needed):
17646         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
17647         (find_recover_state, transit_state_sb, transit_state_mb):
17648         (transit_state_bkref, build_trtable, match_ctx_clean):
17649         Likewise.
17650         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
17651         to work around an assumption that REG_MISSING is negative.
17652
17653         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
17654         (seek_collating_symbol_entry) [defined _LIBC]:
17655         (lookup_collation_sequence_value) [defined _LIBC]:
17656         (build_range_exp, build_collating_symbol) [defined _LIBC]:
17657         Use prototypes rather than old-style function definitions.
17658         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
17659         (transit_state_sb) [0]:
17660         (find_collation_sequence_value) [defined _LIBC]: Likewise.
17661
17662         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
17663         rm_eo.
17664
17665         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
17666         (optimize_subexps, lower_subexp):
17667         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
17668         since the signed shift might overflow.  Use 1u<<31 instead.
17669         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
17670         Likewise.
17671         * lib/regexec.c (check_dst_limits_calc_pos_1,
17672         check_subexp_matching_top): Likewise.
17673
17674         * lib/regcomp.c (optimize_subexps, lower_subexp):
17675         Use CHAR_BIT rather than 8, for clarity.
17676         * lib/regexec.c (check_dst_limits_calc_pos_1):
17677         (check_subexp_matching_top): Likewise.
17678         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
17679         have to worry about portability issues when shifting it left.
17680         Remove no-longer-needed test for table_size > 0.
17681         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
17682         in a word, as the resulting behavior is undefined.
17683         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
17684         in one case, a <= should have been an <, and in another case the
17685         whole test was missing.
17686         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
17687         the standard name CHAR_BIT.
17688         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
17689         this is not true on one's complement and signed-magnitude hosts.
17690
17691         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
17692         next_last_offset.
17693         (struct re_dfa_t): Remove unused member states_alloc.
17694         * lib/regcomp.c (init_dfa): Don't initialize unused members.
17695
17696 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
17697
17698         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
17699         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
17700         and large-file glibc and in 32-bit large-file Solaris.
17701
17702 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
17703
17704         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
17705         lengths fit in regoff_t; this isn't true if regoff_t is the same
17706         width as size_t.
17707         * lib/regex.c (re_search_internal): 5th arg is LAST_START
17708         (= START + RANGE) instead of RANGE.  This avoids overflow
17709         problems when regoff_t is the same width as size_t.
17710         All callers changed.
17711         (re_search_2_stub): Check for overflow when adding the
17712         sizes of the two strings.
17713         (re_search_stub): Check for overflow when adding START
17714         to RANGE; if it occurs, substitute the extreme value.
17715
17716 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
17717
17718         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
17719
17720 2005-08-31  Jim Meyering  <jim@meyering.net>
17721
17722         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
17723         a pointer-to-const.
17724         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
17725         (register_state): Likewise.
17726         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
17727         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
17728         (group_nodes_into_DFAstates): Likewise.
17729
17730 2005-08-31  Jim Meyering  <jim@meyering.net>
17731
17732         * check-module: Add a FIXME comment.
17733
17734 2005-08-31  Eric Blake  <ebb9@byu.net>
17735
17736         * modules/unistd-safer (Files): Add unistd--.h.
17737         * modules/stdio-safer (Files): Add stdio--.h.
17738
17739 2005-08-31  Derek Price  <derek@ximbiot.com>
17740
17741         * lib/getdelim.c (getdelim): Return EOF on EOF.
17742         Reported by Larry Jones <lawrence.jones@ugs.com>.
17743
17744 2005-08-31  Bruno Haible  <bruno@clisp.org>
17745
17746         Avoid unnecessary diffs in the generated lib/Makefile.am.
17747         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
17748         the generated files.
17749         (func_import): Don't set cmd.
17750
17751 2005-08-31  Bruno Haible  <bruno@clisp.org>
17752
17753         * lib/strstr.c: Include <stddef.h>, for NULL.
17754         * lib/strcasestr.c: Likewise.
17755         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
17756
17757 2005-08-31  Bruno Haible  <bruno@clisp.org>
17758
17759         * gnulib-tool: New option --macro-prefix.
17760         (func_import): Use macro_prefix.
17761         (import): Handle option --macro-prefix.
17762
17763 2005-08-31  Bruno Haible  <bruno@clisp.org>
17764
17765         * gnulib-tool (import): Rename most ac_* variables to cached_*.
17766         Also use new variables cached_lgpl, cached_libtool.
17767
17768 2005-08-31  Bruno Haible  <bruno@clisp.org>
17769
17770         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
17771         always instantiating them.
17772
17773 2005-08-31  Bruno Haible  <bruno@clisp.org>
17774
17775         * gnulib-tool (func_import): Read the previous cached settings
17776         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
17777         earlier added by gnulib but are now dropped. Warn when a gnulib file
17778         overwrites a non-gnulib file.
17779
17780 2005-08-31  Bruno Haible  <bruno@clisp.org>
17781
17782         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
17783         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
17784         projects that don't keep autogenerated files in CVS. Put into
17785         actioncmd only the specified modules, not the transitive closure.
17786
17787 2005-08-31  Bruno Haible  <bruno@clisp.org>
17788
17789         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
17790         Create directories that shall be filled.
17791         (import): Don't look for gl_* macros in configure.ac. Recurse across
17792         all directories containing a gnulib-cache.m4 files, if meaningful.
17793
17794 2005-08-31  Bruno Haible  <bruno@clisp.org>
17795
17796         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
17797         (import): Set seen_libtool when we see gl_LIBTOOL.
17798
17799 2005-08-31  Bruno Haible  <bruno@clisp.org>
17800
17801         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
17802         declaration macro definitions from generated gnulib.m4.
17803
17804 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
17805
17806         * lib/iconvme.h: Add prototype for iconv_alloc.
17807
17808 2005-08-29  Simon Josefsson  <jas@extundo.com>
17809
17810         * lib/iconvme.c: Fix errno.
17811
17812 2005-08-29  Bruno Haible  <bruno@clisp.org>
17813
17814         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
17815         that it works when the directory contains spaces.
17816
17817 2005-08-29  Bruno Haible  <bruno@clisp.org>
17818
17819         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
17820
17821 2005-08-29  Bruno Haible  <bruno@clisp.org>
17822
17823         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
17824         Emit more advice.
17825
17826 2005-08-29  Bruno Haible  <bruno@clisp.org>
17827         and Stepan Kasal  <kasal@ucw.cz>
17828
17829         * check-module: If more parameters are given, check each of them
17830         separately; add more exceptions, as noted by Jim Meyering.
17831         (check_module): New procedure.
17832         (%exempt_header): Now contains all exceptions.
17833
17834 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
17835
17836         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
17837
17838 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
17839
17840         * lib/iconvme.c: Split iconv_string into iconv_alloc.
17841
17842 2005-08-28  Bruno Haible  <bruno@clisp.org>
17843
17844         * m4/gnulib-tool.m4: New file.
17845
17846 2005-08-27  Jim Meyering  <jim@meyering.net>
17847
17848         * modules/unistd-safer (Files): Add pipe-safer.c.
17849         * modules/fcntl-safer (Files): Add creat-safer.c.
17850
17851 2005-08-27  Jim Meyering  <jim@meyering.net>
17852
17853         * m4/stdlib-safer.m4: New file.  From coreutils.
17854         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
17855         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
17856         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
17857         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
17858         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
17859
17860 2005-08-27  Jim Meyering  <jim@meyering.net>
17861
17862         * lib/fopen-safer.c: Merge minor changes from coreutils.
17863         * lib/dup-safer.c: Likewise.
17864         * lib/fd-safer.c: Likewise.
17865
17866         Merge from coreutils.
17867         * lib/stdio--.h: New file.
17868         * lib/stdlib--.h: New file.
17869         * lib/mkstemp-safer.c: New file.
17870
17871         GNU tar needs these.
17872         * lib/pipe-safer.c: New file.
17873         * lib/creat-safer.c: New file.
17874         * lib/fcntl--.h (creat): Define to creat_safer.
17875         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
17876         * lib/unistd--.h (pipe): Define to pipe_safer.
17877         * lib/unistd-safer.h: Declare pipe_safer.
17878
17879 2005-08-26  Simon Josefsson  <jas@extundo.com>
17880
17881         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
17882         Haible <bruno@clisp.org>.
17883
17884 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
17885
17886         * lib/regex_internal.h: Remove all references to
17887         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
17888         or better.
17889         (bitset_not, bitset_merge, bitset_not_merge):
17890         (bitset_mask, re_string_allocate, re_string_construct):
17891         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
17892         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
17893         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
17894         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
17895         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
17896         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
17897         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
17898         (re_acquire_state_context):
17899         Remove unnecessary forward decls.
17900         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
17901         Put __attribute at function definition,
17902         now that the function decl has been removed.
17903         * lib/regex_internal.c (re_string_peek_byte_case):
17904         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
17905         Likewise.
17906
17907 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
17908
17909         * m4/regex.m4: Add AC_PREREQ(2.50).
17910         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
17911
17912 2005-08-25  Simon Josefsson  <jas@extundo.com>
17913
17914         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
17915         __fsetlocking.
17916
17917 2005-08-25  Simon Josefsson  <jas@extundo.com>
17918
17919         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
17920         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
17921         GLIBC specific code.
17922
17923 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
17924
17925         Make regex safe for g++.  This fixes one real bug (an "err"
17926         that should have been "*err").  g++ problem reported by
17927         Sam Steingold.
17928         * lib/regex_internal.h (re_calloc): New macro, consistent with
17929         re_malloc etc.  All callers of calloc changed to use re_calloc.
17930         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
17931         not int.  All callers changed.
17932         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
17933         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
17934         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
17935         (find_recover_state): Change "err" to "*err"; this fixes what
17936         appears to be a real bug.
17937         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
17938         versus int.
17939
17940 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
17941
17942         * modules/regex (Depends-on): Add malloc, since the code
17943         assumes that !malloc(0) means failure.
17944
17945 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
17946
17947         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
17948
17949         alloca modernization/simplification for regex.
17950         * lib/regex.c: Remove portability cruft for alloca.  This no longer
17951         needs to be at the start of the file, and can be moved into
17952         regex_internal.h and simplified.
17953         * lib/regex_internal.h: Include <alloca.h>.
17954         (__libc_use_alloca) [!defined _LIBC]: New macro.
17955         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
17956         now works outside glibc.
17957
17958 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
17959
17960         * config/srclist.txt: Add glibc bugs 1241, 1245.
17961
17962 2005-08-25  Jim Meyering  <jim@meyering.net>
17963
17964         * lib/open-safer.c: Include <config.h>.
17965         Otherwise, we'd lose LARGEFILE support in any file using
17966         e.g. "fcntl--.h"
17967
17968 2005-08-25  Bruno Haible  <bruno@clisp.org>
17969
17970         * m4/minmax.m4: Require autoconf 2.52.
17971         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
17972         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
17973         alternatives of translit over the alphabet.
17974         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
17975
17976 2005-08-24  Simon Josefsson  <jas@extundo.com>
17977
17978         * tests/test-getpass.c: New file.
17979
17980 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
17981
17982         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
17983         for GNU regex features.
17984
17985 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
17986
17987         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
17988         * lib/regex.h (regerror): Likewise.
17989
17990         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
17991         requires this.  (The code never needed it.)
17992
17993         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
17994         All uses of recently-renamed identifiers changed to use the new,
17995         POSIX-compliant names.  The code will build and run just fine
17996         without these changes, but it's better to eat our own dog food
17997         and use the standard-conforming names.
17998
17999         * lib/regex.h: Fix a multitude of POSIX name space violations.
18000         These changes have an effect only for programs that define
18001         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
18002         do not change anything for programs compiled in the normal way.
18003         Also, there is no effect on the ABI.
18004
18005         (_REGEX_SOURCE): New macro.
18006         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
18007         defined and _GNU_SOURCE is not; this fixes a name space violation.
18008
18009         Rename the following macros to obey POSIX requirements.
18010         The old names are still visible as macros if _REGEX_SOURCE is defined.
18011         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
18012         RE_BACKSLASH_ESCAPE_IN_LISTS.
18013         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
18014         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
18015         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
18016         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
18017         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
18018         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
18019         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
18020         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
18021         (REG_INTERVALS): renamed from RE_INTERVALS.
18022         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
18023         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
18024         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
18025         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
18026         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
18027         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
18028         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
18029         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
18030         RE_UNMATCHED_RIGHT_PAREN_ORD.
18031         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
18032         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
18033         (REG_DEBUG): renamed from RE_DEBUG.
18034         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
18035         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
18036         unusual, since we can't clash with the POSIX REG_ICASE.
18037         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
18038         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
18039         (REG_NO_SUB): renamed from RE_NO_SUB.
18040         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
18041         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
18042         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
18043         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
18044         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
18045         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
18046         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
18047         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
18048         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
18049         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
18050         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
18051         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
18052         RE_SYNTAX_POSIX_MINIMAL_BASIC.
18053         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
18054         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
18055         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
18056         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
18057         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
18058         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
18059         (REG_FIXED): Renamed from REGS_FIXED.
18060         (REG_NREGS): Renamed from RE_NREGS.
18061
18062         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
18063         of other REG_* macros, since POSIX says the user is allowed to
18064         #undef these macros selectively.
18065
18066         (reg_errcode_t): Update comment stating what other tables need
18067         to be consistent.
18068
18069         Rename the following enum values to obey POSIX requirements.
18070         The old names are still visible as macros.
18071         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
18072         is not defined, since GNU is supposed to be a superset of POSIX as
18073         much as possible, and since we want reg_errcode_t to be a signed
18074         type for implementation consistency.
18075         (_REG_NOERROR): Renamed from REG_NOERROR.
18076         (_REG_NOMATCH): Renamed from REG_NOMATCH.
18077         (_REG_BADPAT): Renamed from REG_BADPAT.
18078         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
18079         (_REG_ECTYPE): Renamed from REG_ECTYPE.
18080         (_REG_EESCAPE): Renamed from REG_EESCAPE.
18081         (_REG_ESUBREG): Renamed from REG_ESUBREG.
18082         (_REG_EBRACK): Renamed from REG_EBRACK.
18083         (_REG_EPAREN): Renamed from REG_EPAREN.
18084         (_REG_EBRACE): Renamed from REG_EBRACE.
18085         (_REG_BADBR): Renamed from REG_BADBR.
18086         (_REG_ERANGE): Renamed from REG_ERANGE.
18087         (_REG_ESPACE): Renamed from REG_ESPACE.
18088         (_REG_BADRPT): Renamed from REG_BADRPT.
18089         (_REG_EEND): Renamed from REG_EEND.
18090         (_REG_ESIZE): Renamed from REG_ESIZE.
18091         (_REG_ERPAREN): Renamed from REG_ERPAREN.
18092         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
18093         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
18094         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
18095         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
18096
18097         (_REG_RE_NAME, _REG_RM_NAME): New macros.
18098         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
18099         changed.  But support the old name if the new one is not defined
18100         and if _REGEX_SOURCE.
18101
18102         Change the following member names in struct re_pattern_buffer.
18103         The old names are still supported if !_REGEX_SOURCE.
18104         The new names are always supported, regardless of _REGEX_SOURCE.
18105         (re_buffer): Renamed from buffer.
18106         (re_allocated): Renamed from allocated.
18107         (re_used): Renamed from used.
18108         (re_syntax): Renamed from syntax.
18109         (re_fastmap): Renamed from fastmap.
18110         (re_translate): Renamed from translate.
18111         (re_can_be_null): Renamed from can_be_null.
18112         (re_regs_allocated): Renamed from regs_allocated.
18113         (re_fastmap_accurate): Renamed from fastmap_accurate.
18114         (re_no_sub): Renamed from no_sub.
18115         (re_not_bol): Renamed from not_bol.
18116         (re_not_eol): Renamed from not_eol.
18117         (re_newline_anchor): Renamed from newline_anchor.
18118
18119         Change the following member names in struct re_registers.
18120         The old names are still supported if !_REGEX_SOURCE.
18121         The new names are always supported, regardless of _REGEX_SOURCE.
18122         (rm_num_regs): Renamed from num_regs.
18123         (rm_start): Renamed from start.
18124         (rm_end): Renamed from end.
18125
18126         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
18127         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
18128         Prepend __ to parameter names.
18129
18130         Undo yesterday's changes.
18131
18132 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
18133
18134         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
18135         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
18136         lib/regex.c.
18137
18138 2005-08-24  Jim Meyering  <jim@meyering.net>
18139
18140         Sync from coreutils.
18141         * m4/fcntl-safer.m4: New file.
18142
18143         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
18144         and object files for this module.
18145
18146 2005-08-24  Jim Meyering  <jim@meyering.net>
18147
18148         Sync from coreutils.
18149         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
18150
18151 2005-08-24  Jim Meyering  <jim@meyering.net>
18152
18153         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
18154         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
18155
18156 2005-08-24  Jim Meyering  <jim@meyering.net>
18157
18158         * modules/fcntl-safer: New module.
18159         * modules/fts (Depends-on): Add fcntl-safer.
18160         * MODULES.html.sh (File descriptor based Input/Output):
18161         Add fcntl-safer.
18162
18163 2005-08-24  Bruno Haible  <bruno@clisp.org>
18164
18165         Support for unit test modules.
18166         * modules/README: Mention tests modules.
18167         * modules/TEMPLATE-TESTS: New file.
18168         * gnulib-tool: New options --extract-tests-module, --with-tests and
18169         --tests-base (unused for the moment).
18170         (testsbase, inctests): New variables.
18171         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
18172         (func_verify_module): Exclude TEMPLATE-TESTS.
18173         (func_verify_nontests_module, func_verify_tests_module): New functions.
18174         (func_get_dependencies): Add implicit dependency for tests modules.
18175         (func_get_tests_module): New function.
18176         (func_modules_transitive_closure): When --with-tests was specified,
18177         include the unit tests as well, unless explicitly avoided.
18178         (func_emit_lib_Makefile_am): Ignore the tests modules here.
18179         (func_emit_tests_Makefile_am): New function.
18180         (func_create_testdir): When --with-tests was specified, emit a
18181         tests/ directory.
18182         * MODULES.html.sh (Future developments): Update.
18183
18184 2005-08-24  Bruno Haible  <bruno@clisp.org>
18185
18186         * modules/tls-tests: New file.
18187         * tests/test-tls.c: New file, from GNU gettext.
18188
18189 2005-08-24  Bruno Haible  <bruno@clisp.org>
18190
18191         * modules/lock-tests: New file.
18192         * tests/test-lock.c: New file, from GNU gettext.
18193
18194 2005-08-24  Bruno Haible  <bruno@clisp.org>
18195
18196         * lib/lock.h: Add multiple inclusion guard.
18197         * lib/tls.h: Add multiple inclusion guard.
18198
18199 2005-08-24  Bruno Haible  <bruno@clisp.org>
18200
18201         * gnulib-tool: Add support for the --aux-dir option to
18202         --create-testdir, --create-megatestdir, --test, --megatest.
18203         (func_create_testdir, func_create_megatestdir): Optionally emit a
18204         AC_CONFIG_AUX_DIR directive.
18205         (create-testdir, create-megatestdir, test, megatest): Provide a
18206         default value for $auxdir.
18207
18208 2005-08-24  Bruno Haible  <bruno@clisp.org>
18209
18210         * gnulib-tool (import): Use compound statement instead of subshell
18211         where possible.
18212
18213 2005-08-24  Bruno Haible  <bruno@clisp.org>
18214
18215         * gnulib-tool (import): Change --aux-dir default to "build-aux".
18216
18217 2005-08-24  Bruno Haible  <bruno@clisp.org>
18218
18219         * gnulib-tool (func_version): Update.
18220
18221 2005-08-24  Bruno Haible  <bruno@clisp.org>
18222
18223         * gnulib-tool (func_import, func_create_testdir,
18224         func_create_megatestdir): Quote all autoconf macro arguments.
18225
18226 2005-08-24  Bruno Haible  <bruno@clisp.org>
18227
18228         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
18229         option --force, because --force causes the aclocal.m4 of each
18230         subdirectory to be newer than the corresponding config.h.in.
18231
18232 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
18233
18234         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
18235         All contents moved to gl_REGEX.
18236         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
18237         assume that it does.
18238
18239 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
18240
18241         * lib/regex.h (REG_NOSYS)
18242         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
18243         Define, since POSIX requires it as of 2001.
18244         (_REG_ENOSYS)
18245         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
18246         New private symbol, used to keep the enum signed in all cases.
18247         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
18248         Youngman in
18249         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
18250
18251         * lib/regex_internal.c (re_string_skip_chars, register_state):
18252         (calc_state_hash):
18253         Remove forward decls; no longer needed now that we use prototypes.
18254         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
18255         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
18256         (clean_state_log_if_needed): Likewise.
18257
18258 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
18259
18260         * config/srclist.txt: Add glibc bugs 1231-1233.
18261
18262 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
18263
18264         Fix problems reported by Sam Steingold in
18265         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
18266         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
18267         assumed that reg_errcode_t is a signed type, which is not
18268         necessarily true if _XOPEN_SOURCE is not defined.
18269         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
18270         since some compilers warn about it otherwise.
18271
18272 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
18273
18274         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
18275         (init_word_char, create_initial_state, duplicate_node_closure):
18276         (fetch_token, peek_token_bracket, build_range_exp):
18277         (build_collating_symbol): Remove forward decls; no longer needed
18278         now that we use prototypes.
18279
18280         * lib/regcomp.c:
18281         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
18282         (re_compile_fastmap_iter, regcomp, regerror, regfree):
18283         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
18284         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
18285         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
18286         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
18287         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
18288         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
18289         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
18290         (build_range_exp, build_collating_symbol, parse_bracket_exp):
18291         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
18292         (build_charclass, build_charclass_op, fetch_number, create_tree):
18293         (create_token_tree, mark_opt_subexp, duplicate_tree):
18294         Use prototypes rather than old-style definitions.
18295
18296         * lib/regex_internal.c:
18297         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
18298         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
18299         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
18300         (re_string_reconstruct, re_string_peek_byte_case):
18301         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
18302         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
18303         (re_node_set_init_copy, re_node_set_add_intersect):
18304         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
18305         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
18306         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
18307         (re_acquire_state, re_acquire_state_context, register_state):
18308         (create_ci_newstate, create_cd_newstate, free_state):
18309         Likewise.
18310         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
18311         re_search_2):
18312         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
18313         (re_search_internal, prune_impossible_nodes):
18314         (acquire_init_state_context, check_matching, static):
18315         (check_halt_node_context, check_halt_state_context, proceed_next_node):
18316         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
18317         (update_regs, sift_states_backward, build_sifted_states):
18318         (clean_state_log_if_needed, merge_state_array):
18319         (update_cur_sifted_state, add_epsilon_src_nodes):
18320         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
18321         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
18322         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
18323         (find_recover_state, check_subexp_matching_top, transit_state_mb):
18324         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
18325         (check_arrival, check_arrival_add_next_nodes):
18326         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
18327         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
18328         (check_node_accept_bytes, check_node_accept, extend_buffers):
18329         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
18330         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
18331         (sift_ctx_init):
18332         Likewise.
18333
18334         * lib/regex_internal.h:
18335         (re_string_allocate, re_string_construct, re_string_reconstruct):
18336         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
18337         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
18338         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
18339         (re_string_context_at, re_string_peek_byte_case):
18340         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
18341         is defined, since we now use prototypes always.
18342
18343         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
18344         C89 or better.  All uses removed.
18345
18346 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
18347
18348         * config/srclist.txt: Add glibc bugs 1220-1227.
18349
18350 2005-08-20  Jim Meyering  <jim@meyering.net>
18351
18352         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
18353         of unused local, dfa.
18354
18355 2005-08-20  Bruno Haible  <bruno@clisp.org>
18356
18357         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
18358
18359 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18360
18361         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
18362         (re_node_set_insert_last, re_dfa_add_node):
18363         Rename local variables to avoid GCC shadowing warnings.
18364
18365 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18366
18367         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
18368         [defined lint]: Suppress bogus uninitialized-variable warnings.
18369
18370         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
18371         and let the caller return REG_ESPACE if out of space.  This
18372         removes an uninitialied-variable warning with GCC 4.0.1, and also
18373         avoids taking the address of a local variable.  All callers
18374         changed.
18375
18376 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18377
18378         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
18379         $LIBCSRC/posix/regexec.c.
18380         Add glibc bug 1217 for regcomp.c.
18381
18382 2005-08-19  Jim Meyering  <jim@meyering.net>
18383
18384         * lib/regexec.c (proceed_next_node): Redo local variables to
18385         avoid GCC shadowing warnings.
18386
18387 2005-08-18  Bruno Haible  <bruno@clisp.org>
18388
18389         * lib/strstr.c (strstr): Fix return value in multibyte case.
18390         * lib/strcasestr.c (strcasestr): Likewise.
18391
18392 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
18393
18394         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
18395
18396 2005-08-17  Jim Meyering  <jim@meyering.net>
18397
18398         Make the %s format (seconds since the epoch) work for a negative
18399         number and when used with a zero-padded field width, e.g. %015s.
18400
18401         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
18402         label so that it precedes the code to set `digits'.  Otherwise,
18403         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
18404         print `00-22'.  Now, it prints `-0022', as it should.
18405
18406 2005-08-17  Bruno Haible  <bruno@clisp.org>
18407
18408         * modules/strstr (Files): Add m4/mbrtowc.m4.
18409         (Depends-on): Add mbuiter.
18410
18411 2005-08-17  Bruno Haible  <bruno@clisp.org>
18412
18413         * modules/strcasestr: New file.
18414         * MODULES.html.sh (String handling, based on ANSI C 89): Add
18415         strcasestr.
18416
18417 2005-08-17  Bruno Haible  <bruno@clisp.org>
18418
18419         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
18420
18421 2005-08-17  Bruno Haible  <bruno@clisp.org>
18422
18423         * modules/mbuiter: New file.
18424         * MODULES.html.sh (Extended multibyte and wide character utilities):
18425         Add mbuiter.
18426
18427 2005-08-17  Bruno Haible  <bruno@clisp.org>
18428
18429         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
18430         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
18431
18432 2005-08-17  Bruno Haible  <bruno@clisp.org>
18433
18434         * m4/strcasestr.m4: New file.
18435
18436 2005-08-17  Bruno Haible  <bruno@clisp.org>
18437
18438         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
18439         * lib/strstr.c: Completely rewritten, with multibyte locale support.
18440
18441 2005-08-17  Bruno Haible  <bruno@clisp.org>
18442
18443         * lib/strcasestr.h: New file.
18444         * lib/strcasestr.c: New file.
18445
18446 2005-08-17  Bruno Haible  <bruno@clisp.org>
18447
18448         * lib/strcasecmp.c: Use mbuiter.h.
18449
18450 2005-08-17  Bruno Haible  <bruno@clisp.org>
18451
18452         * lib/mbuiter.h: New file.
18453
18454 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
18455
18456         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
18457         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
18458         and gl_GETOPT are both invoked via different paths (as happens
18459         with GNU tar CVS because it uses both argp and getopt), the former
18460         wins.
18461
18462 2005-08-16  Bruno Haible  <bruno@clisp.org>
18463
18464         * modules/tls: New file.
18465         * MODULES.html.sh (Multithreading): Add tls.
18466
18467 2005-08-16  Bruno Haible  <bruno@clisp.org>
18468
18469         * modules/strnlen1: New file.
18470         * MODULES.html.sh (String handling): Add strnlen1.
18471
18472 2005-08-16  Bruno Haible  <bruno@clisp.org>
18473
18474         * modules/strcase (Files): Add m4/mbrtowc.m4.
18475         (Depends-on): Add strnlen1, mbchar.
18476
18477 2005-08-16  Bruno Haible  <bruno@clisp.org>
18478
18479         * modules/mbiter: New file.
18480         * MODULES.html.sh (Extended multibyte and wide character utilities):
18481         Add mbiter.
18482
18483 2005-08-16  Bruno Haible  <bruno@clisp.org>
18484
18485         * modules/mbfile: New file.
18486         * MODULES.html.sh (Extended multibyte and wide character utilities):
18487         Add mbfile.
18488
18489 2005-08-16  Bruno Haible  <bruno@clisp.org>
18490
18491         * modules/mbchar: New file.
18492         * MODULES.html.sh (Extended multibyte and wide character utilities):
18493         New section.
18494
18495 2005-08-16  Bruno Haible  <bruno@clisp.org>
18496
18497         * m4/tls.m4: New file, from GNU gettext.
18498
18499 2005-08-16  Bruno Haible  <bruno@clisp.org>
18500
18501         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
18502         always.
18503         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
18504
18505 2005-08-16  Bruno Haible  <bruno@clisp.org>
18506
18507         * m4/mbiter.m4: New file.
18508
18509 2005-08-16  Bruno Haible  <bruno@clisp.org>
18510
18511         * m4/mbfile.m4: New file.
18512
18513 2005-08-16  Bruno Haible  <bruno@clisp.org>
18514
18515         * m4/mbchar.m4: New file.
18516
18517 2005-08-16  Bruno Haible  <bruno@clisp.org>
18518
18519         * lib/tls.h: New file, from GNU gettext.
18520         * lib/tls.c: New file, from GNU gettext.
18521
18522 2005-08-16  Bruno Haible  <bruno@clisp.org>
18523
18524         * lib/strnlen1.h: New file.
18525         * lib/strnlen1.c: New file.
18526
18527 2005-08-16  Bruno Haible  <bruno@clisp.org>
18528
18529         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
18530         (mbi_init): Update.
18531         (mbi_avail, mbi_advance): Let the iteration end before the terminating
18532         NUL byte, not after it.
18533
18534 2005-08-16  Bruno Haible  <bruno@clisp.org>
18535
18536         * lib/strcase.h (strcasecmp): Add note in comments.
18537         * lib/strncasecmp.c: Use code from strcasecmp.c.
18538         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
18539         (strcasecmp): Work correctly in multibyte locales.
18540
18541 2005-08-16  Bruno Haible  <bruno@clisp.org>
18542
18543         * lib/mbiter.h: New file.
18544
18545 2005-08-16  Bruno Haible  <bruno@clisp.org>
18546
18547         * lib/mbfile.h: New file.
18548
18549 2005-08-16  Bruno Haible  <bruno@clisp.org>
18550
18551         * lib/mbchar.h: New file.
18552         * lib/mbchar.c: New file.
18553
18554 2005-08-16  Bruno Haible  <bruno@clisp.org>
18555
18556         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
18557         the valid ones. Makes the comparison operations transitive:
18558         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
18559         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
18560
18561 2005-08-15  Simon Josefsson  <jas@extundo.com>
18562
18563         * modules/ssize_t (License): Change to 'unlimited'.
18564
18565         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
18566
18567 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
18568
18569         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
18570         Add comments for each pending glibc patch.
18571
18572 2005-08-15  Bruno Haible  <bruno@clisp.org>
18573
18574         * lib/regex.h (__restrict_arr): Don't define to __restrict if
18575         __cplusplus is defined.
18576
18577 2005-08-14  Jim Meyering  <jim@meyering.net>
18578
18579         Sync from coreutils.
18580
18581         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
18582         Use the hash-table-based cycle-detection code not just when
18583         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
18584         Reported by James Youngman in
18585         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
18586         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
18587         FTS_TIGHT_CYCLE_CHECK.
18588         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
18589         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
18590         once again.
18591         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
18592         * lib/fts.c (fd_safer): Remove decl.
18593         Include fcntl--.h rather than unistd-safer.h
18594         (fts_safe_changedir): Don't call fd_safer; no longer needed
18595         now that we include fcntl--.h.
18596
18597 2005-08-12  Simon Josefsson  <jas@extundo.com>
18598
18599         * modules/getndelim2: Use ssize_t module.
18600         * modules/getnline: Likewise.
18601         * modules/safe-read: Likewise.
18602         * modules/xreadlink: Likewise.
18603
18604         * modules/ssize_t: New file.
18605
18606 2005-08-12  Simon Josefsson  <jas@extundo.com>
18607
18608         * m4/readline.m4: Look for termcap, curses or ncurses if required.
18609
18610 2005-08-12  Simon Josefsson  <jas@extundo.com>
18611
18612         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
18613         ssize_t.
18614
18615 2005-08-12  Simon Josefsson  <jas@extundo.com>
18616
18617         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
18618         readline, getdelim and check_version.
18619         (Support for systems lacking ISO C 99: Sizes of integer types):
18620         Add size_max.
18621
18622 2005-08-12  Bruno Haible  <bruno@clisp.org>
18623
18624         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
18625
18626 2005-08-11  Simon Josefsson  <jas@extundo.com>
18627
18628         * modules/readline: New file.
18629
18630         * modules/strnlen (Files): Add strnlen.h.
18631
18632 2005-08-11  Simon Josefsson  <jas@extundo.com>
18633
18634         * m4/readline.m4: New file.
18635
18636 2005-08-11  Simon Josefsson  <jas@extundo.com>
18637
18638         * lib/readline.h, readline.c: New file.
18639
18640 2005-08-11  Simon Josefsson  <jas@extundo.com>
18641
18642         * doc/gnulib.texi (Initial import, Finishing touches): Mention
18643         gl_AVOID.
18644
18645 2005-08-11  Bruno Haible  <bruno@clisp.org>
18646
18647         * lib/strnlen.h (strnlen): Change parameter name to match comment.
18648
18649 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
18650
18651         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
18652
18653 2005-08-10  Simon Josefsson  <jas@extundo.com>
18654
18655         * tests/test-iconvme.c: New file.
18656
18657 2005-08-10  Simon Josefsson  <jas@extundo.com>
18658
18659         * m4/strnlen.m4: New file.
18660
18661         * m4/strndup.m4: Don't check for strnlen declaration, done in
18662         strnlen.m4.
18663
18664 2005-08-10  Simon Josefsson  <jas@extundo.com>
18665
18666         * lib/strndup.c: Use strnlen.h.
18667
18668         * lib/strnlen.h: New file.
18669
18670 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
18671
18672         * README: Typos.
18673
18674 2005-08-02  Simon Josefsson  <jas@extundo.com>
18675
18676         * modules/readline: New file.
18677
18678 2005-08-02  Simon Josefsson  <jas@extundo.com>
18679
18680         * modules/getdelim: New file.
18681
18682         * modules/getline: Rewrite, don't use getndelim2.
18683
18684 2005-08-02  Simon Josefsson  <jas@extundo.com>
18685
18686         * m4/getline.m4: Separate out getdelim stuff into separate module.
18687
18688         * m4/getdelim.m4: New file.
18689
18690 2005-08-02  Simon Josefsson  <jas@extundo.com>
18691
18692         * lib/getline.h, getline.c: Rewrite.
18693
18694         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
18695
18696 2005-07-31  Bruno Haible  <bruno@clisp.org>
18697
18698         * lib/lock.h (gl_lock_initializer): New macro.
18699         (gl_lock_define_initialized): Use it.
18700         (gl_rwlock_initializer): New macro.
18701         (gl_rwlock_define_initialized): Use it.
18702         (gl_recursive_lock_initializer): New macro.
18703         (gl_recursive_lock_define_initialized): Use it.
18704
18705 2005-07-30  Karl Berry  <karl@gnu.org>
18706
18707         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
18708         Report from Ben Pfaff, regarding getopt.
18709
18710 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
18711
18712         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
18713         normal way.
18714         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
18715         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
18716         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
18717         (gl_GETOPT): Use the new macros.  Most of the implementation
18718         is moved to the new macros.  This is for programs like Emacs
18719         that don't want all the functionality of gl_GETOPT.
18720
18721 2005-07-26  Bruno Haible  <bruno@clisp.org>
18722
18723         * m4/lock.m4: Update from GNU gettext.
18724
18725 2005-07-26  Bruno Haible  <bruno@clisp.org>
18726
18727         * lib/lock.h: Update from GNU gettext.
18728         * lib/lock.c: Update from GNU gettext.
18729
18730 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
18731
18732         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
18733         obsolescent AC_TRY_RUN.  Include the default includes files, for
18734         'exit'.
18735
18736 2005-07-24  Bruno Haible  <bruno@clisp.org>
18737
18738         * modules/visibility: New file.
18739         * MODULES.html.sh (Misc): Add visibility.
18740
18741 2005-07-24  Bruno Haible  <bruno@clisp.org>
18742
18743         * m4/visibility.m4: New file.
18744
18745 2005-07-24  Bruno Haible  <bruno@clisp.org>
18746
18747         * doc/visibility.texi: New file.
18748
18749 2005-07-22  Bruno Haible  <bruno@clisp.org>
18750
18751         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
18752         $(ALLOCA_H), redundant through BUILT_SOURCES.
18753         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
18754         redundant through BUILT_SOURCES.
18755         * modules/byteswap (Makefile.am): Remove explicit dependency on
18756         $(BYTESWAP_H), redundant through BUILT_SOURCES.
18757         * modules/fnmatch (Makefile.am): Remove explicit dependency on
18758         $(FNMATCH_H), redundant through BUILT_SOURCES.
18759         * modules/getopt (Makefile.am): Remove explicit dependency on
18760         $(GETOPT_H), redundant through BUILT_SOURCES.
18761         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
18762         redundant through BUILT_SOURCES.
18763         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
18764         redundant through BUILT_SOURCES.
18765         * modules/stdbool (Makefile.am): Remove explicit dependency on
18766         $(STDBOOL_H), redundant through BUILT_SOURCES.
18767         * modules/stdint (Makefile.am): Remove explicit dependency on
18768         $(STDINT_H), redundant through BUILT_SOURCES.
18769         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
18770         Remove explicit dependency on $(SYSEXITS_H).
18771         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
18772
18773 2005-07-18  Simon Josefsson  <jas@extundo.com>
18774
18775         * lib/check-version.c (check_version): Accept identical versions too.
18776
18777 2005-07-18  Bruno Haible  <bruno@clisp.org>
18778
18779         * modules/lock: New file.
18780         * MODULES.html.sh (Multithreading): New section.
18781
18782 2005-07-18  Bruno Haible  <bruno@clisp.org>
18783
18784         * m4/lock.m4: New file, from GNU gettext.
18785
18786 2005-07-18  Bruno Haible  <bruno@clisp.org>
18787
18788         * lib/lock.h: New file, from GNU gettext.
18789         * lib/lock.c: New file, from GNU gettext.
18790
18791 2005-07-18  Bruno Haible  <bruno@clisp.org>
18792
18793         * lib/lock.h (gl_once_t): New type.
18794         (gl_once_define, gl_once): New macros.
18795         * lib/lock.c (fresh_once): New variable.
18796         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
18797         functions.
18798
18799 2005-07-16  Simon Josefsson  <jas@extundo.com>
18800
18801         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
18802         workaround, suggested by Bruno.
18803
18804 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
18805
18806         * modules/xalloc (Depends-on): Add xalloc-die.
18807         * modules/xvasprintf (Depends-on): Add xalloc-die.
18808
18809 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
18810
18811         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
18812         with a minor change.
18813
18814 2005-07-15  Bruno Haible  <bruno@clisp.org>
18815
18816         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
18817         When using lib/poll.c, define poll as rpl_poll.
18818
18819 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
18820
18821         * modules/argp (Depends-on): Remove unlocked-io.
18822
18823 2005-07-14  Derek Price  <derek@ximbiot.com>
18824
18825         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
18826         for glob symlink bug.
18827
18828 2005-07-14  Bruno Haible  <bruno@clisp.org>
18829
18830         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
18831         Instead, test for *_unlocked function declarations directly.
18832
18833 2005-07-11  Simon Josefsson  <jas@extundo.com>
18834
18835         * modules/size_max: New file.
18836
18837         * modules/xsize: Depend on size_max module for size_max.m4.
18838
18839 2005-07-11  Simon Josefsson  <jas@extundo.com>
18840
18841         * lib/size_max.h: New file.
18842
18843 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
18844
18845         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
18846         copyright symbol and the year.
18847         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
18848         (version_etc_va): Use parameterized copyright notice.
18849         Reword to conform to the current GNU coding standards.
18850
18851 2005-07-11  Karl Berry  <karl@gnu.org>
18852
18853         * doc/gnulib.texi (Quoting): new node.
18854         (Initial import): more info, from Patrice.
18855
18856 2005-07-11  Bruno Haible  <bruno@clisp.org>
18857
18858         * gnulib-tool (func_usage): Document option --avoid.
18859         (Command line options): Handle --avoid.
18860         (func_acceptable): New function.
18861         (func_modules_transitive_closure): Use it.
18862
18863 2005-07-11  Bruno Haible  <bruno@clisp.org>
18864
18865         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
18866         Reported by Jim Meyering.
18867
18868 2005-07-10  Bruno Haible  <bruno@clisp.org>
18869
18870         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
18871         Needed when size_t is smaller than 'unsigned int'.
18872         Reported by Paul Eggert.
18873
18874 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
18875
18876         * modules/argp (Depends-on): Add unlocked-io
18877
18878 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
18879
18880         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
18881         block of defines.
18882
18883 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
18884
18885         * config/srclist.txt: Comment out regcomp.c, since we have a porting
18886         fix now.
18887
18888 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
18889         and Paul Eggert  <eggert@cs.ucla.edu>
18890
18891         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
18892         in wint_t, not wchar_t.  Remove now-unnecessary cast.
18893
18894 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
18895
18896         * modules/regex (Files): Add lib/regex_internal.c,
18897         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
18898         (Depends-on): Add extensions.
18899         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
18900
18901 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
18902
18903         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
18904         pathconf.
18905         * m4/same.m4 (gl_SAME): Likewise.
18906         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
18907
18908         * m4/regex.m4: Adjust to new libc regex implementation.
18909         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
18910         all the .c and .h parts of (the new) regex.
18911         Quote the m4 stuff better.
18912         Check for RE_ICASE bug of old gnulib.
18913         Check for REG_STARTEND of recent libc.
18914         Rename local variables from jm_* to gl_*.
18915         Quote operand of "test -f".
18916         Say "recent enough" version of libc, not "version 2".
18917         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
18918         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
18919         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
18920         Remove check for btowc, isascii.
18921         Require AM_LANGINFO_CODESET.
18922
18923 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
18924
18925         * lib/regex.c, regex.h: Sync from libc.
18926         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
18927         * lib/regexec.c:
18928         New files, synced from libc, except that regex_internal.h
18929         currently has a small porting fix.
18930
18931 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
18932
18933         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
18934         regex_internal.c, regexec.c.
18935         Add regex_internal.h too, but as a comment, since the libc version
18936         is currently broken in gnulib mode.
18937
18938 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
18939
18940         Support programs like Emacs that use gnulib but not gettext.
18941         * MODULES.html.sh (Internationalization functions): Add gettext-h.
18942         * modules/gettext-h: New file.
18943         * modules/gettext (Files): Remove lib/gettext.h.
18944         (Depends-on): Add gettext-h.
18945         (Makefile.am): Remove lib_SOURCES.
18946         * modules/argmatch, modules/c-stack, modules/closeout:
18947         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
18948         * modules/execute, modules/file-type, modules/getaddrinfo:
18949         * modules/getopt, modules/human, modules/javacomp:
18950         * modules/javaexec, modules/mkdir-p, modules/obstack:
18951         * modules/openat, modules/pagealign_alloc, modules/pipe:
18952         * modules/quotearg, modules/regex, modules/rpmatch:
18953         * modules/unicodeio, modules/userspec, modules/version-etc:
18954         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
18955         * modules/xsetenv:
18956         Depend on gettext-h, not gettext.
18957
18958 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
18959
18960         * gnulib-tool (func_import): Add support for 'public domain' license.
18961         * modules/alloca, modules/atexit, modules/memmove:
18962         Now public domain, not GPL.
18963         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
18964         * modules/realloc, modules/strerror, modules/strtod:
18965         Now LGPL, not GPL.
18966
18967 2005-07-05  Bruno Haible  <bruno@clisp.org>
18968
18969         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
18970         autoconf CVS. Needed for mingw.
18971
18972 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
18973
18974         Remove the dependency of the strftime module on the tzset module.
18975         * modules/strftime (Depends-on): Remove dependency on tzset.
18976
18977 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
18978
18979         Remove the dependency of the strftime module on the tzset module.
18980         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
18981         gl_FUNC_TZSET_CLOBBER.
18982
18983 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
18984
18985         Remove the dependency of the strftime module on the tzset module.
18986         * lib/strftime.c (my_strftime)
18987         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
18988         Copy the input structure, to work around some of the bug with
18989         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
18990         Solaris releases, you should also use the tzset module, but we won't
18991         require it as a dependency any more since we don't want LGPLed code
18992         to depend on GPLed code.
18993
18994 2005-07-02  Jim Meyering  <jim@meyering.net>
18995
18996         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
18997         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
18998         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
18999         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
19000
19001 2005-07-02  Jim Meyering  <jim@meyering.net>
19002
19003         * lib/backupfile.c (backup_args): Change a `0' to NULL.
19004
19005 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
19006
19007         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
19008         declares only 'struct timespec;' (!).
19009
19010 2005-07-01  Jim Meyering  <jim@meyering.net>
19011
19012         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
19013         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
19014         * lib/save-cwd.c, tempname.c:
19015         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
19016         and don't include <sys/file.h>).
19017
19018 2005-06-29  Jim Meyering  <jim@meyering.net>
19019
19020         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
19021         type name.  Use the variable name instead.
19022         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
19023         Likewise.
19024
19025 2005-06-28  Simon Josefsson  <jas@extundo.com>
19026
19027         * modules/check-version (Files): Add check-version.m4.
19028
19029 2005-06-28  Simon Josefsson  <jas@extundo.com>
19030
19031         * m4/check-version.m4: New file, suggested by Jim Meyering
19032         <jim@meyering.net>.
19033
19034 2005-06-28  Simon Josefsson  <jas@extundo.com>
19035
19036         * lib/check-version.h, lib/check-version.c: New files.
19037
19038 2005-06-28  Simon Josefsson  <jas@extundo.com>
19039
19040         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
19041         collision with global variable.  Better indentation.  Don't
19042         increment buffer pointer beyond buffer end.  Based on comments
19043         from Paul Eggert <eggert@cs.ucla.edu>.
19044
19045         * lib/base64.h: Indent.
19046
19047 2005-06-28  Simon Josefsson  <jas@extundo.com>
19048
19049         * doc/gnulib.texi (Library version handling): New section.
19050
19051 2005-06-28  Jim Meyering  <jim@meyering.net>
19052
19053         * check-module (find_included_lib_files): Hard-code another
19054         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
19055         but modules/fts-lgpl (correctly) does not list those files.
19056
19057         * modules/canonicalize (Files): Add lib/pathmax.h.
19058
19059 2005-06-25  Simon Josefsson  <jas@extundo.com>
19060
19061         * modules/check-version: New file.
19062
19063 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
19064
19065         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
19066         initializer of struct addrinfo, as an indication that we don't
19067         care how many members the structure has.
19068
19069 2005-06-24  Derek Price  <derek@ximbiot.com>
19070         and Bruno Haible  <bruno@clisp.org>
19071
19072         Remove stat module & update lstat.
19073         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
19074         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
19075         * m4/stat.m4: Remove this file.
19076
19077 2005-06-24  Derek Price  <derek@ximbiot.com>
19078         and Bruno Haible  <bruno@clisp.org>
19079
19080         Remove stat module & update lstat.
19081         * lib/stat.c: Remove this file...
19082         (slash_aware_lstat): ...moving this content and its support...
19083         * lib/lstat.c (rpl_lstat): ...into here.
19084         * lib/lstat.h: New file.
19085
19086 2005-06-24  Derek Price  <derek@ximbiot.com>
19087         and Bruno Haible  <bruno@clisp.org>
19088
19089         Remove stat module & update lstat.
19090         * config/srclist.txt (libc sources): Remove stat.
19091
19092 2005-06-24  Derek Price  <derek@ximbiot.com>
19093         and Bruno Haible  <bruno@clisp.org>
19094
19095         Remove stat module & update lstat.
19096         * MODULES.html.sh (stat): Remove.
19097         * MODULES.html: Regenerated.
19098         * modules/lstat (Description): Correct function name.
19099         (Files): Add "lstat.h".
19100         (Depends-on): Remove stat, add xalloc, stat-macros.
19101         * modules/stat: Remove this file.
19102         (Include): Add "lstat.h", remove <sys/stat.h>.
19103
19104 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
19105
19106         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
19107         (ranged_convert): Don't save conversion in a temporary struct.
19108         This causes a warning with GCC 4.0.0, and anyway in the typical
19109         case it's not worth the extra 100 bytes or so of code.
19110         (ranged_convert, __mktime_internal): When calling a function via a
19111         pointer P, use P () rather than (*P) (), as we now assume C89 or
19112         better.
19113
19114 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
19115
19116         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
19117         "who -r" failed to give output.  Problem reported by Tim Waugh.
19118
19119         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
19120         (xcalloc): Use it to avoid needless tests.
19121         Problem reported by Jim Meyering.
19122
19123 2005-06-20  Derek Price  <derek@ximbiot.com>
19124
19125         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
19126         unnecessary for Autoconfs > 2.59c.
19127
19128 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
19129
19130         * lib/argp.h (__option_is_short): Check upper limit of
19131         __key. Isprint() requires its argument to have the value
19132         of an unsigned char or EOF.
19133
19134 2005-06-16  Jim Meyering  <jim@meyering.net>
19135
19136         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
19137         when either N or S is zero.
19138
19139 2005-06-16  Derek Price  <derek@ximbiot.com>
19140
19141         * m4/bison.m4: Declare YACC & YFLAGS precious.
19142
19143 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
19144
19145         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
19146         multibyte string or pattern, fall back on unibyte matching.
19147         Problem reported by James Youngman.
19148
19149 2005-06-08  Bruno Haible  <bruno@clisp.org>
19150
19151         * modules/csharpcomp: New file.
19152         * MODULES.html.sh (C#): Add csharpcomp.
19153
19154 2005-06-08  Bruno Haible  <bruno@clisp.org>
19155
19156         * m4/csharpcomp.m4: New file, from GNU gettext.
19157
19158 2005-06-08  Bruno Haible  <bruno@clisp.org>
19159
19160         * lib/csharpcomp.h: New file, from GNU gettext.
19161         * lib/csharpcomp.c: New file, from GNU gettext.
19162         * lib/csharpcomp.sh.in: New file, from GNU gettext.
19163
19164 2005-06-08  Bruno Haible  <bruno@clisp.org>
19165
19166         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
19167         warning on mingw.
19168
19169 2005-06-07  Derek Price  <derek@ximbiot.com>
19170
19171         Sync from CVS.
19172         * lib/glob_.h: Indent nested #ifdef.
19173
19174 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
19175
19176         Sync from coreutils.
19177         Use "file name" when talking about file names, instead of "filename"
19178         or "path", as per the GNU coding standards.
19179         * lib/mkdir-p.c: Renamed from makepath.c.
19180         (make_dir_parents): Renamed from make_path.  All callers changed.
19181         * lib/mkdir-p.h: Likewise.  All includers changed.
19182         * lib/filenamecat.c: Renamed from path-concat.c.
19183         (file_name_concat): Renamed from path_concat.  All callers changed.
19184         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
19185         * lib/filenamecat.h: Likewise.  All includers changed.
19186         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
19187         in comments or local variable names.
19188         * lib/basename.c: Likewise.
19189         * lib/canonicalize.c, canonicalize.h: Likewise.
19190         * lib/dirname.c, dirname.h: Likewise.
19191         * lib/euidaccess.c: Likewise.
19192         * lib/exclude.c: Likewise
19193         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
19194         * lib/fsusage.c, fsuage.h: Likewise.
19195         * lib/fts.c, fts_.h: Likewise.
19196         * lib/getcwd.c: Likewise.
19197         * lib/getloadavg.c: Likewise.
19198         * lib/mkstemp.c: Likewise.
19199         * lib/mountlist.c, mountlist.h: Likewise.
19200         * lib/openat.c, openat.h: Likewise.
19201         * lib/readlink-stub.c: Likewise.
19202         * lib/readutmp.c, readutmp.h: Likewise.
19203         * lib/rename.c: Likewise.
19204         * lib/rmdir.c: Likewise.
19205         * lib/same.c: Likewise.
19206         * lib/savedir.c: Likewise.
19207         * lib/stripslash.c: Likewise.
19208         * lib/tempname.c: Likewise.
19209         * lib/xreadlink.c: Likewise.
19210         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
19211         All uses changed.
19212         * lib/exclude.h: Likewise.
19213
19214         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
19215         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
19216         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
19217         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
19218         * lib/pathmax.h: Include <limits.h> unconditionally, since other
19219         files have been getting away with it for years (MORE/BSD 4.3
19220         is extinct now).
19221         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
19222         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
19223
19224         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
19225         Define to 256, not 255, as per modern POSIX.
19226
19227 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
19228
19229         Sync from coreutils.
19230         Use "file name" when talking about file names, instead of "filename"
19231         or "path", as per the GNU coding standards.
19232         * MODULES.html.sh: mkdir-p renamed from makepath.
19233         filenamecat renamed from path-concat.
19234         * modules/filenamecat: Renamed from modules/path-concat.
19235         (Files): filenamecat.h and filenamecat.c renamed from
19236         path-concat.h and path-concat.c.
19237         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
19238         (Include): filenamecat.h, not path-concat.h.
19239         * modules/mkdir-p: Renamed from modules/makepath.
19240         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
19241         makepath.c.
19242         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
19243         (Include): mkdir-p.h, not makepath.h.
19244
19245 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
19246
19247         Sync from coreutils.
19248         * m4/mkdir-p.m4: Renamed from makepath.m4.
19249         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
19250         Rename files from makepath.c to mkdir-p.c, and from
19251         makepath.h to mkdir-p.h.
19252         * m4/filenamecat.m4: Renamed from path-concat.m4.
19253         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
19254         Rename files from path-concat.c to filenamecat.c,
19255         and from path-concat.h to filenamecat.h.
19256         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
19257         "file name" in local variables or comments.
19258         * m4/rename.m4: Likewise.
19259
19260 2005-06-01  Bruno Haible  <bruno@clisp.org>
19261
19262         * modules/csharpexec: New file.
19263         * MODULES.html.sh (C#): New section.
19264
19265 2005-06-01  Bruno Haible  <bruno@clisp.org>
19266
19267         * m4/csharp.m4: New file, from GNU gettext.
19268         * m4/csharpexec.m4: New file, from GNU gettext.
19269
19270 2005-06-01  Bruno Haible  <bruno@clisp.org>
19271
19272         * lib/csharpexec.h: New file, from GNU gettext.
19273         * lib/csharpexec.c: New file, from GNU gettext.
19274         * lib/csharpexec.sh.in: New file, from GNU gettext.
19275
19276 2005-05-31  Derek Price  <derek@ximbiot.com>
19277             Paul Eggert  <eggert@cs.ucla.edu>
19278
19279         Sync from cvs.
19280         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
19281
19282 2005-05-31  Derek Price  <derek@ximbiot.com>
19283             Paul Eggert  <eggert@cs.ucla.edu>
19284
19285         Sync from cvs.
19286         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
19287
19288 2005-05-29  Derek Price  <derek@ximbiot.com>
19289
19290         * config/srclist.txt (glob_.h, glob.c): Add these files.
19291
19292 2005-05-29  Derek Price  <derek@ximbiot.com>
19293
19294         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
19295         * modules/glob: New file.
19296         * modules/getlogin_r: Add link to POSIX spec in description.
19297
19298 2005-05-29  Derek Price  <derek@ximbiot.com>
19299             Paul Eggert  <eggert@cs.ucla.edu>
19300
19301         * m4/glob.m4: New file.
19302
19303 2005-05-29  Derek Price  <derek@ximbiot.com>
19304             Paul Eggert  <eggert@cs.ucla.edu>
19305
19306         * lib/glob_.h, lib/glob.c: New files.
19307
19308 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
19309
19310         * modules/fts (Files): Remove m4/inttypes-pri.m4.
19311         * modules/fts-lgpl (Depends-on): Remove gettext.
19312
19313 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
19314
19315         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
19316         and don't require gt_INTTYPES_PRI.
19317
19318 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
19319
19320         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
19321
19322         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
19323         the configuration hassle isn't worth it.
19324         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
19325         (LONGEST_MODIFIER, PRIuMAX): Remove.
19326
19327 2005-05-27  Bruno Haible  <bruno@clisp.org>
19328
19329         * lib/getlogin_r.h: Remove second include of <stddef.h>.
19330
19331 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
19332
19333         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
19334         _POSIX_PTHREAD_SEMANTICS for Solaris.
19335
19336 2005-05-25  Derek Price  <derek@ximbiot.com>
19337
19338         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
19339
19340 2005-05-25  Derek Price  <derek@ximbiot.com>
19341             Paul Eggert  <eggert@cs.ucla.edu>
19342
19343         * modules/getlogin_r, m4/getlogin_r.m4: New files.
19344         * lib/getlogin_r.c, getlogin_r.h: New files.
19345
19346 2005-05-25  Bruno Haible  <bruno@clisp.org>
19347             Derek Price  <derek@ximbiot.com>
19348
19349         * lib/getlogin_r.h: Simplify API documentation.
19350
19351 2005-05-23  Derek Price  <derek@ximbiot.com>
19352
19353         * modules/minmax (Files): Add m4/minmax.m4.
19354         (configure.ac): Add gl_MINMAX.
19355
19356 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
19357
19358         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
19359         so that unistd-safer.h (GPL'ed code) need not be included.
19360
19361 2005-05-22  Bruno Haible  <bruno@clisp.org>
19362
19363         * m4/minmax.m4: New file.
19364         Based on a patch by Derek Price <derek@ximbiot.com>.
19365
19366 2005-05-22  Bruno Haible  <bruno@clisp.org>
19367
19368         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
19369         (INT64_MIN): Fix definition.
19370         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
19371
19372         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
19373         NEED_SIGNED_INT_TYPES.
19374
19375         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
19376         HAVE_SYSTEM_INTTYPES.
19377
19378 2005-05-22  Bruno Haible  <bruno@clisp.org>
19379
19380         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
19381         Also include <sys/param.h> if it defines MIN, MAX.
19382         Based on a patch by Derek Price <derek@ximbiot.com>.
19383
19384 2005-05-21  Jim Meyering  <jim@meyering.net>
19385
19386         * modules/fts (Files): Add m4/inttypes-pri.m4.
19387         (Depends-on): Add lstat and remove gettext.  Alphabetize.
19388
19389 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
19390
19391         New fts module.
19392         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
19393         (setup_dir, free_dir): New functions.
19394         (enter_dir, leave_dir): Define trivial
19395         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
19396         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
19397         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
19398         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
19399         Move to fts-cycle.c.
19400         (fts_open): Use setup_dir.
19401         (fts_close): Use free_dir.
19402         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
19403         This adds a label and some gotos, but the alternatives were messier.
19404         Check for memory allocation failure when entering a dir.
19405         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
19406         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
19407         (FTS): New member fts_cycle, that is a union that contains the
19408         old active_dir_ht and cycle_state.  All uses changed to mention
19409         fts_cycle.ht and fts_cycle.state.
19410         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
19411         fts.c, with the following changes:
19412         (setup_dir, free_dir): New functions.
19413         (enter_dir): Now returns bool.  Return true if successful, false
19414         if memory exhausted.  All callers changed.
19415         Do not bother partly cleaning up on
19416         memory allocation failure; that is free_dir's job.
19417         However, free ad if hash_insert fails, to avoid memory leak.
19418         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
19419         fts->fts_options to see which union member to use.
19420
19421 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
19422
19423         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
19424         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
19425
19426 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
19427
19428         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
19429
19430 2005-05-20  Jim Meyering  <jim@meyering.net>
19431
19432         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
19433         Now a macro, to pacify GCC.
19434
19435 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
19436
19437         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
19438         of -1.
19439
19440 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
19441
19442         * lib/chown.c (rpl_chown): Return -1 on failure.
19443
19444 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
19445
19446         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
19447         Don't check for stddef.h.
19448         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
19449         don't use its results.
19450         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
19451         since we include them unconditionally.  Don't require
19452         AM_STDBOOL_H, since stdbool is a prerequisite.
19453         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
19454         since we assume C89 or better.
19455         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
19456         as we don't use their results.
19457         Don't check for fchdir, memmove, memset, strrchr, as we use
19458         them unconditionally.
19459         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
19460         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
19461
19462 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
19463
19464         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
19465         Include <stddef.h> unconditionally, since we assume C89 now.
19466         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
19467         * lib/fts.c: Include fts_.h first, to check interface.
19468         Do not include intprops.h; no longer needed.
19469         Include cycle-check.h and hash.h, since fts_.h no longer does.
19470         Remove unnecessary casts of closedir to void.
19471         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
19472         decide whether to decrement nlinks.
19473         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
19474         (FTS): Use struct hash_table * instead of Hash_table, so that
19475         we no longer need to include hash.h here.
19476
19477 2005-05-18  Jim Meyering  <jim@meyering.net>
19478
19479         * modules/dirfd (License): Change to LGPL.  Most of the code
19480         is already in the public domain.
19481
19482 2005-05-18  Jim Meyering  <jim@meyering.net>
19483
19484         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
19485         Reported by Yoann Vandoorselaere.
19486
19487 2005-05-17  Jim Meyering  <jim@meyering.net>
19488
19489         * m4/fts.m4: New file, from coreutils.
19490
19491 2005-05-17  Jim Meyering  <jim@meyering.net>
19492
19493         * lib/fts.c, lib/fts_.h: New files, from coreutils.
19494
19495 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
19496
19497         Sync from coreutils.
19498         * m4/unlinkdir.m4: New file.
19499
19500 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
19501
19502         Sync from coreutils.
19503         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
19504         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
19505         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
19506         White space changes only.
19507         * lib/makepath.c (make_path): Port to hosts where leading "//" is
19508         special.
19509         * lib/yesno.c: Include getline.h, not ctype.h.
19510         (yesno): Don't remove leading white space; POSIX doesn't allow it.
19511         Use getline to remove arbitrary restriction on response length.
19512
19513 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
19514
19515         * config/srclist-update: Spell out "Street" in FSF postal
19516         mail address; this is the style the FSF seems to prefer.
19517
19518         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
19519         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
19520         this updates FSF postal mail address.
19521
19522         Sync from coreutils.
19523         * modules/unlinkdir: New file.
19524         * modules/yesno (Depends-on): Add getline.
19525         * MODULES.html.sh (File system functions): Add unlinkdir.
19526
19527 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
19528
19529         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
19530         lib/strsep.h:
19531         Change the initial comment to refer to GPL, not LGPL.
19532         gnulib-tool will change it to LGPL as needed.
19533
19534         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
19535         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
19536         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
19537         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
19538         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
19539         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
19540         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
19541         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
19542         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
19543         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
19544         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
19545         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
19546         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
19547         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
19548         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
19549         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
19550         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
19551         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
19552         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
19553         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
19554         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
19555         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
19556         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
19557         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
19558         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
19559         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
19560         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
19561         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
19562         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
19563         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
19564         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
19565         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
19566         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
19567         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
19568         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
19569         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
19570         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
19571         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
19572         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
19573         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
19574         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
19575         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
19576         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
19577         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
19578         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
19579         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
19580         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
19581         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
19582         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
19583         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
19584         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
19585         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
19586         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
19587         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
19588         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
19589         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
19590         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
19591         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
19592         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
19593         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
19594         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
19595         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
19596         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
19597         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
19598         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
19599         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
19600         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
19601         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
19602         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
19603         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
19604         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
19605         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
19606         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
19607         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
19608         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
19609         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
19610         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
19611         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
19612         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
19613         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
19614         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
19615         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
19616         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
19617         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
19618         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
19619         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
19620         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
19621         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
19622         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
19623         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
19624         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
19625         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
19626         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
19627         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
19628         lib/yesno.c, lib/yesno.h:
19629         Update FSF postal mail address.
19630
19631 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
19632
19633         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
19634         tests/test-memmem.c, tests/test-stpncpy.c:
19635         Update FSF postal mail address.
19636
19637 2005-05-13  Bruno Haible  <bruno@clisp.org>
19638
19639         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
19640         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
19641         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
19642         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
19643         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
19644         Add support for 64-bit integers in the MSVC compiler.
19645
19646 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
19647
19648         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
19649
19650 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
19651
19652         * gnulib-tool (func_import): Sort and uniquify recommended includes.
19653
19654 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
19655
19656         * doc/getdate.texi (General date syntax): Don't say that date
19657         date --iso-8601=ns generates acceptable dates; it doesn't yet.
19658         Problem reported by Nic Ferrier.
19659
19660 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
19661
19662         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
19663         specified in ai_socktype. Fix invalid ai_protocol
19664         check. ai_protocol is usually set to 0 or depending on
19665         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
19666         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
19667         ai_socktype / ai_protocol in the returned addrinfo structure.
19668
19669 2005-05-10  Simon Josefsson  <jas@extundo.com>
19670
19671         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
19672         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
19673
19674 2005-05-10  Karl Berry  <karl@gnu.org>
19675
19676         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
19677         (from http://www.gnu.org/licenses).
19678         * doc/COPYING.LIB: also rename to COPYING.LESSER.
19679         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
19680         fdl.texi suffices.
19681
19682 2005-05-10  Karl Berry  <karl@gnu.org>
19683
19684         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
19685         (COPYING.DOC): remove.
19686
19687         * config/srclist-update: new FSF address.
19688
19689 2005-05-10  Derek Price  <derek@ximbiot.com>
19690
19691         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
19692         possible.
19693
19694 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
19695             Bruno Haible  <bruno@clisp.org>
19696
19697         * modules/inet_ntop: New file.
19698         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
19699         inet_ntop.
19700
19701 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
19702             Bruno Haible  <bruno@clisp.org>
19703
19704         * m4/inet_ntop.m4: New file.
19705
19706 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
19707             Bruno Haible  <bruno@clisp.org>
19708
19709         * lib/inet_ntop.h: New file.
19710         * lib/inet_ntop.c: New file, from glibc with modifications.
19711
19712 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
19713
19714         * modules/time_r (License): Change to LGPL.
19715         * modules/extensions (License): Change to LGPL.  Actually,
19716         the license is more permissive than that, but currently gnulib-tool
19717         doesn't know how to handle more-permissive licenses.
19718
19719         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
19720         Problem reported by Dave Love.
19721
19722 2005-05-08  Jim Meyering  <jim@meyering.net>
19723
19724         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
19725         blank.
19726
19727 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
19728
19729         * modules/argmatch (Depends-on): Add stdbool.
19730         * modules/backupfile (Depends-on): Likewise.
19731         * modules/chdir-long (Depends-on): Likewise.
19732         * modules/closeout (Depends-on): Likewise.
19733         * modules/cycle-check (Depends-on): Likewise.
19734         * modules/dirname (Depends-on): Likewise.
19735         * modules/fnmatch (Depends-on): Likewise.
19736         * modules/fsusage (Depends-on): Likewise.
19737         * modules/fwriteerror (Depends-on): Likewise.
19738         * modules/getcwd (Depends-on): Likewise.
19739         * modules/getloadavg (Depends-on): Likewise.
19740         * modules/hard-locale (Depends-on): Likewise.
19741         * modules/makepath (Depends-on): Likewise.
19742         * modules/mountlist (Depends-on): Likewise.
19743         * modules/nanosleep (Depends-on): Likewise.
19744         * modules/posixtm (Depends-on): Likewise.
19745         * modules/quotearg (Depends-on): Likewise.
19746         * modules/readtokens (Depends-on): Likewise.
19747         * modules/readtokens0 (Depends-on): Likewise.
19748         * modules/readutmp (Depends-on): Likewise.
19749         * modules/save-cwd (Depends-on): Likewise.
19750         * modules/strftime (Depends-on): Likewise.
19751         * modules/userspec (Depends-on): Likewise.
19752         * modules/utimecmp (Depends-on): Likewise.
19753         * modules/xgetcwd (Depends-on): Likewise.
19754         * modules/xnanosleep (Depends-on): Likewise.
19755         * modules/xstrtod (Depends-on): Likewise.
19756         * modules/yesno (Depends-on): Likewise.
19757
19758 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
19759
19760         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
19761         needless checks.
19762
19763 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
19764
19765         Merge from coreutils.  Among other things,
19766         add bulletproofing for cases where stdin, stdout, or stderr are closed.
19767         * lib/fd-safer.c: New file.
19768         * lib/fcntl-safer.h, open-safer.c: Remove.
19769         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
19770         * lib/dup-safer.c: Include unistd-safer.h first.
19771         Don't include errno.h.
19772         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
19773         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
19774         * lib/file-type.c: Rely on file-type.h change.
19775         * lib/getloadavg.c: Include unistd-safer.h.
19776         (getloadavg): Use safer open.
19777         * lib/getusershell.c: Include "stdio-safer.h".
19778         (getusershell): Use safer fopen.
19779         * lib/long-options.c (long_options): Use NULL rather than 0.
19780         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
19781         'free'.
19782         * lib/modechange.c: Likewise.
19783         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
19784         (MODE_DONE): New constant.
19785         (struct mode_change): Remove 'next' member.
19786         (make_node_op_equals): New function; like the old one of the
19787         same name, except it allocates an array.
19788         (mode_compile, mode_create_from_ref): Use it.
19789         (mode_compile): Allocate result as an array, not a linked list.
19790         Parse octal string ourself, so that we catch mistakes like "+0".
19791         (mode_adjust): Arg is an array, not a linked list.
19792         * lib/modechange.c: Include stat-macros.h, xalloc.h.
19793         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
19794         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
19795         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
19796         Remove.  This is now stat-macros.h's job.
19797         (talloc): Remove.  All callers replaced by xalloc, so that
19798         our invokers don't have to worry about reporting memory failures.
19799         (make_node_op_equals): Remove.
19800         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
19801         New constants.
19802         (struct mode_change): Moved here from modechange.h.
19803         (mode_append_entry): Remove.
19804         (mode_compile): Remove MASKED_OPS arg, since it encouraged
19805         apps to have incorrect behavior.  Use simpler algorithm for head
19806         and tail.  Don't futz with umask; that's now the job of mode_adjust.
19807         Detect more invalid usages rather than having somewhat-random behavior.
19808         Don't insert an "a=" action, as that leads to incorrect behavior.
19809         (mode_compile, mode_create_from_ref): Return NULL on error instead
19810         of an enum, since now there's only one way to have an error.  All
19811         callers changed.
19812         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
19813         at the correct time.  Simplify calculation of "+u" and its ilk.
19814         Don't mishandle "+X".
19815         (mode_free): Remove "register" and localize decls.
19816         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
19817         (struct mode_change): Move to modechange.c; callers don't
19818         need to see this stuff.
19819         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
19820         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
19821         (mode_change, mode_adjust): Reflect the new signatures noted above.
19822         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
19823         that might redefine system include files.
19824         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
19825         (my_usleep): Use NULL rather than (void *) 0.
19826         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
19827         Use siginterrupt to specify that system calls should be interrupted.
19828         (rpl_nanosleep): Move initialization of suspended closer to call of
19829         my_usleep.
19830         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
19831         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
19832         (desirable_utmp_entry): New function.
19833         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
19834         using x2nrealloc, to simplify logic.
19835         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
19836         size calculation.  Do not assume utmp file is a regular file.
19837         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
19838         (READ_UTMP_CHECK_PIDS): New constant.
19839         * lib/save-cwd.c: Include unistd-safer.h.
19840         (save_cwd): Use fd_safer.
19841         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
19842         [!_LIBC] Include "stat-macros.h" instead.
19843         * lib/unistd-safer.h (fd_safer): New decl.
19844
19845 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
19846
19847         * modules/getloadavg (Depends-on): Add unistd-safer.
19848         * modules/getusershell (Depends-on): Add stdio-safer.
19849         * modules/lstat (Depends-on): Remove xalloc.
19850         * modules/mkstemp (Depends-on): Add stat-macros.
19851         * modules/modechange (Depends-on): Remove xstrtol.
19852         Add stat-macros, xalloc.
19853         * modules/save-cwd (Depends-on): Add unistd-safer.
19854         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
19855         * modules/unistd-safer (Files): Add lib/fd-safer.c
19856         (Makefile.am): Remove lib_SOURCES.
19857
19858         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
19859         Remove fcntl-safer; unistd-safer supersedes it.
19860
19861 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
19862
19863         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
19864         AC_HEADER_STAT.
19865         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
19866         (gl_PREREQ_CHOWN): Remove.
19867         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
19868         it.  Don't require AC_HEADER_STAT.
19869         (gl_PREREQ_LSTAT): Remove.
19870         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
19871         Don't require AC_HEADER_STAT.
19872         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
19873         (gl_PREREQ_RMDIR): Remove.
19874         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
19875         mention stat-macros.h or AC_HEADER_STAT, since we'll make
19876         the stat-macros module a prerequisite.
19877         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
19878         * m4/filemode.m4 (gl_FILEMODE): Likewise.
19879         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
19880         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
19881         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
19882         variable names.
19883         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
19884         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
19885         variable prefixes.
19886         * m4/fcntl-safer.m4: Remove.
19887         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
19888         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
19889         Invoke gl_PREREQ_FD_SAFER.
19890         (gl_PREREQ_FD_SAFER): New macro.
19891         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
19892         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
19893         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
19894         Remove duplicate call to AC_LIBOBJ(readutmp).
19895         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
19896
19897         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
19898         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
19899
19900 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
19901
19902         * MODULES.html.sh (Misc): Add byteswap.
19903
19904 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
19905
19906         * modules/getcwd (Depends-on): Add extensions.
19907         * modules/openat (Depends-on): Likewise.
19908
19909 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
19910
19911         * modules/byteswap: New file.
19912
19913 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
19914
19915         * m4/byteswap.m4: New file.
19916
19917 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
19918
19919         * lib/byteswap_.h: New file.
19920
19921 2005-04-25  Karl Berry  <karl@gnu.org>
19922
19923         * m4/gettext.m4: Update from GNU gettext 0.14.4.
19924
19925 2005-04-25  Albert Chin  <china@thewrittenword.com>
19926
19927         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
19928         Toolkit C bug.
19929
19930 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
19931
19932         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
19933         (func_ln_if_changed) Remove forcibly for no error message
19934         in case file does not exist.
19935
19936 2005-04-19  Simon Josefsson  <jas@extundo.com>
19937
19938         * gnulib-tool (Options): Make --symlink mean --symbolic.
19939
19940 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
19941
19942         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
19943
19944 2005-04-16  Simon Josefsson  <jas@extundo.com>
19945
19946         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
19947
19948 2005-04-15  Simon Josefsson  <jas@extundo.com>
19949
19950         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
19951
19952 2005-04-15  Simon Josefsson  <jas@extundo.com>
19953
19954         * gnulib-tool: Rename --symlink to --symbolic.
19955
19956 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
19957
19958         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
19959         symbolic links to files instead of copying/moving.  Add --aux-dir,
19960         specifying directory relative --dir where auxiliary build tools
19961         are placed.
19962
19963 2005-04-14  Bruno Haible  <bruno@clisp.org>
19964
19965         * modules/allocsa (License): Change to LGPL.
19966         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
19967
19968 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
19969
19970         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
19971         that "UTC +1 second" continues to work.  Problem reported
19972         by Dmitry V. Levin.
19973         (relunit_snumber): New rule.
19974         (relunit): Use it.
19975
19976 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
19977
19978         * lib/getdate.y (universal_time_zone_table): New constant.
19979         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
19980         universal_time_zone_table.
19981         (lookup_zone): Prefer universal_time_zone_table to
19982         local_time_zone_table, so that "GMT" time stamps are allowed in
19983         London during the summer.  Problem reported by Ian Abbott.
19984
19985 2005-04-12  Jim Meyering  <jim@meyering.net>
19986
19987         * lib/human.c (humblock): Set *options even when returning due to
19988         xstrtoumax conversion failure.  Thanks to a used-uninitialized
19989         warning from gcc-4.
19990
19991 2005-04-09  Jim Meyering  <jim@meyering.net>
19992
19993         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
19994         -Wuninitialized: initialize tm0.tm_year.
19995
19996 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
19997
19998         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
19999         count, since there's no maximum.  All uses changed.
20000         Add member dsts_seen.
20001         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
20002         not being INT_MAX.
20003         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
20004         Use pc_rels_seen to decide whther a date is absolute.
20005
20006         * lib/getdate.y (number): Don't overwrite year.
20007         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
20008         check.
20009
20010 2005-04-02  Simon Josefsson  <jas@extundo.com>
20011
20012         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
20013         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
20014
20015 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
20016
20017         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
20018         where no absolute path name can be longer than PATH_MAX.
20019
20020 2005-03-27  Jim Meyering  <jim@meyering.net>
20021
20022         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
20023
20024 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
20025
20026         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
20027         "one's complement" -> "ones' complement" in comment, as per Knuth.
20028         "value of type" -> "type or expression" in comment.
20029         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
20030
20031 2005-03-26  Jim Meyering  <jim@meyering.net>
20032
20033         Comment nits.
20034         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
20035         Correct typos: s/or/of/.
20036
20037 2005-03-26  Jim Meyering  <jim@meyering.net>
20038
20039         * modules/check-include-files: Move to ../ and rename to...
20040         * check-module: ...this.
20041
20042 2005-03-25  Jim Meyering  <jim@meyering.net>
20043
20044         * modules/xvasprintf (Files): Add xalloc.h.
20045
20046 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
20047
20048         * modules/gettext (Files): config/config.rpath ->
20049         build-aux/config.rpath
20050         * modules/iconv (Files): Likewise.
20051         Problem reported by Oskar Liljeblad.
20052
20053 2005-03-23  Jim Meyering  <jim@meyering.net>
20054
20055         * modules/check-include-files: New script to check for
20056         missing dependencies, multiple includes, etc.
20057
20058         * modules/c-strtold (Depends-on): Add xalloc.
20059         * modules/c-strtod (Depends-on): Add xalloc.
20060         * modules/hash (Depends-on): Add xalloc.
20061         (Files): Remove lib/xalloc.h.
20062
20063         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
20064         * modules/userspec (Files): Add lib/inttostr.h.
20065
20066 2005-03-23  Jim Meyering  <jim@meyering.net>
20067
20068         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
20069
20070 2005-03-22  Jim Meyering  <jim@meyering.net>
20071
20072         * modules/stat-macros: New module.
20073         * modules/canonicalize, modules/euidaccess, modules/file-type,
20074         * modules/filemode, modules/lchown, modules/makepath,
20075         * modules/rmdir, modules/stat: Depend on new stat-macros module
20076         rather than listing lib/stat-macros.h manually.
20077         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
20078
20079 2005-03-22  Jim Meyering  <jim@meyering.net>
20080
20081         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
20082
20083 2005-03-22  Bruno Haible  <bruno@clisp.org>
20084
20085         * config/srclist.txt: Replace target directory 'config' with
20086         'build-aux'.
20087         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
20088         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
20089         ../build-aux/.
20090
20091 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
20092
20093         * modules/chdir-long (Depends-on): Add mempcpy.
20094
20095         * modules/acl, modules/backupfile, modules/c-strtod,
20096         modules/c-strtold, modules/canon-host, modules/canonicalize,
20097         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
20098         modules/exclude, modules/exitfail, modules/file-type,
20099         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
20100         modules/getdate, modules/getline, modules/getpagesize,
20101         modules/getpass, modules/getugroups, modules/group-member,
20102         modules/hard-locale, modules/hash, modules/human, modules/idcache,
20103         modules/inttostr, modules/long-options, modules/makepath,
20104         modules/md5, modules/memcasecmp, modules/memcoll,
20105         modules/modechange, modules/mountlist, modules/path-concat,
20106         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
20107         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
20108         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
20109         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
20110         modules/strftime, modules/strndup, modules/strverscmp,
20111         modules/timespec, modules/unlocked-io, modules/userspec,
20112         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
20113         modules/yesno:
20114         Remove lib_SOURCES line from Makefile.am section, as this is now
20115         done automatically by the corresponding Autoconf macro.
20116
20117 2005-03-21  Jim Meyering  <jim@meyering.net>
20118
20119         Changes imported from coreutils.
20120
20121         * lib/cycle-check.c: Don't include xalloc.h.
20122
20123         * lib/path-concat.c: Don't include assert.h.
20124         (path_concat): Remove assertion that would have triggered
20125         for ABASE starting with more than one slash.
20126         Reported by Andreas Schwab.
20127
20128         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
20129         properly when ABASE is an absolute file name.
20130         Correct the description of this function.
20131         Include <assert.h>.
20132         Add an assertion and a test driver.
20133         This fixes a bug introduced on 2004-07-02.
20134         Andreas Schwab reported the resulting failure of cp --parents:
20135         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
20136
20137 2005-03-21  Jim Meyering  <jim@meyering.net>
20138
20139         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
20140         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
20141
20142 2005-03-21  Jim Meyering  <jim@meyering.net>
20143         and  Paul Eggert  <eggert@cs.ucla.edu>
20144
20145         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
20146         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
20147         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
20148         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
20149         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
20150         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
20151         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
20152         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
20153         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
20154         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
20155         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
20156         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
20157         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
20158         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
20159         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
20160         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
20161         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
20162         for these modules.
20163
20164 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
20165
20166         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
20167         (which shouldn't happen), generate nothing instead of returning 0
20168         immediately, so that nstrftime (NULL, ...) doesn't return 0.
20169
20170 2005-03-16  Bruno Haible  <bruno@clisp.org>
20171
20172         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
20173         HAVE_LONGLONG_64BIT.
20174
20175 2005-03-16  Bruno Haible  <bruno@clisp.org>
20176
20177         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
20178         HAVE_LONGLONG_64BIT.
20179
20180 2005-03-16  Bruno Haible  <bruno@clisp.org>
20181
20182         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
20183         HAVE_LONGLONG_64BIT.
20184
20185 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
20186
20187         * lib/strftime.c (my_strftime): Prepend space to format so that we can
20188         reliably distinguish strftime failure from empty output on POSIX
20189         hosts.
20190
20191 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
20192
20193         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
20194         (iconv_string): Don't guess a size-zero buffer, as that might cause
20195         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
20196         result would be 'too large', where 'too large' is (heuristically)
20197         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
20198         overflow concerns.  This will prevent some unwanted malloc failures
20199         when the inputs are very large.
20200
20201 2005-03-15  Karl Berry  <karl@gnu.org>
20202
20203         * config/srclist.txt (config.rpath): from gettext.
20204         * config/config.rpath: update.
20205
20206 2005-03-15  Bruno Haible  <bruno@clisp.org>
20207
20208         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
20209         to 'negate'.
20210
20211         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
20212         variable.
20213
20214         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
20215         results.
20216
20217 2005-03-14  Simon Josefsson  <jas@extundo.com>
20218
20219         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
20220         <fx@gnu.org>.
20221
20222 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
20223
20224         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
20225         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
20226         intprops.h.
20227         * lib/strtol.c: Likewise.
20228
20229 2005-03-14  Jim Meyering  <jim@meyering.net>
20230
20231         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
20232         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
20233         to be nonzero so that we (and caller) can detect the difference
20234         between a valid zero-length expansion and an error return, even
20235         when the underlying strftime fails before writing anything into
20236         that location.
20237
20238 2005-03-14  Bruno Haible  <bruno@clisp.org>
20239
20240         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
20241         Update from GNU gettext 0.14.3.
20242
20243 2005-03-10  Jim Meyering  <jim@meyering.net>
20244
20245         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
20246
20247 2005-03-10  Jim Meyering  <jim@meyering.net>
20248
20249         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
20250         so that this module works on systems without fchdir.
20251
20252 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
20253
20254         Factor int-properties macros into a single file, except for
20255         glibc-related files.
20256         * lib/intprops.h: New file.
20257         * lib/getloadavg.c: Include it instead of limits.h.
20258         (INT_STRLEN_BOUND): Remove.
20259         * lib/human.c: Include intprops.h.
20260         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
20261         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
20262         302/1000.
20263         * lib/inttostr.h: Include intprops.h instead of limits.h.
20264         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
20265         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
20266         for consistency with intprops.h.
20267         (time_t_is_integer, twos_complement_arithmetic): Use them.
20268         * lib/sig2str.h: Include <signal.h>, intprops.h.
20269         (INT_STRLEN_BOUND): Remove.
20270         * lib/strftime.c (TYPE_SIGNED): Remove.
20271         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
20272         * lib/strtol.c: Adjust comments to match intprops.h.
20273         * lib/userspec.c: Include intprops.h.
20274         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
20275         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
20276         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
20277         instead of rolling our own expressions.
20278         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
20279
20280         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
20281         instead of int.
20282         (my_strftime): Do not mishandle years close to INT_MAX, by doing
20283         the right thing even if adding 1900 would overflow.  Similarly
20284         for tm_mon + 1 and tm_yday + 1.
20285         Make %Y always equivalent to %C%y, and similarly for %G and %g.
20286         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
20287         (DO_SIGNED_NUMBER): New macro.
20288         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
20289
20290 2005-03-07  Bruno Haible  <bruno@clisp.org>
20291
20292         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
20293
20294 2005-03-07  Bruno Haible  <bruno@clisp.org>
20295
20296         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
20297
20298 2005-03-04  Derek R. Price  <derek@ximbiot.com>
20299
20300         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
20301         (func_import): Only replace files via --import when they have actually
20302         changed.
20303
20304 2005-03-03  Derek R. Price  <derek@ximbiot.com>
20305
20306         * m4/mmap-anon.m4: New file.
20307         * m4/pagealign_alloc.m4: New file.
20308
20309 2005-03-03  Derek R. Price  <derek@ximbiot.com>
20310             Bruno Haible  <bruno@clisp.org>
20311
20312         * modules/pagealign_alloc: New file.
20313         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
20314
20315 2005-03-03  Derek R. Price  <derek@ximbiot.com>
20316             Bruno Haible  <bruno@clisp.org>
20317
20318         * lib/pagealign_alloc.h: New file.
20319         * lib/pagealign_alloc.c: New file.
20320
20321 2005-03-03  Bruno Haible  <bruno@clisp.org>
20322
20323         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
20324         Use an all-permissive copyright notice, recommended by RMS.
20325
20326 2005-03-02  Bruno Haible  <bruno@clisp.org>
20327
20328         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
20329         of AIX, the replacement has to be done only after <string.h> is
20330         included, therefore not in config.h. stpncpy.h does the replacement,
20331         and stpncpy.c uses it.
20332
20333 2005-03-02  Bruno Haible  <bruno@clisp.org>
20334
20335         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
20336         stpncpy.c uses it.
20337
20338 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
20339
20340         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
20341         The workaround isn't strictly needed for POSIX conformance, and
20342         it's too much of a pain to configure and maintain.  We'll ask
20343         people to fix their kernels instead.
20344         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
20345         (NANOSLEEP_BUG_WORKAROUND): Remove.
20346         (xnanosleep): Remove the workaround.
20347
20348 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
20349
20350         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
20351         Reported by Derek Price.
20352         (Include): Add "timespec.h".
20353
20354         * modules/xnanosleep (Depends-on): Remove gethrxtime.
20355
20356 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
20357
20358         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
20359         to detect nanosleep bug.
20360
20361 2005-03-01  Bruno Haible  <bruno@clisp.org>
20362
20363         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
20364
20365 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
20366
20367         * modules/gethrxtime: New file.
20368         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
20369         (Depends-on): Add gethrxtime.
20370         (configure.ac): Add gl_XNANOSLEEP.
20371         (Makefile.am): Remove lib_SOURCES line.
20372
20373 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
20374
20375         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
20376         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
20377
20378 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
20379
20380         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
20381         * lib/timespec.h (gettime): Return void, since it always
20382         succeeds now.  All uses changed.
20383         * lib/gettime.c (gettime) Likewise.
20384         [HAVE_NANOTIME]: Prefer nanotime.
20385         Assume gettimeofday succeeds, as POSIX requires.
20386         Assime time () succeeds, since other code already does.
20387         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
20388         (timespec_subtract): Remove.
20389         (NANOSLEEP_BUG_WORKAROUND): New constant.
20390         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
20391         things considerably.  Use it only on GNU/Linux hosts, since the
20392         workaround shouldn't be needed elsewhere.
20393
20394 2005-02-24  Bruno Haible  <bruno@clisp.org>
20395
20396         * modules/gettext (Files): Add m4/glibc2.m4.
20397
20398 2005-02-24  Bruno Haible  <bruno@clisp.org>
20399
20400         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
20401         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
20402         * m4/progtest.m4:
20403         Update from GNU gettext 0.14.2.
20404         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
20405
20406 2005-02-24  Bruno Haible  <bruno@clisp.org>
20407
20408         * lib/localcharset.c: Update from GNU gettext 0.14.2.
20409         * lib/config.charset: Update from GNU gettext 0.14.2.
20410
20411 2005-02-24  Bruno Haible  <bruno@clisp.org>
20412
20413         * lib/gettext.h: Update from GNU gettext 0.14.2.
20414
20415 2005-02-23  Simon Josefsson  <jas@extundo.com>
20416
20417         * m4/iconvme.m4: New file.
20418
20419 2005-02-23  Jim Meyering  <jim@meyering.net>
20420
20421         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
20422         change.
20423         Thanks to Bruno Haible for catching it.
20424
20425 2005-02-22  Simon Josefsson  <jas@extundo.com>
20426
20427         * modules/iconvme: New file.
20428
20429         * MODULES.html.sh: Add iconvme.
20430
20431 2005-02-22  Simon Josefsson  <jas@extundo.com>
20432
20433         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
20434
20435 2005-02-22  Simon Josefsson  <jas@extundo.com>
20436
20437         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
20438
20439 2005-02-22  Jim Meyering  <jim@meyering.net>
20440
20441         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
20442         s/ifndef/ifdef/.
20443
20444 2005-02-20  Neil Conway  <neilc@samurai.com>
20445
20446         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
20447         returned by OSX/Darwin if the specified buffer is not large
20448         enough for the hostname.
20449
20450 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20451
20452         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
20453         pass it to _help, otherwise the latter coredumps trying to
20454         dereference state.root_argp.
20455
20456 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
20457
20458         * modules/chdir-long (Depends-on): Add memrchr.
20459         * modules/memrchr (Files): Add lib/memrchr.h.
20460         (Include): "memrchr.h".
20461
20462 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
20463
20464         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
20465
20466 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
20467
20468         * lib/memrchr.h: New file.
20469         * lib/chdir-long.c: Include it.
20470         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
20471         Don't bother including stddef.h.
20472
20473 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
20474
20475         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
20476         inclusion.
20477         Include <sys/types.h>, for dev_t.
20478         (ME_DUMMY, ME_REMOTE): Move from here....
20479         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
20480         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
20481         Dmitry V. Levin.
20482         Include mountlist.h first, to test the interface.
20483
20484 2005-01-29  Bruno Haible  <bruno@clisp.org>
20485
20486         * lib/progname.c (program_name): Initialize.
20487         Needed when linking statically on MacOS X.
20488
20489 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
20490
20491         Sync from coreutils.
20492         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
20493         (Depends-on): Add c-strtod.
20494         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
20495
20496 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
20497
20498         Sync from coreutils.
20499         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
20500
20501         Remove files that are specific to coreutils.
20502         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
20503
20504 2005-01-28  Bruno Haible  <bruno@clisp.org>
20505
20506         * modules/javacomp: New file.
20507         * MODULES.html.sh (Java): Add javacomp.
20508
20509 2005-01-28  Bruno Haible  <bruno@clisp.org>
20510
20511         * m4/javacomp.m4: New file, from GNU gettext.
20512
20513 2005-01-28  Bruno Haible  <bruno@clisp.org>
20514
20515         * lib/javacomp.sh.in: New file, from GNU gettext.
20516         * lib/javacomp.h: New file, from GNU gettext.
20517         * lib/javacomp.c: New file, from GNU gettext.
20518
20519 2005-01-26  Simon Josefsson  <jas@extundo.com>
20520
20521         * lib/gai_strerror.c: Use GPL in header.
20522
20523 2005-01-26  Bruno Haible  <bruno@clisp.org>
20524
20525         * modules/javaexec: New file.
20526         * MODULES.html.sh (Java): Add javaexec.
20527
20528 2005-01-26  Bruno Haible  <bruno@clisp.org>
20529
20530         * m4/javaexec.m4: New file, from GNU gettext.
20531
20532 2005-01-26  Bruno Haible  <bruno@clisp.org>
20533
20534         * lib/javaexec.sh.in: New file, from GNU gettext.
20535         * lib/javaexec.h: New file, from GNU gettext.
20536         * lib/javaexec.c: New file, from GNU gettext.
20537
20538 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20539
20540         * modules/lchown (Depends-on): Remove lchown.h
20541
20542 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20543
20544         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
20545         must be defined if the header file was not found, in order
20546         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
20547
20548 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20549
20550         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
20551         initializers for struct pentry_state.
20552         (__argp_error): Check return value of __asprintf
20553         (__argp_failure): Translate error message
20554
20555         * lib/argp-parse.c: Removed braces around the expansion of N_()
20556
20557 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
20558
20559         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
20560         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
20561         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
20562         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
20563         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
20564         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
20565         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
20566         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
20567         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
20568         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
20569         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
20570         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
20571         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
20572         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
20573         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
20574         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
20575         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
20576         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
20577         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
20578         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
20579         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
20580         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
20581         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
20582         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
20583         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
20584         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
20585         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
20586         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
20587         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
20588         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
20589         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
20590         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
20591         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
20592         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
20593         xstrtol.m4, xstrtoumax.m4, yesno.m4:
20594         Use an all-permissive copyright notice, recommended by RMS.
20595
20596 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
20597
20598         * modules/chdir-long (Depends-on): Remove mempcpy.
20599
20600 2005-01-21  Jim Meyering  <jim@meyering.net>
20601
20602         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
20603         same value as for Solaris 9.
20604
20605         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
20606         component length.  This included changing the parameter to be
20607         of type `char *' rather than `char const *'.
20608         * lib/chdir-long.h (chdir_long): Update prototype.
20609
20610         * lib/openat.c (fdopendir, fstatat): New functions.
20611         * lib/openat.h: Include headers required for use of DIR and struct
20612         stat.
20613         [AT_SYMLINK_NOFOLLOW]: Define.
20614         (fdopendir, fstatat): Add prototypes.
20615
20616 2005-01-21  Bruno Haible  <bruno@clisp.org>
20617
20618         * modules/classpath: New file.
20619         * MODULES.html.sh (Java): Add classpath.
20620
20621 2005-01-21  Bruno Haible  <bruno@clisp.org>
20622
20623         * lib/classpath.h: New file, from GNU gettext.
20624         * lib/classpath.c: New file, from GNU gettext.
20625
20626 2005-01-20  Simon Josefsson  <jas@extundo.com>
20627
20628         * modules/version-etc-fsf: New file.
20629
20630 2005-01-20  Simon Josefsson  <jas@extundo.com>
20631
20632         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
20633         * lib/version-etc.c: Remove version_etc_copyright.
20634         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
20635         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
20636
20637 2005-01-20  Simon Josefsson  <jas@extundo.com>
20638
20639         * lib/base64.h (isbase64): Add.
20640
20641         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
20642         using a unsigned prototype, don't inline.
20643         (base64_decode): Use it.
20644
20645 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
20646
20647         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
20648         it.
20649
20650 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
20651
20652         * lib/save-cwd.c (save_cwd): Remove code to support the case
20653         where fchdir is missing or flaky.
20654
20655 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
20656
20657         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
20658
20659 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
20660
20661         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
20662         AC_LIBSOURCES now does this.
20663         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
20664         with new ullong_max module.
20665
20666 2005-01-19  Bruno Haible  <bruno@clisp.org>
20667
20668         * modules/sh-quote: New file.
20669         * MODULES.html.sh (Executing programs): Add sh-quote.
20670
20671 2005-01-19  Bruno Haible  <bruno@clisp.org>
20672
20673         * lib/sh-quote.h: New file, from GNU gettext.
20674         * lib/sh-quote.c: New file, from GNU gettext.
20675
20676 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
20677
20678         Merge from coreutils.
20679         * m4/ullong_max.m4: New file.
20680         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
20681         (gl_MACROS): Assume localeconv exists.
20682
20683 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
20684
20685         Merge changes from coreutils, as described below in several
20686         changelogs dated today.
20687
20688         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
20689         (O_DIRECTORY): Remove; not needed here, since "." must be
20690         a directory.  All uses removed.
20691         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
20692         universal on Suns, and we also need to test for IRIX.
20693         Revamp code to use 'if' rather than '#if'.
20694         Avoid unnecessary comparison of cwd->desc to 0.
20695
20696         * lib/utimens.c (futimens): Robustify the previous patch, by checking
20697         for known valid error numbers rather than observed invalid ones.
20698
20699 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
20700
20701         * modules/ullong_max: New file.
20702
20703         * modules/chdir-long, modules/openat: New files.
20704         * modules/save-cwd (Depends-on): Depend on chdir-long.
20705         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
20706
20707 2005-01-18  Jim Meyering  <jim@meyering.net>
20708
20709         Merge from coreutils.
20710         * m4/chdir-long.m4, m4/openat.m4: New files.
20711         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
20712         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
20713         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
20714         is sane and DOES follow symlinks.  Besides, testing 20 different
20715         systems found no broken chown implementations.
20716         Prompted by a change in rsync's copy of this macro.
20717         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
20718
20719         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
20720
20721         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
20722         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
20723         NULL-means-set-to-current-time semantics.
20724         Remove temporary file immediately, rather than waiting
20725         for configure's at-exit trap code to do it.
20726
20727 2005-01-18  Jim Meyering  <jim@meyering.net>
20728
20729         * lib/version-etc.c (version_etc_copyright): Update copyright date.
20730
20731         * lib/utimens.c (futimens): Account for the fact that futimes
20732         can also fail with errno == ENOSYS or errno == ENOENT.
20733         Patch from Dmitry V. Levin.
20734
20735         Change the name of the robust chdir function from chdir to chdir_long.
20736         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
20737         (restore_cwd): Use chdir_long, not chdir.
20738         * lib/chdir-long.c: Renamed from chdir.c.
20739         * lib/chdir-long.h: Renamed from chdir.h.
20740         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
20741         Hurd.
20742
20743 2005-01-18  Bruno Haible  <bruno@clisp.org>
20744
20745         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
20746         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
20747         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
20748         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
20749         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
20750         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
20751         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
20752         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
20753         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
20754         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
20755         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
20756         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
20757         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
20758         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
20759         Use an all-permissive copyright notice, recommended by RMS.
20760
20761 2005-01-18  Bob Proulx  <bob@proulx.com>
20762
20763         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
20764         simplify offsetof() macro construct to avoid compile failure with
20765         native HP-UX 11.0 ANSI C compiler.
20766
20767 2005-01-17  Bruno Haible  <bruno@clisp.org>
20768
20769         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
20770         redundant because stpncpy.m4 takes care of it.
20771
20772 2005-01-17  Bruno Haible  <bruno@clisp.org>
20773
20774         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
20775
20776 2005-01-17  Bruno Haible  <bruno@clisp.org>
20777
20778         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
20779         used.
20780
20781 2005-01-17  Bruno Haible  <bruno@clisp.org>
20782
20783         * lib/fwriteerror.h (fwriteerror): Change specification to include
20784         fclose.
20785         * lib/fwriteerror.c: Include <stdbool.h>.
20786         (fwriteerror): At the end, close the file stream. Record whether
20787         stdout was already closed.
20788
20789 2005-01-17  Bruno Haible  <bruno@clisp.org>
20790
20791         * lib/execute.c (environ): Declare if needed.
20792         * lib/pipe.c (environ): Likewise.
20793         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
20794
20795 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20796
20797         * modules/argp: Depend on vsnprintf
20798
20799 2005-01-10  Jim Meyering  <jim@meyering.net>
20800
20801         * modules/closeout (Depends-on): Add atexit.
20802
20803 2005-01-06  Bruno Haible  <bruno@clisp.org>
20804
20805         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
20806
20807 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
20808
20809         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
20810         definitions to be after all include files, to avoid collisions.
20811         Problem reported by Bob Proulx.
20812
20813 2005-01-04  Jim Meyering  <jim@meyering.net>
20814
20815         Changes imported from coreutils.
20816         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
20817         as the mkstemp template, use a temporary directory and an
20818         8.3-friendly template to avoid trouble on systems like DJGPP.
20819         Reported by Juan M. Guerrero via Stepan Kasal.
20820         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
20821         close. Remove the temporary directory right away, rather than waiting
20822         for configure's at-exit trap code to do it.
20823         Suggestion from Stepan Kasal.
20824
20825 2005-01-01  Simon Josefsson  <jas@extundo.com>
20826
20827         * gnulib-tool: Print #include directives when --import'ing.
20828
20829 2004-12-28  Simon Josefsson  <jas@extundo.com>
20830
20831         * tests/test-base64.c: Include required header files.  Remove
20832         unused variables.
20833
20834 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
20835
20836         * modules/error (Depends-on): Remove gettext.
20837
20838 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
20839
20840         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
20841         not needed.  This removes a dependency on the gettext module.
20842         [defined _LIBC]: Do not include <libintl.h>; not needed.
20843
20844 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
20845
20846         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
20847         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
20848
20849 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
20850
20851         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
20852         HAVE_DECL_STRTOLD.
20853
20854 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
20855
20856         * modules/getdate (Depends-on): Remove alloca-opt.
20857
20858 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
20859
20860         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
20861
20862 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
20863
20864         * lib/argp-parse.c: Include <stddef.h>.
20865         (alignof, alignto): New macros.
20866         (parser_init): Don't assume that void * is aligned sufficiently
20867         for struct option.
20868
20869         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
20870         need to extend the stack.
20871         (YYINITDEPTH): New macro, so that the initial stack isn't overly
20872         large.
20873
20874 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20875
20876         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
20877
20878 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
20879
20880         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
20881         (2004-10-24) change.  Apparently this was a false alarm.
20882
20883         * modules/getdate: Depend on alloca-opt, not alloca.
20884
20885 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
20886
20887         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
20888         Remove now-obsolete comment about AIX.
20889         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
20890         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
20891         (YYMAXDEPTH): New macro.
20892
20893 2004-12-18  Simon Josefsson  <jas@extundo.com>
20894
20895         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
20896
20897 2004-12-18  Bruno Haible  <bruno@clisp.org>
20898
20899         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
20900
20901 2004-12-18  Bruno Haible  <bruno@clisp.org>
20902
20903         * lib/fatal-signal.c (fatal_signals): Make non-const.
20904         (init_fatal_signals): New function.
20905         (uninstall_handlers, install_handlers): Ignore signals that were set to
20906         SIG_IGN.
20907         (at_fatal_signal): Call init_fatal_signals.
20908         (init_fatal_signal_set): Likewise. Ignore signals that were set to
20909         SIG_IGN.
20910         Reported by Paul Eggert.
20911
20912 2004-12-18  Bruno Haible  <bruno@clisp.org>
20913
20914         * doc/alloca.texi: New file.
20915         * doc/alloca-opt.texi: New file.
20916
20917 2004-12-17  Jim Meyering  <jim@meyering.net>
20918
20919         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
20920         Otherwise, install-sh could exit with improper exit status when
20921         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
20922
20923 2004-12-16  Simon Josefsson  <jas@extundo.com>
20924
20925         * tests/test-base64.c: Add license.
20926
20927 2004-12-15  Stepan Kasal  <address@hidden>
20928
20929         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
20930
20931 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
20932
20933         * modules/getcwd (Files): Add m4/d-ino.m4.
20934         Suggested by Mark D. Baushke.
20935
20936 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
20937
20938         * lib/getdate.y (textint): New member "negative".
20939         (time_zone_hhmm): New function.
20940         Expect 14 shift-reduce conflicts, not 13.
20941         (o_colon_minutes): New rule.
20942         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
20943         (yylex): Set the "negative" member of signed numbers.
20944
20945 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
20946
20947         * doc/getdate.texi (Time of day items, Time zone items):
20948         Describe new formats +00:00, UTC+00:00.
20949
20950 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
20951
20952         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
20953         spurious "-l"s.  Problem reported by Stepan Kasal.
20954
20955 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
20956
20957         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
20958         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
20959
20960 2004-12-04  Simon Josefsson  <jas@extundo.com>
20961
20962         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
20963         Vandoorselaere <yoann@prelude-ids.org>.
20964
20965 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
20966
20967         Changes imported from coreutils.
20968         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
20969         exist.
20970         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
20971
20972 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
20973
20974         Changes imported from coreutils.
20975         * lib/hard-locale.c: Assume <locale.h> exists.
20976         Include "strdup.h".
20977         (GLIBC_VERSION): New macro.
20978         (hard_locale): Assume setlocale exists.
20979         Rewrite to avoid #ifdef.
20980         Use strdup rather than malloc + strcpy.
20981         * lib/human.c: Assume <locale.h> exists.
20982         (human_readable): Assume localeconv exists.
20983
20984 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
20985
20986         * modules/hard-locale (Depends-on): Add strdup.
20987
20988 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
20989
20990         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
20991         convert T2, not T.  (Imported from libc.)
20992
20993 2004-11-30  Simon Josefsson  <jas@extundo.com>
20994
20995         * modules/restrict (License): Change to LGPL.
20996
20997 2004-11-30  Simon Josefsson  <jas@extundo.com>
20998
20999         * m4/restrict.m4: Add copyright and copying conditions.
21000
21001 2004-11-30  Simon Josefsson  <jas@extundo.com>
21002
21003         * m4/base64.m4: New file.
21004
21005 2004-11-30  Simon Josefsson  <jas@extundo.com>
21006
21007         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
21008         base64.
21009
21010         * tests/test-base64.c: New file.
21011
21012         * modules/base64: New file.
21013
21014 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
21015
21016         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
21017         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
21018
21019         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
21020
21021 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
21022
21023         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
21024         (__getcwd.c): Don't restore errno; glibc doesn't.
21025         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
21026         first, falling back to our code only if its results look suspicious.
21027         Ensure that the resulting buffer is only as large as necessary.
21028
21029         * lib/readutmp.c: Include readutmp.h first.
21030         Include <errno.h>, since readutmp.h no longer does that.
21031         * lib/readutmp.h: Don't include <errno.h>,
21032         <sys/param.h>, <time.h>; not needed to establish interface.
21033         (errno): Remove decl.
21034         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
21035         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
21036         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
21037
21038 2004-11-28  Simon Josefsson  <jas@extundo.com>
21039
21040         * lib/base64.h, base64.c: New file.
21041
21042 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
21043
21044         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
21045
21046 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
21047
21048         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
21049         (Depends-on): Remove pathmax, same.  Add mempcpy.
21050         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
21051         (Makefile.am): Append getcwd.h to lib_SOURCES.
21052         (Include): Add getcwd.h.
21053         (Maintainer): Change from Jim Meyering to "all, glibc",
21054         since getdate now uses intended-for-glibc code.
21055         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
21056         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
21057
21058 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
21059
21060         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
21061         HP's ANSI C compiler.
21062         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
21063         Declaring int functions causes warnings on some modern systems and
21064         shouldn't be needed to compile on ancient ones.
21065         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
21066         defined.
21067
21068         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
21069         with the following changes.
21070         (__set_errno): Parenthesize properly.
21071         Include <stdbool.h>.
21072         (MIN, MAX, MATCHING_INO): New macros.
21073         (__getcwd): Define with prototype, not K&R form.
21074         Use heuristics to allocate default buffer on stack if possible.
21075         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
21076         behavior, and to avoid the PATH_MAX limit when computing
21077         ../../../../...
21078         Use MATCHING_INO to compare inode number to file.
21079         Check for arithmetic overflow in size calculations.
21080         Fix bug in reallocation of dot array that caused getcwd to fail
21081         on directories nested deeper than 75.
21082         Be more careful about saving errno on error.
21083         Do not use realloc; use only free+malloc, as this is a bit
21084         more flexible and avoids a needless copy operation.
21085         Do not inspect st_dev and st_ino for symbolic links; POSIX
21086         doesn't specify the latter.
21087         Check for closedir errors.
21088         Avoid needless casts.
21089         Use "#ifdef weak_alias" around weak_alias, to be like other
21090         glibc code.
21091         The following changes to getcwd.c have effect only when used in
21092         gnulib; they have no effect inside glibc proper.
21093         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
21094         as alloca isn't used.
21095         (alloca, __alloca): Likewise.
21096         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
21097         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
21098         unconditionally, as gnulib assumes C89 or better.
21099         Do not include <sys/param.h>.
21100         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
21101         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
21102         better.
21103         (NULL) [!defined NULL]: Remove; we assume C89 or better.
21104         Include <dirent.h> in a way that is compatible with modern Autoconf.
21105         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
21106         New macros, if not already defined.
21107         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
21108         Use "_LIBC", not "defined _LIBC", for consistency.
21109         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
21110         a mempcpy module.
21111         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
21112         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
21113         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
21114         credit only to Jim Meyering and adjust the copyright dates.
21115         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
21116         <stdlib.h>, <unistd.h>, "pathmax.h".
21117         Instead, include "xgetcwd.h" (first) and "getcwd.h".
21118         (INITIAL_BUFFER_SIZE): Remove.
21119         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
21120
21121 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
21122
21123         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
21124         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
21125         Use the _ONCE methods, for efficiency.
21126         Check for fcntl.h.  In test program, include <errno.h>
21127         and <fcntl.h> if available.  Remove old K&R cruft from
21128         test program.  Check for common errors in GNU/Linux,
21129         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
21130         don't do AC_LIBOBJ, as that's getcwd.m4's job.
21131         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
21132         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
21133         name accordingly.
21134         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
21135         accommodate new getcwd.c.
21136         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
21137         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
21138         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
21139         that's all we need now.
21140
21141 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21142
21143         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
21144         argp-parse.c depends on getopt internals, that means we should
21145         always use our getopt, to be on the safe side.
21146         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
21147         order not to spoil the result of an eventual previous invocation
21148         of gl_GETOPT_SUBSTITUTE.
21149
21150 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21151
21152         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
21153         redefinition warnings. To avoid them, include the defines
21154         in `#if !defined __need_getopt ... #endif'. The only place
21155         where __getopt_argv_const is used is in definitions
21156         of getopt_long and getopt_long_only below, which are as well
21157         protected by `#ifndef __need_getopt'.
21158         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
21159         __need_getopt after including <stdio.h> and <unistd.h> These
21160         headers might have defined it.
21161
21162 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
21163
21164         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
21165
21166 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
21167
21168         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
21169         (futimens): New function, which uses futimes if available.
21170         (futimens, utimens): Support timespec==NULL, with same semantics
21171         as utime and utimens.
21172         * lib/utimens.h (futimens): New decl.
21173
21174 2004-11-23  Jim Meyering  <jim@meyering.net>
21175
21176         * lib/getopt_.h: Remove trailing blanks.
21177
21178 2004-11-23  Jim Meyering  <jim@meyering.net>
21179
21180         * lib/__fpending.c: Add comment.
21181
21182 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
21183
21184         * modules/canonicalize (Depends-on): Add xreadlink.
21185         Problem reported by James Youngman.
21186
21187 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
21188
21189         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
21190         New macros.
21191         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
21192         optopt): Use them instead of invoking ## directly; otherwise, the
21193         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
21194
21195 2004-11-19  Bruno Haible  <bruno@clisp.org>
21196
21197         * lib/strtok_r.c: Move comments from here...
21198         * lib/strtok_r.h: ... to here.
21199
21200 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
21201
21202         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
21203         implementations that mishandle size_t overflow.
21204
21205 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
21206
21207         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
21208         might fail.  Problem reported by Yoann Vandoorselaere.
21209         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
21210         implementations that mishandle size_t overflow.
21211
21212 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
21213
21214         * modules/canon-host (Depends-on): Add strdup.
21215
21216 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
21217
21218         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
21219
21220 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
21221
21222         * lib/canon-host.c: Include "strdup.h".
21223         (canon_host): Use getaddrinfo if available, so that IPv6 works.
21224         Use strdup instead of malloc/strcpy to duplicate strings.
21225
21226         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
21227         (human_space_before_unit): New constant.
21228         * lib/human.c (human_readable): Support it.
21229
21230         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
21231         (xgetcwd): Set errno correctly when failing.
21232         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
21233         the failure is actually due to a PATH_MAX problem.
21234
21235         Further getopt changes to make it more likely that glibc will
21236         buy the changes back.
21237         * lib/getopt.c (POSIXLY_CORRECT): New constant.
21238         (getopt): Use it, so to preserve glibc semantic
21239         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
21240         when compiling for libc.
21241         * lib/getopt_.h (__getopt_argv_const): Bring it back.
21242         (getopt_long, getopt_long_only): Use it.
21243
21244         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
21245         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
21246         (getopt): Argv is now char * const *, as per standard.
21247         (_getopt_internal_r, _getopt_internal): Argv is now char **,
21248         not char *__getopt_argv_const *.
21249         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
21250         _getopt_long_only_r): Likewise.
21251         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
21252         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
21253         _getopt_long_r, _getopt_long_only_r): Likewise.
21254         * lib/getopt_.h (__getopt_argv_const): Remove.
21255         (getopt): Argv is now char * const *, as per standard.
21256
21257         * lib/getdate.y (tORDINAL): New token.
21258         (day, relunit): Allow it for relative times.
21259         (relative_time_table): Use tORDINAL for ordinals.
21260
21261 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
21262
21263         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
21264         Document that "second" isn't allowed as an ordinal number.
21265
21266 2004-11-16  Jim Meyering  <jim@meyering.net>
21267
21268         * modules/closeout (Depends-on): Add fpending.
21269
21270 2004-11-15  Jim Meyering  <jim@meyering.net>
21271
21272         * lib/closeout.c: Include "__fpending.h" once again.
21273         Include <stdbool.h>.
21274         (close_stdout): Don't fail just because stdout was closed initially,
21275         since some programs don't write to stdout in the normal course of
21276         operation (other than --version and --help), and we don't want this
21277         function to make e.g. `touch file >&-' fail.
21278         But do fail if it was closed and someone has tried to write to it.
21279         E.g., `printf foo >&-' must fail.
21280
21281 2004-11-13  Jim Meyering  <jim@meyering.net>
21282
21283         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
21284
21285 2004-11-12  Simon Josefsson  <jas@extundo.com>
21286
21287         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
21288         small doc fix is still pending.
21289
21290 2004-11-11  Simon Josefsson  <jas@extundo.com>
21291
21292         * modules/strtok_r: New file.
21293
21294         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
21295         strtok_r.
21296
21297 2004-11-11  Simon Josefsson  <jas@extundo.com>
21298
21299         * m4/strtok_r.m4: New file.
21300
21301         * m4/getopt.m4: Replace opterr.
21302
21303 2004-11-11  Simon Josefsson  <jas@extundo.com>
21304
21305         * lib/strtok_r.h, strtok_r.c: New file.
21306
21307 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
21308
21309         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
21310         of replacing opterr, getopt, etc.  This should handle the
21311         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
21312
21313 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
21314
21315         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
21316         we can stop lying to compilers about the constness of argv when we
21317         are compiled outside glibc.
21318         (getopt, getopt_long, getopt_long_only): Use it.
21319         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
21320         _getopt_internal, getopt): Likewise.
21321         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
21322         _getopt_long_only_r): Likewise.
21323         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
21324         _getopt_long_r, _getopt_long_only_r): Likewise.
21325
21326         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
21327         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
21328         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
21329         the other external symbols.
21330         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
21331         declaration, since the above renaming now works around collisions.
21332
21333 2004-11-11  Jim Meyering  <jim@meyering.net>
21334
21335         * lib/linebreak.c: Remove trailing blanks.
21336         * lib/alloca_.h: Likewise.
21337         * lib/acosl.c: Likewise.
21338         * lib/euidaccess.c: Likewise.
21339         * lib/allocsa.h: Likewise.
21340
21341 2004-11-10  Simon Josefsson  <jas@extundo.com>
21342
21343         * m4/getaddrinfo.m4: New file.
21344
21345 2004-11-10  Simon Josefsson  <jas@extundo.com>
21346
21347         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
21348
21349 2004-11-10  Simon Josefsson  <jas@extundo.com>
21350
21351         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
21352         getaddrinfo.
21353
21354         * modules/getaddrinfo: New file.
21355
21356 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
21357
21358         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
21359
21360 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
21361
21362         * lib/mktime.c (SHR): New macro, which is a portable
21363         substitute for >> that should work even on Crays.
21364         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
21365         Problem reported by Mark D. Baushke in
21366         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
21367         * lib/getdate.y (SHR): Likewise.
21368         (tm_diff): Use it.
21369         * lib/strftime.c (SHR): Likewise.
21370         (tm_diff): Use it.
21371         * lib/quotearg.c (struct quoting_options): Use unsigned int for
21372         quote_these_too, so that right shifts are well defined.  All uses
21373         changed.
21374
21375 2004-11-10  Jim Meyering  <jim@meyering.net>
21376
21377         Ensure that no close failure goes unreported.
21378         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
21379         return early when it seems there's nothing to flush.
21380         Don't include __fpending.h.
21381
21382 2004-11-10  Jim Meyering  <jim@meyering.net>
21383
21384         * modules/closeout (Depends-on): Remove fpending.
21385
21386 2004-11-10  Jim Meyering  <jim@meyering.net>
21387
21388         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
21389
21390 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
21391
21392         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
21393         gl_FUNC_STRFTIME.
21394         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
21395         and AC_REQUIRE when possible, to avoid duplicate checks.
21396         Check for <wchar.h>.
21397
21398 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
21399
21400         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
21401
21402 2004-11-09  Bruno Haible  <bruno@clisp.org>
21403
21404         * m4/sockpfaf.m4: New file.
21405
21406 2004-11-05  Bruno Haible  <bruno@clisp.org>
21407
21408         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
21409         Reported by Mark D. Baushke <mdb@cvshome.org>.
21410
21411 2004-11-04  Bruno Haible  <bruno@clisp.org>
21412
21413         2004-09-11  Bruno Haible  <bruno@clisp.org>
21414                 * allocsa.valgrind: New file.
21415         2004-02-06  Bruno Haible  <bruno@clisp.org>
21416                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
21417                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
21418                 Reported by Christopher Seip <chris.seip@hp.com>.
21419
21420 2004-11-04  Bruno Haible  <bruno@clisp.org>
21421
21422         * modules/allocsa (Files): Add lib/allocsa.valgrind.
21423         (Makefile.am): Distribute it.
21424
21425 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
21426
21427         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
21428         with errno == ERANGE if the buffer is too small.
21429         Problem reported by Mark D. Baushke.
21430
21431 2004-11-03  Albert Chin  <china@thewrittenword.com>
21432             Paul Eggert  <eggert@cs.ucla.edu>
21433
21434         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
21435         equivalent, substitute $ac_type for equivalent type rather than
21436         blindly using uint32_t *always* which won't work if uint32_t is not
21437         available.  Define _UINT32_T to work around typedef of uint32_t if
21438         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
21439         2.5.1.
21440
21441 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
21442
21443         * m4/jm-macros.m4: Sync from coreutils.
21444         (gl_MACROS): Check for mbrlen, for pathchk.
21445         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
21446
21447 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
21448
21449         * lib/xreadlink.c (MAXSIZE): New macro.
21450         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
21451         size does not exceed MAXSIZE.  Avoid cast.
21452         As suggested by Mark D. Baushke in
21453         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
21454         if readlink fails with buffer size just under MAXSIZE, try again
21455         with MAXSIZE.
21456
21457 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
21458
21459         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
21460
21461 2004-11-02  Derek R. Price  <derek@ximbiot.com>
21462         and  Paul Eggert  <eggert@cs.ucla.edu>
21463
21464         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
21465         (get_date): Overparenthesize to avoid GCC warning.
21466
21467 2004-11-02  Bruno Haible  <bruno@clisp.org>
21468
21469         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
21470         returns void.
21471
21472 2004-11-02  Bruno Haible  <bruno@clisp.org>
21473
21474         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
21475         function returns void.
21476
21477 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
21478
21479         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
21480         fflush_unlocked, flockfile, funlockfile, funlockfile,
21481         fputs_unlocked, putc_unlocked.
21482
21483 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
21484
21485         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
21486         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
21487         already declared.
21488
21489 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
21490
21491         * modules/getdate (Files): Add doc/getdate.texi.
21492         (Depends-on): Add setenv, xalloc.
21493
21494 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
21495
21496         * lib/getdate.y: Add support for TZ="foo" within a date string.
21497         Fix some bugs near time_t boundaries.  Reject dates with
21498         out-of-range components, e.g., "Sept 31".
21499         Include <stdlib.h>, "setenv.h", "xalloc.h".
21500         (ISDIGIT_LOCALE): Remove; unused.
21501         Note that the TZ and time functions used here are not reentrant.
21502         (mktime_ok, get_tz): New functions.
21503         (TZBUFSIZE): New constant.
21504         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
21505         This requires that we sometimes generate our own TZ="XXX..." setting.
21506
21507 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
21508
21509         * doc/getdate.texi: New file, from coreutils with modifications for
21510         the new TZ parsing.
21511
21512 2004-10-27  Derek R. Price  <derek@ximbiot.com>
21513
21514         * lib/mktime.c (not_equal_tm): Remove redundant check.
21515
21516 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
21517
21518         * modules/regex (lib_SOURCES): Add regex.c.
21519         Reported by James Youngman in
21520         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
21521
21522 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
21523
21524         * lib/getdate.y: Use Bison 1.875 features, and some minor
21525         code cleanups.  This change does not affect semantics.
21526         Don't include <stdlib.h>; no longer needed.
21527         Don't include unlocked-io.h; only the "#if TEST" code uses
21528         stdio, and performance isn't crucial there.
21529         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
21530         Bison 1.875 features as described below.
21531         All uses of "PC." replaced by "pc->".
21532         (YYSTYPE): Add a forward declaration.
21533         (yylex, yyerror): Use full prototypes in forward decls.
21534         Use "%pure-parser" rather than obsolescent "%pure_parser".
21535         Use %parse-param and %lex-param instead of obsolescent
21536         YYPARSE_PARAM and YYLEX_PARAM.
21537         (meridian_table, month_and_day_table, time_units_table,
21538         relative_time_table, time_zone_table, military_table,
21539         lookup_zone, lookup_word, get_date):
21540         Use NULL instead of 0 where appropriate.
21541         (to_hour): Avoid abort (), to avoid a dependency on
21542         stdlib.h.
21543         (yyerror, yylex): Now accepts parser_control * arg.
21544         (main) [TEST]: Use '\0' rather than 0 for char.
21545
21546 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
21547
21548         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
21549
21550 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
21551
21552         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
21553         It's now the caller's responsibility to handle the case where
21554         !HAVE_GETPAGESIZE && !defined getpagesize.
21555
21556         * lib/mktime.c (leapyear): Arg is long int, not int.
21557
21558 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
21559
21560         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
21561
21562 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
21563
21564         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
21565         missing.  Problem reported by James Youngman.
21566
21567 2004-10-16  Simon Josefsson  <jas@extundo.com>
21568
21569         * gnulib-tool: Fix comments.  Fix parse problem.
21570         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
21571
21572 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
21573
21574         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
21575         implementation of getopt_long.  Problem reported by Alexander Taler in:
21576         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
21577
21578 2004-10-15  Bruno Haible  <bruno@clisp.org>
21579
21580         * gnulib-tool: Untabify. Initialize supplied_libname.
21581         (func_usage): More homogenous output.
21582         (func_modules_transitive_closure, func_modules_to_filelist,
21583         func_emit_lib_Makefile_am): New functions.
21584         (func_import): New function, extracted from big case statement. Use
21585         func_get_license, func_modules_transitive_closure,
21586         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
21587         opt_lgpl. Don't use test -a, as it's not portable.
21588         (func_create_testdir): Use func_modules_transitive_closure,
21589         func_modules_to_filelist, func_emit_lib_Makefile_am.
21590
21591 2004-10-15  Bruno Haible  <bruno@clisp.org>
21592
21593         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
21594
21595 2004-10-15  Bruno Haible  <bruno@clisp.org>
21596
21597         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
21598         the portions belonging to each module.
21599         Suggested by Derek Robert Price <derek@ximbiot.com>.
21600
21601 2004-10-12  Simon Josefsson  <jas@extundo.com>
21602
21603         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
21604         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
21605         to real functions.
21606
21607 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21608
21609         * modules/vsnprintf: New file.
21610
21611 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21612
21613         * m4/vsnprintf.m4: New file.
21614
21615 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21616
21617         * lib/vsnprintf.h: New file.
21618         * lib/vsnprintf.c: New file.
21619
21620 2004-10-11  Bruno Haible  <bruno@clisp.org>
21621
21622         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
21623         vsnprintf.
21624
21625 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
21626
21627         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
21628
21629 2004-10-07  Bruno Haible  <bruno@clisp.org>
21630
21631         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
21632         fits into the provided buffer.
21633
21634 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
21635
21636         * lib/diacrit.c, diacrit.h: Add GPL notice.
21637
21638         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
21639         notice.
21640         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
21641         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
21642         This avoids a potential constant-folding bug.
21643
21644 2004-10-05  Bruno Haible  <bruno@clisp.org>
21645
21646         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
21647         for the declaration of strsep.
21648
21649 2004-10-05  Bruno Haible  <bruno@clisp.org>
21650
21651         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
21652
21653 2004-10-04  Simon Josefsson  <jas@extundo.com>
21654
21655         * modules/memmem: New file.
21656         * tests/test-memmem.c: New file.
21657         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
21658
21659 2004-10-04  Simon Josefsson  <jas@extundo.com>
21660
21661         * m4/memmem.m4: New file.
21662
21663 2004-10-04  Simon Josefsson  <jas@extundo.com>
21664
21665         * lib/memmem.h: New file.
21666         * lib/memmem.c: New file, taken from glibc.
21667
21668 2004-10-04  Simon Josefsson  <jas@extundo.com>
21669
21670         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
21671         '#ifdef USE_UNLOCKED_IO'.
21672
21673 2004-10-04  Simon Josefsson  <jas@extundo.com>
21674
21675         * config/srclist.txt: Add memmem from glibc.
21676
21677 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
21678
21679         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
21680
21681         * modules/argmatch, modules/argp, modules/closeout, modules/error,
21682         modules/exclude, modules/getdate, modules/getline,
21683         modules/getndelim2, modules/getpass, modules/getpass-gnu,
21684         modules/getusershell, modules/linebuffer, modules/md5,
21685         modules/mountlist, modules/posixtm, modules/readtokens,
21686         modules/readutmp, modules/regex, modules/sha1,
21687         modules/version-etc, modules/yesno:
21688         Remove dependency on unlocked-io.
21689
21690 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
21691
21692         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
21693
21694         * m4/unlocked-io.m4: Add copyright notice.
21695         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
21696
21697 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
21698
21699         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
21700         * lib/xmalloc.c (xmemdup): Likewise.
21701         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
21702         XFREE): Remove these long-obsolescent macros.
21703         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
21704         * lib/xstrdup.c: Remove.
21705
21706         * lib/regex.c (re_comp): Cast gettext return value to char *,
21707         Problem reported by Martin Neitzel via Mark D. Baushke.
21708
21709 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
21710
21711         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
21712         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
21713         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
21714         regex.c, sha1.c, version-etc.c, yesno.c:
21715         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
21716         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
21717         the includer's responsibility.
21718
21719         Sync from coreutils.
21720
21721         * lib/modechange.c (mode_compile): Don't decrement a pointer that
21722         points to the start of a string, as the C Standard says the
21723         resulting behavior is undefined.
21724
21725         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
21726         simple -> simple_backups, numbered_existing ->
21727         numbered_existing_backups, numbered -> numbered_backups
21728         to avoid shadowing problems.  All uses changed.
21729         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
21730         * lib/backupfile.c (check_extension, numbered_backup):
21731         Rename locals to avoid shadowing 'basename'.
21732         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
21733         once.
21734
21735         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
21736         * lib/.cvsignore: Add getopt.h.
21737
21738 2004-10-04  Bruno Haible  <bruno@clisp.org>
21739
21740         * modules/README: New file.
21741         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
21742         not a module.
21743
21744 2004-10-02  Jim Meyering  <jim@meyering.net>
21745
21746         * lib/dirfd.h, getpagesize.h: Add copyright notice.
21747
21748 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21749
21750         * modules/strsep: New file.
21751
21752 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21753
21754         * m4/strsep.m4: New file.
21755
21756 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21757
21758         * lib/strsep.h: New file.
21759         * lib/strsep.c: New file.
21760
21761 2004-10-01  Simon Josefsson  <jas@extundo.com>
21762
21763         * lib/snprintf.c (snprintf): Handle size==0.
21764
21765 2004-10-01  Simon Josefsson  <jas@extundo.com>
21766             Bruno Haible  <bruno@clisp.org>
21767
21768         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
21769         (snprintf): Declare 'args'.
21770
21771 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
21772
21773         * lib/snprintf.c: Remove comments as to why each header is needed.
21774
21775 2004-10-01  Bruno Haible  <bruno@clisp.org>
21776
21777         * MODULES.html.sh: Add strsep.
21778
21779 2004-09-30  Simon Josefsson  <jas@extundo.com>
21780
21781         * modules/snprintf: New file.
21782
21783 2004-09-30  Simon Josefsson  <jas@extundo.com>
21784
21785         * m4/snprintf.m4: New file.
21786
21787 2004-09-30  Simon Josefsson  <jas@extundo.com>
21788
21789         * lib/snprintf.h, lib/snprintf.c: New files.
21790
21791 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21792
21793         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
21794         (hol_entry_help): Never translate an empty string.
21795         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
21796         * lib/argp.h (OPTION_NO_TRANS): New option.
21797
21798 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
21799
21800         * modules/argp (Maintainer): Replace Simon Josefsson
21801         by Sergey Poznyakoff.
21802
21803 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
21804
21805         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
21806         changes merged back into glibc.
21807
21808 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
21809
21810         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
21811
21812 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
21813
21814         * lib/xvasprintf.c: Include xalloc.h.
21815         (xvasprintf): Use xalloc_die, not xmalloc_die.
21816
21817 2004-09-29  Bruno Haible  <bruno@clisp.org>
21818
21819         * modules/alloca-opt: New file, derived from modules/alloca.
21820         * modules/allocsa: Depend on alloca-opt instead of alloca.
21821         * modules/setenv: Likewise.
21822         * modules/vasnprintf: Likewise.
21823         * MODULES.html.sh: Add alloca-opt.
21824
21825 2004-09-28  Simon Josefsson  <jas@extundo.com>
21826
21827         * gnulib-tool: New parameter --lgpl, to asseert that modules are
21828         LGPL, and to replace license template from GPL to LGPL.
21829
21830 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
21831
21832         * modules/dummy: Change license to LGPL.
21833
21834 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
21835
21836         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
21837
21838 2004-09-24  Simon Josefsson  <jas@extundo.com>
21839
21840         * modules/minmax (License): Change from GPL to LGPL.
21841
21842 2004-09-23  Simon Josefsson  <jas@extundo.com>
21843
21844         * gnulib-tool (--import): Typo.
21845
21846 2004-09-23  Simon Josefsson  <jas@extundo.com>
21847
21848         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
21849
21850 2004-09-22  Bruno Haible  <bruno@clisp.org>
21851
21852         * modules/*: Add 'License' field.
21853         * gnulib-tool: Accept --extract-license option.
21854         (func_get_license): New function.
21855
21856 2004-09-21  Bruno Haible  <bruno@clisp.org>
21857
21858         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
21859         Reported by Simon Josefsson.
21860
21861 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
21862
21863         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
21864         gl_AC_TYPE_LONG_LONG.
21865
21866 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
21867
21868         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
21869
21870 2004-09-18  Simon Josefsson  <jas@extundo.com>
21871         and  Paul Eggert  <eggert@cs.ucla.edu>
21872
21873         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
21874         calls with autoreconf.  Define GL_LIB.
21875
21876 2004-09-14  Karl Berry  <karl@gnu.org>
21877
21878         * config/srclist.txt: unsync setenv.c, sigh.
21879
21880 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
21881
21882         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
21883         Problem reported by Bruno Haible in:
21884         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
21885
21886 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
21887
21888         * config/srclist.txt: Comment out argp-pvh.c.
21889
21890 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
21891
21892         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
21893         in case some system header has #define'd it.  Problem reported by
21894         Soeren D. Schulze in
21895         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
21896
21897 2004-09-09  Karl Berry  <karl@gnu.org>
21898
21899         * regex.[ch]: delete from the root.  These were supposed to be
21900                 synced with emacs cvs, but this has not happened for about
21901                 a year, and anyway nothing else uses emacs regex.[ch].
21902                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
21903                 lib/regex[.ch] is untouched.
21904
21905 2004-09-09  Bruno Haible  <bruno@clisp.org>
21906
21907         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
21908
21909 2004-09-09  Bruno Haible  <bruno@clisp.org>
21910
21911         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
21912         modifications.
21913         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
21914
21915 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
21916
21917         * modules/xvasprintf: New file.
21918         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
21919
21920 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
21921
21922         * lib/xvasprintf.h: New file.
21923         * lib/xvasprintf.c: New file.
21924         * lib/xasprintf.c: New file.
21925
21926 2004-09-08  Bruno Haible  <bruno@clisp.org>
21927
21928         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
21929
21930 2004-09-08  Bruno Haible  <bruno@clisp.org>
21931
21932         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
21933         length is > INT_MAX.
21934         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
21935         more.
21936
21937 2004-09-08  Bruno Haible  <bruno@clisp.org>
21938
21939         * lib/stdint_.h: New file, taken from GNU clisp.
21940
21941 2004-09-08  Bruno Haible  <bruno@clisp.org>
21942             Oskar Liljeblad  <oskar@osk.mine.nu>
21943
21944         * modules/stdint: New file.
21945         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
21946
21947 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
21948
21949         Import from coreutils.
21950         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
21951         strings on unbounded length.  alloca's performance benefits aren't
21952         that important here.
21953         (V_STRDUP): Remove.
21954         (parse_with_separator): New function, with most of the internals
21955         of the old parse_user_spec.  Allow user to omit both user and group,
21956         for compatibility with FreeBSD.
21957         Clone only the user name, not the entire spec.
21958         Do not set *uid, *gid unless entirely successful.
21959         Avoid memory leak in some failing cases.
21960         Fix regression for USER.GROUP reported by Dmitry V. Levin in
21961         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
21962         (parse_user_spec): Rewrite to use parse_with_separator.
21963
21964 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
21965
21966         * modules/userspec: Don't depend on alloca.
21967
21968 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
21969
21970         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
21971
21972 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
21973
21974         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
21975         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
21976         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
21977
21978 2004-08-16  Simon Josefsson  <jas@extundo.com>
21979
21980         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
21981         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
21982         Add --dry-run for --import.
21983         Let user provided command line parameters override configure.ac
21984         settings.
21985
21986 2004-08-12  Simon Josefsson  <jas@extundo.com>
21987
21988         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
21989         as discussed with Paul Eggert in threads rooted at
21990         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
21991         and
21992         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
21993         Before, the test was empty, and relied on ELIDE_CODE in source
21994         code.)
21995         (gl_PREREQ_GETOPT): New macro.
21996         (gl_GETOPT): Use them.
21997
21998 2004-08-12  Simon Josefsson  <jas@extundo.com>
21999
22000         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
22001         * lib/getopt_.h: Renamed from getopt.h.
22002
22003 2004-08-12  Simon Josefsson  <jas@extundo.com>
22004
22005         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
22006         Change default library name from libfoo to libgnu.
22007         Now, if you have a configure.ac that says:
22008                 gl_SOURCE_BASE(gl)
22009                 gl_M4_BASE(gl/m4)
22010                 gl_MODULES(error getopt etcetera)
22011                 gl_INIT
22012         you can import all you need by running:
22013                 ../gnulib/gnulib-tool --import
22014
22015         * modules/getopt (Files): Rename getopt.h to getopt_.h.
22016         (Makefile.am): Rewrite, use logic from argz.
22017         (Include): Use <getopt.h> instead of "getopt.h".
22018
22019 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
22020
22021         * modules/argp (Files): Add m4/unlocked-io.m4.
22022         (Depends-on): Add extensions.
22023
22024 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
22025
22026         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
22027         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
22028         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
22029         Check for program_invocation_name, program_invocation_short_name,
22030         flockfile, funlockfile, features.h, _getopt_long_only_r.
22031
22032 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
22033
22034         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
22035         its complicated substitute.
22036         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
22037         and program_invocation_name.
22038         (__argp_basename) [!_LIBC]: Remove; the only use was
22039         replaced by its body.
22040         (__argp_short_program_name): Change condition from
22041         !defined __argp_short_program_name to
22042         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
22043         to match argp-namefrob.h.
22044         (__argp_failure): Don't assume strerror_r returns char *.
22045         * lib/argp-parse.c (N_): Define unconditionally.
22046         (argp_default_options): Fill out initializers with 0 to avoid
22047         gcc warnings.
22048
22049 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
22050
22051         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
22052         getopt1.c.
22053
22054 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
22055
22056         Merge from coreutils.
22057
22058         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
22059
22060         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
22061         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
22062
22063 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
22064
22065         Merge from coreutils.
22066
22067         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
22068         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
22069         for Reliant Unix 5.43.
22070
22071         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
22072         (union fooround): Use uintmax_t, not long int.
22073         The rest is a merge from libc:
22074         [defined _LIBC]: Include <shlib-compat.h>.
22075         (_obstack) [defined _LIBC]: Remove after 2.3.4.
22076
22077         * lib/settime.c (settime): Recode to avoid warning with
22078         Sun Forte C 6U2.
22079
22080         * lib/strverscmp.c: Convert to UTF-8.
22081
22082 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
22083
22084         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
22085         m4/uintmax_t.m4.
22086
22087 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
22088
22089         * modules/xalloc-die: New file.
22090         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
22091
22092         * modules/md5 (Files): Add m4/uint32_t.m4.
22093         * modules/sha1: Renamed from modules/sha.
22094         (Files):
22095         Rename lib/sha.h to lib/sha1.h.
22096         Rename lib/sha.c to lib/sha1.c.
22097         Rename m4/sha.m4 to m4/sha1.m4.
22098         (lib_SOURCES): Likewise.
22099         (configure.ac): Rename gl_SHA to gl_SHA1.
22100         (Include): sha.h -> sha1.h.
22101
22102 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
22103
22104         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
22105         * m4/sha1.m4: Renamed from sha.m4.
22106         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
22107
22108 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
22109
22110         * lib/obstack.h (obstack_empty_p):
22111         Don't assume that chunk->contents is suitably aligned.
22112         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
22113         Likewise. Problem reported by Benno in
22114         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
22115
22116         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
22117         readable.  This could be improved further but it'd take some work.
22118
22119 2004-08-08  Simon Josefsson  <jas@extundo.com>
22120
22121         * modules/xgethostname (Depends-on): Remove exit and error (not
22122         used).
22123
22124         * modules/getpass-gnu: Add getpass.h.
22125         (Depends-on): Add stdbool.
22126         * modules/getpass: Add getpass.h.
22127
22128 2004-08-08  Simon Josefsson  <jas@extundo.com>
22129
22130         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
22131         Check getpass declaration.
22132
22133 2004-08-08  Simon Josefsson  <jas@extundo.com>
22134
22135         * lib/xgethostname.c: Don't include error.h (not used).
22136
22137         * lib/getpass.h: Add.
22138         * lib/getpass.c: Include getpass.h first.
22139
22140 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
22141
22142         * lib/xalloc-die.c: New file.
22143         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
22144         All uses removed.
22145         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
22146         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
22147         xalloc-die.c.
22148         (_, N_, xalloc_die): Move to xalloc-die.c.
22149         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
22150         so that we needn't mess with xalloc_msg_memory_exhausted.
22151
22152         * lib/sha1.h: Renamed from sha.h.
22153         (SHA1_H): Renamed from _SHA_H.
22154         (sha1_ctx): Renamed from sha_ctx.
22155         (sha1_init_ctx): Renamed from sha_init_ctx.
22156         (sha1_process_block): Renamed from sha_process_block.
22157         (sha1_process_bytes): Renamed from sha_process_bytes.
22158         (sha1_finish_ctx): Renamed from sha_finish_ctx.
22159         (sha1_read_ctx): Renamed from sha_read_ctx.
22160         (sha1_stream): Renamed from sha_stream.
22161         (sha1_buffer): Renamed from sha_buffer.
22162         * lib/sha1.c: Likewise; renamed from sha.c.
22163         Do not include <sys/types.h>.
22164         Include <stddef.h> rather than <stdlib.h>.
22165
22166 2004-08-08  Bruno Haible  <bruno@clisp.org>
22167
22168         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
22169         FILESYSTEM_PREFIX_LEN.
22170         * lib/progreloc.c: Likewise.
22171         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
22172
22173 2004-08-06  Simon Josefsson  <jas@extundo.com>
22174
22175         * modules/progname (Depends-on): Don't depend on stdbool.
22176
22177 2004-08-06  Simon Josefsson  <jas@extundo.com>
22178
22179         * modules/getsubopt: New file.
22180         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
22181         getsubopt.
22182
22183 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
22184
22185         More merge from coreutils.
22186
22187         * m4/utimens.m4, m4/utimecmp.m4: New files.
22188         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
22189         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
22190         prereq.m4, sha.m4: Import changes from coreutils.
22191
22192 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
22193
22194         More merge from coreutils.
22195         * modules/raise, modules/readtokens0, modules/utimens:
22196         * modules/utimecmp, module/xnanosleep: New files.
22197         * modules/strftime: Add lib/strftime.h.
22198         Change include from <time.h> to "strftime.h".
22199         * modules/yesno: Add lib/yesno.h.
22200         * modules/backupfile: Remove lib/addext.c.
22201         * modules/euidaccess: Add stat-macros.h.
22202         * modules/canonicalize, modules/euidaccess,
22203         modules/filemode, modules/lchown, modules/makepath,
22204         modules/rmdir, modules/stat: Likewise.
22205
22206 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
22207
22208         Merge from tar.
22209         * lib/argp-help.c (make_hol, hol_append): Don't assume that
22210         SIZE_MAX is a valid preprocessor constant.
22211         (__argp_basename): Change from "#ifndef _LIBC"
22212         to "#ifndef __argp_short_program_name", so that
22213         we don't compile these functions for tar.
22214
22215         More merges from coreutils.
22216         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
22217         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
22218         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
22219         * lib/addext.c: Remove; no longer needed.
22220         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
22221         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
22222         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
22223         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
22224         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
22225         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
22226         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
22227         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
22228         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
22229         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
22230         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
22231         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
22232         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
22233         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
22234         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
22235         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
22236         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
22237         Import changes from coreutils.
22238
22239 2004-08-05  Simon Josefsson  <jas@extundo.com>
22240
22241         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
22242
22243 2004-08-05  Simon Josefsson  <jas@extundo.com>
22244
22245         * m4/getsubopt.m4: New file.
22246
22247 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
22248
22249         Merge from coreutils.
22250
22251         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
22252         * m4/getcwd-path-max.m4: New files.
22253
22254         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
22255         FILESYSTEM_PREFIX_LEN ->
22256         FILE_SYSTEM_PREFIX_LEN.
22257         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
22258         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
22259         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
22260         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
22261
22262         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
22263         prerequisite modules now handle the DOS stuff.
22264         Don't check for unistd.h.
22265
22266 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
22267
22268         Merge from coreutils.
22269
22270         * lib/.gdb-history: Remove; this doesn't belong here.
22271
22272         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
22273         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
22274         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
22275         * lib/getcwd.c: New files.
22276
22277         * lib/dirname.h: Include <stdbool.h>.
22278         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
22279         for consistency with POSIX terminology.  All uses changed.
22280         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
22281         (strip_trailing_slashes): Use bool for booleans.
22282         * lib/stripslash.c (strip_trailing_slashes): Likewise.
22283
22284         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
22285         sometimes returns a positive errno value even when it succeeds.
22286         (print_errno_message) [!LIBC]: Fall back on strerror if
22287         __strerror_r fails.
22288
22289         * lib/path-concat.c (mempcpy): Don't define if a system header defines
22290         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
22291         (longest_relative_suffix): New function.
22292         (path_concat): Use it.  Assume first argument is not NULL.
22293         Port to DOS.  Omit redundant separators.
22294         Report an error instead of returning NULL.
22295         Use mempcpy instead of memcpy.
22296         (xpath_concat): Remove: not declared or used.
22297
22298         * lib/same.h: Include <stdbool.h>
22299         (same_name): Return bool, not int.
22300         * lib/same.c (same_name): Likewise.
22301         (errno): Don't declare; we assume C89 or better now.
22302
22303         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
22304         if not already defined.
22305
22306         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
22307         * lib/dup-safer.c (errno): Likewise.
22308
22309 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
22310
22311         Merge from coreutils.
22312         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
22313         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
22314         * modules/path-concat: Don't depend on strdup.
22315
22316 2004-08-03  Simon Josefsson  <jas@extundo.com>
22317
22318         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
22319         * lib/progname.h: Don't include stdbool.h.
22320
22321 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
22322
22323         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
22324         * MODULES.html.sh (func_all_modules): Remove fatal.
22325
22326 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
22327
22328         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
22329
22330 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
22331
22332         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
22333         working.
22334
22335 2004-08-02  Simon Josefsson  <jas@extundo.com>
22336
22337         * lib/getsubopt.h: New file, with comments from Bruno Haible.
22338         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
22339         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
22340
22341 2004-08-01  Simon Josefsson  <jas@extundo.com>
22342
22343         * lib/xgetdomainname.c: Include stdlib.h, for free().
22344
22345 2004-07-19  Bruno Haible  <bruno@clisp.org>
22346
22347         * MODULES.html.sh (func_all_modules): Add dummy.
22348
22349 2004-07-16  Simon Josefsson  <jas@extundo.com>
22350
22351         * modules/dummy: New file.
22352
22353 2004-07-16  Simon Josefsson  <jas@extundo.com>
22354
22355         * lib/dummy.c: New file.
22356
22357 2004-07-16  Bruno Haible  <bruno@clisp.org>
22358
22359         * lib/backupfile.h: Add extern "C" for C++.
22360         * lib/closeout.h: Likewise.
22361         * lib/copy-file.h: Likewise.
22362         * lib/findprog.h: Likewise.
22363         * lib/full-write.h: Likewise.
22364         * lib/pathname.h: Likewise.
22365         * lib/progname.h: Likewise.
22366         * lib/stpcpy.h: Likewise.
22367         * lib/stpncpy.h: Likewise.
22368         * lib/strcase.h: Likewise.
22369         * lib/strstr.h: Likewise.
22370         * lib/xalloc.h: Likewise.
22371
22372         * lib/mbswidth.h: Add extern "C" for C++.
22373         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
22374
22375 2004-07-13  Robert Millan  <robertmh@gnu.org>
22376
22377         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
22378
22379 2004-07-09  Simon Josefsson  <jas@extundo.com>
22380
22381         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
22382         failed without this.)
22383
22384 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
22385
22386         * modules/chown (Files): Add lib/fchown-stub.c, since
22387         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
22388
22389 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
22390
22391         * lib/fchown-stub.c: New file.
22392
22393 2004-06-24  Jim Meyering  <jim@meyering.net>
22394
22395         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
22396
22397 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
22398
22399         * modules/argz: Omit "#include".
22400
22401         * MODULES.html.sh (func_all_modules): Add calloc, to match
22402         2004-06-01 addition of calloc module.
22403
22404 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
22405
22406         * m4/argz.m4: New file, which is autoupdated from libtool.
22407
22408 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
22409
22410         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
22411         libtool.
22412
22413 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
22414
22415         * config/srclist-update: Don't insist on "USA." before the
22416         close-comment, as libtool omits the period and puts the */ on a
22417         separate line.
22418         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
22419         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
22420
22421 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
22422
22423         * modules/argz: New file.
22424         * MODULES.html.sh (func_all_modules): Add argz.
22425
22426 2004-06-12  Jim Meyering  <jim@meyering.net>
22427         and  Paul Eggert  <eggert@cs.ucla.edu>
22428
22429         * modules/hash (Files): Add lib/xalloc.h.
22430         * modules/pipe (Depends-on): Add wait-process.
22431         * modules/stat (Depends-on): Add xalloc.
22432         * modules/userspec (Files): Add lib/userspec.h.
22433         * modules/xstrto
22434
22435         Upgrade from gettext-0.13.
22436         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
22437         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
22438         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
22439
22440 2004-06-10  Jim Meyering  <jim@meyering.net>
22441
22442         * lib/calloc.c: New file.
22443
22444 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
22445
22446         * lib/getdate.y (yylex): Allow space between sign and number.
22447         Problem reported by Dan Jacobson.
22448
22449 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
22450
22451         Merge from coreutils CVS.
22452
22453         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
22454         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
22455         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
22456         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
22457         xstrtol.m4: Fix copyright date and/or serial number.
22458
22459         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
22460         See if we need an fchown replacement.
22461         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
22462         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
22463         and use the replacement function if we detect either defect.
22464
22465         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
22466         gl_UTIMECMP.
22467
22468 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
22469         and  Jim Meyering  <jim@meyering.net>
22470
22471         Merge from coreutils CVS.
22472
22473         * lib/stat-macros.h: New file, with contents from file-type.h
22474         and coreutils' system.h.
22475         * lib/file-type.c: Include "stat-macros.h".
22476         * lib/file-type.h (file_type): Move all macro definitions to new file,
22477         stat-macros.h.
22478
22479         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
22480         Wrap old code with this conditional.
22481         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
22482         function that does not dereference symlinks.
22483         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
22484
22485         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
22486         dependency problems.
22487         (xreadlink): Accept new arg SIZE, for efficiency.
22488         All decls and uses changed.
22489         * lib/xreadlink.h: Include <stddef.h>, for size_t.
22490
22491         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
22492         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
22493
22494         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
22495         sysexits.h.
22496
22497 2004-06-01  Jim Meyering  <jim@meyering.net>
22498
22499         * m4/calloc.m4: New file.
22500
22501 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
22502
22503         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
22504         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
22505         Also, fix a typo in a diagnostic.
22506
22507 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
22508
22509         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
22510         or AC_FUNC_REALLOC.
22511
22512 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
22513
22514         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
22515         macros to be defined.
22516         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
22517         the allocator returns NULL because the requested size is zero.
22518
22519 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
22520
22521         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
22522         var.  Add comment explaining why libc still defines it.  This
22523         merges the following patch from glibc:
22524         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
22525
22526 2004-05-20  Andreas Schwab  <schwab@suse.de>
22527
22528         * m4/free.m4: Replace free if it not known to work, not the other
22529         way round.
22530
22531 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
22532
22533         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
22534         present in glibc since revision 1.1 of this file.
22535         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
22536         obstack_alignment_mask, obstack_alloc, obstack_base,
22537         obstack_blank, obstack_blank_fast, obstack_chunk_size,
22538         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
22539         obstack_grow0, obstack_init, obstack_int_grow,
22540         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
22541         obstack_next_free, obstack_object_size, obstack_ptr_grow,
22542         obstack_ptr_grow_fast, obstack_room): Remove declarations of
22543         nonexistent functions.
22544
22545 2004-05-18  Karl Berry  <karl@gnu.org>
22546
22547         * config/srclist.txt: break link for vasnprintf.c.
22548
22549 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
22550
22551         Port obstack to the AS/400, where pointers are 16 bytes wide and
22552         you cannot cast an integer to a valid pointer.  This patch is
22553         currently waiting to be integrated into glibc; see
22554         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
22555
22556         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
22557         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
22558         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
22559         (struct obstack): temp member is now a union of a pointer and
22560         an integer, instead of an integer.  All integer uses changed.
22561         This does not affect the physical layout of struct obstack,
22562         except on hosts (like the AS/400) where the size or alignment of
22563         void * is greater than that of ptrdiff_t.
22564         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
22565         __STDC__)]: Store temporary in pointer member of union, not
22566         integer member.
22567         * lib/obstack.c: Include <stddef.h>, for offsetof.
22568         (struct fooalign): Remove; it doesn't need a name.
22569         (union fooround): Change double to long double, and add void *.
22570         (DEFAULT_ALIGNMENT): Use offsetof to compute.
22571         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
22572         not a macro.  Hence the values are always int; so remove all
22573         casts-to-int in uses.
22574
22575 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
22576
22577         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
22578         we can get this patch merged into glibc.
22579
22580 2004-05-17  Derek R. Price  <derek@ximbiot.com>
22581             Paul Eggert  <eggert@cs.ucla.edu>
22582
22583         * m4/argp: Depend on alloca.
22584
22585 2004-05-17  Derek R. Price  <derek@ximbiot.com>
22586             Paul Eggert  <eggert@cs.ucla.edu>
22587
22588         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
22589         freecoding.
22590
22591 2004-05-17  Bruno Haible  <bruno@clisp.org>
22592
22593         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
22594         precision that consists of a '.' followed by an empty digit string.
22595         Patch by Tor Lillqvist <tml@iki.fi>.
22596
22597 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
22598
22599         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
22600         for backward compatibility with older code.  We need our own
22601         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
22602         it under some other name, and our alloca.h will define it.
22603
22604 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
22605             Derek Price  <derek@ximbiot.com>
22606
22607         * lib/alloca.c: Include <alloca.h>, to get our interface.
22608         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
22609         include <alloca.h> first.  Use C89 prototype for alloca; this
22610         requires including <stddef.h> for size_t.  Use extern "C" if C++.
22611         Use #elif for simplicity, since we can assume C89 now.
22612         Don't try to source the system alloca.h since it will not be found
22613         and to prevent recursively including its replacement.
22614         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
22615         * lib/regex.c: Likewise.
22616
22617 2004-05-16  Derek Price  <derek@ximbiot.com>
22618             Paul Eggert  <eggert@cs.ucla.edu>
22619
22620         getline cleanup.  This changes the getndelim2 API: both order of
22621         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
22622         no delimiter).
22623
22624         * lib/getline.c: Don't include stddef.h or stdio.h, since our
22625         interface does that.
22626         (getline): Always use getdelim, so that we don't have two
22627         copies of this code.
22628         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
22629         if available.
22630         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
22631         (GETNDELIM2_MAXIMUM): New macro.
22632         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
22633         instead of the old practice of delim2==0.  All callers changed.
22634         Return -1 on overflow, instead of returning junk.
22635         Do not set *linesize unless allocation succeeds.
22636         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
22637         that we include sys/types.h.
22638         * lib/getnline.h: Likewise.
22639         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
22640         (getndelim2): Reorder arguments.
22641         * lib/getnline.c (getnline, getndelim):
22642         Don't discard the NMAX argument.
22643         (getnline): Invoke getndelim, to avoid code duplication.
22644         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
22645         of (size_t) -1 by callers of the getnline family.
22646
22647 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
22648
22649         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
22650         Check for gettimeofday.
22651         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
22652         Check for settimeofday, stime.
22653
22654 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
22655
22656         * lib/nanosleep.c (suspended): Change its type from int to
22657         sig_atomic_t volatile.
22658         (first_call): Make it private to rpl_nanosleep, and have it
22659         be zero initially as that's a bit faster.
22660         (my_usleep): Round up fractional times instead of truncating them,
22661         as this is the usual meaning for 'sleep'.
22662
22663         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
22664         doesn't work.
22665         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
22666         (ENOSYS): Define if not defined.
22667         (settime): Fall back on stime if it exists and settimeofday fails.
22668         But don't bother with fallbacks if a method fails with errno == EPERM.
22669
22670 2004-05-11  Jim Meyering  <jim@meyering.net>
22671
22672         Prior to this change, the save_cwd caller required read access to the
22673         current directory on most systems (ones with the fchdir function).
22674
22675         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
22676         fails, try write-only, and finally, resort to using xgetcwd.
22677
22678 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
22679
22680         * lib/obstack.c, obstack.h: Import changes from libc.
22681
22682 2004-04-28  Bruno Haible  <bruno@clisp.org>
22683
22684         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
22685         also implicitly appends .exe to executables.
22686         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
22687         accepts Windows pathnames.
22688         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
22689         Treat Cygwin like Windows, since it now accepts Windows pathnames.
22690         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
22691         Treat Cygwin like Windows, since it now accepts Windows pathnames.
22692         Reported by Derek Robert Price <derek@ximbiot.com>.
22693
22694 2004-04-21  Karl Berry  <karl@gnu.org>
22695
22696         * config/srclist.txt (localcharset.c): break sync.
22697
22698 2004-04-20  Paul Eggert  <eggert@twinsun.com>
22699
22700         * m4/host-os.m4: Add a copyright notice.
22701
22702 2004-04-20  Jim Meyering  <jim@meyering.net>
22703
22704         Change UTILS_ to gl_ in AC_DEFINE'd names.
22705         Change utils_- and jm_-prefixed variables, too.
22706         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
22707         UTILS_FUNC_MKDIR_TRAILING_SLASH.
22708         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
22709
22710         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
22711         Don't emit trailing blanks.
22712         Also rename jm_-prefixed variables to have gl_ prefix.
22713
22714         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
22715         Also rename jm_-prefixed variables to have gl_ prefix.
22716
22717         * m4/jm-macros.m4: Reflect the renamings.
22718         * m4/prereq.m4: Likewise.
22719
22720 2004-04-20  Jim Meyering  <jim@meyering.net>
22721
22722         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
22723         memory.
22724
22725 2004-04-20  Jim Meyering  <jim@meyering.net>
22726             Bruno Haible  <bruno@clisp.org>
22727
22728         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
22729         memory when realloc fails.
22730
22731 2004-04-19  Jim Meyering  <jim@meyering.net>
22732
22733         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
22734         now that readutmp.c may call `free (0)'.
22735
22736 2004-04-19  Bruno Haible  <bruno@clisp.org>
22737
22738         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
22739         * m4/inttypes_h.m4: Likewise.
22740         * m4/stdint_h.m4: Likewise.
22741         * m4/intmax_t.m4: Likewise.
22742         * m4/uintmax_t.m4: Likewise.
22743
22744 2004-04-18  Jim Meyering  <jim@meyering.net>
22745
22746         * m4/prereq.m4: Don't forbid jm_ prefix.
22747
22748         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
22749         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
22750         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
22751         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
22752         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
22753         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
22754         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
22755         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
22756         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
22757         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
22758         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
22759         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
22760         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
22761         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
22762         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
22763         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
22764         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
22765         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
22766         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
22767
22768 2004-04-18  Jim Meyering  <jim@meyering.net>
22769
22770         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
22771         failure, don't leak memory and do call END_UTMP_ENT.
22772
22773 2004-04-16  Jim Meyering  <jim@meyering.net>
22774
22775         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
22776         coreutils' stat program.
22777         (gl_PREREQ): Don't require jm_PREREQ_STAT.
22778
22779 2004-04-11  Paul Eggert  <eggert@twinsun.com>
22780
22781         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
22782         C89.
22783         (CHAR_BIT): Remove, since we assume C89.
22784         Include <stdint.h> if available, as per current Autoconf CVS advice.
22785
22786 2004-03-31  Jim Meyering  <jim@meyering.net>
22787
22788         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
22789         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
22790         * m4/xalloc.m4: Likewise.
22791
22792 2004-03-30  Paul Eggert  <eggert@twinsun.com>
22793
22794         Merge from coreutils.
22795
22796         * m4/inttostr.m4: New file.
22797         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
22798         Require AM_STDBOOL_H and gl_TIMESPEC instead.
22799         Require gl_CLOCK_TIME.
22800         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
22801
22802 2004-03-30  Paul Eggert  <eggert@twinsun.com>
22803
22804         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
22805         not bool, to be more consistent with Unix conventions.
22806         Suggested by Bruno Haible.
22807
22808         Merge from coreutils.
22809
22810         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
22811         * lib/umaxtostr.c: New files.
22812
22813         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
22814         the usual <time.h> dance.
22815         (get_date): Change signature to support fractional time stamps.
22816         All callers changed.
22817         * lib/getdate.y: Include "getdate.h" first, as we can now
22818         assume C89 and don't need to worry about 'const'.
22819         Similarly, include "unlocked-io.h" near start, not in middle.
22820         Include <limits.h>.
22821         (textint.value): Use long int rather than int.
22822         (textint.digits): Use size_t rather than int.
22823         (BILLION, LOG10_BILLION): New constants.
22824         (parser_control): New member rel_ns.  Members day_ordinal,
22825         time_zone, month, day, hour, minutes, rel_year, rel_month,
22826         rel_day, rel_hour, rel_minutes, rel_seconds
22827         are now long int, not int.  Member seconds is now struct timespec,
22828         not int.  New member timespec_seen.  Members dates_seen, days_seen,
22829         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
22830         not int.
22831         (%union.intval): Now long int, not int.
22832         New member timespec.
22833         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
22834         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
22835         (spec): Now is a timespec or an item list.
22836         (timespec, items): New nonterminals.
22837         (time, rel, relunit, number, get_date):
22838         Add support for fractional seconds.
22839         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
22840         (gmtime, localtime, mktime): Remove decls; not needed with C89.
22841         (to_hour): First arg is now long int, not int.
22842         (to_year): Returns long int, not int.
22843         Don't treat year -70 like 70.
22844         (tm_diff): Returns long int, not int.
22845         (lookup_word): Use bool instead of int when appropriate.
22846         (yylex): Use size_t for count, not int.
22847         Detect overflow when parsing large integer constants.
22848         Add support for fractions.
22849         (get_date): Make pointers 'const' if possible.
22850         Use more-portable code to detect integer overflow.
22851         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
22852         Don't use ctime; it's not reliable if the year has >4 digits.
22853
22854         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
22855         This is for compatibility with BSD.
22856
22857         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
22858         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
22859         From coreutils' system.h.
22860
22861         * lib/userspec.c: Don't include "posixver.h".
22862         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
22863         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
22864         compatible extension.  Simplify code by removing a boolean int
22865         that was always nonzero if a string was nonnull.
22866
22867 2004-03-30  Jim Meyering  <jim@meyering.net>
22868
22869         Merge from coreutils.
22870
22871         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
22872         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
22873         on some systems one must include <grp.h> before it.
22874         Reported by Christian Krackowizer.
22875
22876 2004-03-30  Jim Meyering  <jim@meyering.net>
22877
22878         Merge from coreutils.
22879
22880         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
22881
22882         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
22883         an empty input stream.
22884
22885         * lib/readtokens.c: Include <stdbool.h>.
22886         (readtoken): Use `size_t' rather than int/long.
22887         All callers adjusted.
22888         Use `bool' rather than `int' where appropriate.
22889         Use memset rather than an explicit loop.
22890         Use x2nrealloc rather than xrealloc.
22891         Allow the use of `\0' as a delimiter.
22892         (readtokens): Likewise.
22893         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
22894
22895 2004-03-30  Jim Meyering  <jim@meyering.net>
22896
22897         * m4/realloc.m4: Remove file, since now it does no more than
22898         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
22899         the `configure.ac' section of module/realloc.
22900         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
22901
22902 2004-03-30  Bruno Haible  <bruno@clisp.org>
22903
22904         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
22905         nonnull.
22906
22907 2004-03-29  Paul Eggert  <eggert@twinsun.com>
22908
22909         Merge changes to getloadavg.c from coreutils and Emacs.
22910
22911         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
22912         Define to an expression, not to the empty string.
22913         Include cloexec.h and xalloc.h.
22914         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
22915         Use set_cloexec_flag rather than rolling our own.
22916         * lib/cloexec.c, lib/cloexec.h: New files.
22917
22918 2004-03-29  Paul Eggert  <eggert@twinsun.com>
22919
22920         * m4/cloexec.m4: New file.
22921
22922 2004-03-18  Paul Eggert  <eggert@twinsun.com>
22923
22924         * lib/getopt.h: Sync with libc CVS.
22925
22926 2004-03-18  Paul Eggert  <eggert@twinsun.com>
22927             Bruno Haible  <bruno@clisp.org>
22928
22929         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
22930         mbswidth.
22931
22932 2004-03-18  Paul Eggert  <eggert@twinsun.com>
22933             Bruno Haible  <bruno@clisp.org>
22934
22935         * lib/mbswidth.h: Include <wchar.h> only if
22936         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
22937         <wchar.h>.
22938         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
22939
22940 2004-03-09  Paul Eggert  <eggert@twinsun.com>
22941
22942         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
22943         Sync with libc CVS.
22944         * lib/getopt_int.h: New file, also synced from libc.
22945
22946 2004-03-09  Paul Eggert  <eggert@twinsun.com>
22947
22948         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
22949         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
22950         Bring back getopt.c, getopt.h, getopt1.c.
22951
22952 2004-03-07  Paul Eggert  <eggert@twinsun.com>
22953
22954         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
22955         All uses changed.  Check for sa_sigaction member; this fixes
22956         a bug first reported by Jason Andrade in
22957         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
22958
22959 2004-03-07  Paul Eggert  <eggert@twinsun.com>
22960
22961         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
22962         '#if' expressions.  Unlike the code it replaces, it does not
22963         depend on (defined _SC_PAGESIZE).  However, it does depend on
22964         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
22965         first reported by Jason Andrade in
22966         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
22967
22968 2004-02-25  Simon Josefsson  <jas@extundo.com>
22969
22970         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
22971
22972 2004-02-25  Simon Josefsson  <jas@extundo.com>
22973
22974         * lib/strdup.h: New file.
22975         * lib/strdup.c: Include it.
22976         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
22977         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
22978
22979 2004-02-23  Karl Berry  <karl@gnu.org>
22980
22981         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
22982         (from fencepost.gnu.org:/gd/gnuorg).
22983
22984 2004-02-23  Karl Berry  <karl@gnu.org>
22985
22986         * config/srclistvars.sh (GNUORG) [karl]: redefine.
22987         * config/srclist.txt: add maintain/standards documents.
22988
22989 2004-02-18  Bruno Haible  <bruno@clisp.org>
22990
22991         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
22992         Reported by Derek Robert Price <derek@ximbiot.com>.
22993
22994 2004-02-16  Karl Berry  <karl@gnu.org>
22995
22996         * config/mkinstalldirs, install-sh: update from automake.
22997
22998 2004-02-06  Karl Berry  <karl@gnu.org>
22999
23000         * m4/po.m4: update from gettext 0.14.1.
23001
23002 2004-02-06  Karl Berry  <karl@gnu.org>
23003
23004         * lib/config.charset: update from gettext 0.14.1.
23005
23006 2004-02-05  Paul Eggert  <eggert@twinsun.com>
23007
23008         Add comments and code, prompted by suggestions from Bruno Haible
23009         for sh-quote.
23010         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
23011         describing the enum quoting_style values.
23012         * lib/quotearg.c (quotearg_alloc): New function.
23013         (quotearg_buffer_restyled): Treat lone { and } as special.
23014         Treat = as special.  Work around bug with older shells
23015         that "see" a '\' that is really the 2nd byte of a multibyte char.
23016         Quote empty string with shell_quoting_style.
23017
23018 2004-02-03  Bruno Haible  <bruno@clisp.org>
23019
23020         * m4/pipe.m4: New file, from GNU gettext.
23021
23022 2004-02-03  Bruno Haible  <bruno@clisp.org>
23023
23024         * lib/pipe.h: New file, from GNU gettext.
23025         * lib/pipe.c: New file, from GNU gettext.
23026
23027 2004-01-27  Bruno Haible  <bruno@clisp.org>
23028
23029         * m4/execute.m4: New file, from GNU gettext.
23030
23031 2004-01-27  Bruno Haible  <bruno@clisp.org>
23032
23033         * lib/execute.h: New file, from GNU gettext.
23034         * lib/execute.c: New file, from GNU gettext.
23035         * lib/w32spawn.h: New file, from GNU gettext.
23036
23037 2004-01-24  Paul Eggert  <eggert@twinsun.com>
23038
23039         Merge from diffutils.
23040
23041         * lib/file-type.c (file_type): Add typed memory objects.
23042         * lib/file-type.h (S_TYPEISTMO): New macro.
23043
23044         * lib/c-stack.h (c_stack_action): Remove argv argument.
23045         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
23046         (die): Don't calculate message unless segv_action returns.
23047         (get_stack_location, min_address_from_argv, max_address_from_argv,
23048         volatile stack_base, volatile_stack_size): Remove.
23049         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
23050         that every segmentation violation is a stack overflow.  (Ouch!)
23051         See Debian bug 136249 (still outstanding) for more info about why
23052         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
23053
23054 2004-01-24  Paul Eggert  <eggert@twinsun.com>
23055
23056         Exit-status fix from coreutils.
23057
23058         Use exit_failure consistently in place of EXIT_FAILURE,
23059         so that program exit statuses are consistent on failure.
23060
23061         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
23062         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
23063         * lib/argmatch.h: Comment fix to match the above.
23064         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
23065         Now a macro referring to exit_failure, instead of a separate
23066         variable.  Include "exitfail.h" to get it.
23067         * lib/xstrtol.h: Include "exitfail.h".
23068         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
23069
23070         * lib/long-options.c (parse_long_options): Use prototype
23071         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
23072         for clarity.
23073
23074 2004-01-21  Jim Meyering  <jim@meyering.net>
23075
23076         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
23077         so as not to conflict with a different-sized __mktime_internal
23078         function in GNU libc.
23079         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
23080         Problem building statically-linked `ls' reported by Michael Brunnbauer.
23081
23082 2004-01-20  Karl Berry  <karl@gnu.org>
23083
23084         * config/config.guess: update from config.
23085
23086         * config/srclistvars.sh: GNUWWWLICENSES for karl.
23087
23088 2004-01-20  Bruno Haible  <bruno@clisp.org>
23089
23090         Safer stack allocation.
23091         * lib/setenv.c: Include allocsa.h.
23092         (alloca): Remove fallback definition.
23093         (freea): Remove macro.
23094         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
23095         instead of freea.
23096
23097 2004-01-20  Bruno Haible  <bruno@clisp.org>
23098
23099         * m4/eealloc.m4: New file, from GNU gettext.
23100
23101 2004-01-20  Bruno Haible  <bruno@clisp.org>
23102
23103         * m4/allocsa.m4: New file, from GNU gettext.
23104
23105 2004-01-20  Bruno Haible  <bruno@clisp.org>
23106
23107         * lib/xallocsa.h: New file, from GNU gettext.
23108         * lib/xallocsa.c: New file, from GNU gettext.
23109
23110 2004-01-20  Bruno Haible  <bruno@clisp.org>
23111
23112         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
23113
23114 2004-01-20  Bruno Haible  <bruno@clisp.org>
23115
23116         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
23117         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
23118         specially.
23119
23120 2004-01-20  Bruno Haible  <bruno@clisp.org>
23121
23122         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
23123         patch.
23124
23125 2004-01-20  Bruno Haible  <bruno@clisp.org>
23126
23127         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
23128
23129 2004-01-20  Bruno Haible  <bruno@clisp.org>
23130
23131         * lib/eealloc.h: New file.
23132
23133 2004-01-20  Bruno Haible  <bruno@clisp.org>
23134
23135         * lib/binary-io.h: Avoid warnings on Cygwin.
23136
23137 2004-01-20  Bruno Haible  <bruno@clisp.org>
23138
23139         * lib/allocsa.h: New file, from GNU gettext.
23140         * lib/allocsa.c: New file, from GNU gettext.
23141
23142 2004-01-18  Karl Berry  <karl@gnu.org>
23143
23144         * doc/gpl.texi, doc/lgpl.texi: new files.
23145
23146 2004-01-18  Karl Berry  <karl@gnu.org>
23147
23148         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
23149         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
23150
23151 2004-01-15  Paul Eggert  <eggert@twinsun.com>
23152
23153         Merge from coreutils.
23154
23155         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
23156         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
23157         (gl_DEFAULT_POSIX2_VERSION): Move
23158         the documentation from 'configure' into 'config.hin',
23159         so that 'configure --help' isn't burdened by it and
23160         we don't have to worry about its formatting there.
23161         Reword the documentation so that it's more succinct
23162         and can be run together into a single paragraph.
23163         * m4/same.m4 (gl_SAME): Check for pathconf.
23164
23165 2004-01-15  Paul Eggert  <eggert@twinsun.com>
23166
23167         Merge from coreutils.
23168
23169         * lib/posixver.c: Include posixver.h.
23170
23171         * lib/same.c: Include <stdbool.h>, <limits.h>.
23172         (_POSIX_NAME_MAX): Define if not defined.
23173         (MIN): New macro.
23174         (same_name): If file names are silently truncated, report
23175         that the file names are the same if they are the same after
23176         the silent truncation.
23177
23178         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
23179         conversion function.
23180         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
23181         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
23182         longer needed.
23183
23184 2004-01-15  Jim Meyering  <jim@meyering.net>
23185
23186         Merge from coreutils.
23187
23188         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
23189         if no library is required.
23190         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
23191         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
23192         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
23193         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
23194         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
23195         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
23196         value, $ac_cv_search_crypt, if it's "none required".
23197         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
23198         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
23199         not gl_FUNC_GETLOADAVG.
23200         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
23201         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
23202
23203 2004-01-15  Jim Meyering  <jim@meyering.net>
23204
23205         Merge from coreutils.
23206
23207         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
23208         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
23209         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
23210
23211         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
23212         optional configure-time default.
23213
23214         * lib/version-etc.c (version_etc_copyright): Update copyright date.
23215
23216         * lib/xreadlink.c (xreadlink): Correct outdated comment.
23217
23218 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
23219
23220         Merge from coreutils.
23221
23222         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
23223         value, $ac_cv_search_nanosleep, if it's "none required".
23224
23225 2004-01-14  Paul Eggert  <eggert@twinsun.com>
23226
23227         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
23228         with like-named macro in fnmatch.c.
23229         (EXT): Use an internal constant instead.
23230
23231         Merge fnmatch patches from glibc.
23232         * lib/fnmatch.c (mbsinit): Remove define.
23233         Add libc_hidden_ver (__fnmatch, fnmatch).
23234         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
23235         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
23236
23237 2004-01-14  Karl Berry  <karl@gnu.org>
23238
23239         * config/install-sh: update from automake.
23240
23241 2004-01-13  Karl Berry  <karl@gnu.org>
23242
23243         * config/install-sh: update from automake.
23244
23245 2004-01-09  Karl Berry  <karl@gnu.org>
23246
23247         * config/install-sh: update from automake.
23248
23249 2004-01-05  Karl Berry  <karl@gnu.org>
23250
23251         * config/config.{sub,guess}: update from config.
23252
23253 2003-12-31  Karl Berry  <karl@gnu.org>
23254
23255         * config/depcomp: update from automake.
23256
23257 2003-12-14  Karl Berry  <karl@gnu.org>
23258
23259         * lib/config.charset: update from gettext-runtime.
23260
23261 2003-12-03  Paul Eggert  <eggert@twinsun.com>
23262
23263         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
23264         Bug reported by Alfred M. Szmidt.
23265
23266 2003-12-03  Bruno Haible  <bruno@clisp.org>
23267
23268         * m4/gettext.m4: Upgrade from gettext-0.13.
23269         * m4/po.m4: Upgrade from gettext-0.13.
23270         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
23271         * m4/intmax.m4: New file, from gettext-0.13.
23272         * m4/printf-posix.m4: New file, from gettext-0.13.
23273
23274 2003-11-29  Karl Berry  <karl@gnu.org>
23275
23276         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
23277
23278 2003-11-25  Paul Eggert  <eggert@twinsun.com>
23279             Bruno Haible  <bruno@clisp.org>
23280
23281         * lib/printf-parse.h: Don't include sys/types.h.
23282         (ARG_NONE): New macro.
23283         (char_directive): Change type of *arg_index fields to size_t.
23284         * lib/printf-parse.c: Don't include sys/types.h.
23285         (SSIZE_MAX): Remove macro.
23286         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
23287         Remove unnecessary overflow check.
23288         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
23289         fields.
23290
23291 2003-11-25  Bruno Haible  <bruno@clisp.org>
23292
23293         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
23294
23295 2003-11-25  Bruno Haible  <bruno@clisp.org>
23296
23297         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
23298         gt_TYPE_SSIZE_T.
23299
23300 2003-11-24  Paul Eggert  <eggert@twinsun.com>
23301
23302         * modules/alloca: Remove dependency on xalloc.
23303
23304 2003-11-24  Paul Eggert  <eggert@twinsun.com>
23305
23306         * lib/alloca.c: Remove dependency on xalloc module.
23307         (xalloc_die): Remove.
23308         (memory_full) [!defined emacs]: New macro.
23309         [!defined emacs]: Don't include xalloc.h.
23310         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
23311         address arithmetic overflows.  Change datatypes a bit to avoid
23312         unnecessary casts.
23313
23314 2003-11-22  Jim Meyering  <jim@meyering.net>
23315
23316         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
23317         s/size/size_t/.
23318
23319 2003-11-21  Karl Berry  <karl@gnu.org>
23320
23321         * config/config.{sub,guess}: update from config.
23322
23323 2003-11-18  Karl Berry  <karl@gnu.org>
23324
23325         * config/config.{sub,guess}: update from config.
23326
23327         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
23328
23329 2003-11-17  Paul Eggert  <eggert@twinsun.com>
23330
23331         * README: Mention that S+T cannot overflow if S is the size of
23332         an existing object and T is sufficiently small.
23333
23334 2003-11-17  Jim Meyering  <jim@meyering.net>
23335
23336         On systems without utime and without a utimes function capable of
23337         dealing with a NULL struct utimbuf* argument, this utime replacement
23338         could -- in unusual circumstances -- leak a file descriptor.
23339         * lib/utime.c: Include <unistd.h> and <errno.h>.
23340         (utime_null): Be sure to close `fd' and to preserve errno.
23341         Reported by Geoff Collyer via Arnold Robbins.
23342
23343 2003-11-17  Bruno Haible  <bruno@clisp.org>
23344
23345         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
23346         (Depends-on): Add xsize.
23347
23348 2003-11-17  Bruno Haible  <bruno@clisp.org>
23349
23350         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
23351
23352 2003-11-17  Bruno Haible  <bruno@clisp.org>
23353
23354         * lib/vasnprintf.c (alloca): Remove fallback definition.
23355         (freea): Remove definition.
23356         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
23357         Reported by Paul Eggert.
23358
23359 2003-11-16  Paul Eggert  <eggert@twinsun.com>
23360             Bruno Haible  <bruno@clisp.org>
23361
23362         Protect against address arithmetic overflow.
23363         * lib/printf-args.h: Include stddef.h.
23364         (arguments): Change type of field 'count' to size_t.
23365         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
23366         'unsigned int' where appropriate.
23367         * lib/printf-parse.h: Include sys/types.h.
23368         (char_directive): Change type of *arg_index fields to ssize_t.
23369         (char_directives): Change type of fields 'count', max_*_length to
23370         size_t.
23371         * lib/printf-parse.c: Include sys/types.h and xsize.h.
23372         (SSIZE_MAX): Define fallback value.
23373         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
23374         instead of 'int' where appropriate. Check a_allocated, d_allocated
23375         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
23376         * lib/vasnprintf.c: Include xsize.h.
23377         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
23378         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
23379         overflow. Avoid wraparound when converting a width or precision from
23380         decimal to binary.
23381
23382 2003-11-16  Bruno Haible  <bruno@clisp.org>
23383
23384         Update from GNU gettext.
23385         * lib/printf-parse.c: Generalize to it can be compiled for wide
23386         strings.
23387         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
23388         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
23389         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
23390         SNPRINTF): New macros.
23391         Don't include <alloca.h> if the file is used inside libintl.
23392         (local_wcslen): New function, for Solaris 2.5.1.
23393         (VASNPRINTF): Use it instead of wcslen.
23394
23395 2003-11-16  Bruno Haible  <bruno@clisp.org>
23396
23397         * lib/xsize.h (xmax): New function.
23398         (xsum, xsum3, xsum4): Declare as "pure" functions.
23399
23400 2003-11-12  Paul Eggert  <eggert@twinsun.com>
23401
23402         * modules/xalloc (Files): Undo latest change, since xalloc.h
23403         no longer needs SIZE_MAX or PTRDIFF_MAX.
23404
23405 2003-11-12  Paul Eggert  <eggert@twinsun.com>
23406
23407         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
23408         gl_PTRDIFF_MAX.
23409
23410 2003-11-12  Paul Eggert  <eggert@twinsun.com>
23411
23412         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
23413         "return", to pacify some unknown compiler.  Problem reported
23414         by Joerg Schilling.
23415
23416 2003-11-12  Paul Eggert  <eggert@twinsun.com>
23417
23418         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
23419         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
23420         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
23421         heuristic is just as accurate as far as we know, and it removes a
23422         dependency on size_max.m4 and ptrdiff_max.m4.
23423
23424 2003-11-11  Bruno Haible  <bruno@clisp.org>
23425
23426         * modules/xsize (Files): Add m4/size_max.m4.
23427         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
23428
23429 2003-11-11  Bruno Haible  <bruno@clisp.org>
23430
23431         * m4/size_max.m4: New file.
23432         * m4/ptrdiff_max.m4: New file.
23433         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
23434         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
23435         (gl_XALLOC): Invoke it.
23436
23437 2003-11-11  Bruno Haible  <bruno@clisp.org>
23438
23439         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
23440         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
23441         defined.
23442
23443 2003-11-10  Paul Eggert  <eggert@twinsun.com>
23444
23445         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
23446         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
23447         rejected some allocations of exactly SIZE_MAX - 2 bytes.
23448         From Bruno Haible.
23449         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
23450         not (size_t) -1, since it's defined here.
23451
23452 2003-11-09  Karl Berry  <karl@gnu.org>
23453
23454         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
23455
23456 2003-11-06  Paul Eggert  <eggert@twinsun.com>
23457
23458         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
23459         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
23460         Reject sizes of exactly SIZE_MAX bytes.
23461         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
23462         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
23463
23464 2003-11-05  Bruno Haible  <bruno@clisp.org>
23465
23466         * lib/xsize.h: Include limits.h, to avoid a possible collision with
23467         SIZE_MAX defined in <limits.h> on Solaris.
23468
23469 2003-11-04  Jim Meyering  <jim@meyering.net>
23470
23471         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
23472         variable names, rather than @VAR@.
23473         * modules/poll: Likewise.
23474
23475 2003-11-04  Bruno Haible  <bruno@clisp.org>
23476
23477         * modules/xsize: New file.
23478         * modules/linebreak: Depend on xsize.
23479         * MODULES.html.sh (func_all_modules): Add xsize.
23480
23481 2003-11-04  Bruno Haible  <bruno@clisp.org>
23482
23483         * m4/xsize.m4: New file.
23484
23485 2003-11-04  Bruno Haible  <bruno@clisp.org>
23486
23487         * lib/xsize.h: New file.
23488         * lib/linebreak.c: Include xsize.h.
23489         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
23490         argument for overflow.
23491         Suggested by Paul Eggert.
23492
23493 2003-11-03  Karl Berry  <karl@gnu.org>
23494
23495         * config/config.{guess,sub}: update from config.
23496
23497 2003-11-03  Jim Meyering  <jim@meyering.net>
23498
23499         * modules/userspec (lib_SOURCES): Add userspec.h.
23500         (Include): Add "userspec.h".
23501         Improve description.
23502
23503 2003-11-03  Jim Meyering  <jim@meyering.net>
23504
23505         * lib/userspec.c: Include "userspec.h".
23506         * lib/userspec.h: New file.
23507
23508 2003-11-03  Bruno Haible  <bruno@clisp.org>
23509
23510         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
23511
23512 2003-11-03  Bruno Haible  <bruno@clisp.org>
23513
23514         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
23515         available, to avoid (extremely rare) race condition.
23516         Suggested by Paul Eggert.
23517
23518 2003-11-02  Karl Berry  <karl@gnu.org>
23519
23520         * config/srclist.txt (vasprintf.c): sync broken, sigh.
23521
23522 2003-10-31  Paul Eggert  <eggert@twinsun.com>
23523
23524         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
23525         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
23526         (read_filesystem_list): Set and use me_type_malloced.
23527         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
23528         whatever the type happens to be), for brevity and consistency.
23529         Check for size calculation overflow on Alphas running OSF/1.
23530
23531 2003-10-31  Jim Meyering  <jim@meyering.net>
23532
23533         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
23534
23535         * lib/linebuffer.c: Include <string.h> for declaration of memset.
23536
23537 2003-10-30  Paul Eggert  <eggert@twinsun.com>
23538             Bruno Haible  <bruno@clisp.org>
23539
23540         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
23541         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
23542
23543 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
23544
23545         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
23546         netbsd*-gnu*.  Suggested by Robert Millan.
23547
23548 2003-10-29  Paul Eggert  <eggert@twinsun.com>
23549
23550         * modules/group-member: Depend on stdbool.
23551
23552 2003-10-29  Paul Eggert  <eggert@twinsun.com>
23553
23554         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
23555
23556 2003-10-29  Paul Eggert  <eggert@twinsun.com>
23557
23558         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
23559         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
23560         after the 'gnu' in these cases.  This fixes some bugs in the
23561         previous change, and is based on suggestions by Robert Millan.
23562
23563 2003-10-29  Paul Eggert  <eggert@twinsun.com>
23564
23565         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
23566         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
23567         no longer needed.
23568         * lib/quotearg.c (quotearg_n_options): Use it.
23569         * lib/group-member.c: Include <stdbool.h>.
23570         (free_group_info): Arg is now const *; don't free arg.
23571         (get_group_info): Now returns bool and accepts struct group_info *,
23572         rather than returning a malloc'ed struct group_info *.
23573         All uses changed.  Check for overflow in internal size calculation.
23574
23575         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
23576         rather than xmalloc/xrealloc.
23577         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
23578         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
23579         conformance bug: the old code used a pointer after freeing the
23580         storage that it addressed.
23581         * lib/hash.c (hash_initialize): Simplify the code by using
23582         xalloc_oversized rather than doing it by hand.
23583         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
23584         the buffer preserved.  Use free and xmalloc instead.
23585         * lib/quotearg.c (quotearg_n_options): Likewise.
23586         Use a simpler test for size overflow.  Don't use xalloc_oversized
23587         because unsigned int might be wider than size_t (!); this suggests
23588         that we should switch from unsigned int to size_t for slot numbers.
23589
23590 2003-10-28  Paul Eggert  <eggert@twinsun.com>
23591
23592         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
23593         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
23594         NetBSD kernels.  Requested by Richard Stallman.
23595
23596 2003-10-27  Paul Eggert  <eggert@twinsun.com>
23597
23598         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
23599         to allocate the returned structure.  Do not allocate a subarray,
23600         as x2nrealloc will do that.
23601         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
23602         instead of xnrealloc.
23603         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
23604
23605 2003-10-27  Bruno Haible  <bruno@clisp.org>
23606
23607         * lib/stdbool_.h: Better support for BeOS.
23608
23609 2003-10-26  Paul Eggert  <eggert@twinsun.com>
23610
23611         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
23612         now uses inline.
23613
23614 2003-10-26  Paul Eggert  <eggert@twinsun.com>
23615
23616         * lib/xalloc.h (xalloc_oversized): New static inline function, for
23617         callers that want to do their own size-overflow checking.  Include
23618         <stdbool.h>, since xalloc_oversized returns bool.
23619         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
23620         to use xalloc_oversized.
23621
23622         Add two functions x2realloc, x2nrealloc, for programs that grow
23623         arrays dynamically by doubling their sizes.
23624         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
23625         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
23626         New functions.
23627
23628         Port to C99 semantics for 'inline' of external functions.
23629         Bug reported by Bruno Haible.
23630         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
23631         with the old contents of xnmalloc.
23632         (xnmalloc, xmalloc): Use it.
23633         (xnrealloc_inline): New static inline function,
23634         with the old contents of xnrealloc.
23635         (xnrealloc, xrealloc): Use it.
23636
23637         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
23638         that.
23639
23640 2003-10-26  Karl Berry  <karl@gnu.org>
23641
23642         * config/srclist.txt (COPYING.DOC): no longer available from
23643         /gd/gnuorg; don't know where the ultimate source is.
23644
23645 2003-10-25  Paul Eggert  <eggert@twinsun.com>
23646
23647         Fix several address-calculation bugs in the hash modules,
23648         plus some minor code cleanup.
23649
23650         * lib/hash.h: Include <stdbool.h>, for bool.
23651         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
23652         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
23653         hash_get_n_entries, hash_get_max_bucket_length,
23654         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
23655         hash_rehash): Use size_t rather than unsigned.
23656         * lib/hash.c (struct hash_table, hash_get_n_buckets,
23657         hash_get_n_buckets_used, hash_get_n_entries,
23658         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
23659         hash_get_entries, hash_do_for_each, hash_string, is_prime,
23660         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
23661         Likewise.
23662         (SIZE_MAX): Define if not defined.
23663         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
23664         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
23665         hash_print):
23666         Use const * when possible.
23667         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
23668         (check_tuning): Fix bug: if tuning parameters were very close to
23669         0 or 1, rounding errors could have caused subscript violations.
23670         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
23671         (hash_initialize): Add 'fail:' label
23672         to free table and return NULL, and use it to simplify code.
23673         Use calloc rather than clearing the storage ourself.
23674         (hash_initialize, hash_rehash): Check for arithmetic overflow in
23675         buffer size calculations.
23676         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
23677         Include <stddef.h>, for size_t.
23678         * lib/hash-pjw.c (hash_pjw): Likewise.
23679         Switch to method described by Bruno Haible.
23680         Include <limits.h>, for CHAR_BIT.
23681         (SIZE_BITS): New macro.
23682
23683 2003-10-23  Paul Eggert  <eggert@twinsun.com>
23684
23685         * m4/getline.m4 (AM_FUNC_GETLINE):
23686         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
23687         hosts.  Problem reported by Derek Robert Price in
23688         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
23689         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
23690         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
23691
23692 2003-10-21  Paul Eggert  <eggert@twinsun.com>
23693
23694         * lib/getndelim2.c (getndelim2): When size calculation overflows,
23695         ceiling the allocation at NMAX bytes rather than silently
23696         discarding input bytes before NMAX is reached.  This makes
23697         a difference only if NMAX exceeds SIZE_MAX / 2.
23698
23699         * lib/obstack.c: Merge from glibc.
23700         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
23701         Add libc_hidden_def (_obstack_newchunk).
23702         (_obstack_free) [! defined _LIBC]: Remove.
23703         [defined _LIBC]: Make a strong alias from obstack_free, rather than
23704         a clone of the function body.
23705         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
23706         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
23707
23708         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
23709         glibc.
23710         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
23711         arg to memcpy.
23712
23713         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
23714         (obstack_ptr_grow_fast, obstack_int_grow_fast):
23715         Don't use lvalue casts, as GCC plans to remove support for them
23716         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
23717         was also present in the non-GCC version, indicating that this
23718         code had always been buggy and had never been widely used.
23719         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
23720         Use the fast variant of each macro, rather than copying the
23721         definiens of the fast variant; that way, we'll be more likely to
23722         catch future bugs in the fast variants.
23723
23724 2003-10-20  Bruno Haible  <bruno@clisp.org>
23725
23726         * modules/wait-process: New file.
23727         * MODULES.html.sh (func_all_modules): Add wait-process.
23728
23729 2003-10-20  Bruno Haible  <bruno@clisp.org>
23730
23731         * m4/wait-process.m4: New file.
23732
23733 2003-10-20  Bruno Haible  <bruno@clisp.org>
23734
23735         * lib/wait-process.h: New file, from GNU gettext.
23736         * lib/wait-process.c: New file, from GNU gettext.
23737
23738 2003-10-19  Jim Meyering  <jim@meyering.net>
23739
23740         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
23741         HPUX 10.20.
23742
23743 2003-10-18  Karl Berry  <karl@gnu.org>
23744
23745         * config/config.guess: update from config.
23746
23747 2003-10-16  Paul Eggert  <eggert@twinsun.com>
23748
23749         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
23750         (getgroups): First arg is int, not size_t.
23751         Don't let 'free' mangle errno.
23752
23753 2003-10-16  Paul Eggert  <eggert@twinsun.com>
23754
23755         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
23756
23757 2003-10-16  Karl Berry  <karl@gnu.org>
23758
23759         * config/config.{guess,sub}: update from config.
23760
23761 2003-10-16  Jim Meyering  <jim@meyering.net>
23762
23763         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
23764         memcpy.
23765
23766 2003-10-15  Paul Eggert  <eggert@twinsun.com>
23767
23768         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
23769         (SIZE_MAX): Remove.
23770         (new_exclude, add_exclude_file): Initial size no longer needs to
23771         be a power of 2.
23772         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
23773         our own address arithmetic overflow checking.
23774
23775         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
23776         (fnmatch): Do not alloca more than 2000 wide characters;
23777         instead, use malloc for large buffers.
23778         Check for address arithmetic overflow, and return -1
23779         with errno set to ENOMEM in that case.
23780         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
23781         (NEW_PATTERN): Do not alloca more than 8000 bytes;
23782         instead, return -1.  Check for address arithmetic overflow.
23783
23784 2003-10-14  Paul Eggert  <eggert@twinsun.com>
23785
23786         Handle invalid suffixes and overflow independently, so that
23787         callers can treat them independently as needed.  Fix some bugs in
23788         suffix handling, e.g., "100k@" was not diagnosed as an invalid
23789         suffix for a human-readable blocksize.  The major caller-visible
23790         change is the addition of a new
23791         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
23792         that both overflow and suffix chars were found.
23793
23794         * lib/human.c (humblock): Don't check separately for invalid suffix
23795         char; that is xstrtoumax's job (now that its bug is fixed).
23796         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
23797         INTMAX_MAX]: New macros.
23798         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
23799         TYPE_MAXIMUM): New macros.
23800         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
23801         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
23802         if overflow occurs, as it's what __strtol does and it's more useful
23803         in practice.
23804         (__xstrtol): If __strtol reports some error other than ERANGE,
23805         reflect it to the caller as LONGINT_INVALID.  If it reports
23806         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
23807         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
23808         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
23809         value.
23810         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
23811         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
23812         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
23813         [defined UINTMAX_MAX]: New macros.
23814
23815 2003-10-14  Bruno Haible  <bruno@clisp.org>
23816
23817         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
23818
23819 2003-10-14  Bruno Haible  <bruno@clisp.org>
23820
23821         * m4/sig_atomic_t: New file, from GNU gettext.
23822         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
23823
23824 2003-10-14  Bruno Haible  <bruno@clisp.org>
23825
23826         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
23827         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
23828         Also use volatile where needed.
23829
23830 2003-10-12  Paul Eggert  <eggert@twinsun.com>
23831
23832         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
23833         Change maintainer from Bruno Haible to 'all'.
23834
23835 2003-10-12  Paul Eggert  <eggert@twinsun.com>
23836
23837         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
23838
23839 2003-10-12  Paul Eggert  <eggert@twinsun.com>
23840
23841         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
23842         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
23843         and define in terms of the other primitives.
23844         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
23845         (SIZE_MAX): Define if not already defined.
23846         (array_size_overflow): New function.
23847         (xalloc_die): Abort instead of exiting if 'error' returns.
23848         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
23849         (xmalloc, xrealloc): Use them.
23850         (xcalloc): Check for address arithmetic overflow.
23851         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
23852         a bit faster than strcpy.
23853
23854 2003-10-10  Simon Josefsson  <jas@extundo.com>
23855
23856         * modules/argp (Depends-on): Add restrict and strcase.
23857
23858 2003-10-10  Simon Josefsson  <jas@extundo.com>
23859
23860         * m4/argp.m4: Add AC_C_INLINE.
23861
23862 2003-10-08  Paul Eggert  <eggert@twinsun.com>
23863
23864         Merge getpass from libc, plus a few fixes.
23865
23866         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
23867         Include <stdbool.h>.
23868         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
23869         __fsetlocking to empty.
23870         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
23871         do include <bits/libc-lock.h>.
23872         Do not include <fcntl.h>; not needed.
23873         [_LIBC]: Include <wchar.h>.
23874         (NOTCANCEL_MODE): New macro.
23875         (flockfile, funlockfile) [_LIBC]: New macros.
23876         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
23877         [!_LIBC]: New macros.
23878         (call_fclose): New function.
23879         (getpass): Use it.  Save tty stream separately; this simplifies the
23880         code and makes it more reliable if stdin happens to equal stdout.
23881         Invoke __fsetlocking on tty.
23882         Handle thread cancellation if needed.
23883         Namespace cleanup (use __tcgetattr, __getline).
23884         Use bool for Booleans.
23885         [USE_IN_LIBIO]: Handle wide streams.
23886         [!_LIBC]: Unconditionally do the fseek, since we don't know what
23887         stream might go where.
23888
23889         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
23890         doesn't have to include <stdio.h> before us.
23891         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
23892         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
23893         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
23894         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
23895         if not declared, so that we can use getpass.c code from libc without
23896         rewriting it.
23897         (flockfile, ftrylockfile, funlockfile): New macros.
23898
23899 2003-10-08  Paul Eggert  <eggert@twinsun.com>
23900
23901         * modules/getpass: Depend on stdbool.
23902
23903 2003-10-08  Paul Eggert  <eggert@twinsun.com>
23904
23905         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
23906
23907 2003-10-07  Karl Berry  <karl@gnu.org>
23908
23909         * config/config.{guess,sub}: update from config.
23910
23911 2003-10-06  Jim Meyering  <jim@meyering.net>
23912             Bruno Haible  <bruno@clisp.org>
23913
23914         This lets translators provide better translations for the
23915         "Written by ..." part of --version output.
23916         * lib/version-etc.h: Include stdarg.h.
23917         (version_etc_copyright): Declare as readonly.
23918         (version_etc): Make this function variadic with a NULL-terminated list
23919         of author name strings.
23920         (version_etc_va): New declaration.
23921         * lib/version-etc.c: Include stdarg.h, stdlib.h.
23922         (version_etc_copyright): Declare as readonly.
23923         (version_etc_va): New function. Provide a different translatable string
23924         for each possible number of authors < 10. Abbreviate when there are 10
23925         authors or more.
23926         (version_etc): Make this function variadic. Call version_etc_va.
23927         Suggestion from Gary V. Vaughan.
23928
23929         * lib/long-options.h (parse_long_options): Change prototype: the
23930         authors string is moved to the end and becomes variadic.
23931         * lib/long-options.c: Include stdarg.h.
23932         (parse_long_options): Make this function variadic, too.
23933         Call version_etc_va, not version_etc.
23934
23935 2003-10-06  Bruno Haible  <bruno@clisp.org>
23936
23937         * modules/version-etc-2: Remove file.
23938         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
23939
23940 2003-10-06  Bruno Haible  <bruno@clisp.org>
23941
23942         * modules/fatal-signal: New file.
23943         * MODULES.html.sh (func_all_modules): Add fatal-signal.
23944
23945 2003-10-06  Bruno Haible  <bruno@clisp.org>
23946
23947         * m4/fatal-signal.m4: New file.
23948         * m4/signalblocking.m4: New file, from GNU gettext.
23949
23950 2003-10-06  Bruno Haible  <bruno@clisp.org>
23951
23952         * lib/version-etc-2.h: Remove file.
23953         * lib/version-etc-2.c: Remove file.
23954
23955 2003-10-06  Bruno Haible  <bruno@clisp.org>
23956
23957         * lib/fatal-signal.h: New file, from GNU gettext.
23958         * lib/fatal-signal.c: New file, from GNU gettext.
23959
23960 2003-10-05  Paul Eggert  <eggert@twinsun.com>
23961
23962         * README: Rework advice for preventing empty .o files.
23963         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
23964         not <sys/types.h>.
23965
23966 2003-10-04  Karl Berry  <karl@gnu.org>
23967
23968         * lib/argp*: update from libc.
23969
23970 2003-10-04  Karl Berry  <karl@gnu.org>
23971
23972         * config/config.{guess,sub}: update from config.
23973
23974 2003-10-02  Bruno Haible  <bruno@clisp.org>
23975
23976         * modules/lchown (Include): Add lchown.h.
23977         * modules/time_r (Include): Use "..." syntax.
23978         * modules/xgetdomainname (Include): Add xgetdomainname.h.
23979
23980 2003-10-01  Simon Josefsson  <jas@extundo.com>
23981
23982         * MODULES.html.sh (func_all_modules): Move gethostname from section
23983         'based on' to section 'lacking' POSIX:2001.
23984
23985 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
23986
23987         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
23988         to output mode on the same stream.
23989
23990 2003-09-29  Paul Eggert  <eggert@twinsun.com>
23991
23992         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
23993         Fix arg typo in previous patch.
23994
23995 2003-09-28  Jim Meyering  <jim@meyering.net>
23996
23997         * lib/error.c: Correct cpp indentation.
23998
23999 2003-09-27  Paul Eggert  <eggert@twinsun.com>
24000
24001         * modules/free: New file.
24002
24003 2003-09-27  Paul Eggert  <eggert@twinsun.com>
24004
24005         * m4/free.m4: New file.
24006
24007 2003-09-27  Paul Eggert  <eggert@twinsun.com>
24008
24009         * lib/minmax.h (MIN, MAX)
24010         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
24011         Omit the special code that used __typeof__, since we worry that
24012         it could be more trouble than it's worth.  See:
24013         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
24014         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
24015
24016         * lib/free.c: New file.
24017
24018 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
24019
24020         Trivial fixes to Makefile.am parts of module listings.
24021         * modules/strstr: Append strstr.h to lib_SOURCES.
24022         * modules/strcase: Likewise, for strcase.h.
24023
24024 2003-09-27  Karl Berry  <karl@gnu.org>
24025
24026         * config/mkinstalldirs: update from automake.
24027
24028 2003-09-26  Paul Eggert  <eggert@twinsun.com>
24029
24030         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
24031         (error_tail): Do not loop, reallocating temporary buffer, since
24032         the output cannot contain more wide characters than the input
24033         contains bytes, the size must be big enough already.  This avoids
24034         one potential size overflow calculation.  Check for size overflow
24035         when calculating temporary buffer size.  Free temporary buffer
24036         when done, if it was allocated with malloc; this plugs a memory
24037         leak.  Remove casts from void * to pointers, that are no longer
24038         needed now that we're assuming C89 or better.
24039
24040         Merge error changes from glibc.
24041
24042         * lib/error.c, error.h: Update copyright notice header to match glibc.
24043         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
24044         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
24045         Disable cancellation while printing error.
24046         * lib/error.h: Prepend __ to parameter names.
24047
24048 2003-09-26  Jim Meyering  <jim@meyering.net>
24049
24050         * lib/error.c (error_tail): Move some declarations
24051         into inner scope where the local variables are used.
24052
24053 2003-09-26  Bruno Haible  <bruno@clisp.org>
24054
24055         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
24056         stpncpy().
24057         Don't define stpncpy through config.h; it's now done through stpncpy.h.
24058
24059 2003-09-26  Bruno Haible  <bruno@clisp.org>
24060
24061         * lib/stpncpy.h (gnu_stpncpy): New declaration.
24062         (stpncpy): Define as alias for gnu_stpncpy.
24063         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
24064
24065 2003-09-25  Simon Josefsson  <jas@extundo.com>
24066
24067         * lib/xgetdomainname.h: New file.
24068         * lib/xgetdomainname.c: New file.
24069
24070 2003-09-25  Simon Josefsson  <jas@extundo.com>
24071             Bruno Haible  <bruno@clisp.org>
24072
24073         * modules/getdomainname: New file.
24074         * modules/xgetdomainname: New file.
24075         * MODULES.html.sh (func_all_modules): Add getdomainname,
24076         xgetdomainname.
24077
24078 2003-09-25  Simon Josefsson  <jas@extundo.com>
24079             Bruno Haible  <bruno@clisp.org>
24080
24081         * m4/getdomainname.m4: New file.
24082
24083 2003-09-25  Simon Josefsson  <jas@extundo.com>
24084             Bruno Haible  <bruno@clisp.org>
24085
24086         * lib/getdomainname.h: New file.
24087         * lib/getdomainname.c: New file.
24088
24089 2003-09-25  Karl Berry  <karl@gnu.org>
24090
24091         * lib/argp-fmtstream.c, argp-help.c: update from libc.
24092
24093 2003-09-25  Karl Berry  <karl@gnu.org>
24094
24095         * config/install-sh: update from automake.
24096
24097 2003-09-25  Bruno Haible  <bruno@clisp.org>
24098
24099         * modules/version-etc-2: New file, from modules/version-etc with
24100         modifications.
24101         * MODULES.html.sh (func_all_modules): Add version-etc-2.
24102
24103 2003-09-25  Bruno Haible  <bruno@clisp.org>
24104
24105         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
24106         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
24107
24108 2003-09-24  Simon Josefsson  <jas@extundo.com>
24109
24110         * modules/xgethostname: Add xgethostname.h.
24111
24112 2003-09-24  Paul Eggert  <eggert@twinsun.com>
24113
24114         * lib/linebuffer.c (freebuffer): Don't free the argument, just
24115         the buffer associated with the argument.  Bug reported by
24116         Simon Josefsson.
24117
24118 2003-09-24  Paul Eggert  <eggert@twinsun.com>
24119
24120         * README: Document assumptions that 'int' is at least 32 bits
24121         wide, that integer arithmetic is 2's complement without overflow,
24122         that there are no holes in integer values, that adding sizes of
24123         two nonoverlapping objects can't overflow, and that all-bits-zero
24124         yields scalar zero.  Fix spelling and capitalization typos.
24125
24126 2003-09-19  Karl Berry  <karl@gnu.org>
24127
24128         * lib/argp.h: update from libc.
24129
24130 2003-09-17  Paul Eggert  <eggert@twinsun.com>
24131
24132         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
24133         to avoid spurious warnings like "AC_RUN_IFELSE was called before
24134         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
24135
24136 2003-09-17  Paul Eggert  <eggert@twinsun.com>
24137
24138         * gnulib-tool: Use "test -h", not "test -L", for portability
24139         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
24140         (tags_regexp): Remove, since \| doesn't conform to POSIX.
24141         (sed_extract_prog): Issue s commands one-by-one, rather than
24142         using \| in one s command.
24143
24144 2003-09-16  Paul Eggert  <eggert@twinsun.com>
24145
24146         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
24147         input error, instead of returning NULL the next time we are called
24148         (and therefore losing track of errno).
24149
24150 2003-09-16  Bruno Haible  <bruno@clisp.org>
24151
24152         * gnulib-tool (func_create_testdir): Warn about duplicated
24153         dependencies.
24154
24155 2003-09-15  Paul Eggert  <eggert@twinsun.com>
24156
24157         * modules/argmatch, modules/fatal, modules/obstack,
24158         modules/xalloc, modules/xgethostname: Sort dependencies by
24159         importance, not alphabetically.
24160
24161 2003-09-15  Paul Eggert  <eggert@twinsun.com>
24162
24163         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
24164         fails, so that the caller gets the proper errno.
24165
24166         * lib/readutmp.c (read_utmp): Likewise.
24167         Check for fstat error.  Close stream and free storage
24168         when failing.
24169
24170 2003-09-14  Karl Berry  <karl@gnu.org>
24171
24172         * config/srclist.txt (strdup.c): disable for c89 changes.
24173
24174 2003-09-14  Jim Meyering  <jim@meyering.net>
24175
24176         * lib/getloadavg.c: Correct cpp indentation.
24177         * lib/strdup.c: Likewise.
24178         * lib/vasnprintf.c: Likewise.
24179
24180 2003-09-14  Bruno Haible  <bruno@clisp.org>
24181
24182         * modules/fwriteerror: New file.
24183         * MODULES.html.sh (func_all_modules): Add fwriteerror.
24184
24185 2003-09-14  Bruno Haible  <bruno@clisp.org>
24186
24187         * lib/fwriteerror.h: New file.
24188         * lib/fwriteerror.c: New file.
24189
24190 2003-09-12  Paul Eggert  <eggert@twinsun.com>
24191
24192         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
24193         modules/xgethostname, modules/xalloc: Depend on exit.
24194
24195 2003-09-12  Paul Eggert  <eggert@twinsun.com>
24196
24197         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
24198
24199         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
24200         and AC_MINIX, too, so that their extensions are available.
24201
24202         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
24203         This macro has been superseded by gl_BACKUPFILE.
24204
24205         More patches to assume C89 or better.
24206
24207         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
24208
24209         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
24210         unconditionally.
24211         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
24212         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
24213         Include <string.h>, <stdlib.h> unconditionally.
24214         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
24215         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
24216         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
24217         headers or for string.h.
24218         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
24219         or strtoul.
24220
24221         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
24222         headers.
24223         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
24224         * m4/userspec.m4 (gl_USERSPEC): Likewise.
24225         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
24226         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
24227         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
24228         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
24229         memcpy, memset.
24230         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
24231         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
24232         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
24233         strtol.
24234         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
24235         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
24236         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
24237         strtoul.
24238
24239 2003-09-12  Paul Eggert  <eggert@twinsun.com>
24240
24241         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
24242         * lib/obstack.c [!defined _LIBC]: Likewise.
24243         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
24244         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
24245         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
24246
24247         More changes to assume C89 or better.
24248
24249         * lib/error.c (error_tail): Assume vprintf.
24250
24251         * lib/argmatch.c (getenv): Remove decl.
24252         * lib/progreloc.c (get_full_program_name): Define via prototype.
24253         * lib/setenv.c (clearenv): Likewise.
24254         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
24255         needed.
24256         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
24257         (malloc, memcpy): Remove decls.
24258         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
24259         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
24260         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
24261         (memcpy): Remove macro.
24262         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
24263         (__P): Remove.  All uses removed.
24264         (PTR): Remove.  All uses changed to void *.
24265         (CHAR_BIT, NULL): Remove.
24266         (spaces, zeros, memset_space, memset_zero)
24267         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
24268         Remove.
24269         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
24270         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
24271         Define with prototype.
24272         Remove now-unnecessary prototype decl.
24273         (extra_args_spec): Assume ANSI C.  All uses changed.
24274         (extra_args_spec_iso): Remove.
24275         (my_strftime, emacs_strftimeu): Define via prototype.
24276         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
24277         unconditionally.
24278         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
24279         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
24280         (strtoul, strtol): Remove decls.
24281         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
24282         LONG_MAX): Remove.
24283         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
24284         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
24285         (LOCALE_PARAM_PROTO): New macro.
24286         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
24287         (INTERNAL (strtol), strtol): Define with a prototype.
24288         (PARAMS): Remove.  All uses removed.
24289         * lib/tempname.c: Include <string.h> unconditionally.
24290         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
24291         * lib/xgethostname.c (main): Define with a prototype.
24292         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
24293         Include <stdlib.h> unconditionally.
24294         (calloc, malloc, realloc, free): Remove decls.
24295         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
24296         Include <stdlib.h> unconditionally.  Sort include file names.
24297         (strtod): Remove.
24298         (xstrtod): Define with a prototype.
24299         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
24300         (strtol, strtoul): Remove decls.
24301
24302 2003-09-11  Paul Eggert  <eggert@twinsun.com>
24303
24304         More patches to assume C89 or better.
24305         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
24306         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
24307         string.h, memchr, STDC_HEADERS.
24308
24309 2003-09-11  Paul Eggert  <eggert@twinsun.com>
24310
24311         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
24312         Include <stdlib.h>, <string.h> unconditionally.
24313         Remove now-unnecessary cast to char *.
24314         * lib/strnlen.c: Include <string.h> unconditionally.
24315         * lib/yesno.c (yesno): Define with a prototype.
24316
24317 2003-09-11  Bruno Haible  <bruno@clisp.org>
24318
24319         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
24320
24321 2003-09-10  Jim Meyering  <jim@meyering.net>
24322
24323         * lib/error.c: Correct indentation of cpp directives.
24324
24325 2003-09-10  Bruno Haible  <bruno@clisp.org>
24326
24327         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
24328         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
24329         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
24330         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
24331         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
24332         <stdlib.h> and <string.h> checks.
24333         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
24334         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
24335
24336 2003-09-10  Bruno Haible  <bruno@clisp.org>
24337
24338         * lib/strcspn.c: Include <string.h> unconditionally.
24339         * lib/strpbrk.c: Include <string.h> unconditionally.
24340         * lib/strstr.c: Include <string.h> unconditionally.
24341         * lib/unicodeio.c: Include <string.h> unconditionally.
24342         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
24343         * lib/unsetenv.c: Likewise.
24344         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
24345         * lib/yesno.c: Include <stdlib.h> unconditionally.
24346         (rpmatch): Add prototype.
24347
24348 2003-09-09  Paul Eggert  <eggert@twinsun.com>
24349
24350         More patches to assume C89 or better.
24351         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
24352         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
24353         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
24354         or for string.h.
24355         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
24356         stdlib.h.
24357         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
24358         C headers.
24359         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
24360         string.h.
24361         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
24362         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
24363         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
24364         or for string.h.
24365         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
24366         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
24367         C headers.
24368         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
24369         memcpy.
24370         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
24371         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
24372         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
24373         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
24374         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
24375         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
24376         string.h, free.
24377         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
24378         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
24379         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
24380         C headers, or for string.h.
24381         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
24382         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
24383         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
24384         headers, memory.h, stdlib.h, string.h, strings.h.
24385         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
24386         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
24387         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
24388         strchr.
24389         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
24390         headers, memory.h, string.h.
24391         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
24392         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
24393         free.
24394         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
24395         headers.
24396         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
24397         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
24398         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
24399         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
24400         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
24401
24402 2003-09-09  Paul Eggert  <eggert@twinsun.com>
24403
24404         More K&R removal.
24405
24406         * lib/acosl.c (main): Use a prototype.
24407         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
24408         tanl.c: Likewise.
24409
24410         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
24411
24412         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
24413         (getopt, etopt_long, getopt_long_only, _getopt_internal)
24414         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
24415         with a prototype.
24416         * lib/getopt.c (const): Remove macro.
24417         Include <string.h> unconditionally.
24418         (my_index): Remove; all uses changed to strchr.
24419         (strlen): Remove decl.
24420         (exchange): Remove forward decl; no longer needed.
24421         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
24422         Define with prototype.
24423         * lib/getopt1.c (const): Remove macro.
24424         (getopt_long, getopt_long_only, main): Define with prototype.
24425
24426         * lib/getugroups.c: Include <string.h> unconditionally.
24427
24428         * lib/getusershell.c: Include <stdlib.h> unconditionally.
24429         (getusershell, setusershell, endusershell, readname, main):
24430         Define with prototypes.
24431
24432         * lib/group-member.c: Include group-member.h first.
24433         Include <stdlib.h> unconditionally.
24434
24435         * lib/hard-locale.c: Include hard-locale.h first.
24436         Include <stdlib.h>, <string.h> unconditionally.
24437
24438         * lib/hash.c (free, malloc): Remove decls.
24439         Include <stdlib.h> unconditionally.
24440
24441         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
24442         (getenv): Do not declare.
24443
24444         * lib/idcache.c: Include <string.h> unconditionally.
24445
24446         * lib/long-options.c: Include long-options.h first, to test interface.
24447         Include <stdlib.h> unconditionally.
24448
24449         * lib/makepath.c: Include makepath.h first, to test interface.
24450         Include <stdlib.h> and <string.h> unconditionally.
24451
24452         * lib/linebuffer.c: Include <stdlib.h>.
24453         (free): Remove decl.
24454
24455         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
24456         stddef.h. rpl_malloc returns void *, not char *.
24457         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
24458         prototype.
24459
24460         * lib/md5.h: Include <limits.h> unconditionally.
24461         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
24462         (__P): Remove; all uses removed.
24463         * lib/md5.c: Include "md5.h" first.
24464         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
24465         md5_buffer, md5_process_bytes, md5_process_block):
24466         Define with prototypes.
24467         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
24468         * lib/sha.c: Include "sha.h" first.
24469         Include <stdlib.h>, <string.h> unconditionally.
24470
24471         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
24472         * lib/memcmp.c (__ptr_t): Likewise.
24473         * lib/memrchr.c (__ptr_t): Likewise.
24474         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
24475         Include <string.h> unconditionally.
24476         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
24477         * lib/memchr.c: Include <stdlib.h> unconditionally.
24478         * lib/memchr.c (LONG_MAX): Remove.
24479         * lib/memrchr.c (LONG_MAX): Likewise.
24480         * lib/memchr.c (__memchr): Define via a prototype.
24481         * lib/memrchr.c (__memrchr): Likewise.
24482         * lib/memcmp.c (__P): Remove, and remove all uses.
24483         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
24484         Remove forward decls; no longer needed.
24485         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
24486         Use types required by C89 in prototype.
24487
24488         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
24489         * lib/savedir.c: Likewise.
24490         * lib/mkdir.c (free): Remove decl.
24491         * lib/rmdir.c (rmdir): Define with a prototype.
24492         * lib/savedir.c: Include savedir.h first, to test interface.
24493
24494         * lib/mktime.c (STDC_HEADERS): Remove.
24495         Include <stdlib.h>, <string.h> unconditionally.
24496
24497         * lib/modechange.c: Include <stdlib.h> unconditionally.
24498         (malloc): Remove decl.
24499
24500         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
24501         (free): Remove decl.
24502
24503         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
24504         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
24505         (This type really should be intptr_t, but that's a C99ism.)
24506         (_obstack_memcpy): Remove: all uses changed to memcpy.
24507         Include <string.h> unconditionally.
24508         (struct obstack): Assume __STDC__ for types of members
24509         chunkfun, freefun, extra_arg.
24510         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
24511         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
24512         obstack_begin, obstack_specify_allocation,
24513         obstack_specify_allocation_with_arg, obstack_chunkfun,
24514         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
24515         Remove unprototyped decls and the macros that use them.
24516         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
24517         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
24518         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
24519         (defined __STDC__ && __STDC__)]:
24520         Remove nonprototyped code.
24521         Include <stdlib.h> unconditionally.
24522         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
24523         _obstack_allocated_p, _obstack_free, obstack_free,
24524         _obstack_memory_used, print_and_abort):
24525         Define using prototypes.
24526         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
24527         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
24528         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
24529         obstack_next_free, obstack_object_size, obstack_room) [0]:
24530         Remove unused, unprototyped code.
24531
24532         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
24533
24534         * lib/physmem.c (physmem_total, physmem_available, main): Define
24535         with prototypes.
24536
24537         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
24538         (main): Define with a prototype.
24539
24540         * lib/posixver.c (getenv): Remove decl.
24541
24542         * lib/putenv.c (malloc): Returns void *, not char *.
24543         Include <string.h> unconditionally.
24544         (strchr, memcpy, NULL): Do not define.
24545
24546         * lib/readtokens.c: Include readtokens.h first, to test interface.
24547         Include <stdlib.h>, <string.h> unconditionally.
24548         (init_tokenbuffer): Define with a prototype.
24549
24550         * lib/regex.c (PARAMS): Remove.  All uses removed.
24551         All uses of _RE_ARGS removed, too.
24552         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
24553         unconditionally.
24554         (bzero): Assume memset exists.
24555         (memcmp, memcpy, NULL): Remove.
24556         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
24557         char, or assignments to local vars of type signed char.
24558         (init_syntax_once, PREFIX(extract_number_and_incr),
24559         PREFIX(print_partial_compiled_pattern),
24560         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
24561         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
24562         PREFIX(regex_grow_registers), PREFIX(regex_compile),
24563         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
24564         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
24565         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
24566         wcs_compile_range, byte_compile_range, truncate_wchar,
24567         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
24568         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
24569         count_mbs_length, wcs_re_match_2_internal,
24570         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
24571         PREFIX(alt_match_null_string_p),
24572         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
24573         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
24574         regfree, PREFIX(extract_number)): Define with prototype.  Remove
24575         now-unnecessary declaration, if any.
24576         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
24577         regcomp, regexec):
24578         Remove now-unnecessary casts among pointer types.
24579         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
24580
24581         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
24582         (free): Remove decl.
24583
24584         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
24585
24586         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
24587         (free): Remove decl.
24588
24589         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
24590         * lib/xgetcwd.c: Likewise.
24591
24592         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
24593         (free): Remove decl.
24594
24595         * lib/strchrnul.c (strchrnul): Define with a prototype.
24596         Fix bug: c_in was not converted to char before searching.
24597
24598         The following changes are not K&R related:
24599
24600         * lib/group-member.h: Include <sys/types.h>, so that this file is
24601         self-contained.
24602         * lib/makepath.h: Likewise.
24603
24604         * lib/getusershell.c (readname, default_index, line_size, readname):
24605         Use size_t, not int, for sizes.
24606         (readname): If the size overflows, report an error instead of
24607         looping forever.
24608
24609 2003-09-09  Paul Eggert  <eggert@twinsun.com>
24610
24611         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
24612         libc.
24613
24614 2003-09-09  Paul Eggert  <eggert@twinsun.com>
24615
24616         * README: New section: portability guidelines.
24617
24618 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
24619
24620         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
24621         C89 spec.
24622
24623 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
24624
24625         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
24626
24627 2003-09-08  Paul Eggert  <eggert@twinsun.com>
24628
24629         Assume C89 or better; remove K&R cruft.
24630         A few of these changes were first proposed by Derek Robert Price
24631         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
24632
24633         * lib/addext.c: Include <string.h> unconditionally.
24634         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
24635         Don't declare getenv or malloc.
24636
24637         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
24638         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
24639         (NULL): Remove.
24640         (find_stack_direction, alloca): Use prototypes.
24641
24642         * lib/atexit.c (atexit): Define using a prototype.
24643
24644         * lib/basename.c, dirname.c, stripslash.c:
24645         Include <string.h> unconditionally.
24646
24647         * lib/bcopy.c: Include <stddef.h>.
24648         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
24649
24650         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
24651
24652         * lib/error.h (error, error_at_line, error_print_progname)
24653         [! (defined (__STDC__) && __STDC__)]: Remove decls.
24654         * lib/error.c: Include error.h first, to check interface.
24655         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
24656         (VA_START): Remove; all uses changeed to va_start.
24657         (exit, strerror): Remove decls.
24658         (error_print_progname): Prototype uncondionally.
24659         Don't include <errno.h>; no longer needed.
24660         (private_strerror): Remove.
24661         (error_tail): Always define.
24662         (error, error_at_line): Assume C89 or better; always use prototypes.
24663         * lib/fatal.c: Include "fatal.h" first, to test interface.
24664         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
24665         (VA_START): Remove; all uses changed to va_start.
24666         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
24667         this case.
24668         (exit): Remove decl.
24669         (fatal): Prototype unconditionally.  Assume va_start works.
24670         Abort at end, to pacify gcc.
24671
24672         * lib/euidaccess.c (main): Define with a prototype.
24673
24674         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
24675
24676         * lib/exitfail.c: Include <stdlib.h> unconditionally.
24677
24678         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
24679         prototypes.
24680         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
24681         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
24682         (getenv): Remove decl.
24683         (fnmatch): Define using a prototype.
24684         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
24685         (FCT): Define using a prototype.
24686
24687         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
24688
24689         * lib/gethostname.c: Include <stddef.h>.
24690         (gethostname): Define with prototype.  Length is size_t, not int.
24691
24692 2003-09-08  Paul Eggert  <eggert@twinsun.com>
24693
24694         Assume C89 or better; remove K&R cruft.
24695         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
24696         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
24697         string.h, getenv, malloc.
24698         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
24699         headers.
24700         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
24701         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
24702         do not check for strerror.
24703         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
24704         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
24705         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
24706         do not check for doprnt or vprintf.
24707         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
24708         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
24709
24710 2003-09-08  Paul Eggert  <eggert@twinsun.com>
24711
24712         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
24713         getversion.c should have been removed then, but was accidentally
24714         preserved.
24715
24716         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
24717         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
24718
24719 2003-09-08  Karl Berry  <karl@gnu.org>
24720
24721         * config/config.sub, config.guess, srclistvars.sh: update from savannah
24722                 config, forget about prep.
24723
24724         * config/depcomp, missing: update from automake.
24725
24726 2003-09-07  Paul Eggert  <eggert@twinsun.com>
24727
24728         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
24729         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
24730
24731 2003-09-07  Paul Eggert  <eggert@twinsun.com>
24732
24733         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
24734         copy_tm_result.  Bug reported by Simon Josefsson in
24735         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
24736
24737 2003-09-06  Paul Eggert  <eggert@twinsun.com>
24738
24739         * m4/time_r.m4: New file.
24740         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
24741         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
24742         is. Check for timegm declaration.
24743         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
24744         Do not check for gmtime_r.
24745         Replace mktime if __mktime_internal does not exist and if mktime
24746         hasn't been replaced already.
24747
24748 2003-09-06  Paul Eggert  <eggert@twinsun.com>
24749
24750         * lib/time_r.c, lib/time_r.h: New files.
24751
24752         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
24753         __localtime_r.
24754         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
24755         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
24756
24757         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
24758         __gmtime_r.
24759         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
24760         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
24761         Include <time_r.h>.
24762
24763         * lib/timegm.c: Switch to glibc implementation, with the following
24764         changes:
24765         [defined HAVE_CONFIG_H]: Include <config.h>.
24766         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
24767         (__mktime_internal) [!defined _LIBC]: New decl.
24768         (__gmtime_r) [!defined _LIBC]: New macro and function.
24769         (timegm): Use a prototype, since gnulib assumes C89.
24770         Do not bother declaring tmp to be const, as it's not really usefu.
24771         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
24772         (timegm): Declare only if HAVE_DECL_TIMEGM.
24773
24774 2003-09-06  Paul Eggert  <eggert@twinsun.com>
24775
24776         * MODULES.html.sh (func_all_modules): Add time_r.
24777         * modules/time_r: New file.
24778         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
24779         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
24780
24781 2003-09-03  Paul Eggert  <eggert@twinsun.com>
24782
24783         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
24784         Bug reported by Lute Kamstra in
24785         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
24786
24787         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
24788         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
24789         course with correspondingly smaller numbers for tomorrow and
24790         yesterday.  From Tadayoshi Funaba.  Originally installed into
24791         sh-utils on 1999-08-07, but the patch got lost (I guess during the
24792         coreutils merge?).
24793
24794 2003-08-31  Simon Josefsson  <jas@extundo.com>
24795
24796         * modules/timegm: New file.
24797         * MODULES.html.sh (func_all_modules): Add timegm.
24798
24799 2003-08-31  Simon Josefsson  <jas@extundo.com>
24800
24801         * m4/timegm.m4: New file.
24802
24803 2003-08-31  Simon Josefsson  <jas@extundo.com>
24804
24805         * lib/timegm.h: New file.
24806         * lib/timegm.c: New file.  Based on
24807         wget-1.8.2/src/http.c:mktime_from_utc.
24808
24809 2003-08-31  Karl Berry  <karl@gnu.org>
24810
24811         * lib/argp.h: update from libc.
24812
24813 2003-08-28  Bruno Haible  <bruno@clisp.org>
24814
24815         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
24816         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
24817         followed by '#define fnmatch fnmatch_posix' gives an error.
24818
24819 2003-08-28  Bruno Haible  <bruno@clisp.org>
24820
24821         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
24822         warning on QNX, which defines O_BINARY to 000000.
24823
24824 2003-08-27  Jim Meyering  <jim@meyering.net>
24825
24826         * m4/mkstemp.m4: Require that the system mkstemp be able to create
24827         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
24828         would fail after 32.  Reported by Danny Levinson.  Details here:
24829         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
24830
24831 2003-08-24  Bruno Haible  <bruno@clisp.org>
24832
24833         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
24834         MSVC7 <stdio.h> is included later.
24835
24836 2003-08-22  Simon Josefsson  <jas@extundo.com>
24837
24838         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
24839
24840 2003-08-20  Karl Berry  <karl@gnu.org>
24841
24842         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
24843
24844 2003-08-20  Bruno Haible  <bruno@clisp.org>
24845
24846         * modules/progname: New file.
24847         * MODULES.html.sh (func_all_modules): Add progname.
24848
24849 2003-08-20  Bruno Haible  <bruno@clisp.org>
24850
24851         * lib/progname.h: New file, from GNU gettext.
24852         * lib/progname.c: New file, from GNU gettext.
24853         * lib/progreloc.c: New file, from GNU gettext.
24854
24855 2003-08-19  Jim Meyering  <jim@meyering.net>
24856
24857         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
24858         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
24859
24860 2003-08-19  Bruno Haible  <bruno@clisp.org>
24861
24862         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
24863         more.
24864
24865 2003-08-19  Bruno Haible  <bruno@clisp.org>
24866
24867         * lib/xstrdup.c: Assume <string.h> exists.
24868
24869 2003-08-18  Paul Eggert  <eggert@twinsun.com>
24870
24871         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
24872         in makefile rules.
24873
24874 2003-08-18  Jim Meyering  <jim@meyering.net>
24875
24876         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
24877         * m4/lib-ld.m4: Likewise.
24878
24879 2003-08-18  Jim Meyering  <jim@meyering.net>
24880
24881         * lib/setenv.h: Indent nested cpp directive.
24882         * lib/vasnprintf.c: Remove trailing blanks.
24883
24884 2003-08-17  Simon Josefsson  <jas@extundo.com>
24885
24886         * modules/xstrndup: New file.
24887         * MODULES.html.sh (func_all_modules): Add xstrndup.
24888
24889 2003-08-17  Simon Josefsson  <jas@extundo.com>
24890
24891         * modules/argp: Fix autoconf macro name. Add more dependencies.
24892
24893 2003-08-17  Simon Josefsson  <jas@extundo.com>
24894
24895         * m4/xstrndup.m4: New file.
24896
24897 2003-08-17  Simon Josefsson  <jas@extundo.com>
24898
24899         * m4/argp.m4: New file.
24900
24901 2003-08-17  Simon Josefsson  <jas@extundo.com>
24902             Bruno Haible  <bruno@clisp.org>
24903
24904         * lib/xstrndup.h: New file.
24905         * lib/xstrndup.c: New file.
24906
24907 2003-08-17  Bruno Haible  <bruno@clisp.org>
24908
24909         * modules/strndup (Files, Include): Add lib/strndup.h.
24910
24911 2003-08-17  Bruno Haible  <bruno@clisp.org>
24912
24913         * modules/euidaccess (Files): Add lib/euidaccess.h.
24914
24915 2003-08-17  Bruno Haible  <bruno@clisp.org>
24916
24917         * lib/strndup.h: New file.
24918
24919 2003-08-17  Bruno Haible  <bruno@clisp.org>
24920
24921         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
24922         like AC_GNU_SOURCE.
24923         * modules/extensions (configure.ac): Comment out the invocation of
24924         gl_USE_SYSTEM_EXTENSIONS.
24925
24926 2003-08-16  Paul Eggert  <eggert@twinsun.com>
24927
24928         Merges from coreutils, etc.
24929         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
24930         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
24931         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
24932         fixing a typo.
24933         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
24934         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
24935
24936 2003-08-16  Paul Eggert  <eggert@twinsun.com>
24937
24938         Document merge from coreutils.
24939         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
24940         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
24941         * modules/utime: Add m4/utimes-null.m4.
24942
24943 2003-08-16  Paul Eggert  <eggert@twinsun.com>
24944
24945         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
24946         space, undoing this 2003-08-12 change:
24947         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
24948
24949 2003-08-16  Paul Eggert  <eggert@twinsun.com>
24950
24951         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
24952         strtoul.c from libc, undoing this 2003-08-12 change:
24953         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
24954
24955 2003-08-16  Jim Meyering  <jim@meyering.net>
24956
24957         Merges from coreutils.
24958         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
24959         prefix.  Adjust cache variables similarly.  Create 500 rather than
24960         just 300 files, to exercise bug on Darwin6.5, too.
24961         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
24962         $missing_dir.
24963         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
24964         AM_SYS_POSIX_TERMIOS.
24965         Reported by mkc@mathdogs.com.
24966         Also change use of $am_cv_sys_posix_termios
24967         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
24968         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
24969         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
24970         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
24971         in /proc/mounts until it finds one with matching device number.  This
24972         is unnecessary when the FILE argument *is* a mount point.  No stat call
24973         is necessary in that case.  So, disable the statvfs-testing code on
24974         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
24975         as RedHat bug# 84846.
24976         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
24977         to 1MB, so as not to render systems with no stack size limit (e.g.,
24978         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
24979         Include <unistd.h>.  On some systems,
24980         it is required for the definition of _SC_PAGESIZE.
24981
24982 2003-08-16  Jim Meyering  <jim@meyering.net>
24983
24984         Merge from coreutils.
24985         * lib/xstrtoimax.c: #else #if -> #elif.
24986         * lib/xstrtoumax.c: Likewise.
24987
24988 2003-08-16  Jim Meyering  <jim@meyering.net>
24989
24990         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
24991         * m4/utimes.m4: Removed.
24992         * m4/utimes-null.m4: Renamed from utimes.m4.
24993
24994         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
24995         to 1MB, so as not to render systems with no stack size limit (e.g.,
24996         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
24997         Include <unistd.h>.  On some systems,
24998         it is required for the definition of _SC_PAGESIZE.
24999
25000 2003-08-16  Jim Meyering  <jim@meyering.net>
25001         and Paul Eggert  <eggert@cs.ucla.edu>
25002
25003         Merges from coreutils, etc.
25004
25005         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
25006         using the latest version from cvs.  This avoids problems with #line
25007         directives using a vendor (Sun) compiler.
25008         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
25009         Don't set GETGROUPS_LIB here; now it's
25010         done via getgroups.m4's wrapper function.
25011         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
25012         rather than just in sh-util/configure.in, so that the
25013         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
25014         same.
25015         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
25016         AC_FUNC_GETLOADAVG where to find getloadavg.c.
25017         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
25018         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
25019         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
25020         Remove code that is now done by the newly-required macros.
25021         Append $(EXEEXT) to DF_PROG.
25022         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
25023         Do not invoke or require the following here,
25024         since prereq.m4 or some gnulib .m4 now does this for us:
25025         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
25026         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
25027         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
25028         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
25029         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
25030         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
25031         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
25032         AC_FUNC_OBSTACK.
25033         Do not replace the following functions, as this is now the job
25034         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
25035         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
25036         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
25037         atexit getpass, strdup, getpagesize.
25038         Replace 'raise'.
25039         Do not check for the following functions, as this is now the job
25040         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
25041         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
25042         setregid.
25043         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
25044         Check for sys/sysctl.h.
25045         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
25046         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
25047         of checking for ssize_t ourselves.
25048
25049         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
25050         Require every macro that gnulib/modules/* suggests for us.
25051         (jm_PREREQ_ADDEXT): New macro.
25052         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
25053         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
25054
25055         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
25056         (gl_PHYSMEM): Use it.
25057         Also check for `table' function.
25058         Check for new headers and functions.
25059         Add check for sys/sysmp.h.
25060         With suggestions from Kaveh Ghazi.
25061         Ignore headers that are present but cannot be compiled.  This
25062         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
25063         C 5.4.
25064
25065 2003-08-15  Paul Eggert  <eggert@twinsun.com>
25066
25067         Document merge from coreutils.
25068         * modules/userspec: Depend on posixver.
25069         * modules/strftime: Depend on tzset.
25070
25071 2003-08-15  Paul Eggert  <eggert@twinsun.com>
25072
25073         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
25074         rather than tab, after '#' in shell-script copyright notices.
25075         Suggested by Bruno Haible.
25076
25077 2003-08-15  Paul Eggert  <eggert@twinsun.com>
25078
25079         * config/srclist-update: Use three spaces, rather than tab, after '#'
25080         in shell-script copyright notices.  Suggested by Bruno Haible.
25081         Remove unnecessary parenthesization in regular expression.
25082
25083 2003-08-15  Jim Meyering  <jim@meyering.net>
25084
25085         Merge from coreutils.
25086         * lib/xgethostname.c: Include <stdlib.h>.
25087         (xghostname): Don't exit for anything other than memory-related
25088         failure; just return NULL.
25089         * lib/userspec.c: Include "posixver.h".
25090         (parse_user_spec): Accept `.' as a separator only
25091         in pre-POSIX-200112 mode.
25092         * lib/strtoimax.c: Use #elif rather than #else #if.
25093         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
25094         Remove function, now that we can rely on a working tzset function.
25095         [!_LIBC]: Ensure that the required autoconf test has been run.
25096         [!defined _NL_CURRENT && HAVE_STRFTIME]:
25097         Use underlying_strftime for %r.
25098         * lib/sha.c: Merge in some clean-up and optimization changes from
25099         glibc.
25100         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
25101         Ensure that it is a multiple of 64.
25102         Rearrange loop exit tests so as to avoid performing an
25103         additional fread after encountering an error or EOF.
25104         * lib/realloc.c: Update copyright date.
25105
25106 2003-08-15  Jim Meyering  <jim@meyering.net>
25107         and Paul Eggert  <eggert@twinsun.com>
25108
25109         Merge from coreutils.
25110         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
25111         member but strut utmpx does not.  Needed for AIX 4.3.3.
25112         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
25113
25114 2003-08-15  Jim Meyering  <jim@meyering.net>
25115         and Paul Eggert  <eggert@cs.ucla.edu>
25116
25117         Merges from coreutils, etc.
25118         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
25119         Require gl_FUNC_TZSET_CLOBBER.
25120         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
25121         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
25122         members.
25123
25124 2003-08-14  Paul Eggert  <eggert@twinsun.com>
25125
25126         Help the merge from coreutils.
25127         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
25128         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
25129         * m4/tzset.m4: Use it too.
25130
25131 2003-08-14  Paul Eggert  <eggert@twinsun.com>
25132
25133         * modules/tzset: New file.
25134
25135 2003-08-14  Jim Meyering  <jim@meyering.net>
25136
25137         Merges from coreutils.
25138         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
25139         variable names, rather than @FNMATCH_H@.
25140         * modules/alloca: Likewise for $(ALLOCA_H).
25141
25142         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
25143         the three copies of the literal target, `fnmatch.h'.
25144         * modules/alloca (alloca.h): Likewise.
25145
25146 2003-08-14  Jim Meyering  <jim@meyering.net>
25147
25148         Merge from coreutils.
25149         * m4/tzset.m4: New file.
25150         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
25151         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
25152         otherwise, AIX 5.1 systems would end up using the latter.
25153         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
25154         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
25155         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
25156         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
25157
25158 2003-08-14  Jim Meyering  <jim@meyering.net>
25159
25160         Merge from coreutils.
25161         * lib/obstack.h: Whitespace changes.
25162         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
25163         and xcalloc return values.
25164         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
25165         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
25166         hang on OSF/1 5.1 for DIR on both local and remote file systems.
25167         Reported by (and fix confirmed by) Nelson H. F. Beebe.
25168         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
25169         error from mntctl.
25170         Use mntctl's return value to drive the entry-processing loop, since
25171         we can't rely on the value of the vmt_length member in the last
25172         entry.  On some systems doing so could result in exhausting
25173         virtual memory.  Based in part on a patch from Mike Jetzer.
25174
25175 2003-08-14  Jim Meyering  <jim@meyering.net>
25176         and Paul Eggert  <eggert@twinsun.com>
25177
25178         Merges from coreutils, plus other fixes.
25179         * lib/physmem.c: Merge in portability changes from gcc/libiberty
25180         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
25181         for credits and details.  Thanks to Kaveh Ghazi for helping
25182         to keep these files in sync.
25183         (ARRAY_SIZE): Define it.
25184         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
25185         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
25186         (memcasecmp): Don't assume size_t fits in unsigned int.
25187         Remove casts and duplicate code.
25188         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
25189         (memcpy): Remove definition.
25190         Merge in some clean-up and optimization changes from glibc.
25191         [BLOCKSIZE]: Move definition to top of file.
25192         Ensure that it is a multiple of 64.
25193         Rearrange loop exit tests so as to avoid performing an
25194         additional fread after encountering an error or EOF.
25195         * lib/md5.h (md5_uintptr): Define.
25196         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
25197         return to the initial working directory.  Preserve errno
25198         for caller.
25199         * lib/idcache.c: Include "xalloc.h".
25200         (xmalloc, xrealloc): Remove decls.
25201         (getuser): Remove casts no longer required in C89.
25202         * lib/human.c: Include stdio.h, for sprintf.
25203         * lib/group-member.c: Include "xalloc.h".
25204         (xmalloc, xrealloc): Remove decls.
25205         (get_group_info): Remove casts no longer required in C89.
25206         * lib/getusershell.c (readname): Remove casts no longer required in
25207         C89.
25208         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
25209         * lib/getline.c: Whitespace fix, from coreutils.
25210
25211 2003-08-13  Paul Eggert  <eggert@twinsun.com>
25212
25213         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
25214         Check for isascii.
25215
25216         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
25217         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
25218         Undo previous (whitespace-only) change.
25219
25220 2003-08-13  Paul Eggert  <eggert@twinsun.com>
25221
25222         * lib/exclude.c: Include <ctype.h>
25223         (IN_CTYPE_DOMAIN): New macro.
25224         (is_space): New fn.
25225         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
25226         and empty lines.
25227
25228         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
25229         Undo previous (whitespace-only) change.
25230
25231 2003-08-13  Paul Eggert  <eggert@twinsun.com>
25232
25233         * config/srclist-update: Change update back to the old behavior,
25234         leaving whitespace alone.  Use one 'sed' command rather than a
25235         pipeline.
25236         (fixlicense): Now a variable, not a function.
25237         (remove_trailing_blanks): Remove.
25238         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
25239         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
25240         Undo previous (whitespace-only) change.
25241
25242 2003-08-12  Paul Eggert  <eggert@twinsun.com>
25243
25244         Merge from coreutils.
25245         * modules/euidaccess: Add lib_SOURCES, include for new
25246         file euidaccess.h
25247
25248 2003-08-12  Paul Eggert  <eggert@twinsun.com>
25249
25250         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
25251         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
25252         Normalize leading white space and remove trailing white space.
25253
25254         Merge from coreutils
25255         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
25256
25257         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
25258         0.12.1.  These files are now being upgraded automatically by
25259         ../config/srclist-update.
25260
25261 2003-08-12  Paul Eggert  <eggert@twinsun.com>
25262
25263         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
25264         Normalize leading white space and remove trailing white space.
25265         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
25266         notice, as per ../config/srclist-update.
25267
25268         Merge from coreutils.
25269         * lib/euidaccess.h: New file.
25270         * lib/euidaccess.c: Include it.
25271         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
25272         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
25273         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
25274
25275 2003-08-12  Paul Eggert  <eggert@twinsun.com>
25276
25277         * config/srclist-update: Add copyright notice.
25278         (remove_id_lines, remove_trailing_blanks): New constants.
25279         (fixfile): Use them to normalize spacing a bit in copied files.
25280         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
25281         Normalize leading white space and remove trailing white space.
25282
25283         * config/texinfo.tex: Sync with texinfo.
25284
25285         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
25286         strtoul.c from libc, to merge coreutils whitespace changes.
25287
25288         * config/srclist.txt: Get the following m4 files from gettext:
25289         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
25290         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
25291         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
25292         wint_t.m4.
25293
25294 2003-08-12  Karl Berry  <karl@gnu.org>
25295
25296         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
25297         been made.
25298
25299 2003-08-11  Paul Eggert  <eggert@twinsun.com>
25300
25301         * modules/gnu-source, m4/gnu-source.m4:
25302         Remove; we're assuming Autoconf 2.54 or later now.
25303         Suggested by Bruno Haible.
25304         * MODULES.html.sh (func_all_modules): Remove gnu-source.
25305
25306 2003-08-11  Bruno Haible  <bruno@clisp.org>
25307
25308         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
25309
25310 2003-08-11  Bruno Haible  <bruno@clisp.org>
25311
25312         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
25313         (vasnprintf): Use it instead of wcslen.
25314
25315 2003-08-11  Bruno Haible  <bruno@clisp.org>
25316
25317         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
25318         value to ensure that _Bool promotes to int. Use #define for _Bool when
25319         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
25320
25321 2003-08-10  Karl Berry  <karl@gnu.org>
25322
25323         * lib/regex.h: update from libc (whitespace fix).
25324
25325 2003-08-09  Paul Eggert  <eggert@twinsun.com>
25326
25327         Merge some files from coreutils.  These changes were
25328         originally made by Jim Meyering.
25329         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
25330         many older Unixes require this.
25331         * lib/alloca.c (alloca): Remove cast to argument of free;
25332         no longer needed in C89.
25333         * lib/alloca_.h, regex.h: Fix white space to match
25334         what GNU indent does.
25335
25336 2003-08-09  Paul Eggert  <eggert@twinsun.com>
25337
25338         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
25339         apparently Emacs's Unicode mode got confused before my 2003-08-05
25340         checkin.
25341
25342 2003-08-08  Paul Eggert  <eggert@twinsun.com>
25343
25344         * m4/extensions.m4: New file.
25345         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
25346         Require gl_USE_SYSTEM_EXTENSIONS.
25347         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
25348         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
25349
25350 2003-08-08  Paul Eggert  <eggert@twinsun.com>
25351
25352         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
25353         * modules/extensions, modules/gnu-source: New files.
25354         * modules/timespec, modules/unlocked-io: Depend on extensions.
25355
25356 2003-08-07  Paul Eggert  <eggert@twinsun.com>
25357
25358         * modules/restrict: New file.
25359         * MODULES.html.sh (func_all_modules): Add restrict.
25360         * modules/regex: Depend on restrict.
25361
25362 2003-08-07  Paul Eggert  <eggert@twinsun.com>
25363
25364         * m4/restrict.m4: New file.
25365         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
25366
25367 2003-08-07  Bruno Haible  <bruno@clisp.org>
25368
25369         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
25370         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
25371
25372 2003-08-07  Bruno Haible  <bruno@clisp.org>
25373
25374         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
25375         makes the module 'getndelim2' compatible with the module 'getline'.
25376
25377 2003-08-05  Paul Eggert  <eggert@twinsun.com>
25378
25379         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
25380         byte with "\201" to avoid glitches when editing that source file
25381         with multi-gnome-terminal.
25382
25383 2003-08-05  Paul Eggert  <eggert@twinsun.com>
25384
25385         * lib/bumpalloc.h: Remove.
25386
25387 2003-08-05  Paul Eggert  <eggert@twinsun.com>
25388
25389         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
25390         * modules/bumpalloc: Remove.
25391
25392 2003-08-04  Paul Eggert  <eggert@twinsun.com>
25393
25394         * lib/getloadavg.c: Change copyright notice and spacing to conform to
25395         GNU coding style.
25396
25397         Merge from coreutils.
25398         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
25399         1. From glibc.
25400         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
25401         from Karl Berry, implemented by Jim Meyering.
25402         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
25403         from Dmitry V. Levin.
25404         Remove anachronistic cast of xrealloc.
25405         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
25406         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
25407         type. Otherwise, it wouldn't compile with at least /bin/cc on
25408         ymp-cray-unicos9.0.2.X.
25409         Combine two mostly-identical uses of alloca into one.
25410         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
25411
25412 2003-08-04  Dave Love  <d.love@dl.ac.uk>
25413
25414         [From Emacs.]
25415
25416         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
25417         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
25418         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
25419         obsolete NLIST_NAME_UNION.
25420         [__GNU__]: Undef BSD and FSCALE.
25421         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
25422
25423 2003-08-03  Paul Eggert  <eggert@twinsun.com>
25424
25425         * lib/stdbool_.h (_Bool): Make it signed char, instead of
25426         an enum type, so that it's guaranteed to promote to int.  See:
25427         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
25428
25429 2003-08-03  Karl Berry  <karl@gnu.org>
25430
25431         * config/depcomp: update from automake.
25432
25433 2003-07-31  Paul Eggert  <eggert@twinsun.com>
25434
25435         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
25436         (strerror): Don't assume that a printable int fits in 14 bytes.
25437
25438 2003-07-31  Bruno Haible  <bruno@clisp.org>
25439
25440         * modules/getpass-gnu: New file.
25441         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
25442
25443 2003-07-31  Bruno Haible  <bruno@clisp.org>
25444
25445         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
25446
25447 2003-07-24  Karl Berry  <karl@gnu.org>
25448
25449         * config/missing: update from automake.
25450
25451 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
25452             Bruno Haible  <bruno@clisp.org>
25453
25454         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
25455         * lib/getline.c (getline, getdelim): Likewise.
25456         Remove _GNU_SOURCE define; now it's defined in config.h through
25457         m4/getline.m4.
25458
25459 2003-07-23  Karl Berry  <karl@gnu.org>
25460
25461         * config/config.sub: update from prep.
25462
25463 2003-07-22  Paul Eggert  <eggert@twinsun.com>
25464
25465         * modules/xalloc (Depends-on): Add exitfail.
25466         * modules/xmemcoll: Likewise.
25467
25468 2003-07-22  Paul Eggert  <eggert@twinsun.com>
25469
25470         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
25471         over-parenthesization in macros.
25472
25473         Sync with coreutils.
25474
25475         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
25476         required by C99.
25477
25478         Use `exit_failure' for xalloc and xmemcoll instead of their own
25479         private exit-failure variables.
25480         * lib/xalloc.h (xalloc_exit_failure): Remove.
25481         * lib/xmalloc.c: Likewise.  Include exitfail.h.
25482         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
25483         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
25484         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
25485         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
25486
25487 2003-07-20  Jim Meyering  <jim@meyering.net>
25488
25489         * modules/closeout (Depends-on): Add exitfail.
25490         Suggestion from Bruno Haible.
25491
25492 2003-07-19  Karl Berry  <karl@gnu.org>
25493
25494         * config/config.sub: update from prep.
25495
25496 2003-07-18  Paul Eggert  <eggert@twinsun.com>
25497
25498         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
25499         Remove.
25500         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
25501         to test that it can stand by itself.  Include "exitfail.h".
25502         Clients should set exit_failure instead.
25503         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
25504
25505 2003-07-18  Bruno Haible  <bruno@clisp.org>
25506
25507         * modules/getndelim2: New file.
25508         * modules/getline: Share files with module getndelim2.
25509         * modules/getnline: Depend on getndelim2 instead of sharing files with
25510         it. Add getnline.c to lib_SOURCES.
25511         * MODULES.html.sh (func_all_modules): Add getndelim2.
25512
25513 2003-07-18  Bruno Haible  <bruno@clisp.org>
25514
25515         * m4/getndelim2.m4: New file.
25516         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
25517         invoke gl_PREREQ_GETNDELIM2.
25518         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
25519         gl_PREREQ_GETNDELIM2.
25520         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
25521         gl_GETNDELIM2.
25522
25523 2003-07-18  Bruno Haible  <bruno@clisp.org>
25524
25525         * lib/getndelim2.h: New file.
25526         * lib/getndelim2.c: Make into a module of its own. Include config.h,
25527         getndelim2.h.
25528         (getndelim2): Make non-static. Change return type to ssize_t.
25529         * lib/getline.h: Change argument names.
25530         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
25531         * lib/getnline.c: Include getndelim2.h.
25532
25533 2003-07-18  Andreas Schwab  <schwab@suse.de>
25534
25535         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
25536
25537 2003-07-17  Karl Berry  <karl@gnu.org>
25538
25539         * config/config.sub: update from prep.
25540
25541 2003-07-17  Bruno Haible  <bruno@clisp.org>
25542
25543         * modules/getnline: New file.
25544         * modules/getline: Add lib/getndelim2.c to source file list.
25545         * MODULES.html.sh (func_all_modules): Add getnline.
25546
25547 2003-07-17  Bruno Haible  <bruno@clisp.org>
25548
25549         * m4/getnline.m4: New file.
25550
25551 2003-07-17  Bruno Haible  <bruno@clisp.org>
25552
25553         * m4/Makefile.am.in: Remove file.
25554         * m4/Makefile.am: Remove file.
25555         * m4/Makefile.in: Remove file.
25556
25557 2003-07-17  Bruno Haible  <bruno@clisp.org>
25558
25559         * lib/getnline.h: New file.
25560         * lib/getnline.c: New file.
25561         * lib/getndelim2.c: New file, extracted from getline.c.
25562         (getndelim2): Renamed from getdelim2, with added nmax argument.
25563         * lib/getline.c: Include getndelim2.c.
25564         (getdelim2): Moved out to getndelim2.c.
25565         (getline, getdelim): Update.
25566
25567 2003-07-17  Bruno Haible  <bruno@clisp.org>
25568
25569         * lib/Makefile.am: Remove file.
25570         * lib/Makefile.in: Remove file.
25571
25572 2003-07-17  Bruno Haible  <bruno@clisp.org>
25573
25574         * configure.in: Remove file.
25575         * Makefile.in: Remove file.
25576
25577 2003-07-17  Bruno Haible  <bruno@clisp.org>
25578
25579         * MODULES.html.sh: Put the </BODY> right before </HTML>.
25580
25581 2003-07-16  Karl Berry  <karl@gnu.org>
25582
25583         * config/srclist-update: was running fixlicense twice, which caused
25584                 texinfo.tex to be nullified for some reason.  Simplify,
25585                 $gplsrc is no longer needed as far as I can see?
25586
25587 2003-07-16  Jim Meyering  <jim@meyering.net>
25588
25589         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
25590
25591 2003-07-15  Paul Eggert  <eggert@twinsun.com>
25592
25593         * config/srclist.txt: Get the following files from gettext-runtime/intl
25594         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
25595         ref-del.sin.  From Bruno Haible.
25596         * config/srclist-update (fixfile): Change grep pattern again, since the
25597         previous fix didn't work (there was another trailing $).  Use
25598         '[$]' to escape the $s.
25599
25600 2003-07-15  Karl Berry  <karl@gnu.org>
25601
25602         * lib/vasnprintf.c: update from gettext.
25603
25604 2003-07-15  Karl Berry  <karl@gnu.org>
25605
25606         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
25607         gets expanded when surrounded by '$'.
25608
25609 2003-07-15  Jim Meyering  <jim@meyering.net>
25610
25611         * modules/save-cwd: Don't depend on error.  From Derek Price.
25612
25613 2003-07-15  Jim Meyering  <jim@meyering.net>
25614
25615         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
25616
25617 2003-07-14  Simon Josefsson  <jas@extundo.com>
25618
25619         * modules/mempcpy: New file.
25620         * MODULES.html.sh (func_all_modules): Add mempcpy.
25621
25622 2003-07-14  Simon Josefsson  <jas@extundo.com>
25623
25624         * m4/mempcpy.m4: New file.
25625
25626 2003-07-14  Simon Josefsson  <jas@extundo.com>
25627
25628         * lib/mempcpy.h: New file.
25629         * lib/mempcpy.c: New file.
25630
25631 2003-07-14  Paul Eggert  <eggert@twinsun.com>
25632
25633         * modules/getdate, modules/posixtm: Depend on mktime.
25634
25635 2003-07-14  Paul Eggert  <eggert@twinsun.com>
25636
25637         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
25638         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
25639         unicodeio.c, unicodeio.h, unlocked-io.h:
25640         Switch from LGPL to GPL.
25641
25642 2003-07-14  Paul Eggert  <eggert@twinsun.com>
25643
25644         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
25645         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
25646         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
25647         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
25648         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
25649         updated automatically by ../config/srclist-update.  This changes
25650         their license from LPGL to GPL.
25651
25652 2003-07-14  Paul Eggert  <eggert@twinsun.com>
25653
25654         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
25655         assumed to refer to the root of the most recent stable gettext version.
25656         * config/srclistvars.sh: Add defaults for eggert.
25657         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
25658         Match "This program" as well as "The program".  This is needed
25659         for gettext.
25660
25661 2003-07-14  Jim Meyering  <jim@meyering.net>
25662
25663         Don't emit diagnostics.  Let callers do that.
25664         * lib/save-cwd.c: Don't include "error.h".
25665         (save_cwd): Don't call error.  Ensure that errno is valid
25666         when returning nonzero.
25667
25668         * lib/save-cwd.h (restore_cwd): Update prototype.
25669         * lib/save-cwd.c (restore_cwd): Remove two parameters.
25670         Simplify.  Don't call error upon failure.  Let callers do that.
25671         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
25672         when auditing is enabled.  But don't bother updating the #if.
25673
25674 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
25675
25676         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
25677         it breaks C++ compilation.
25678         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
25679
25680 2003-07-10  Simon Josefsson  <jas@extundo.com>
25681
25682         * modules/strchrnul (Makefile.am): Add strchrnul.h.
25683
25684 2003-07-10  Jim Meyering  <jim@meyering.net>
25685
25686         * m4/clock_time.m4: Remove trailing blank.
25687         * m4/intmax_t.m4: Likewise.
25688
25689 2003-07-10  Jim Meyering  <jim@meyering.net>
25690
25691         * lib/vasnprintf.c: Remove trailing blanks.
25692         Make cpp indentation consistent.
25693
25694 2003-07-09  Paul Eggert  <eggert@twinsun.com>
25695
25696         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
25697         posixver.c, strftime.c, strnlen.c, strverscmp.c:
25698         Switch from LGPL to GPL.
25699
25700 2003-07-09  Paul Eggert  <eggert@twinsun.com>
25701
25702         * config/srclist.txt: Sort sublists.  Add
25703         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
25704         that differ from gnulib for one reason or another; we'd like this list
25705         to be smaller but for now let's document what we have.
25706
25707 2003-07-08  Paul Eggert  <eggert@twinsun.com>
25708
25709         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
25710         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
25711         and sweeter "eval x=$x".
25712         * config/srclist.txt: Get lib/argp* from glibc.
25713
25714 2003-07-07  Paul Eggert  <eggert@twinsun.com>
25715
25716         * lib/mktime.c: Fix some boundary cases and remove need for floating
25717         point.
25718
25719         Issue a compile-time diagnostic if time_t is floating point, or if
25720         two's complement arithmetic is not in effect, or if arithmetic
25721         right shift does not propagate the sign.  These assumptions were
25722         all in the original code but they weren't checked.
25723
25724         (TIME_T_MIDPOINT, verify): New macros.
25725         (__isleap): Remove; it has integer overflow problems.
25726         (leapyear): New function, without those problems.
25727         (ydhms_tm_diff): Remove; splitting into two parts.
25728         (ydhms_diff): New function, containing the arithmetic part of
25729         the old ydhms_tm_diff function.  Issue a compile-time
25730         diagnostic if we are not using C99 integer division.
25731         Avoid casts when possible.
25732         (guess_time_tm): New function, containing the checking part of
25733         the old ydhms_tm_diff function.  Return the new value, rather than
25734         the difference between it and the old.  Accept a new argument T
25735         so that *T specifies the old value.  Check for overflow in the result.
25736
25737         (__mktime_internal): Use a time_t offset, not a long int offset.
25738         This undoes the 2003-06-04 change, which is no longer needed now
25739         that we have better overflow checking.
25740         (localtime_offset): Likewise.
25741
25742         (__mktime_internal): Avoid harmful overflow on hosts where time_t
25743         and long are 64-bit but int is only 32-bit.
25744         (ydhms_diff): Use long int to store year1 and yday1.
25745         Issue a compile-time diagnostic if long int is not wide enough.
25746
25747         (__mktime_internal): Use long int to store adjusted year and yday.
25748         Use plain C rather than preprocessor commands, if that doesn't
25749         affect efficiency.
25750         Check for overflow (and try to repair) after each probe
25751         rather than checking only at the very end.  This avoids some bugs
25752         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
25753         does not equal GMT offset at maximum time).
25754         Use integer to check for overflow rather than floating point; this
25755         is more portable to non-IEEE hosts, and is a tad faster.
25756         When we detect that we are oscillating between two values,
25757         don't check whether tm_isdst has the requested value, since
25758         we already know the answer.  When tm_isdst has the wrong value,
25759         use a different heuristic to find the right one, based on the
25760         extreme values actually observed in practice in tz2003a,
25761         rather than the (overly optimistic) "previous 3 calendar quarters".
25762
25763         (not_equal_tm, print_tm, check_result): Use "const T" rather than
25764         "T const" to accommodate glibc style.
25765         (check_result): Use less-confusing report format.  "long" -> "long int.
25766         (main): Likewise.
25767         Don't loop if the iteration overflows time_t.
25768         Allow a negative step in the iteration.
25769
25770 2003-07-06  Karl Berry  <karl@gnu.org>
25771
25772         * config/depcomp: update from automake.
25773         * config/config.sub: update from prep.
25774
25775 2003-07-03  Karl Berry  <karl@gnu.org>
25776
25777         * config/config.guess: update from prep.
25778
25779 2003-07-01  Paul Eggert  <eggert@twinsun.com>
25780
25781         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
25782         xreadlink.c now includes it unconditionally.
25783
25784 2003-07-01  Paul Eggert  <eggert@twinsun.com>
25785
25786         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
25787         having it depend on HAVE_SYS_TYPES_H.
25788
25789 2003-07-01  Bruno Haible  <bruno@clisp.org>
25790
25791         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
25792         <sys/types.h> should be sufficient.
25793         Reported by Paul Eggert.
25794
25795 2003-06-26  Karl Berry  <karl@gnu.org>
25796
25797         * config/depcomp: update from automake.
25798
25799 2003-06-26  Bruno Haible  <bruno@clisp.org>
25800
25801         * modules/human: Depend on module stdbool.
25802
25803 2003-06-25  Bruno Haible  <bruno@clisp.org>
25804
25805         * modules/readlink: New file.
25806         * modules/xreadlink: Depend on it.
25807         * MODULES.html.sh (func_all_modules): Add readlink.
25808
25809 2003-06-25  Bruno Haible  <bruno@clisp.org>
25810
25811         * m4/readlink.m4: New file.
25812
25813 2003-06-25  Bruno Haible  <bruno@clisp.org>
25814
25815         * lib/readlink.c: New file.
25816
25817 2003-06-22  Karl Berry  <karl@gnu.org>
25818
25819         * config/srclist.txt: update mkinstalldirs from automake.
25820         * config/mkinstalldirs: update.
25821
25822 2003-06-22  Bruno Haible  <bruno@clisp.org>
25823
25824         Portability to mingw32.
25825         * m4/ssize_t.m4: New file, from GNU gettext.
25826         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
25827         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
25828
25829 2003-06-22  Bruno Haible  <bruno@clisp.org>
25830
25831         * modules/safe-read: Add m4/ssize_t.m4.
25832         * modules/xreadlink: Add m4/ssize_t.m4.
25833
25834 2003-06-20  Bruno Haible  <bruno@clisp.org>
25835
25836         Assume C89, so PARAMS isn't needed.
25837         * lib/unicodeio.h (PARAMS): Remove.
25838         * lib/unicodeio.c: Don't use PARAMS.
25839
25840 2003-06-18  Karl Berry  <karl@gnu.org>
25841
25842         * config/config.{guess,sub}: update from prep.
25843
25844 2003-06-18  Jim Meyering  <jim@meyering.net>
25845
25846         Merge changes from coreutils.
25847         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
25848         Remove explicit declarations of xmalloc and realloc.
25849         Include xalloc.h.
25850         (read_utmp): Remove anachronistic cast of xmalloc.
25851
25852 2003-06-17  Paul Eggert  <eggert@twinsun.com>
25853
25854         Assume C89, so PARAMS isn't needed.
25855         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
25856         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
25857         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
25858         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
25859         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
25860         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
25861         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
25862         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
25863         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
25864         lib/xstrtod.h, lib/xstrtol.h: Likewise.
25865         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
25866         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
25867         no longer needed. Anyway, config.h should always be included before any
25868         other file.
25869
25870 2003-06-11  Simon Josefsson  <jas@extundo.com>
25871
25872         * modules/sysexits: New file.
25873         * MODULES.html.sh (func_all_modules): Add sysexits.
25874
25875 2003-06-11  Simon Josefsson  <jas@extundo.com>
25876
25877         * lib/sysexit_.h: New file.
25878
25879 2003-06-11  Derek Price  <derek@ximbiot.com>
25880
25881         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
25882         necessary.
25883
25884 2003-06-11  Bruno Haible  <bruno@clisp.org>
25885
25886         * m4/sysexits.m4: New file.
25887
25888 2003-06-10  Simon Josefsson  <jas@extundo.com>
25889
25890         * lib/argp.h: New file, from glibc.
25891         * lib/argp-ba.c: New file, from glibc.
25892         * lib/argp-eexst.c: New file, from glibc.
25893         * lib/argp-fmtstream.c: New file, from glibc.
25894         * lib/argp-fmtstream.h: New file, from glibc.
25895         * lib/argp-fs-xinl.c: New file, from glibc.
25896         * lib/argp-help.c: New file, from glibc.
25897         * lib/argp-namefrob.h: New file, from glibc.
25898         * lib/argp-parse.c: New file, from glibc.
25899         * lib/argp-pv.c: New file, from glibc.
25900         * lib/argp-pvh.c: New file, from glibc.
25901         * lib/argp-xinl.c: New file, from glibc.
25902
25903 2003-06-10  Simon Josefsson  <jas@extundo.com>
25904
25905         * modules/strchrnul: New file.
25906
25907 2003-06-10  Simon Josefsson  <jas@extundo.com>
25908
25909         * modules/argp: New file.
25910
25911 2003-06-10  Simon Josefsson  <jas@extundo.com>
25912
25913         * m4/strchrnul.m4: New file.
25914
25915 2003-06-10  Simon Josefsson  <jas@extundo.com>
25916
25917         * lib/strchrnul.h: New file.
25918         * lib/strchrnul.c: New file.
25919
25920 2003-06-10  Bruno Haible  <bruno@clisp.org>
25921
25922         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
25923
25924 2003-06-07  Karl Berry  <karl@gnu.org>
25925
25926         * config/config.{guess,sub}: update from prep.
25927
25928 2003-06-07  Jim Meyering  <jim@meyering.net>
25929
25930         * modules/strtod: Use $(...) notation, not @...@ for
25931         AC_REPLACE'd variables.
25932         * modules/localcharset: Likewise.
25933
25934 2003-06-07  Jim Meyering  <jim@meyering.net>
25935
25936         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
25937         in place of my name in the copyright comment.
25938         Remove definition and uses of __P.
25939
25940         From coreutils.
25941         * lib/stat.c: Don't declare xmalloc explicitly.
25942         Instead, include "xalloc.h".
25943         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
25944         xrealloc, and xcalloc return values.
25945         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
25946         Improve comment.
25947         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
25948
25949 2003-06-07  Bruno Haible  <bruno@clisp.org>
25950
25951         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
25952         avoid AC_CONFIG_LINKS.
25953         * modules/fnmatch (Makefile.am): Use explicit creation rule for
25954         fnmatch.h, to avoid AC_CONFIG_LINKS.
25955         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
25956
25957 2003-06-07  Bruno Haible  <bruno@clisp.org>
25958
25959         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
25960         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
25961         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
25962         directory.
25963         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
25964         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
25965         directory.
25966
25967 2003-06-06  Jim Meyering  <jim@meyering.net>
25968
25969         Merge from coreutils.
25970         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
25971         Consolidate declarations and initializations of *_base* locals.
25972
25973         Merge from coreutils.
25974         This avoids a core dump on systems without GNU putenv,
25975         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
25976         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
25977         (unsetenv): New static function, from GNU libc.
25978         (rpl_putenv): Use it.
25979
25980         * lib/modechange.c: Remove trailing blanks.
25981
25982         Merge from coreutils.
25983         * lib/fsusage.c: Remove declaration of statfs.
25984         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
25985
25986         * lib/posixtm.c: Include <stdbool.h> unconditionally.
25987
25988 2003-06-06  Jim Meyering  <jim@meyering.net>
25989
25990         * lib/stdbool_.h: Renamed from stdbool.h.in.
25991
25992 2003-06-06  Jim Meyering  <jim@meyering.net>
25993             Bruno Haible  <bruno@clisp.org>
25994
25995         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
25996         Adjust Makefile.am snippet not to redirect directly to target.
25997         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
25998
25999 2003-06-05  Paul Eggert  <eggert@twinsun.com>
26000
26001         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
26002         mismatch, look in future quarters as well as past.  This fixes a
26003         bug when processing fall-backwards gaps immediately after a long
26004         period of daylight-saving time.
26005
26006         * lib/mktime.c: Assume freestanding C89 or better.
26007         (HAVE_LIMITS_H): Remove.  Assume it's 1.
26008         (__P): Remove; not used.
26009         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
26010         (mktime, not_equal_tm, print_tm, check_result,
26011         main): Use prototypes.  Use const * where appropriate.
26012         (main): Fix typo in testing code that uncovered by above changes.
26013         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
26014
26015 2003-06-04  Paul Eggert  <eggert@twinsun.com>
26016
26017         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
26018         locale.h, localeconv.  This merges changes from coreutils.
26019
26020         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
26021         It can be removed after the next Autoconf is released.
26022         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
26023         needed.
26024
26025 2003-06-04  Paul Eggert  <eggert@twinsun.com>
26026
26027         * lib/mktime.c: Fix Debian bug 177940
26028         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
26029         (localtime_offset): Now long int, not time_t, because we want it
26030         to be guaranteed to be signed.  All uses changed.
26031         (__mktime_internal): If overflow would occur when adding offset,
26032         don't add it.
26033
26034         Merge 'human' changes from coreutils.  Rewrite to support
26035         locale-specific notations like thousands separators.
26036         * lib/human.c: Simplify authorship notice.
26037         Include human.h immediately after config.h.
26038         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
26039         <limits.h>: Do not include, since human.h does.
26040         (SIZE_MAX, UINTMAX_MAX): New macros.
26041         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
26042         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
26043         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
26044         (power_letter): Renamed from suffixes.
26045         (generate_suffix_backwards): Remove.
26046         (adjust_value): Now takes int style (because of human.h changes)
26047         and long double value (for greater precision on some platforms).
26048         (group_number): New function.
26049         (human_readable): Use it.  Use integer options, not enum.
26050         Put the options before the sizes in the arg list.
26051         Support all the new options.
26052         The old human_readable function has been removed;
26053         use inttostr.h instead.
26054         (human_readable, default_block_size, humblock):
26055         Use uintmax_t, not int, for block sizes.
26056         (human_readable_inexact, block_size_types): Remove.
26057         (block_size_opts): New constant.
26058         (human_options): Renamed from human_block_size, with new signature
26059         that allows block sizes up to UINTMAX_MAX.  All callers changed.
26060         * lib/human.h: Add copyright and authorship notice.
26061         Include <limits.h> and <stdbool.h> unconditionally.
26062         (PARAMS): Remove.  All uses removed.
26063         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
26064         (enum human_inexact_style): Remove tag; now a nameless enum.
26065         (human_floor, human_ceiling, human_round_to_even): Now have
26066         values 2, 0, 1 rather than -1, 1, 0.
26067         (human_group_digits, human_suppress_point_zero, human_autoscale,
26068         human_base_1024, human_SI, human_B): New constants.
26069         (human_readable_inexact, human_block_size): Remove.
26070         (human_readable): Size args are now uintmax_t, not int.
26071         (human_options): New decl.
26072
26073         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
26074         unnecessary now that we assume C89 or better.  This change
26075         imported from coreutils.
26076
26077         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
26078         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
26079         in the 2003-05-30 sync from glibc.
26080
26081         .h files should stand alone, but we shouldn't include <sys/types.h>
26082         if we can get away with just <stddef.h>.
26083
26084         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
26085         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
26086         rather than <sys/types.h>, as we merely need size_t.
26087         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
26088         to get size_t.
26089         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
26090         Include <stdio.h>, to get FILE.
26091         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
26092         memcasecmp.h has included <stddef.h> and all we need is size_t.
26093         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
26094         our interface, instead of including <sys/types.h>
26095
26096 2003-06-04  Paul Eggert  <eggert@twinsun.com>
26097
26098         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
26099         now, as glibc mktime is buggy on non-glibc systems.
26100
26101 2003-06-03  Karl Berry  <karl@gnu.org>
26102
26103         * config/config.sub: update from prep.
26104
26105 2003-06-02  Paul Eggert  <eggert@twinsun.com>
26106
26107         [from coreutils]
26108         Fix some minor time-related bugs with POSIX time arguments.
26109         Some valid time stamps were being rejected (notably -1, and
26110         time stamps before 1900 on 64-bit hosts).  And some invalid
26111         time stamps were being accepted, e.g. September 31.
26112
26113         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
26114         that we can return (time_t) -1 successfully.
26115         * lib/posixtm.c: Likewise.
26116         [HAVE_STDBOOL_H]: Include <stdbool.h>.
26117         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
26118         (t): Remove static var.
26119         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
26120         of static var.  All uses changed.
26121         (year): Do not reject years before 1900; they can occur with
26122         64-bit time_t.
26123         (posix_time_parse): Do not check for out-of-range components;
26124         that is now the caller's responsibility, since our checks were
26125         only approximations.
26126         (posixtime): Use mktime to check for out-of-range components,
26127         since it knows them exactly.
26128         If mktime returns (time_t) -1, check whether an error actually occurred
26129         by invoking localtime on -1.
26130         (main) [TEST_POSIXTIME]: Check for input data errors, and report
26131         posixtime failures better.
26132         Improve the test data (in comments only).
26133
26134 2003-06-02  Karl Berry  <karl@gnu.org>
26135
26136         * config/mkinstalldirs (version): new variable.
26137         (--version): new option.
26138         (usage): improve message.
26139
26140 2003-05-30  Karl Berry  <karl@gnu.org>
26141
26142         * lib/mktime.c: update from libc.
26143
26144 2003-05-30  Bruno Haible  <bruno@clisp.org>
26145
26146         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
26147         * config/config.rpath: Upgrade to gettext-0.12.1.
26148
26149 2003-05-30  Bruno Haible  <bruno@clisp.org>
26150
26151         * m4/gettext.m4: Upgrade to gettext-0.12.1.
26152         * m4/nls.m4: New file, from gettext-0.12.1.
26153         * m4/po.m4: New file, from gettext-0.12.1.
26154         * m4/progtest.m4: Upgrade to gettext-0.12.1.
26155
26156 2003-05-30  Bruno Haible  <bruno@clisp.org>
26157
26158         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
26159         * lib/localcharset.h: Likewise.
26160         * lib/localcharset.c: Likewise.
26161
26162 2003-05-29  Karl Berry  <karl@gnu.org>
26163
26164         * config/config.rpath: update from gettext.
26165
26166 2003-05-28  Paul Eggert  <eggert@twinsun.com>
26167
26168         Assume the headers required for C89 freestanding compilers.
26169         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
26170         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
26171         * m4/human.m4 (gl_HUMAN): Likewise.
26172         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
26173         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
26174         * m4/userspec.m4 (gl_USERSPEC): Likewise.
26175         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
26176         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
26177         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
26178
26179 2003-05-28  Paul Eggert  <eggert@twinsun.com>
26180
26181         Assume the headers required for C89 freestanding compilers.
26182         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
26183         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
26184         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
26185         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
26186         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
26187         define, since <limits.h> is guaranteed to do that.
26188         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
26189         * lib/exclude.c: Include <stdbool.h> unconditionally.
26190         * lib/tempname.c: Include <stddef.h> unconditionally.
26191         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
26192         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
26193         <stddef.h> does that.
26194         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
26195         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
26196         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
26197         needed.
26198         * lib/xstrtol.c: Likewise.
26199         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
26200         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
26201
26202         * lib/addext.c (addext): Use assignment rather than cast, to avoid
26203         warnings on some platforms.
26204
26205         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
26206         arbitrarily.
26207
26208 2003-05-26  Jim Meyering  <jim@meyering.net>
26209
26210         Merge in a change from coreutils:
26211         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
26212         that is guaranteed to be `no'.  Use `no_such_member' to indicate
26213         that condition, rather than `-1' which is slightly misleading.
26214         Change the name of the cache variable to have the gl_ prefix.
26215         Prompted by a patch from Richard Dawe for DJGPP.
26216
26217 2003-05-24  Karl Berry  <karl@gnu.org>
26218
26219         * config/config.guess: update from prep.
26220
26221 2003-05-22  Karl Berry  <karl@gnu.org>
26222
26223         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
26224
26225 2003-05-20  Karl Berry  <karl@gnu.org>
26226
26227         * config/config.guess: update from prep.
26228
26229 2003-05-18  Karl Berry  <karl@gnu.org>
26230
26231         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
26232         might actually be set by the user.
26233
26234         * config/depcomp, install-sh, mdate-sh: update from automake.
26235
26236 2003-05-17  Bruno Haible  <bruno@clisp.org>
26237
26238         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
26239         invalid expansion for AC_EGREP_CPP.
26240         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
26241         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
26242         Suggested by Akim Demaille <akim@epita.fr> in
26243         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
26244
26245 2003-05-12  Jim Meyering  <jim@meyering.net>
26246
26247         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
26248         the space-padded-by-default conversion specifiers, %e, %k, %l.
26249
26250 2003-05-12  Bruno Haible  <bruno@clisp.org>
26251
26252         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
26253         the string is longer than 4 KB.
26254
26255 2003-05-11  Karl Berry  <karl@gnu.org>
26256
26257         * config/config.{guess,sub}: update from prep.
26258
26259 2003-05-09  Bruno Haible  <bruno@clisp.org>
26260
26261         * modules/error: Add m4/strerror_r.m4 to file list.
26262
26263 2003-05-03  Bruno Haible  <bruno@clisp.org>
26264
26265         Upgrade to Unicode-4.0.
26266         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
26267         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
26268         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
26269         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
26270         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
26271         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
26272         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
26273         Change width of U+E0100..U+E01EF from 1 to 0.
26274
26275 2003-04-25  Jim Meyering  <jim@meyering.net>
26276
26277         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
26278         of type size_t, not int.
26279
26280 2003-04-25  Bruno Haible  <bruno@clisp.org>
26281
26282         * lib/copy-file.c: Include <stddef.h>, for size_t.
26283
26284 2003-04-21  Paul Eggert  <eggert@twinsun.com>
26285
26286         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
26287         code which expansion is under static control.  Patch imported from
26288         Akim Demaille's patch to Bison; see
26289         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
26290
26291 2003-04-14  Bruno Haible  <bruno@clisp.org>
26292
26293         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
26294
26295 2003-04-11  Jim Meyering  <jim@meyering.net>
26296
26297         Merge changes from Coreutils.
26298
26299         2003-03-22  Jim Meyering  <jim@meyering.net>
26300
26301         * lib/strftime.c (widen): Cast alloca return value to proper type.
26302
26303         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
26304
26305         From GNU libc.
26306         * lib/strftime.c (my_strftime): Handle very large width
26307         specifications for numeric values correctly.  Improve checks for
26308         overflow.
26309
26310         2003-01-19  Jim Meyering  <jim@meyering.net>
26311
26312         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
26313         definitions.
26314         (nl_get_alt_digit) [! defined my_strftime]: Define.
26315         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
26316         _nl_get_alt_digit and _nl_get_walt_digit.
26317
26318         * lib/strftime.c (my_strftime): Merge in locale-related changes from
26319         libc. These changes have no effect outside of _LIBC.
26320
26321 2003-04-10  Bruno Haible  <bruno@clisp.org>
26322
26323         * modules/findprog: New file.
26324         * MODULES.html.sh (func_all_modules): Add it.
26325
26326 2003-04-10  Bruno Haible  <bruno@clisp.org>
26327
26328         * m4/findprog.m4: New file.
26329         * m4/eaccess.m4: New file.
26330
26331 2003-04-10  Bruno Haible  <bruno@clisp.org>
26332
26333         * lib/findprog.h: New file, from GNU gettext.
26334         * lib/findprog.c: New file, from GNU gettext.
26335
26336 2003-04-05  Jim Meyering  <jim@meyering.net>
26337
26338         Merge changes from Coreutils.
26339
26340         * lib/exclude.h (PARAMS): Remove definition and uses.
26341         * lib/exclude.c: Remove uses of `PARAMS'.
26342
26343         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
26344         Add test-cases for DOS filenames. Declare program_name.
26345         (main): Set up program_name.  Patch by Rich Dawe.
26346
26347         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
26348         error from mntctl.
26349         Use mntctl's return value to drive the entry-processing loop, since
26350         we can't rely on the value of the vmt_length member in the last
26351         entry.  On some systems doing so could result in exhausting
26352         virtual memory.  Based in part on a patch from Mike Jetzer.
26353
26354 2003-04-04  Bruno Haible  <bruno@clisp.org>
26355
26356         * modules/linebreak: New file.
26357         * MODULES.html.sh (func_all_modules): Add it.
26358
26359 2003-04-04  Bruno Haible  <bruno@clisp.org>
26360
26361         * m4/linebreak.m4: New file.
26362
26363 2003-04-04  Bruno Haible  <bruno@clisp.org>
26364
26365         * lib/linebreak.h: New file, from GNU gettext.
26366         * lib/linebreak.c: New file, from GNU gettext with slight
26367         modifications.
26368         * lib/lbrkprop.h: New file, from GNU gettext.
26369
26370 2003-04-03  Bruno Haible  <bruno@clisp.org>
26371
26372         * modules/utf8-ucs4: New file.
26373         * modules/utf16-ucs4: New file.
26374         * modules/ucs4-utf8: New file.
26375         * modules/ucs4-utf16: New file.
26376         * MODULES.html.sh (func_all_modules): Add them.
26377
26378 2003-04-03  Bruno Haible  <bruno@clisp.org>
26379
26380         * m4/utf-ucs4.m4: New file.
26381         * m4/ucs4-utf.m4: New file.
26382
26383 2003-04-03  Bruno Haible  <bruno@clisp.org>
26384
26385         * lib/utf8-ucs4.h: New file, from GNU gettext.
26386         * lib/utf16-ucs4.h: New file, from GNU gettext.
26387         * lib/ucs4-utf8.h: New file, from GNU gettext.
26388         * lib/ucs4-utf16.h: New file, from GNU gettext.
26389
26390 2003-04-02  Bruno Haible  <bruno@clisp.org>
26391
26392         * modules/binary-io: New file.
26393         * MODULES.html.sh (func_all_modules): Add it.
26394
26395 2003-04-02  Bruno Haible  <bruno@clisp.org>
26396
26397         * lib/binary-io.h: New file, from GNU gettext.
26398
26399 2003-04-01  Bruno Haible  <bruno@clisp.org>
26400
26401         * modules/pathname: New file.
26402         * MODULES.html.sh (func_all_modules): Add it.
26403
26404 2003-04-01  Bruno Haible  <bruno@clisp.org>
26405
26406         * lib/pathname.h: New file, from GNU gettext.
26407         * lib/concatpath.c: New file, from GNU gettext.
26408
26409 2003-03-30  Bruno Haible  <bruno@clisp.org>
26410
26411         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
26412
26413 2003-03-30  Bruno Haible  <bruno@clisp.org>
26414
26415         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
26416         function chown() doesn't exist.
26417
26418 2003-03-28  Bruno Haible  <bruno@clisp.org>
26419
26420         * modules/copy-file: New file.
26421         * MODULES.html.sh (func_all_modules): Add it.
26422
26423 2003-03-28  Bruno Haible  <bruno@clisp.org>
26424
26425         * m4/copy-file.m4: New file.
26426
26427 2003-03-28  Bruno Haible  <bruno@clisp.org>
26428
26429         * lib/copy-file.h: New file, from GNU gettext.
26430         * lib/copy-file.c: New file, from GNU gettext.
26431
26432 2003-03-18  Jim Meyering  <jim@meyering.net>
26433
26434         * lib/quote.c (quote_n): Fix typo in comment.
26435
26436 2003-03-18  Bruno Haible  <bruno@clisp.org>
26437
26438         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
26439         checking.
26440         * m4/onceonly_2_57.m4: Likewise.
26441
26442 2003-03-17  Bruno Haible  <bruno@clisp.org>
26443
26444         * m4/onceonly.m4: Require autoconf 2.54 or newer.
26445         (m4_quote): Remove macro.
26446         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
26447
26448 2003-03-14  Jim Meyering  <jim@meyering.net>
26449
26450         Merge changes from Coreutils.
26451         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
26452         to be const, in order to avoid warnings.
26453         (obstack_room): Likewise.
26454         (obstack_empty_p): Likewise.
26455
26456 2003-03-14  Bruno Haible  <bruno@clisp.org>
26457
26458         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
26459         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
26460
26461 2003-03-13  Paul Eggert  <eggert@twinsun.com>
26462
26463         Merge changes from Bison.
26464         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
26465         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
26466         when compiling Bison 1.875's `bitset bset = obstack_alloc
26467         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
26468         * lib/hash.c: Include <stdbool.h> unconditionally.
26469
26470 2003-03-13  Paul Eggert  <eggert@twinsun.com>
26471
26472         * m4/onceonly.m4 (m4_quote): New macro.
26473         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
26474         Quote AC_FOREACH variable-expansions properly.
26475
26476 2003-03-13  Paul Eggert  <eggert@twinsun.com>
26477
26478         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
26479
26480 2003-03-09  Paul Eggert  <eggert@twinsun.com>
26481
26482         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
26483         Reported by Bruce Becker; see:
26484         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
26485
26486 2003-03-03  Paul Eggert  <eggert@twinsun.com>
26487             Bruno Haible  <bruno@clisp.org>
26488
26489         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
26490         Reported by John Hughes, see
26491         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
26492
26493 2003-02-20  Bruno Haible  <bruno@clisp.org>
26494
26495         * MODULES.html.sh (func_all_modules): Add poll.
26496
26497 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
26498
26499         * modules/poll: New file.
26500
26501 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
26502
26503         * lib/poll_.h: New file.
26504         * lib/poll.c: New file.
26505
26506 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
26507
26508         * m4/poll.m4: New file.
26509
26510 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
26511
26512         * modules/mathl: New file.
26513
26514 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
26515
26516         * lib/mathl.h: New file.
26517         * lib/acosl.c: New file.
26518         * lib/asinl.c: New file.
26519         * lib/atanl.c: New file.
26520         * lib/ceill.c: New file.
26521         * lib/cosl.c: New file.
26522         * lib/expl.c: New file.
26523         * lib/floorl.c: New file.
26524         * lib/frexpl.c: New file.
26525         * lib/ldexpl.c: New file.
26526         * lib/logl.c: New file.
26527         * lib/sincosl.c: New file.
26528         * lib/sinl.c: New file.
26529         * lib/sqrtl.c: New file.
26530         * lib/tanl.c: New file.
26531         * lib/trigl.c: New file.
26532         * lib/trigl.h: New file.
26533
26534 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
26535
26536         * m4/mathl.m4: New file.
26537
26538 2003-02-18  Bruno Haible  <bruno@clisp.org>
26539
26540         * MODULES.html.sh (func_all_modules): Add mathl.
26541
26542 2003-02-17  Bruno Haible  <bruno@clisp.org>
26543
26544         * modules/mkdtemp: New module.
26545         * MODULES.html.sh (func_all_modules): Add it.
26546
26547 2003-02-17  Bruno Haible  <bruno@clisp.org>
26548
26549         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
26550
26551 2003-02-17  Bruno Haible  <bruno@clisp.org>
26552
26553         * lib/mkdtemp.h: New file, from GNU gettext.
26554         * lib/mkdtemp.c: New file, from GNU gettext.
26555
26556 2003-02-02  Jim Meyering  <jim@meyering.net>
26557
26558         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
26559         e.g. glibc-2.2.93.
26560
26561 2003-01-31  Bruno Haible  <bruno@clisp.org>
26562
26563         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
26564         'rpl_rename'.
26565         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
26566         'rpl_strnlen'.
26567         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
26568         'rpl_strtod'.
26569         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
26570         'rpl_utime'.
26571
26572 2003-01-31  Bruno Haible  <bruno@clisp.org>
26573
26574         * lib/rename.c: #undef rename before defining rpl_rename.
26575         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
26576
26577 2003-01-30  Bruno Haible  <bruno@clisp.org>
26578
26579         * modules/vasnprintf, modules/vasprintf: New modules.
26580         * MODULES.html.sh (func_all_modules): Add them.
26581
26582 2003-01-30  Bruno Haible  <bruno@clisp.org>
26583
26584         * m4/signed.m4: New file, from GNU gettext.
26585         * m4/longdouble.m4: New file, from GNU gettext.
26586         * m4/wchar_t.m4: New file, from GNU gettext.
26587         * m4/wint_t.m4: New file, from GNU gettext.
26588         * m4/vasnprintf.m4: New file.
26589         * m4/vasprintf.m4: New file.
26590
26591 2003-01-30  Bruno Haible  <bruno@clisp.org>
26592
26593         * lib/printf-args.h: New file, from GNU gettext.
26594         * lib/printf-args.c: New file, from GNU gettext.
26595         * lib/printf-parse.h: New file, from GNU gettext.
26596         * lib/printf-parse.c: New file, from GNU gettext.
26597         * lib/vasnprintf.h: New file, from GNU gettext.
26598         * lib/vasnprintf.c: New file, from GNU gettext.
26599         * lib/asnprintf.c: New file, from GNU gettext.
26600         * lib/vasprintf.h: New file, from GNU gettext with modifications.
26601         * lib/vasprintf.c: New file, from GNU gettext.
26602         * lib/asprintf.c: New file, from GNU gettext.
26603
26604 2003-01-29  Bruno Haible  <bruno@clisp.org>
26605
26606         * modules/stpncpy: New module.
26607         * MODULES.html.sh (func_all_modules): Add it.
26608
26609 2003-01-29  Bruno Haible  <bruno@clisp.org>
26610
26611         * m4/stpncpy.m4: New file.
26612
26613 2003-01-29  Bruno Haible  <bruno@clisp.org>
26614
26615         * lib/stpncpy.h: New file, from GNU gettext with modifications.
26616         * lib/stpncpy.c: New file, from GNU gettext with modifications.
26617
26618 2003-01-28  Bruno Haible  <bruno@clisp.org>
26619
26620         * modules/c-ctype: New module.
26621         * MODULES.html.sh (func_all_modules): Add it.
26622
26623 2003-01-28  Bruno Haible  <bruno@clisp.org>
26624
26625         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
26626         Paul Eggert.
26627         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
26628         Paul Eggert.
26629
26630 2003-01-27  Bruno Haible  <bruno@clisp.org>
26631
26632         * modules/xsetenv: New module.
26633         * MODULES.html.sh (func_all_modules): Add it.
26634
26635 2003-01-27  Bruno Haible  <bruno@clisp.org>
26636
26637         * lib/xsetenv.h: New file, from GNU gettext.
26638         * lib/xsetenv.c: New file, from GNU gettext.
26639
26640 2003-01-23  Jim Meyering  <jim@meyering.net>
26641
26642         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
26643         from working on systems without dirfd (at least Irix and OSF1/Tru64).
26644
26645 2003-01-23  Bruno Haible  <bruno@clisp.org>
26646
26647         * modules/minmax: New module.
26648         * MODULES.html.sh (func_all_modules): Add it.
26649
26650 2003-01-23  Bruno Haible  <bruno@clisp.org>
26651
26652         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
26653         Eggert.
26654
26655 2003-01-22  Bruno Haible  <bruno@clisp.org>
26656
26657         * modules/exit: New module.
26658         * MODULES.html.sh (func_all_modules): Add it.
26659
26660 2003-01-22  Bruno Haible  <bruno@clisp.org>
26661
26662         * lib/exit.h: New file, from GNU gettext.
26663
26664 2003-01-19  Bruno Haible  <bruno@clisp.org>
26665
26666         * gnulib-tool: Recognize option --extract-maintainer.
26667         (func_get_maintainer): New function.
26668         * modules/*: Add Maintainer entry.
26669
26670 2003-01-16  Jim Meyering  <jim@meyering.net>
26671
26672         * m4/regex.m4: The `regex' struct is both input and output.
26673         Initialize it before each use.  Patch by Tim Waugh.
26674
26675 2003-01-16  Bruno Haible  <bruno@clisp.org>
26676
26677         * MODULES.html.sh: Add a table of contents. Add the module name as
26678         leftmost column. Add hyperlinks.
26679
26680 2003-01-15  Bruno Haible  <bruno@clisp.org>
26681
26682         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
26683
26684 2003-01-15  Bruno Haible  <bruno@clisp.org>
26685
26686         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
26687         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
26688         suffix.
26689
26690 2003-01-15  Bruno Haible  <bruno@clisp.org>
26691
26692         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
26693
26694 2003-01-15  Bruno Haible  <bruno@clisp.org>
26695
26696         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
26697         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
26698
26699 2003-01-14  Jim Meyering  <jim@meyering.net>
26700
26701         * lib/same.c (same_name): Tweak a comment.
26702
26703 2003-01-14  Bruno Haible  <bruno@clisp.org>
26704
26705         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
26706         when a string comparison is sufficient.
26707
26708 2003-01-14  Bruno Haible  <bruno@clisp.org>
26709
26710         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
26711         'unsigned int'.
26712
26713 2003-01-14  Bruno Haible  <bruno@clisp.org>
26714
26715         * lib/hash-pjw.c: Add comment about low quality of this function.
26716
26717 2003-01-13  Bruno Haible  <bruno@clisp.org>
26718
26719         * modules/stpcpy: Distribute lib/stpcpy.h.
26720         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
26721
26722 2003-01-13  Bruno Haible  <bruno@clisp.org>
26723
26724         * modules/*: Add a description.
26725         * modules/strpbrk: Fix Makefile.am snippet.
26726         * modules/strtoimax: Fix dependencies.
26727         * modules/strtoumax: Likewise.
26728
26729 2003-01-13  Bruno Haible  <bruno@clisp.org>
26730
26731         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
26732         * modules/alloca (Makefile.am): All object files depend on alloca.h.
26733         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
26734
26735 2003-01-13  Bruno Haible  <bruno@clisp.org>
26736
26737         * gnulib-tool (func_create_testdir): Store config/* files in the main
26738         directory.
26739         * config.rpath: Move to ...
26740         * config/config.rpath: ... here.
26741         * modules/gettext: Contains config/config.rpath, not config.rpath.
26742         * modules/iconv: Likewise.
26743
26744 2003-01-12  Paul Eggert  <eggert@twinsun.com>
26745
26746         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
26747         to avoid collisions with libcurses and libreadline.
26748
26749         * m4/getstr.m4: Remove.
26750         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
26751
26752 2003-01-12  Paul Eggert  <eggert@twinsun.com>
26753
26754         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
26755         to avoid collisions with libcurses and libreadline.
26756
26757         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
26758         * lib/getstr.h, getstr.c: Remove.
26759         * lib/getline.c: Include "getline.h", to check interface.
26760         Move body of old getstr.c here: this defines MIN_CHUNK and
26761         declares getdelim2, which is renamed from getstr.
26762         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
26763
26764         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
26765         All uses changed.
26766         * lib/linebuffer.h: Likewise.
26767         (readline): Remove backward-compatibility macro.
26768
26769 2003-01-12  Paul Eggert  <eggert@twinsun.com>
26770
26771         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
26772         to avoid collisions with libcurses and libreadline.
26773         * getstr: Remove.
26774         * MODULES.html.sh: Remove getstr.
26775         * modules/getline: Depend on unlocked-io, not getstr.
26776
26777 2003-01-12  Jim Meyering  <jim@meyering.net>
26778
26779         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
26780
26781 2003-01-10  Bruno Haible  <bruno@clisp.org>
26782
26783         * modules/alloca: Change Makefile.am requirements. Simplify Include
26784         requirements. Add lib/alloca_.h to file list.
26785
26786 2003-01-10  Bruno Haible  <bruno@clisp.org>
26787
26788         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
26789
26790 2003-01-10  Bruno Haible  <bruno@clisp.org>
26791
26792         * lib/alloca_.h: New file.
26793         * lib/getdate.y: Unconditionally include alloca.h.
26794         * lib/makepath.c: Likewise.
26795         * lib/setenv.c: Likewise.
26796         * lib/userspec.c: Likewise.
26797
26798 2003-01-09  Karl Berry  <karl@gnu.org>
26799
26800         * MODULES.html.sh: include `dirname $0` in PATH, to find
26801         gnulib-tool.
26802
26803 2003-01-09  Bruno Haible  <bruno@clisp.org>
26804
26805         * modules/stdbool: Change configure.ac, Makefile.am requirements.
26806         Simplify Include requirements. Add lib/stdbool.h.in to file list.
26807
26808 2003-01-09  Bruno Haible  <bruno@clisp.org>
26809
26810         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
26811
26812 2003-01-09  Bruno Haible  <bruno@clisp.org>
26813
26814         * lib/stdbool.h.in: New file.
26815
26816 2003-01-09  Bruno Haible  <bruno@clisp.org>
26817
26818         * gnulib-tool (func_all_modules): Ignore files ending in ~.
26819         * MODULES.html.sh: Likewise.
26820
26821 2003-01-08  Jim Meyering  <jim@meyering.net>
26822
26823         * lib/full-write.c: Undefine and define-away `const' after inclusion
26824         of errno.h, not before.  Suggestion from Bruno Haible.
26825
26826 2003-01-08  Bruno Haible  <bruno@clisp.org>
26827
26828         * modules/full-read: Depend on full-write.
26829
26830 2003-01-08  Bruno Haible  <bruno@clisp.org>
26831
26832         * lib/safe-read.c: Include specification header first, to ensure its
26833         selfcontainedness.
26834         * lib/full-write.c: Likewise.
26835
26836 2003-01-07  Jim Meyering  <jim@meyering.net>
26837
26838         * lib/full-write.c: Rework so that it may serve to define full_read,
26839         too.
26840         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
26841
26842 2003-01-07  Bruno Haible  <bruno@clisp.org>
26843
26844         * lib/strtoimax.c: Include <stdint.h> as an alternative to
26845         <inttypes.h>.
26846         * lib/xstrtol.h: Likewise.
26847         * lib/xstrtoimax.c: Likewise.
26848         * lib/xstrtoumax.c: Likewise.
26849         * lib/human.h: Likewise.
26850
26851         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
26852         on systems that have <inttypes.h> but not <stdint.h>.
26853
26854 2003-01-07  Bruno Haible  <bruno@clisp.org>
26855
26856         * MODULES.html.sh: Add copyright notice.
26857         (missed_files): Omit CVS directory entries.
26858         (func_module): Make it work with sed-3.02.
26859         * MODULES.txt: Remove file.
26860
26861 2003-01-06  Jim Meyering  <jim@meyering.net>
26862
26863         * lib/version-etc.c: Update year in translatable copyright string.
26864
26865 2003-01-03  Karl Berry  <karl@gnu.org>
26866
26867         * config/config.{guess,sub}: update from prep.
26868
26869 2003-01-02  Karl Berry  <karl@gnu.org>
26870
26871         * doc/COPYING.DOC: belatedly updated to 1.2.
26872
26873 2003-01-01  Karl Berry  <karl@gnu.org>
26874
26875         * gnulib-tool (func_verify_module): report module name $module in
26876         error message, not $1.
26877         * gnulib-tool (create-testdir): don't complain if destdir couldn't
26878         be created, only if it doesn't exist.
26879         * gnulib-tool (last_checkin_date): don't expand the $Date here.
26880
26881 2002-12-31  Paul Eggert  <eggert@twinsun.com>
26882
26883         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
26884
26885 2002-12-31  Paul Eggert  <eggert@twinsun.com>
26886
26887         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
26888         memcmp if strcoll doesn't work.
26889
26890 2002-12-31  Bruno Haible  <bruno@clisp.org>
26891
26892         * lib/utime.c (utime_null): No need to call ftruncate if the file was
26893         nonempty.
26894
26895 2002-12-31  Bruno Haible  <bruno@clisp.org>
26896
26897         * lib/memcoll.c (STRCOLL): New macro.
26898         (memcoll): Use it.
26899
26900 2002-12-31  Bruno Haible  <bruno@clisp.org>
26901
26902         * lib/localcharset.h: New file.
26903         * lib/localcharset.c: Include it.
26904         * lib/unicodeio.c: Likewise.
26905
26906 2002-12-31  Bruno Haible  <bruno@clisp.org>
26907
26908         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
26909         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
26910
26911 2002-12-31  Bruno Haible  <bruno@clisp.org>
26912
26913         * lib/getline.h: Include <stddef.h>, for size_t.
26914
26915         * lib/unicodeio.h: Include <stddef.h>, for size_t.
26916         * lib/unicodeio.c: Don't include <stddef.h>.
26917
26918 2002-12-31  Bruno Haible  <bruno@clisp.org>
26919
26920         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
26921         HAVE_TM_ZONE.
26922
26923 2002-12-24  Karl Berry  <karl@gnu.org>
26924
26925         * config/config.guess: update from prep.
26926
26927 2002-12-24  Bruno Haible  <bruno@clisp.org>
26928
26929         General infrasructure.
26930         * m4/README: Rewritten.
26931         * m4/onceonly.m4: New file.
26932         * m4/onceonly_2_57.m4: New file.
26933
26934         Module atexit.
26935         * m4/atexit.m4: New file.
26936
26937         Module strtod.
26938         * m4/strtod.m4: New file.
26939
26940         Module strtol.
26941         * m4/strtol.m4: New file.
26942
26943         Module strtoul.
26944         * m4/strtoul.m4: New file.
26945
26946         Module memchr.
26947         * m4/memchr.m4: New file.
26948
26949         Module memcmp.
26950         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
26951         (jm_FUNC_MEMCMP): Invoke it.
26952
26953         Module memcpy.
26954         * m4/memcpy.m4: New file.
26955
26956         Module memmove.
26957         * m4/memmove.m4: New file.
26958
26959         Module memset.
26960         * m4/memset.m4: New file.
26961
26962         Module strcspn.
26963         * m4/strcspn.m4: New file.
26964
26965         Module strpbrk.
26966         * m4/strpbrk.m4: New file.
26967
26968         Module strstr.
26969         * m4/strstr.m4: New file.
26970
26971         Module strerror.
26972         * m4/strerror.m4: New file.
26973
26974         Module mktime.
26975         * m4/mktime.m4: Renamed from jm-mktime.m4.
26976         (gl_PREREQ_MKTIME): New macro.
26977         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
26978
26979         Module malloc.
26980         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
26981         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
26982         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
26983
26984         Module realloc.
26985         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
26986         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
26987         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
26988
26989         Module strftime.
26990         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
26991         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
26992         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
26993         gl_TM_GMTOFF.
26994         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
26995
26996         Module xalloc.
26997         * m4/xalloc.m4: New file.
26998
26999         Module alloca.
27000         * m4/alloca.m4: New file.
27001
27002         Module putenv.
27003         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
27004         (jm_FUNC_PUTENV): Invoke it.
27005
27006         Module setenv.
27007         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
27008         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
27009         when invoked twice.
27010         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
27011         gt_FUNC_SETENV.
27012
27013         Module memrchr.
27014         * m4/memrchr.m4: New file.
27015
27016         Module stpcpy.
27017         * m4/stpcpy.m4: New file.
27018
27019         Module strcase.
27020         * m4/strcase.m4: New file.
27021
27022         Module strdup.
27023         * m4/strdup.m4: New file.
27024
27025         Module strnlen.
27026         * m4/strnlen.m4: New file.
27027
27028         Module strndup.
27029         * m4/strndup.m4: New file.
27030
27031         Module xstrtod.
27032         * m4/xstrtod.m4: New file.
27033
27034         Module xstrtol.
27035         * m4/xstrtol.m4: New file.
27036
27037         Module getdate.
27038         * m4/getdate.m4: New file.
27039
27040         Module unlocked-io.
27041         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
27042         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
27043         * m4/jm-glibc-io.m4n: Remove file.
27044
27045         Module long-options.
27046         * m4/long-options.m4: New file.
27047
27048         Module md5.
27049         * m4/md5.m4: New file.
27050
27051         Module sha.
27052         * m4/sha.m4: New file.
27053
27054         Module getstr.
27055         * m4/getstr.m4: New file.
27056
27057         Module getline.
27058         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
27059         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
27060         <sys/types.h>, for size_t. Use the function name gnu_getline, not
27061         simply getline. Infoke gl_PREREQ_GETLINE.
27062
27063         Module obstack.
27064         * m4/obstack.m4: New file.
27065
27066         Module hash.
27067         * m4/hash.m4: New file.
27068
27069         Module readtokens.
27070         * m4/readtokens.m4: New file.
27071
27072         Module strverscmp.
27073         * m4/strverscmp.m4: New file.
27074
27075         Module stdbool.
27076         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
27077         OSF/1.
27078
27079         Module strtoll.
27080         * m4/strtoll.m4: New file.
27081
27082         Module strtoull.
27083         * m4/strtoull.m4: New file.
27084
27085         Module strtoimax.
27086         * m4/strtoimax.m4: New file.
27087
27088         Module strtoumax.
27089         * m4/strtoumax.m4: New file.
27090
27091         Module xstrtoimax.
27092         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
27093         jm_AC_PREREQ_XSTRTOIMAX.
27094         Moved the strtol prerequisites to strtol.m4.
27095         Moved the strtoll prerequisites to strtoll.m4.
27096         Moved the strtoimax prerequisites to strtoimax.m4.
27097
27098         Module xstrtoumax.
27099         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
27100         jm_AC_PREREQ_XSTRTOUMAX.
27101         Moved the strtoul prerequisites to strtoul.m4.
27102         Moved the strtoull prerequisites to strtoull.m4.
27103         Moved the strtoumax prerequisites to strtoumax.m4.
27104
27105         Module chown.
27106         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
27107         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
27108
27109         Module dup2.
27110         * m4/dup2.m4: New file.
27111
27112         Module ftruncate.
27113         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
27114         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
27115
27116         Module getgroups.
27117         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
27118         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
27119
27120         Module gettimeofday.
27121         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
27122         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
27123         gl_PREREQ_GETTIMEOFDAY.
27124
27125         Module mkdir.
27126         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
27127         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
27128
27129         Module mkstemp.
27130         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
27131         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
27132         jm_AC_TYPE_UINTMAX_T.
27133         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
27134
27135         Module stat.
27136         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
27137         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
27138
27139         Module lstat.
27140         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
27141         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
27142
27143         Module timespec.
27144         * m4/timespec.m4 (gl_TIMESPEC): New macro.
27145         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
27146         * m4/st_mtim.m4: Indentation.
27147
27148         Module nanosleep.
27149         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
27150         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
27151         gl_PREREQ_NANOSLEEP.
27152
27153         Module regex.
27154         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
27155         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
27156         (gl_REGEX): New macro.
27157
27158         Module rename.
27159         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
27160         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
27161
27162         Module rmdir.
27163         * m4/rmdir.m4: New file.
27164
27165         Module utime.
27166         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
27167         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
27168         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
27169
27170         Module dirname.
27171         * m4/dirname.m4: New file.
27172
27173         Module getopt.
27174         * m4/getopt.m4: New file.
27175
27176         Module unistd-safer.
27177         * m4/unistd-safer.m4: New file.
27178
27179         Module fnmatch.
27180         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
27181         declaration.
27182         (gl_PREREQ_FNMATCH_EXTRA): New macro.
27183         (gl_FUNC_FNMATCH_POSIX): New macro.
27184         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
27185         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
27186         simply fnmatch.
27187
27188         Module exclude.
27189         * m4/exclude.m4: New file.
27190
27191         Module human.
27192         * m4/human.m4: New file.
27193
27194         Module acl.
27195         * m4/acl.m4: Nop.
27196
27197         Module backupfile.
27198         * m4/backupfile.m4: New file.
27199         * m4/d-ino.m4: Indentation.
27200
27201         Module fsusage.
27202         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
27203         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
27204         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
27205
27206         Module dirfd.
27207         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
27208         requirements.
27209
27210         Module euidaccess.
27211         * m4/euidaccess.m4: New file.
27212
27213         Module file-type.
27214         * m4/file-type.m4: New file.
27215
27216         Module fileblocks.
27217         * m4/fileblocks.m4: New file.
27218
27219         Module filemode.
27220         * m4/filemode.m4: New file.
27221
27222         Module isdir.
27223         * m4/isdir.m4: New file.
27224
27225         Module lchown.
27226         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
27227         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
27228
27229         Module makepath.
27230         * m4/makepath.m4: New file.
27231
27232         Module modechange.
27233         * m4/modechange.m4: New file.
27234
27235         Module mountlist.
27236         * m4/mountlist.m4: New file.
27237         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
27238         Indentation.
27239
27240         Module path-concat.
27241         * m4/path-concat.m4: New file.
27242
27243         Module pathmax.
27244         * m4/pathmax.m4: New file.
27245
27246         Module same.
27247         * m4/same.m4: New file.
27248
27249         Module save-cwd.
27250         * m4/save-cwd.m4: New file.
27251
27252         Module savedir.
27253         * m4/savedir.m4: New file.
27254
27255         Module xgetcwd.
27256         * m4/xgetcwd.m4: New file.
27257         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
27258
27259         Module xreadlink.
27260         * m4/xreadlink.m4: New file.
27261
27262         Module safe-read.
27263         * m4/safe-read.m4: New file.
27264
27265         Module safe-write.
27266         * m4/safe-write.m4: New file.
27267
27268         Module closeout.
27269         * m4/closeout.m4: New file.
27270
27271         Module stdio-safer.
27272         * m4/stdio-safer.m4: New file.
27273
27274         Module getpass.
27275         * m4/getpass.m4: New file.
27276
27277         Module getugroups.
27278         * m4/getugroups.m4: New file.
27279
27280         Module group-member.
27281         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
27282         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
27283
27284         Module idcache.
27285         * m4/idcache.m4: New file.
27286
27287         Module userspec.
27288         * m4/userspec.m4: New file.
27289
27290         Module gettime.
27291         * m4/clock_time.m4: New file.
27292         * m4/gettime.m4: New file.
27293
27294         Module settime.
27295         * m4/settime.m4: New file.
27296
27297         Module posixtm.
27298         * m4/posixtm.m4: New file.
27299
27300         Module gethostname.
27301         * m4/gethostname.m4: New file.
27302
27303         Module canon-host.
27304         * m4/canon-host.m4: New file.
27305
27306         Module gettext.
27307         * m4/codeset.m4: New file, from gettext-0.11.5.
27308         * m4/gettext.m4: New file, from gettext-0.11.5.
27309         * m4/glibc21.m4: New file, from gettext-0.11.5.
27310         * m4/iconv.m4: New file, from gettext-0.11.5.
27311         * m4/intdiv0.m4: New file, from gettext-0.11.5.
27312         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
27313         * m4/inttypes.m4: New file, from gettext-0.11.5.
27314         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
27315         * m4/isc-posix.m4: New file, from gettext-0.11.5.
27316         * m4/lcmessage.m4: New file, from gettext-0.11.5.
27317         * m4/lib-ld.m4: New file, from gettext-0.11.5.
27318         * m4/lib-link.m4: New file, from gettext-0.11.5.
27319         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
27320         * m4/progtest.m4: New file, from gettext-0.11.5.
27321         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
27322         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
27323         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
27324
27325         Module localcharset.
27326         * m4/localcharset.m4: New file.
27327
27328         Module hard-locale.
27329         * m4/hard-locale.m4: New file.
27330
27331         Module mbswidth.
27332         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
27333         onceonly macros.
27334         * m4/mbrtowc.m4: Add comment.
27335
27336         Module memcasecmp.
27337         * m4/memcasecmp.m4: New file.
27338
27339         Module memcoll.
27340         * m4/memcoll.m4: New file.
27341
27342         Module unicodeio.
27343         * m4/unicodeio.m4: New file.
27344
27345         Module rpmatch.
27346         * m4/rpmatch.m4: New file.
27347
27348         Module yesno.
27349         * m4/yesno.m4: New file.
27350
27351         Module exitfail.
27352         * m4/exitfail.m4: New file.
27353
27354         Module c-stack.
27355         * m4/c-stack.m4 (gl_C_STACK): New macro.
27356         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
27357
27358         Module error.
27359         * m4/error.m4 (gl_ERROR): New macro.
27360         (jm_PREREQ_ERROR): Use onceonly macros.
27361
27362         Module fatal.
27363         * m4/fatal.m4: New file.
27364
27365         Module getloadavg.
27366         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
27367         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
27368
27369         Module getpagesize.
27370         * m4/getpagesize.m4: New file.
27371
27372         Module getusershell.
27373         * m4/getusershell.m4: New file.
27374
27375         Module physmem.
27376         * m4/physmem.m4: New file.
27377
27378         Module posixver.
27379         * m4/posixver.m4: New file.
27380
27381         Module quotearg.
27382         * m4/quotearg.m4: New file.
27383
27384         Module quote.
27385         * m4/quote.m4: New file.
27386
27387         Module readutmp.
27388         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
27389
27390         Module sig2str.
27391         * m4/sig2str.m4: New file.
27392
27393         Other.
27394         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
27395         ulonglong.m4.
27396         * m4/intmax_t.m4: New file.
27397         * m4/d-type.m4: Indentation.
27398         * m4/jm-macros.m4: Update.
27399         * m4/prereq.m4 (jm_PREREQ): Update.
27400         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
27401         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
27402         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
27403         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
27404         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
27405         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
27406         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
27407         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
27408         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
27409         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
27410         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
27411         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
27412         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
27413         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
27414         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
27415         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
27416         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
27417         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
27418         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
27419
27420 2002-12-24  Bruno Haible  <bruno@clisp.org>
27421
27422         * MODULES.txt: Update according to m4/ changes.
27423
27424         Module gettext.
27425         * config.rpath: New file, from gettext-0.11.5.
27426
27427         * modules/*: New module descriptions.
27428         * gnulib-tool: New file.
27429         * MODULES.html.sh: New file.
27430
27431 2002-12-21  Karl Berry  <karl@gnu.org>
27432
27433         * doc/fdl.texi: update to version 1.2.
27434
27435 2002-12-19  Karl Berry  <karl@gnu.org>
27436
27437         * config/config.guess: update from prep.
27438
27439 2002-12-18  Bruno Haible  <bruno@clisp.org>
27440
27441         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
27442         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
27443
27444 2002-12-17  Bruno Haible  <bruno@clisp.org>
27445
27446         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
27447         stdlib.h, string.h.
27448
27449 2002-12-17  Bruno Haible  <bruno@clisp.org>
27450
27451         * lib/canon-host.c (strdup): Remove unused declaration.
27452
27453         * lib/fsusage.c: Include full_read.h.
27454         (get_fs_usage): Use full_read instead of safe_read.
27455
27456         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
27457
27458 2002-12-12  Karl Berry  <karl@gnu.org>
27459
27460         * config/config.guess: update from prep.
27461
27462 2002-12-11  Bruno Haible  <bruno@clisp.org>
27463
27464         * m4/setenv.m4: New file, from gettext-0.11.5.
27465
27466 2002-12-11  Bruno Haible  <bruno@clisp.org>
27467
27468         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
27469         not unsetenv().
27470         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
27471         modifications:
27472
27473         2002-12-11  Bruno Haible  <bruno@clisp.org>
27474
27475                 * setenv.c (alloca): Fall back to malloc.
27476                 (freea): New macro.
27477                 (setenv): Use freea() to free memory allocated with alloca().
27478
27479         2002-11-13  Bruno Haible  <bruno@clisp.org>
27480
27481                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
27482                 function declarations.
27483                 * unsetenv.c (unsetenv): Likewise.
27484
27485         2002-03-04  Bruno Haible  <bruno@clisp.org>
27486
27487                 Portability to AIX 4.3.3.
27488                 * unsetenv.c: New file, extracted from setenv.c.
27489                 * setenv.c: Move the unsetenv() function to unsetenv.c.
27490
27491         2001-12-20  Bruno Haible  <bruno@clisp.org>
27492
27493                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
27494                 use malloc instead. For SunOS 4.
27495
27496         2001-12-11  Bruno Haible  <bruno@clisp.org>
27497
27498                 * setenv.c: Declare alloca.
27499                 (compar_fn_t): New typedef.
27500                 (KNOWN_VALUE, STORE_VALUE): Use it.
27501
27502         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
27503         setenv.h.
27504
27505 2002-12-10  Paul Eggert  <eggert@twinsun.com>
27506
27507         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
27508         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
27509         Choose values that are less likely to collide with system fnmatch
27510         options.
27511         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
27512         defined (e.g., a pure POSIX system).
27513         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
27514         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
27515
27516 2002-12-06  Paul Eggert  <eggert@twinsun.com>
27517
27518         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
27519         a pain in practice to deal with generated m4 files.  This change
27520         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
27521
27522         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
27523         and jm-glibc-io.m4, as they are no longer a special case.
27524         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
27525         kludge and the auto-generation stuff.  Check only whether the
27526         functions are declared, not whether they exist, since older hosts
27527         that don't declare the functions can't use the optimization anyway.
27528
27529 2002-12-06  Jim Meyering  <jim@meyering.net>
27530
27531         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
27532
27533         Merge in changes from libc's misc/error.c, in preparation
27534         for the merge of gnulib's changes back into libc.
27535
27536         * lib/error.c (_): Define only if not already defined.
27537         Move definition to follow all #include directives.
27538         Include unlocked-io.h only if !_LIBC.
27539         [_LIBC]: Include <libio/libioP.h>.
27540         [USE_IN_LIBIO]: Include <libio/iolibio.h>
27541         (fflush): Tweak definition to use INTUSE.
27542         (putc): Define.
27543
27544 2002-12-05  Paul Eggert  <eggert@twinsun.com>
27545
27546         * lib/alloca.c [defined emacs]: Include "lisp.h".
27547         (xalloc_die) [defined emacs]: New macro.
27548         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
27549         [! defined emacs]: Include <xalloc.h>.
27550         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
27551         (pointer): Typedef to POINTER_TYPE *.
27552         (malloc): Remove decl; we now always use xmalloc.
27553         (alloca): Use old-style definition, since Emacs needs this.
27554         Check for arithmetic overflow when computing combined size.
27555
27556 2002-12-04  Paul Eggert  <eggert@twinsun.com>
27557
27558         Do not generate unlocked-io.h automatically, since it's easier to
27559         maintain it by hand.
27560
27561         * lib/unlocked-io.h: New file, from GNU diffutils,
27562         but with proper copyright notice and attribution.
27563         * lib/gen-uio: Remove.
27564         * lib/Makefile.am: Add copyright notice.
27565         (libfetish_a_SOURCES): Add unlocked-io.h.
27566         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
27567         (DISTCLEANFILES, io_functions): Remove macros.
27568         (EXTRA_DIST): Remove gen_uio.
27569         (unlocked-io.h): Remove rule.
27570
27571 2002-12-04  Jim Meyering  <jim@meyering.net>
27572
27573         Reflect the fact that stat.c and lstat.c are no longer generated.
27574         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
27575         (DISTCLEANFILES): Likewise.
27576         (EXTRA_DIST): Likewise.
27577         (all_local): Don't depend on stat.c or lstat.c.
27578         (stat.c, lstat.c): Remove rules.
27579         (EXTRA_DIST): Remove xstat.in.
27580
27581         * lib/xstat.in: Remove file.  Contents moved into stat.c.
27582         * lib/stat.c: New file.  Contents mostly from xstat.in.
27583         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
27584         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
27585
27586         * lib/safe-read.c: Rework so that it may serve to define safe_write,
27587         too.
27588         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
27589
27590 2002-12-03  Jim Meyering  <jim@meyering.net>
27591
27592         * lib/safe-read.c, safe-write.c: Change variable names and comments,
27593         but not semantics, to minimize the differences between these two files.
27594         (safe_read): Change comment to mention SAFE_READ_ERROR.
27595
27596         * lib/safe-read.c (IS_EINTR): Define.
27597         (safe_read): Use IS_EINTR in place of in-function cpp directives.
27598
27599 2002-12-02  Jim Meyering  <jim@meyering.net>
27600
27601         * lib/safe-read.c (EINTR): Define.
27602         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
27603         (INT_MAX): Provide fallback.
27604         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
27605
27606         * lib/safe-read.h (SAFE_READ_ERROR): Define.
27607
27608 2002-12-02  Bruno Haible  <bruno@clisp.org>
27609
27610         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
27611         Define, taken from safe-read.c.
27612         (INT_MAX): Provide fallback.
27613         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
27614         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
27615
27616         * lib/safe-read.c (EINTR): Remove definition.
27617         (safe_read): Don't use EINTR if it is absent.
27618
27619 2002-12-01  Jim Meyering  <jim@meyering.net>
27620
27621         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
27622         zero.
27623         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
27624
27625 2002-11-27  Paul Eggert  <eggert@twinsun.com>
27626
27627         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
27628         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
27629         with `if (! (value < limit)) abort ();', for readability.
27630
27631 2002-11-26  Karl Berry  <karl@gnu.org>
27632
27633         * lib/strdup.c: copy from libc again, with jim's ok.
27634         * lib/.cppi-disable: re-add strdup.c
27635
27636 2002-11-25  Karl Berry  <karl@gnu.org>
27637
27638         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
27639         instead of "strtol.c".
27640
27641 2002-11-25  Karl Berry  <karl@gnu.org>
27642
27643         * config/install-sh: update from automake for variable quoting, $0 in
27644         error msgs, etc.
27645
27646         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
27647         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
27648         entry.
27649
27650 2002-11-25  Jim Meyering  <jim@meyering.net>
27651
27652         * lib/mktime.c: Sync from libc, now that it has the latest fix.
27653
27654 2002-11-24  Karl Berry  <karl@gnu.org>
27655
27656         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
27657         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
27658
27659 2002-11-24  Jim Meyering  <jim@meyering.net>
27660
27661         Update from coreutils:
27662
27663         * lib/mktime.c: Merge in changes from libc.
27664
27665         Avoid a link-time failure on some Linux systems.
27666         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
27667         (otherwise).
27668         (__mon_yday): Declare with the STATIC attribute.
27669         (__mktime_internal): Likewise.
27670         Based on a report from Greg Schafer.
27671
27672 2002-11-23  Jim Meyering  <jim@meyering.net>
27673
27674         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
27675         Use `unsigned', not `int', as type of index.
27676
27677         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
27678
27679         * lib/fsusage.c: Remove unneeded parentheses around operands of
27680         `defined'.
27681
27682 2002-11-22  Paul Eggert  <eggert@twinsun.com>
27683
27684         * lib/quotearg.h: Allow multiple inclusion by surrounding with
27685         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
27686         so that we can be included first.
27687         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
27688         * lib/quotearg.c: Include quotearg.h immediately after config.h.
27689         No need to include stddef.h or sys/types.h any more.
27690         Surround local include files with "", not "<>".
27691         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
27692         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
27693         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
27694         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
27695         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
27696         (ISPRINT): Remove; no longer needed now that we assume C89.
27697
27698         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
27699         Preserve errno.
27700
27701         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
27702         quotearg_char): Use SIZE_MAX rather than
27703         (size_t) -1 when we are talking about "infinity".
27704
27705         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
27706
27707 2002-11-22  Paul Eggert  <eggert@twinsun.com>
27708
27709         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
27710         hint that one should use `if (! x) abort ();' rather than `assert
27711         (x);', and anyway it's one less thing to worry about configuring.
27712         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
27713         hash_rehash, hash_insert): Use abort rather than assert.
27714
27715 2002-11-22  Bruno Haible  <bruno@clisp.org>
27716
27717         * lib/safe-read.h: Assume C89. Add comments.
27718         (safe_read): Change return type to size_t.
27719         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
27720         byte counts > SSIZE_MAX correctly.
27721         * lib/safe-write.h: New file.
27722         * lib/safe-write.c: New file.
27723         * lib/full-read.h: New file.
27724         * lib/full-read.c: New file.
27725         * lib/full-write.h: Assume C89. Add comments.
27726         * lib/full-write.c: Include safe-write.h.
27727         (full_write): Rewritten to use safe_write.
27728         Suggested by Jim Meyering and Paul Eggert.
27729
27730 2002-11-21  Jim Meyering  <jim@meyering.net>
27731
27732         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
27733
27734         Merge in changes from the coreutils.
27735
27736         2002-09-25  Paul Eggert  <eggert@twinsun.com>
27737         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
27738         <stdint.h>.
27739         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
27740         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
27741         int.  Work more efficiently if X is the same width as uintmax_t.
27742         Do not compare X to -1, to avoid bogus compiler warning.
27743         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
27744         Don't assume that f_frsize and f_bsize are the same type.
27745
27746         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
27747         warning on FreeBSD.
27748
27749         * lib/makepath.c (make_path): Restore umask *before* creating the final
27750         component.
27751         (make_path): Minor reformatting.
27752
27753         * lib/xmalloc.c: Adjust to work with new autoconf macros,
27754         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
27755         HAVE_MALLOC/HAVE_REALLOC.
27756
27757         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
27758         dummy ones.  At least on GNU/Linux systems, `auto' means something
27759         else.
27760         From Michael Stone.
27761
27762 2002-11-21  Bruno Haible  <bruno@clisp.org>
27763
27764         Remove case insensitive option matching.
27765         * lib/argmatch.h (argcasematch): Remove declaration.
27766         (ARGCASEMATCH): Remove macro.
27767         (__xargmatch_internal): Remove case_sensitive argument.
27768         (XARGMATCH): Update.
27769         (XARGCASEMATCH): Remove macro.
27770         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
27771         case_sensitive argument.
27772         (argcasematch): Remove function.
27773         (__xargmatch_internal): Remove case_sensitive argument.
27774         (main): Use XARGMATCH instead of XARGCASEMATCH.
27775
27776         * lib/xmalloc.c: Change compile-time error message. Add comment about
27777         required autoconf version.
27778
27779 2002-11-20  Paul Eggert  <eggert@twinsun.com>
27780
27781         Merge argmatch cleanups from Bison.  Assume C89.
27782
27783         * lib/argmatch.c: Include config.h here, not in argmatch.h.
27784         Include stdlib.h, for EXIT_FAILURE.
27785         Always include <string.h>, since we assume C89.
27786         (EXIT_FAILURE): Remove pre-C89 bug workaround.
27787         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
27788         Include <stddef.h> instead, since it's all we need for size_t.
27789         (PARAMS): Remove.  All uses removed.
27790         (ARRAY_CARDINALITY): Do not bother to #undef.
27791         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
27792         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
27793         Remove unnecessary parentheses.
27794         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
27795         Insert necessary parentheses.
27796         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
27797         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
27798
27799 2002-11-19  Bruno Haible  <bruno@clisp.org>
27800
27801         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
27802         * lib/mbswidth.h: Include <stddef.h>, for size_t.
27803
27804         * lib/mbswidth.h (PARAMS): Remove macro.
27805         (mbswidth, mbsnwidth): Use ANSI C function declarations.
27806         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
27807
27808         * lib/gcd.h (PARAMS): Remove macro.
27809         (gcd): Use ANSI C function declarations.
27810         * lib/gcd.c (gcd): Likewise.
27811
27812 2002-11-15  Bruno Haible  <bruno@clisp.org>
27813
27814         * lib/strcspn.c: Include <stddef.h>.
27815         (strcspn): Use ANSI C function declaration. Change return type to
27816         size_t. Use NULL.
27817         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
27818         (strpbrk): Use NULL.
27819         * lib/strpbrk.h (PARAMS): Remove macro.
27820         (strpbrk): Use ANSI C function declaration.
27821         * lib/strstr.c: Don't include <sys/types.h>.
27822         * lib/strstr.h (PARAMS): Remove macro.
27823         (strstr): Use ANSI C function declarations.
27824
27825 2002-11-14  Karl Berry  <karl@gnu.org>
27826
27827         * config/mkinstalldirs: `do' on separate line, instead of
27828         `for var; do'.
27829
27830 2002-11-06  Bruno Haible  <bruno@clisp.org>
27831
27832         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
27833         * lib/gcd.c (gcd): Likewise.
27834
27835 2002-11-05  Bruno Haible  <bruno@clisp.org>
27836
27837         * lib/gcd.h: New file, from gettext-0.11.5.
27838         * lib/gcd.c: New file, from gettext-0.11.5.
27839
27840 2002-11-05  Bruno Haible  <bruno@clisp.org>
27841
27842         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
27843         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
27844         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
27845         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
27846
27847         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
27848         <libintl.h>.
27849         * lib/makepath.c: Include gettext.h instead of <locale.h> and
27850         <libintl.h>.
27851
27852         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
27853         * lib/human.c: Include gettext.h instead of <libintl.h>.
27854         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
27855         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
27856         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
27857         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
27858         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
27859         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
27860         (textdomain): Remove definition.
27861         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
27862
27863         * lib/long-options.c: Remove include of <libintl.h> and definition of
27864         _.
27865         * lib/same.c: Remove include of <libintl.h> and definition of _.
27866
27867 2002-11-04  Owen Taylor  <otaylor@redhat.com>
27868
27869         * lib/config.charset: A few additions for Solaris.
27870
27871 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
27872
27873         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
27874         * lib/localcharset.c (locale_charset): Declare as extern "C".
27875
27876 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
27877
27878         * lib/config.charset: msdos in uk_UA uses CP1125.
27879
27880 2002-11-04  Bruno Haible  <bruno@clisp.org>
27881
27882         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
27883         * lib/strcase.h: New file, from GNU gettext-0.11.5.
27884         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
27885         * lib/strstr.h: New file, from GNU gettext-0.11.5.
27886         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
27887
27888 2002-11-04  Bruno Haible  <bruno@clisp.org>
27889
27890         * lib/localcharset.c (locale_charset): Don't return an empty string.
27891
27892 2002-11-04  Bruno Haible  <bruno@clisp.org>
27893
27894         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
27895         aliases.
27896
27897 2002-11-04  Bruno Haible  <bruno@clisp.org>
27898
27899         * lib/config.charset: Update for newest glibc. Add canonical names
27900         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
27901
27902 2002-11-04  Bruno Haible  <bruno@clisp.org>
27903
27904         * lib/config.charset: Add support for NetBSD.
27905
27906 2002-11-04  Bruno Haible  <bruno@clisp.org>
27907
27908         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
27909
27910 2002-11-01  Bruno Haible  <bruno@clisp.org>
27911
27912         * configure.in: Add AC_CONFIG_AUX_DIR call.
27913         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
27914         test/Makefile.
27915         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
27916
27917 2002-09-28  Karl Berry  <karl@gnu.org>
27918
27919         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
27920         installed automake until the next release, since changes have been
27921         made.
27922
27923 2002-09-25  Karl Berry  <karl@gnu.org>
27924
27925         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
27926         * lib/getopt*: copy from libc/posix.
27927         * lib/gettext.h: copy from gettext.
27928         * lib/.cppi-disable: add strdup.c, gettext.h.
27929
27930 2002-09-25  Karl Berry  <karl@gnu.org>
27931
27932         * config/srclist.txt: enable gettext.h check.
27933         * config/config.{guess,sub}: update from prep.
27934         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
27935                 from automake 1.6.3.
27936         See srclist*.
27937
27938 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
27939
27940         * regex.c (PATFETCH): Remove the translating fetch.
27941         (PATFETCH_RAW): Rename to PATFETCH.
27942         (set_image_of_range): New fun.
27943         (SET_RANGE_TABLE_WORK_AREA): Use it.
27944         (regex_compile): Don't translate the pattern chars so eagerly.
27945         Only do it when inserting an `exactn' bytecode or when handling
27946         a char-range.
27947         (mutually_exclusive_p): Avoid empty statement.
27948
27949 2002-07-06  Jim Meyering  <meyering@lucent.com>
27950
27951         * m4/README: Don't mention Makefile.am.in.
27952         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
27953
27954 2002-07-01  Jim Meyering  <meyering@lucent.com>
27955
27956         * lib/c-stack.c: Include sys/time.h.
27957         From Volker Borchert.
27958
27959 2002-06-26  Paul Eggert  <eggert@twinsun.com>
27960
27961         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
27962
27963 2002-06-26  Paul Eggert  <eggert@twinsun.com>
27964
27965         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
27966         New macro.  Use it uniformly instead of
27967         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
27968         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
27969         reported by Vin Shelton.
27970
27971 2002-06-22  Paul Eggert  <eggert@twinsun.com>
27972
27973         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
27974         Do not assume SA_SIGINFO behavior.
27975         Bug reported by Jim Meyering on NetBSD 1.5.2.
27976
27977 2002-06-22  Jim Meyering  <meyering@lucent.com>
27978
27979         * m4/c-stack.m4: New file, from diffutils-2.8.2.
27980         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
27981
27982         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
27983         now that configure.ac uses AC_GNU_SOURCE.
27984         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
27985         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
27986
27987         Update to latest tools.  Suggestions from Paul Eggert.
27988         * m4/stdbool.m4: New file, from diffutils-2.8.2.
27989         * m4/gnu-source.m4: Update from diffutils-2.8.2.
27990         * m4/fnmatch.m4: Likewise.
27991         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
27992         to AC_HEADER_STDBOOL
27993
27994 2002-06-22  Jim Meyering  <meyering@lucent.com>
27995
27996         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
27997         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
27998
27999 2002-06-22  Jim Meyering  <meyering@lucent.com>
28000
28001         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
28002
28003         * lib/exitfail.c, exitfail.h: Likewise.
28004         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
28005
28006         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
28007         of fnmatch.h.
28008         (EXTRA_DIST): Add fnmatch_loop.c.
28009         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
28010
28011         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
28012         * lib/fnmatch.c: Update from diffutils-2.8.2.
28013         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
28014         * lib/fnmatch.h: Remove file.
28015
28016 2002-06-21  Jim Meyering  <meyering@lucent.com>
28017
28018         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
28019         * m4/mbrtowc.m4: Likewise.
28020
28021         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
28022         * m4/mbswidth.m4: Reflect name change:
28023         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
28024         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
28025
28026         * m4/lib-link.m4: Update from gettext-0.11.2.
28027         * m4/gettext.m4: Likewise.
28028
28029         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
28030         From Alfred M. Szmidt.
28031
28032 2002-06-18  Paul Eggert  <eggert@twinsun.com>
28033
28034         * lib/file-type.h: Report an error if neither S_ISREG nor
28035         S_IFREG is defined, instead of using a test specific to glibc
28036         2.2.  This should be safe, since POSIX requires S_ISREG and
28037         Unix Version 7 had S_IFREG.  We don't need to check for
28038         <sys/types.h> since we don't use any symbols that it defines.
28039
28040 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
28041
28042         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
28043         $@-t, so that each temporary file name is unique and valid in the first
28044         8 characters, for operation under DOS.
28045
28046 2002-06-15  Paul Eggert  <eggert@twinsun.com>
28047
28048         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
28049
28050 2002-06-15  Jim Meyering  <meyering@lucent.com>
28051
28052         Work even with DJGPP 2.03, which lacks support for symlinks.
28053         From Richard Dawe.
28054         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
28055         is defined.
28056         * lib/lchown.c (S_ISLNK): Likewise.
28057
28058 2002-06-15  Jim Meyering  <meyering@lucent.com>
28059
28060         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
28061         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
28062         have been included before this file.
28063
28064 2002-06-14  Jim Meyering  <meyering@lucent.com>
28065
28066         * lib/file-type.h: Use the version from diffutils-2.8.2.
28067         * lib/file-type.c: Likewise.
28068
28069 2002-06-07  Jim Meyering  <meyering@lucent.com>
28070
28071         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
28072         They're needed at least for NetBSD 1.5.2.
28073         ($statxfs_includes): Include those same headers.
28074         ($statxfs_includes): Include sys/vfs.h if available.
28075         ($statxfs_includes): Likewise for sys/statvfs.h.
28076         Check for the following members in both structs statfs and statvfs:
28077         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
28078
28079 2002-06-01  Jim Meyering  <meyering@lucent.com>
28080
28081         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
28082         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
28083
28084 2002-05-28  Jim Meyering  <meyering@lucent.com>
28085
28086         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
28087         Reported by Volker Borchert.
28088
28089 2002-05-27  Jim Meyering  <meyering@lucent.com>
28090
28091         Fix a problem seen only on nonconforming systems whereby ls.c's
28092         use of localtime, and then of gettimeofday would cause trouble:
28093         the localtime call used to initialize rpl_gettimeofday's save
28094         mechanism would clobber ls's current local time information so
28095         that in any long listing the first file would always be listed
28096         with date 1970-01-01.  Analysis by Volker Borchert.
28097
28098         * lib/gettimeofday.c (localtime): Undefine.
28099         (rpl_localtime): New function.
28100
28101 2002-05-27  Jim Meyering  <meyering@lucent.com>
28102
28103         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
28104         localtime.
28105
28106         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
28107         use the replacement function; it wouldn't resolve at link time.
28108         Reported by Volker Borchert.
28109
28110 2002-05-22  Jim Meyering  <meyering@lucent.com>
28111
28112         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
28113         file-type.h.
28114         * lib/file-type.h: New file.
28115         * lib/file-type.c (file_type): New file/function.  Extracted from
28116         diffutils.
28117
28118 2002-04-30  Jim Meyering  <meyering@lucent.com>
28119
28120         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
28121
28122 2002-04-29  Paul Eggert  <eggert@twinsun.com>
28123
28124         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
28125
28126 2002-04-29  Paul Eggert  <eggert@twinsun.com>
28127
28128         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
28129         Do not check for alloca.h (no longer used) or stdbool.h (was never
28130         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
28131
28132 2002-04-29  Paul Eggert  <eggert@twinsun.com>
28133
28134         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
28135
28136 2002-04-29  Jim Meyering  <meyering@lucent.com>
28137
28138         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
28139         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
28140         Use AC_FUNC_STRNLEN here instead.
28141
28142         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
28143         With autoconf-2.53a, it's part of AC_PROG_CC.
28144
28145 2002-04-28  Paul Eggert  <eggert@twinsun.com>
28146
28147         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
28148         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
28149
28150 2002-04-28  Paul Eggert  <eggert@twinsun.com>
28151
28152         * lib/sig2str.h, lib/sig2str.c: New files.
28153         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
28154
28155 2002-04-28  Paul Eggert  <eggert@twinsun.com>
28156
28157         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
28158         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
28159         of 127, since 64 is the largest conceivable number for ancient
28160         nonstandard hosts.
28161         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
28162
28163 2002-04-28  Jim Meyering  <meyering@lucent.com>
28164
28165         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
28166
28167 2002-04-24  Jim Meyering  <meyering@lucent.com>
28168
28169         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
28170         (jm_PREREQ): Use it.
28171
28172         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
28173         mach/mach.h fcntl.h.
28174         Check for this function: setlocale.
28175
28176 2002-04-24  Jim Meyering  <meyering@lucent.com>
28177
28178         * lib/gettext.h: New file, from Gettext.
28179         * lib/Makefile.am (INCLUDES): Remove -I../intl.
28180         (libfetish_a_SOURCES): Add gettext.h.
28181
28182 2002-04-16  Jim Meyering  <meyering@lucent.com>
28183
28184         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
28185         ut_pid, ut_id, ut_exit.
28186
28187 2002-04-16  Jim Meyering  <meyering@lucent.com>
28188
28189         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
28190         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
28191         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
28192
28193 2002-04-12  Jim Meyering  <meyering@lucent.com>
28194
28195         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
28196         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
28197         existence of the getmntinfo function.  Needed for Darwin 5.3.
28198
28199         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
28200         This is necessary at least on Darwin 5.3.
28201
28202         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
28203         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
28204         strnlen.o in the library, and that makes some versions of ranlib
28205         object.
28206
28207 2002-04-12  Jim Meyering  <meyering@lucent.com>
28208
28209         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
28210
28211 2002-04-09  Jim Meyering  <meyering@lucent.com>
28212
28213         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
28214         to be more precise.  Rather than saying we're checking whether the
28215         function `works', say what we're testing.
28216         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
28217         Reported by Bruno Haible.
28218
28219 2002-03-10  Jim Meyering  <meyering@lucent.com>
28220
28221         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
28222         Suggestion from Santiago Vila.
28223
28224 2002-03-08  Jim Meyering  <meyering@lucent.com>
28225
28226         * lib/rename.c: Mention that this wrapper is needed also on
28227         mips-dec-ultrix4.4 systems.
28228
28229 2002-03-02  Jim Meyering  <meyering@lucent.com>
28230
28231         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
28232         not HAVE_CLOCK_SETTIME.
28233
28234 2002-02-27  Paul Eggert  <eggert@twinsun.com>
28235
28236         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
28237         Check for clock_settime.
28238
28239 2002-02-27  Paul Eggert  <eggert@twinsun.com>
28240
28241         * lib/nanosleep.h: Rename to....
28242         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
28243
28244         * lib/gettime.c: New file.
28245         * lib/settime.c: New file.
28246         * lib/stime.c: Remove.
28247
28248         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
28249         timespec.h.  Remove nanosleep.h.
28250
28251 2002-02-25  Paul Eggert  <eggert@twinsun.com>
28252
28253         * m4/acl.m4: New file.
28254         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
28255         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
28256
28257 2002-02-25  Paul Eggert  <eggert@twinsun.com>
28258
28259         * lib/acl.c, lib/acl.h: New files.
28260         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
28261
28262 2002-02-24  Jim Meyering  <meyering@lucent.com>
28263
28264         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
28265         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
28266         cause trouble.  Reported by Nelson Beebe.
28267
28268 2002-02-23  Paul Eggert  <eggert@twinsun.com>
28269
28270         * lib/path-concat.c (xpath_concat): Reorder code to pacify
28271         compilers that don't know that xalloc_die never returns.
28272
28273 2002-02-20  Jim Meyering  <meyering@lucent.com>
28274
28275         * lib/getdate.c: Regenerate using bison-1.33.
28276
28277 2002-02-17  Jim Meyering  <meyering@lucent.com>
28278
28279         * config/config.guess (main): Don't use `head -1'; it's no longer
28280         portable. Use `sed 1q' instead.
28281
28282 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
28283
28284         * m4/codeset.m4: Upgrade to gettext-0.11.
28285         * m4/gettext.m4: Upgrade to gettext-0.11.
28286         * m4/glibc21.m4: Upgrade to gettext-0.11.
28287         * m4/iconv.m4: Upgrade to gettext-0.11.
28288         * m4/isc-posix.m4: Upgrade to gettext-0.11.
28289         * m4/lcmessage.m4: Upgrade to gettext-0.11.
28290         * m4/lib-ld.m4: New file, from gettext-0.11.
28291         * m4/lib-link.m4: New file, from gettext-0.11.
28292         * m4/lib-prefix.m4: New file, from gettext-0.11.
28293         * m4/progtest.m4: Upgrade to gettext-0.11.
28294
28295 2002-02-15  Paul Eggert  <eggert@twinsun.com>
28296
28297         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
28298         (jm_PREREQ): Use it.
28299
28300 2002-02-15  Paul Eggert  <eggert@twinsun.com>
28301
28302         * lib/posixver.c, lib/posixver.h: New files.
28303         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
28304
28305 2002-02-02  Paul Eggert  <eggert@twinsun.com>
28306             Bruno Haible  <bruno@clisp.org>
28307
28308         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
28309         (fwrite_success_callback): New declaration.
28310         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
28311         print_unicode_char. Call failure callback instead of error.
28312         (fwrite_success_callback): New function.
28313         (exit_failure_callback): New function.
28314         (fallback_failure_callback): New function.
28315         (print_unicode_char): Call unicode_to_mb.
28316
28317 2002-01-26  Jim Meyering  <meyering@lucent.com>
28318
28319         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
28320         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
28321
28322 2002-01-26  Jim Meyering  <meyering@lucent.com>
28323
28324         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
28325
28326 2002-01-22  Paul Eggert  <eggert@twinsun.com>
28327
28328         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
28329
28330 2002-01-22  Jim Meyering  <meyering@lucent.com>
28331
28332         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
28333         Otherwise, some versions of automake would omit the rule that makes
28334         Makefile from Makefile.in.
28335
28336 2002-01-21  Paul Eggert  <eggert@twinsun.com>
28337
28338         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
28339         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
28340         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
28341         (memcoll): Set errno to zero if there is no error.
28342
28343         * lib/quotearg.c (quotearg_buffer_restyled):
28344         Fix bug with quoting buffers containing NUL when backslashing escapes.
28345         This bug was exposed by the other changes in this patch.
28346         (quotearg_n_options): New arg ARGSIZE.
28347         All callers changed.
28348         (quoting_options_from_style): New function.
28349         (quotearg_n_style): Use it.
28350         (quotearg_n_style_mem): New function.
28351
28352         * lib/quotearg.h (quotearg_n_style_mem): New function.
28353
28354 2002-01-19  Jim Meyering  <meyering@lucent.com>
28355
28356         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
28357         Remove useless quotes: DF_PROG="df".
28358         * m4/strnlen.m4: New file.
28359
28360 2002-01-16  Paul Eggert  <eggert@twinsun.com>
28361
28362         * lib/backupfile.c (ISDIGIT): Comment fix.
28363         * lib/getdate.y (ISDIGIT): Likewise.
28364         * lib/posixtm.c (ISDIGIT, year): Likewise.
28365         * lib/strverscmp.c (ISDIGIT): Likewise.
28366         * lib/userspec.c (ISDIGIT): Likewise.
28367
28368 2002-01-16  Jim Meyering  <meyering@lucent.com>
28369
28370         * lib/getdate.y: Add three semicolons, each just before a closing
28371         brace. Bison (as of version 1.31) no longer papers over that mistake.
28372
28373 2002-01-05  Jim Meyering  <meyering@lucent.com>
28374
28375         * lib/version-etc.c (version_etc_copyright): Update copyright year.
28376
28377 2001-12-19  Paul Eggert  <eggert@twinsun.com>
28378
28379         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
28380         not silently exit merely because the output buffer happens to
28381         have nothing pending.
28382
28383 2001-12-18  Paul Eggert  <eggert@twinsun.com>
28384
28385         See the big note in ../ChangeLog.
28386         * lib/human.c (suffixes): Prefer K to k for 1024.
28387         (generate_suffix_backwards): New function.
28388         (human_readable_inexact): Use it.
28389         * lib/xstrtol.c (__xstrtol): If there is no number but there
28390         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
28391         Accept 'K' as well as 'k'.
28392
28393 2001-12-15  Jim Meyering  <meyering@lucent.com>
28394
28395         * lib/regex.h (__restrict_arr): Update from libc.
28396
28397         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
28398         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
28399         (STREQ): Define.
28400
28401 2001-12-14  Jim Meyering  <meyering@lucent.com>
28402
28403         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
28404         Suggestion from Bruno Haible.
28405
28406 2001-12-10  Jim Meyering  <meyering@lucent.com>
28407
28408         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
28409         xrealloc, Instead, include "xalloc.h".
28410         (initbuffer): Don't cast xmalloc return value to char*.
28411         (readline): Reword comment.
28412         Don't cast xrealloc return value to char*
28413         Return NULL, not 0.
28414
28415 2001-12-09  Jim Meyering  <meyering@lucent.com>
28416
28417         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
28418         about `signed and unsigned type in conditional expression'.
28419         * lib/posixtm.c (posix_time_parse): Likewise.
28420
28421         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
28422
28423         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
28424         to avoid a pedantic warning.
28425
28426         * lib/getstr.c: Don't include assert.h.
28427         (getstr): Remove warning-evoking assertions.
28428         Return -1 if offset parameter is out of bounds.
28429         Change the type of a local from int to size_t.
28430
28431         * lib/strftime.c (my_strftime_localtime_r): Include this function
28432         definition in the `#if ! HAVE_TM_GMTOFF' block.
28433
28434         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
28435         Include xalloc.h instead.
28436
28437 2001-12-02  Jim Meyering  <meyering@lucent.com>
28438
28439         * lib/tempname.c: Don't declare getenv, thus reverting the change of
28440         2001-11-18.  It's no longer necessary, now that stdlib.h is always
28441         included.
28442
28443         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
28444         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
28445
28446 2001-11-30  Akim Demaille  <akim@epita.fr>
28447
28448         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
28449         before being defined.
28450
28451 2001-11-27  Paul Eggert  <eggert@twinsun.com>
28452
28453         * lib/quotearg.h (quotearg_n, quotearg_n_style):
28454         First arg is int, not unsigned.
28455         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
28456         (SIZE_MAX, UINT_MAX): New macros.
28457         (quotearg_n_options): Abort if N is negative.
28458         Avoid overflow check on hosts where size_t is 64 bits and int
28459         is 32 bits, as overflow is impossible there.
28460         Fix off-by-one typo that caused unnecessary reallocation.
28461
28462 2001-11-27  Jim Meyering  <meyering@lucent.com>
28463
28464         * lib/tempname.c: Merge with version from libc.
28465         * lib/regex.c: Likewise.
28466
28467         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
28468         systems for which STDC_HEADERS is 0, it was not included, resulting in
28469         a warning about an integer-to-pointer conversion problem with getenv.
28470         Reported by Volker Borchert.
28471
28472 2001-11-26  Jim Meyering  <meyering@lucent.com>
28473
28474         * lib/gtod.h: Remove file.
28475         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
28476         * lib/gettimeofday.c: Don't include gtod.h.
28477         (GTOD_init): Remove function.
28478         (rpl_gettimeofday): Do its job here instead, rather than aborting.
28479         Suggestion from Volker Borchert.
28480
28481 2001-11-23  Jim Meyering  <meyering@lucent.com>
28482
28483         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
28484         it.
28485         * lib/hash.c (struct hash_table): Define it here instead.
28486
28487 2001-11-22  Jim Meyering  <meyering@lucent.com>
28488
28489         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
28490
28491 2001-11-20  Jim Meyering  <meyering@lucent.com>
28492
28493         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
28494         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
28495
28496 2001-11-19  Jim Meyering  <meyering@lucent.com>
28497
28498         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
28499         directory.  Use "conftestXXXXXX" as the template.
28500         Suggestion from Paul Eggert.
28501
28502         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
28503         immediately, so the test doesn't mistakenly hit the max-open-files
28504         limit.
28505
28506 2001-11-18  Paul Eggert  <eggert@twinsun.com>
28507
28508         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
28509         (TEMPORARIES): New macro.
28510         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
28511         removes an artificial limitation (e.g. HP-UX 10.20, where
28512         TMP_MAX is 17576).
28513
28514 2001-11-18  Jim Meyering  <meyering@lucent.com>
28515
28516         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
28517
28518 2001-11-18  Jim Meyering  <meyering@lucent.com>
28519
28520         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
28521         on SunOS 4.
28522
28523         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
28524         files will be created before anything else.
28525
28526 2001-11-17  Paul Eggert  <eggert@twinsun.com>
28527
28528         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
28529         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
28530
28531 2001-11-17  Jim Meyering  <meyering@lucent.com>
28532
28533         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
28534         Prompted by a report from Bob Proulx.
28535
28536         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
28537         Instead, require UTILS_FUNC_MKSTEMP.
28538
28539 2001-11-17  Jim Meyering  <meyering@lucent.com>
28540
28541         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
28542         Now, that's done as part of AC_FUNC_STRTOD.
28543
28544 2001-11-17  Jim Meyering  <meyering@lucent.com>
28545
28546         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
28547         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
28548         rather than group writable.  Patch by Juan F. Codagnone.
28549
28550         * lib/readtokens.c: Remove explicit declarations of xmalloc and
28551         xrealloc, Instead, include "xalloc.h".
28552
28553         * lib/mountlist.c: Include unlocked-io.h after all system headers.
28554         Remove explicit declarations of xmalloc, xrealloc,
28555         and xstrdup.  Instead, include "xalloc.h".
28556
28557         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
28558         unlocked-io.h.
28559         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
28560         Likewise.
28561         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
28562
28563         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
28564         Reported by Padraig Brady.
28565
28566         * lib/mkstemp.c: #undef mkstemp.
28567         Include config.h.
28568         (rpl_mkstemp): Rename from mkstemp.
28569         Protoize.
28570
28571 2001-11-16  Jim Meyering  <meyering@lucent.com>
28572
28573         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
28574         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
28575         determine the amount of total physical memory, use pstat_getstatic.
28576         HPUX-11 doesn't define _SC_PHYS_PAGES.
28577         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
28578         If sysconf couldn't be used to determine the amount of available
28579         physical memory, use both pstat_getstatic and pstat_getdynamic.
28580         Based on a patch from Bob Proulx.
28581
28582 2001-11-10  Jim Meyering  <meyering@lucent.com>
28583
28584         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
28585         (jm_PREREQ): Use it.
28586
28587 2001-11-09  Jim Meyering  <meyering@lucent.com>
28588
28589         * m4/jm-macros.m4: Require autoconf-2.52f.
28590         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
28591         Use these AC_-prefixed names, not the AM_-prefixed ones.
28592
28593         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
28594
28595 2001-11-05  Jim Meyering  <meyering@lucent.com>
28596
28597         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
28598
28599 2001-11-04  Jim Meyering  <meyering@lucent.com>
28600
28601         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
28602         $DEFS.
28603
28604 2001-11-03  Jim Meyering  <meyering@lucent.com>
28605
28606         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
28607         of AC_DEFUN.
28608
28609         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
28610         know the name of the variable in the macro definition.
28611
28612 2001-11-03  Jim Meyering  <meyering@lucent.com>
28613
28614         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
28615         in argmatch_to_argument call.
28616
28617         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
28618         argument.
28619
28620         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
28621         e.g., a fault due to an attempt to free a NULL pointer.
28622
28623 2001-11-01  Jim Meyering  <meyering@lucent.com>
28624
28625         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
28626         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
28627
28628 2001-11-01  Jim Meyering  <meyering@lucent.com>
28629
28630         * lib/dirfd.c, lib/dirfd.h: New files.
28631         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
28632
28633         * lib/hash.c (hash_print) [TESTING]: Clean up.
28634
28635 2001-10-22  Paul Eggert  <eggert@twinsun.com>
28636
28637         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
28638         to avoid a warning if -Wall.
28639
28640 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
28641
28642         * README: New file
28643         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
28644         (per RMS's instructions, this is now the canonical source)
28645         * lgpl/, gpl/: New directories.
28646
28647 2001-10-21  Paul Eggert  <eggert@twinsun.com>
28648
28649         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
28650
28651 2001-10-21  Jim Meyering  <meyering@lucent.com>
28652
28653         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
28654         this code would end up calling gettext even in packages built
28655         with --disable-nls.
28656         * lib/getopt.c (_): Likewise.
28657         * lib/regex.c (_): Likewise.
28658
28659 2001-10-20  Paul Eggert  <eggert@twinsun.com>
28660
28661         * m4/error.m4 (jm_PREREQ_ERROR):
28662         Do not invoke AC_CHECK_FUNCS with strerror_r, as
28663         AC_FUNC_STRERROR_R does that.
28664         Check for strerror declaration.
28665
28666         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
28667         are supposed to have them these days.
28668         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
28669         Merge changes from latest Autoconf CVS.
28670         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
28671         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
28672         POSIX decided to standardize on the int flavor of strerror_r.
28673
28674 2001-10-20  Paul Eggert  <eggert@twinsun.com>
28675
28676         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
28677         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
28678         Use strerror_r that is only a macro, even if it is not a function.
28679         (strerror): Check for HAVE_DECL_STRERROR before declaring.
28680         (private_strerror): Use prototypes, not old-style function definition.
28681         (print_errno_message): New function.
28682         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
28683         char*-flavored one.
28684         (error_tail, error, error_at_line): Use it.
28685
28686 2001-10-11  Jim Meyering  <meyering@lucent.com>
28687
28688         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
28689         and quote_n (1, ... to avoid clobbering a buffer.
28690
28691 2001-10-05  Jim Meyering  <meyering@lucent.com>
28692
28693         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
28694         hash-pjw.h.
28695         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
28696         * lib/hash-pjw.h: New file.
28697
28698 2001-09-30  Jim Meyering  <meyering@lucent.com>
28699
28700         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
28701         `struct fsstat' has the `f_fstypename' member.
28702         Use that to define FS_TYPE, which is now used to make
28703         the getfsstat link test tighter.
28704
28705 2001-09-30  Jim Meyering  <meyering@lucent.com>
28706
28707         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
28708         Include <sys/ucred.h>, for Apple Darwin.
28709         Include sys/mount.h and sys/fs_types.h only if available.
28710         (FS_TYPE): Define.
28711         (read_filesystem_list): Use FS_TYPE.
28712
28713 2001-09-29  Paul Eggert  <eggert@twinsun.com>
28714
28715         * lib/exclude.c (excluded_filename): 0 -> false, since it's
28716         a boolean context.
28717
28718 2001-09-29  Jim Meyering  <meyering@lucent.com>
28719
28720         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
28721         [one-argument getmntent function]): Include stdio.h before mntent.h.
28722         SunOS 4.1.x needs it for the declaration of `FILE'.
28723         Patch by Volker Borchert.
28724
28725         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
28726         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
28727         sys/fs_types.h, and make the link-test for getfsstat guard #include
28728         directives with appropriate #if HAVE_*_H tests so that we can
28729         detect getfsstat on Apple Darwin1.3.7 systems.
28730         Reported by Nelson Beebe.
28731         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
28732
28733 2001-09-28  Paul Eggert  <eggert@twinsun.com>
28734
28735         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
28736         #defines strtoimax.  Also treat the other strto* functions
28737         like strtoimax.
28738
28739         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
28740         Check for strtoul and strtoumax,
28741         as those declarations are made even in the signed case.
28742         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
28743         Likewise, for strtol and strtoimax.
28744
28745 2001-09-28  Paul Eggert  <eggert@twinsun.com>
28746
28747         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
28748         #defines strtoimax.  Also treat the other strto* functions
28749         like strtoimax.
28750
28751         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
28752         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
28753         (strtoimax, strtoumax): Do not declare if already defined as a macro.
28754
28755 2001-09-26  Jim Meyering  <meyering@lucent.com>
28756
28757         Most macros in unlocked-io.h had the wrong number of arguments.
28758         * lib/gen-uio: New script.
28759         (USE_UNLOCKED_IO): Define to 1 if not already defined.
28760         * lib/unlocked-io.hin: Remove file.
28761         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
28762         rather than trying to embed it here.
28763         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
28764         Reported by Padraig Brady.
28765
28766 2001-09-25  Volker Borchert  <bt@teknon.de>
28767
28768         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
28769         `result'.
28770
28771 2001-09-24  Jim Meyering  <meyering@lucent.com>
28772
28773         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
28774
28775 2001-09-23  Jim Meyering  <meyering@lucent.com>
28776
28777         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
28778         instead of the mere test for existence of mntent.h.  The latter
28779         would get a false-positive on AIX 3.4 systems.
28780         In the outer getmntent if-block, don't die if neither of the getmntent
28781         tests succeeds.  Instead, just fall through and continue with the
28782         remaining tests.
28783
28784 2001-09-23  Jim Meyering  <meyering@lucent.com>
28785
28786         * lib/mountlist.c: Remove useless parentheses in #if directives.
28787         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
28788         the deprecated MOUNTED symbol is no longer defined in mntent.h.
28789
28790 2001-09-22  Jim Meyering  <meyering@lucent.com>
28791
28792         * m4/gettext.m4: New file.  From gettext.
28793         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
28794         * m4/progtest.m4: Likewise
28795         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
28796         * m4/glibc21.m4: Likewise.
28797
28798         * m4/libintl.m4: Remove.  No longer used.
28799
28800 2001-09-22  Jim Meyering  <meyering@lucent.com>
28801
28802         * lib/localcharset.c: Update from latest gettext.
28803         * lib/config.charset: Likewise.
28804
28805 2001-09-20  Jim Meyering  <meyering@lucent.com>
28806
28807         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
28808         strtoimax.
28809         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
28810         strtoumax.
28811
28812 2001-09-20  Jim Meyering  <meyering@lucent.com>
28813
28814         * lib/xstrtol.c (strtoimax): Guard declaration with
28815         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
28816         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
28817         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
28818         (strtoumax): Likewise, for completeness (it wasn't necessary).
28819
28820 2001-09-17  Paul Eggert  <eggert@twinsun.com>
28821
28822         * lib/strtoimax.c (HAVE_LONG_LONG):
28823         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
28824         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
28825         to work around bug in IBM C compiler.
28826
28827 2001-09-17  Jim Meyering  <meyering@lucent.com>
28828
28829         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
28830         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
28831         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
28832         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
28833         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
28834         whenever the right hand side need not be expanded by the shell.
28835
28836 2001-09-16  Paul Eggert  <eggert@twinsun.com>
28837
28838         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
28839         library.  It's not correct, as some older glibcs are buggy.
28840         fnmatch wasn't fixed until glibc 2.2.
28841
28842         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
28843         special shell magic here.
28844
28845 2001-09-16  Jim Meyering  <meyering@lucent.com>
28846
28847         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
28848         * m4/jm-macros.m4: Require it.
28849
28850 2001-09-16  Jim Meyering  <meyering@lucent.com>
28851
28852         * lib/mkdir.c: New file.
28853
28854 2001-09-15  Jim Meyering  <meyering@lucent.com>
28855
28856         * m4/jm-macros.m4: Check for help2man.
28857
28858 2001-09-11  Jim Meyering  <meyering@lucent.com>
28859
28860         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
28861         The body, by Paul Eggert, was moved here from configure.in.
28862         * m4/jm-macros.m4: Require UTILS_HOST_OS.
28863
28864 2001-09-04  Paul Eggert  <eggert@twinsun.com>
28865
28866         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
28867         (jm_PREREQ): Use it.
28868
28869 2001-09-04  Paul Eggert  <eggert@twinsun.com>
28870
28871         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
28872         Use ssize_t, not int, to store result of readlink.
28873         Check for ssize_t overflow as well as size_t overflow,
28874         as POSIX says the result of readlink is implementation-defined
28875         when ssize_t overflows.
28876         Remove unnecessary cast to char*.
28877         Use free+malloc instead of realloc, as the storage doesn't need
28878         to be preserved and it's clearer and can be more efficient that way.
28879         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
28880         * lib/xreadlink.h (xreadlink): Update prototype.
28881
28882 2001-09-04  Paul Eggert  <eggert@twinsun.com>
28883
28884         * lib/xgetcwd.c: Revert some of the previous change; intead,
28885         fix the HAVE_GETCWD_NULL code to behave more like the
28886         !HAVE_GETCWD_NULL code used to.
28887
28888         Include "xalloc.h".
28889         (xgetcwd): Do not return NULL when memory is exhausted; instead,
28890         invoke xalloc_die.
28891
28892 2001-09-03  Paul Eggert  <eggert@twinsun.com>
28893
28894         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
28895         sys/param.h, as pathmax.h includes them.
28896
28897 2001-09-03  Paul Eggert  <eggert@twinsun.com>
28898
28899         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
28900         (jm_PREREQ_XGETCWD): New macro.
28901
28902         * m4/getcwd.m4: New file.
28903
28904 2001-09-03  Paul Eggert  <eggert@twinsun.com>
28905
28906         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
28907         like the HAVE_GETCWD_NULL code.
28908         Include pathmax.h if not HAVE_GETCWD.
28909         Do not include xalloc.h.
28910         (INITIAL_BUFFER_SIZE): New symbol.
28911         Do not use xmalloc / xrealloc, since the caller is responsible for
28912         handling errors.  Preserve errno around `free' during failure.
28913         Do not overrun buffer when using getwd.
28914
28915 2001-09-03  Paul Eggert  <eggert@twinsun.com>
28916
28917         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
28918         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
28919         getcwd (NULL, 0).
28920
28921 2001-09-03  Paul Eggert  <eggert@twinsun.com>
28922
28923         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
28924         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
28925         spotted by Jim Meyering.
28926
28927 2001-09-03  Jim Meyering  <meyering@lucent.com>
28928
28929         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
28930         failure.
28931
28932 2001-09-02  Jim Meyering  <meyering@lucent.com>
28933
28934         * lib/error.c: Update from GNU libc.
28935
28936 2001-09-01  Jim Meyering  <meyering@lucent.com>
28937
28938         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
28939         Used by df.
28940
28941 2001-09-01  Jim Meyering  <meyering@lucent.com>
28942
28943         * lib/xreadlink.c: New file.
28944         * lib/xreadlink.h: New file.
28945         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
28946         xreadlink.h.
28947
28948         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
28949         doesn't conflict with sparc Solaris 7's definition in
28950         /usr/include/sys/int_types.h.
28951
28952         * lib/exclude.c: Use `""', not `<>' to #include non-system header
28953         files.
28954         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
28955         and strncasecmp as r-values.  Unixware didn't have declarations.
28956
28957 2001-08-31  Paul Eggert  <eggert@twinsun.com>
28958
28959         * lib/xstrtol.h: Add copyright notice.
28960         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
28961         LONGINT_INVALID_SUFFIX_CHAR.
28962
28963 2001-08-31  Paul Eggert  <eggert@twinsun.com>
28964
28965         * lib/xstrtol.c (strtoimax): New decl.
28966
28967 2001-08-31  Paul Eggert  <eggert@twinsun.com>
28968
28969         * lib/xgetcwd.c: Don't include pathmax.h.
28970         Include stdlib.h and unistd.h if available.
28971         Include xalloc.h.
28972         (xmalloc, xstrdup, free): Remove decls.
28973         (xgetcwd): Don't assume sizes fit in unsigned.
28974         Check for overflow when computing sizes.
28975         Simplify reallocation code.
28976
28977 2001-08-31  Paul Eggert  <eggert@twinsun.com>
28978
28979         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
28980         a directory's st_size can have an arbitrary value, so the old
28981         usage could waste an arbitrary amount of memory.  All uses
28982         changed.
28983         * lib/savedir.h: Update prototype.
28984
28985 2001-08-31  Paul Eggert  <eggert@twinsun.com>
28986
28987         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
28988
28989         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
28990         old strtoimax.c.
28991
28992         Also, make the following further changes to make this file's
28993         configuration more similar to that of strtol.c:
28994         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
28995         (strtoumax, uintmax_t, strtoull, strtol): Remove.
28996         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
28997         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
28998         changed to signed values.
28999
29000         And make the following changes as well:
29001         Fix copyright notice, as 1999 was missing.
29002         (verify): New macro.
29003         (strtoimax): Check sizes at compile-time, not run-time.
29004         Prefer strtol to strtoll if both work.
29005         (main): Remove; it was not that useful and was a pain to maintain.
29006
29007         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
29008
29009 2001-08-31  Jim Meyering  <meyering@lucent.com>
29010
29011         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
29012         Use an initial, malloc'd, buffer of length 128 rather than
29013         a statically allocated one of length 1024.
29014
29015 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29016
29017         Simplify code, partly by assuming autoconf 2.52 semantics.
29018
29019         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
29020
29021         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
29022         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
29023         All uses removed.
29024         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
29025         Move AC_REQUIRE to next-to-top level, to avoid confusion.
29026         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
29027         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
29028         jm_AC_HEADER_INTTYPES_H.
29029         * m4/jm-macros.m4 (jm_MACROS): Likewise.
29030
29031         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
29032
29033         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
29034         Quote first arg of AC_DEFUN.
29035         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
29036         since they are needed to parse the include file even if we need
29037         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
29038         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
29039         but with opposite signedness.
29040
29041 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29042
29043         Merge 'exclude' changes from tar 1.13.22.
29044         This fixes one or two unlikely storage allocation overflow bugs,
29045         but doesn't change user-visible behavior otherwise.
29046
29047 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29048
29049         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
29050         (jm_PREREQ_EXCLUDE): New macro.
29051
29052 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29053
29054         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
29055         tm to be declared.
29056
29057 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29058
29059         * lib/hash.c: Remove '2001' from copyright notice.
29060
29061 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29062
29063         * lib/full-write.h: New file.
29064         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
29065         * lib/full-write.c: Correct credits, as cccp.c no longer
29066         exists and anyway it was so heavily changed from the old cccp
29067         code as to be unrecognizable.  Include full-write.h.
29068         (full_write) Return size_t, with short writes meaning failure.
29069         All callers changed.  This fixes a bug with large buffers
29070         on 64-bit hosts.
29071         * lib/utime.c: Include full-write.h.
29072
29073 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29074
29075         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
29076         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
29077         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
29078         Include if available.
29079         (<xalloc.h>): Include
29080         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
29081         (verify): New macro.  Use it to verify that EXCLUDE macros do not
29082         collide with FNM macros.
29083         (struct patopts): New struct.
29084         (struct exclude): Use it, as exclude patterns now come with options.
29085         (new_exclude): Support above changes.
29086         (new_exclude, add_exclude_file):
29087         Initial size must now be a power of two to simplify overflow checking.
29088         (free_exclude, fnmatch_no_wildcards): New function.
29089         (excluded_filename): No longer requires options arg, as the options
29090         are determined by add_exclude.  Now returns bool, not int.
29091         (excluded_filename, add_exclude):
29092         Add support for the fancy new exclusion options.
29093         (add_exclude, add_exclude_file): Now takes int options arg.
29094         Check for arithmetic overflow when computing sizes.
29095         (add_exclude_file): xrealloc might modify errno, so don't
29096         realloc until after errno might be used.
29097
29098         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
29099         New macros.
29100         (free_exclude): New decl.
29101         (add_exclude, add_exclude_file): Now takes int options arg.
29102         (excluded_filename): No longer requires options arg, as the options
29103         are determined by add_exclude.  Now returns bool, not int.
29104
29105 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29106
29107         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
29108
29109 2001-08-27  Jim Meyering  <meyering@lucent.com>
29110
29111         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
29112
29113         * lib/version-etc.c (N_): Remove definition.
29114         Revert most of last change.
29115         Instead, simply don't mark the `Copyright...' string for translation.
29116         Based on advice from Paul Eggert.
29117
29118         * lib/strtoxmax.c: Tweak comment.
29119
29120 2001-08-26  Jim Meyering  <meyering@lucent.com>
29121
29122         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
29123
29124         * m4/xstrtoimax.m4: New file.
29125         * m4/xstrtoumax.m4: Add comments explaining why we
29126         AC_REPLACE_FUNCS(strtol).
29127
29128 2001-08-26  Jim Meyering  <meyering@lucent.com>
29129
29130         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
29131         of copyright with `%s' so translators don't get an untranslated
29132         message in 2002.
29133         (COPYRIGHT_YEAR): Define.
29134         (version_etc): Use fprintf rather than fputs.
29135         Suggestion from Ulrich Drepper.
29136
29137         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
29138
29139         * lib/strtoll.c: New file, from GNU libc.
29140         * lib/xstrtoimax.c: New file.
29141
29142         * lib/xstrtol.h: Add xstrtoimax.
29143         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
29144         * lib/strtoimax.c: New file.  Likewise, but first define
29145         STRTOUXMAX_SIGNED.
29146
29147         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
29148         ...
29149         * lib/strtoxmax.c: ... then renamed to this.
29150
29151 2001-08-18  Paul Eggert  <eggert@twinsun.com>
29152
29153         * m4/inttypes.m4: Add AC_PREREQ(2.13).
29154         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
29155         (jm_AC_TYPE_INTMAX_T): New macro.
29156         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
29157
29158         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
29159
29160         * m4/longlong.m4: Renamed from ulonglong.m4.
29161         * m4/inttypes.m4: Renamed from inttypes_h.m4.
29162         * m4/uintmax_t.m4: Removed.
29163
29164 2001-08-13  Paul Eggert  <eggert@twinsun.com>
29165
29166         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
29167         Port to Solaris 8, where 'sed' requires a space after the 'r'
29168         command, and where sh dislikes "$/".  Clean up the spacing a bit.
29169         Redirect output to $tmp just once.
29170
29171 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
29172
29173         * lib/addext.c (<errno.h>): Include.
29174         (errno): Declare if not defined.
29175         (addext): Work correctly when pathconf returns -1 and leaves
29176         errno alone because there is no limit.  Also, work even if
29177         pathconf returns a value greater than SIZE_MAX.
29178
29179 2001-08-12  Jim Meyering  <meyering@lucent.com>
29180
29181         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
29182         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
29183         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
29184         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
29185         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
29186         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
29187         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
29188         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
29189         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
29190         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
29191         utime.m4, utimes.m4, xstrtoumax.m4:
29192         Quote the first argument in each use of AC_DEFUN.
29193
29194 2001-08-12  Jim Meyering  <meyering@lucent.com>
29195
29196         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
29197         Simply `return getcwd (NULL, 0);'.
29198         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
29199         Use 1300 as initial value for length, not PATH_MAX.
29200
29201         * lib/pathmax.h: Clean up cpp syntax.
29202
29203 2001-08-12  Jim Meyering  <meyering@lucent.com>
29204
29205         * lib/gettimeofday.c: New file.
29206         * lib/gtod.h: New file.
29207         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
29208
29209 2001-08-05  Jim Meyering  <meyering@lucent.com>
29210
29211         * m4/jm-macros.m4: Require autoconf-2.52.
29212
29213 2001-08-04  Jim Meyering  <meyering@lucent.com>
29214
29215         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
29216         stmt, to get in sync with glibc.
29217
29218 2001-08-03  Paul Eggert  <eggert@twinsun.com>
29219
29220         The following changes are from gettext 0.10.39 as maintained by
29221         Bruno Haible.
29222
29223         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
29224         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
29225         with inverted sense.  All uses changed.
29226
29227         * lib/mbswidth.c: Don't include <limits.h>.
29228         Include <stdlib.h> and <string.h> unconditionally.
29229         (iswcntrl, mbsinit, ISCNTRL): New macros.
29230         (mbsnwidth): Use K&R style function declarations.
29231         Don't bother checking for MB_LEN_MAX == 1, since the compiler
29232         can optimize it when MB_CUR_MAX == 1.
29233         The width of control characters is zero, not 1.
29234
29235 2001-08-03  Paul Eggert  <eggert@twinsun.com>
29236
29237         The following changes are from gettext 0.10.39 as maintained by
29238         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
29239
29240         * m4/codeset.m4: Upgrade to serial AM1.
29241         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
29242         all uses changed.  Quote first arg of AC_DEFUN.
29243         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
29244
29245         * m4/iconv.m4: Upgrade to serial AM2.
29246         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
29247         Add --with-libconv-prefix.
29248         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
29249         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
29250         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
29251         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
29252         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
29253
29254         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
29255         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
29256         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
29257         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
29258         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
29259         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
29260         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
29261         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
29262         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
29263
29264         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
29265         string.h any more.
29266
29267         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
29268         not the default value.
29269
29270         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
29271         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
29272         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
29273         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
29274         Also check for iswcntrl, used for wcwidth fallback.
29275         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
29276         to Autoconf 2.13.
29277
29278 2001-08-03  Jim Meyering  <meyering@lucent.com>
29279
29280         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
29281         as it was in the original.  Reported by Paul Eggert.
29282
29283 2001-07-16  Jim Meyering  <meyering@lucent.com>
29284
29285         * m4/gettimeofday.m4: New file.
29286         Prompted by a report from Bernhard Baehr.
29287
29288 2001-07-15  Jim Meyering  <meyering@lucent.com>
29289
29290         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
29291         stuff. Now it's in ../Makefile.cfg.
29292
29293 2001-07-15  Jim Meyering  <meyering@lucent.com>
29294
29295         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
29296         (BUILT_SOURCES): Add unlocked-io.h.
29297         (io_functions): Define.
29298         (unlocked-io.h): New rule.
29299         (DISTCLEANFILES): Add unlocked-io.h.
29300         (all-local): Depend on unlocked-io.h, to ensure it is created.
29301
29302         * lib/unlocked-io.hin: New file
29303
29304         * lib/regex.c: Update from glibc.
29305
29306 2001-07-05  Jim Meyering  <meyering@lucent.com>
29307
29308         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
29309         recommendation.
29310         (libfetish_a_SOURCES): Put all .h files here instead.
29311         Remove a thus-exposed (better checks in automake) duplicate and
29312         two unnecessary .h files.
29313
29314 2001-07-04  Jim Meyering  <meyering@lucent.com>
29315
29316         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
29317         that generates jm-glibc-io.m4 so that it doesn't trigger any make
29318         distcheck failure.
29319
29320 2001-07-02  Jim Meyering  <meyering@lucent.com>
29321
29322         The following changes were prompted by suggestions from Bruno Haible.
29323
29324         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
29325         is now generated.
29326         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
29327         definition of EXTRA_DIST.
29328         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
29329         ensure that the generated file is created/updated whenever the list
29330         of $(unlocked_functions) is changed.
29331         (jm-glibc-io.m4): New rule.
29332         (unlocked-io.h): New rule -- currently unused.
29333
29334 2001-06-24  Jim Meyering  <meyering@lucent.com>
29335
29336         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
29337         unmatched right bracket, rather than kludging it with an extra,
29338         falsely-matching quote in a comment.  Patch by Akim Demaille.
29339
29340 2001-06-11  Jim Meyering  <meyering@lucent.com>
29341
29342         * lib/regex.c: Update from GNU libc.
29343
29344 2001-05-27  Jim Meyering  <meyering@lucent.com>
29345
29346         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
29347         Check for ut_type in struct utmp.
29348
29349 2001-05-27  Jim Meyering  <meyering@lucent.com>
29350
29351         * lib/readutmp.h (UT_TYPE): Define.
29352
29353 2001-05-24  Jim Meyering  <meyering@lucent.com>
29354
29355         * lib/argmatch.c: Include "quote.h".
29356         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
29357         quote function.  Reported by Göran Uddeborg.
29358
29359 2001-05-22  Jim Meyering  <meyering@lucent.com>
29360
29361         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
29362         now that we use the package-supplied version unconditionally.
29363         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
29364
29365 2001-05-21  Jim Meyering  <meyering@lucent.com>
29366
29367         * m4/regex.m4: Change a couple backticks to single quotes to avoid
29368         shell syntax errors.
29369
29370 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
29371
29372         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
29373
29374 2001-05-20  Paul Eggert  <eggert@twinsun.com>
29375
29376         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
29377         Don't bother to check library strftime, since
29378         we'll be using our own my_strftime function anyway.
29379         Define my_strftime instead of strftime.
29380
29381 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
29382
29383         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
29384         which is not yet declared.
29385
29386 2001-05-15  Jim Meyering  <meyering@lucent.com>
29387
29388         * m4/regex.m4: Use proper quoting so brackets appear in the test
29389         program.
29390         Reported by, and with help from, Bruno Haible.
29391
29392 2001-05-13  Jim Meyering  <meyering@lucent.com>
29393
29394         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
29395         undefined.
29396
29397 2001-05-11  Paul Eggert  <eggert@twinsun.com>
29398
29399         dirname code cleanup.  base_name now behaves more compatibly
29400         with POSIX basename when given file names that have trailing
29401         slashes, and similarly for dir_name.  Add new primitives
29402         base_len and dir_len.  Put the directory-name-related decls
29403         into dirname.h.
29404
29405         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
29406         * lib/backupfile.c (base_name): Likewise.
29407         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
29408         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
29409         * lib/makepath.c (strip_trailing_slashes): Likewise.
29410         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
29411         ISSLASH): Likewise.
29412         * lib/rename.c (strip_trailing_slashes): Likewise.
29413         * lib/same.c (base_name): Likewise.
29414         * lib/stripslash.c (ISSLASH): Likewise.
29415
29416         * lib/addext.c: Include <dirname.h> after size_t is defined.
29417         * lib/backupfile.c: Likewise.
29418
29419         * lib/addext.c (addext): Use base_len to trim redundant
29420         trailing slashes instead of doing it ourselves.
29421         But do not trim the last slash if it is not redundant.
29422
29423         * lib/backupfile.c (find_backup_file_name,
29424         max_backup_version): Use base_len instead of rolling it ourselves.
29425         Handle the case of "" and (on DOS) "C:" correctly.
29426
29427         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
29428         needed. Include <string.h>, <dirname.h>.
29429         (base_name): Allow file names ending in slashes, other than names
29430         that are all slashes.  In this case, return the basename followed
29431         by the slashes.  This is more general, and can be used in places
29432         where the original base_name purposely had an assertion failure.
29433         (base_len): New function.
29434
29435         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
29436         Do not include <assert.h>; no longer needed.
29437         Include xalloc.h.
29438         (memrchr): Remove decl.
29439         (dir_name_r): Remove.
29440         (dir_len): Renamed from dirlen.  All callers changed.
29441         Rewrite in terms of base_name, for simplicity and consistency.
29442         (dir_name): Never return NULL.  All callers changed.
29443         Do not include <stdlib.h> in test program; no longer needed.
29444         return 0; is fine for test program.
29445
29446         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
29447         New macros.
29448         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
29449
29450         * lib/path-concat.c (path_concat): Use base_len to compute
29451         base length, not strlen; this means we cannot rely on memcpy
29452         to null-terminate.
29453
29454         * lib/same.c (STREQ): Remove.
29455         (same_name): Handle the case where the basename ends in trailing '/'.
29456
29457         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
29458         a slash was stripped.  Do not strip the last slash after a
29459         file system prefix.
29460
29461 2001-05-11  Paul Eggert  <eggert@twinsun.com>
29462
29463         * lib/Makefile.am (libfetish_a_SOURCES):
29464         Add strftime.c, since we now compile it on all hosts.
29465
29466         * lib/strftime.c (my_strftime):
29467         Define to nstrftime if emacs, but only if my_strftime is not defined.
29468         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
29469         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
29470         Add one more extra argument: a nanoseconds value.
29471         All uses changed.
29472         (ns): New macro.
29473         (my_strftime function): Add %N format.
29474         (emacs_strftimeu): Renamed from emacs_strftime,
29475         with extra ut argument.
29476
29477 2001-05-09  Paul Eggert  <eggert@twinsun.com>
29478
29479         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
29480
29481 2001-04-21  Jim Meyering  <meyering@lucent.com>
29482
29483         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
29484         doesn't interfere.
29485
29486 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
29487
29488         * m4/ftruncate.m4: Check for chsize.
29489         Link with ftruncate.o unconditionally if ftruncate is missing.
29490         This was required when cross-compiling to i586-mingw32msvc.
29491
29492 2001-04-08  Jim Meyering  <meyering@lucent.com>
29493
29494         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
29495         recomputed; that's necessary when the offset spans a DST transition.
29496         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
29497
29498 2001-04-02  Jim Meyering  <meyering@lucent.com>
29499
29500         * lib/regex.h, regex.c: Update from GNU libc.
29501
29502 2001-03-24  Jim Meyering  <meyering@lucent.com>
29503
29504         * m4/jm-macros.m4: Require autoconf-2.49d.
29505
29506 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
29507
29508         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
29509
29510 2001-03-19  Paul Eggert  <eggert@twinsun.com>
29511
29512         * lib/version-etc.c (version_etc_copyright): Update to 2001.
29513
29514 2001-03-17  Jim Meyering  <meyering@lucent.com>
29515
29516         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
29517         now that the version in autoconf is equivalent.
29518         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
29519
29520         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
29521         Suggestion from Akim Demaille.
29522
29523         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
29524         (jm_PREREQ_TEMPNAME): New function.
29525
29526 2001-03-16  Paul Eggert  <eggert@twinsun.com>
29527
29528         * lib/tempname.c (uint64_t): Define to uintmax_t if
29529         not defined, and if UINT64_MAX is not defined.
29530         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
29531         Reported by John David Anglin.
29532
29533 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
29534
29535         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
29536         resolve alias if codeset is empty.
29537         * lib/config.charset (BeOS): Use wildcard syntax.
29538
29539 2001-03-13  Jim Meyering  <meyering@lucent.com>
29540
29541         * lib/path-concat.c (path_concat)
29542         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
29543         concatenating e.g., `C:' and `foo'.
29544         From Bruno Haible.
29545
29546 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
29547
29548         * lib/localcharset.c (locale_charset): Don't use
29549         setlocale(LC_CTYPE,NULL). Don't return NULL.
29550         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
29551
29552 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
29553
29554         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
29555         support for DOS/DJGPP.
29556
29557 2001-03-01  Paul Eggert  <eggert@twinsun.com>
29558
29559         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
29560         lacks mkstemp.  Compile our own tempname.c if we compile our own
29561         mkstemp.c, as mkstemp relies on tempname.
29562
29563 2001-03-01  Jim Meyering  <meyering@lucent.com>
29564
29565         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
29566         AH_VERBATIM really does output its argument verbatim.
29567
29568 2001-02-28  Paul Eggert  <eggert@twinsun.com>
29569
29570         * lib/Makefile.am (libfetish_a_SOURCES):
29571         Add dup-safer.c, fopen-safer.c.
29572         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
29573
29574         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
29575         * lib/unistd-safer.h: New files.
29576
29577 2001-02-25  Paul Eggert  <eggert@twinsun.com>
29578
29579         The mkstemp replacement is taken from glibc 2.2.2, with some
29580         portability fixes for use outside glibc, as follows:
29581
29582         * lib/tempname.c (struct_stat64): New macro.
29583         (direxists, __gen_tempname): Use it.
29584         This avoids a portability problem with Solaris 8.
29585
29586         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
29587         (<stddef.h>, <stdint.h>, <string.h>):
29588         Include only if STDC_HEADERS || _LIBC.
29589         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
29590         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
29591         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
29592         (__set_errno): Define this macro if <errno.h> doesn't.
29593         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
29594         Define these macros if <stdio.h> doesn't.
29595         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
29596         Define these macros if <sys/stat.h>
29597         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
29598         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
29599         __xstat64): Define if not _LIBC.
29600         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
29601         (__gen_tempname): Invoke gettimeofday only if
29602         HAVE_GETTIMEOFDAY || _LIBC;
29603         otherwise, fall back on plain "time".
29604         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
29605
29606         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
29607
29608         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
29609
29610 2001-02-18  Paul Eggert  <eggert@twinsun.com>
29611
29612         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
29613
29614 2001-02-17  Paul Eggert  <eggert@twinsun.com>
29615
29616         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
29617         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
29618         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
29619         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
29620
29621 2001-02-17  Paul Eggert  <eggert@twinsun.com>
29622
29623         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
29624         Remove workaround macros for hosts that have mbrtowc but not
29625         mbstate_t, as we now insist on proper declarations for both
29626         before using mbrtowc.
29627
29628 2001-02-17  Jim Meyering  <meyering@lucent.com>
29629
29630         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
29631         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
29632         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
29633         UnixWare 7.1.1.
29634
29635         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
29636         rather than AC_CACHE_VAL.
29637
29638 2001-02-17  Jim Meyering  <meyering@lucent.com>
29639
29640         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
29641         around included file name.
29642
29643         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
29644
29645         * lib/strftime.c: Update from GNU libc (the only changes were to
29646         comments).
29647
29648 2001-02-17  Jim Meyering  <meyering@lucent.com>
29649
29650         * lib/regex.c: Update from libc.
29651
29652 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
29653
29654         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
29655         clash.
29656
29657 2001-02-16  Paul Eggert  <eggert@twinsun.com>
29658
29659         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
29660         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
29661         Reported by Mark Hounschell via Paul Eggert.
29662
29663 2001-02-07  Jim Meyering  <meyering@lucent.com>
29664
29665         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
29666
29667 2001-02-05  Jim Meyering  <meyering@lucent.com>
29668
29669         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
29670         it includes the patch required for `large file' support with at least
29671         HP-UX's 10.20 /bin/cc.
29672
29673 2001-02-03  Jim Meyering  <meyering@lucent.com>
29674
29675         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
29676         AS_IF, now that it works once again (mysteriously).
29677         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
29678
29679 2001-01-30  Jim Meyering  <meyering@lucent.com>
29680
29681         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
29682         * m4/chown.m4: Rename conftestchown to conftest.chown.
29683         * m4/rename.m4: s/conftestdir/conftest.d1/ and
29684         s/conftestdir2/conftest.d2/.
29685         * m4/utimes.m4: s/conftestdata/conftest.data/
29686         Inspired by Pavel Roskin's change in autoconf.
29687
29688 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
29689
29690         * lib/config.charset: Update for FreeBSD 4.2.
29691
29692 2001-01-27  Jim Meyering  <meyering@lucent.com>
29693
29694         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
29695         a use of AS_IF.
29696         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
29697
29698 2001-01-26  Jim Meyering  <meyering@lucent.com>
29699
29700         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
29701         quotearg.c includes it.
29702
29703 2001-01-26  Jim Meyering  <meyering@lucent.com>
29704
29705         * lib/quotearg.c: Include stddef.h.
29706         * lib/quote.c: Include stddef.h.
29707         Reported by Axel Kittenberger.
29708
29709         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
29710         line in double quotes so that it evokes a better diagnostic.
29711         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
29712         Reported by Axel Kittenberger.
29713
29714 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
29715
29716         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
29717         as if it was a `charset'.
29718
29719 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
29720
29721         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
29722         has const.
29723
29724 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
29725
29726         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
29727         to avoid a warning.  Add back 'const' to inptr.
29728
29729 2001-01-20  Jim Meyering  <meyering@lucent.com>
29730
29731         Be sure that headers are checked before used in code compiled
29732         for the type checks.
29733         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
29734         In place of that, invoke jm_CHECK_ALL_TYPES.
29735         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
29736         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
29737         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
29738         The check for ssize_t was mistakenly run before the test for unistd.h.
29739
29740         The configure-time check for stdbool.h was missing.
29741         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
29742         (jm_PREREQ_HASH): New function.
29743
29744 2001-01-17  Jim Meyering  <meyering@lucent.com>
29745
29746         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
29747         for autoconf-2.49c.
29748         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
29749
29750 2001-01-16  Jim Meyering  <meyering@lucent.com>
29751
29752         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
29753         From Bruno Haible.
29754
29755 2001-01-14  Jim Meyering  <meyering@lucent.com>
29756
29757         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
29758         foo and bar.  Create conftestdir/ in the script, not in the C code.
29759         Remove directories in the script, not in the C code.
29760         Remove conftestdir{,2} before trying to create the directory.
29761         Make the entire configure script fail if the mkdir fails.
29762
29763 2001-01-14  Jim Meyering  <meyering@lucent.com>
29764
29765         * lib/rename.c: New file.  From Volker Borchert.
29766         Include stdlib.h, string.h or strings.h, and xalloc.h.
29767         Use strip_trailing_slashes rather than open-coding it.
29768
29769 2001-01-03  Paul Eggert  <eggert@twinsun.com>
29770
29771         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
29772
29773 2001-01-03  Jim Meyering  <meyering@lucent.com>
29774
29775         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
29776         of local `inptr' to avoid warning with some system declarations of
29777         iconv.
29778
29779 2001-01-02  Volker Borchert  <bt@teknon.de>
29780
29781         * m4/rename.m4: New file.
29782         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
29783
29784 2001-01-01  Jim Meyering  <meyering@lucent.com>
29785
29786         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
29787         even on systems with utmpx.h.  It's necessary for the declaration of
29788         utmp's ut_user member.  Reported by Andreas Jaeger.
29789
29790         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
29791         available. They are required for the declarations of getgrgid and
29792         getpwuid resp.
29793         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
29794         Reported by Andreas Jaeger.
29795
29796 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
29797
29798         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
29799         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
29800         so `make install' also works in VPATH builds.
29801
29802 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
29803
29804         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
29805         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
29806         can be used in subdirectories.
29807
29808 2000-12-29  Paul Eggert  <eggert@twinsun.com>
29809
29810         * lib/modechange.c: Do not assume that mode_t uses the
29811         traditional octal encoding.  E.g. "chmod 1 FOO" should set
29812         the other-execute bit of FOO even if S_IXOTH != 1.
29813
29814         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
29815         WOTH, XOTH, ALLM): New macros.
29816         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
29817          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
29818         Use them.
29819         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
29820         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
29821         (mode_compile):
29822         No need to use uintmax_t; unsigned long is long enough.
29823         Don't bother to get suffix since we don't use it.
29824
29825 2000-12-26  Jim Meyering  <meyering@lucent.com>
29826
29827         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
29828         better with autoheader.
29829
29830 2000-12-24  Jim Meyering  <meyering@lucent.com>
29831
29832         * lib/hash.c (is_prime): Return explicit boolean values.
29833         (hash_get_first): Return NULL to appease Irix5.6's 89.
29834         Reported by Nelson Beebe.
29835
29836 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
29837
29838         * lib/localcharset.c (locale_charset): Add support for Win32.
29839
29840 2000-12-18  Paul Eggert  <eggert@twinsun.com>
29841
29842         * lib/physmem.h, lib/physmem.c: New files.
29843
29844         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
29845         (noinst_HEADERS): Add physmem.h.
29846
29847         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
29848         't' for compatibility with Solaris 8 sort.
29849
29850 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
29851
29852         * lib/config.charset: Add support for BeOS.
29853
29854 2000-12-17  Jim Meyering  <meyering@lucent.com>
29855
29856         * m4/dos.m4 (jm_AC_DOS): New file and macro.
29857         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
29858
29859 2000-12-16  Jim Meyering  <meyering@lucent.com>
29860
29861         This bug had a serious impact on chown: `chown N:M FILE' (for integer
29862         N and M) would have treated it like `chown N:N FILE'.
29863
29864         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
29865
29866 2000-12-16  Jim Meyering  <meyering@lucent.com>
29867
29868         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
29869         SHELLS_FILE to a file name that's useful on djgpp systems.
29870         Include stdlib.h.
29871         (ADDITIONAL_DEFAULT_SHELLS): Define.
29872         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
29873         Based mostly on a patch from Prashant TR.
29874
29875 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
29876
29877         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
29878         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
29879         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
29880
29881 2000-12-08  Andreas Schwab  <schwab@suse.de>
29882
29883         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
29884         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
29885
29886 2000-12-07  Jim Meyering  <meyering@lucent.com>
29887
29888         * lib/stripslash.c (ISSLASH): Define.
29889         (strip_trailing_slashes): Use ISSLASH rather than comparing against
29890         `/'.
29891         From Prashant TR.
29892
29893         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
29894         (dir_name_r): Declare this function as static.
29895         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
29896         manifest itself on a name containing a mix of slashes and
29897         backslashes.
29898         Make this function work with names starting with a DOS-style
29899         drive letter and colon prefix.
29900         (dir_name): Append `.' if necessary.
29901         Based mostly on patches from Prashant TR and Eli Zaretskii.
29902
29903         * lib/dirname.h (dir_name_r): Remove prototype.
29904
29905 2000-12-06  Paul Eggert  <eggert@twinsun.com>
29906
29907         * m4/off_t-format.m4: Remove this file.
29908         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
29909
29910 2000-12-06  Jim Meyering  <meyering@lucent.com>
29911
29912         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
29913         replacement strtoull, we may well need the replacement strtoul, too.
29914         Check for declarations of strtoul and strtoull.
29915         Check for strtol.  Mainly as a cue to cause automake to include
29916         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
29917         Check for limits.h -- strtol.c needs it.
29918
29919 2000-12-05  Jim Meyering  <meyering@lucent.com>
29920
29921         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
29922
29923 2000-12-04  Jim Meyering  <meyering@lucent.com>
29924
29925         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
29926         Also include memory.h, stdlib.h, unistd.h if appropriate.
29927         Reported by Andreas Jaeger (conflicting declaration of malloc).
29928
29929 2000-12-02  Jim Meyering  <meyering@lucent.com>
29930
29931         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
29932         * m4/jm-macros.m4 (jm_MACROS): require it.
29933
29934 2000-12-02  Jim Meyering  <meyering@lucent.com>
29935
29936         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
29937
29938 2000-12-01  Paul Eggert  <eggert@twinsun.com>
29939
29940         * lib/memrchr.c: Include <config.h> before any system include file.
29941
29942 2000-11-30  Jim Meyering  <meyering@lucent.com>
29943
29944         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
29945
29946 2000-11-30  Jim Meyering  <meyering@lucent.com>
29947
29948         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
29949
29950 2000-11-29  Paul Eggert  <eggert@twinsun.com>
29951
29952         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
29953
29954 2000-11-26  Jim Meyering  <meyering@lucent.com>
29955
29956         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
29957
29958 2000-11-22  Paul Eggert  <eggert@twinsun.com>
29959
29960         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
29961         size of (size_t) -1; it's not portable.
29962
29963 2000-11-17  Jim Meyering  <meyering@lucent.com>
29964
29965         * lib/strstr.c: Update from GNU libc.
29966
29967 2000-11-17  Akim Demaille  <akim@epita.fr>
29968
29969         * lib/obstack.h: Formatting changes.
29970         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
29971         prevent type checking.
29972         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
29973         cast the value to (void *): assigning a `foo *' to a `void *'
29974         variable is valid.
29975         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
29976
29977 2000-11-16  Jim Meyering  <meyering@lucent.com>
29978
29979         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
29980
29981 2000-11-11  Jim Meyering  <meyering@lucent.com>
29982
29983         * lib/error.c: Add a couple #includes, merging from GNU libc version.
29984
29985 2000-11-10  Jim Meyering  <meyering@lucent.com>
29986
29987         * lib/obstack.h: Update from GNU libc.
29988         * lib/obstack.c: Likewise.
29989
29990 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
29991
29992         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
29993
29994 2000-11-06  Paul Eggert  <eggert@twinsun.com>
29995
29996         * lib/getusershell.c (setusershell): Use rewind rather than
29997         fseek/fseeko, to avoid configuration hassles with fseeko.
29998         Don't bother opening SHELLS_FILE if shellstream is NULL;
29999         it's not necessary.
30000
30001 2000-11-05  Jim Meyering  <meyering@lucent.com>
30002
30003         * lib/makepath.h (make_dir): Declare.
30004         * lib/makepath.c (make_dir): Remove `static' attribute.
30005         Tweak a comment.
30006
30007 2000-11-04  Jim Meyering  <meyering@lucent.com>
30008
30009         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
30010
30011 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
30012
30013         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
30014         last one in a bucket, advance to the next bucket.
30015
30016 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
30017
30018         * lib/fnmatch.c: Do not comment out all the code if we are using
30019         the GNU C library, because in some cases we are replacing buggy
30020         code in the GNU C library itself.
30021
30022 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
30023
30024         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
30025         (regex_compile): Catch bogus \(\1\).
30026
30027 2000-10-30  Paul Eggert  <eggert@twinsun.com>
30028
30029         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
30030         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
30031         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
30032
30033 2000-10-30  Paul Eggert  <eggert@twinsun.com>
30034
30035         * lib/error.h, getline.h, modechange.h:
30036         Remove "2000" from Copyright line, as the file hasn't been
30037         changed this year other than in the copyright notice.
30038
30039         * lib/xalloc.h: Add "2000" to Copyright line, as this file
30040         was changed this year.
30041
30042 2000-10-29  Jim Meyering  <meyering@lucent.com>
30043
30044         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
30045         renaming.
30046         * m4/ls-mntd-fs.m4: Likewise
30047
30048 2000-10-29  Jim Meyering  <meyering@lucent.com>
30049
30050         * lib/xstat.in: Fix grammar in comment.
30051
30052 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
30053
30054         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
30055         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
30056         doesn't define __restrict_arr.
30057
30058 2000-10-28  Jim Meyering  <meyering@lucent.com>
30059
30060         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
30061         (jm_PREREQ_MEMCHR): New function.
30062
30063 2000-10-28  Jim Meyering  <meyering@lucent.com>
30064
30065         * lib/memchr.c: Update from libc.
30066         Adjust for portability:
30067         [HAVE_STDLIB_H]: Include stdlib.h.
30068         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
30069         Undef __memchr, too.
30070         [!weak_alias]: Define __memchr to memchr.
30071
30072         * lib/regex.c: Update from libc.
30073         * lib/regex.h: Likewise.
30074         * lib/getopt1.c: Likewise.
30075         * lib/memcmp.c: Likewise.
30076
30077         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
30078         Avoid using fseek, when possible -- it's broken by design.
30079         Patch by Ulrich Drepper.
30080
30081 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
30082
30083         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
30084         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
30085         Giving in to popular pressure to shut up the compiler with casts.
30086
30087 2000-10-26  Jim Meyering  <meyering@lucent.com>
30088
30089         * lib/strftime.c: Update from libc.
30090
30091 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
30092
30093         * regex.c: More `unsigned char' -> `re_char' changes.
30094         Also change several `int' into `re_wchar_t'.
30095         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
30096         (PUSH_FAILURE_POINTER): Don't cast any more.
30097         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
30098         We want GCC to complain, since this piece of code makes
30099         re_match non-reentrant, which *should* be fixed.
30100         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
30101         (EXTEND_BUFFER): Use RETALLOC.
30102         (SET_LIST_BIT): Don't cast.
30103         (re_wchar_t): New type.
30104         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
30105         that those two functions will always properly return.
30106         (IMMEDIATE_QUIT_CHECK): Cast to void.
30107         (analyse_first): Use recursion rather than an explicit stack.
30108         (re_compile_fastmap): Can't fail anymore.
30109         (re_search_2): Don't check re_compile_fastmap for failure.
30110         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
30111         Now also sets the new value (passed in a new argument).
30112         (re_match_2_internal): Use it.
30113         Also, use a new var `reg' of type size_t when looping through regs
30114         rather than reuse the inappropriate `mcnt'.
30115
30116 2000-10-25  Jim Meyering  <meyering@lucent.com>
30117
30118         * lib/obstack.c: Update from libc.
30119
30120 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
30121
30122         * regex.c (regex_compile): Change the way of handling a range from
30123         a char less than 256 to a char not less than 256.
30124
30125 2000-10-24  Andrew Innes  <andrewi@gnu.org>
30126
30127         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
30128         NT-Emacs only.
30129         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
30130         so that re_search functions only quit when callers expect them to.
30131
30132 2000-10-23  Jim Meyering  <meyering@lucent.com>
30133
30134         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
30135         wrong.  That set_locale call must not have any side effects.
30136         From Paul Eggert.
30137
30138 2000-10-22  Jim Meyering  <meyering@lucent.com>
30139
30140         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
30141         [CYCLIC]: Remove now-unused definition.
30142
30143         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
30144         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
30145         Suggestion from Ulrich Drepper.
30146
30147 2000-10-21  Jim Meyering  <meyering@lucent.com>
30148
30149         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
30150         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
30151         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
30152
30153 2000-10-21  Jim Meyering  <meyering@lucent.com>
30154
30155         * lib/dirname.c (memrchr): Declare if necessary.
30156         (dir_name): Remove the restriction that there be no
30157         trailing slashes.  Now, this code skips past them, effectively
30158         ignoring them.
30159         [TEST_DIRNAME] (main): New unit tests.
30160
30161         * lib/memrchr.c: New file from GNU libc.
30162         Undef __memrchr, too.
30163         [!weak_alias]: Define __memrchr to memrchr.
30164         Guard weak_alias use with `#ifdef weak_alias'.
30165
30166 2000-10-21  Jim Meyering  <meyering@lucent.com>
30167
30168         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
30169         (dir_name): Use dir_name_r.
30170         * lib/dirname.h (dir_name_r): Declare it.
30171
30172 2000-10-17  Jim Meyering  <meyering@lucent.com>
30173
30174         * lib/quote.h (PARAMS): Define and use.
30175         Reported by Akim Demaille.
30176
30177         * lib/getopt.c: Update from libc.
30178
30179 2000-10-16  Jim Meyering  <meyering@lucent.com>
30180
30181         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
30182         setlocale.
30183         From Jan Fedak.
30184
30185 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
30186
30187         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
30188
30189 2000-09-25  Jim Meyering  <meyering@lucent.com>
30190
30191         * lib/md5.h (rol): Define (from GnuPG).
30192
30193         * lib/sha.c: Give credit (GnuPG) where due.
30194         (M): Use rol rather than open-coding it.
30195         Add a FIXME comment.
30196
30197 2000-09-21  Jim Meyering  <meyering@lucent.com>
30198
30199         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
30200         Reported by Michael Stone.
30201
30202 2000-09-20  Jim Meyering  <meyering@lucent.com>
30203
30204         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
30205         (noinst_HEADERS): Add sha.h.
30206         Based on code from Scott G. Miller and from GnuPG.
30207
30208 2000-09-18  Jim Meyering  <meyering@lucent.com>
30209
30210         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
30211         LIBS. Otherwise, everyone ends up linking with -lelf for some
30212         configurations.
30213         Reported by Mike Stone.
30214
30215 2000-09-15  Jim Meyering  <meyering@lucent.com>
30216
30217         * lib/regex.c: Update from libc.
30218
30219 2000-09-10  Jim Meyering  <meyering@lucent.com>
30220
30221         * lib/getopt.c (_getopt_internal): Update from glibc.
30222
30223 2000-09-09  Jim Meyering  <meyering@lucent.com>
30224
30225         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
30226         think it should be used as a general replacement for isascii.
30227         * lib/fnmatch.c: Likewise.
30228         * lib/mbswidth.c: Likewise
30229         * lib/regex.c: Likewise.
30230
30231         Don't use atoi.
30232         * lib/userspec.c: Include sys/param.h and limits.h.
30233         Include xstrtol.h.
30234         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
30235         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
30236         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
30237         UID, GID.  Check range.
30238
30239 2000-09-06  Jim Meyering  <meyering@lucent.com>
30240
30241         * lib/getopt.c (_getopt_internal): Update from glibc.
30242
30243 2000-08-30  Jim Meyering  <meyering@lucent.com>
30244
30245         * lib/strftime.c: Merge in changes from GNU libc.
30246
30247 2000-08-26  Jim Meyering  <meyering@lucent.com>
30248
30249         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
30250         * m4/fpending.m4: New file.
30251
30252 2000-08-26  Jim Meyering  <meyering@lucent.com>
30253
30254         * lib/closeout.c: Include "__fpending.h".
30255         (close_stdout_status): Return right away if there's nothing to flush.
30256
30257         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
30258         * lib/__fpending.c: New file.
30259         * lib/__fpending.h: New file.
30260
30261 2000-08-20  Jim Meyering  <meyering@lucent.com>
30262
30263         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
30264         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
30265         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
30266
30267 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
30268
30269         Improve fileutils installation on systems where running
30270         programs (like install) can't be unlinked.
30271         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
30272         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
30273
30274 2000-08-07  Paul Eggert  <eggert@twinsun.com>
30275
30276         Standardize on "memory exhausted" instead of "Memory exhausted"
30277         or "virtual memory exhausted".
30278         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
30279         "virtual memory exhausted".
30280         * lib/same.c (same_name): Invoke xalloc_die instead of printing
30281         our own message.
30282         * lib/userspec.c (parse_user_spec): Likewise.
30283         * lib/bumpalloc.h: comment fix
30284         * lib/same.c, userspec.c: Include xalloc.h.
30285
30286         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
30287         not char *const and pointing to a constant array.
30288         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
30289         (xrealloc): Comment fix.
30290
30291         * lib/userspec.c (parse_user_spec):
30292         Don't translate a message until just before returning,
30293         to avoid unnecessary translation.
30294
30295 2000-08-07  Jim Meyering  <meyering@lucent.com>
30296
30297         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
30298         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
30299         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
30300         getgroups.c, gethostname.c, getopt.h, group-member.c,
30301         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
30302         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
30303         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
30304         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
30305         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
30306         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
30307         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
30308         yesno.c: Back out Copyright date changes for each file with no change
30309         this year.  This eases coordination with other programs using the same
30310         source code modules.  From Paul Eggert.
30311
30312 2000-08-06  Paul Eggert  <eggert@twinsun.com>
30313
30314         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
30315         not char, for compatibility with glibc 2.1.3 strftime.c.
30316
30317 2000-08-03  Greg McGary  <greg@mcgary.org>
30318
30319         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
30320         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
30321         (EXTEND_BUFFER): Use them.
30322
30323 2000-08-01  Jim Meyering  <meyering@lucent.com>
30324
30325         * lib/dirname.c (ISSLASH): Define.
30326         (BACKSLASH_IS_PATH_SEPARATOR): Define.
30327         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
30328         both `\' and `/' may be use as path separators.
30329         Based on a patch from Prashant TR.
30330
30331 2000-07-31  Paul Eggert  <eggert@twinsun.com>
30332
30333         * lib/quotearg.c (quotearg_n_options): Don't make the initial
30334         slot vector a constant, since it might get modified.
30335
30336 2000-07-31  Jim Meyering  <meyering@lucent.com>
30337
30338         * lib/xmalloc.c: Use `virtual memory exhausted', not
30339         `Memory exhausted'.
30340         * lib/obstack.c (print_and_abort): Likewise.
30341
30342 2000-07-30  Paul Eggert  <eggert@twinsun.com>
30343
30344         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
30345         buffer, so that the caller can always quote one small
30346         component of a "memory exhausted" message in slot 0.
30347         From a suggestion by Jim Meyering.
30348
30349 2000-07-30  Jim Meyering  <meyering@lucent.com>
30350
30351         * lib/makepath.c (make_path): Quote the other instance, too.
30352
30353         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
30354         (STATIC_BUF_SIZE): Define.
30355         (quotearg_n_options): Use only statically allocated storage when
30356         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
30357         than STATIC_BUF_SIZE.
30358
30359 2000-07-29  Jim Meyering  <meyering@lucent.com>
30360
30361         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
30362         * lib/dirname.c (dir_name): Likewise.
30363
30364         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
30365         `/'.
30366
30367         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
30368         (dir_name): Assert that there are no trailing slashes.
30369
30370 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
30371
30372         * lib/mbswidth.h (mbswidth): Add a flags argument.
30373         (mbswidth): New declaration.
30374         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
30375         * lib/mbswidth.c (mbswidth): Add a flags argument.
30376         (mbsnwidth): New function.
30377
30378 2000-07-24  Jim Meyering  <meyering@lucent.com>
30379
30380         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
30381
30382 2000-07-23  Paul Eggert  <eggert@twinsun.com>
30383
30384         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
30385
30386 2000-07-23  Paul Eggert  <eggert@twinsun.com>
30387
30388         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
30389         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
30390         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
30391         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
30392         invoke multibyte primitives.
30393
30394 2000-07-23  Paul Eggert  <eggert@twinsun.com>
30395
30396         * lib/quotearg.c:
30397         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
30398         so that mbstate_t is always defined.
30399
30400         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
30401         be 1 in at least one GCC installation, and this configuration
30402         error is likely to be common.  Ignoring MB_LEN_MAX hurts
30403         performance on hosts that have mbrtowc but have only unibyte
30404         locales, but I assume these hosts are rare.
30405
30406 2000-07-23  Paul Eggert  <eggert@twinsun.com>
30407
30408         * lib/mbswidth.c (_XOPEN_SOURCE):
30409         Don't define; this causes problems on Solaris 7.
30410         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
30411
30412 2000-07-23  Jim Meyering  <meyering@lucent.com>
30413
30414         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
30415         too: getgrgid, getpwuid, getuid.
30416
30417 2000-07-23  Jim Meyering  <meyering@lucent.com>
30418
30419         * lib/basename.c (base_name): Add an assertion.
30420
30421 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
30422
30423         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
30424         shadow its mbsinit function.
30425
30426 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
30427
30428         * lib/mbswidth.h: New file.
30429         * lib/mbswidth.c: New file.
30430         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
30431         (noinst_HEADERS): Add mbswidth.h.
30432
30433 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
30434
30435         * lib/config.charset: Add support for FreeBSD. Improve support for
30436         HP-UX and IRIX 6.
30437
30438 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
30439
30440         * m4/mbswidth.m4: New file.
30441         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
30442
30443 2000-07-15  Jim Meyering  <meyering@lucent.com>
30444
30445         * lib/makepath.c: Include quote.h.
30446         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
30447         corresponding argument in a `quote (...)' call.
30448         Give better diagnostics.
30449
30450         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
30451         (noinst_HEADERS): Add quote.h.
30452
30453         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
30454         from tar's src/misc.c.
30455         * lib/quote.h: New file.  Prototypes for same.
30456
30457 2000-07-14  Paul Eggert  <eggert@twinsun.com>
30458
30459         From a suggestion by Bruno Haible.
30460         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
30461         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
30462         to decide whether to define the BeOS workaround macro;
30463         this adjusts to the change to AC_MBSTATE_T.
30464
30465 2000-07-14  Jim Meyering  <meyering@lucent.com>
30466
30467         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
30468         jm_AC_TYPE_UINTMAX_T.
30469
30470 2000-07-13  Paul Eggert  <eggert@twinsun.com>
30471
30472         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
30473
30474         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
30475         quotearg_buffer_restyled): Add support for
30476         clocale_quoting_style.  Undo previous change to
30477         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
30478         and "{RIGHT QUOTATION MARK}" msgids.
30479
30480 2000-07-10  Paul Eggert  <eggert@twinsun.com>
30481
30482         From a suggestion by Bruno Haible.
30483         * m4/mbstate_t.m4 (AC_MBSTATE_T):
30484         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
30485         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
30486         and mbstate_t, to a single-part test that simply defines mbstate_t.
30487         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
30488         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
30489
30490 2000-07-10  Jim Meyering  <meyering@lucent.com>
30491
30492         * m4/strerror_r.m4: Mirror the correction made in autoconf.
30493
30494         * m4/gnu-source.m4: Output to confdefs.h directly.
30495         Suggestion from Akim Demaille.
30496
30497 2000-07-09  Paul Eggert  <eggert@twinsun.com>
30498
30499         The old behavior of quoting `like this' doesn't look good with
30500         newer, ISO-style fonts.  See:
30501         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
30502
30503         Instead, quote "like this" by default.  Let the translator
30504         tailor the locale-specific quoting behavior by providing
30505         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
30506
30507         * lib/quotearg.c (N_): New macro.
30508         (gettext_default): New function.
30509         (quotearg_buffer_restyled): Use
30510         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
30511         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
30512
30513 2000-07-09  Jim Meyering  <meyering@lucent.com>
30514
30515         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
30516         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
30517
30518         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
30519         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
30520
30521 2000-07-09  Jim Meyering  <meyering@lucent.com>
30522
30523         * lib/Most files: Update copyright dates to include 2000.
30524
30525 2000-07-08  Jim Meyering  <meyering@lucent.com>
30526
30527         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
30528         if not defined.
30529         (xgethostname): Remove now-unnecessary #ifdef.
30530         Move declaration of `err' into loop where it's used.
30531
30532 2000-07-05  Paul Eggert  <eggert@twinsun.com>
30533         and Bruno Haible  <haible@clisp.cons.org>
30534
30535         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
30536         only if the test for an object-type mbstate_t fails.  This
30537         prevents us from mistakenly reporting that mbstate_t is a
30538         system object type after we "#define mbstate_t int" to work
30539         around its lack.
30540
30541 2000-07-05  Paul Eggert  <eggert@twinsun.com>
30542         and Bruno Haible  <haible@clisp.cons.org>
30543
30544         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
30545
30546 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
30547
30548         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
30549         to strerror_r.
30550         Include <ctype.h> for use of isalpha.
30551
30552 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
30553
30554         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
30555         by allocating a larger buffer. Test the gethostname return value for
30556         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
30557         returns an error and ENAMETOOLONG isn't defined.
30558
30559 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
30560
30561         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
30562         dimension.
30563
30564 2000-07-04  Jim Meyering  <meyering@lucent.com>
30565
30566         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
30567         of the deprecated AC_CHECKING.
30568
30569 2000-07-04  Jim Meyering  <meyering@lucent.com>
30570
30571         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
30572         Reported by Bruno Haible.
30573
30574 2000-07-04  Jim Meyering  <meyering@lucent.com>
30575
30576         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
30577         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
30578         lacks mbrtowc.
30579
30580 2000-07-03  Paul Eggert  <eggert@twinsun.com>
30581
30582         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
30583         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
30584
30585 2000-07-03  Paul Eggert  <eggert@twinsun.com>
30586         and Bruno Haible  <haible@clisp.cons.org>
30587
30588         * lib/quotearg.c (mbrtowc):
30589         Assign to *pwc, and return 1 only if result is nonzero.
30590         (iswprint): Use ISPRINT when substituting our own mbrtowc.
30591
30592 2000-07-03  Jim Meyering  <meyering@lucent.com>
30593
30594         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
30595
30596 2000-07-03  Jim Meyering  <meyering@lucent.com>
30597
30598         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
30599         This is necessary to get a definition of e.g., UTMP_FILE on
30600         HP-UX 10.20.
30601         From Bob Proulx.
30602
30603 2000-07-02  Jim Meyering  <meyering@lucent.com>
30604
30605         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
30606
30607         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
30608         AC_LIBOBJ(function_name).
30609         * m4/chown.m4: Likewise.
30610         * m4/fnmatch.m4: Likewise.
30611         * m4/ftruncate.m4: Likewise.
30612         * m4/getgroups.m4: Likewise.
30613         * m4/getline.m4: Likewise.
30614         * m4/group-member.m4: Likewise.
30615         * m4/jm-macros.m4: Likewise.
30616         * m4/lstat.m4: Likewise.
30617         * m4/malloc.m4: Likewise.
30618         * m4/memcmp.m4: Likewise.
30619         * m4/nanosleep.m4: Likewise.
30620         * m4/putenv.m4: Likewise.
30621         * m4/realloc.m4: Likewise.
30622         * m4/regex.m4: Likewise.
30623         * m4/stat.m4: Likewise.
30624         * m4/strftime.m4: Likewise.
30625
30626 2000-07-02  Jim Meyering  <meyering@lucent.com>
30627
30628         * lib/quotearg.c (mbstate_t): Don't define here.
30629
30630 2000-07-02  Jim Meyering  <meyering@lucent.com>
30631
30632         * lib/nanosleep.c (SIGCONT): Define if not already defined.
30633
30634 2000-07-01  Jim Meyering  <meyering@lucent.com>
30635
30636         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
30637
30638 2000-07-01  Jim Meyering  <meyering@lucent.com>
30639
30640         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
30641         problem.
30642
30643 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
30644
30645         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
30646         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
30647
30648 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
30649
30650         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
30651         per change in ../m4/ls-mntd-fs.m4.
30652         (read_filesystem_list): Ignore symbolic links.
30653
30654 2000-06-29  Jim Meyering  <meyering@lucent.com>
30655
30656         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
30657         for declaration of strcmp.
30658
30659         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
30660
30661         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
30662         Avoid warning by casting result to `char *' to remove `const'.
30663
30664 2000-06-28  Jim Meyering  <meyering@lucent.com>
30665
30666         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
30667         included by quotearg.c, for which we perform this test.  From
30668         Bruno Haible.
30669
30670 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
30671
30672         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
30673         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
30674         <utmpx.h> exists, put readutmp.o into LIBOBJS.
30675
30676 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
30677
30678         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
30679
30680 2000-06-26  Paul Eggert  <eggert@twinsun.com>
30681
30682         savedir now sets errno on failure and invokes xmalloc to get memory.
30683         Fix a couple of other minor bugs while we're at it.
30684
30685         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
30686         (NAMLEN): Remove macro.
30687         (malloc, realloc): Remove decls.
30688         (stpcpy): Likewise.
30689         ("xalloc.h"): Include.
30690         (NAME_SIZE_DEFAULT): New macro.
30691         (savedir): Use xmalloc / xrealloc to allocate memory.
30692         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
30693         Skip "" directory entries.
30694         Use strlen to calculate directory entry length, since the old method
30695         is rarely used these days and isn't worth supporting.
30696         Don't use a pointer after freeing it.
30697         Check for integer overflow when calculating allocation size.
30698         Use memcpy to copy entries, instead of stpcpy.
30699         Set errno properly when returning NULL.
30700         Check for readdir error.
30701
30702 2000-06-26  Jim Meyering  <meyering@lucent.com>
30703
30704         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
30705
30706 2000-06-25  Jim Meyering  <meyering@lucent.com>
30707
30708         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
30709         Linux header bug when _XOPEN_SOURCE is defined to 500.
30710
30711 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
30712
30713         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
30714         deficiency.
30715
30716 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
30717
30718         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
30719         Include xalloc.h.
30720         Don't include <stdlib.h>.  Don't declare malloc, realloc.
30721
30722 2000-06-24  Jim Meyering  <meyering@lucent.com>
30723
30724         * m4/strerror_r.m4: Revive this file -- to try out an experimental
30725         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
30726         for which strerror does return char*, but which lacks a conveniently
30727         accessible declaration of the function.  If the compile-test says
30728         strerror_r doesn't work, then resort to a `run'-test that works on
30729         BeOS and segfaults on DEC Unix.
30730
30731 2000-06-24  Jim Meyering  <meyering@lucent.com>
30732
30733         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
30734
30735 2000-06-23  Paul Eggert  <eggert@twinsun.com>
30736
30737         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
30738         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
30739
30740 2000-06-23  Paul Eggert  <eggert@twinsun.com>
30741
30742         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
30743         (mbrtowc, mbstate_t): Define substitutes if
30744         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
30745         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
30746         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
30747
30748 2000-06-23  Jim Meyering  <meyering@lucent.com>
30749
30750         * m4/afs.m4: Add missing AC_MSG_RESULT.
30751         Reported by Bruno Haible.
30752
30753         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
30754         Suggestion from Bruno Haible.
30755
30756 2000-06-23  Jim Meyering  <meyering@lucent.com>
30757
30758         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
30759
30760 2000-06-21  Jim Meyering  <meyering@lucent.com>
30761
30762         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
30763
30764 2000-06-21  Jim Meyering  <meyering@lucent.com>
30765
30766         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
30767         (noinst_HEADERS): Add getstr.h.
30768
30769         * lib/getline.c (getstr): Move into a separate file.
30770         * lib/getstr.c (getstr): New file, extracted from getline.c, with
30771         the following changes: new parameter, delim2; both delim[12]
30772         parameters have type `int', not `char'.  The latter would lose
30773         with 8-bit delimiters.
30774         * lib/getstr.h: New file.
30775
30776 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
30777
30778         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
30779         than 1024, return a memory chunk of least possible size, instead
30780         of size PATH_MAX + 2. In the loop, increment the size proportionally.
30781         Use free/xmalloc instead of xrealloc to avoid copying for very long
30782         paths.
30783
30784 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
30785
30786         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
30787         the empty string.
30788
30789 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
30790
30791         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
30792         address, not strdup.  Include <stdlib.h> and don't declare free().
30793
30794 2000-06-19  Jim Meyering  <meyering@lucent.com>
30795
30796         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
30797
30798 2000-06-18  Jim Meyering  <meyering@lucent.com>
30799
30800         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
30801
30802         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
30803         `checking whether...' message to be consistent with that of the
30804         lstat test.
30805
30806 2000-06-18  Jim Meyering  <meyering@lucent.com>
30807
30808         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
30809         Besides, these days every porting target provides a mkdir function.
30810
30811         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
30812         needed. (this snippet comes from src/system.h).
30813
30814 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
30815
30816         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
30817
30818 2000-06-15  Paul Eggert  <eggert@twinsun.com>
30819
30820         * lib/human.c (adjust_value): New function.
30821         (human_readable_inexact): Apply rounding style even when
30822         printing approximate values.
30823
30824 2000-06-14  Paul Eggert  <eggert@twinsun.com>
30825
30826         * lib/human.c (human_readable_inexact): Allow an input block
30827         size that is not a multiple of the output block size, and vice versa.
30828         Reported by Piergiorgio Sartor.
30829
30830 2000-06-14  Paul Eggert  <eggert@twinsun.com>
30831
30832         * lib/getdate.y (get_date): Apply relative times after time
30833         zone indicator, not before.  Reported by Todd A. Jacobs.
30834
30835 2000-06-13  Jim Meyering  <meyering@lucent.com>
30836
30837         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
30838
30839         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
30840
30841 2000-06-12  Paul Eggert  <eggert@twinsun.com>
30842
30843         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
30844
30845 2000-06-12  Jim Meyering  <meyering@lucent.com>
30846
30847         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
30848         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
30849         optional argument.
30850         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
30851         the optional argument, `lib'.
30852
30853 2000-06-08  Jim Meyering  <meyering@lucent.com>
30854
30855         * m4/largefile.m4: Remove file (now that it's part of autoconf).
30856
30857 2000-06-04  Paul Eggert  <eggert@twinsun.com>
30858
30859         Rewrite largefile configuration so that we don't need to run
30860         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
30861         AC_CANONICAL_HOST in configure.in -- jmm]
30862
30863         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
30864         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
30865         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
30866         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
30867         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
30868         All uses changed.
30869         Instead of inspecting the output of getconf, try to compile the
30870         test program without and with the macro definition.
30871         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
30872         for getconf.  Instead, check for the needed flags by compiling
30873         test programs.
30874
30875 2000-06-04  Paul Eggert  <eggert@twinsun.com>
30876
30877         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
30878
30879 2000-06-04  Jim Meyering  <meyering@lucent.com>
30880
30881         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
30882         SunOS 4.1.4 for which gid_t is an unsigned type.
30883
30884 2000-06-03  Jim Meyering  <meyering@lucent.com>
30885
30886         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
30887         now that autoconf requires that.
30888
30889         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
30890         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
30891         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
30892
30893 2000-06-03  Jim Meyering  <meyering@lucent.com>
30894
30895         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
30896
30897 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
30898
30899         * m4/glibc21.m4: New file.
30900         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
30901
30902 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
30903
30904         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
30905         newer, don't install charset.alias.
30906         * lib/config.charset: Change the Linux/glibc rules so they become empty
30907         on glibc-2.1 or newer.
30908
30909 2000-06-02  Jim Meyering  <meyering@lucent.com>
30910
30911         * lib/mountlist.c: Back out last change.  Instead, do this...
30912         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
30913         me_dummy member using the same `ignore'-testing code.
30914         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
30915         fs_type strings.
30916         From Mark D. Roth.
30917
30918 2000-05-29  Jim Meyering  <meyering@lucent.com>
30919
30920         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
30921         mounts with the `ignore' attribute.  Based on a patch from
30922         Mark D. Roth.
30923
30924 2000-05-28  Jim Meyering  <meyering@lucent.com>
30925
30926         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
30927         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
30928         * m4/stat.m4: Likewise.
30929         * m4/lstat.m4: Likewise.
30930         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
30931
30932         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
30933         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
30934
30935 2000-05-26  Jim Meyering  <meyering@lucent.com>
30936
30937         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
30938
30939 2000-05-24  Jim Meyering  <meyering@lucent.com>
30940
30941         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
30942         autoconf requires that.
30943         * m4/lib-check.m4: Likewise.
30944         * m4/jm-macros.m4: Likewise.
30945         * m4/strftime.m4: Likewise.
30946
30947         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
30948         AC_CHECK_DECLS, now that autoconf requires that.
30949
30950 2000-05-22  Jim Meyering  <meyering@lucent.com>
30951
30952         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
30953         * m4/lstat.m4: Likewise.
30954
30955 2000-05-22  Jim Meyering  <meyering@lucent.com>
30956
30957         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
30958
30959 2000-05-20  Jim Meyering  <meyering@lucent.com>
30960
30961         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
30962         (jm_PREREQ): Use it.
30963
30964 2000-05-18  Jim Meyering  <meyering@lucent.com>
30965
30966         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
30967         back, too, since it may have been modified by allocate_entry.
30968         (hash_delete): Rewrite to use neither the assignment operator
30969         nor the comma operator in an if-expression.
30970
30971 2000-05-15  Paul Eggert  <eggert@twinsun.com>
30972
30973         * lib/closeout.c:
30974         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
30975         Remove; no longer needed.
30976         "quotearg.h": Add include.
30977         (file_name): Do not bother to explicitly initialize to NULL; it's less
30978         efficient on some hosts.
30979         (close_stdout_status): Remove test as to whether stdout was already
30980         closed; it breaks for the case "echo x | sort >&-".
30981         Quote file name colons.
30982         Do not assume that _("write error") lacks format strings.
30983
30984 2000-05-15  Jim Meyering  <meyering@lucent.com>
30985
30986         * lib/version-etc.c (version_etc_copyright): Update the copyright
30987         string used in all --version output.
30988
30989 2000-05-14  Jim Meyering  <meyering@lucent.com>
30990
30991         * lib/closeout.c (close_stdout_set_file_name): New function.
30992         (close_stdout_status): Use new file-scoped global.
30993         Return right away if fstat says the stdout file descriptor is invalid.
30994         * lib/closeout.h (close_stdout_set_file_name): Declare.
30995
30996 2000-05-10  Jim Meyering  <meyering@lucent.com>
30997
30998         * lib/closeout.c [default_exit_status]: New file-scoped variable.
30999         (close_stdout_set_status): New function.
31000         * lib/closeout.h (close_stdout_set_status): Declare.
31001
31002 2000-05-09  Jim Meyering  <meyering@lucent.com>
31003
31004         * m4/gettext.m4: Rename this...
31005         * m4/libintl.m4: ...to this.
31006
31007 2000-05-08  Jim Meyering  <meyering@lucent.com>
31008
31009         * lib/long-options.c: Don't include closeout.h.
31010         (parse_long_options): Don't call close_stdout for --version.
31011
31012 2000-05-06  Paul Eggert  <eggert@twinsun.com>
31013
31014         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
31015         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
31016         2.1.3 bug.  This avoids a clash when files like regex.c define
31017         _GNU_SOURCE.
31018
31019 2000-05-06  Jim Meyering  <meyering@lucent.com>
31020
31021         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
31022         (AC_REPLACE_FUNCS): Add strnlen.
31023
31024         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
31025         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
31026
31027         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
31028         AC_SEARCH_LIBS call for nanosleep.
31029         (LIB_NANOSLEEP): Set and AC_SUBST.
31030
31031 2000-05-06  Jim Meyering  <meyering@lucent.com>
31032
31033         * lib/strnlen.c: Undefine __strnlen and strnlen.
31034         [!weak_alias]: Define __strnlen to strnlen.
31035
31036         * lib/atexit.c: New file, from libiberty.
31037
31038 2000-05-06  Jim Meyering  <meyering@lucent.com>
31039
31040         * lib/closeout.c (close_stdout_status): Also check for errors on the
31041         stderr stream.
31042
31043 2000-05-05  Jim Meyering  <meyering@lucent.com>
31044
31045         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
31046         AC_SEARCH_LIBS call for clock_gettime.
31047         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
31048
31049         * m4/search-libs.m4: Update from autoconf.
31050
31051         su doesn't work on Solaris 2.6.
31052         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
31053         <shadow.h>.  Reported by Dragos Harabor.
31054
31055 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
31056
31057         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
31058         memcpy instead of xmalloc, xrealloc, path_concat.
31059         (locale_charset): Treat empty environment variables as absent.
31060         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
31061
31062 2000-05-04  Jim Meyering  <meyering@lucent.com>
31063
31064         * lib/getopt.c: Update from glibc.
31065         * lib/obstack.c: Likewise.
31066         * lib/obstack.h: Likewise.
31067         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
31068         file
31069
31070         * lib/regex.h: Likewise.
31071         * lib/strndup.c: Likewise.
31072         * lib/strnlen.c: New file, from glibc.
31073
31074 2000-05-03  Jim Meyering  <meyering@lucent.com>
31075
31076         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
31077
31078 2000-05-02  Paul Eggert  <eggert@twinsun.com>
31079
31080         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
31081         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
31082         compile-time test, rather than inspecting host and OS, to
31083         decide whether to define _LARGEFILE_SOURCE.
31084
31085 2000-05-01  Jim Meyering  <meyering@lucent.com>
31086
31087         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
31088
31089         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
31090         Based on a patch from Bruno Haible.
31091
31092 2000-05-01  Jim Meyering  <meyering@lucent.com>
31093
31094         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
31095
31096 2000-04-29  Jim Meyering  <meyering@lucent.com>
31097
31098         * lib/path-concat.c: Declare strdup only if it's not defined.
31099         * lib/canon-host.c: Likewise.
31100
31101 2000-04-28  Jim Meyering  <meyering@lucent.com>
31102
31103         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
31104         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
31105         is included first, then limits.h is included by locale.h by libintl.h.
31106         From John David Anglin.
31107
31108 2000-04-25  Jim Meyering  <meyering@lucent.com>
31109
31110         * lib/makepath.c (S_IRWXUGO): Define.
31111         (make_path): Always perform explicit chmod if MODE specifies any
31112         of the `special' permission bits.  Prompted by a bug report against
31113         install from Mate Wierdl and Joost van Baal.
31114
31115 2000-04-18  Jim Meyering  <meyering@lucent.com>
31116
31117         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
31118         (jm_PREREQ): Use it.
31119
31120 2000-04-18  Jim Meyering  <meyering@lucent.com>
31121
31122         * lib/README: New file.
31123
31124         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
31125         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
31126
31127 2000-04-17  Jim Meyering  <meyering@lucent.com>
31128
31129         Get it right :-)
31130         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
31131         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
31132         Suggestion from Akim Demaille.
31133
31134 2000-04-17  Jim Meyering  <meyering@lucent.com>
31135
31136         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
31137         the definition of it to rpl_strftime also defined-away the system's
31138         declaration.
31139
31140 2000-04-15  Jim Meyering  <meyering@lucent.com>
31141
31142         Use `C' to denote so-called `contiguous' files, the same way
31143         that tar does.
31144         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
31145         (ftypelet): Use S_ISCTG.
31146         From Michael Deutschmann.
31147
31148 2000-04-14  Jim Meyering  <meyering@lucent.com>
31149
31150         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
31151         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
31152         clobbered.
31153
31154 2000-04-14  Jim Meyering  <meyering@lucent.com>
31155
31156         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
31157
31158 2000-04-13  Jim Meyering  <meyering@lucent.com>
31159
31160         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
31161         AH_VERBATIM to insert required #ifndef into config.h.in.
31162         Suggestion from Akim Demaille.
31163
31164 2000-04-12  Jim Meyering  <meyering@lucent.com>
31165
31166         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
31167         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
31168         Christian Krackowizer.
31169
31170         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
31171         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
31172         (AC_SYS_LARGEFILE): Require.
31173         (AM_C_PROTOTYPES): Require.
31174
31175 2000-04-08  Jim Meyering  <meyering@lucent.com>
31176
31177         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
31178         names don't conflict.  Reported by Eli Zaretskii.
31179
31180 2000-04-07  Jim Meyering  <meyering@lucent.com>
31181
31182         * lib/putenv.c: Move inclusion of errno.h so it follows that of
31183         sys/types.h, to work around system header problems on AIX 3.2.5.
31184         From Bruno Haible.
31185
31186 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
31187
31188         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
31189         bug.  Deal with the different error behavior of Irix iconv.
31190
31191 2000-04-05  Paul Eggert  <eggert@twinsun.com>
31192
31193         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
31194         IRIX if the installer said otherwise.
31195
31196 2000-04-05  Jim Meyering  <meyering@lucent.com>
31197
31198         Portability tweaks required for ultrix4.3.
31199         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
31200         (jm_CHECK_DECLS): Add getutent to the list of functions.
31201         (_jm_DECL_HEADERS): Add utmpx.h.
31202         From John David Anglin.
31203
31204         * m4/strftime.m4: Back out the 2000-04-02 change.
31205         Instead of that change, simply undefine putenv in the test program.
31206
31207 2000-04-05  Jim Meyering  <meyering@lucent.com>
31208
31209         Portability tweaks required for ultrix4.3.
31210         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
31211         getutent.
31212         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
31213         * lib/canon-host.c: Declare strdup.
31214         * lib/path-concat.c: Likewise.
31215         From John David Anglin.
31216
31217 2000-04-04  Jim Meyering  <meyering@lucent.com>
31218
31219         Be more DOS 8.3-friendly.
31220         * lib/ref-add.sin: Renamed from ref-add.sed.in.
31221         * lib/ref-del.sin: Renamed from ref-del.sed.in.
31222         * lib/Makefile.am: Reflect renaming.
31223         Reported by Eli Zaretskii.
31224
31225         Use a temporary file name that won't clash with `charset.alias'
31226         in the DOS 8.3 name space.
31227         * lib/Makefile.am (charset_tmp): Define.
31228         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
31229         (uninstall-local): Likewise.
31230         Reported by Eli Zaretskii.
31231
31232 2000-04-03  Jim Meyering  <meyering@lucent.com>
31233
31234         * m4/gettext.m4: Fix typo in comment.
31235
31236         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
31237         textutils/configure.in).  Suggestion from Paul Eggert.
31238         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
31239
31240 2000-04-02  Paul Eggert  <eggert@twinsun.com>
31241
31242         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
31243         variable in the shell rather than using putenv, which isn't
31244         portable.  This avoids the configure-time inter-test dependency
31245         on the potentially-renamed putenv function.
31246
31247 2000-03-30  Paul Eggert  <eggert@twinsun.com>
31248
31249         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
31250         before checking struct stat.st_blksize, so that
31251         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
31252
31253 2000-03-29  Paul Eggert  <eggert@twinsun.com>
31254
31255         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
31256         since strftime.c uses HAVE_STRFTIME to decide whether to use
31257         the underlying strftime.
31258
31259 2000-03-29  Paul Eggert  <eggert@twinsun.com>
31260
31261         * lib/time/strftime.c (my_strftime): Make sure we call the system
31262         strftime, not ourselves, when invoking the underlying strftime.
31263
31264 2000-03-24  Jim Meyering  <meyering@lucent.com>
31265
31266         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
31267         (charset_alias): Define.
31268         (install-exec-local): Factor out common code.
31269         (uninstall-local): Split lines longer than 80.
31270         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
31271         (SUFFIXES): Define.
31272         (.sed.in.sed): New rule.  Don't redirect directly to $@.
31273         (CLEANFILES): Add ref-add.sed and ref-del.sed.
31274
31275 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
31276
31277         * lib/config.charset: Output a line containing "Packages using this
31278         file".
31279         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
31280         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
31281         ref-del.sed): New rules.
31282
31283 2000-03-17  Jim Meyering  <meyering@lucent.com>
31284
31285         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
31286         Otherwise, include <strings.h>
31287
31288 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
31289
31290         * lib/unicodeio.c (utf8_wctomb): New function.
31291         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
31292         format instead of in UCS-4 with platform dependent endianness.
31293
31294 2000-03-10  Jim Meyering  <meyering@lucent.com>
31295
31296         * m4/lib-check.m4: Look for getspnam in -lgen, too.
31297         From Marco Franzen.
31298
31299 2000-03-07  Paul Eggert  <eggert@twinsun.com>
31300
31301         * lib/savedir.c (savedir): Work even if directory size is
31302         negative; this can happen with some screwy NFS configurations.
31303
31304 2000-03-06  Jim Meyering  <meyering@lucent.com>
31305
31306         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
31307         if it's NULL (because we ran out of memory).  From Bruno Haible.
31308
31309 2000-03-05  Jim Meyering  <meyering@lucent.com>
31310
31311         * lib/localcharset.c ("path-concat.h"): Include.
31312         (get_charset_aliases): Use path_concat instead of ANSI string
31313         concatenation.
31314
31315         * lib/unicodeio.h (PARAMS): Define.
31316         Use it to guard prototype.
31317
31318 2000-03-04  Jim Meyering  <meyering@lucent.com>
31319
31320         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
31321         for lib/localcharset.c.
31322
31323 2000-03-04  Jim Meyering  <meyering@lucent.com>
31324
31325         * lib/Makefile.am (install-exec-local): Create $(libdir) before
31326         installing into it.
31327         (uninstall-local): Uncomment this rule so `make distcheck' works
31328         once again.
31329
31330         * lib/unicodeio.c (<errno.h>): Include it.
31331         (errno): Declare if not defined.
31332
31333         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
31334
31335         * lib/config.charset: New version, incorporating remarks from a linux
31336         i18n mailing list.  From Bruno Haible.
31337
31338 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
31339
31340         * m4/codeset.m4: New file.
31341         * m4/iconv.m4: New file.
31342         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
31343
31344 2000-03-03  Jim Meyering  <meyering@lucent.com>
31345
31346         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
31347
31348 2000-03-02  Jim Meyering  <meyering@lucent.com>
31349
31350         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
31351         the messages come out on separate lines.
31352
31353         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
31354         rather than jm_CHECK_DECLARATIONS.
31355         * m4/decl.m4: Remove now-unused file.
31356
31357         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
31358         geteuid.
31359
31360 2000-03-02  Jim Meyering  <meyering@lucent.com>
31361
31362         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
31363
31364 2000-03-01  Jim Meyering  <meyering@lucent.com>
31365
31366         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
31367         * lib/unicodeio.c: Likewise.
31368
31369 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
31370
31371         * lib/config.charset: New file.
31372         * lib/localcharset.c: New file.
31373         * lib/unicodeio.h, lib/unicodeio.c: New files.
31374         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
31375         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
31376         (noinst_HEADERS): Add unicodeio.h.
31377         (all-local, install-exec-local, charset.alias): New targets.
31378
31379 2000-02-28  Paul Eggert  <eggert@twinsun.com>
31380
31381         * lib/quotearg.c (ALERT_CHAR): New macro.
31382         (quotearg_buffer_restyled): Use it.
31383
31384 2000-02-27  Jim Meyering  <meyering@lucent.com>
31385
31386         * m4/check-decl.m4: Add getenv to the list.
31387
31388 2000-02-27  Jim Meyering  <meyering@lucent.com>
31389
31390         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
31391         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
31392
31393         * lib/backupfile.c: Guard inclusion of stdlib.h with
31394         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
31395         Declare malloc if needed.
31396
31397         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
31398         `#ifndef HAVE_DECL..'
31399         now that autoconf always defines the HAVE_DECL_ symbols.
31400         * lib/human.c: Likewise.
31401         * lib/same.c: Likewise.
31402         * lib/strtoumax.c: Likewise.
31403
31404         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
31405         declaration check was not run.
31406         * lib/hash.c: Likewise.
31407         * lib/human.c: Likewise.
31408         * lib/same.c: Likewise.
31409         * lib/strtoumax.c: Likewise.
31410
31411         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
31412         `.', then first look up the entire `.'-containing string as a login
31413         name.
31414
31415 2000-02-23  Jim Meyering  <meyering@lucent.com>
31416
31417         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
31418         in place of my hack.
31419
31420 2000-02-18  Paul Eggert  <eggert@twinsun.com>
31421
31422         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
31423         (textint): New typedef.
31424         (parser_control): Member year changed from int to textint.
31425         All uses changed.
31426         (YYSTYPE): Removed; replaced by %union with int and textint members.
31427         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
31428         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
31429         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
31430         (tSNUMBER, tUNUMBER): Now of type <textintval>.
31431         (date, number, to_year): Use width of number in digits, not its value,
31432         to determine whether it's a 2-digit year, or a 2-digit time.
31433         (yylex): Store number of digits of numeric tokens.
31434         Reported by John Kendall.
31435
31436         (parser_control): Changed from struct parser_control to typedef (for
31437         consistency).  All uses changed.
31438
31439         (tID): Removed; not used.
31440         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
31441
31442 2000-02-14  Paul Eggert  <eggert@twinsun.com>
31443
31444         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
31445         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
31446
31447 2000-02-12  Jim Meyering  <meyering@lucent.com>
31448
31449         * lib/userspec.c (ISDIGIT): Define it.
31450         (isdigit): Remove definition.
31451         (is_number): Use ISDIGIT, not isdigit.
31452         <libintl.h>: Include.
31453         (_ and N_): Define.
31454         (parse_user_spec): Mark translatable strings.
31455
31456 2000-02-10  Jim Meyering  <meyering@lucent.com>
31457
31458         With these changes, nanosleep.[ch] are finally enough like the other
31459         lib/* replacement files to compile on a few more losing systems.
31460
31461         * lib/nanosleep.h: Don't include config.h.
31462         Remove prototype from declaration of nanosleep.
31463         (PARAMS): Remove now-unneeded definition.
31464         * lib/nanosleep.c: #undef nanosleep.
31465         (rpl_nanosleep): Rename from nanosleep.
31466
31467 2000-02-10  Jim Meyering  <meyering@lucent.com>
31468
31469         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
31470         gnu_nanosleep to rpl_nanosleep.
31471
31472 2000-02-09  Jim Meyering  <meyering@lucent.com>
31473
31474         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
31475         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
31476
31477 2000-02-08  Akim Demaille  <akim@epita.fr>
31478
31479         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
31480         `[' and `]' and remove uses of `changequote'.
31481         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
31482         (AC_SYS_LARGEFILE): Likewise.
31483         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
31484         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
31485         of changequote.
31486         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
31487         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
31488         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
31489         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
31490
31491 2000-02-05  Jim Meyering  <meyering@lucent.com>
31492
31493         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
31494         Remove explicit use of AC_HEADER_TIME.  It is required by
31495         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
31496         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
31497         in autoconf whereby the expansion of the latter ended up preceding
31498         the expansion of its prerequisite, AC_HEADER_TIME.
31499         Reported by Volker Borchert.
31500
31501 2000-02-03  Jim Meyering  <meyering@lucent.com>
31502
31503         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
31504
31505 2000-02-03  Jim Meyering  <meyering@lucent.com>
31506
31507         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
31508         rather than with `#if HAVE_UTMPNAME'.
31509
31510 2000-02-02  Jim Meyering  <meyering@lucent.com>
31511
31512         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
31513         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
31514         Reported by Eli Zaretskii.
31515
31516 2000-02-01  Jim Meyering  <meyering@lucent.com>
31517
31518         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
31519
31520 2000-01-31  Jim Meyering  <meyering@lucent.com>
31521
31522         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
31523         functions.  Add the time.h and sys/time.h headers along with the
31524         AC_REQUIRE'ment of AC_HEADER_TIME.
31525
31526 2000-01-31  Jim Meyering  <meyering@lucent.com>
31527
31528         * lib/nanosleep.h (nanosleep): Guard declaration with
31529         `#if ! HAVE_DECL_NANOSLEEP'.
31530         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
31531         the declaration in that vendor's sys/timers.h.
31532         Reported by Christian Krackowizer.
31533
31534         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
31535         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
31536         (ISPRINT): Likewise.
31537         Reported by Tom Tromey.
31538
31539 2000-01-30  Jim Meyering  <meyering@lucent.com>
31540
31541         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
31542
31543         * m4/prereq.m4 (utmp_includes): Define.
31544         Check for ut_user and ut_name members in both struct utmpx
31545         and struct utmp.
31546
31547 2000-01-30  Jim Meyering  <meyering@lucent.com>
31548
31549         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
31550         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
31551         header files where only utmpx.ut_user is declared.
31552
31553         * lib/readutmp.h (UT_USER): Define.
31554
31555 2000-01-29  Jim Meyering  <meyering@lucent.com>
31556
31557         * m4/lib-check.m4: New file containing library-related checks from
31558         fileutils and sh-utils (textutils had none).
31559
31560 2000-01-28  Jim Meyering  <meyering@lucent.com>
31561
31562         * m4/perl.m4: Change format of warning message to look more like that
31563         from the missing script.  Suggestion from François Pinard.
31564
31565 2000-01-25  Jim Meyering  <meyering@lucent.com>
31566
31567         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
31568         well as time.h in the compile check.
31569         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
31570         Fix typo in cross-compiling case: s/yes/no/.
31571
31572 2000-01-23  Jim Meyering  <meyering@lucent.com>
31573
31574         * m4/jm-macros.m4: Move df-related tests here from
31575         fileutils/configure.in
31576
31577         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
31578         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
31579
31580         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
31581         s/space/ac_fsusage_space/.
31582         (jm_FILE_SYSTEM_USAGE): Take two parameters.
31583
31584         * m4/ftruncate.m4: New file (derived from part of
31585         fileutils/configure.in).
31586         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
31587         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
31588
31589         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
31590         AC_SUBST these here, rather than just in sh-util/configure.in, so
31591         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
31592         all the same.
31593         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
31594         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
31595         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
31596         (AC_SUBST(POW_LIBM)): Likewise.
31597         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
31598
31599 2000-01-23  Jim Meyering  <meyering@lucent.com>
31600
31601         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
31602         obstack.c.
31603
31604 2000-01-22  Jim Meyering  <meyering@lucent.com>
31605
31606         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
31607
31608         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
31609
31610         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
31611         configure.in
31612         (AC_CHECK_HEADERS): Likewise for sh-utils.
31613         (AC_CHECK_HEADERS): Likewise for textutils.
31614         Merge the three lists of headers.
31615
31616         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
31617         from fileutils' configure.in.
31618
31619         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
31620         code. Moved tests into their own function (_jm_DECL_HEADERS) in
31621         check-decl.m4.
31622
31623         * m4/check-decl.m4: Use #if rather than #ifdef.
31624         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
31625         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
31626         (_jm_DECL_HEADERS): Define new function.
31627         (jm_CHECK_DECLARATIONS): Require it.
31628
31629 2000-01-22  Jim Meyering  <meyering@lucent.com>
31630
31631         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
31632         [! HAVE_DECL_STRTOULL]: Declare strtoull.
31633         Required for some AIX systems.  Reported by Christian Krackowizer.
31634         [TESTING] (main): New function.
31635
31636         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
31637         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
31638         letters.
31639
31640         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
31641         iswprint.
31642
31643         * lib/strverscmp.c (ISDIGIT): Define.
31644         (strverscmp): Use ISDIGIT, not isdigit.
31645
31646 2000-01-19  Jim Meyering  <meyering@lucent.com>
31647
31648         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
31649         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
31650         defines `struct timespec' in <sys/time.h>
31651
31652         * m4/c-bs-a.m4: Remove uses of changequote altogether.
31653         Thanks to Akim for explaining.
31654
31655 2000-01-17  Paul Eggert  <eggert@twinsun.com>
31656
31657         * lib/nanosleep.c (nanosleep):
31658         Don't use SA_INTERRUPT to decide whether to call sigaction, as
31659         POSIX.1 doesn't require SA_INTERRUPT and some systems
31660         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
31661         it's been part of POSIX.1 since day 1 (in 1988).
31662
31663 2000-01-17  Jim Meyering  <meyering@lucent.com>
31664
31665         * lib/interlock: Remove unused file.  Reported by François Pinard.
31666
31667 2000-01-16  Paul Eggert  <eggert@twinsun.com>
31668
31669         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
31670         alert, backslash, formfeed, and vertical tab unnecessarily in
31671         shell quoting style.
31672
31673 2000-01-16  Jim Meyering  <meyering@lucent.com>
31674
31675         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
31676         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
31677         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
31678         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
31679
31680 2000-01-16  Jim Meyering  <meyering@lucent.com>
31681
31682         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
31683         because the latter didn't work.
31684
31685 2000-01-15  Jim Meyering  <meyering@lucent.com>
31686
31687         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
31688         (AC_REPLACE_FUNCS): Add memcpy and memset.
31689         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
31690         Add strpbrk.
31691         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
31692
31693 2000-01-12  Jim Meyering  <meyering@lucent.com>
31694
31695         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
31696         (jm_PREREQ): Use it.
31697         (jm_PREREQ_READUTMP): New macro.
31698         (jm_PREREQ): Use it.
31699
31700 2000-01-11  Paul Eggert  <eggert@twinsun.com>
31701
31702         Quote multibyte characters correctly.
31703         * m4/c-bs-a.m4: New file.
31704         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
31705         (jm_PREREQ): Use it.
31706
31707 2000-01-11  Paul Eggert  <eggert@twinsun.com>
31708
31709         * m4/uintmax_t.m4: Port to autoconf 2.13.
31710
31711 2000-01-08  Jim Meyering  <meyering@ascend.com>
31712
31713         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
31714         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
31715
31716 2000-01-04  Jim Meyering  <meyering@ascend.com>
31717
31718         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
31719         jm_STRUCT_DIRENT_D_TYPE.
31720         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
31721         jm_STRUCT_DIRENT_D_INO.
31722         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
31723         jm_STRUCT_UTIMBUF.
31724         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
31725         renamings.
31726         * m4/utime.m4: Likewise.
31727
31728         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
31729         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
31730
31731 2000-01-03  Paul Eggert  <eggert@twinsun.com>
31732
31733         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
31734         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
31735
31736 2000-01-02  Jim Meyering  <meyering@ascend.com>
31737
31738         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
31739         remember if this is necessary.
31740
31741 1999-12-26  Jim Meyering  <meyering@ascend.com>
31742
31743         * m4/jm-macros.m4: Use it here.
31744         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
31745
31746 1999-12-23  Jim Meyering  <meyering@ascend.com>
31747
31748         * m4/jm-macros.m4: Check for clock_gettime (moved from
31749         fileutils/configure.in)
31750         Check for gettimeofday.
31751
31752 1999-12-20  Jim Meyering  <meyering@ascend.com>
31753
31754         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
31755         autoconf-2.14a-1999-12-20.
31756
31757 1999-12-19  Jim Meyering  <meyering@ascend.com>
31758
31759         * m4/lstat-slash.m4: New file.
31760         * m4/jm-macros.m4: Use the new macro:
31761         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
31762
31763 1999-12-07  Jim Meyering  <meyering@ascend.com>
31764
31765         * m4/perl.m4: Require that File::Compare be available, too.
31766         Too many systems seem to lack it.
31767
31768         * m4/strftime.m4: Add checks for most of the cpp macros tested in
31769         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
31770
31771 1999-11-18  Paul Eggert  <eggert@twinsun.com>
31772
31773         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
31774         problem with the QNX 4.25 shell, which doesn't propagate exit
31775         status of failed commands inside shell assignments.
31776
31777 1999-11-17  Jim Meyering  <meyering@ascend.com>
31778
31779         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
31780
31781 1999-11-07  Jim Meyering  <meyering@ascend.com>
31782
31783         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
31784
31785 1999-11-06  Jim Meyering  <meyering@ascend.com>
31786
31787         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
31788         * m4/jm-macros.m4 (jm_MACROS): Use it here.
31789
31790 1999-11-05  Jim Meyering  <meyering@ascend.com>
31791
31792         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
31793         configure.in of textutils, fileutils, and sh-utils into this one
31794         (shared between those packages) file.
31795         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
31796         AC_STRUCT_ST_BLKSIZE.
31797
31798 1999-11-03  Jim Meyering  <meyering@ascend.com>
31799
31800         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
31801         of AC_CHECK_TYPE checks includes unistd.h.
31802         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
31803         Suggestion from Akim Demaille.
31804
31805 1999-10-30  Jim Meyering  <meyering@ascend.com>
31806
31807         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
31808         m4-quoted string.
31809         * m4/ls-mntd-fs.m4: Likewise.
31810         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
31811         * m4/jm-winsz1.m4: Likewise.
31812
31813         * m4/const.m4: Remove file, since the fix made it into the experimental
31814         version of autoconf.
31815         * m4/mktime.m4: Likewise.
31816
31817         * m4/check-type.m4: Remove file, now that the latest version of
31818         AC_CHECK_TYPE takes a third arg to specify additional #includes.
31819
31820         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
31821         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
31822         AC_CHECK_TYPE.
31823
31824 1999-10-04  Jim Meyering  <meyering@ascend.com>
31825
31826         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
31827
31828 1999-09-22  Paul Eggert  <eggert@twinsun.com>
31829
31830         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
31831         2.95.1 bug with HP-UX 10.20.
31832
31833 1999-09-17  Jim Meyering  <meyering@ascend.com>
31834
31835         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
31836         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
31837         due to missing strdup (against sh-utils-2.0).
31838
31839 1999-08-29  Jim Meyering  <meyering@ascend.com>
31840
31841         * m4/jm-macros.m4: Require jm_BISON.
31842         * m4/bison.m4: New file.
31843
31844 1999-08-17  Paul Eggert  <eggert@twinsun.com>
31845
31846         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
31847         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
31848
31849 1999-08-05  Jim Meyering  <meyering@ascend.com>
31850
31851         * m4/getline.m4: Rename test file from conftestdata to conftest.data
31852         to avoid conflicts with `conftest' on 8+3 filesystems.
31853         Suggestion from Eli Zaretskii.
31854
31855 1999-08-04  Jim Meyering  <meyering@ascend.com>
31856
31857         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
31858         fileutils and sh-utils (textutils's getline test was inadequate).
31859         (AM_FUNC_GETLINE): Run this test.
31860         (AC_CHECK_FUNCS): Check for getdelim.
31861         Reported by Bob Proulx.
31862
31863 1999-08-02  Jim Meyering  <meyering@ascend.com>
31864
31865         * m4/jm-macros.m4: Add a comment.
31866
31867 1999-08-01  Paul Eggert  <eggert@twinsun.com>
31868
31869         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
31870         <inttypes.h> defines strtoumax as a macro (and not as a
31871         function).
31872
31873 1999-08-01  Paul Eggert  <eggert@twinsun.com>
31874
31875         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
31876         that we can shift, multiply and divide unsigned long long
31877         values; Ultrix cc can't do it.
31878
31879 1999-08-01  Paul Eggert  <eggert@twinsun.com>
31880
31881         * m4/mktime.m4: New file, which is a preview of what should appear
31882         in the next public autoconf release.
31883
31884 1999-08-01  Paul Eggert  <eggert@twinsun.com>
31885
31886         * m4/lfs.m4: Remove this file.
31887         * m4/largefile.m4: New file.  It contains the old contents of
31888         lfs.m4, except that all names with prefix AC_LFS have been
31889         changed to use the prefix AC_SYS_LARGEFILE instead, to be
31890         compatible with future autoconf versions.  Also, some minor m4
31891         quoting problems have been fixed.
31892
31893 1999-08-01  Paul Eggert  <eggert@twinsun.com>
31894
31895         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
31896         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
31897         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
31898         and simplify the shell code.
31899
31900 1999-08-01  Jim Meyering  <meyering@ascend.com>
31901
31902         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
31903         m4.
31904
31905 1999-07-20  Jim Meyering  <meyering@ascend.com>
31906
31907         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
31908
31909 1999-07-15  Jim Meyering  <meyering@ascend.com>
31910
31911         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
31912
31913 1999-05-22  Jim Meyering  <meyering@ascend.com>
31914
31915         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
31916
31917 1999-05-20  Jim Meyering  <meyering@ascend.com>
31918
31919         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
31920         Add a colon after each `then' in case $4 is empty.
31921
31922 1999-05-16  Jim Meyering  <meyering@ascend.com>
31923
31924         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
31925
31926 1999-05-10  Jim Meyering  <meyering@ascend.com>
31927
31928         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
31929
31930         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
31931         AC_FUNC_MKTIME.
31932
31933 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
31934
31935         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
31936
31937 1999-05-04  Paul Eggert  <eggert@twinsun.com>
31938
31939         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
31940         not CPPFLAGS, so that linking works correctly in IRIX.
31941
31942 1999-04-30  Paul Eggert  <eggert@twinsun.com>
31943
31944         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
31945
31946 1999-04-20  Paul Eggert  <eggert@twinsun.com>
31947
31948         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
31949         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
31950         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
31951         jm_AC_TYPE_UNSIGNED_LONG_LONG.
31952         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
31953
31954         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
31955
31956 1999-04-20  Jim Meyering  <meyering@ascend.com>
31957
31958         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
31959         AC_REPLACE xstroull if necessary.  From Paul Eggert.
31960         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
31961
31962 1999-04-18  Jim Meyering  <meyering@ascend.com>
31963
31964         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
31965         * m4/jm-macros.m4: Use it.
31966
31967 1999-04-06  Jim Meyering  <meyering@ascend.com>
31968
31969         * m4/strftime.m4: Remove test for %f.
31970
31971 1999-03-29  Jim Meyering  <meyering@ascend.com>
31972
31973         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
31974         superset of the AC_TYPE_* checks in the textutils, fileutils,
31975         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
31976         AC_TYPE_PID_T.
31977
31978 1999-03-28  Jim Meyering  <meyering@ascend.com>
31979
31980         * m4/jm-macros.m4: Define GNU_PACKAGE here.
31981         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
31982         replaced e.g., in the *.sh files of the sh-utils.
31983
31984 1999-03-20  Jim Meyering  <meyering@ascend.com>
31985
31986         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
31987         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
31988         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
31989
31990 1999-03-19  Jim Meyering  <meyering@ascend.com>
31991
31992         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
31993
31994 1999-03-12  Jim Meyering  <meyering@ascend.com>
31995
31996         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
31997
31998 1999-03-07  Jim Meyering  <meyering@ascend.com>
31999
32000         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
32001         declared.
32002
32003 1999-02-17  Jim Meyering  <meyering@ascend.com>
32004
32005         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
32006         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
32007
32008 1999-02-07  Jim Meyering  <meyering@ascend.com>
32009
32010         * m4/group-member.m4: New file -- extracted from sh-utils'
32011         configure.in.
32012
32013         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
32014         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
32015
32016 1999-02-06  Jim Meyering  <meyering@ascend.com>
32017
32018         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
32019         * m4/fnmatch.m4: Likewise.
32020         * m4/getgroups.m4: Likewise.
32021         * m4/lstat.m4: Likewise.
32022         * m4/malloc.m4: Likewise.
32023         * m4/putenv.m4: Likewise.
32024         * m4/realloc.m4: Likewise.
32025         * m4/regex.m4: Likewise.
32026         * m4/stat.m4: Likewise.
32027         * m4/strftime.m4: Likewise.
32028         Suggestion from Alain Magloire.
32029
32030         * m4/chown.m4: Use `.$ac_objext', not `.o'.
32031         * m4/fnmatch.m4: Likewise.
32032         * m4/getgroups.m4: Likewise.
32033         * m4/getline.m4: Likewise.
32034         * m4/lstat.m4: Likewise.
32035         * m4/malloc.m4: Likewise.
32036         * m4/memcmp.m4: Likewise.
32037         * m4/putenv.m4: Likewise.
32038         * m4/realloc.m4: Likewise.
32039         * m4/regex.m4: Likewise.
32040         * m4/stat.m4: Likewise.
32041         * m4/strftime.m4: Likewise.
32042         Suggestion from Alain Magloire.
32043
32044         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
32045         an argument.
32046
32047         * m4/regex.m4: Add a run-time Test for proper operation of
32048         re_compile_pattern.
32049
32050 1999-01-31  Jim Meyering  <meyering@ascend.com>
32051
32052         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
32053
32054 1999-01-30  Jim Meyering  <meyering@ascend.com>
32055
32056         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
32057
32058         * m4/jm-mktime.m4: Make this a wrapper around the official
32059         AM_FUNC_MKTIME rather than my private copy, now that the official one
32060         is up to date.
32061         * m4/mktime.m4: Remove file.
32062
32063         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
32064         * m4/uptime.m4: Likewise.
32065         * m4/uintmax_t.m4: Likewise.
32066
32067 1999-01-28  Jim Meyering  <meyering@ascend.com>
32068
32069         * m4/jm-macros.m4: Use jm_AFS.
32070         * m4/afs.m4: New file (from fileutils' configure.in).
32071
32072         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
32073         * m4/chown.m4: Likewise.
32074         * m4/d-ino.m4: Likewise.
32075         * m4/d-type.m4: Likewise.
32076         * m4/fnmatch.m4: Likewise.
32077         * m4/getgroups.m4: Likewise.
32078         * m4/gettext.m4: Likewise.
32079         * m4/jm-mktime.m4: Likewise.
32080         * m4/jm-winsz2.m4: Likewise.
32081         * m4/lcmessage.m4: Likewise.
32082         * m4/ls-mntd-fs.m4: Likewise.
32083         * m4/malloc.m4: Likewise.
32084         * m4/memcmp.m4: Likewise.
32085         * m4/putenv.m4: Likewise.
32086         * m4/realloc.m4: Likewise.
32087         * m4/st_mtim.m4: Likewise.
32088         * m4/strftime.m4: Likewise.
32089
32090 1999-01-16  Jim Meyering  <meyering@ascend.com>
32091
32092         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
32093         (ARGMATCH_DIE_DECL): Define.
32094
32095 1999-01-12  Jim Meyering  <meyering@ascend.com>
32096
32097         * m4/Makefile.am.in: Rewrite to avoid using fmt.
32098         Reported by Lars Hecking.
32099
32100 1999-01-10  Jim Meyering  <meyering@ascend.com>
32101
32102         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
32103         gross kludge.
32104         * m4/inttypes_h.m4: Likewise.
32105         * m4/lstat.m4: Likewise.
32106         * m4/malloc.m4: Likewise.
32107         * m4/readdir.m4: Likewise.
32108         * m4/realloc.m4: Likewise.
32109         * m4/st_dm_mode.m4: Likewise.
32110         * m4/stat.m4: Likewise.
32111         * m4/utimbuf.m4: Likewise.
32112         * m4/utimes.m4: Likewise.
32113
32114         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
32115         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
32116         comments in config.h.in are meaningful.
32117
32118         * m4/jm-macros.m4: Require autoconf-2.13 here.
32119
32120         * m4/regex.m4: By default, don't use the included regex.c on systems
32121         with glibc 2.  Suggestion from Uli Drepper.
32122
32123 1999-01-02  Jim Meyering  <meyering@ascend.com>
32124
32125         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
32126
32127 1998-12-18  Jim Meyering  <meyering@ascend.com>
32128
32129         * m4/Makefile.am.in (Makefile.am): Simplify rule.
32130         Based on a suggestion from Lars Hecking.
32131
32132 1998-11-16  Paul Eggert  <eggert@twinsun.com>
32133
32134         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
32135
32136 1998-11-16  Jim Meyering  <meyering@ascend.com>
32137
32138         * m4/lfs.m4: Double-quote the `uname...` expression.
32139
32140 1998-11-14  Jim Meyering  <meyering@ascend.com>
32141
32142         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
32143         * m4/stat.m4: Likewise.
32144
32145 1998-11-03  Jim Meyering  <meyering@ascend.com>
32146
32147         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
32148         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
32149
32150 1998-10-18  Jim Meyering  <meyering@ascend.com>
32151
32152         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
32153
32154 1998-10-17  Jim Meyering  <meyering@ascend.com>
32155
32156         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
32157         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
32158         calls for those previously hard-coded headers.  Instead, take a new
32159         parameter.
32160         (jm_CHECK_DECLARATIONS): Reflect interface change.
32161         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
32162         (jm_CHECK_DECL_LOCALTIME_R): New macro.
32163
32164         * m4/mktime.m4: Test for spring-forward gap before long-running test.
32165
32166 1998-10-14  Jim Meyering  <meyering@ascend.com>
32167
32168         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
32169         instead of "TZ=America/Vancouver".  From Paul Eggert.
32170
32171 1998-10-11  Jim Meyering  <meyering@ascend.com>
32172
32173         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
32174         This adds a test for a recently added compatibility fix for mktime.c.
32175         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
32176
32177 1998-09-27  Jim Meyering  <meyering@ascend.com>
32178
32179         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
32180
32181         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
32182         ../configure.in, including a change from Gordon Matzigkeit to allow
32183         cross-compiling for the Hurd.
32184
32185         * m4/glibc.m4: New file/macro to test for the GNU C Library
32186         versions 1 and 2.  From Gordon Matzigkeit.
32187         Indent.
32188
32189 1998-09-21  Jim Meyering  <meyering@ascend.com>
32190
32191         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
32192
32193 1998-08-18  Paul Eggert  <eggert@twinsun.com>
32194
32195         Port nanosecond-resolution times to UnixWare 2.1.2 and
32196         pedantic Solaris 2.6.
32197
32198         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
32199         AC_STRUCT_ST_MTIM.
32200         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
32201         Generate name of ns member, instead of just 1 or undef.
32202         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
32203
32204 1998-08-15  Jim Meyering  <meyering@ascend.com>
32205
32206         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
32207         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
32208         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
32209         instead of jm_TYPE_SSIZE_T.
32210
32211 1998-08-12  Jim Meyering  <meyering@ascend.com>
32212
32213         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
32214
32215 1998-08-02  Jim Meyering  <meyering@ascend.com>
32216
32217         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
32218         in acconfig.h manually.
32219
32220 1998-07-31  Paul Eggert  <eggert@twinsun.com>
32221
32222         * m4/st_mtim.m4: New file.
32223
32224 1998-07-28  Jim Meyering  <meyering@ascend.com>
32225
32226         * m4/utimes.m4: Undef stat.
32227
32228 1998-07-25  Jim Meyering  <meyering@ascend.com>
32229
32230         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
32231         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
32232
32233 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
32234
32235         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
32236         uid and gid actually remain unchanged.
32237
32238 1998-07-07  Jim Meyering  <meyering@ascend.com>
32239
32240         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
32241
32242 1998-07-04  Jim Meyering  <meyering@ascend.com>
32243
32244         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
32245         to prove that this macro can be used in packages without regex.c.
32246
32247 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
32248
32249         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
32250         is to be used.
32251
32252 1998-07-03  Jim Meyering  <meyering@ascend.com>
32253
32254         * m4/gettext.m4: Add -lintl if it's found to be necessary.
32255
32256         * m4/gettext.m4: New file -- from gettext-0.10.35.
32257         * m4/lcmessage.m4: Likewise.
32258         * m4/progtest.m4: Likewise.
32259
32260         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
32261         * m4/jm-macros.m4: Require the new macro.
32262
32263 1998-06-29  Jim Meyering  <meyering@ascend.com>
32264
32265         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
32266         for the definition of NGROUPS (used in a system header included
32267         by sys/mount.h).
32268
32269 1998-06-28  Jim Meyering  <meyering@ascend.com>
32270
32271         * m4/ls-mntd-fs.m4: New file.
32272         * m4/fstypename.m4: New file.
32273
32274         * m4/jm-macros.m4: Require the new macro.
32275         * m4/jm-glibc-io.m4: New file.
32276
32277 1998-05-19  Jim Meyering  <meyering@ascend.com>
32278
32279         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
32280         * m4/lchown.m4: New file.
32281
32282         * m4/Makefile.am.in: New file.
32283         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
32284
32285 1998-05-14  Jim Meyering  <meyering@ascend.com>
32286
32287         * m4/Makefile.am (EXTRA_DIST): Add them.
32288         * m4/jm-macros.m4: New file.
32289         * m4/utimbuf.m4: New file.
32290
32291 1998-05-12  Jim Meyering  <meyering@ascend.com>
32292
32293         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
32294
32295 1998-05-11  Jim Meyering  <meyering@ascend.com>
32296
32297         * m4/isc-posix.m4: New file.
32298
32299 1998-05-10  Jim Meyering  <meyering@ascend.com>