New module 'isnanl-nolibm'.
[gnulib.git] / ChangeLog
1 2007-02-24  Bruno Haible  <bruno@clisp.org>
2
3         * modules/isnanl-nolibm: New file.
4         * lib/isnanl.h: New file.
5         * lib/isnanl.c: New file.
6         * m4/isnanl.m4: New file.
7
8 2007-02-24  Bruno Haible  <bruno@clisp.org>
9
10         * modules/isnan-nolibm-tests: New file.
11         * tests/test-isnan.c: New file.
12
13         * modules/isnan-nolibm: New file.
14         * lib/isnan.h: New file.
15         * lib/isnan.c: New file.
16         * m4/isnan.m4: New file.
17
18 2007-02-24  Bruno Haible  <bruno@clisp.org>
19
20         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
21         assume that an exponent fits in 20 bits.
22
23 2007-02-24  Jim Meyering  <jim@meyering.net>
24
25         * m4/regex.m4: Update the description of the configure-time option,
26         --without-included-regex, to state accurately what the defaults are,
27         and perhaps to give people an idea why using this option is risky.
28
29 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
30
31         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
32         loops on small arguments.  This attempts to avoid the problem
33         Bruno Haible reported for AIX 4.3.2 in
34         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00309.html>.
35
36 2007-02-23  Bruno Haible  <bruno@clisp.org>
37
38         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
39         Needed for help2man.
40
41 2007-02-23  Karl Berry  <karl@gnu.org>
42
43         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
44         exists, foo.h should be cvs-ignored, not committed.
45
46 2007-02-23  Eric Blake  <ebb9@byu.net>
47
48         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
49         * lib/stat-time.h (includes): Likewise.
50         * lib/utimecmp.c (includes): Likewise.
51         * lib/utimens.h (includes): Likewise.
52         * lib/getdate.y (includes): Also include "timespec.h" for use
53         internal to the module.
54         * modules/utimens (Depends-on): Revert yesterday's patch.
55         * modules/nanosleep (Depends-on): Add missing dependency.
56
57 2007-02-22  Bruno Haible  <bruno@clisp.org>
58
59         * lib/glob.c: Don't include getlogin_r.h.
60
61 2007-02-22  Jim Meyering  <jim@meyering.net>
62
63         * modules/utimens (Depends-on): Add timespec, required for
64         utimens.h's inclusion of timespec.h.
65
66 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
67
68         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
69         long unreadable paths in GNU/Linux.  Problem reported by Andreas
70         Schwab in
71         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
72         I'll try to think of a better way to fix the Solaris problem.
73
74         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
75         like glibc; on Solaris 10, it fails with errno == EINVAL.
76         POSIX says the behavior is unspecified if the first argument is NULL,
77         so play it safe and never pass NULL to the system getcwd.
78
79 2007-02-21  Jim Meyering  <jim@meyering.net>
80
81         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
82         of gettimeofday.  It would conflict with the one now always
83         provided via sys_time_.h.  Reported by Matthew Woehlke, as
84         an IRIX 6.5 build failure.
85
86 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
87
88         Minor fixups to port to Solaris 10 with Sun C 5.8.
89         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
90         * modules/getcwd (Depends-on): Add dirfd.
91         * lib/putenv.c (putenv): #undef it.
92         (rpl_putenv): New decl.
93         (malloc, free): Include <stdlib.h> rather than prototyping separately.
94
95 2007-02-20  Bruno Haible  <bruno@clisp.org>
96
97         * modules/stdio-tests: New file.
98         * tests/test-stdio.c: New file.
99
100         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
101         (Depends-on): Add stdio.
102         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
103         (Include): Use <stdio.h> instead of vsnprintf.h.
104         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
105         HAVE_DECL_VSNPRINTF.
106         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
107
108         * modules/snprintf (Files): Remove lib/snprintf.h.
109         (Depends-on): Add stdio.
110         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
111         (Include): Use <stdio.h> instead of snprintf.h.
112         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
113         HAVE_DECL_SNPRINTF.
114         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
115         * lib/getaddrinfo.c: Likewise.
116
117         * modules/stdio: New file.
118         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
119         * lib/snprintf.h: Remove file.
120         * lib/vsnprintf.h: Remove file.
121         * lib/.cppi-disable: Remove snprintf.h.
122         * m4/stdio_h.m4: New file.
123         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
124
125 2007-02-20  Jim Meyering  <jim@meyering.net>
126
127         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
128         used by e.g., mingw.  From Bruno Haible.
129
130 2007-02-19  Bruno Haible  <bruno@clisp.org>
131
132         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
133         warnings.
134         Reported by Ben Pfaff <blp@cs.stanford.edu>.
135
136 2007-02-19  Bruno Haible  <bruno@clisp.org>
137
138         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
139         from mingw users.
140
141 2007-02-19  Bruno Haible  <bruno@clisp.org>
142
143         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
144         warnings.
145         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
146
147 2007-02-19  Jim Meyering  <jim@meyering.net>
148
149         Don't use FD after a successful "fdopendir (fd)".
150         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
151         Reset it by calling dirfd on the just-obtained DIR*.
152
153         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
154         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
155
156 2007-02-18  Bruno Haible  <bruno@clisp.org>
157
158         * lib/readlink.c: Include <unistd.h>.
159         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
160         HAVE_READLINK.
161         * modules/readlink (Depends-on): Add unistd.
162         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
163         (Include): Add <unistd.h>.
164
165         * lib/getlogin_r.h: Remove file.
166         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
167         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
168         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
169         HAVE_DECL_GETLOGIN_R.
170         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
171         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
172         (Include): Use <unistd.h> instead of getlogin_r.h.
173
174         * lib/getcwd.h: Remove file.
175         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
176         * lib/xgetcwd.c: Likewise.
177         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
178         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
179         * modules/getcwd (Files): Remove lib/getcwd.h.
180         (Depends-on): Add unistd.
181         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
182         (Include): Use <unistd.h> instad of getcwd.h.
183
184         * lib/ftruncate.c: Include <unistd.h> first.
185         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
186         Set HAVE_FTRUNCATE.
187         * modules/ftruncate (Depends-on): Add unistd.
188         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
189
190         * lib/fchdir.c: Include <unistd.h> first.
191         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
192         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
193         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
194         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
195         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
196
197         * lib/dup2.c: Include <unistd.h> first.
198         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
199         HAVE_DUP2.
200         * modules/dup2 (Depends-on): Add unistd.
201         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
202
203         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
204         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
205         REPLACE_CHOWN. Don't define chown as a macro here.
206         * modules/chown (Depends-on): Add unistd.
207         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
208
209         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
210         Add definition for GL_LINK_WARNING.
211         (chown, dup2): New declarations.
212         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
213         link warning.
214         (ftruncate): New declaration.
215         (getcwd): New declaration, taken from old getcwd.h.
216         (getlogin_r): New declaration, taken from old getlogin_r.h.
217         (readlink): New declaration.
218         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
219         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
220         (gl_PREREQ_UNISTD): Remove macro.
221         (gl_UNISTD_MODULE_INDICATOR): New macro.
222         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
223         many new variables. Don't set UNISTD_H.
224         * modules/unistd (Description): Change.
225         (Depends-on): Add link-warning.
226         (configure.ac): Update.
227         (Makefile.am): Create unistd.h always. Substitute many new variables
228         into it.
229
230 2007-02-18  Bruno Haible  <bruno@clisp.org>
231
232         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
233         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
234         HAVE_GETSUBOPT.
235         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
236         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
237         * lib/getsubopt.h: Remove file.
238         * modules/getsubopt (Files): Remove lib/getsubopt.h.
239         (Depends-on): Add stdlib.
240         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
241         (Includes): Use <stdlib.h> instead of getsubopt.h.
242         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
243         Set HAVE_GETSUBOPT.
244         * lib/getsubopt.c: Don't include getsubopt.h.
245
246 2007-02-18  Bruno Haible  <bruno@clisp.org>
247
248         * modules/fchdir (Depends-on): Add dup2.
249
250 2007-02-18  Bruno Haible  <bruno@clisp.org>
251
252         * lib/stdlib_.h: Handle glibc's special invocation convention
253         specially.
254
255 2007-02-18  Bruno Haible  <bruno@clisp.org>
256
257         * modules/stdlib-tests: New file.
258         * tests/test-stdlib.c: New file.
259
260         * modules/mkstemp (Files): Remove lib/mkstemp.h.
261         (Depends-on): Add stdlib.
262         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
263         (Includes): Use <stdlib.h> instead of mkstemp.h.
264         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
265         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
266         * lib/mkstemp.c: Don't include mkstemp.h.
267         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
268         * lib/stdlib--.h: Don't include mkstemp.h.
269
270         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
271         (Depends-on): Add stdlib.
272         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
273         (Includes): Use <stdlib.h> instead of mkdtemp.h.
274         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
275         HAVE_MKDTEMP.
276         * lib/mkdtemp.c: Don't include mkdtemp.h.
277         * lib/clean-temp.c: Don't include mkdtemp.h.
278
279         * modules/exit (Files): Remove lib/exit.h.
280         (Depends-on): Add stdlib.
281         (Makefile.am): Remove lib_SOURCES.
282         (Include): Use <stdlib.h> instead of exit.h.
283         * lib/argmatch.c: Don't include exit.h.
284         * lib/execute.c: Likewise.
285         * lib/pagealign_alloc.c: Likewise.
286         * lib/pipe.c: Likewise.
287         * lib/wait-process.c: Likewise.
288         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
289         * lib/exitfail.c: Likewise.
290         * lib/savewd.c: Likewise.
291         * lib/xsetenv.c: Likewise.
292
293         * modules/stdlib: New file.
294         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
295         and extra comments about mkstemp().
296         * lib/exit.h: Remove file.
297         * lib/mkdtemp.h: Remove file.
298         * lib/mkstemp.h: Remove file.
299         * m4/stdlib_h.m4: New file.
300         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
301
302 2007-02-18  Bruno Haible  <bruno@clisp.org>
303
304         * modules/math-tests: New file.
305         * tests/test-math.c: New file.
306
307         * modules/math: New file.
308         * modules/mathl (Files): Remove lib/mathl.h.
309         (Depends-on): Add math.
310         (Makefile.am): Don't mention mathl.h.
311         (Include): Use <math.h> instead of mathl.h.
312         * lib/math_.h: New file.
313         * lib/mathl.h: Remove file.
314         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
315         mathl.h.
316         * lib/asinl.c: Likewise.
317         * lib/atanl.c: Likewise.
318         * lib/ceill.c: Likewise.
319         * lib/cosl.c: Likewise.
320         * lib/expl.c: Likewise.
321         * lib/floorl.c: Likewise.
322         * lib/frexpl.c: Likewise.
323         * lib/ldexpl.c: Likewise.
324         * lib/logl.c: Likewise.
325         * lib/sincosl.c: Likewise.
326         * lib/sinl.c: Likewise.
327         * lib/sqrtl.c: Likewise.
328         * lib/tanl.c: Likewise.
329         * lib/trigl.c: Likewise.
330         * m4/math_h.m4: New file.
331         * MODULES.html.sh (Mathematics): Add math.
332
333 2007-02-17  Bruno Haible  <bruno@clisp.org>
334
335         * modules/wctype-tests: New file.
336         * tests/test-wctype.c: New file.
337
338         * modules/wchar-tests: New file.
339         * tests/test-wchar.c: New file.
340
341         * modules/unistd-tests: New file.
342         * tests/test-unistd.c: New file.
343
344         * modules/time-tests: New file.
345         * tests/test-time.c: New file.
346
347         * modules/sysexits-tests: New file.
348         * tests/test-sysexits.c: New file.
349
350         * modules/sys_time-tests: New file.
351         * tests/test-sys_time.c: New file.
352
353         * modules/sys_stat-tests: New file.
354         * tests/test-sys_stat.c: New file.
355
356         * modules/sys_socket-tests: New file.
357         * tests/test-sys_socket.c: New file.
358
359         * modules/sys_select-tests: New file.
360         * tests/test-sys_select.c: New file.
361
362         * modules/string-tests: New file.
363         * tests/test-string.c: New file.
364
365         * modules/stdbool-tests: New file.
366         * tests/test-stdbool.c: New file.
367
368         * modules/netinet_in-tests: New file.
369         * tests/test-netinet_in.c: New file.
370
371         * modules/inttypes-tests: New file.
372         * tests/test-inttypes.c: New file.
373
374         * modules/fcntl-tests: New file.
375         * tests/test-fcntl.c: New file.
376
377         * modules/byteswap-tests: New file.
378         * tests/test-byteswap.c: New file.
379
380         * modules/arpa_inet-tests: New file.
381         * tests/test-arpa_inet.c: New file.
382
383 2007-02-17  Bruno Haible  <bruno@clisp.org>
384
385         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
386         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
387         if the corresponding module is not enabled. Emit link warnings if
388         the function is used nevertheless.
389         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
390         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
391         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
392         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
393         * modules/inttypes (Depends-on): Add link-warning.
394         (Makefile.am): Copy the contents of build-aux/link-warning.h into
395         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
396         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
397         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
398         * modules/imaxdiv (configure.ac): Likewise.
399         * modules/strtoimax (configure.ac): Likewise.
400         * modules/strtoumax (configure.ac): Likewise.
401
402 2007-02-17  Bruno Haible  <bruno@clisp.org>
403
404         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
405         gl_STRING_MODULE_INDICATOR_DEFAULTS.
406         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
407         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
408
409 2007-02-17  Bruno Haible  <bruno@clisp.org>
410
411         * modules/link-warning: New file.
412         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
413         * lib/string_.h (GL_LINK_WARNING): Remove definition.
414         * modules/string (Depends-on): Add link-warning.
415         (Makefile.am): Copy the contents of build-aux/link-warning.h into
416         string.h.
417         * MODULES.html.sh (Support for building libraries and executables): Add
418         link-warning.
419
420 2007-02-17  Bruno Haible  <bruno@clisp.org>
421
422         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
423         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
424         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
425         long lines.
426
427 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
428             Bruno Haible  <bruno@clisp.org>
429
430         * modules/tmpfile: New file.
431         * lib/tmpfile.c: New file.
432         * m4/tmpfile.m4: New file.
433         * MODULES.html.sh (func_all_modules): New section "Input/output".
434
435 2007-02-15  Bruno Haible  <bruno@clisp.org>
436
437         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
438         (supports_delete_on_close): New function.
439         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
440
441 2007-02-14  Bruno Haible  <bruno@clisp.org>
442
443         * modules/mbspcasecmp-tests: New file.
444         * tests/test-mbspcasecmp.sh: New file.
445         * tests/test-mbspcasecmp.c: New file.
446
447         New module mbspcasecmp.
448         * modules/mbspcasecmp: New file.
449         * lib/mbspcasecmp.c: New file.
450         * lib/string_.h (strncasecmp): Change warning message.
451         (mbspcasecmp): New declaration.
452         * m4/mbspcasecmp.m4: New file.
453         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
454         GNULIB_MBSPCASECMP.
455         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
456         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
457
458 2007-02-14  Bruno Haible  <bruno@clisp.org>
459
460         * modules/mbsncasecmp-tests: New file.
461         * tests/test-mbsncasecmp.sh: New file.
462         * tests/test-mbsncasecmp.c: New file.
463
464         New module mbsncasecmp.
465         * modules/mbsncasecmp: New file.
466         * lib/mbsncasecmp.c: New file.
467         * lib/string_.h (mbsncasecmp): New declaration.
468         * m4/mbsncasecmp.m4: New file.
469         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
470         GNULIB_MBSNCASECMP.
471         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
472         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
473
474 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
475
476         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
477         Verify that it doesn't overlap with our flags.
478         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
479         do not have the desired effect in multibyte locales; instead, use
480         mbscasecmp.
481         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
482         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
483         we don't require GNU fnmatch ourselves (if our users require it, they
484         should do so explicitly).
485
486         Fix regex code so it doesn't rely on strcasecmp.
487         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
488         Otherwise, include gnulib's langinfo.h.
489         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
490         undesirable behavior in non-C locales.  Instead, rely on localecharset.
491         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
492         * modules/regex (FILES): Remove m4/codeset.m4.
493         (Depends-on): Add localcharset.  Remove strcase.
494
495 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
496
497         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
498         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
499
500 2007-02-13  Bruno Haible  <bruno@clisp.org>
501
502         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
503         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
504
505 2007-02-12  Bruno Haible  <bruno@clisp.org>
506
507         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
508         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
509         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
510         time warning rather than a link error.
511
512 2007-02-12  Bruno Haible  <bruno@clisp.org>
513
514         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
515         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
516         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
517
518 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
519
520         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
521         args, not 2.
522
523 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
524
525         New module 'time', so that apps can include <time.h> as per
526         POSIX and GNU instead of separate include files like time_r.h
527         and timegm.h.  This implementation tries out a simpler approach
528         for replacing decls in standard include files (as compared to
529         the string module), somewhat as an experiment.
530
531         * config/srclist.txt: Comment out mktime.c for now.
532         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
533         since it doesn't apply any more.  Use generic wording instead.
534         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
535         'time'.
536         * lib/time_.h, m4/time_h.m4, modules/time: New files.
537         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
538         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
539         Don't include <sys/types.h>; no longer needed since we assume C89.
540         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
541         * lib/strftime.c: Likewise.
542         * lib/time_r.c: Likewise.
543         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
544         * lib/nanosleep.c: Include <time.h> first, to check interface.
545         * lib/strptime.c: Likewise.
546         * lib/time_r.c: Likewise.
547         * lib/timegm.c: Likewise.
548         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
549         needed.
550         * lib/timegm.c: Don't include timegm.h; no longer needed.
551         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
552         time.h now handles any problems in that area.
553         (struct timespec, nanosleep): Remove; time.h now arranges for these.
554         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
555         that time.h defines struct timespec.
556         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
557         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
558         handles that.
559         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
560         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
561         needed.  Set REPLACE_LOCALTIME.
562         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
563         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
564         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
565         nanosleep; time_h.m4 now does that.  Don't require
566         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
567         module handles this now.
568         * modules/getdate (Depends-on): Remove timespec.  Add time.
569         * modules/nanosleep (Depends-on): Likewise.
570         * modules/stat-time (Depends-on): Likewise.
571         * modules/nanosleep (Include): Include time.h, not timespec.h.
572         * modules/strptime (Files): Remove lib/strptime.h.
573         (Depends-on): Add extensions, time.
574         (Include): Include time.h, not strptime.h.
575         * modules/time_r (Files): Remove lib/time_r.h.
576         (Depends-on): Add time.
577         (Include): Include time.h, not time_r.h.
578         * modules/timegm: Likewise.
579         * modules/timespec (Description): Now does timespec-related decls
580         of our own, instead of struct timespec itself.
581         (Depends-on): Add time; remove extensions.
582         (Maintainer): Add self.
583         * modules/utimecmp (Depends-on): Add time; remove timespec.
584         * modules/utimens (Depends-on): Likewise.
585         * modules/xnanosleep (Depends-on): Likewise.
586
587 2007-02-11  Bruno Haible  <bruno@clisp.org>
588
589         * lib/c-strstr.c: Include allocsa.h.
590         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
591         * lib/c-strcasestr.c: Include allocsa.h.
592         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
593         * lib/strcasestr.c: Include allocsa.h.
594         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
595         * lib/mbsstr.c: Include allocsa.h.
596         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
597         allocsa/freesa instead of malloc/free.
598         * lib/mbscasestr.c: Include allocsa.h.
599         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
600         allocsa/freesa instead of malloc/free.
601         * modules/c-strstr (Depends-on): Add allocsa.
602         * modules/c-strcasestr (Depends-on): Likewise.
603         * modules/strcasestr (Depends-on): Likewise.
604         * modules/mbsstr (Depends-on): Likewise.
605         * modules/mbscasestr (Depends-on): Likewise.
606
607 2007-02-11  Bruno Haible  <bruno@clisp.org>
608
609         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
610
611         * modules/mbsspn-tests: New file.
612         * tests/test-mbsspn.sh: New file.
613         * tests/test-mbsspn.c: New file.
614
615 2007-02-11  Bruno Haible  <bruno@clisp.org>
616
617         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
618
619         * modules/mbspbrk-tests: New file.
620         * tests/test-mbspbrk.sh: New file.
621         * tests/test-mbspbrk.c: New file.
622
623 2007-02-11  Bruno Haible  <bruno@clisp.org>
624
625         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
626         unneeded cast.
627
628         * modules/mbscspn-tests: New file.
629         * tests/test-mbscspn.sh: New file.
630         * tests/test-mbscspn.c: New file.
631
632 2007-02-11  Bruno Haible  <bruno@clisp.org>
633
634         * modules/mbscasecmp-tests: New file.
635         * tests/test-mbscasecmp.sh: New file.
636         * tests/test-mbscasecmp.c: New file.
637
638 2007-02-11  Bruno Haible  <bruno@clisp.org>
639
640         Ensure O(n) worst-case complexity of mbscasestr.
641         * lib/mbscasestr.c: Include stdbool.h.
642         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
643         functions.
644         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
645         the bookkeeping indicates that it's worth it.
646         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
647
648         * modules/mbscasestr-tests: New file.
649         * tests/test-mbscasestr1.c: New file.
650         * tests/test-mbscasestr2.sh: New file.
651         * tests/test-mbscasestr2.c: New file.
652         * tests/test-mbscasestr3.sh: New file.
653         * tests/test-mbscasestr3.c: New file.
654         * tests/test-mbscasestr4.sh: New file.
655         * tests/test-mbscasestr4.c: New file.
656         * m4/locale-tr.m4: New file.
657
658 2007-02-11  Bruno Haible  <bruno@clisp.org>
659
660         Ensure O(n) worst-case complexity of mbsstr.
661         * lib/mbsstr.c: Include stdbool.h.
662         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
663         functions.
664         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
665         bookkeeping indicates that it's worth it.
666         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
667
668         * modules/mbsstr-tests: New file.
669         * tests/test-mbsstr1.c: New file.
670         * tests/test-mbsstr2.sh: New file.
671         * tests/test-mbsstr2.c: New file.
672         * tests/test-mbsstr3.sh: New file.
673         * tests/test-mbsstr3.c: New file.
674         * m4/locale-fr.m4: New file.
675
676 2007-02-11  Bruno Haible  <bruno@clisp.org>
677
678         * lib/mbsrchr.c (mbsrchr): Fix bug.
679
680         * modules/mbsrchr-tests: New file.
681         * tests/test-mbsrchr.sh: New file.
682         * tests/test-mbsrchr.c: New file.
683
684 2007-02-11  Bruno Haible  <bruno@clisp.org>
685
686         * lib/mbschr.c (mbschr): Fix bug.
687
688         * modules/mbschr-tests: New file.
689         * tests/test-mbschr.sh: New file.
690         * tests/test-mbschr.c: New file.
691         * m4/locale-zh.m4: New file.
692
693 2007-02-11  Bruno Haible  <bruno@clisp.org>
694
695         Support for copying multibyte string iterators.
696         * lib/mbiter.h: Include <string.h>.
697         (mbiter_multi_copy): New function.
698         (mbi_copy): New macro.
699         * lib/mbuiter.h: Include <string.h>.
700         (mbuiter_multi_copy): New function.
701         (mbui_copy): New macro.
702
703 2007-02-11  Bruno Haible  <bruno@clisp.org>
704
705         New module mbslen.
706         * modules/mbslen: New file.
707         * lib/mbslen.c: New file.
708         * lib/string_.h (mbslen): New declaration.
709         * m4/mbslen.m4: New file.
710         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
711         GNULIB_MBSLEN.
712         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
713         * MODULES.html.sh (Internationalization functions): Add mbslen.
714
715 2007-02-11  Bruno Haible  <bruno@clisp.org>
716
717         Ensure O(n) worst-case complexity of strcasestr substitute.
718         * lib/strcasestr.c: Include stdbool.h.
719         (knuth_morris_pratt): New function.
720         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
721         bookkeeping indicates that it's worth it.
722         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
723
724         * modules/strcasestr-tests: New file.
725         * tests/test-strcasestr.c: New file.
726
727 2007-02-11  Bruno Haible  <bruno@clisp.org>
728
729         Ensure O(n) worst-case complexity of c_strcasestr.
730         * lib/c-strcasestr.c: Include stdbool.h, string.h.
731         (knuth_morris_pratt): New function.
732         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
733         the bookkeeping indicates that it's worth it.
734         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
735
736         * modules/c-strcasestr-tests: New file.
737         * tests/test-c-strcasestr.c: New file.
738
739 2007-02-11  Bruno Haible  <bruno@clisp.org>
740
741         Ensure O(n) worst-case complexity of c_strstr.
742         * lib/c-strstr.c: Include stdbool.h, string.h.
743         (knuth_morris_pratt): New function.
744         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
745         bookkeeping indicates that it's worth it.
746         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
747
748         * lib/c-strstr.c: Complete rewrite for maintainability.
749
750         * modules/c-strstr-tests: New file.
751         * tests/test-c-strstr.c: New file.
752
753 2007-02-11  Bruno Haible  <bruno@clisp.org>
754
755         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
756         5.2.1 and earlier, whereby \055 was treated just like the range
757         delimiter '-'.
758         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
759
760 2007-02-08  Bruno Haible  <bruno@clisp.org>
761
762         * modules/regex (Depends-on): Add stdbool.
763         Reported by Dalibor Topic <robilad@kaffe.org>.
764
765 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
766
767         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
768         Prefer returning from main to exiting from it.
769         Remove unnecessary parens after sizeof.
770
771 2007-02-05  Bruno Haible  <bruno@clisp.org>
772
773         New module mbssep.
774         * modules/mbssep: New file.
775         * lib/mbssep.c: New file.
776         * lib/string_.h (strsep): Add a conditional link warning.
777         (mbssep): New declaration.
778         * m4/mbssep.m4: New file.
779         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
780         GNULIB_MBSSEP.
781         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
782         * MODULES.html.sh (Internationalization functions): Add mbssep.
783
784 2007-02-05  Bruno Haible  <bruno@clisp.org>
785
786         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
787         Optimize search in case of 1 delimiter.
788
789 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
790
791         * lib/acl.h: Include sys/types.h before sys/acl.h.
792
793 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
794
795         Merge upstream fix for glibc bugzilla #3957:
796
797         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
798
799         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
800         bit for RE_HAT_LISTS_NOT_NEWLINE.
801         (build_charclass_op): Remove bogus comment.
802
803 2007-02-05  Simon Josefsson  <simon@josefsson.org>
804
805         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
806
807 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
808
809         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
810         * lib/memmem.c [!defined _LIBC]: Include config.h.
811
812 2007-02-04  Bruno Haible  <bruno@clisp.org>
813
814         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
815         warning message.
816
817 2007-02-04  Bruno Haible  <bruno@clisp.org>
818
819         New module mbstok_r.
820         * modules/mbstok_r: New file.
821         * lib/mbstok_r.c: New file.
822         * lib/string_.h (strtok_r): Change argument names to match the
823         comments. Add a conditional link warning.
824         (mbstok_r): New declaration.
825         * m4/mbstok_r.m4: New file.
826         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
827         GNULIB_MBSTOK_R.
828         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
829         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
830
831 2007-02-04  Bruno Haible  <bruno@clisp.org>
832
833         New module mbsspn.
834         * modules/mbsspn: New file.
835         * lib/mbsspn.c: New file.
836         * lib/string_.h (strspn): Add a conditional link warning.
837         (mbsspn): New declaration.
838         * m4/mbsspn.m4: New file.
839         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
840         GNULIB_MBSSPN.
841         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
842         * MODULES.html.sh (Internationalization functions): Add mbsspn.
843
844 2007-02-04  Bruno Haible  <bruno@clisp.org>
845
846         New module mbspbrk.
847         * modules/mbspbrk: New file.
848         * lib/mbspbrk.c: New file.
849         * lib/string_.h (strpbrk): Add a conditional link warning.
850         (mbspbrk): New declaration.
851         * m4/mbspbrk.m4: New file.
852         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
853         GNULIB_MBSPBRK.
854         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
855         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
856
857 2007-02-04  Bruno Haible  <bruno@clisp.org>
858
859         New module mbscspn.
860         * modules/mbscspn: New file.
861         * lib/mbscspn.c: New file.
862         * lib/string_.h (strcspn): Add a conditional link warning.
863         (mbscspn): New declaration.
864         * m4/mbscspn.m4: New file.
865         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
866         GNULIB_MBSCSPN.
867         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
868         * MODULES.html.sh (Internationalization functions): Add mbscspn.
869
870 2007-02-04  Bruno Haible  <bruno@clisp.org>
871
872         New module mbscasestr, reduced goal of strcasestr.
873         * modules/mbscasestr: New file.
874         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
875         (mbscasestr): Renamed from strcasestr.
876         * lib/strcasestr.c: Don't include mbuiter.h.
877         (strcasestr): Remove support for multibyte locales.
878         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
879         Change the conditional link warning.
880         (mbscasestr): New declaration.
881         * m4/mbscasestr.m4: New file.
882         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
883         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
884         REPLACE_STRCASESTR.
885         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
886         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
887         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
888         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
889         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
890         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
891         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
892         (Depends-on): Remove mbuiter.
893         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
894
895 2007-02-04  Bruno Haible  <bruno@clisp.org>
896
897         Simplify handling of strncasecmp.
898         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
899         the conditional link warning.
900         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
901         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
902         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
903         * modules/strcase (configure.ac): Don't invoke
904         gl_STRING_MODULE_INDICATOR.
905         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
906
907 2007-02-04  Bruno Haible  <bruno@clisp.org>
908
909         New module mbscasecmp, reduced goal of strcasecmp.
910         * modules/mbscasecmp: New file.
911         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
912         (mbscasecmp): Renamed from strcasecmp.
913         * lib/strcasecmp.c: Don't include mbuiter.h.
914         (strcasecmp): Remove support for multibyte locales.
915         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
916         Change the conditional link warning.
917         (mbscasecmp): New declaration.
918         * m4/mbscasecmp.m4: New file.
919         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
920         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
921         REPLACE_STRCASECMP.
922         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
923         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
924         GNULIB_MBSCASECMP.
925         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
926         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
927         * modules/strcase (Files): Remove m4/mbrtowc.m4.
928         (Depends-on): Remove mbuiter.
929         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
930
931 2007-02-04  Bruno Haible  <bruno@clisp.org>
932
933         New module mbsstr. Remove module strstr.
934         * modules/mbsstr: New file.
935         * modules/strstr: Remove file.
936         * lib/mbsstr.c: Renamed from lib/strstr.c.
937         (mbsstr): Renamed from strstr.
938         * lib/string_.h (strstr): Remove declaration. Change the conditional
939         link warning.
940         (mbsstr): New declaration.
941         * m4/mbsstr.m4: New file.
942         * m4/strstr.m4: Remove file.
943         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
944         REPLACE_STRSTR.
945         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
946         Don't initialize GNULIB_STRSTR.
947         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
948         substitute GNULIB_STRSTR and REPLACE_STRSTR.
949         * MODULES.html.sh (Internationalization functions): Add mbsstr.
950         (Support for systems lacking ANSI C 89): Remove strstr.
951
952 2007-02-04  Bruno Haible  <bruno@clisp.org>
953
954         New module mbsrchr.
955         * modules/mbsrchr: New file.
956         * lib/mbsrchr.c: New file.
957         * lib/string_.h (strrchr): Add a conditional link warning.
958         (mbsrchr): New declaration.
959         * m4/mbsrchr.m4: New file.
960         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
961         GNULIB_MBSRCHR.
962         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
963         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
964
965 2007-02-04  Bruno Haible  <bruno@clisp.org>
966
967         New module mbschr.
968         * modules/mbschr: New file.
969         * lib/mbschr.c: New file.
970         * lib/string_.h (strchr): Add a conditional link warning.
971         (mbschr): New declaration.
972         * m4/mbschr.m4: New file.
973         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
974         GNULIB_MBSCHR.
975         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
976         * MODULES.html.sh (Internationalization functions): Add mbschr.
977
978 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
979
980         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
981
982         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
983
984 2007-02-04  Bruno Haible  <bruno@clisp.org>
985
986         New module description section 'configure.ac-early'.
987         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
988         (func_get_autoconf_early_snippet): New function.
989         (func_import, func_create_testdir): Use it. Remove special cases for
990         modules 'extensions' and 'lock'.
991         * modules/extensions (configure.ac-early): Require
992         gl_USE_SYSTEM_EXTENSIONS.
993         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
994
995 2007-02-04  Bruno Haible  <bruno@clisp.org>
996
997         Make use of gcj-4.3's -fsource and -ftarget option.
998         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
999         and if so try the options -fsource and -ftarget.
1000         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
1001         source_version, ftarget_option, target_version arguments.
1002         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
1003         (is_envjavac_oldgcj_14_14_usable): Renamed from
1004         is_envjavac_gcj_14_14_usable.
1005         (is_envjavac_oldgcj_14_13_usable): Renamed from
1006         is_envjavac_gcj_14_13_usable.
1007         (is_gcj_present): Update.
1008         (is_gcj_43, is_gcj43_usable): New functions.
1009         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
1010         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
1011         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
1012         try the options -fsource and -ftarget.
1013
1014 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
1015
1016         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
1017         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
1018         larger value.
1019
1020 2007-02-03  Jim Meyering  <jim@meyering.net>
1021
1022         Give tools a better chance to allocate space for very large buffers.
1023         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
1024
1025         Make pwd and readlink work also when run with an unreadable parent dir
1026         on systems with openat support.
1027         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
1028         provided getcwd function, even when we have openat support.
1029         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
1030
1031 2007-02-02  Bruno Haible  <bruno@clisp.org>
1032
1033         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
1034         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
1035         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
1036         portability problems if one of these functions is only used on specific
1037         platforms.
1038         Reported by Paul Eggert.
1039
1040 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
1041
1042         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
1043         is causing more trouble than it's curing.
1044         * lib/regex_internal.h (__mempcpy): Remove.
1045         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
1046         (and make the code a tad smaller to boot).
1047         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
1048
1049 2007-02-02  Jim Meyering  <jim@meyering.net>
1050
1051         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
1052         section, not in the Makefile.am: one.
1053
1054 2007-02-02  Eric Blake  <ebb9@byu.net>
1055
1056         * lib/strchrnul.c: Always include config.h first.
1057
1058         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
1059         gnulib strstr is not necessary here.
1060
1061 2007-02-02  Simon Josefsson  <simon@josefsson.org>
1062
1063         * m4/socklen.m4: Fix typo.
1064
1065 2007-02-02  Eric Blake  <ebb9@byu.net>
1066
1067         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
1068         * modules/netinet_in (Makefile.am): Likewise.
1069
1070 2007-02-01  Bruno Haible  <bruno@clisp.org>
1071
1072         * lib/string_.h (GL_LINK_WARNING): New macro.
1073         (strcasecmp, strstr, strcasestr): If provided by the system,
1074         conditionally define as a macro that leads to a warning instead of to
1075         an error.
1076         (strncasecmp): Conditionally define as a macro that leads to a warning.
1077
1078 2007-02-01  Karl Berry  <karl@gnu.org>
1079
1080         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
1081
1082 2007-02-01  Bruno Haible  <bruno@clisp.org>
1083
1084         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
1085         renamings.
1086
1087 2007-02-01  Eric Blake  <ebb9@byu.net>
1088
1089         * modules/regex (Depends-on): Revert dependence on mempcpy.
1090         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
1091         module's definition of mempcpy.
1092         Reported by Paul Eggert.
1093
1094 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
1095
1096         * lib/string_.h: If the gnulib module XYZ is not present, undefine
1097         the symbol XYZ before redefining it.  This fixes a problem with
1098         programs that don't use XYZ, when compiled on systems that define
1099         XYZ to something else.
1100
1101 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
1102
1103         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
1104         occurs when "mkdir -m foo" creates a setgid directory that is (1)
1105         writeable to group or other and (2) is intended to have a special
1106         mode bit that is set or cleared.  In such a case, the directory
1107         should be neither group- nor other-writeable until the special
1108         mode bits are right.
1109
1110 2007-01-31  Eric Blake  <ebb9@byu.net>
1111
1112         * modules/mountlist (Depends-on): Add strstr.
1113
1114         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
1115         bug.
1116         * modules/string (Makefile.am): Remove redundant replacement.
1117         * modules/regex (Depends-on): Add mempcpy.
1118
1119 2007-01-31  Bruno Haible  <bruno@clisp.org>
1120
1121         New module description field 'Link'.
1122         * gnulib-tool (func_usage): Document --extract-link-directive.
1123         (sed_extract_prog): Recognize 'Link' directive.
1124         (func_get_link_directive): New function.
1125         (func_import): Show summary of link directives.
1126         Handle --extract-link-directive option.
1127         * modules/acl (Link): New section.
1128         * modules/clock-time (Link): New section.
1129         * modules/euidaccess (Link): New section.
1130         * modules/gettext (Link): New section.
1131         * modules/iconv (Link): New section.
1132         * modules/lock (Link): New section.
1133         * modules/nanosleep (Link): New section.
1134         * modules/readline (Link): New section.
1135
1136 2007-01-27  Bruno Haible  <bruno@clisp.org>
1137
1138         Enforce the use of gnulib modules for unportable <string.h> functions.
1139         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
1140         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
1141         (gl_HEADER_STRING_H_BODY): Require it.
1142         * lib/string_.h: If the gnulib module XYZ is not present, redefine
1143         the symbol XYZ to one that gives a link error.
1144         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
1145         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
1146         * modules/mempcpy (configure.ac): Likewise.
1147         * modules/memrchr (configure.ac): Likewise.
1148         * modules/stpcpy (configure.ac): Likewise.
1149         * modules/stpncpy (configure.ac): Likewise.
1150         * modules/strcase (configure.ac): Likewise.
1151         * modules/strcasestr (configure.ac): Likewise.
1152         * modules/strchrnul (configure.ac): Likewise.
1153         * modules/strdup (configure.ac): Likewise.
1154         * modules/strndup (configure.ac): Likewise.
1155         * modules/strnlen (configure.ac): Likewise.
1156         * modules/strpbrk (configure.ac): Likewise.
1157         * modules/strsep (configure.ac): Likewise.
1158         * modules/strstr (configure.ac): Likewise.
1159         * modules/strtok_r (configure.ac): Likewise.
1160
1161 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
1162
1163         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
1164
1165 2007-01-30  Jim Meyering  <jim@meyering.net>
1166
1167         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
1168
1169 2007-01-29  Bruno Haible  <bruno@clisp.org>
1170
1171         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
1172         * lib/execute.c: Likewise.
1173         * lib/pipe.c: Likewise.
1174         * lib/printf-args.h: Likewise.
1175         * lib/printf-args.c: Likewise.
1176         * lib/printf-parse.c: Likewise.
1177         * lib/vasnprintf.c: Likewise.
1178
1179 2007-01-29  Eric Blake  <ebb9@byu.net>
1180
1181         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
1182         declaration.
1183
1184 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
1185
1186         * lib/strptime.h (strptime): Use 'restrict' for args where
1187         POSIX requires this.
1188         * lib/strptime.c (strptime): Likewise.
1189         Change license notice from LGPL to GPL, since gnulib-tool will
1190         change this as needed.
1191         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
1192         defined.
1193         Include "strptime.h" first, to check interface.
1194         Do not #undef _LIBC and _NL_CURRENT.
1195         Do not include <stdlib.h>; no longer needed.
1196         Include "time_r.h" and declare ptime_locale_status
1197         only if _LIBC is not defined.
1198         (__P): Remove unused macro.
1199         (match_string): Bring back glibc version, but use it only if _LIBC
1200         is defined.
1201         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
1202         Remove unnecessary assertion and abort() call.
1203         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
1204         * m4/strptime.m4: Fix serial number comment.
1205         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
1206         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
1207         (Depends-on): Add time_r.
1208
1209 2007-01-29  Bruno Haible  <bruno@clisp.org>
1210
1211         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
1212         strptime.
1213         * modules/strptime (Depends-on): Add stdbool.
1214         * lib/strptime.h: Include <time.h> always. Add comments.
1215
1216 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
1217
1218         * modules/strptime: New file.
1219         * lib/strptime.h: New file.
1220         * lib/strptime.c: New file.
1221         * m4/strptime.m4: New file.
1222
1223 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
1224
1225         * MODULES.html.sh: New module mpsort.
1226         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
1227
1228         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
1229         a circularity problem with HP-UX ia64 reported by Bob Proulx in
1230         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
1231         All uses changed.
1232         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
1233         All uses changed.
1234         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
1235         to _Restrict_.
1236         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
1237         the parameter matches the prototype.
1238
1239 2007-01-28  Jim Meyering  <jim@meyering.net>
1240
1241         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
1242         sys/time.h here, reverting that part of the previous patch:
1243         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
1244
1245 2007-01-28  Bruno Haible  <bruno@clisp.org>
1246
1247         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
1248         value of $(SYS_TIME_H).
1249         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
1250         remove it conditionally, too. [added by Jim Meyering]
1251         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
1252         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
1253         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
1254         GETTIMEOFDAY_REPLACEMENT to 1.
1255
1256 2007-01-28  Bruno Haible  <bruno@clisp.org>
1257
1258         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
1259         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
1260         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
1261         Set UNISTD_H instead of UNISTD_H2.
1262         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
1263
1264 2007-01-28  Bruno Haible  <bruno@clisp.org>
1265
1266         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
1267         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
1268
1269 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1270
1271         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
1272         (func_create_testdir): Ensure C locale for `grep' and `tr'
1273         character ranges.
1274         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
1275         ACLOCAL_AMFLAGS parsing state machine.
1276
1277 2007-01-27  Bruno Haible  <bruno@clisp.org>
1278
1279         * modules/unistr/base: Update.
1280
1281 2007-01-27  Bruno Haible  <bruno@clisp.org>
1282
1283         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
1284         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
1285         * modules/unistr/u32-mbtouc-unsafe: Renamed from
1286         modules/unistr/u32-mbtouc.
1287         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
1288         * lib/unistr.h: Update.
1289         * lib/linebreak.c: Update.
1290         * modules/unistr/u32-mbtouc: Renamed from
1291         modules/unistr/u32-mbtouc-safe.
1292         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
1293         * lib/unistr.h: Update.
1294         * lib/unistr/u32-to-u8.c: Update.
1295         * lib/unistr/u32-to-u16.c: Update.
1296
1297 2007-01-27  Bruno Haible  <bruno@clisp.org>
1298
1299         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
1300         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
1301         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
1302         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
1303         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
1304         * modules/unistr/u16-mbtouc-unsafe: Renamed from
1305         modules/unistr/u16-mbtouc.
1306         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
1307         * lib/unistr.h: Update.
1308         * lib/linebreak.c: Update.
1309         * modules/linebreak: Update.
1310         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
1311         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
1312         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
1313         * modules/unistr/u16-mbtouc: Renamed from
1314         modules/unistr/u16-mbtouc-safe.
1315         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
1316         * lib/unistr.h: Update.
1317         * lib/unistr/u16-to-u8.c: Update.
1318         * modules/unistr/u16-to-u8: Update.
1319         * lib/unistr/u16-to-u32.c: Update.
1320         * modules/unistr/u16-to-u32: Update.
1321
1322 2007-01-27  Bruno Haible  <bruno@clisp.org>
1323
1324         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
1325         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
1326         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
1327         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
1328         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
1329         * modules/unistr/u8-mbtouc-unsafe: Renamed from
1330         modules/unistr/u8-mbtouc.
1331         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
1332         * lib/unistr.h: Update.
1333         * lib/striconveh.c: Update.
1334         * modules/striconveh: Update.
1335         * lib/linebreak.c: Update.
1336         * modules/linebreak: Update.
1337         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
1338         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
1339         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
1340         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
1341         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
1342         * lib/unistr.h: Update.
1343         * lib/striconveh.c: Update.
1344         * modules/striconveh: Update.
1345         * lib/unistr/u8-to-u16.c: Update.
1346         * modules/unistr/u8-to-u16: Update.
1347         * lib/unistr/u8-to-u32.c: Update.
1348         * modules/unistr/u8-to-u32: Update.
1349
1350 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1351
1352         Sync from Libtool.
1353         * lib/argz.c: Do not include strings.h nor memory.h, include
1354         string.h unconditionally.  Patch by Simon Josefsson.
1355
1356 2007-01-27  Bruno Haible  <bruno@clisp.org>
1357
1358         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
1359         from gl_HEADER_STRING_H_BODY.
1360         (gl_HEADER_STRING_H_BODY): Require it.
1361         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
1362         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
1363         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
1364         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
1365         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
1366         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
1367         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
1368         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
1369         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
1370         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
1371         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
1372         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
1373         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
1374         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
1375         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
1376
1377 2007-01-27  Bruno Haible  <bruno@clisp.org>
1378
1379         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
1380         check_PROGRAMS into noinst_PROGRAMS.
1381         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
1382         check_PROGRAMS in this case.
1383         (func_import): Set for_test to false.
1384         (func_create_testdir): Set for_test to true.
1385
1386 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
1387             Bruno Haible  <bruno@clisp.org>
1388
1389         * modules/strcasestr (Files): Remove lib/strcasestr.h.
1390         (Depends-on): Add string.
1391         (Includes): Use <string.h> instead of strcasestr.h.
1392         * modules/string (Makefile.am): Also substitute the value of
1393         REPLACE_STRCASESTR.
1394         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
1395         assume strcasestr is declared in <string.h> not <strings.h>. Also
1396         set REPLACE_STRCASESTR.
1397         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
1398         REPLACE_STRCASESTR.
1399         * lib/strcasestr.h: Remove file.
1400         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
1401         * lib/string_.h (strcasestr): New declaration.
1402
1403 2007-01-27  Bruno Haible  <bruno@clisp.org>
1404
1405         * lib/string_.h: Use 'extern'.
1406
1407 2007-01-27  Jim Meyering  <jim@meyering.net>
1408
1409         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
1410         of set-but-not-used local, "q".
1411
1412         * lib/mempcpy.c: Include <config.h> before <string.h>.
1413         This fixes a compilation error on HP-UX, due to the system's
1414         "restrict"-using mempcpy prototype.
1415
1416 2007-01-26  Bruno Haible  <bruno@clisp.org>
1417
1418         Small optimization.
1419         * lib/javacomp.c: Include c-strstr.h.
1420          (is_envjavac_gcj): Use c_strstr instead of strstr.
1421         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
1422
1423 2007-01-26  Bruno Haible  <bruno@clisp.org>
1424
1425         * MODULES.html.sh (Unicode string functions): Add the new modules.
1426
1427         * modules/uniconv/u32-strconv-to-locale: New file.
1428         * lib/uniconv/u32-strconv-to-locale.c: New file.
1429
1430         * modules/uniconv/u16-strconv-to-locale: New file.
1431         * lib/uniconv/u16-strconv-to-locale.c: New file.
1432
1433         * modules/uniconv/u8-strconv-to-locale: New file.
1434         * lib/uniconv/u8-strconv-to-locale.c: New file.
1435
1436         * modules/uniconv/u32-strconv-from-locale: New file.
1437         * lib/uniconv/u32-strconv-from-locale.c: New file.
1438
1439         * modules/uniconv/u16-strconv-from-locale: New file.
1440         * lib/uniconv/u16-strconv-from-locale.c: New file.
1441
1442         * modules/uniconv/u8-strconv-from-locale: New file.
1443         * lib/uniconv/u8-strconv-from-locale.c: New file.
1444
1445         * modules/uniconv/u32-strconv-to-enc: New file.
1446         * lib/uniconv/u32-strconv-to-enc.c: New file.
1447         * modules/uniconv/u32-strconv-to-enc-tests: New file.
1448         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
1449
1450         * modules/uniconv/u16-strconv-to-enc: New file.
1451         * lib/uniconv/u16-strconv-to-enc.c: New file.
1452         * lib/uniconv/u-strconv-to-enc.h: New file.
1453         * modules/uniconv/u16-strconv-to-enc-tests: New file.
1454         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
1455
1456         * modules/uniconv/u8-strconv-to-enc: New file.
1457         * lib/uniconv/u8-strconv-to-enc.c: New file.
1458         * modules/uniconv/u8-strconv-to-enc-tests: New file.
1459         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
1460
1461         * modules/uniconv/u32-strconv-from-enc: New file.
1462         * lib/uniconv/u32-strconv-from-enc.c: New file.
1463         * modules/uniconv/u32-strconv-from-enc-tests: New file.
1464         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
1465
1466         * modules/uniconv/u16-strconv-from-enc: New file.
1467         * lib/uniconv/u16-strconv-from-enc.c: New file.
1468         * modules/uniconv/u16-strconv-from-enc-tests: New file.
1469         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
1470
1471         * modules/uniconv/u8-strconv-from-enc: New file.
1472         * lib/uniconv/u8-strconv-from-enc.c: New file.
1473         * lib/uniconv/u-strconv-from-enc.h: New file.
1474         * modules/uniconv/u8-strconv-from-enc-tests: New file.
1475         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
1476
1477         * modules/uniconv/u32-conv-from-enc: New file.
1478         * lib/uniconv/u32-conv-from-enc.c: New file.
1479         * modules/uniconv/u32-conv-from-enc-tests: New file.
1480         * tests/uniconv/test-u32-conv-from-enc.c: New file.
1481
1482         * modules/uniconv/u16-conv-from-enc: New file.
1483         * lib/uniconv/u16-conv-from-enc.c: New file.
1484         * lib/uniconv/u-conv-from-enc.h: New file.
1485         * modules/uniconv/u16-conv-from-enc-tests: New file.
1486         * tests/uniconv/test-u16-conv-from-enc.c: New file.
1487
1488         * modules/uniconv/u8-conv-from-enc: New file.
1489         * lib/uniconv/u8-conv-from-enc.c: New file.
1490         * modules/uniconv/u8-conv-from-enc-tests: New file.
1491         * tests/uniconv/test-u8-conv-from-enc.c: New file.
1492
1493         * modules/uniconv/base: New file.
1494         * lib/uniconv.h: New file.
1495
1496 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
1497
1498         * doc/gnulib-tool.texi (Initial import): Update to match current
1499         behavior with strdup module.
1500         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
1501         * lib/memmem.h: Remove; all uses removed.  This is now done
1502         by <string.h>.
1503         * lib/mempcpy.h: Likewise.
1504         * lib/memrchr.h: Likewise.
1505         * lib/stpcpy.h: Likewise.
1506         * lib/stpncpy.h: Likewise.
1507         * lib/strcase.h: Likewise.
1508         * lib/strchrnul.h: Likewise.
1509         * lib/strdup.h: Likewise.
1510         * lib/strndup.h: Likewise.
1511         * lib/strnlen.h: Likewise.
1512         * lib/strpbrk.h: Likewise.
1513         * lib/strsep.h: Likewise.
1514         * lib/strstr.h: Likewise.
1515         * lib/strtok_r.h: Likewise.
1516         * lib/string_.h: New file.
1517         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
1518         Rely on <string.h> instead.
1519         * lib/canon-host.c: Likewise.
1520         * lib/chdir-long.c: Likewise.
1521         * lib/concatpath.c: Likewise.
1522         * lib/exclude.c: Likewise.
1523         * lib/fchdir.c: Likewise.
1524         * lib/getaddrinfo.c: Likewise.
1525         * lib/getcwd.c: Likewise.
1526         * lib/getsubopt.c: Likewise.
1527         * lib/glob.c: Likewise.
1528         * lib/hard-locale.c: Likewise.
1529         * lib/iconvme.c: Likewise.
1530         * lib/javacomp.c: Likewise.
1531         * lib/mempcpy.c: Likewise.
1532         * lib/memrchr.c: Likewise.
1533         * lib/regex_internal.h: Likewise.
1534         * lib/stpncpy.c: Likewise.
1535         * lib/strcasecmp.c: Likewise.
1536         * lib/strchrnul.c: Likewise.
1537         * lib/strdup.c: Likewise.
1538         * lib/striconv.c: Likewise.
1539         * lib/striconveh.c: Likewise.
1540         * lib/striconveha.c: Likewise.
1541         * lib/strncasecmp.c: Likewise.
1542         * lib/strndup.c: Likewise.
1543         * lib/strnlen.c: Likewise.
1544         * lib/strsep.c: Likewise.
1545         * lib/strstr.c: Likewise.
1546         * lib/strtok_r.c: Likewise.
1547         * lib/userspec.c: Likewise.
1548         * lib/w32spawn.h: Likewise.
1549         * lib/xstrndup.c: Likewise.
1550         * lib/mountlist.c (strstr): Remove decl.
1551         * m4/string_h.m4: New file.
1552         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
1553         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
1554         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
1555         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
1556         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
1557         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
1558         Set REPLACE_STRCASECMP if necessary.
1559         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
1560         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
1561         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
1562         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
1563         HAVE_DECL_STRDUP if necessary.
1564         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
1565         since gl_FUNC_STRNDUP does that now.
1566         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
1567         Check for decl here...
1568         (gl_PREREQ_STRNLEN): ... not here.
1569         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
1570         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
1571         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
1572         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
1573         necessary.
1574         * modules/string: New file.
1575         * modules/memmem (Files): Remove special-purpose include file.
1576         (Depends-on): Add string.
1577         (Include): Include <string.h>, not the removed file.
1578         * modules/mempcpy: Likewise.
1579         * modules/memrchr: Likewise.
1580         * modules/stpcpy: Likewise.
1581         * modules/stpncpy: Likewise.
1582         * modules/strcase: Likewise.
1583         * modules/strchrnul: Likewise.
1584         * modules/strdup: Likewise.
1585         * modules/strndup: Likewise.
1586         * modules/strnlen: Likewise.
1587         * modules/strpbrk: Likewise.
1588         * modules/strsep: Likewise.
1589         * modules/strstr: Likewise.
1590         * modules/strtok_r: Likewise.
1591         * tests/test-dirname.c: Don't include "strdup.h", since
1592         <string.h> now suffices.
1593         * tests/test-memmem.c: Don't include "memmem.h", since
1594         <string.h> now suffices.
1595
1596 2007-01-25  Bruno Haible  <bruno@clisp.org>
1597
1598         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
1599         *resultp is 0.
1600
1601         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
1602         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
1603         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
1604         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
1605
1606         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
1607         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
1608         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
1609         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
1610         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
1611         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
1612
1613 2007-01-24  Bruno Haible  <bruno@clisp.org>
1614
1615         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
1616         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
1617         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
1618         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
1619         gl_FUNC_FTS_CORE.
1620         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
1621         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
1622         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
1623         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
1624         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
1625         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
1626         gl_FUNC_FCHOWNAT.
1627         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
1628         gl_FUNC_STRFTIME.
1629         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
1630         Reported by Ralf Wildenhues.
1631
1632 2007-01-24  Bruno Haible  <bruno@clisp.org>
1633
1634         Drop AC_REQUIRE calls that are redundant with the module dependencies.
1635         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
1636         gl_GETADDRINFO.
1637         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
1638         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
1639         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
1640
1641 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
1642
1643         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
1644         Don't use 'exit'; just return from 'main'.
1645         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
1646
1647         * lib/fnmatch_.h: Readjust white space and comments to match
1648         glibc, to avoid spurious diffs.
1649
1650 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
1651
1652         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
1653         2004-12-01 change by Jakub Jelinek, since this code won't compile
1654         if !LIBC.  Problem reported by Bob Proulx.
1655
1656 2007-01-23  Bruno Haible  <bruno@clisp.org>
1657
1658         * lib/striconveh.c: Include c-strcaseeq.h.
1659         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
1660         * modules/striconveh (Depends-on): Add c-strcaseeq.
1661
1662 2007-01-23  Bruno Haible  <bruno@clisp.org>
1663
1664         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
1665
1666         * modules/c-strcaseeq: New file.
1667         * lib/c-strcaseeq.h: New file.
1668
1669         * modules/streq: New file.
1670         * lib/streq.h: New file.
1671
1672 2007-01-23  Bruno Haible  <bruno@clisp.org>
1673
1674         * modules/striconveha-tests: New file.
1675         * tests/test-striconveha.c: New file.
1676
1677         * lib/striconveha.h: Include <stdbool.h>.
1678         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
1679         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
1680         (mem_iconveha_notranslit): Renamed from mem_iconveha.
1681         (mem_iconveha): New function.
1682         (str_iconveha_notranslit): Renamed from str_iconveha.
1683         (str_iconveha): New function.
1684         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
1685         c-strcase.
1686
1687 2007-01-23  Bruno Haible  <bruno@clisp.org>
1688
1689         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
1690         encodings without forgiving before trying any encoding with handler.
1691         (str_iconveha): Try all encodings without forgiving before trying any
1692         encoding with handler.
1693
1694 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
1695
1696         Import the following changes from libc.
1697
1698         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
1699
1700         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
1701
1702         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
1703
1704         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
1705         normal_bracket label.
1706
1707         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
1708
1709         [BZ #361]
1710         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
1711         to normal_bracket after fetching the next character.
1712
1713 2007-01-22  Bruno Haible  <bruno@clisp.org>
1714
1715         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
1716         argument.
1717         * lib/striconveh.c (iconv_carefully_1): New function.
1718         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
1719         argument.
1720         (str_cd_iconveh): Update.
1721         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
1722         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
1723         * tests/test-striconveh.c (MAGIC): New macro.
1724         (new_offsets): New function.
1725         (main): Test call with and without offsets.
1726
1727 2007-01-22  Bruno Haible  <bruno@clisp.org>
1728
1729         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
1730         * modules/sys_select (Makefile.am): Likewise.
1731         * modules/sys_socket (Makefile.am): Likewise.
1732         * modules/sys_time (Makefile.am): Likewise.
1733
1734 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
1735
1736         * modules/gettimeofday (License): Change from GPL to LGPL, since
1737         gettimeofday is a library function.
1738
1739 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1740
1741         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
1742
1743 2007-01-21  Bruno Haible  <bruno@clisp.org>
1744
1745         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
1746
1747 2007-01-21  Bruno Haible  <bruno@clisp.org>
1748
1749         * modules/striconveha: New file.
1750         * lib/striconveha.h: New file.
1751         * lib/striconveha.c: New file.
1752         * MODULES.html.sh (Internationalization functions): Add striconveha.
1753         * lib/striconv.c (str_iconv): Optimize the case of an empty input
1754         string.
1755         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
1756
1757 2007-01-21  Bruno Haible  <bruno@clisp.org>
1758
1759         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
1760         * lib/striconveh.c (str_iconveh): Likewise.
1761
1762 2007-01-21  Bruno Haible  <bruno@clisp.org>
1763
1764         * lib/striconveh.h (mem_iconveh): New declaration.
1765         * lib/striconveh.c (mem_iconveh): New function.
1766         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
1767
1768 2007-01-21  Bruno Haible  <bruno@clisp.org>
1769
1770         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
1771
1772         * lib/striconveh.h (mem_cd_iconveh): Change specification.
1773         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
1774         original result buffer.
1775         (str_cd_iconveh): Update.
1776         * tests/test-striconveh.c (main): Update.
1777
1778         * lib/striconv.h (mem_cd_iconv): Change specification.
1779         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
1780         result buffer.
1781         (str_cd_iconv): Update.
1782         * tests/test-striconv.c (main): Update.
1783
1784 2007-01-21  Bruno Haible  <bruno@clisp.org>
1785
1786         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
1787
1788 2007-01-20  Jim Meyering  <jim@meyering.net>
1789
1790         * lib/userspec.c (parse_with_separator): If a user or group string
1791         starts with "+", skip the corresponding name-to-ID look-up, since
1792         such a look-up must fail: user and group names may not include "+".
1793
1794 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
1795
1796         * lib/poll.c: Include sys/time.h and time.h unconditionally,
1797         since we now assume the sys_time module.
1798         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
1799         check for sys/time.h; no longer needed.
1800         * modules/poll (Depends-on): Depend on sys_time.
1801
1802 2007-01-18  Bruno Haible  <bruno@clisp.org>
1803
1804         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
1805         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
1806
1807         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
1808         gettimeofday.
1809
1810         * tests/test-gettimeofday.c: Include <time.h>.
1811         (dummy): Remove variable.
1812
1813         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
1814         gl_HEADER_SYS_TIME_H.
1815         (gl_HEADER_SYS_TIME_H): New macro.
1816
1817         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
1818         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1819         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
1820         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
1821         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1822         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
1823         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
1824         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1825         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
1826         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
1827         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1828
1829         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
1830         last change; it caused a compilation error when cross-compiling to
1831         Cygwin.
1832
1833 2007-01-18  Jim Meyering  <jim@meyering.net>
1834
1835         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
1836         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
1837         than the race-prone "test -d sys || mkdir sys".
1838         (configure.ac): Use AC_PROG_MKDIR_P.
1839         * modules/sys_select: Likewise.
1840         * modules/sys_socket: Likewise.
1841         * modules/sys_time: Likewise.
1842
1843 2007-01-18  Eric Blake  <ebb9@byu.net>
1844
1845         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
1846         replace gettimeofday.
1847         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
1848         name, to avoid infinite recursion.
1849
1850 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
1851
1852         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
1853         module sys_time.
1854         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
1855         assume timespec.h defines struct timeval.
1856         * lib/settime.c: Likewise.
1857         * lib/utimens.c: Likewise.
1858         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
1859         since we now assume the gettimeofday module.
1860         * lib/tempname.c (__gen_tempname): Likewise.
1861         * lib/gettimeofday.h: Remove.
1862         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
1863         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
1864         Include <time.h>, for 'time()'.
1865         (localtime_buffer_addr): Also use this workaround if
1866         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
1867         to simplify the uses.  All uses changed.
1868         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
1869         that #undef is inside {}, and 'const' follows type name consistently.
1870         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
1871         (gettimeofday): Do not use the maximum possible value for
1872         tv->tv_usec, since that might break usages other than ls.c.
1873         Instead, we'll leave ls.c alone.  This undoes today's patch
1874         by Bruno.  Add a compile-time warning for 1s-clock resolution;
1875         we've never observed the problem but might as well keep the
1876         canary.
1877         * lib/nanosleep.c: Include timespec.h first, for interface check.
1878         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
1879         now assume the sys_time module.
1880         * lib/tempname.c: Likewise.
1881         * lib/timespec.h: Likewise.
1882         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
1883         needed.
1884         * lib/strftime.c: Likewise.
1885         * lib/timespec.h: Likewise.
1886         * lib/posixtm.c: Include posixtm.h first, for interface check.
1887         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
1888         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
1889         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
1890         * lib/sys_time_.h: New file.
1891         * lib/timespec.h (struct timespec): Use long int, not long.
1892         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
1893         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
1894         Remove obsolescent call to AC_HEADER_TIME.
1895         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
1896         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
1897         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
1898         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
1899         Likewise.
1900         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
1901         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
1902         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
1903         into the sys_time module.  Check for gettimeofday just once.
1904         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
1905         for gettimeofday signature to just check the signature.  Merely
1906         compile it, since linking doesn't test signature.  Improve test for
1907         whether gettimeofday.o is actually needed.
1908         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
1909         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
1910         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
1911         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1912         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
1913         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
1914         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
1915         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
1916         than worrying about sys/time.h.
1917         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
1918         Don't bother worrying about TIME_WITH_SYS_TIME.
1919         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
1920         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
1921         * m4/sys_time_h.m4: New file.
1922         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
1923         Don't include sys/time.h.  Return from main rather than exiting.
1924         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
1925         all uses changed.
1926         * modules/gethrxtime (Depends-on): Add sys_time.
1927         * modules/gettime (Depends-on): Likewise.
1928         * modules/gettimeofday (Depends-on): Likewise.
1929         * modules/nanosleep (Depends-on): Likewise.
1930         * modules/settime (Depends-on): Likewise.
1931         * modules/tempname (Depends-on): Likewise.
1932         * modules/utimens (Depends-on): Likewise.
1933         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
1934         (Include:) Change back to <sys/time.h>.
1935         (Maintainer:) Add self.
1936         * modules/sys_time: New file.
1937         * modules/tempname (Depends-on): Add gettimeofday.
1938         * tests/test-gettimeofday.c: Include <sys/time.h>
1939         rather than gettimeofday.h.
1940
1941 2007-01-17  Bruno Haible  <bruno@clisp.org>
1942
1943         * gnulib-tool (func_get_license): Revert last patch. Instead, let
1944         the license default to GPL.
1945         (func_create_testdir): Don't complain if a module is LGPL and its
1946         tests module depends on GPLed modules.
1947
1948 2007-01-17  Bruno Haible  <bruno@clisp.org>
1949
1950         * lib/gettimeofday.c (gettimeofday): Add code for the case
1951         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
1952         maximum possible value for tv->tv_usec, rather than the minimum one.
1953
1954 2005-10-08  Martin Lambers  <marlam@marlam.de>
1955 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
1956 2007-01-16  Bruno Haible  <bruno@clisp.org>
1957
1958         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
1959         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
1960         gl_FUNC_GETTIMEOFDAY.
1961         (Include): Add gettimeofday.h.
1962         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
1963         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
1964         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
1965         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
1966         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
1967         * lib/gettimeofday.h: New file.
1968         * lib/gettimeofday.c: Include <sys/timeb.h>.
1969         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
1970         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1971         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
1972         fall back on time().
1973
1974         * tests/test-gettimeofday.c: New file.
1975         * modules/gettimeofday-tests: New file.
1976
1977 2007-01-16  Eric Blake  <ebb9@byu.net>
1978
1979         * modules/fnmatch (Depends-on): Depend on wchar.
1980         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
1981         * m4/fnmatch.m4: Likewise.
1982         * modules/mbchar (Makefile.am): Assume <wchar.h>.
1983         * m4/mbchar.m4: Likewise.
1984         * modules/mbswidth (Depends-on): Depend on wchar.
1985         * lib/mbswidth.c: Assume <wchar.h>.
1986         * m4/mbswidth.m4: Likewise.
1987         * modules/quotearg (Depends-on): Depend on wchar.
1988         * lib/quotearg.c: Assume <wchar.h>.
1989         * m4/quotearg.m4: Likewise.
1990         * modules/regex (Depends-on): Depend on wchar.
1991         * lib/regex_internal.h: Assume <wchar.h>.
1992         * m4/regex.m4: Likewise.
1993         * modules/stdint (Depends-on): Depend on wchar.
1994         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
1995         * m4/stdint.m4: Likewise.
1996         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
1997         * modules/strftime (Depends-on): Depend on wchar.
1998         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
1999         * modules/strtol (Depends-on): Depend on wchar.
2000         * lib/strtol.c: Assume <wchar.h>.
2001         * modules/wcwidth (Depends-on): Depend on wchar.
2002         * lib/wcwidth.h: Assume <wchar.h>.
2003         * m4/wcwidth.m4: Likewise.
2004
2005 2007-01-16  Bruno Haible  <bruno@clisp.org>
2006
2007         * modules/csharpexec-script: New, created from...
2008         * modules/csharpexec: ... this.
2009
2010 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
2011
2012         * modules/javaexec-script: New, created from...
2013         * modules/javaexec: ... this.
2014
2015 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
2016
2017         * modules/poll (Dependencies): Add sys_select.
2018
2019 2007-01-15  Jim Meyering  <jim@meyering.net>
2020
2021         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
2022         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
2023         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
2024         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
2025
2026 2007-01-15  Bruno Haible  <bruno@clisp.org>
2027
2028         * modules/striconveh: New file.
2029         * lib/striconveh.h: New file.
2030         * lib/striconveh.c: New file.
2031         * MODULES.html.sh (Internationalization functions): Add striconveh.
2032
2033         * modules/striconveh-tests: New file.
2034         * tests/test-striconveh.c: New file.
2035
2036 2007-01-15  Bruno Haible  <bruno@clisp.org>
2037
2038         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
2039         not from GNU libiconv or GNU libc.
2040
2041 2007-01-15  Bruno Haible  <bruno@clisp.org>
2042
2043         * doc/gnulib-intro.texi (Copyright): Explain the different license
2044         terms for module descriptions, autoconf macros, tests, documentation.
2045
2046 2007-01-14  Bruno Haible  <bruno@clisp.org>
2047
2048         * modules/striconv-tests: New file.
2049         * tests/test-striconv.c: New file.
2050
2051 2007-01-14  Bruno Haible  <bruno@clisp.org>
2052
2053         * modules/iconv-tests: New file.
2054         * tests/test-iconv.c: New file.
2055
2056 2007-01-14  Bruno Haible  <bruno@clisp.org>
2057
2058         * gnulib-tool (func_get_license): For test modules, use the license of
2059         the main module.
2060
2061 2007-01-14  Bruno Haible  <bruno@clisp.org>
2062
2063         * modules/iconv (Include): Clarify that <iconv.h> can only be included
2064         if iconv is found to exist.
2065
2066 2007-01-14  Bruno Haible  <bruno@clisp.org>
2067
2068         * modules/c-ctype-tests: New file.
2069         * tests/test-c-ctype.c: New file.
2070
2071 2007-01-14  Bruno Haible  <bruno@clisp.org>
2072
2073         * modules/binary-io-tests: New file.
2074         * tests/test-binary-io.sh: New file.
2075         * tests/test-binary-io.c: New file.
2076
2077 2007-01-14  Bruno Haible  <bruno@clisp.org>
2078
2079         * modules/array-oset-tests: New file.
2080         * tests/test-array_oset.c: New file.
2081
2082 2007-01-14  Bruno Haible  <bruno@clisp.org>
2083
2084         * modules/array-list-tests: New file.
2085         * tests/test-array_list.c: New file.
2086
2087 2007-01-14  Bruno Haible  <bruno@clisp.org>
2088
2089         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
2090         and make.
2091         Reported by Simon Josefsson in
2092         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
2093
2094 2007-01-14  Bruno Haible  <bruno@clisp.org>
2095
2096         * modules/allocsa-tests: New file.
2097         * tests/test-allocsa.c: New file.
2098
2099 2007-01-14  Bruno Haible  <bruno@clisp.org>
2100
2101         * modules/fchdir (Depends-on): Add absolute-header.
2102         * modules/unistd (Depends-on): Likewise.
2103
2104 2006-12-30  Bruno Haible  <bruno@clisp.org>
2105
2106         * modules/fchdir: New file.
2107         * modules/unistd (Files): Add lib/unistd_.h.
2108         (Makefile.am): Generate unistd.h from unistd_.h.
2109         * lib/fchdir.c: New file.
2110         * lib/dirent_.h: New file.
2111         * lib/unistd_.h: New file.
2112         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
2113         * m4/fchdir.m4: New file.
2114         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
2115         (gl_HEADER_UNISTD): Invoke it.
2116         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
2117         function.
2118         * lib/backupfile.c (opendir, closedir): Undefine.
2119         * lib/chown.c (open, close): Undefine.
2120         * lib/clean-temp.c (open, close): Undefine.
2121         * lib/copy-file.c (open, close): Undefine.
2122         * lib/execute.c (open, close): Undefine.
2123         * lib/fsusage.c (open, close): Undefine.
2124         * lib/gc-gnulib.c (open, close): Undefine.
2125         * lib/getcwd.c (opendir, closedir): Undefine.
2126         * lib/glob.c (opendir, closedir): Undefine.
2127         * lib/javacomp.c (open, close): Undefine.
2128         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
2129         * lib/openat-proc.c (open, close): Undefine.
2130         * lib/pagealign_alloc.c (open, close): Undefine.
2131         * lib/pipe.c (open, close): Undefine.
2132         * lib/progreloc.c (open, close): Undefine.
2133         * lib/savedir.c (opendir, closedir): Undefine.
2134         * lib/utime.c (open, close): Undefine.
2135         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
2136
2137 2007-01-10  Bruno Haible  <bruno@clisp.org>
2138
2139         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
2140
2141 2007-01-12  Eric Blake  <ebb9@byu.net>
2142
2143         Provide a robust <wchar.h>.  Further simplifications are now
2144         possible in other modules, but not included here.
2145         * modules/wchar: New module.
2146         * m4/wchar.m4: New file.
2147         * lib/wchar_.h: Likewise.
2148         * modules/mbchar (Depends-on): Depend on wchar, as the first use
2149         of the new module.
2150         * MODULES.html.sh (Extended multibyte and wide character utilities):
2151         New section.
2152
2153 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
2154
2155         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
2156         to a reasonable default for memory allocation.
2157         (xreadlink): Don't allocate a huge buffer, to work around a buggy
2158         file system that reports garbage st_size values for symlinks.
2159         Problem reported by Liyang Hu.
2160
2161 2007-01-11  Simon Josefsson  <simon@josefsson.org>
2162
2163         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
2164         Emacs .#* auto-save files).
2165
2166 2007-01-11  Bruno Haible  <bruno@clisp.org>
2167
2168         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
2169         directory.
2170
2171 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
2172
2173         Use @...@ consistently in lib/wctype_.h.
2174         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
2175         on it being set to 1 or 0.
2176         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
2177         go back to AC_SUBSTing it.
2178         * modules/wctype (Makefile.am): Undo previous change.
2179
2180 2007-01-10  Eric Blake  <ebb9@byu.net>
2181
2182         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
2183         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
2184         * modules/wctype (Makefile.am): Likewise.
2185         Reported by Chris McGuire.
2186
2187 2007-01-10  Jim Meyering  <jim@meyering.net>
2188
2189         fts.c: a small readability/maintainability improvement
2190         * lib/fts.c (fts_read): Make this code slightly more readable and
2191         maintainable by hoisting the "sp->fts_cur = p" assignments to
2192         immediately follow the statements that set P.  Derived from
2193         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
2194
2195 2007-01-10  Eric Blake  <ebb9@byu.net>
2196
2197         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
2198         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
2199         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
2200         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
2201         Reported by Chris McGuire.
2202
2203 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2204
2205         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
2206         in sed script.
2207
2208 2007-01-09  Bruno Haible  <bruno@clisp.org>
2209
2210         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
2211         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
2212         variables.
2213         (func_module): Use them.
2214
2215 2007-01-09  Bruno Haible  <bruno@clisp.org>
2216
2217         * modules/unistr/base: New file.
2218         * lib/unistr.h: New file.
2219
2220         * modules/unistr/u8-to-u16: New file.
2221         * lib/unistr/u8-to-u16.c: New file.
2222
2223         * modules/unistr/u8-to-u32: New file.
2224         * lib/unistr/u8-to-u32.c: New file.
2225
2226         * modules/unistr/u16-to-u8: New file.
2227         * lib/unistr/u16-to-u8.c: New file.
2228
2229         * modules/unistr/u16-to-u32: New file.
2230         * lib/unistr/u16-to-u32.c: New file.
2231
2232         * modules/unistr/u32-to-u8: New file.
2233         * lib/unistr/u32-to-u8.c: New file.
2234
2235         * modules/unistr/u32-to-u16: New file.
2236         * lib/unistr/u32-to-u16.c: New file.
2237
2238         * modules/unistr/u8-check: New file.
2239         * modules/unistr/u16-check: New file.
2240         * modules/unistr/u32-check: New file.
2241         * lib/unistr/u8-check.c: New file.
2242         * lib/unistr/u16-check.c: New file.
2243         * lib/unistr/u32-check.c: New file.
2244
2245         * modules/unistr/u8-chr: New file.
2246         * modules/unistr/u16-chr: New file.
2247         * modules/unistr/u32-chr: New file.
2248         * lib/unistr/u8-chr.c: New file.
2249         * lib/unistr/u16-chr.c: New file.
2250         * lib/unistr/u32-chr.c: New file.
2251
2252         * modules/unistr/u8-cmp: New file.
2253         * modules/unistr/u16-cmp: New file.
2254         * modules/unistr/u32-cmp: New file.
2255         * lib/unistr/u8-cmp.c: New file.
2256         * lib/unistr/u16-cmp.c: New file.
2257         * lib/unistr/u32-cmp.c: New file.
2258
2259         * modules/unistr/u8-cpy: New file.
2260         * modules/unistr/u16-cpy: New file.
2261         * modules/unistr/u32-cpy: New file.
2262         * lib/unistr/u8-cpy.c: New file.
2263         * lib/unistr/u16-cpy.c: New file.
2264         * lib/unistr/u32-cpy.c: New file.
2265         * lib/unistr/u-cpy.h: New file.
2266
2267         * modules/unistr/u8-cpy-alloc: New file.
2268         * modules/unistr/u16-cpy-alloc: New file.
2269         * modules/unistr/u32-cpy-alloc: New file.
2270         * lib/unistr/u8-cpy-alloc.c: New file.
2271         * lib/unistr/u16-cpy-alloc.c: New file.
2272         * lib/unistr/u32-cpy-alloc.c: New file.
2273         * lib/unistr/u-cpy-alloc.h: New file.
2274
2275         * modules/unistr/u8-endswith: New file.
2276         * modules/unistr/u16-endswith: New file.
2277         * modules/unistr/u32-endswith: New file.
2278         * lib/unistr/u8-endswith.c: New file.
2279         * lib/unistr/u16-endswith.c: New file.
2280         * lib/unistr/u32-endswith.c: New file.
2281         * lib/unistr/u-endswith.h: New file.
2282
2283         * modules/unistr/u8-mblen: New file.
2284         * modules/unistr/u16-mblen: New file.
2285         * modules/unistr/u32-mblen: New file.
2286         * lib/unistr/u8-mblen.c: New file.
2287         * lib/unistr/u16-mblen.c: New file.
2288         * lib/unistr/u32-mblen.c: New file.
2289
2290         * modules/unistr/u8-mbtouc: New file.
2291         * modules/unistr/u16-mbtouc: New file.
2292         * modules/unistr/u32-mbtouc: New file.
2293         * lib/unistr/u8-mbtouc.c: New file.
2294         * lib/unistr/u16-mbtouc.c: New file.
2295         * lib/unistr/u32-mbtouc.c: New file.
2296
2297         * modules/unistr/u8-mbtouc-safe: New file.
2298         * modules/unistr/u16-mbtouc-safe: New file.
2299         * modules/unistr/u32-mbtouc-safe: New file.
2300         * lib/unistr/u8-mbtouc-safe.c: New file.
2301         * lib/unistr/u16-mbtouc-safe.c: New file.
2302         * lib/unistr/u32-mbtouc-safe.c: New file.
2303
2304         * modules/unistr/u8-move: New file.
2305         * modules/unistr/u16-move: New file.
2306         * modules/unistr/u32-move: New file.
2307         * lib/unistr/u8-move.c: New file.
2308         * lib/unistr/u16-move.c: New file.
2309         * lib/unistr/u32-move.c: New file.
2310         * lib/unistr/u-move.h: New file.
2311
2312         * modules/unistr/u8-next: New file.
2313         * modules/unistr/u16-next: New file.
2314         * modules/unistr/u32-next: New file.
2315         * lib/unistr/u8-next.c: New file.
2316         * lib/unistr/u16-next.c: New file.
2317         * lib/unistr/u32-next.c: New file.
2318
2319         * modules/unistr/u8-prev: New file.
2320         * modules/unistr/u16-prev: New file.
2321         * modules/unistr/u32-prev: New file.
2322         * lib/unistr/u8-prev.c: New file.
2323         * lib/unistr/u16-prev.c: New file.
2324         * lib/unistr/u32-prev.c: New file.
2325
2326         * modules/unistr/u8-set: New file.
2327         * modules/unistr/u16-set: New file.
2328         * modules/unistr/u32-set: New file.
2329         * lib/unistr/u8-set.c: New file.
2330         * lib/unistr/u16-set.c: New file.
2331         * lib/unistr/u32-set.c: New file.
2332         * lib/unistr/u-set.h: New file.
2333
2334         * modules/unistr/u8-startswith: New file.
2335         * modules/unistr/u16-startswith: New file.
2336         * modules/unistr/u32-startswith: New file.
2337         * lib/unistr/u8-startswith.c: New file.
2338         * lib/unistr/u16-startswith.c: New file.
2339         * lib/unistr/u32-startswith.c: New file.
2340         * lib/unistr/u-startswith.h: New file.
2341
2342         * modules/unistr/u8-stpcpy: New file.
2343         * modules/unistr/u16-stpcpy: New file.
2344         * modules/unistr/u32-stpcpy: New file.
2345         * lib/unistr/u8-stpcpy.c: New file.
2346         * lib/unistr/u16-stpcpy.c: New file.
2347         * lib/unistr/u32-stpcpy.c: New file.
2348         * lib/unistr/u-stpcpy.h: New file.
2349
2350         * modules/unistr/u8-stpncpy: New file.
2351         * modules/unistr/u16-stpncpy: New file.
2352         * modules/unistr/u32-stpncpy: New file.
2353         * lib/unistr/u8-stpncpy.c: New file.
2354         * lib/unistr/u16-stpncpy.c: New file.
2355         * lib/unistr/u32-stpncpy.c: New file.
2356         * lib/unistr/u-stpncpy.h: New file.
2357
2358         * modules/unistr/u8-strcat: New file.
2359         * modules/unistr/u16-strcat: New file.
2360         * modules/unistr/u32-strcat: New file.
2361         * lib/unistr/u8-strcat.c: New file.
2362         * lib/unistr/u16-strcat.c: New file.
2363         * lib/unistr/u32-strcat.c: New file.
2364         * lib/unistr/u-strcat.h: New file.
2365
2366         * modules/unistr/u8-strchr: New file.
2367         * modules/unistr/u16-strchr: New file.
2368         * modules/unistr/u32-strchr: New file.
2369         * lib/unistr/u8-strchr.c: New file.
2370         * lib/unistr/u16-strchr.c: New file.
2371         * lib/unistr/u32-strchr.c: New file.
2372
2373         * modules/unistr/u8-strcmp: New file.
2374         * modules/unistr/u16-strcmp: New file.
2375         * modules/unistr/u32-strcmp: New file.
2376         * lib/unistr/u8-strcmp.c: New file.
2377         * lib/unistr/u16-strcmp.c: New file.
2378         * lib/unistr/u32-strcmp.c: New file.
2379
2380         * modules/unistr/u8-strcpy: New file.
2381         * modules/unistr/u16-strcpy: New file.
2382         * modules/unistr/u32-strcpy: New file.
2383         * lib/unistr/u8-strcpy.c: New file.
2384         * lib/unistr/u16-strcpy.c: New file.
2385         * lib/unistr/u32-strcpy.c: New file.
2386         * lib/unistr/u-strcpy.h: New file.
2387
2388         * modules/unistr/u8-strcspn: New file.
2389         * modules/unistr/u16-strcspn: New file.
2390         * modules/unistr/u32-strcspn: New file.
2391         * lib/unistr/u8-strcspn.c: New file.
2392         * lib/unistr/u16-strcspn.c: New file.
2393         * lib/unistr/u32-strcspn.c: New file.
2394         * lib/unistr/u-strcspn.h: New file.
2395
2396         * modules/unistr/u8-strdup: New file.
2397         * modules/unistr/u16-strdup: New file.
2398         * modules/unistr/u32-strdup: New file.
2399         * lib/unistr/u8-strdup.c: New file.
2400         * lib/unistr/u16-strdup.c: New file.
2401         * lib/unistr/u32-strdup.c: New file.
2402         * lib/unistr/u-strdup.h: New file.
2403
2404         * modules/unistr/u8-strlen: New file.
2405         * modules/unistr/u16-strlen: New file.
2406         * modules/unistr/u32-strlen: New file.
2407         * lib/unistr/u8-strlen.c: New file.
2408         * lib/unistr/u16-strlen.c: New file.
2409         * lib/unistr/u32-strlen.c: New file.
2410         * lib/unistr/u-strlen.h: New file.
2411
2412         * modules/unistr/u8-strmblen: New file.
2413         * modules/unistr/u16-strmblen: New file.
2414         * modules/unistr/u32-strmblen: New file.
2415         * lib/unistr/u8-strmblen.c: New file.
2416         * lib/unistr/u16-strmblen.c: New file.
2417         * lib/unistr/u32-strmblen.c: New file.
2418
2419         * modules/unistr/u8-strmbtouc: New file.
2420         * modules/unistr/u16-strmbtouc: New file.
2421         * modules/unistr/u32-strmbtouc: New file.
2422         * lib/unistr/u8-strmbtouc.c: New file.
2423         * lib/unistr/u16-strmbtouc.c: New file.
2424         * lib/unistr/u32-strmbtouc.c: New file.
2425
2426         * modules/unistr/u8-strncat: New file.
2427         * modules/unistr/u16-strncat: New file.
2428         * modules/unistr/u32-strncat: New file.
2429         * lib/unistr/u8-strncat.c: New file.
2430         * lib/unistr/u16-strncat.c: New file.
2431         * lib/unistr/u32-strncat.c: New file.
2432         * lib/unistr/u-strncat.h: New file.
2433
2434         * modules/unistr/u8-strncmp: New file.
2435         * modules/unistr/u16-strncmp: New file.
2436         * modules/unistr/u32-strncmp: New file.
2437         * lib/unistr/u8-strncmp.c: New file.
2438         * lib/unistr/u16-strncmp.c: New file.
2439         * lib/unistr/u32-strncmp.c: New file.
2440
2441         * modules/unistr/u8-strncpy: New file.
2442         * modules/unistr/u16-strncpy: New file.
2443         * modules/unistr/u32-strncpy: New file.
2444         * lib/unistr/u8-strncpy.c: New file.
2445         * lib/unistr/u16-strncpy.c: New file.
2446         * lib/unistr/u32-strncpy.c: New file.
2447         * lib/unistr/u-strncpy.h: New file.
2448
2449         * modules/unistr/u8-strnlen: New file.
2450         * modules/unistr/u16-strnlen: New file.
2451         * modules/unistr/u32-strnlen: New file.
2452         * lib/unistr/u8-strnlen.c: New file.
2453         * lib/unistr/u16-strnlen.c: New file.
2454         * lib/unistr/u32-strnlen.c: New file.
2455         * lib/unistr/u-strnlen.h: New file.
2456
2457         * modules/unistr/u8-strpbrk: New file.
2458         * modules/unistr/u16-strpbrk: New file.
2459         * modules/unistr/u32-strpbrk: New file.
2460         * lib/unistr/u8-strpbrk.c: New file.
2461         * lib/unistr/u16-strpbrk.c: New file.
2462         * lib/unistr/u32-strpbrk.c: New file.
2463         * lib/unistr/u-strpbrk.h: New file.
2464
2465         * modules/unistr/u8-strrchr: New file.
2466         * modules/unistr/u16-strrchr: New file.
2467         * modules/unistr/u32-strrchr: New file.
2468         * lib/unistr/u8-strrchr.c: New file.
2469         * lib/unistr/u16-strrchr.c: New file.
2470         * lib/unistr/u32-strrchr.c: New file.
2471
2472         * modules/unistr/u8-strspn: New file.
2473         * modules/unistr/u16-strspn: New file.
2474         * modules/unistr/u32-strspn: New file.
2475         * lib/unistr/u8-strspn.c: New file.
2476         * lib/unistr/u16-strspn.c: New file.
2477         * lib/unistr/u32-strspn.c: New file.
2478         * lib/unistr/u-strspn.h: New file.
2479
2480         * modules/unistr/u8-strstr: New file.
2481         * modules/unistr/u16-strstr: New file.
2482         * modules/unistr/u32-strstr: New file.
2483         * lib/unistr/u8-strstr.c: New file.
2484         * lib/unistr/u16-strstr.c: New file.
2485         * lib/unistr/u32-strstr.c: New file.
2486         * lib/unistr/u-strstr.h: New file.
2487
2488         * modules/unistr/u8-strtok: New file.
2489         * modules/unistr/u16-strtok: New file.
2490         * modules/unistr/u32-strtok: New file.
2491         * lib/unistr/u8-strtok.c: New file.
2492         * lib/unistr/u16-strtok.c: New file.
2493         * lib/unistr/u32-strtok.c: New file.
2494         * lib/unistr/u-strtok.h: New file.
2495
2496         * modules/unistr/u8-uctomb: New file.
2497         * modules/unistr/u16-uctomb: New file.
2498         * modules/unistr/u32-uctomb: New file.
2499         * lib/unistr/u8-uctomb.c: New file.
2500         * lib/unistr/u16-uctomb.c: New file.
2501         * lib/unistr/u32-uctomb.c: New file.
2502
2503         * MODULES.html.sh (Unicode string functions): Add the new modules.
2504
2505 2007-01-08  Bruno Haible  <bruno@clisp.org>
2506
2507         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
2508         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
2509         subdirectories.
2510
2511 2007-01-08  Karl Berry  <karl@gnu.org>
2512
2513         * doc/error.texi: mention that main() fns must set program_name
2514         when progname is used.
2515
2516 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
2517
2518         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
2519         WCTYPE_H is empty, for the benefit of builds from non-distclean
2520         directories.  Problem reported by Eric Blake in
2521         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
2522
2523 2007-01-08  Bruno Haible  <bruno@clisp.org>
2524
2525         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
2526         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
2527         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
2528         PROVIDE_CANONICALIZE_FILENAME_MODE.
2529         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
2530
2531 2007-01-08  Bruno Haible  <bruno@clisp.org>
2532
2533         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
2534         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
2535         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
2536         * lib/fts.c: Likewise.
2537         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
2538
2539 2006-12-25  Bruno Haible  <bruno@clisp.org>
2540
2541         * modules/utf8-ucs4-safe: New file.
2542         * lib/utf8-ucs4-safe.h: New file.
2543         * lib/unistr/utf8-ucs4-safe.c: New file.
2544
2545         * modules/utf16-ucs4-safe: New file.
2546         * lib/utf16-ucs4-safe.h: New file.
2547         * lib/unistr/utf16-ucs4-safe.c: New file.
2548
2549         * MODULES.html.sh (Unicode string functions): Add the new modules.
2550
2551 2007-01-08  Bruno Haible  <bruno@clisp.org>
2552
2553         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
2554         (Depends-on): Add unitypes.
2555         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
2556         (u8_mbtouc_aux): Move out to separate file.
2557         (u8_mbtouc): Use ucs4_t, uint8_t types.
2558         * lib/unistr/utf8-ucs4.c: New file.
2559
2560         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
2561         (Depends-on): Add unitypes.
2562         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
2563         (u16_mbtouc_aux): Move out to separate file.
2564         (u16_mbtouc): Use ucs4_t, uint16_t types.
2565         * lib/unistr/utf16-ucs4.c: New file.
2566
2567         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
2568         (Depends-on): Add unitypes.
2569         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
2570         (u8_uctomb_aux): Move out to separate file.
2571         (u8_uctomb): Use ucs4_t, uint8_t types.
2572         * lib/unistr/ucs4-utf8.c: New file.
2573
2574         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
2575         (Depends-on): Add unitypes.
2576         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
2577         (u16_uctomb_aux): Move out to separate file.
2578         (u16_uctomb): Use ucs4_t, uint16_t types.
2579         * lib/unistr/ucs4-utf16.c: New file.
2580
2581 2006-12-25  Bruno Haible  <bruno@clisp.org>
2582
2583         * modules/unitypes: New file.
2584         * lib/unitypes.h: New file.
2585         * MODULES.html.sh (func_all_modules): New section "Unicode string
2586         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
2587         this section. Add unitypes.
2588
2589 2007-01-08  Bruno Haible  <bruno@clisp.org>
2590
2591         Avoid variable names that conflict with those from libtool.
2592         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
2593         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
2594         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
2595         library_names_spec to acl_library_names_spec, hardcode_* to
2596         acl_hardcode_*.
2597         Reported by Ralf Wildenhues.
2598
2599 2007-01-08  Bruno Haible  <bruno@clisp.org>
2600
2601         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
2602         definition.
2603         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
2604         definition.
2605         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
2606         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
2607         definition.
2608         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
2609         definition.
2610         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
2611         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
2612         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
2613         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
2614         definition.
2615         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
2616         definition.
2617         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
2618         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
2619         GC_USE_<algorithm>.
2620         * lib/gc-libgcrypt.c: Likewise.
2621         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
2622         * modules/gc-arctwo (configure.ac): Likewise.
2623         * modules/gc-des (configure.ac): Likewise.
2624         * modules/gc-hmac-md5 (configure.ac): Likewise.
2625         * modules/gc-hmac-sha1 (configure.ac): Likewise.
2626         * modules/gc-md2 (configure.ac): Likewise.
2627         * modules/gc-md4 (configure.ac): Likewise.
2628         * modules/gc-md5 (configure.ac): Likewise.
2629         * modules/gc-random (configure.ac): Likewise.
2630         * modules/gc-rijndael (configure.ac): Likewise.
2631         * modules/gc-sha1 (configure.ac): Likewise.
2632
2633 2007-01-08  Bruno Haible  <bruno@clisp.org>
2634
2635         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
2636         macro definition.
2637         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
2638         definition.
2639         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
2640         definition.
2641         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
2642         * modules/fcntl-safer (configure.ac): Likewise.
2643         * modules/fopen-safer (configure.ac): Likewise.
2644         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
2645         GNULIB_FWRITEERROR macro definition.
2646
2647 2007-01-08  Bruno Haible  <bruno@clisp.org>
2648
2649         * m4/gnulib-common.m4: New file.
2650         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
2651         (func_get_filelist): Add m4/gnulib-common.m4.
2652
2653 2007-01-08  Bruno Haible  <bruno@clisp.org>
2654
2655         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
2656         command.
2657
2658 2007-01-08  Jim Meyering  <jim@meyering.net>
2659
2660         Use a more robust test for a "can't happen" condition.
2661         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
2662         narrowed the st_size value.  Presuming the "can't happen" condition
2663         is true, that narrowing could conceivably convert an invalid st_size
2664         value into a valid one.  Instead, use a change based on Matthew
2665         Woehlke's original patch.
2666
2667         Slight readability improvement: use an assert-like macro
2668         in place of literal "abort ()" uses.
2669         * lib/fts.c (fts_assert): Define.
2670         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
2671         Use this macro instead of a bare 'abort'.
2672
2673 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
2674
2675         Don't worry about using IRIX 5.3's wctype.h broken definitions;
2676         simply work around them.
2677         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
2678         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
2679         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before declaring.
2680         Don't bother to define as macros, since the standard doesn't require it.
2681         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
2682         longer worry about IRIX 5.3.
2683         (HAVE_WCTYPE_CTMP_BUG): Remove.
2684
2685 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
2686
2687         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
2688         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
2689         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
2690         Problems reported by Georg Schwarz for IRIX 5.3.
2691
2692         * gnulib-tool (autoconf_minversion): Take the maximum version number
2693         found, not the minimum.  Problem reported by James Youngman.
2694
2695 2007-01-03  Karl Berry  <karl@gnu.org>
2696
2697         * doc/error.texi: new file, explaining interaction with progname.
2698         * doc/gnulib.texi: include it.  Update copyright.
2699
2700 2007-01-03  Simon Josefsson  <simon@josefsson.org>
2701
2702         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
2703         AC_CANONICAL_HOST, to improve autobuild outputs.
2704
2705 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
2706             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
2707
2708         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
2709         sockets, server sockets, and other file descriptors.  Count errors
2710         to compute the return value.  Reorder the code a bit to be easier
2711         to follow.  Don't set event bits that were not requested (except
2712         POLLERR and POLLHUP).
2713
2714 2007-01-01  Bruno Haible  <bruno@clisp.org>
2715
2716         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
2717
2718 2007-01-03  Jim Meyering  <jim@meyering.net>
2719
2720         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
2721
2722 2007-01-02  Bruno Haible  <bruno@clisp.org>
2723
2724         * modules/settime (Include): Require timespec.h.
2725         * modules/nanosleep (Include): Likewise.
2726
2727 2007-01-01  Bruno Haible  <bruno@clisp.org>
2728
2729         * gnulib-tool (func_emit_copyright_notice): Bump year.
2730         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
2731
2732 2007-01-01  Bruno Haible  <bruno@clisp.org>
2733
2734         Improve support for OpenBSD.
2735         * build-aux/config.rpath (libname_spec): Export.
2736         (library_names_spec): New variable. Export.
2737         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
2738         library_names_spec from the config.rpath output. Locate shared library
2739         through the name pattern in library_names_spec.
2740
2741 2007-01-01  Eric Blake  <ebb9@byu.net>
2742
2743         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
2744
2745 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
2746
2747         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
2748         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
2749         assume the C locale, and avoid an "eval" that could cause trouble.
2750         Problem with SORT reported by Bob Proulx.
2751
2752         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
2753         Define.  Trivial patch from Henning Nielsen Lund, originally
2754         sent to bug-grep@gnu.org today.
2755
2756 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
2757
2758         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
2759         struct stat.  Problem reported by Henning Nielsen Lund.
2760         * lib/acl.c: Include acl.h first, to check interface.  Don't
2761         bother to include sys/types.h and sys/stat.h again.
2762
2763 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
2764
2765         Import the following change from libc; problem reported by
2766         Sven Verdoolaege.
2767
2768         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
2769
2770         [BZ #1373]
2771         * lib/argp.h: Remove __NTH for __argp_usage inline function.
2772
2773 2006-12-28  Jim Meyering  <jim@meyering.net>
2774
2775         * build-aux/announce-gen: Do not assume that the package
2776         builds any of tar.gz, tar.bz2, and .xdelta files.
2777         Suggestion from Simon Josefsson.
2778
2779 2006-12-28  Simon Josefsson  <simon@josefsson.org>
2780
2781         * modules/announce-gen: New file.
2782
2783 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
2784
2785         * lib/mbchar.h: Just include <wctype.h>; the wctype module
2786         handles its gotchas now.
2787         * lib/mbswidth.c: Likewise.
2788         * lib/wcwidth.h: Likewise.
2789         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
2790         and iswcntrl; the wctype module does this stuff now.
2791         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
2792         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
2793         * modules/mbchar (Depends-on): Add wctype.
2794         * modules/mbswidth (Depends-on): Likewise.
2795         * modules/wcwidth (Depends-on): Likewise.
2796
2797 2006-12-27  Eric Blake  <ebb9@byu.net>
2798
2799         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
2800         module uses more than what <wctype.h> is required to provide.
2801
2802 2006-12-26  Eric Blake  <ebb9@byu.net>
2803
2804         * gnulib-tool (sed_extract_prog): Avoid space-tab.
2805
2806 2006-12-26  Eric Blake  <ebb9@byu.net>
2807
2808         * modules/absolute-header: New module.
2809         * modules/fcntl (Depends-on): Depend on it.
2810         * modules/inttypes (Depends-on): Likewise.
2811         * modules/stdint (Depends-on): Likewise.
2812         * modules/sys_stat (Depends-on): Likewise.
2813         * modules/wctype (Depends-on): Likewise.
2814         * MODULES.html.sh (Support for building libraries and
2815         executables): Document it.
2816
2817 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
2818
2819         * gnulib-tool (SED): Remove, undoing previous change.
2820         The problem was that it broke coreutils on Solaris, because
2821         "sed --posix" leaked into a makefile.
2822         (sed): New alias, if 'alias' and GNU sed.
2823
2824 2006-12-24  Jim Meyering  <jim@meyering.net>
2825
2826         Work around an fchownat bug in glibc-2.4:
2827         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
2828         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
2829         in spite of the -P option.
2830         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
2831         New macros.
2832         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
2833         * modules/openat (Files): Add lib/fchownat.c.
2834         * lib/openat.c (fchownat): Don't define here.  Move to...
2835         * lib/fchownat.c: ...this new file.
2836
2837 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
2838
2839         Fix bug reported by Bruno Haible in
2840         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
2841         where quotearg.c didn't compile on Mac OS X 10.2 because it
2842         lacks <wchar.h> and wint_t.
2843         * lib/wctype_.h (__wctype_wint_t): New type.
2844         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
2845         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
2846         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
2847         Arg is now of type __wctype_wint_t, not wint_t.
2848         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
2849         substitute HAVE_WINT_T.
2850         * modules/wctype (Files): Add m4/wint_t.m4.
2851         (wctype.h): Substitute HAVE_WINT_T.
2852
2853 2006-12-23  Bruno Haible  <bruno@clisp.org>
2854
2855         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
2856
2857 2006-12-23  Bruno Haible  <bruno@clisp.org>
2858
2859         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
2860         S_ISLNK.
2861         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
2862         mingw.
2863
2864 2006-12-22  Bruno Haible  <bruno@clisp.org>
2865
2866         * lib/copy-file.c: Include acl.h.
2867         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
2868         Close the file descriptors only after being done with copy_acl.
2869         * modules/copy-file (Depends-on): Add acl.
2870
2871 2006-12-22  Bruno Haible  <bruno@clisp.org>
2872
2873         * gnulib-tool (SED): New variable.
2874         Use $SED instead of sed everywhere.
2875
2876 2006-12-22  Bruno Haible  <bruno@clisp.org>
2877
2878         * modules/no-c++: New file.
2879         * m4/no-c++.m4: New file.
2880         * MODULES.html.sh (Support for building libraries and executables):
2881         Add no-c++.
2882
2883 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
2884
2885         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
2886         Include <limits.h>, and use its INT_MAX to rewrite the
2887         j loop so that it does not overflow 'int'.  Problem reported by
2888         Ralf Wildenhues in
2889         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
2890         Play it safe by shifting left by 1 rather than multiplying by 2,
2891         as GCC is less likely to optimize this away when the value
2892         is signed (when it assumes overflow leads to undefined behavior).
2893         Also, don't assume time_t uses two's complement.
2894
2895 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
2896
2897         * MODULES.html.sh: New module wctype.
2898         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
2899         * lib/fnmatch.c: Don't bother to include <wchar.h> before
2900         <wctype.h>, since the new wctype module should fix this.
2901         * lib/quotearg.c: Include <wctype.h> unconditionally, since
2902         the wctype module should arrange for it.
2903         * lib/regex_internal.h: Likewise.
2904         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
2905         since the wctype module should handle this now.
2906         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
2907         * modules/fnmatch (Depends-on): Add wctype.
2908         * modules/quotearg (Depends-on): Likewise.
2909         * modules/regex (Depends-on): Likewise.
2910
2911 2006-12-19  Bruno Haible  <bruno@clisp.org>
2912
2913         * lib/strdup.h [C++]: Wrap definitions in extern "C".
2914         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
2915
2916 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2917
2918         * modules/savewd (Depends-on): Fix dependency on fcntl.
2919
2920 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
2921
2922         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
2923         conforms to C99, rather than relying on the user's environment
2924         setting of STDINT_H.
2925
2926 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
2927         and Eric Blake  <ebb9@byu.net>
2928
2929         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
2930         This is more consistent with the other defines here.
2931         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
2932         Port to z/OS.  Problem reported by Paul Gilmartin.
2933         Change local vars to use gl_ prefix rather than ac_.
2934         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
2935         with other defines.
2936         * modules/double-slash-root: New module.
2937         * modules/dirname (Files): Remove m4/double-slash-root.m4.
2938         (Depends-on): Add double-slash-root.
2939         * MODULES.html.sh (File system functions): Mention new module.
2940
2941 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
2942
2943         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
2944         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
2945         This is for the benefit of gzip, which doesn't do i18n.
2946
2947 2006-12-12  Jim Meyering  <jim@meyering.net>
2948
2949         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
2950         Reported by Andreas Schwab <schwab@suse.de>.
2951
2952 2006-12-12  Bruno Haible  <bruno@clisp.org>
2953
2954         Merge these changes.
2955         2006-09-05  Bruno Haible  <bruno@clisp.org>
2956         * lib/iconvme.c (iconv_string): No need to save and restore errno when
2957         iconv_alloc succeeded.
2958         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
2959         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
2960         test for " && dest " at the end - dest is always != NULL there. Call
2961         iconv with 4xNULL arguments initially, to reset the state. Call iconv
2962         with 2xNULL arguments, also to flush the state storage. Handle the
2963         IRIX iconv behaviour. Realloc the final result, to throw away unused
2964         memory.
2965
2966 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
2967
2968         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
2969         and fchmodat unconditionally, since glibc 2.4 has them.
2970         Problem reported by Arkadiusz Miskiewicz.
2971
2972 2006-12-10  Bruno Haible  <bruno@clisp.org>
2973
2974         * gnulib-tool (func_import): Show the include files only for those
2975         modules that are copied and specified.
2976         Reported by Karl Berry.
2977
2978 2006-12-08  Jim Meyering  <jim@meyering.net>
2979
2980         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
2981         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
2982
2983         * build-aux/announce-gen: Add two new options, both optional:
2984         --bootstrap-tools=TOOL_LIST
2985               a comma-separated list of tools, e.g.,
2986               autoconf,automake,bison,gnulib
2987         --gnulib-snapshot-date=DATE
2988               if gnulib is in the bootstrap tool list,
2989               then report this as the snapshot date.
2990               If not specified, use the current date/time.
2991               If you specify a date here, be sure it's UTC.
2992
2993 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2994
2995         * tests/test-argp-2.sh: Fix test to match actual output.
2996         (func_compare): Fix sed script to be portable.
2997
2998 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
2999
3000         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
3001         workaround for this case.  It is not autoconfigured now; offhand
3002         it's hard to see how to autoconfigure it.
3003
3004 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
3005
3006         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
3007         a directory that is about to be chowned.  Such a directory's
3008         initial file permissions should permit the owner only and this
3009         should not be changed until after the chown, since the group and
3010         other bits would be incorrect if they granted permission before
3011         the chown.
3012
3013         Fix porting problem for iswctype reported by Georg Schwarz in:
3014         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
3015         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
3016         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
3017         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
3018         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
3019
3020 2006-12-03  Jim Meyering  <jim@meyering.net>
3021
3022         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
3023         p->fts_statp may not yet be defined.
3024         (fts_read): Instead, set it in the caller, once p->fts_statp is
3025         sure to be defined, and corresponds to a top-level directory.
3026         This bug made du -x fail.  Here's the coreutils test case:
3027         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
3028         Reported by Mike Frysinger.
3029
3030 2006-12-01  Jim Meyering  <jim@meyering.net>
3031
3032         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
3033         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
3034         Reported by Simon Josefsson.
3035
3036 2006-11-30  Jim Meyering  <jim@meyering.net>
3037
3038         * m4/warning.m4: Use the all-permissive copyright notice
3039         recommended by RMS (rather than LGPL).
3040         * m4/vararrays.m4: Likewise.
3041         * m4/flexmember.m4: Likewise.
3042
3043 2006-11-29  Bruno Haible  <bruno@clisp.org>
3044
3045         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
3046         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
3047         using +=.
3048         Reported by Simon Josefsson <simon@josefsson.org>.
3049
3050 2006-11-28  James Youngman <jay@gnu.org>
3051
3052         * README: Advise users that they might find the bug-gnulib@gnu.org
3053         and autotools-announce@gnu.org mailing lists useful.
3054
3055 2006-11-28  Bruno Haible  <bruno@clisp.org>
3056
3057         * m4/ptrdiff_max.m4: Remove file.
3058
3059 2006-11-21  Bruno Haible  <bruno@clisp.org>
3060
3061         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
3062         _AC_COMPUTE_INT.
3063         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3064         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
3065         _AC_COMPUTE_INT.
3066         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3067         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
3068         _AC_COMPUTE_INT.
3069         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3070
3071 2006-11-28  Jim Meyering  <jim@meyering.net>
3072
3073         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
3074         warning from "gcc -Wshadow" about shadowing the builtin.
3075
3076 2006-11-27  Bruno Haible  <bruno@clisp.org>
3077
3078         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
3079         _AC_COMPUTE_INT.
3080         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3081
3082 2006-11-27  Bruno Haible  <bruno@clisp.org>
3083             Paul Eggert  <eggert@cs.ucla.edu>
3084
3085         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
3086
3087 2006-11-26  Bruno Haible  <bruno@clisp.org>
3088
3089         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
3090         noinst_LTLIBRARIES.
3091
3092 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
3093             Bruno Haible  <bruno@clisp.org>
3094
3095         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
3096         if compiling with "gcc -ansi".
3097
3098 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
3099
3100         Fix some incompatibilities with gcc -ansi -pedantic.
3101         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
3102         if compiling pedantically with GCC, unless it's C99 or later.
3103         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
3104         it mishandles gcc -ansi -pedantic as well.
3105         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
3106         if gcc -pedantic.
3107         * lib/regexec.c (check_node_accept_bytes): Don't use auto
3108         initializers for struct if -pedantic, unless it's C99 or later.
3109
3110 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
3111
3112         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
3113         Don't close an fd more than once. Identical atimes indicate
3114         success, not failure.
3115
3116 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
3117
3118         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
3119
3120 2006-11-23  Jim Meyering  <jim@meyering.net>
3121
3122         * build-aux/announce-gen: New file.  From coreutils.
3123
3124 2006-11-22  Jim Meyering  <jim@meyering.net>
3125
3126         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
3127         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
3128         (fts_read): Use a temporary to narrow the overused st_size member
3129         before using it in a switch statement.  Reported by Matthew Woehlke.
3130
3131         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
3132         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
3133
3134 2006-11-20  Bruno Haible  <bruno@clisp.org>
3135
3136         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
3137         changequote instead of pairs of brackets.
3138         Reported by Andreas Schwab <schwab@suse.de>.
3139
3140 2006-11-21  Jim Meyering  <jim@meyering.net>
3141
3142         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
3143         so as to remain compatible with older compilers.
3144         Patch from Michael Deutschmann.
3145
3146 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
3147
3148         * MODULES.html.sh (File system functions): Add openat.
3149
3150         * lib/openat.h (rpl_fstatat): New macro, if
3151         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
3152         (fstatat): Define to rpl_fstatat under the same conditions,
3153         unless COMPILING_FSTATAT.
3154         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
3155         seems to have the bug.
3156         * lib/fstatat.c: New file.
3157         * modules/openat (Files): Add it.
3158
3159 2006-11-20  Bruno Haible  <bruno@clisp.org>
3160
3161         * Makefile: New file.
3162
3163 2006-11-20  Jim Meyering  <jim@meyering.net>
3164
3165         The beginnings of syntax-related checks for gnulib.
3166         * lib/Makefile: New file.
3167         * lib/t-idcache: New script.  Ensure that the two halves of
3168         idcache.c stay in sync.
3169
3170         * lib/idcache.c: Adjust comments in user- and group- portions to
3171         be more accurate, and to be consistent with one another.
3172
3173 2006-11-20  Jim Meyering  <jim@meyering.net>
3174
3175         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
3176         continue using the flexible array member (thus, this module performs
3177         half as many malloc calls), with the addition that...
3178         (getgroup, getuser): Consistently record a non-match via an empty
3179         "name" string, and map an empty string match to a NULL return value.
3180         * modules/idcache (Depends-on): Re-add flexmember.
3181
3182         * lib/idcache.c (getuser): Remove all uses of the register keyword.
3183         (getuidbyname, getgroup, getgidbyname): Likewise.
3184
3185         Use cleaner syntax: NULL rather than 0.
3186         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
3187
3188 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
3189
3190         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
3191         It mishandled the case where the group was missing.
3192         Problem reported by Greg Schafer.
3193         * modules/idcache: Likewise.
3194
3195 2006-11-18  Jim Meyering  <jim@meyering.net>
3196
3197         * check-module (%exempt_header): Add exception for some
3198         conditionally-included headers.
3199
3200         * modules/i-ring (Depends-on): Add verify.
3201         (License): Change to LGPL.
3202
3203 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
3204
3205         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
3206         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
3207         and inttostr.h.  Use snprintf rather than uinttostr, so that
3208         LGPLed code doesn't depend on GPLed.
3209
3210 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
3211
3212         * modules/inline (License): Change from GPL to LGPL.
3213
3214 2006-11-17  Jim Meyering  <jim@meyering.net>
3215
3216         * modules/d-type (License): Switch to LGPL.
3217
3218 2006-11-15  Bruno Haible  <bruno@clisp.org>
3219
3220         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
3221
3222 2006-11-15  Eric Blake  <ebb9@byu.net>
3223
3224         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
3225         the module dependency.
3226
3227 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
3228             Bruno Haible  <bruno@clisp.org>
3229
3230         * gnulib-tool (func_create_testdir): Add license consistency check.
3231
3232 2006-11-15  Eric Blake  <ebb9@byu.net>
3233
3234         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
3235         random "(cached)" in configure output.
3236
3237 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3238
3239         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
3240         test for conforming inttypes.h is both announced and cached.
3241
3242         * MODULES.html.sh (seen_modules, seen_files): New variables.
3243         (func_module): Rewrite to use a few less gnulib-tool and sed
3244         invocations.  Avoid a couple of quadratic algorithms for ...
3245         (missed_modules, missed_files): ... these, with ...
3246         (func_append, func_tmpdir): ... these new functions, from
3247         gnulib-tool.  Analogously, install traps for cleanup.
3248
3249         * tests/test-gc.c (main): Remove unused variables.
3250         * tests/test-read-file.c: Include stdlib.h, for 'free'.
3251
3252 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
3253
3254         * modules/inttostr (License): Change to LGPL.
3255
3256 2006-11-14  Eric Blake  <ebb9@byu.net>
3257
3258         * modules/tempname (License): Change to LGPL.
3259
3260 2006-11-14  Eric Blake  <ebb9@byu.net>
3261
3262         * doc/functions.texi (Function Portability): *printf functions on
3263         Cygwin now understand all POSIX size specifiers.
3264
3265 2006-11-14  Bruno Haible  <bruno@clisp.org>
3266
3267         * modules/c-ctype (License): Change to LGPL.
3268
3269 2006-11-12  Bruno Haible  <bruno@clisp.org>
3270
3271         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
3272         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
3273         for GNOME libraries, for which the include files are installed in
3274         subdirectories of $prefix/include.
3275
3276 2006-11-12  Bruno Haible  <bruno@clisp.org>
3277
3278         * m4/lib-link.m4: Require at least autoconf-2.54.
3279         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
3280         name to underscores for the --with option.
3281
3282 2006-11-13  Bruno Haible  <bruno@clisp.org>
3283
3284         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
3285         the tests directory.
3286         Reported by Ralf Wildenhues.
3287
3288 2006-11-13  Bruno Haible  <bruno@clisp.org>
3289
3290         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
3291         (func_emit_initmacro_end): Undo the override here.
3292         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
3293         Works around the famous automake error in coreutils.
3294
3295 2006-11-13  Eric Blake  <ebb9@byu.net>
3296
3297         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
3298         element, not its node.
3299
3300 2006-11-12  Bruno Haible  <bruno@clisp.org>
3301
3302         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
3303         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
3304
3305 2006-11-12  Bruno Haible  <bruno@clisp.org>
3306
3307         * gnulib-tool: New option --local-symlink.
3308         (func_usage): Document it.
3309         (lsymbolic): New variable.
3310         (func_import, func_create_testdir): If --symlink was not specified,
3311         test whether --local-symlink was specified and the file comes from
3312         the local_gnulib_dir.
3313
3314 2006-11-12  Bruno Haible  <bruno@clisp.org>
3315
3316         * gnulib-tool (func_ln): New function.
3317         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
3318
3319 2006-11-12  Bruno Haible  <bruno@clisp.org>
3320
3321         Finish support for source files in subdirectories.
3322         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
3323         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
3324         AUTOMAKE_OPTIONS.
3325         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
3326
3327 2006-11-12  Bruno Haible  <bruno@clisp.org>
3328
3329         * gnulib-tool (func_get_automake_snippet): Synthesize also an
3330         EXTRA_lib_SOURCES augmentation.
3331         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
3332
3333 2006-11-12  Jim Meyering  <jim@meyering.net>
3334
3335         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
3336         file descriptors.  This also averts a failure on systems with
3337         native openat support when a traversed directory lacks "x" access.
3338         * lib/fts_.h: Include "i-ring.h"
3339         (struct FTS) [fts_fd_ring]: New member.
3340         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
3341         (FCHDIR): Add parentheses.
3342         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
3343         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
3344         When descending, rather than simply closing the previous
3345         fts_cwd_fd value, push that file descriptor onto the ring.
3346         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
3347         (fts_open): Initialize the new fd_ring member.
3348         (fts_close): Clear the ring.
3349         (fts_safe_changedir): When possible, use our new fd_ring to skip
3350         the diropen and fstat and dev/ino comparison that would normally
3351         accompany a virtual `chdir ("..")'.
3352
3353         * modules/fts (Depends-on): Add i-ring.
3354         * modules/i-ring: New module.
3355         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
3356         * m4/i-ring.m4: New file.
3357
3358 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3359
3360         * gnulib-tool (func_create_testdir): Fix replacement of
3361         `build-aux' in configure.ac.  Run autotools in gltests
3362         subdirectory.
3363         (func_create_testdir, func_create_megatestdir, test): There is
3364         no need for '--force' in most autotool invocations in a new
3365         tree.  Actually fail the whole test if any of the tools, or the
3366         configure or make stages fail.
3367
3368         Sync from Automake.
3369         * build-aux/gnupload: Revert last change.  Add pointer to upload
3370         instructions of the GNU Maintenance Instructions.
3371         Suggestion by Karl Berry.
3372
3373 2006-11-10  Jim Meyering  <jim@meyering.net>
3374
3375         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
3376
3377 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
3378
3379         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
3380         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
3381         (bind_textdomain_codeset) [! ENABLE_NLS]:
3382         Evaluate all the arguments.  That way, callers get compatible behavior
3383         if the arguments have side effects.  Also, it avoids some GCC
3384         diagnostics in some cases; Joel E. Denny reported problems when Bison
3385         was configured with --enable-gcc-warnigs.
3386
3387 2006-11-10  Jim Meyering  <jim@meyering.net>
3388
3389         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
3390         relevant options in CFLAGS (like -O, -fno-inline) are taken into
3391         account.
3392
3393 2006-11-10  Jim Meyering  <jim@meyering.net>
3394
3395         * modules/inline: New file/module.
3396         * modules/xalloc (Files): Remove m4/inline.m4.
3397         (Depends-on): Add inline, instead.
3398         * modules/oset: Likewise.
3399         * modules/list: Likewise.
3400
3401 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
3402
3403         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
3404         Problem reported by Matthew Woehlke.
3405
3406 2006-11-09  Bruno Haible  <bruno@clisp.org>
3407
3408         * lib/tempname.c (gen_tempname): Remove variant that invokes
3409         __gen_tempname.
3410         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
3411         __gen_tempname.
3412
3413 2006-11-08  Bruno Haible  <bruno@clisp.org>
3414
3415         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
3416         to 'yes' instead of 'cross-compiling'.
3417
3418 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
3419
3420         * lib/quotearg.h (quotearg_free): New decl.
3421         * lib/quotearg.c (quotearg_free): New function.
3422         (slot0, nslots, slotvec0, slotvec):
3423         Now file-scope so that quotearg_free can get at them.
3424
3425 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3426
3427         Sync from Automake.
3428         * build-aux/gnupload: Add missing 'gnu' to example URL.
3429         Report by Karl Berry.
3430
3431 2006-11-08  Bruno Haible  <bruno@clisp.org>
3432
3433         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
3434         Suggested by Paul Eggert.
3435
3436 2006-11-08  Jim Meyering  <jim@meyering.net>
3437
3438         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
3439         It's already included if !_LIBC.
3440         (fts_safe_changedir): Add a comment.
3441
3442 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
3443
3444         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
3445         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
3446         Matthew Woehlke.
3447
3448         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
3449         definitions up, to avoid colliding with change below.
3450         (static_inline) [HAVE_INLINE]: New macro.
3451         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
3452         Provide extern decls when !HAVE_INLINE.  Do not define unless
3453         static_inline is defined, either by us or by xmalloc.c.  Use
3454         static_inline rather than static inline.
3455         (XCALLOC): Optimize sizeof(T) = 1 case.
3456         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
3457
3458 2006-11-07  Bruno Haible  <bruno@clisp.org>
3459
3460         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
3461         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
3462         AC_C_INLINE.
3463         * modules/xalloc (Files): Add m4/inline.m4.
3464
3465 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3466
3467         * README: Fix typo.
3468         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
3469         (Miscellanous Notes): ...from this.
3470
3471 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
3472
3473         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
3474         Mention that offsetof should be used instead of sizeof.
3475         From Bruno Haible.
3476
3477 2006-11-07  Bruno Haible  <bruno@clisp.org>
3478
3479         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
3480
3481 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
3482
3483         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
3484         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
3485         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
3486         (gl_tree_add_before, gl_tree_add_after):
3487         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
3488         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
3489         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
3490         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
3491         (gl_linked_add_after, gl_linked_add_at): Likewise.
3492         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
3493         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
3494         (gl_tree_add_before, gl_tree_add_after): Likewise.
3495         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
3496         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
3497         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
3498
3499 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3500
3501         * lib/gl_oset.h: Use C comment style, not C++ comment style.
3502
3503 2006-11-06  Bruno Haible  <bruno@clisp.org>
3504
3505         * m4/inline.m4: New file.
3506         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
3507         * modules/list (Files): Add m4/inline.m4.
3508         * modules/oset (Files): Likewise.
3509
3510 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
3511
3512         * lib/idcache.c: Include <stddef.h>, for offsetof.
3513         (struct userid.name): Change from char * to a flexible array member.
3514         All uses changed.
3515         * modules/idcache (Depends-on): Add flexmember.
3516
3517         * MODULES.html.sh (Core language properties): New module flexmember.
3518         * modules/flexmember, m4/flexmember.m4: New files.
3519
3520         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
3521         inline functions that are identical with the old xnmalloc_inline,
3522         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
3523         that we can avoid some unnecessary integer multiplications and
3524         divisions in the common case where the element size is known at
3525         compile time.
3526         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
3527         needed.
3528         (xnboundedmalloc): Remove.
3529         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
3530         arguments, for consistency with rest of this header.
3531         (xcharalloc): Rewrite using XNMALLOC.
3532         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
3533         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
3534         versions have been moved to lib/xalloc.h and renamed to be the
3535         non-*_inline versions.
3536         (xmalloc, xrealloc): Implement without reference to the xnmalloc
3537         and xnrealloc functions, since those functions are now inline and
3538         now call us.
3539         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
3540         renaming described above.
3541         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
3542         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
3543         captures the dependency in AC_C_INLINE.
3544
3545         New module canonicalize-lgpl, proposed by Charles Wilson in
3546         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
3547         with a few small changes afterwards.
3548         * MODULES.html.sh (File system functions): New module
3549         canonicalize-lgpl.
3550         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
3551         and canonicalize_file_name.
3552         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
3553         * modules/canonicalize-lgpl: New files.
3554
3555 2006-11-05  Bruno Haible  <bruno@clisp.org>
3556
3557         * gnulib-tool (func_import, func_create_testdir): Create directories
3558         also for files in subdirectories of lib/.
3559
3560 2006-11-05  Bruno Haible  <bruno@clisp.org>
3561
3562         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
3563         ANSI C compliant.
3564
3565 2006-11-03  Bruno Haible  <bruno@clisp.org>
3566
3567         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
3568         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
3569         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
3570         (xnboundedmalloc): New inline function.
3571         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
3572         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
3573         xmalloc.
3574         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
3575         xmalloc.
3576         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
3577         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
3578         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
3579         xmalloc.
3580         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
3581         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
3582         xmalloc.
3583         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
3584         gl_tree_add_after): Use XMALLOC instead of xmalloc.
3585         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
3586         xmalloc.
3587         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
3588         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
3589         gl_tree_add_after): Use XMALLOC instead of xmalloc.
3590         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
3591         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
3592         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
3593         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
3594
3595 2006-11-03  Bruno Haible  <bruno@clisp.org>
3596
3597         * lib/c-ctype.h [C++]: Define functions without name mangling.
3598         * lib/fwriteerror.h [C++]: Likewise.
3599         * lib/gcd.h [C++]: Likewise.
3600         * lib/linebreak.h [C++]: Likewise.
3601
3602 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
3603
3604         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
3605         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
3606         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
3607         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
3608         Check for functions and headers just once.
3609         Check for declaration of canonicalize_file_name.
3610         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
3611
3612 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
3613
3614         * gnulib-tool (func_import): Fix typo in actioncmd.
3615
3616 2006-11-02  Bruno Haible  <bruno@clisp.org>
3617
3618         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
3619         newline sequence in the Makefile.am snippet as a space, like "make"
3620         does.
3621         Reported by Roger Persson <perrog@gmail.com>.
3622
3623 2006-11-01  Bruno Haible  <bruno@clisp.org>
3624
3625         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
3626         already declared in <string.h>.
3627         * lib/strcase.h (strncasecmp): Don't declare it if yes.
3628
3629 2006-11-01  Bruno Haible  <bruno@clisp.org>
3630
3631         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
3632         * lib/strcase.h: Include <string.h>.
3633         (strcasecmp): Define to rpl_strcasecmp here.
3634
3635 2006-11-01  Bruno Haible  <bruno@clisp.org>
3636
3637         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
3638
3639 2006-11-01  Eric Blake  <ebb9@byu.net>
3640
3641         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
3642
3643         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
3644
3645 2006-10-29  Bruno Haible  <bruno@clisp.org>
3646
3647         Make it compile in C++ mode.
3648         * lib/full-write.c (full_rw): Add a cast.
3649
3650 2006-11-01  Bruno Haible  <bruno@clisp.org>
3651
3652         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
3653         be POSIX compliant.
3654         Reported by Roger Persson <perrog@gmail.com>.
3655
3656 2006-11-01  Eric Blake  <ebb9@byu.net>
3657
3658         * lib/getopt_.h: Fix comments.
3659
3660 2006-10-31  Eric Blake  <ebb9@byu.net>
3661
3662         * modules/tmpdir (Depends-on): Add sys_stat.
3663         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
3664         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
3665         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
3666         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
3667         tempname.
3668
3669 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
3670
3671         Avoid some C++ diagnostics reported by Bruno Haible.
3672         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
3673         xmalloc.
3674         (quotearg_alloc): Use xcharalloc rather than xmalloc.
3675         (struct slotvec): Move to top level.
3676         (quotearg_n_options): Rewrite to avoid xmalloc.
3677         * lib/xalloc.h (xcharalloc): New function.
3678         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
3679         [defined __cplusplus]: Add function template that provides result
3680         type propagation.  This part of the change is from Bruno Haible.
3681
3682 2006-10-29  Bruno Haible  <bruno@clisp.org>
3683
3684         Make it compile in C++ mode.
3685         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
3686         * lib/strnlen1.c (strnlen1): Cast memchr result.
3687         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
3688         * lib/clean-temp.c (string_equals, string_hash): Add casts.
3689         (create_temp_dir): Rename local variable 'template'.
3690         (compile_csharp_using_sscli): Add cast.
3691         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
3692         * lib/findprog.c (find_in_path): Likewise.
3693         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
3694         * lib/wait-process.c (register_slave_subprocess): Likewise.
3695
3696 2006-10-22  Bruno Haible  <bruno@clisp.org>
3697
3698         * modules/tsearch: New file.
3699         * lib/tsearch.h: New file.
3700         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
3701         * m4/tsearch.m4: New file.
3702         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
3703
3704 2006-10-29  Eric Blake  <ebb9@byu.net>
3705
3706         * lib/arcfour.c: Assume config.h.
3707         * lib/arctwo.c: Likewise.
3708         * lib/base64.c: Likewise.
3709         * lib/check-version.c: Likewise.
3710         * lib/crc.c: Likewise.
3711         * lib/des.c: Likewise.
3712         * lib/gc-gnulib.c: Likewise.
3713         * lib/gc-libgcrypt.c: Likewise.
3714         * lib/gc-pbkdf2-sha1.c: Likewise.
3715         * lib/getaddrinfo.c: Likewise.
3716         * lib/getdelim.c: Likewise.
3717         * lib/getline.c: Likewise.
3718         * lib/hmac-md5.c: Likewise.
3719         * lib/hmac-sha1.c: Likewise.
3720         * lib/iconvme.c: Likewise.
3721         * lib/md2.c: Likewise.
3722         * lib/md4.c: Likewise.
3723         * lib/memxor.c: Likewise.
3724         * lib/read-file.c: Likewise.
3725         * lib/readline.c: Likewise.
3726         * lib/rijndael-alg-fst.c: Likewise.
3727         * lib/rijndael-api-fst.c: Likewise.
3728         * lib/xgetdomainname.c: Likewise.
3729
3730 2006-10-28  Eric Blake  <ebb9@byu.net>
3731
3732         * lib/xstrndup.c: Assume config.h.
3733
3734 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
3735
3736         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
3737         stat-macros.h is now for our own macros, whereas stat_h is for
3738         macros in the <sys/stat.h> name space.
3739         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
3740         (STAT_MACROS_H): Remove.
3741         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
3742         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
3743         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
3744         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
3745         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
3746         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
3747         Move these macros to ...
3748         * lib/stat_.h: here.  Don't include stat-macros.h.
3749         * lib/canonicalize.c: Don't include stat-macros.h.
3750         * lib/chown.c: Likewise.
3751         * lib/euidaccess.c: Likewise.
3752         * lib/file-type.c: Likewise.
3753         * lib/filemode.c: Likewise.
3754         * lib/glob.c: Likewise.
3755         * lib/isapipe.c: Likewise.
3756         * lib/lchown.c: Likewise.
3757         * lib/lstat.c: Likewise.
3758         * lib/mkdir-p.c: Likewise.
3759         * lib/rmdir.c: Likewise.
3760         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
3761         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
3762         unless mkdir isn't declared, to speed up 'configure'.
3763         Always create sys/stat.h, since it's unlikely any real sys/stat.h
3764         would define all the S_* symbols.
3765         * modules/canonicalize (Depends-on):
3766         Depend on sys_stat, not stat-macros.
3767         * modules/chown: Likewise.
3768         * modules/euidaccess: Likewise.
3769         * modules/filemode: Likewise.
3770         * modules/file-type: Likewise.
3771         * modules/glob: Likewise.
3772         * modules/isapipe: Likewise.
3773         * modules/lchown: Likewise.
3774         * modules/lstat: Likewise.
3775         * modules/mkancesdirs: Likewise.
3776         * modules/rmdir: Likewise.
3777         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
3778         * modules/modechange: Likewise.
3779         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
3780         (configure.ac): Remove gl_STAT_MACROS.
3781         * modules/sys_stat (Depends-on): Remove stat-macros.
3782
3783 2006-10-27  Bruno Haible  <bruno@clisp.org>
3784
3785         * m4/signed.m4: Remove file.
3786         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
3787         invocation.
3788         * modules/vasnprintf (Files): Remove m4/signed.m4.
3789
3790 2006-10-27  Bruno Haible  <bruno@clisp.org>
3791
3792         Update to GNU gettext 0.16.
3793         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
3794         m4/inttypes-h.m4, m4/signed.m4.
3795         * m4/gettext.m4: Update to GNU gettext 0.16.
3796         * m4/intl.m4: New file, from GNU gettext.
3797         * m4/intldir.m4: New file, from GNU gettext.
3798         * config/srclist.txt: Update
3799
3800 2006-10-27  Eric Blake  <ebb9@byu.net>
3801
3802         * MODULES.html.sh: Document tempname.
3803         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
3804         dependencies.
3805         (Files): Move lib/tempname.c...
3806         * modules/tempname: ...to this new module.
3807         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
3808         (gl_PREREQ_TEMPNAME): Move...
3809         * m4/tempname.m4: ...to this new file.
3810         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
3811         * modules/sys_stat (Depends-on): Add stat-macros.
3812         * lib/stat_.h (includes): Pick up stat macros.
3813         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
3814         if stat macros are broken.
3815         * lib/tempname.c (includes): No need to include "stat-macros.h".
3816         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
3817         (direxists, __path_search) [!_LIBC]: Don't compile these in
3818         gnulib; the tmpdir module covers that.
3819         * lib/tempname.h: New file.
3820
3821 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
3822
3823         * COPYING: Explain how gnulib-tool converts licence headers.
3824         Almost all wording by Eric Blake.
3825
3826 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
3827
3828         * lib/mbchar.h (is_basic_table): Make read-only.
3829         * lib/mbchar.c (is_basic_table): Likewise.
3830         Reported by John Darrington.
3831
3832 2006-10-25  Bruno Haible  <bruno@clisp.org>
3833
3834         * lib/progname.h (set_program_name): Undefine before defining.
3835
3836 2006-10-25  Bruno Haible  <bruno@clisp.org>
3837
3838         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
3839         false for non-gcc C++ compilers.
3840         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
3841
3842 2006-10-24  Bruno Haible  <bruno@clisp.org>
3843
3844         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
3845         iconv implementations like Irix iconv.
3846
3847 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3848
3849         * modules/vararrays: New file.
3850         * m4/vararrays.m4: New file, taken from diffutils.
3851         * MODULES.html.sh: New module vararrays.
3852
3853 2006-10-24  Karl Berry  <karl@gnu.org>
3854
3855         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
3856         Don't call GNU Unix.
3857
3858 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3859
3860         * users.txt: Add Libtool.
3861
3862         Sync from Libtool:
3863
3864         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3865
3866         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
3867         to gnulib's policy of including config.h unconditionally.
3868
3869 2006-10-24  Bruno Haible  <bruno@clisp.org>
3870
3871         * modules/wcwidth (Files): Add m4/wint_t.m4.
3872         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
3873         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
3874
3875 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3876
3877         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
3878         to pacify GCC with some -W flags enabled.  Problem reported by
3879         Bruno Haible.
3880
3881 2006-10-24  Jim Meyering  <jim@meyering.net>
3882
3883         * MODULES.html.sh: Remove uinttostr.  It's not a module.
3884         Reported by Karl Berry.
3885
3886 2006-10-23  Bruno Haible  <bruno@clisp.org>
3887
3888         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
3889
3890 2006-10-24  Bruno Haible  <bruno@clisp.org>
3891
3892         * lib/gl_list.h: Use C comment style, not C++ comment style.
3893
3894 2006-10-23  Eric Blake  <ebb9@byu.net>
3895
3896         * lib/getaddrinfo.c (includes): Add missing include.
3897
3898 2006-10-23  Bruno Haible  <bruno@clisp.org>
3899             Paul Eggert  <eggert@cs.ucla.edu>
3900
3901         Ability to rename obstack_free.
3902         * lib/obstack.h (__obstack_free): New macro. Declare instead of
3903         obstack_free.
3904         (obstack_free): Invoke the __obstack_free macro.
3905         * lib/obstack.c (obstack_free): Use __obstack_free macro.
3906
3907 2006-10-23  Bruno Haible  <bruno@clisp.org>
3908             Paul Eggert  <eggert@cs.ucla.edu>
3909
3910         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
3911         __argc, __argv from the declaration. (They are defined as macros on
3912         mingw.)
3913
3914 2006-10-22  Bruno Haible  <bruno@clisp.org>
3915
3916         * doc/gnulib-intro.texi: New file.
3917         * doc/gnulib.texi: Include it.
3918
3919 2006-10-21  Bruno Haible  <bruno@clisp.org>
3920
3921         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
3922         "Introduction", "Miscellanous Notes", "Particular Modules".
3923
3924 2006-10-21  Bruno Haible  <bruno@clisp.org>
3925
3926         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3927         Change mostlyclean-local rule to avoid sh syntax error from bash
3928         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
3929
3930 2006-10-23  Jim Meyering  <jim@meyering.net>
3931
3932         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
3933         in place of snprintf.
3934
3935         * modules/inttostr (Files): Add lib/uinttostr.c.
3936         * lib/uinttostr.c (inttostr): New file/function.
3937         * lib/inttostr.h (uinttostr): Declare.
3938         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
3939         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
3940         Add uinttostr.
3941         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
3942
3943 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
3944
3945         * lib/canonicalize.c (ELOOP): Define if not already defined.
3946         Problem reported by Bruno Haible in
3947         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
3948
3949 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
3950
3951         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
3952         Problem reported by Perry Smith and Ville Laurikari.
3953
3954         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
3955         uses.
3956
3957 2006-10-19  Bruno Haible  <bruno@clisp.org>
3958
3959         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
3960         for mingw.
3961
3962 2006-10-19  Bruno Haible  <bruno@clisp.org>
3963
3964         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
3965         Needed for mingw.
3966
3967 2006-10-19  Bruno Haible  <bruno@clisp.org>
3968
3969         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
3970
3971 2006-10-19  Bruno Haible  <bruno@clisp.org>
3972
3973         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
3974         it.
3975
3976 2006-10-19  Bruno Haible  <bruno@clisp.org>
3977
3978         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
3979         invocation.
3980
3981 2006-10-19  Bruno Haible  <bruno@clisp.org>
3982
3983         * gnulib-tool (func_create_testdir): Don't include ftruncate and
3984         mountlist by default.
3985
3986 2006-10-16  Bruno Haible  <bruno@clisp.org>
3987
3988         * lib/c-strstr.c: Include c-strstr.h.
3989
3990 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
3991
3992         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
3993         in a slash.
3994
3995 2006-10-18  Bruno Haible  <bruno@clisp.org>
3996
3997         * lib/lock.h [C++]: Wrap definitions in extern "C".
3998
3999 2006-10-18  Bruno Haible  <bruno@clisp.org>
4000
4001         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
4002         gl_LIBOBJS list.
4003
4004 2006-10-18  Bruno Haible  <bruno@clisp.org>
4005
4006         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
4007
4008 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
4009
4010         * lib/xstrtol.h: Include gettext.h.
4011         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
4012         Problem reported by Eric Blake.
4013         * modules/xstrtol (Depends-on): Add gettext-h.
4014
4015 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
4016
4017         * lib/strftime.c (advance): New macro.
4018         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
4019         incomplete type, so you can't add 0 to it.  Problem and patch
4020         reported by Eelco Dolstra for dietlibc.
4021
4022 2006-10-18  Jim Meyering  <jim@meyering.net>
4023
4024         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
4025         type for a local, and rename it: s/up/user_proc/.
4026
4027 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
4028
4029         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
4030         READ_UTMP_USER_PROCESS.
4031         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
4032
4033 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
4034
4035         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
4036         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
4037
4038 2006-10-17  Eric Blake  <ebb9@byu.net>
4039
4040         * lib/sigprocmask.c (sigprocmask): Fix typo.
4041
4042         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
4043
4044         * modules/clean-temp (Makefile.am): Don't add to make output...
4045         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
4046         config.h.
4047
4048 2006-10-17  Bruno Haible  <bruno@clisp.org>
4049
4050         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
4051         differently if DEFAULT_TEXT_DOMAIN is set.
4052
4053 2006-10-16  Bruno Haible  <bruno@clisp.org>
4054
4055         * lib/clean-temp.c: Include fwriteerror.h.
4056
4057 2006-10-16  Bruno Haible  <bruno@clisp.org>
4058
4059         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
4060
4061 2006-10-16  Bruno Haible  <bruno@clisp.org>
4062
4063         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
4064         * lib/sigprocmask.h: Include <sys/types.h>.
4065         (sigset_t): Use the system's definition if present.
4066
4067 2006-10-17  Eric Blake  <ebb9@byu.net>
4068
4069         * lib/xvasprintf.c (includes): Assume config.h.
4070         * lib/xasprintf.c (includes): Likewise.
4071
4072 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
4073
4074         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
4075         at least as wide as intmax_t.
4076
4077 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
4078
4079         (Imported from Automake.)
4080         * build-aux/gnupload: Update to version 1.1 of directive file.
4081
4082 2006-10-16  Eric Blake  <ebb9@byu.net>
4083
4084         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
4085         match Automake 1.10a.
4086
4087 2006-10-14  Bruno Haible  <bruno@clisp.org>
4088
4089         * modules/sigprocmask: New file.
4090         * lib/sigprocmask.h: New file.
4091         * lib/sigprocmask.c: New file.
4092         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
4093         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
4094         request sigprocmask.o.
4095         (gl_PREREQ_SIGPROCMASK): New macro.
4096         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
4097         (Depends-on): Add sigprocmask.
4098         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
4099         gt_SIGNALBLOCKING. Test for 'raise' only once.
4100         * lib/fatal-signal.c: Include sigprocmask.h.
4101         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
4102         unblock_fatal_signals): Define always.
4103         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
4104         sigprocmask.
4105
4106 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
4107
4108         Sync from Automake.
4109         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
4110         which incorrectly sets the mode of an existing destination
4111         directory.  In some cases the unpatched install-sh could do the
4112         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
4113         system.  We hope this is rare in practice, but it's clearly worth
4114         fixing.  Problem reported by Alex Unleashed in
4115         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
4116         Also, don't bother to check for -m bugs unless we're using -m;
4117         suggested by Stepan Kasal.
4118
4119 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4120
4121         Sync from Automake.
4122         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
4123         `-c' flag, so they appear at the same position as in %FASTDEP%
4124         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
4125         which ignores unknown options only after the first non-option.
4126         Bug report against M4 by Nelson H. F. Beebe.
4127
4128 2006-10-13  Jim Meyering  <jim@meyering.net>
4129
4130         Fix a bug in yesterday's change.
4131         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
4132         p->fts_statp->st_dev would be used uninitialized.
4133         Ensures that we always call fts_stat on the very first entry.
4134         Miklos Szeredi reported that find -xdev stopped working.
4135
4136 2006-10-12  Bruno Haible  <bruno@clisp.org>
4137
4138         * gnulib-tool (func_get_automake_snippet): Append an automatically
4139         computed EXTRA_DIST augmentation.
4140         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
4141         * modules/alloca-opt (Makefile.am): Likewise.
4142         * modules/allocsa (Makefile.am): Likewise.
4143         * modules/arcfour (Makefile.am): Likewise.
4144         * modules/arctwo (Makefile.am): Likewise.
4145         * modules/argmatch (Makefile.am): Likewise.
4146         * modules/argz (Makefile.am): Likewise.
4147         * modules/atexit (Makefile.am): Likewise.
4148         * modules/backupfile (Makefile.am): Likewise.
4149         * modules/byteswap (Makefile.am): Likewise.
4150         * modules/c-strtod (Makefile.am): Likewise.
4151         * modules/c-strtold (Makefile.am): Likewise.
4152         * modules/calloc (Makefile.am): Likewise.
4153         * modules/canon-host (Makefile.am): Likewise.
4154         * modules/canonicalize (Makefile.am): Likewise.
4155         * modules/chdir-long (Makefile.am): Likewise.
4156         * modules/chdir-safer (Makefile.am): Likewise.
4157         * modules/check-version (Makefile.am): Likewise.
4158         * modules/chown (Makefile.am): Likewise.
4159         * modules/cloexec (Makefile.am): Likewise.
4160         * modules/close-stream (Makefile.am): Likewise.
4161         * modules/closeout (Makefile.am): Likewise.
4162         * modules/crc (Makefile.am): Likewise.
4163         * modules/csharpexec (Makefile.am): Likewise.
4164         * modules/cycle-check (Makefile.am): Likewise.
4165         * modules/des (Makefile.am): Likewise.
4166         * modules/dev-ino (Makefile.am): Likewise.
4167         * modules/dirfd (Makefile.am): Likewise.
4168         * modules/dirname (Makefile.am): Likewise.
4169         * modules/dup2 (Makefile.am): Likewise.
4170         * modules/eealloc (Makefile.am): Likewise.
4171         * modules/error (Makefile.am): Likewise.
4172         * modules/euidaccess (Makefile.am): Likewise.
4173         * modules/exclude (Makefile.am): Likewise.
4174         * modules/exitfail (Makefile.am): Likewise.
4175         * modules/fcntl-safer (Makefile.am): Likewise.
4176         * modules/fcntl (Makefile.am): Likewise.
4177         * modules/file-type (Makefile.am): Likewise.
4178         * modules/fileblocks (Makefile.am): Likewise.
4179         * modules/filemode (Makefile.am): Likewise.
4180         * modules/filenamecat (Makefile.am): Likewise.
4181         * modules/fnmatch (Makefile.am): Likewise.
4182         * modules/fopen-safer (Makefile.am): Likewise.
4183         * modules/fpending (Makefile.am): Likewise.
4184         * modules/fprintftime (Makefile.am): Likewise.
4185         * modules/free (Makefile.am): Likewise.
4186         * modules/fsusage (Makefile.am): Likewise.
4187         * modules/ftruncate (Makefile.am): Likewise.
4188         * modules/fts (Makefile.am): Likewise.
4189         * modules/gc-arcfour (Makefile.am): Likewise.
4190         * modules/gc-des (Makefile.am): Likewise.
4191         * modules/gc-hmac-md5 (Makefile.am): Likewise.
4192         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
4193         * modules/gc-md4 (Makefile.am): Likewise.
4194         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
4195         * modules/gc-sha1 (Makefile.am): Likewise.
4196         * modules/gc (Makefile.am): Likewise.
4197         * modules/getaddrinfo (Makefile.am): Likewise.
4198         * modules/getcwd (Makefile.am): Likewise.
4199         * modules/getdelim (Makefile.am): Likewise.
4200         * modules/getdomainname (Makefile.am): Likewise.
4201         * modules/getgroups (Makefile.am): Likewise.
4202         * modules/gethostname (Makefile.am): Likewise.
4203         * modules/gethrxtime (Makefile.am): Likewise.
4204         * modules/getline (Makefile.am): Likewise.
4205         * modules/getloadavg (Makefile.am): Likewise.
4206         * modules/getlogin_r (Makefile.am): Likewise.
4207         * modules/getndelim2 (Makefile.am): Likewise.
4208         * modules/getopt (Makefile.am): Likewise.
4209         * modules/getpagesize (Makefile.am): Likewise.
4210         * modules/getpass-gnu (Makefile.am): Likewise.
4211         * modules/getpass (Makefile.am): Likewise.
4212         * modules/getsubopt (Makefile.am): Likewise.
4213         * modules/gettime (Makefile.am): Likewise.
4214         * modules/gettimeofday (Makefile.am): Likewise.
4215         * modules/getugroups (Makefile.am): Likewise.
4216         * modules/getusershell (Makefile.am): Likewise.
4217         * modules/glob (Makefile.am): Likewise.
4218         * modules/group-member (Makefile.am): Likewise.
4219         * modules/hard-locale (Makefile.am): Likewise.
4220         * modules/hash (Makefile.am): Likewise.
4221         * modules/hmac-md5 (Makefile.am): Likewise.
4222         * modules/hmac-sha1 (Makefile.am): Likewise.
4223         * modules/human (Makefile.am): Likewise.
4224         * modules/idcache (Makefile.am): Likewise.
4225         * modules/imaxabs (Makefile.am): Likewise.
4226         * modules/imaxdiv (Makefile.am): Likewise.
4227         * modules/inet_ntop (Makefile.am): Likewise.
4228         * modules/inet_pton (Makefile.am): Likewise.
4229         * modules/intprops (Makefile.am): Likewise.
4230         * modules/inttostr (Makefile.am): Likewise.
4231         * modules/inttypes (Makefile.am): Likewise.
4232         * modules/isapipe (Makefile.am): Likewise.
4233         * modules/javaversion (Makefile.am): Likewise.
4234         * modules/lchmod (Makefile.am): Likewise.
4235         * modules/lchown (Makefile.am): Likewise.
4236         * modules/localcharset (Makefile.am): Likewise.
4237         * modules/long-options (Makefile.am): Likewise.
4238         * modules/lstat (Makefile.am): Likewise.
4239         * modules/malloc (Makefile.am): Likewise.
4240         * modules/mathl (Makefile.am): Likewise.
4241         * modules/mbchar (Makefile.am): Likewise.
4242         * modules/md2 (Makefile.am): Likewise.
4243         * modules/md4 (Makefile.am): Likewise.
4244         * modules/md5 (Makefile.am): Likewise.
4245         * modules/memcasecmp (Makefile.am): Likewise.
4246         * modules/memchr (Makefile.am): Likewise.
4247         * modules/memcmp (Makefile.am): Likewise.
4248         * modules/memcoll (Makefile.am): Likewise.
4249         * modules/memcpy (Makefile.am): Likewise.
4250         * modules/memmem (Makefile.am): Likewise.
4251         * modules/memmove (Makefile.am): Likewise.
4252         * modules/mempcpy (Makefile.am): Likewise.
4253         * modules/memrchr (Makefile.am): Likewise.
4254         * modules/memset (Makefile.am): Likewise.
4255         * modules/memxor (Makefile.am): Likewise.
4256         * modules/mkancesdirs (Makefile.am): Likewise.
4257         * modules/mkdir-p (Makefile.am): Likewise.
4258         * modules/mkdir (Makefile.am): Likewise.
4259         * modules/mkdtemp (Makefile.am): Likewise.
4260         * modules/mkstemp (Makefile.am): Likewise.
4261         * modules/mktime (Makefile.am): Likewise.
4262         * modules/modechange (Makefile.am): Likewise.
4263         * modules/mountlist (Makefile.am): Likewise.
4264         * modules/nanosleep (Makefile.am): Likewise.
4265         * modules/obstack (Makefile.am): Likewise.
4266         * modules/openat (Makefile.am): Likewise.
4267         * modules/pagealign_alloc (Makefile.am): Likewise.
4268         * modules/pathmax (Makefile.am): Likewise.
4269         * modules/physmem (Makefile.am): Likewise.
4270         * modules/poll (Makefile.am): Likewise.
4271         * modules/posixtm (Makefile.am): Likewise.
4272         * modules/posixver (Makefile.am): Likewise.
4273         * modules/putenv (Makefile.am): Likewise.
4274         * modules/quote (Makefile.am): Likewise.
4275         * modules/quotearg (Makefile.am): Likewise.
4276         * modules/raise (Makefile.am): Likewise.
4277         * modules/read-file (Makefile.am): Likewise.
4278         * modules/readline (Makefile.am): Likewise.
4279         * modules/readlink (Makefile.am): Likewise.
4280         * modules/readtokens (Makefile.am): Likewise.
4281         * modules/readutmp (Makefile.am): Likewise.
4282         * modules/realloc (Makefile.am): Likewise.
4283         * modules/regex (Makefile.am): Likewise.
4284         * modules/rename-dest-slash (Makefile.am): Likewise.
4285         * modules/rename (Makefile.am): Likewise.
4286         * modules/rijndael (Makefile.am): Likewise.
4287         * modules/rmdir (Makefile.am): Likewise.
4288         * modules/rpmatch (Makefile.am): Likewise.
4289         * modules/safe-read (Makefile.am): Likewise.
4290         * modules/safe-write (Makefile.am): Likewise.
4291         * modules/same-inode (Makefile.am): Likewise.
4292         * modules/same (Makefile.am): Likewise.
4293         * modules/save-cwd (Makefile.am): Likewise.
4294         * modules/savedir (Makefile.am): Likewise.
4295         * modules/setenv (Makefile.am): Likewise.
4296         * modules/settime (Makefile.am): Likewise.
4297         * modules/sha1 (Makefile.am): Likewise.
4298         * modules/sig2str (Makefile.am): Likewise.
4299         * modules/snprintf (Makefile.am): Likewise.
4300         * modules/stat-macros (Makefile.am): Likewise.
4301         * modules/stat-time (Makefile.am): Likewise.
4302         * modules/stdbool (Makefile.am): Likewise.
4303         * modules/stdint (Makefile.am): Likewise.
4304         * modules/stdlib-safer (Makefile.am): Likewise.
4305         * modules/stpcpy (Makefile.am): Likewise.
4306         * modules/stpncpy (Makefile.am): Likewise.
4307         * modules/strcase (Makefile.am): Likewise.
4308         * modules/strcasestr (Makefile.am): Likewise.
4309         * modules/strchrnul (Makefile.am): Likewise.
4310         * modules/strcspn (Makefile.am): Likewise.
4311         * modules/strdup (Makefile.am): Likewise.
4312         * modules/strerror (Makefile.am): Likewise.
4313         * modules/strftime (Makefile.am): Likewise.
4314         * modules/strndup (Makefile.am): Likewise.
4315         * modules/strnlen (Makefile.am): Likewise.
4316         * modules/strpbrk (Makefile.am): Likewise.
4317         * modules/strsep (Makefile.am): Likewise.
4318         * modules/strstr (Makefile.am): Likewise.
4319         * modules/strtod (Makefile.am): Likewise.
4320         * modules/strtoimax (Makefile.am): Likewise.
4321         * modules/strtok_r (Makefile.am): Likewise.
4322         * modules/strtol (Makefile.am): Likewise.
4323         * modules/strtoll (Makefile.am): Likewise.
4324         * modules/strtoul (Makefile.am): Likewise.
4325         * modules/strtoull (Makefile.am): Likewise.
4326         * modules/strtoumax (Makefile.am): Likewise.
4327         * modules/strverscmp (Makefile.am): Likewise.
4328         * modules/sys_socket (Makefile.am): Likewise.
4329         * modules/sys_stat (Makefile.am): Likewise.
4330         * modules/sysexits (Makefile.am): Likewise.
4331         * modules/time_r (Makefile.am): Likewise.
4332         * modules/timegm (Makefile.am): Likewise.
4333         * modules/timespec (Makefile.am): Likewise.
4334         * modules/tmpfile-safer (Makefile.am): Likewise.
4335         * modules/trim (Makefile.am): Likewise.
4336         * modules/unistd-safer (Makefile.am): Likewise.
4337         * modules/unlinkdir (Makefile.am): Likewise.
4338         * modules/unlocked-io (Makefile.am): Likewise.
4339         * modules/userspec (Makefile.am): Likewise.
4340         * modules/utime (Makefile.am): Likewise.
4341         * modules/utimecmp (Makefile.am): Likewise.
4342         * modules/utimens (Makefile.am): Likewise.
4343         * modules/vasnprintf (Makefile.am): Likewise.
4344         * modules/vasprintf (Makefile.am): Likewise.
4345         * modules/vsnprintf (Makefile.am): Likewise.
4346         * modules/xalloc (Makefile.am): Likewise.
4347         * modules/xgetcwd (Makefile.am): Likewise.
4348         * modules/xnanosleep (Makefile.am): Likewise.
4349         * modules/xreadlink (Makefile.am): Likewise.
4350         * modules/xstrtod (Makefile.am): Likewise.
4351         * modules/xstrtol (Makefile.am): Likewise.
4352         * modules/xstrtold (Makefile.am): Likewise.
4353         * modules/yesno (Makefile.am): Likewise.
4354         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
4355
4356 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
4357
4358         * modules/error (Makefile.am): Distribute files through
4359         EXTRA_DIST, not lib_SOURCES.
4360
4361 2006-10-12  Eric Blake  <ebb9@byu.net>
4362
4363         * modules/error (Makefile.am): Distribute files in /lib.
4364         * modules/obstack (Makefile.am): Likewise.
4365
4366 2006-10-12  Bruno Haible  <bruno@clisp.org>
4367
4368         * modules/acl (Makefile.am): Distribute all files in lib/ through
4369         EXTRA_DIST.
4370         * modules/arcfour (Makefile.am): Likewise.
4371         * modules/arctwo (Makefile.am): Likewise.
4372         * modules/argmatch (Makefile.am): Likewise.
4373         * modules/argz (Makefile.am): Likewise.
4374         * modules/atexit (Makefile.am): Likewise.
4375         * modules/backupfile (Makefile.am): Likewise.
4376         * modules/c-strtod (Makefile.am): Likewise.
4377         * modules/c-strtold (Makefile.am): Likewise.
4378         * modules/calloc (Makefile.am): Likewise.
4379         * modules/canon-host (Makefile.am): Likewise.
4380         * modules/canonicalize (Makefile.am): Likewise.
4381         * modules/chdir-long (Makefile.am): Likewise.
4382         * modules/chdir-safer (Makefile.am): Likewise.
4383         * modules/check-version (Makefile.am): Likewise.
4384         * modules/chown (Makefile.am): Likewise.
4385         * modules/cloexec (Makefile.am): Likewise.
4386         * modules/close-stream (Makefile.am): Likewise.
4387         * modules/closeout (Makefile.am): Likewise.
4388         * modules/crc (Makefile.am): Likewise.
4389         * modules/cycle-check (Makefile.am): Likewise.
4390         * modules/des (Makefile.am): Likewise.
4391         * modules/dirfd (Makefile.am): Likewise.
4392         * modules/dirname (Makefile.am): Likewise.
4393         * modules/dup2 (Makefile.am): Likewise.
4394         * modules/euidaccess (Makefile.am): Likewise.
4395         * modules/exclude (Makefile.am): Likewise.
4396         * modules/exitfail (Makefile.am): Likewise.
4397         * modules/fcntl-safer (Makefile.am): Likewise.
4398         * modules/file-type (Makefile.am): Likewise.
4399         * modules/fileblocks (Makefile.am): Likewise.
4400         * modules/filemode (Makefile.am): Likewise.
4401         * modules/filenamecat (Makefile.am): Likewise.
4402         * modules/fnmatch (Makefile.am): Likewise.
4403         * modules/fopen-safer (Makefile.am): Likewise.
4404         * modules/fpending (Makefile.am): Likewise.
4405         * modules/fprintftime (Makefile.am): Likewise.
4406         * modules/free (Makefile.am): Likewise.
4407         * modules/fsusage (Makefile.am): Likewise.
4408         * modules/ftruncate (Makefile.am): Likewise.
4409         * modules/fts (Makefile.am): Likewise.
4410         * modules/gc (Makefile.am): Likewise.
4411         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
4412         * modules/getaddrinfo (Makefile.am): Likewise.
4413         * modules/getcwd (Makefile.am): Likewise.
4414         * modules/getdelim (Makefile.am): Likewise.
4415         * modules/getdomainname (Makefile.am): Likewise.
4416         * modules/getgroups (Makefile.am): Likewise.
4417         * modules/gethostname (Makefile.am): Likewise.
4418         * modules/gethrxtime (Makefile.am): Likewise.
4419         * modules/getline (Makefile.am): Likewise.
4420         * modules/getloadavg (Makefile.am): Likewise.
4421         * modules/getlogin_r (Makefile.am): Likewise.
4422         * modules/getopt (Makefile.am): Likewise.
4423         * modules/getpass (Makefile.am): Likewise.
4424         * modules/getpass-gnu (Makefile.am): Likewise.
4425         * modules/getsubopt (Makefile.am): Likewise.
4426         * modules/gettime (Makefile.am): Likewise.
4427         * modules/gettimeofday (Makefile.am): Likewise.
4428         * modules/getugroups (Makefile.am): Likewise.
4429         * modules/getusershell (Makefile.am): Likewise.
4430         * modules/glob (Makefile.am): Likewise.
4431         * modules/group-member (Makefile.am): Likewise.
4432         * modules/hard-locale (Makefile.am): Likewise.
4433         * modules/hash (Makefile.am): Likewise.
4434         * modules/hmac-md5 (Makefile.am): Likewise.
4435         * modules/hmac-sha1 (Makefile.am): Likewise.
4436         * modules/human (Makefile.am): Likewise.
4437         * modules/idcache (Makefile.am): Likewise.
4438         * modules/imaxabs (Makefile.am): Likewise.
4439         * modules/imaxdiv (Makefile.am): Likewise.
4440         * modules/inet_ntop (Makefile.am): Likewise.
4441         * modules/inet_pton (Makefile.am): Likewise.
4442         * modules/inttostr (Makefile.am): Likewise.
4443         * modules/isapipe (Makefile.am): Likewise.
4444         * modules/lchown (Makefile.am): Likewise.
4445         * modules/long-options (Makefile.am): Likewise.
4446         * modules/lstat (Makefile.am): Likewise.
4447         * modules/malloc (Makefile.am): Likewise.
4448         * modules/mathl (Makefile.am): Likewise.
4449         * modules/mbchar (Makefile.am): Likewise.
4450         * modules/md2 (Makefile.am): Likewise.
4451         * modules/md4 (Makefile.am): Likewise.
4452         * modules/md5 (Makefile.am): Likewise.
4453         * modules/memcasecmp (Makefile.am): Likewise.
4454         * modules/memchr (Makefile.am): Likewise.
4455         * modules/memcmp (Makefile.am): Likewise.
4456         * modules/memcoll (Makefile.am): Likewise.
4457         * modules/memcpy (Makefile.am): Likewise.
4458         * modules/memmem (Makefile.am): Likewise.
4459         * modules/memmove (Makefile.am): Likewise.
4460         * modules/mempcpy (Makefile.am): Likewise.
4461         * modules/memrchr (Makefile.am): Likewise.
4462         * modules/memset (Makefile.am): Likewise.
4463         * modules/memxor (Makefile.am): Likewise.
4464         * modules/mkancesdirs (Makefile.am): Likewise.
4465         * modules/mkdir (Makefile.am): Likewise.
4466         * modules/mkdir-p (Makefile.am): Likewise.
4467         * modules/mkdtemp (Makefile.am): Likewise.
4468         * modules/mkstemp (Makefile.am): Likewise.
4469         * modules/mktime (Makefile.am): Likewise.
4470         * modules/modechange (Makefile.am): Likewise.
4471         * modules/mountlist (Makefile.am): Likewise.
4472         * modules/nanosleep (Makefile.am): Likewise.
4473         * modules/openat (Makefile.am): Likewise.
4474         * modules/pagealign_alloc (Makefile.am): Likewise.
4475         * modules/physmem (Makefile.am): Likewise.
4476         * modules/poll (Makefile.am): Likewise.
4477         * modules/posixtm (Makefile.am): Likewise.
4478         * modules/posixver (Makefile.am): Likewise.
4479         * modules/putenv (Makefile.am): Likewise.
4480         * modules/quote (Makefile.am): Likewise.
4481         * modules/quotearg (Makefile.am): Likewise.
4482         * modules/raise (Makefile.am): Likewise.
4483         * modules/read-file (Makefile.am): Likewise.
4484         * modules/readline (Makefile.am): Likewise.
4485         * modules/readlink (Makefile.am): Likewise.
4486         * modules/readtokens (Makefile.am): Likewise.
4487         * modules/readutmp (Makefile.am): Likewise.
4488         * modules/realloc (Makefile.am): Likewise.
4489         * modules/regex (Makefile.am): Likewise.
4490         * modules/rename (Makefile.am): Likewise.
4491         * modules/rename-dest-slash (Makefile.am): Likewise.
4492         * modules/rijndael (Makefile.am): Likewise.
4493         * modules/rmdir (Makefile.am): Likewise.
4494         * modules/rpmatch (Makefile.am): Likewise.
4495         * modules/safe-read (Makefile.am): Likewise.
4496         * modules/safe-write (Makefile.am): Likewise.
4497         * modules/same (Makefile.am): Likewise.
4498         * modules/save-cwd (Makefile.am): Likewise.
4499         * modules/savedir (Makefile.am): Likewise.
4500         * modules/setenv (Makefile.am): Likewise.
4501         * modules/settime (Makefile.am): Likewise.
4502         * modules/sha1 (Makefile.am): Likewise.
4503         * modules/sig2str (Makefile.am): Likewise.
4504         * modules/snprintf (Makefile.am): Likewise.
4505         * modules/stdlib-safer (Makefile.am): Likewise.
4506         * modules/stpcpy (Makefile.am): Likewise.
4507         * modules/stpncpy (Makefile.am): Likewise.
4508         * modules/strcase (Makefile.am): Likewise.
4509         * modules/strcasestr (Makefile.am): Likewise.
4510         * modules/strchrnul (Makefile.am): Likewise.
4511         * modules/strcspn (Makefile.am): Likewise.
4512         * modules/strdup (Makefile.am): Likewise.
4513         * modules/strerror (Makefile.am): Likewise.
4514         * modules/strftime (Makefile.am): Likewise.
4515         * modules/strndup (Makefile.am): Likewise.
4516         * modules/strnlen (Makefile.am): Likewise.
4517         * modules/strpbrk (Makefile.am): Likewise.
4518         * modules/strsep (Makefile.am): Likewise.
4519         * modules/strstr (Makefile.am): Likewise.
4520         * modules/strtod (Makefile.am): Likewise.
4521         * modules/strtoimax (Makefile.am): Likewise.
4522         * modules/strtok_r (Makefile.am): Likewise.
4523         * modules/strtol (Makefile.am): Likewise.
4524         * modules/strtoll (Makefile.am): Likewise.
4525         * modules/strtoul (Makefile.am): Likewise.
4526         * modules/strtoull (Makefile.am): Likewise.
4527         * modules/strtoumax (Makefile.am): Likewise.
4528         * modules/strverscmp (Makefile.am): Likewise.
4529         * modules/time_r (Makefile.am): Likewise.
4530         * modules/timegm (Makefile.am): Likewise.
4531         * modules/tmpfile-safer (Makefile.am): Likewise.
4532         * modules/unistd-safer (Makefile.am): Likewise.
4533         * modules/unlinkdir (Makefile.am): Likewise.
4534         * modules/userspec (Makefile.am): Likewise.
4535         * modules/utime (Makefile.am): Likewise.
4536         * modules/utimecmp (Makefile.am): Likewise.
4537         * modules/utimens (Makefile.am): Likewise.
4538         * modules/vasnprintf (Makefile.am): Likewise.
4539         * modules/vasprintf (Makefile.am): Likewise.
4540         * modules/vsnprintf (Makefile.am): Likewise.
4541         * modules/xalloc (Makefile.am): Likewise.
4542         * modules/xgetcwd (Makefile.am): Likewise.
4543         * modules/xnanosleep (Makefile.am): Likewise.
4544         * modules/xreadlink (Makefile.am): Likewise.
4545         * modules/xstrtod (Makefile.am): Likewise.
4546         * modules/xstrtol (Makefile.am): Likewise.
4547         * modules/xstrtold (Makefile.am): Likewise.
4548         * modules/yesno (Makefile.am): Likewise.
4549
4550 2006-10-12  Jim Meyering  <jim@meyering.net>
4551
4552         * m4/getloadavg.m4: Revert the change below.
4553
4554         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
4555         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
4556         fail with a symlink, which is what coreutils' ./bootstrap now
4557         creates by default.
4558
4559 2006-10-12  Bruno Haible  <bruno@clisp.org>
4560
4561         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
4562         mingw.
4563         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
4564         MSVC and mingw explicitly.
4565
4566 2006-10-11  Simon Josefsson  <jas@extundo.com>
4567             Bruno Haible  <bruno@clisp.org>
4568
4569         Add support for multiple gnulib-tool invocations in the scope of a
4570         single configure.ac file.
4571         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
4572         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
4573         with the same contents as the _LIBADD variable.
4574         (func_emit_initmacro_start, func_emit_initmacro_end,
4575         func_emit_initmacro_done): New functions.
4576         (func_import, func_create_testdir): Invoke them. Allow the identifiers
4577         gl_LIBOBJS and gl_LTLIBOBJS.
4578
4579 2006-10-11  Bruno Haible  <bruno@clisp.org>
4580
4581         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
4582         (func_create_testdir): Don't create po/Makefile.am, don't invoke
4583         autoreconf. Instead, invoke autopoint explicitly but move back the
4584         *.m4 files from gnulib.
4585
4586 2006-10-11  Bruno Haible  <bruno@clisp.org>
4587
4588         * gnulib-tool (func_usage): Make module names after --create-testdir
4589         optional.
4590         (func_create_testdir): If no module was specified, use nearly all
4591         modules.
4592
4593 2006-10-12  Jim Meyering  <jim@meyering.net>
4594
4595         Big performance improvement for fts-based tools that use FTS_NOSTAT.
4596         Avoid spurious inode-mismatch problems on non-POSIX file systems.
4597         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
4598         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
4599         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
4600         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
4601         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
4602         (fts_set_stat_required): New function.
4603         (fts_open): Defer the calls to fts_stat, if possible or requested.
4604         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
4605         into fts_stat itself.
4606         (fts_read): Perform any required (deferred) fts_stat call.
4607         (fts_build): Likewise, for the directory we're about to open and read.
4608         In the readdir loop, carefully decide whether each entry will require
4609         an eventual call to fts_stat, using dirent.d_type info if available.
4610         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
4611         a command line argument into this function.  Update all callers.
4612         Map a return value of FTS_DOT to FTS_D for a command line argument.
4613         * modules/fts (Depends-on): Add d-type.  Alphabetize.
4614         Thanks to Miklos Szeredi for his tenacity and for the initial
4615         bug report about "find" failing on a FUSE-based file system.
4616
4617         * lib/fts.c (fts_open): Use consistent indentation.
4618
4619 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
4620
4621         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
4622         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
4623         reported by Jim Meyering.  All uses of cache variables renamed
4624         to match Autoconf's.
4625         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
4626         the other one.
4627
4628         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
4629         Fix misspelling in diagnostic.
4630
4631 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
4632
4633         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
4634         defined.  Problem reported by Matthew Woehlke.
4635
4636         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
4637         Add support for Tandem NonStop R series.
4638         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
4639         Use new macro.
4640
4641         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
4642         (has_trailing_slash): Omit size arg; all callers changed.
4643         Omit 'inline', since it doesn't help performance and we'd
4644         need to configure it.
4645         Don't count //, ///, etc. as having a trailing slash.
4646         As a side effect, this removes a C99ism reported by Matthew Woehlke.
4647         (rpl_rename_dest_slash): On failure, use rename's errno rather
4648         than (in some cases) an incorrect or junk errno.
4649         Simplify code by removing need to compute length; this does
4650         cause it to make two passes instead of one over the file name,
4651         but it's worth it.
4652
4653         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
4654         change, since Autoconf's version may no longer be appropriate now
4655         that we are using CVS Autoconf's version.  Add support for Tandem.
4656
4657 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
4658             Bruno Haible  <bruno@clisp.org>
4659
4660         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
4661         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
4662         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
4663         gl_AC_TYPE_LONG_LONG.
4664
4665         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
4666         instead of HAVE_LONG_LONG.
4667         * lib/printf-args.c (printf_fetchargs): Likewise.
4668         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
4669         * lib/vasnprintf.c (VASNPRINTF): Likewise.
4670         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
4671         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
4672         gl_AC_TYPE_LONG_LONG.
4673
4674 2006-10-11  Bruno Haible  <bruno@clisp.org>
4675
4676         * m4/longlong.m4: Add comments.
4677         * m4/ulonglong.m4: Likewise.
4678
4679 2006-10-10  Bruno Haible  <bruno@clisp.org>
4680
4681         Make it possible to #define stpcpy, strdup to aliases.
4682         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
4683         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
4684
4685 2006-10-10  Bruno Haible  <bruno@clisp.org>
4686
4687         Make it possible to #define gcd to an alias.
4688         * lib/gcd.c: Include config.h.
4689
4690 2006-10-10  Bruno Haible  <bruno@clisp.org>
4691
4692         Make it possible to #define c_isascii to an alias.
4693         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
4694         defined. Undefine the macros before defining them, to avoid gcc
4695         warnings.
4696         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
4697         define NO_C_CTYPE_MACROS early.
4698
4699 2006-10-10  Bruno Haible  <bruno@clisp.org>
4700
4701         Make it possible to #define set_program_name to an alias.
4702         * lib/progname.c: Don't undefine set_program_name; instead, undefine
4703         ENABLE_RELOCATABLE early.
4704
4705 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
4706
4707         Port to Tandem NSK OSS, which has 64-bit signed int but at most
4708         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
4709         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
4710         More generally, don't assume that 64-bit signed int is available
4711         if unsigned int is, and vice versa.
4712         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
4713         unsigned symbols, not on their signed counterparts.
4714         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
4715         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
4716         (UINT64_C, UINTMAX_C):
4717         Likewise.
4718         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
4719         unsigned counterparts.
4720         (Have_long_long, Unsigned): New macros.
4721         (Int): Renamed from INT.
4722         (strtoimax): Use the new macros.
4723         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
4724         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
4725         * modules/inttypes (inttypes.h): Substitute
4726         HAVE_UNSIGNED_LONG_LONG_INT.
4727         * modules/stdint (stdint.h): Likewise.
4728         (Files): Add m4/ulonglong.m4.
4729
4730 2006-10-10  Bruno Haible  <bruno@clisp.org>
4731
4732         Fix a gcc -Wshadow warning.
4733         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
4734         to 'bucket'.
4735         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
4736         gl_linked_indexof_from_to): Likewise.
4737         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
4738         Likewise.
4739         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
4740         Likewise.
4741         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
4742         Reported by Eric Blake.
4743
4744 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
4745
4746         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
4747         for NetBSD.  Problem reported by Bruno Haible.
4748
4749 2006-10-09  Jim Meyering  <jim@meyering.net>
4750
4751         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
4752         Patch from Bruno Haible.
4753
4754 2006-10-09  Jim Meyering  <jim@meyering.net>
4755
4756         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
4757         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
4758         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
4759
4760 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
4761
4762         Don't include <config.h> twice; this doesn't work in some cases,
4763         e.g., when config.h has "#define intmax_t long long int" and
4764         we include <config.h>, <inttypes.h>, <config.h> in that order.
4765         Problem reported by Matthew Woehlke in:
4766         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
4767         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
4768         * lib/fts-cycle.c: Don't include config.h.
4769         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
4770         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
4771         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
4772         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
4773         inttypes.h.
4774         * lib/xstrtoumax.c: Likewise.
4775         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
4776         __strtol and the like, so that this module is more like its siblings.
4777         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
4778         Remove; no longer needed now that we assume gnulib inttypes.h.
4779
4780 2006-10-08  Bruno Haible  <bruno@clisp.org>
4781
4782         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
4783         option.
4784
4785 2006-10-07  Jim Meyering  <jim@meyering.net>
4786
4787         * modules/inttypes (inttypes.h): Revert what seems to have been
4788         an inadvertent part of today's change: use "|", not "/" in the
4789         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
4790
4791 2006-10-07  Bruno Haible  <bruno@clisp.org>
4792
4793         * modules/sublist: New file.
4794
4795 2006-10-07  Bruno Haible  <bruno@clisp.org>
4796
4797         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
4798         * modules/argz (argz.h): Likewise.
4799         * modules/arpa_inet (arpa/inet.h): Likewise.
4800         * modules/byteswap (byteswap.h): Likewise.
4801         * modules/configmake (configmake.h): Likewise.
4802         * modules/fcntl (fcntl.h): Likewise.
4803         * modules/fnmatch (fnmatch.h): Likewise.
4804         * modules/getopt (getopt.h): Likewise.
4805         * modules/glob (glob.h): Likewise.
4806         * modules/inttypes (inttypes.h): Likewise.
4807         * modules/netinet_in (netinet/in.h): Likewise.
4808         * modules/poll (poll.h): Likewise.
4809         * modules/stdbool (stdbool.h): Likewise.
4810         * modules/stdint (stdint.h): Likewise.
4811         * modules/sys_select (sys/select.h): Likewise.
4812         * modules/sys_socket (sys/socket.h): Likewise.
4813         * modules/sys_stat (sys/stat.h): Likewise.
4814         * modules/sysexits (sysexits.h): Likewise.
4815         * modules/unistd (unistd.h): Likewise.
4816         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4817         Add a "DO NOT EDIT" comment to the generated file.
4818         (func_import): Likewise for gnulib-comp.m4.
4819
4820 2006-10-07  Bruno Haible  <bruno@clisp.org>
4821
4822         * lib/gl_sublist.h: New file.
4823         * lib/gl_sublist.c: New file.
4824
4825 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
4826
4827         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
4828         name (relative to the original working directory) and the file
4829         name component (relative to the temporary working directory).  All
4830         callers changed.
4831         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
4832         * lib/mkdir-p.c (make_dir_parents): Likewise.
4833         * lib/mkdir-p.h (make_dir_parents): Likewise.
4834
4835 2006-10-06  Eric Blake  <ebb9@byu.net>
4836
4837         Define several macros for use by the clean-temp module.
4838         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
4839         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
4840         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
4841
4842         * lib/clean-temp.h (close_stream_temp): New declaration.
4843         * lib/clean-temp.c (includes): Pull in headers according to what
4844         other modules are in use.
4845         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
4846
4847 2006-10-06  Bruno Haible  <bruno@clisp.org>
4848
4849         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
4850         instead of fopen, fwriteerror.
4851
4852 2006-10-06  Bruno Haible  <bruno@clisp.org>
4853
4854         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
4855         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
4856         int.
4857         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
4858         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
4859         Return an error indicator.
4860         Suggested by Eric Blake.
4861
4862 2006-10-06  Bruno Haible  <bruno@clisp.org>
4863
4864         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
4865         Reported by Eric Blake.
4866
4867 2006-10-06  Bruno Haible  <bruno@clisp.org>
4868
4869         * modules/closeout (Description): Mention stderr too.
4870
4871 2006-10-06  Bruno Haible  <bruno@clisp.org>
4872         and Paul Eggert  <eggert@cs.ucla.edu>
4873
4874         * lib/closeout.c (close_stdout): Also close stderr.
4875         * lib/closeout.h: Update comment.
4876
4877 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
4878
4879         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
4880         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
4881         * lib/dirchownmod.c: Include lchown.h.
4882         * lib/lchown.c: Don't include files that lchown.h now includes.
4883         Don't declare chown, since lchown.h now does that.
4884         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
4885         (lchown): Define to rpl_chown if lchown is declared but
4886         does not exist.  Declare using a prototype if lchown is not
4887         declared.  Add a copyright notice.
4888         * lib/mkstemp.h: Include <unistd.h>.
4889         * lib/openat.c: Include lchown.h.
4890
4891         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
4892         we now test for that separately.
4893         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
4894         rather than O_NOFOLLOW, when testing whether it's possible to
4895         avoid a race condition reliably.
4896         * lib/savewd.c (savewd_chdir): Likewise.
4897
4898         Remove macros that are no longer needed now that stdint.h is
4899         reliable.
4900         * lib/fsusage.c (UINTMAX_MAX): Remove.
4901         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
4902         * lib/utimecmp.c (SIZE_MAX): Remove.
4903
4904         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
4905
4906         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
4907         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
4908         O_NOATIME works.
4909
4910 2006-10-05  Bruno Haible  <bruno@clisp.org>
4911
4912         * lib/gl_list.h (gl_sortedlist_search_from_to,
4913         gl_sortedlist_indexof_from_to): New declarations.
4914         (gl_list_implementation): New fields sortedlist_search_from_to,
4915         sortedlist_indexof_from_to.
4916         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
4917         inline functions.
4918         * lib/gl_list.c (gl_sortedlist_search_from_to,
4919         gl_sortedlist_indexof_from_to): New functions.
4920         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
4921         function.
4922         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
4923         (gl_array_sortedlist_search_from_to): New function.
4924         (gl_array_list_implementation): Update.
4925         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
4926         function.
4927         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
4928         (gl_carray_sortedlist_search_from_to): New function.
4929         (gl_carray_list_implementation): Update.
4930         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
4931         gl_linked_sortedlist_indexof_from_to): New functions.
4932         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
4933         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
4934         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
4935         gl_tree_sortedlist_indexof_from_to): New functions.
4936         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
4937         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
4938         Update.
4939         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
4940         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
4941         Update.
4942
4943 2006-10-05  Bruno Haible  <bruno@clisp.org>
4944
4945         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
4946         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
4947         (struct gl_list_implementation): Add fields search_from_to,
4948         indexof_from_to. Remove fields search, indexof.
4949         (gl_list_search): Use the search_from_to method.
4950         (gl_list_search_from, gl_list_search_from_to): New functions.
4951         (gl_list_indexof): Use the indexof_from_to method.
4952         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
4953         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
4954         (gl_list_search_from, gl_list_search_from_to): New functions.
4955         (gl_list_indexof): Use the indexof_from_to method.
4956         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
4957         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
4958         gl_array_indexof. Add start_index, end_index arguments.
4959         (gl_array_search_from_to): Renamed from gl_array_search. Add
4960         start_index, end_index arguments.
4961         (gl_array_remove, gl_array_list_implementation): Update.
4962         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
4963         gl_carray_indexof. Add start_index, end_index arguments.
4964         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
4965         start_index, end_index arguments.
4966         (gl_carray_remove, gl_carray_list_implementation): Update.
4967         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
4968         gl_linked_search. Add start_index, end_index arguments.
4969         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
4970         start_index, end_index arguments.
4971         (gl_linked_remove): Update.
4972         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
4973         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
4974         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
4975         field to 'size_t'.
4976         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
4977         gl_tree_search. Add start_index, end_index arguments.
4978         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
4979         start_index, end_index arguments.
4980         (gl_tree_remove): Update.
4981         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
4982         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
4983         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
4984         function.
4985         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
4986         gl_tree_search. Add start_index, end_index arguments.
4987         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
4988         start_index, end_index arguments.
4989         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
4990         Update.
4991         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
4992
4993 2006-10-05  Bruno Haible  <bruno@clisp.org>
4994
4995         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
4996
4997         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
4998         fwriteerror_temp): New declarations.
4999         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
5000         (descriptors): New variable.
5001         (cleanup): First, close the descriptors.
5002         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
5003         fclose_temp, fwriteerror_temp): New functions.
5004
5005 2006-10-04  Jim Meyering  <jim@meyering.net>
5006
5007         * lib/fts.c (fts_open): Tiny comment change.
5008
5009 2006-10-04  Bruno Haible  <bruno@clisp.org>
5010
5011         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
5012         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
5013         gl_LOCK_BODY.
5014         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
5015         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
5016         gl_LOCK_EARLY_BODY.
5017         (gl_LOCK): Require gl_LOCK_BODY.
5018
5019 2006-10-04  Bruno Haible  <bruno@clisp.org>
5020
5021         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
5022         (gl_oset_search_atleast): New declaration.
5023         (struct gl_oset_implementation): Add field 'search_atleast'.
5024         (gl_oset_search_atleast): New inline function.
5025         * lib/gl_oset.c (gl_oset_search_atleast): New function.
5026         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
5027         (gl_array_oset_implementation): Update.
5028         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
5029         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
5030         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
5031
5032 2006-10-04  Bruno Haible  <bruno@clisp.org>
5033
5034         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
5035
5036 2006-10-03  Bruno Haible  <bruno@clisp.org>
5037
5038         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
5039         from gl_avltreehash_list_implementation.
5040
5041 2006-10-03  Bruno Haible  <bruno@clisp.org>
5042
5043         * lib/gl_oset.c (gl_oset_add): Fix return type.
5044
5045 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
5046
5047         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
5048
5049 2006-10-02  Eric Blake  <ebb9@byu.net>
5050
5051         * modules/strnlen (Depends-on): Add extensions.
5052
5053 2006-10-02  Eric Blake  <ebb9@byu.net>
5054
5055         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
5056         definition in 2.60+.
5057
5058 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
5059
5060         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
5061         checks.
5062
5063 2006-10-02  Bruno Haible  <bruno@clisp.org>
5064
5065         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
5066         to the AUTOMAKE_OPTIONS.
5067         Reported by Jim Meyering.
5068
5069 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
5070
5071         Work around bug in Solaris 10 /proc file system:
5072         /proc/self/fd/NNN/.. isn't the parent directory of
5073         the directory whose file descriptor is NNN.  This needs to
5074         be worked around at run time, not compile time, since a
5075         program might be built on Solaris 8, where things work, and
5076         run on Solaris 10.
5077         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
5078         to use the following interface instead:
5079         (OPENAT_BUFFER_SIZE): New macro.
5080         (openat_proc_name): New function.
5081         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
5082         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
5083         Likewise.
5084         * lib/openat-proc.c: New file.
5085         * modules/openat (Files): Add lib/openat-proc.c.
5086         (Depends-on): Add same-inode, stdbool.
5087         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
5088
5089 2006-09-29  Bruno Haible  <bruno@clisp.org>
5090
5091         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
5092         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
5093         argument. Set stdout_closed before testing for ferror, not after.
5094         (fwriteerror, fwriteerror_no_ebadf): New functions.
5095
5096 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5097
5098         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
5099
5100 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
5101
5102         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
5103         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
5104
5105 2006-09-28  Jim Meyering  <jim@meyering.net>
5106
5107         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
5108         Include <unistd.h>.
5109
5110 2006-09-28  Bruno Haible  <bruno@clisp.org>
5111
5112         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
5113         * modules/linkedhash-list (Depends-on): Likewise.
5114         * modules/rbtreehash-list (Depends-on): Likewise.
5115
5116 2006-09-28  Bruno Haible  <bruno@clisp.org>
5117
5118         * lib/strndup.h: Simplify the redefinition of strndup.
5119         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
5120         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
5121
5122 2006-09-28  Bruno Haible  <bruno@clisp.org>
5123
5124         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
5125         * lib/gl_linkedhash_list.c: Likewise.
5126         * lib/gl_rbtreehash_list.c: Likewise.
5127
5128 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
5129
5130         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
5131         getaddrinfo.
5132
5133         * lib/__fpending.h: Don't include <stdio_ext.h> unless
5134         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
5135         it causes <stdio_ext.h> to cause a compile-time error.
5136         Problem reported by Nelson H. F. Beebe.
5137         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
5138         of HAVE_DECL___PENDING.
5139
5140         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
5141         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
5142         declaration.
5143
5144 2006-09-27  Jim Meyering  <jim@meyering.net>
5145
5146         This file could end up with a definition for a function
5147         named __strndup, rather than rpl_strndup on a system with
5148         incomplete weak_alias support.
5149         * lib/strndup.c (strndup): Rename from __strndup.
5150         Remove #defines that used to map __strndup to strndup.
5151         Don't use K&R prototypes.
5152         Remove LIBC-related code, since this file is not sync'd with glibc.
5153         * lib/strndup.h: Revamp, accordingly.
5154         * m4/strndup.m4: Modernize.
5155
5156 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
5157
5158         * modules/savewd (Depends-on): Add 'raise'.
5159         * lib/savewd.c: Include <signal.h>, for 'raise'.
5160
5161 2006-09-26  Jim Meyering  <jim@meyering.net>
5162
5163         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
5164         when we detect Darwin 8.7.0's acl_get_file bug.
5165         Rearrange to perform the new (below) run-test while $LIBS
5166         contains any acl-related library.  Set USE_ACL at the end.
5167         (gl_ACL_GET_FILE): New function.
5168
5169 2006-09-26  Eric Blake  <ebb9@byu.net>
5170
5171         * lib/verror.c: Include <config.h> unconditionally.
5172
5173 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
5174
5175         * modules/clock-time (Maintainer): Add self.
5176         * modules/getlogin_r (Depends-on): Add extensions.
5177
5178 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5179
5180         * modules/clock-time: New module.
5181         * modules/nanosleep (Depends-on): Add clock-time.
5182         * modules/gethrxtime (Depends-on): Likewise.
5183         * modules/gettime (Depends-on): Likewise.
5184         * modules/settime (Depends-on): Likewise.
5185
5186         * modules/fts-lgpl: Depend on openat.
5187         * modules/mkancesdirs: Depend on savewd.
5188         * modules/mkdir-p: Likewise.
5189
5190 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5191
5192         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
5193
5194         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
5195         `gl_have_arbitrary_file_name_length_limit' to
5196         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
5197         actually works between configure runs.
5198
5199 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5200             Bruno Haible  <bruno@clisp.org>
5201
5202         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
5203
5204 2006-09-25  Jim Meyering  <jim@meyering.net>
5205
5206         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
5207         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
5208
5209 2006-09-25  Eric Blake  <ebb9@byu.net>
5210
5211         * gnulib-tool (func_import, func_create_testdir): Fix typos in
5212         exec's in 2006-09-18 patch when shuffling fds.
5213
5214 2006-09-25  Bruno Haible  <bruno@clisp.org>
5215
5216         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
5217         Reported by Jim Meyering.
5218
5219 2006-09-24  Jim Meyering  <jim@meyering.net>
5220
5221         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
5222         compare a pointer against a literal "0".  That caused failures with
5223         at least HP-UX's hpcc.
5224
5225 2006-09-22  Simon Josefsson  <jas@extundo.com>
5226
5227         * modules/gc-sha1:
5228         * modules/gc-md4:
5229         * modules/gc-hmac-sha1:
5230         * modules/gc-hmac-md5:
5231         * modules/gc-des:
5232         * modules/gc-arcfour: Distribute more files.
5233
5234 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5235
5236         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
5237         (gl_linked_iterator_from_to): Initialize struct completely.
5238         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
5239         (gl_tree_iterator_from_to): Likewise
5240         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
5241         * lib/gl_array_list.c [lint] (gl_array_iterator)
5242         (gl_array_iterator_from_to): Likewise.
5243         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
5244         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
5245         (gl_carray_iterator_from_to): Likewise.
5246
5247         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
5248         * lib/md4.c (md4_process_block): Remove unused variable.
5249         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
5250         parentheses for clarity.
5251
5252 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5253
5254         * modules/bison-i18n (Depends-on): Add gettext.
5255
5256 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5257
5258         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
5259         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
5260         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
5261         also add missing comma that caused broken test.
5262         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
5263         stdlib.h, for `abort'.
5264         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
5265         variables.
5266         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
5267         include unistd.h if present, for `rmdir'.
5268         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
5269         variables.
5270         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
5271         in the process include standard headers for prototypes.
5272         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
5273         gets declared on GNU/Linux.
5274         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
5275         unistd.h, for `rmdir'.
5276         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
5277
5278         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
5279         always true.
5280         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
5281
5282         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
5283
5284 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5285
5286         * gnulib-tool (func_version): Create output all at once.  This
5287         may help avoid triggering unnecessary SIGPIPEs, and at any
5288         rate it doesn't hurt.
5289
5290 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5291             Bruno Haible  <bruno@clisp.org>
5292
5293         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
5294         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
5295         * m4/signed.m4 (bh_C_SIGNED): Likewise.
5296
5297         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
5298         (gl_FUNC_VASPRINTF): Invoke it.
5299
5300 2006-09-22  Bruno Haible  <bruno@clisp.org>
5301
5302         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
5303         getloadavg.c as first argument.
5304
5305 2006-09-22  Bruno Haible  <bruno@clisp.org>
5306
5307         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
5308         at the beginning of the gl_INIT macro.
5309         * modules/getloadavg (configure.ac): Pass $gl_source_base to
5310         gl_GETLOADAVG.
5311
5312 2006-09-22  Bruno Haible  <bruno@clisp.org>
5313
5314         * gnulib-tool (func_create_megatestdir): Don't include the config-h
5315         module.
5316         Suggested by Ralf Wildenhues.
5317
5318 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
5319
5320         Import this patch from libc:
5321
5322         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
5323
5324         * lib/regex_internal.c (re_string_reconstruct): Handle
5325         offset < pstr->valid_raw_len && pstr->offsets_needed case.
5326         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
5327         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
5328         re_string_context_at.
5329
5330         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
5331         now requires it.
5332         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
5333         gl_REGEX now does it for us.
5334         (gl_REGEX): Add test taken from
5335         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
5336
5337         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
5338         Check that large offsets work.  Modernize Autoconf usages.
5339         Prefer "yes" to mean a good thing rather than a bad.
5340         Don't put "#define mkstemp" in config.h, as this might interfere
5341         with standard system headers that "#define mkstemp mkstemp64".
5342
5343         * modules/mkstemp (Depends-on): Add extensions, so that
5344         mkstemp is visible on some platforms.
5345         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
5346         (Include): Change to "mkstemp.h" from <stdlib.h>.
5347         (Files): Add mkstemp.h.
5348
5349         * lib/mkstemp.h: New file, since some standard headers
5350         #define mkstemp.
5351         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
5352         Include "mkstemp.h".
5353         Make the _LIBC code resemble glibc original more,
5354         e.g., use K&R style.
5355         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
5356         (mkstemp): Remove, since mkstemp.h does this for us.
5357         * lib/stdlib--.h: Include mkstemp.h.
5358
5359         Import this patch from libc:
5360
5361         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
5362
5363         * lib/tempname.c (__gen_tempname): Change attempts_min
5364         into a macro.  Use preprocessor to decide how to initialize
5365         attempts [Coverity CID 67].
5366
5367 2006-09-20  Bruno Haible  <bruno@clisp.org>
5368
5369         * lib/mkdtemp.c: Import from libc.
5370         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
5371                 * sysdeps/posix/tempname.c (__gen_tempname): Change
5372                 attempts_min into a macro.  Use preprocessor to decide how to
5373                 initialize attempts [Coverity CID 67].
5374         2001-11-27  Paul Eggert  <eggert@twinsun.com>
5375                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
5376                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
5377
5378 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5379
5380         * gnulib-tool (func_exit): New function, to allow to pass the
5381         exit status portably through the trap.  Use everywhere.
5382         (--help, --version): Signal a write error.
5383         (trap): catch SIGPIPE, for write errors.
5384         Exit at the end of the trap, with the correct exit status.
5385
5386 2006-09-19  Karl Berry  <karl@gnu.org>
5387
5388         * doc/gnulib.texi: note about the license texinfo files.
5389
5390 2006-09-19  Eric Blake  <ebb9@byu.net>
5391
5392         * gnulib-tool: Avoid space-tab.
5393
5394 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
5395
5396         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
5397         that prevented coreutils 6.1 from building.  Problem reported
5398         by Petter Reinholdtsen.
5399
5400 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
5401
5402         * gnulib-tool (avoidlist): Fix typo that broke options like
5403         --avoid=lock that are used by coreutils bootstrap.
5404
5405 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
5406
5407         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
5408         more systematically.
5409
5410 2006-09-18  Jim Meyering  <jim@meyering.net>
5411
5412         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
5413
5414 2006-09-18  Bruno Haible  <bruno@clisp.org>
5415
5416         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
5417
5418 2006-09-18  Bruno Haible  <bruno@clisp.org>
5419
5420         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
5421         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
5422         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
5423         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
5424         * m4/gettext.m4: Require autoconf >= 2.52.
5425         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
5426         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
5427         of gl_cv_header_inttypes_h.
5428
5429 2006-09-18  Bruno Haible  <bruno@clisp.org>
5430
5431         * lib/javaversion.c: Include configmake.h.
5432
5433 2006-09-18  Bruno Haible  <bruno@clisp.org>
5434
5435         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
5436         avoid that the while loops be executed in a subshell.
5437
5438 2006-09-18  Bruno Haible  <bruno@clisp.org>
5439
5440         * MODULES.html.sh (func_module): Break long lines.
5441         Suggested by Bruce Korb <bkorb@gnu.org>.
5442
5443 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5444
5445         Speed up by a factor of 1.12.
5446         * gnulib-tool (nl): New variable.
5447         (func_import): Rewrite include directive extraction to only read each
5448         directive once.
5449
5450 2006-09-17  Bruno Haible  <bruno@clisp.org>
5451
5452         * modules/javaversion (Makefile.am): Remove DEFS setting.
5453         (Depends-on): Add configmake, for PKGDATADIR definition.
5454
5455 2006-09-17  Bruno Haible  <bruno@clisp.org>
5456
5457         * gnulib-tool (func_create_testdir): Rewrite all files at once.
5458
5459 2006-09-17  Bruno Haible  <bruno@clisp.org>
5460
5461         * gnulib-tool (func_append): New function, stolen from libtool.m4.
5462         (func_modules_transitive_closure, func_modules_add_dummy,
5463         func_modules_to_filelist, func_import, func_create_testdir,
5464         func_create_megatestdir, ...): Use it wherever possible.
5465         Suggested by Ralf Wildenhues.
5466
5467 2006-09-16  Karl Berry  <karl@gnu.org>
5468
5469         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
5470         to avoid sectioning errors.
5471         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
5472         [ifinfo]: blank line after @center-ed titles.
5473         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
5474         Spell FSF address consistently with others.
5475         (These changes approved by rms.)
5476
5477 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5478
5479         Speed up by a factor of 1.61.
5480         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
5481         already checked module names again.
5482
5483 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5484
5485         Speed up by a factor of 1.13.
5486         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
5487         for new_files, and the input to func_add_or_update.
5488
5489 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5490
5491         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
5492         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
5493
5494 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
5495
5496         * modules/mkancesdirs (Depends-on): Add fcntl.
5497         * modules/savewd: New file.
5498         * MODULES.html.sh (File system functions): Add savewd.
5499
5500         * modules/configmake (Makefile.am): Add support for the
5501         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
5502
5503 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
5504
5505         * m4/savewd.m4: New file.
5506
5507 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
5508
5509         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
5510         (dirchownmod): New arg FD.  All callers changed.
5511         Use FD rather than opening the directory ourself, as opening is
5512         now the caller's responsibility.
5513         * lib/dirchownmod.h: Likewise.
5514         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
5515         hosts that require <sys/types.h> before <sys/stat.h>.  Include
5516         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
5517         (test_dir): Remove.
5518         (mkancesdirs): Return length of prefix of FILE that has already
5519         been made, or -2 if there is a child doing the work.  Redo
5520         algorithm so that it is O(N) rather than O(N**2).  Optimize away
5521         ".", and treat ".." specially since it might stray back into
5522         already-created areas.  Use a subprocess if necessary.  New arg
5523         WD; all users changed.  MAKE_DIR function should now return 1
5524         if it creates a directory that is not readable.  Return -2 if
5525         a child process is spun off.
5526         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
5527         Adjust signature to match code.
5528         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
5529         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
5530         all users changed.
5531         * lib/savewd.c, lib/savewd.h: New files.
5532
5533 2006-09-15  Jim Meyering  <jim@meyering.net>
5534
5535         * modules/rename-dest-slash: New module.
5536         * MODULES.html.sh (posix_compat): Add it here.
5537
5538         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
5539
5540 2006-09-15  Jim Meyering  <jim@meyering.net>
5541
5542         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
5543         file.
5544
5545         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
5546
5547 2006-09-15  Jim Meyering  <jim@meyering.net>
5548
5549         * lib/rename-dest-slash.c (has_trailing_slash): Use
5550         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
5551         (rpl_rename_dest_slash): Perform the cheaper trailing slash
5552         test before testing whether SRC is a directory.
5553         Suggestions from Bruno Haible.
5554
5555         Avoid a warning about an unused variable.
5556         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
5557         into the #ifdef block where it's used.
5558
5559         * lib/rename-dest-slash.c: New file.
5560
5561 2006-09-14  Bruno Haible  <bruno@clisp.org>
5562
5563         * lib/allocsa.c: Include <config.h> unconditionally.
5564         * lib/asnprintf.c: Likewise.
5565         * lib/asprintf.c: Likewise.
5566         * lib/c-strcasecmp.c: Likewise.
5567         * lib/c-strcasestr.c: Likewise.
5568         * lib/c-strncasecmp.c: Likewise.
5569         * lib/c-strstr.c: Likewise.
5570         * lib/classpath.c: Likewise.
5571         * lib/clean-temp.c: Likewise.
5572         * lib/concatpath.c: Likewise.
5573         * lib/copy-file.c: Likewise.
5574         * lib/csharpcomp.c: Likewise.
5575         * lib/csharpexec.c: Likewise.
5576         * lib/execute.c: Likewise.
5577         * lib/fatal-signal.c: Likewise.
5578         * lib/findprog.c: Likewise.
5579         * lib/fwriteerror.c: Likewise.
5580         * lib/gl_array_list.c: Likewise.
5581         * lib/gl_array_oset.c: Likewise.
5582         * lib/gl_avltree_list.c: Likewise.
5583         * lib/gl_avltree_oset.c: Likewise.
5584         * lib/gl_avltreehash_list.c: Likewise.
5585         * lib/gl_carray_list.c: Likewise.
5586         * lib/gl_linked_list.c: Likewise.
5587         * lib/gl_linkedhash_list.c: Likewise.
5588         * lib/gl_list.c: Likewise.
5589         * lib/gl_oset.c: Likewise.
5590         * lib/gl_rbtree_list.c: Likewise.
5591         * lib/gl_rbtree_oset.c: Likewise.
5592         * lib/gl_rbtreehash_list.c: Likewise.
5593         * lib/imaxabs.c: Likewise.
5594         * lib/imaxdiv.c: Likewise.
5595         * lib/javacomp.c: Likewise.
5596         * lib/javaexec.c: Likewise.
5597         * lib/javaversion.c: Likewise.
5598         * lib/linebreak.c: Likewise.
5599         * lib/localcharset.c: Likewise.
5600         * lib/lock.c: Likewise.
5601         * lib/mbchar.c: Likewise.
5602         * lib/mbswidth.c: Likewise.
5603         * lib/mkdtemp.c: Likewise.
5604         * lib/pipe.c: Likewise.
5605         * lib/printf-args.c: Likewise.
5606         * lib/printf-parse.c: Likewise.
5607         * lib/progname.c: Likewise.
5608         * lib/progreloc.c: Likewise.
5609         * lib/readlink.c: Likewise.
5610         * lib/sh-quote.c: Likewise.
5611         * lib/stpcpy.c: Likewise.
5612         * lib/stpncpy.c: Likewise.
5613         * lib/strcasecmp.c: Likewise.
5614         * lib/strcasestr.c: Likewise.
5615         * lib/strcspn.c: Likewise.
5616         * lib/striconv.c: Likewise.
5617         * lib/strncasecmp.c: Likewise.
5618         * lib/strnlen1.c: Likewise.
5619         * lib/strstr.c: Likewise.
5620         * lib/strtok_r.c: Likewise.
5621         * lib/tls.c: Likewise.
5622         * lib/tmpdir.c: Likewise.
5623         * lib/unicodeio.c: Likewise.
5624         * lib/unsetenv.c: Likewise.
5625         * lib/vasnprintf.c: Likewise.
5626         * lib/vasprintf.c: Likewise.
5627         * lib/wait-process.c: Likewise.
5628         * lib/xallocsa.c: Likewise.
5629         * lib/xsetenv.c: Likewise.
5630         * lib/xstriconv.c: Likewise.
5631
5632 2006-09-13  Simon Josefsson  <jas@extundo.com>
5633
5634         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
5635         that internally, suggested by Ralf Wildenhues
5636         <Ralf.Wildenhues@gmx.de>.
5637
5638 2006-09-13  Simon Josefsson  <jas@extundo.com>
5639
5640         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
5641         @LIBOBJS@.
5642         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5643
5644 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
5645
5646         * lib/_fpending.c: Include <config.h> unconditionally, since we no
5647         longer worry about uses that don't define HAVE_CONFIG_H.
5648         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
5649         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
5650         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
5651         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
5652         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
5653         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
5654         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
5655         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
5656         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
5657         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
5658         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
5659         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
5660         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
5661         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
5662         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
5663         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
5664         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
5665         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
5666         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
5667         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
5668         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
5669         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
5670         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
5671         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
5672         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
5673         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
5674         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
5675         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
5676         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
5677         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
5678         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
5679         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
5680         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
5681         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
5682         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
5683         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
5684         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
5685         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
5686         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
5687         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
5688         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
5689         Likewise.
5690
5691 2006-09-13  Eric Blake  <ebb9@byu.net>
5692
5693         * lib/getopt.c: Fix typo in last commit.
5694
5695 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
5696
5697         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
5698         dgettext.
5699
5700 2006-09-12  Jim Meyering  <jim@meyering.net>
5701
5702         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
5703         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
5704         Reported by Nelson H. F. Beebe.
5705
5706 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
5707
5708         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
5709         program_invocation_name and program_invocation_short_name are
5710         initialized.
5711         * lib/argp-namefrob.h: Move declarations of program_invocation_name
5712         and program_invocation_short_name to argp.h, so they are visible
5713         to user programs.
5714         * lib/argp.h: Likewise
5715
5716 2006-09-10  Bruno Haible  <bruno@clisp.org>
5717
5718         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
5719         m4/inttypes_h.m4, m4/uintmax_t.m4.
5720
5721 2006-09-10  Bruno Haible  <bruno@clisp.org>
5722
5723         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
5724         gl_AC_TYPE_UINTMAX_T.
5725
5726 2006-09-10  Bruno Haible  <bruno@clisp.org>
5727
5728         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
5729
5730 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
5731
5732         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
5733         convention.  Text proposed by Bruno Haible.
5734         (struct argp_option): Document the use of N_() wrappers.
5735
5736         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
5737         '\v', and translate the two parts separately, instead of feeding
5738         the whole string to gettext.  This allows to exclude
5739         '\v' from the strings visible to the translator by writing doc
5740         strings as N_("..") "\v" N_("..").
5741
5742 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
5743
5744         * config/srclist.txt: Undo latest change; the bug was fixed.
5745
5746 2006-09-09  Bruno Haible  <bruno@clisp.org>
5747
5748         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
5749         assignments if building a library without libtool.
5750         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
5751         in func_emit_lib_Makefile_am.
5752         (func_import): When building a static library libfoo.a, arrange to
5753         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
5754         (func_create_testdir): Likewise.
5755         * modules/gc (configure.ac, Makefile.am): If building statically,
5756         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
5757         * modules/iconvme (configure.ac, Makefile.am): Likewise.
5758         * modules/striconv (configure.ac, Makefile.am): Likewise.
5759         Based on a suggestion by Ralf Wildenhues.
5760
5761 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5762
5763         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
5764         Check for unistd.h too, since Autoconf doesn't assume POSIX.
5765         Also:
5766
5767         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5768         Add year_2050_test to catch glibc bug 2821
5769         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
5770
5771         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5772         Prefer #ifdef to #if.
5773
5774         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
5775         Return from 'main' instead of calling 'exit'.
5776
5777 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5778
5779         * lib/mktime.c (guess_time_tm): Fix bug where mktime
5780         returned the maximum time_t value rather than (time_t) -1.
5781         Problem originally reported by William Bardwell
5782         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
5783
5784         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
5785         Moved to here ...
5786         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
5787         ... from here.
5788
5789 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5790
5791         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
5792         2821 is fixed.
5793
5794 2006-09-08  Jim Meyering  <jim@meyering.net>
5795
5796         Don't make generated files read-only.  That would bother too many
5797         people.  However, do retain the ability to work when targets are
5798         read-only: remove the destination and temporary files before writing
5799         them (when generated via sed or echo), or by using the -f option for
5800         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
5801         * modules/alloca-opt, modules/argz, modules/arpa_inet:
5802         * modules/byteswap, modules/configmake, modules/fcntl:
5803         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
5804         * modules/localcharset, modules/netinet_in, modules/poll:
5805         * modules/stdbool, modules/stdint, modules/sys_select:
5806         * modules/sys_socket, modules/sys_stat, modules/sysexits:
5807
5808 2006-09-08  Jim Meyering  <jim@meyering.net>
5809
5810         Avoid new build failure on FreeBSD 6.0.
5811         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
5812         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
5813         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
5814
5815 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5816
5817         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
5818
5819 2006-09-07  Jim Meyering  <jim@meyering.net>
5820
5821         Fix global typo in last change: use chmod u-w, not chmod u-x.
5822         Spotted by Paul Eggert and Bruce Korb.
5823         * modules/alloca-opt, modules/argz, modules/arpa_inet:
5824         * modules/byteswap, modules/configmake, modules/fcntl:
5825         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
5826         * modules/localcharset, modules/netinet_in, modules/poll:
5827         * modules/stdbool, modules/stdint, modules/sys_select:
5828         * modules/sys_socket, modules/sys_stat, modules/sysexits:
5829
5830 2006-09-06  Jim Meyering  <jim@meyering.net>
5831
5832         Make generated files be read-only.
5833         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
5834         Ensure that each generated file is now read-only.
5835         * modules/argz: Likewise.
5836         * modules/arpa_inet: Likewise.
5837         * modules/byteswap: Likewise.
5838         * modules/configmake: Likewise.
5839         * modules/fcntl: Likewise.
5840         * modules/fnmatch: Likewise.
5841         * modules/getopt: Likewise.
5842         * modules/glob: Likewise.
5843         * modules/inttypes: Likewise.
5844         * modules/netinet_in: Likewise.
5845         * modules/poll: Likewise.
5846         * modules/stdbool: Likewise.
5847         * modules/stdint: Likewise.
5848         * modules/sys_select: Likewise.
5849         * modules/sys_socket: Likewise.
5850         * modules/sys_stat: Likewise.
5851         * modules/sysexits: Likewise.
5852         * modules/localcharset: Same as above, but continue using temporary
5853         file named "t-$@" (why different?) rather than the "$@-t" used
5854         everywhere else.
5855
5856         * modules/sysexits (Makefile.am): Replace literal occurrences
5857         of "sysexit.h" more readable, and more consistent, "$@".
5858
5859 2006-09-06  Bruno Haible  <bruno@clisp.org>
5860
5861         * modules/striconv: New file.
5862         * modules/xstriconv: New file.
5863         * MODULES.html.sh (Internationalization functions): Add striconv,
5864         xstriconv.
5865
5866 2006-09-06  Bruno Haible  <bruno@clisp.org>
5867
5868         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
5869         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
5870         not using libtool correctly.
5871
5872 2006-09-06  Bruno Haible  <bruno@clisp.org>
5873
5874         * lib/striconv.h: New file.
5875         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
5876         iconvstring.c.
5877         * lib/xstriconv.h: New file.
5878         * lib/xstriconv.c: New file.
5879
5880 2006-09-06  Bruno Haible  <bruno@clisp.org>
5881
5882         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
5883         lib_..._LDFLAGS.
5884
5885 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5886
5887         * lib/argz_.h: Sync from Libtool.
5888
5889         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
5890                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5891
5892         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
5893
5894 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
5895
5896         * modules/trim: New file.
5897
5898 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
5899
5900         * lib/trim.h: New file.
5901         * lib/trim.c: New file.
5902
5903 2006-09-05  Bruno Haible  <bruno@clisp.org>
5904
5905         * MODULES.html.sh (String handling): Add trim.
5906
5907 2006-09-04  Karl Berry  <karl@gnu.org>
5908
5909         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
5910         until next release.
5911
5912 2006-09-03  Bruno Haible  <bruno@clisp.org>
5913
5914         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
5915         correctly.
5916
5917 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5918
5919         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
5920         not gl_GETLOADAVG.  Omit unneeded semicolons.
5921         Problems reported by Ralf Wildenhues in
5922         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
5923         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
5924         at the end, which is the usual gnulib style.
5925
5926         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
5927         of doing all the work ourselves.
5928         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
5929         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
5930
5931 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5932
5933         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
5934         Problem reported by Ralf Wildenhues in
5935         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
5936
5937         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
5938         HAVE_STRUCT_STATFS_F_FSTYPENAME.
5939
5940 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5941
5942         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
5943         yesterday's patch by changing test -n to test -z.
5944
5945 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5946
5947         * modules/getloadavg (Files): Add m4/getloadavg.m4.
5948         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
5949         the former is now obsolescent.
5950
5951         * modules/chdir-long (Depends-on): Add fcntl.
5952
5953 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5954
5955         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
5956         obsolescent, and programs should use gnulib instead.
5957         * m4/getloadavg.m4: New file, with contents taken from Autoconf
5958         but with prefixes changed.
5959
5960 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5961
5962         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
5963         or stdbool.h, because they might not exist while configuring.
5964
5965         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
5966         Don't include unistd.h or limits.h; not needed, since chdir-long.h
5967         does that for us.
5968         (O_DIRECTORY): Remove.
5969
5970 2006-08-31  Eric Blake  <ebb9@byu.net>
5971
5972         * gnulib-tool: Don't let emacs change spaces to TAB.
5973
5974 2006-08-31  Bruno Haible  <bruno@clisp.org>
5975
5976         * gnulib-tool: When calling func_import more than once, do it in a
5977         subshell.
5978         Reported by Eric Blake <ebb9@byu.net>.
5979
5980 2006-08-31  Bruno Haible  <bruno@clisp.org>
5981
5982         * gnulib-tool (nl): Remove variable.
5983         (sed_transform_lib_file): Use more robust test for config-h module.
5984         (func_import): Fix typo in 2006-08-25 patch.
5985
5986 2006-08-31  Bruno Haible  <bruno@clisp.org>
5987
5988         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
5989         specified, augment Makefile.am variables instead of assigning them.
5990
5991 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5992
5993         Work around a bug in both the Linux and SunOS 64-bit kernels:
5994         nanosleep mishandles sleeps for longer than 2**31 seconds.
5995         Problem reported by Frank v Waveren in
5996         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
5997         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
5998         Check for nanosleep bug.
5999         (LIB_NANOSLEEP): Append clock_gettime library if needed.
6000
6001 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
6002
6003         Work around a bug in both the Linux and SunOS 64-bit kernels:
6004         nanosleep mishandles sleeps for longer than 2**31 seconds.
6005         Problem reported by Frank v Waveren in
6006         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
6007         * lib/nanosleep.c (BILLION): New constant.
6008         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
6009         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
6010         implementation.
6011
6012 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
6013
6014         * modules/nanosleep (Depends-on): Add gettime.
6015
6016 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
6017         and Simon Josefsson  <jas@extundo.com>
6018         and Oskar Liljeblad  <oskar@osk.mine.nu>
6019
6020         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
6021         * gnulib-tool (func_import): New license type 'unmodifiable license
6022         text'.
6023         * modules/fdl: Use it.  Longer description.
6024         * module/gpl, module/lgpl: New files.
6025
6026 2006-08-30  Jim Meyering  <jim@meyering.net>
6027
6028         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
6029         shadowing the parameter.
6030
6031 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6032
6033         Sync from Libtool:
6034
6035         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6036
6037         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
6038         sharing with gnulib.  Report by Eric Blake.
6039
6040 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
6041
6042         * modules/isapipe: New file.
6043         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
6044
6045 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
6046
6047         * modules/configmake (Makefile.am): Add a comment, and omit
6048         the CONFIGMAKE_ prefix from generated macro names.  Suggested
6049         by Bruno Haible.
6050
6051 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
6052
6053         * m4/isapipe.m4: New file.
6054
6055 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
6056
6057         * lib/isapipe.c, lib/isapipe.h: New files.
6058
6059 2006-08-29  Jim Meyering  <jim@meyering.net>
6060
6061         * modules/configmake (Makefile.am): Make configmake.h depend on
6062         Makefile.  Otherwise, a stale configmake.h could hang around.
6063
6064 2006-08-29  Eric Blake  <ebb9@byu.net>
6065
6066         * lib/error.c (error_at_line, print_errno_message): Match libc, after
6067         resolution of upstream bug 3044.
6068
6069 2006-08-29  Bruno Haible  <bruno@clisp.org>
6070
6071         * modules/localcharset (Depends-on): Add configmake.
6072         (Makefile.am): Remove setting of LIBDIR through DEFS.
6073
6074 2006-08-29  Bruno Haible  <bruno@clisp.org>
6075
6076         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
6077         defined.
6078
6079 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6080
6081         * modules/fcntl: New file.
6082         * modules/chdir-safer (Depends-on): Add fcntl.
6083         * modules/fts: Likewise.
6084         * modules/mkdir-p: Likewise.
6085
6086         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
6087         This undoes the most recent change, since we're now addressing the
6088         problem in a different way.
6089
6090         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
6091         into output, since the output might be called Makefile.am even
6092         if $makefile_name is something different.
6093         (func_import): Use $makefile_am rather than
6094         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
6095         empty.
6096
6097         * modules/inttypes (Files): Add m4/inttypes-h.m4.
6098
6099 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6100
6101         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
6102         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
6103         recent change to stdint.m4, since we're now addressing the problem in a
6104         different way.
6105
6106 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6107
6108         * m4/fcntl_h.m4: New file.
6109
6110 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6111
6112         * lib/fcntl_.h: New file.
6113         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
6114         the fcntl module.
6115         * lib/dirchownmod.c: Likewise.
6116         * lib/fts.c: Likewise.
6117
6118         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
6119         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
6120         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
6121         just before including <inttypes.h>, to avoid circular inclusion.
6122
6123 2006-08-28  Jim Meyering  <jim@meyering.net>
6124
6125         * doc/visibility.texi: Actually read and correct the grammar of the
6126         sentence affected by yesterday's change.
6127
6128 2006-08-28  Eric Blake  <ebb9@byu.net>
6129
6130         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
6131         needs wrapper.
6132
6133 2006-08-28  Eric Blake  <ebb9@byu.net>
6134
6135         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
6136
6137 2006-08-28  Eric Blake  <ebb9@byu.net>
6138
6139         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
6140
6141 2006-08-28  Bruno Haible  <bruno@clisp.org>
6142
6143         * modules/c-strstr: New file, from GNU gettext.
6144         * MODULES.html.sh (String handling): Add c-strstr.
6145
6146 2006-08-28  Bruno Haible  <bruno@clisp.org>
6147
6148         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
6149         macros.
6150         Reported by Eric Blake.
6151
6152 2006-08-28  Bruno Haible  <bruno@clisp.org>
6153
6154         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
6155         (VASNPRINTF): Return a string of length > INT_MAX without failing.
6156         * lib/vasprintf.c: Include errno.h, limits.h.
6157         (EOVERFLOW): New fallback definition.
6158         (vasprintf): Test here whether the string length is > INT_MAX.
6159         * lib/vsnprintf.c: Include errno.h, limits.h.
6160         (EOVERFLOW): New fallback definition.
6161         (vsnprintf): Fix bug when generated string was too long for the buffer.
6162         Test here whether the string length is > INT_MAX.
6163
6164 2006-08-28  Bruno Haible  <bruno@clisp.org>
6165
6166         * lib/inttypes_.h (SCNX*): Remove definitions.
6167         Reported by Eric Blake.
6168
6169 2006-08-28  Bruno Haible  <bruno@clisp.org>
6170
6171         * lib/c-strstr.h: New file, from GNU gettext.
6172         * lib/c-strstr.c: New file, from GNU gettext.
6173
6174 2006-08-28  Bruno Haible  <bruno@clisp.org>
6175
6176         * gnulib-tool: Reorder some statements.
6177
6178 2006-08-28  Bruno Haible  <bruno@clisp.org>
6179
6180         * gnulib-tool: New option --makefile-name.
6181         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
6182         $makefile_name.
6183         (func_import): Write $makefile_name to the cache file, and read it from
6184         there unless explicitly specified. Use $makefile_name as file name
6185         instead of Makefile.am. Adjust the recommendations accordingly.
6186
6187 2006-08-28  Bruno Haible  <bruno@clisp.org>
6188
6189         * gnulib-tool (func_verify_module): Check against misapplying patch.
6190
6191 2006-08-28  Bruno Haible  <bruno@clisp.org>
6192
6193         * gnulib-tool (func_relativize, func_relconcat): New functions.
6194         Give an error if --local-dir is given with --update.
6195         Remove trailing slashes from $local_gnulib_dir.
6196         (func_import): Store the relativized $local_gnulib_dir in
6197         gnulib-cache.m4, and read it from there if not specified explicitly.
6198
6199 2006-08-28  Bruno Haible  <bruno@clisp.org>
6200
6201         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
6202         is the current directory. Respect also $local_gnulib_dir.
6203
6204 2006-08-28  Bruno Haible  <bruno@clisp.org>
6205             Simon Josefsson  <jas@extundo.com>
6206
6207         BeOS portability.
6208         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
6209
6210 2006-08-27  Jim Meyering  <jim@meyering.net>
6211
6212         * doc/visibility.texi: Remove duplicate word: "pointer".
6213
6214 2006-08-26  Bruno Haible  <bruno@clisp.org>
6215
6216         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
6217         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
6218         (Makefile.am): Create inttypes.h from inttypes_.h.
6219         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
6220
6221         * modules/imaxabs: New file.
6222
6223         * modules/imaxdiv: New file.
6224
6225 2006-08-26  Bruno Haible  <bruno@clisp.org>
6226
6227         * m4/inttypes.m4: New file.
6228         * m4/_inttypes_h.m4: Remove file.
6229         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
6230         PRI_MACROS_BROKEN.
6231         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
6232
6233         * m4/imaxabs.m4: New file.
6234
6235         * m4/imaxdiv.m4: New file.
6236
6237 2006-08-26  Bruno Haible  <bruno@clisp.org>
6238
6239         * lib/inttypes_.h: New file.
6240         * lib/inttypes.h: Remove file.
6241         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
6242
6243         * lib/imaxabs.c: New file.
6244
6245         * lib/imaxdiv.c: New file.
6246
6247 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
6248
6249         New config-h module, so that "make" output needn't be cluttered
6250         by -DHAVE_CONFIG_H.
6251         * MODULES.html.sh (Support for building libraries and executables):
6252         Add config-h.
6253         * modules/config-h: New file.
6254         * gnulib-tool (nl, sed_transform_lib_file): New vars.
6255         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
6256         the config-h module is used.
6257
6258         New configmake module, so that "make" output needn't be cluttered
6259         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
6260         * MODULES.html.sh (Support for building libraries and executables):
6261         Add configmake.
6262         * modules/configmake: New file.
6263
6264 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
6265
6266         * m4/config-h.m4: New file.
6267
6268 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
6269
6270         * config/srclist.txt: Add elisp-comp.
6271
6272 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
6273
6274         * MODULES.html.sh (Support for building libraries and executables):
6275         Add elisp-comp.
6276         * build-aux/elisp-comp: New file.
6277         * modules/elisp-comp: New file.
6278
6279 2006-08-24  Bruno Haible  <bruno@clisp.org>
6280
6281         * gnulib-tool (func_create_testdir): Use non-default values of
6282         sourcebase and m4base.
6283
6284 2006-08-24  Bruno Haible  <bruno@clisp.org>
6285
6286         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
6287         HTML structure.
6288
6289 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
6290
6291         * modules/openat (Depends-on): Add lchown.
6292
6293 2006-08-23  Bruno Haible  <bruno@clisp.org>
6294
6295         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
6296         of gl_LOCK_EARLY instead of gl_LOCK.
6297
6298 2006-08-23  Bruno Haible  <bruno@clisp.org>
6299
6300         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
6301         on OSF/1 to no.
6302         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
6303
6304 2006-08-23  Bruno Haible  <bruno@clisp.org>
6305
6306         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
6307         as unusable.
6308
6309         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
6310         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
6311         (gl_LOCK): New macro.
6312
6313 2006-08-22  Simon Josefsson  <jas@extundo.com>
6314
6315         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
6316         to md5 module.
6317
6318 2006-08-22  Simon Josefsson  <jas@extundo.com>
6319
6320         * MODULES.html.sh: Add "Support for maintaining and release
6321         projects".
6322
6323         * build-aux/gnupload: New file, from coreutils.
6324
6325 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6326
6327         Avoid the need for AC_LIBSOURCES in m4 macros.
6328         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
6329         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
6330         * modules/check-version (EXTRA_DIST): Add check-version.h.
6331         * modules/crc (EXTRA_DIST): Add crc.h.
6332         * modules/des (EXTRA_DIST): Add des.h.
6333         * modules/gc (EXTRA_DIST): Add gc.h.
6334         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
6335         * modules/getline (EXTRA_DIST): Add getline.h.
6336         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
6337         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
6338         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
6339         * modules/md2 (EXTRA_DIST): Add md2.h.
6340         * modules/md4 (EXTRA_DIST): Add md4.h.
6341         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
6342         * modules/read-file (EXTRA_DIST): Add read-file.h.
6343         * modules/readline (EXTRA_DIST): Add readline.h.
6344         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
6345         rijndael-api-fst.h.
6346
6347 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6348
6349         * m4/rijndael.m4 (gl_ARCFOUR):
6350         * m4/arctwo.m4 (gl_ARCTWO):
6351         * m4/check-version.m4 (gl_CHECK_VERSION):
6352         * m4/crc.m4 (gl_CRC):
6353         * m4/des.m4 (gl_DES):
6354         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
6355         * m4/gc.m4 (gl_GC):
6356         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
6357         * m4/getline.m4 (gl_FUNC_GETLINE):
6358         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
6359         * m4/hmac-md5.m4 (gl_HMAC_MD5):
6360         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
6361         * m4/md2.m4 (gl_MD2):
6362         * m4/md4.m4 (gl_MD4):
6363         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
6364         * m4/read-file.m4 (gl_FUNC_READ_FILE):
6365         * m4/readline.m4 (gl_FUNC_READLINE):
6366         * m4/rijndael.m4 (gl_RIJNDAEL):
6367         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
6368         to get the necessary .h files and whatnot.
6369
6370 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6371
6372         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
6373         gnulib rather than the other way around.
6374         * config/srclistvars.sh (COREUTILS): Remove.
6375
6376 2006-08-22  Jim Meyering  <jim@meyering.net>
6377
6378         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
6379
6380         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
6381
6382 2006-08-22  Eric Blake  <ebb9@byu.net>
6383
6384         * modules/regexprops-generic: New file.
6385         * MODULES.html.sh (Support for building documentation): List it.
6386
6387 2006-08-22  Eric Blake  <ebb9@byu.net>
6388
6389         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
6390         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
6391         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
6392         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
6393
6394 2006-08-22  Bruno Haible  <bruno@clisp.org>
6395
6396         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
6397         and lib_LTLIBRARIES like the other lib_* variables.
6398
6399 2006-08-22  Bruno Haible  <bruno@clisp.org>
6400
6401         * build-aux/x-to-1.in: New file, from GNU gettext.
6402
6403 2006-08-22  Bruno Haible  <bruno@clisp.org>
6404
6405         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
6406         <utmpx.h> exists.
6407
6408 2006-08-22  Bruno Haible  <bruno@clisp.org>
6409
6410         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
6411         <utmpx.h> exists.
6412
6413 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6414
6415         BeOS portability.
6416         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
6417         exist.
6418         Problem reported by Bruno Haible.
6419
6420 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6421
6422         Avoid the need for AC_LIBSOURCES in m4 macros.
6423         * modules/acl (EXTRA_DIST): Add acl.h.
6424         * modules/argmatch (Files): Add m4/argmatch.m4.
6425         (configure.ac): Add gl_ARGMATCH.
6426         (EXTRA_DIST): Renamed from lib_SOURCES, for
6427         consistency with the other modules.  Remove argmatch.c.
6428         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
6429         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
6430         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
6431         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
6432         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
6433         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
6434         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
6435         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
6436         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
6437         * modules/closeout (EXTRA_DIST): Add closeout.h.
6438         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
6439         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
6440         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
6441         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
6442         dirname.h; remove basename.c and stripslash.c.
6443         * modules/exclude (EXTRA_DIST): Add exclude.h.
6444         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
6445         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
6446         * modules/file-type (EXTRA_DIST): Add file-type.h.
6447         * modules/filemode (EXTRA_DIST): Add filemode.h.
6448         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
6449         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
6450         * modules/fpending (EXTRA_DIST): Add __fpending.h.
6451         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
6452         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
6453         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
6454         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
6455         * modules/getdate (EXTRA_DIST): Add getdate.c.
6456         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
6457         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
6458         * modules/getpass (EXTRA_DIST): Add getpass.h.
6459         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
6460         * modules/group-member (EXTRA_DIST): Add group-member.h.
6461         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
6462         * modules/hash (EXTRA_DIST): Add hash.h.
6463         * modules/human (EXTRA_DIST): Add human.h.
6464         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
6465         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
6466         * modules/lchown (EXTRA_DIST): Add lchown.h.
6467         * modules/long-options (EXTRA_DIST): Add long-options.h.
6468         * modules/lstat (EXTRA_DIST): Add lstat.h.
6469         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
6470         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
6471         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
6472         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
6473         * modules/memxor (EXTRA_DIST): Add memxor.h.
6474         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
6475         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
6476         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
6477         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
6478         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
6479         * modules/physmem (EXTRA_DIST): Add physmem.h.
6480         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
6481         * modules/posixver (EXTRA_DIST): Add posixver.h.
6482         * modules/quote (EXTRA_DIST): Add quote.h.
6483         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
6484         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
6485         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
6486         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
6487         regex_internal.h regexec.c.
6488         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
6489         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
6490         * modules/same (EXTRA_DIST): Add same.h.
6491         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
6492         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
6493         * modules/savedir (EXTRA_DIST): Add savedir.h.
6494         * modules/sha1 (EXTRA_DIST): Add sha1.h.
6495         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
6496         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
6497         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
6498         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
6499         * modules/strdup (EXTRA_DIST): Add strdup.h.
6500         * modules/strftime (EXTRA_DIST): Add strftime.h.
6501         * modules/strndup (EXTRA_DIST): Add strndup.h.
6502         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
6503         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
6504         * modules/time_r (EXTRA_DIST): Add time_r.h.
6505         * modules/timespec (EXTRA_DIST): Add timespec.h.
6506         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
6507         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
6508         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
6509         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
6510         * modules/userspec (EXTRA_DIST): Add userspec.h.
6511         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
6512         * modules/utimens (EXTRA_DIST): Add utimens.h.
6513         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
6514         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
6515         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
6516         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
6517         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
6518         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
6519         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
6520         * modules/yesno (EXTRA_DIST): Add yesno.h.
6521
6522 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6523
6524         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
6525
6526         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
6527         * m4/dev-ino.m4, same-inode.m4: Remove.
6528
6529         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
6530         * m4/acl.m4 (AC_FUNC_ACL):
6531         * m4/backupfile.m4 (gl_BACKUPFILE):
6532         * m4/c-strtod.m4 (gl_C99_STRTOLD):
6533         * m4/canon-host.m4 (gl_CANON_HOST):
6534         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
6535         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
6536         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
6537         * m4/cloexec.m4 (gl_CLOEXEC):
6538         * m4/close-stream.m4 (gl_CLOSE_STREAM):
6539         * m4/closeout.m4 (gl_CLOSEOUT):
6540         * m4/dirfd.m4 (gl_FUNC_DIRFD):
6541         * m4/dirname.m4 (gl_DIRNAME):
6542         * m4/exclude.m4 (gl_EXCLUDE):
6543         * m4/exitfail.m4 (gl_EXITFAIL):
6544         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
6545         * m4/file-type.m4 (gl_FILE_TYPE):
6546         * m4/filemode.m4 (gl_FILEMODE):
6547         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
6548         * m4/fpending.m4 (gl_FUNC_FPENDING):
6549         * m4/fprintftime.m4 (gl_FPRINTFTIME):
6550         * m4/fts.m4 (gl_FUNC_FTS):
6551         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
6552         * m4/getdate.m4 (gl_GETDATE):
6553         * m4/gethrxtime.m4 (gl_GETHRXTIME):
6554         * m4/getpagesize.m4 (gl_GETPAGESIZE):
6555         * m4/getpass.m4 (gl_FUNC_GETPASS):
6556         * m4/gettime.m4 (gl_GETTIME):
6557         * m4/getugroups.m4 (gl_GETUGROUPS):
6558         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
6559         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
6560         * m4/hard-locale.m4 (gl_HARD_LOCALE):
6561         * m4/hash.m4 (gl_HASH):
6562         * m4/idcache.m4 (gl_IDCACHE):
6563         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
6564         * m4/lchown.m4 (gl_FUNC_LCHOWN):
6565         * m4/long-options.m4 (gl_LONG_OPTIONS):
6566         * m4/lstat.m4 (gl_FUNC_LSTAT):
6567         * m4/md5.m4 (gl_MD5):
6568         * m4/memcasecmp.m4 (gl_MEMCASECMP):
6569         * m4/memcoll.m4 (gl_MEMCOLL):
6570         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
6571         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
6572         * m4/memxor.m4 (gl_MEMXOR):
6573         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
6574         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
6575         * m4/modechange.m4 (gl_MODECHANGE):
6576         * m4/mountlist.m4 (gl_MOUNTLIST):
6577         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
6578         * m4/openat.m4 (gl_FUNC_OPENAT):
6579         * m4/pathmax.m4 (gl_PATHMAX):
6580         * m4/physmem.m4 (gl_PHYSMEM):
6581         * m4/posixtm.m4 (gl_POSIXTM):
6582         * m4/posixver.m4 (gl_POSIXVER):
6583         * m4/quote.m4 (gl_QUOTE):
6584         * m4/quotearg.m4 (gl_QUOTEARG):
6585         * m4/readtokens.m4 (gl_READTOKENS):
6586         * m4/readutmp.m4 (gl_READUTMP):
6587         * m4/regex.m4 (gl_REGEX):
6588         * m4/safe-read.m4 (gl_SAFE_READ):
6589         * m4/safe-write.m4 (gl_SAFE_WRITE):
6590         * m4/same.m4 (gl_SAME):
6591         * m4/save-cwd.m4 (gl_SAVE_CWD):
6592         * m4/savedir.m4 (gl_SAVEDIR):
6593         * m4/settime.m4 (gl_SETTIME):
6594         * m4/sha1.m4 (gl_SHA1):
6595         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
6596         * m4/stat-macros.m4 (gl_STAT_MACROS):
6597         * m4/stat-time.m4 (gl_STAT_TIME):
6598         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
6599         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
6600         * m4/strdup.m4 (gl_FUNC_STRDUP):
6601         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
6602         * m4/strndup.m4 (gl_FUNC_STRNDUP):
6603         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
6604         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
6605         * m4/time_r.m4 (gl_TIME_R):
6606         * m4/timespec.m4 (gl_TIMESPEC):
6607         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
6608         * m4/unlinkdir.m4 (gl_UNLINKDIR):
6609         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
6610         * m4/userspec.m4 (gl_USERSPEC):
6611         * m4/utimecmp.m4 (gl_UTIMECMP):
6612         * m4/utimens.m4 (gl_UTIMENS):
6613         * m4/xalloc.m4 (gl_XALLOC):
6614         * m4/xgetcwd.m4 (gl_XGETCWD):
6615         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
6616         * m4/xreadlink.m4 (gl_XREADLINK):
6617         * m4/xstrtod.m4 (gl_XSTRTOD):
6618         * m4/yesno.m4 (gl_YESNO):
6619         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
6620         to get the necessary .h files and whatnot.
6621
6622 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
6623             Bruno Haible  <bruno@clisp.org>
6624
6625         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
6626         /bin/sh understanding of '!' conditional negation.
6627
6628 2006-08-21  Jim Meyering  <jim@meyering.net>
6629
6630         * modules/openat (Depends-on): Really alphabetize.
6631
6632         * modules/acl (Depends-on): Add error and quote.
6633
6634         * check-module (find_included_lib_files): Add at-func.c to the
6635         ok-to-include-more-than-once white list.
6636
6637         * modules/openat (Depends-on): Add lstat.  Alphabetize.
6638
6639 2006-08-21  Bruno Haible  <bruno@clisp.org>
6640
6641         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6642         Emit a pkgdata_DATA variable only if some snippets add contents to it.
6643         Reported by Martin Lambers <marlam@marlam.de>.
6644
6645 2006-08-21  Bruno Haible  <bruno@clisp.org>
6646
6647         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
6648         specify an installation location, don't emit a noinst_LIBRARIES or
6649         noinst_LTLIBRARIES assignment.
6650
6651 2006-08-21  Bruno Haible  <bruno@clisp.org>
6652
6653         BeOS portability.
6654         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
6655         BeOS has mbrtowc() but no <wctype.h>.
6656
6657 2006-08-21  Bruno Haible  <bruno@clisp.org>
6658
6659         BeOS portability.
6660         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
6661         exist.
6662
6663 2006-08-21  Bruno Haible  <bruno@clisp.org>
6664
6665         BeOS portability.
6666         * lib/mbchar.h: Include <wctype.h> only if it exists.
6667
6668 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
6669
6670         Remove files that are no longer needed by their respective modules.
6671         * m4/obstack.m4: Remove.
6672         * m4/strerror_r.m4: Remove.
6673         * m4/uint32_t.m4: Remove.
6674         * m4/uintptr_t.m4: Remove.
6675         * m4/ullong_max.m4: Remove.
6676         * m4/xstrtoimax.m4: Remove.
6677         * m4/xstrtoumax.m4: Remove.
6678
6679         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
6680         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
6681         dependencies now capture this.
6682
6683         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
6684         Do not use AC_LIBSOURCES, since gnulib modules now do this.
6685         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
6686         * m4/human.m4 (gl_HUMAN): Likewise.
6687         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
6688         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
6689
6690         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
6691
6692         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
6693         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
6694         stdint.
6695         * m4/human.m4 (gl_HUMAN): Likewise.
6696         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
6697         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
6698         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
6699         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
6700         * m4/xstrtol (gl_XSTRTOL): Likewise.
6701
6702         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
6703         AC_TYPE_LONG_LONG_INT.
6704         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
6705         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
6706         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
6707         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
6708
6709         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
6710         on stdbool.
6711
6712         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
6713         (gl_PREREQ_XSTRTOUL): Remove.
6714
6715         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
6716
6717         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
6718         mode.
6719
6720 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
6721
6722         Add and change modules to make it easier for coreutils to use
6723         gnulib-tool.
6724         * modules/backupfile (Files): Remove m4/d-ino.m4.
6725         (Depends-on): Add d-ino.
6726         * modules/cycle-check (Depends-on): Add stdint.
6727         (lib_SOURCES): Add cycle-check.h.
6728         * modules/d-ino: New module.
6729         * modules/d-type: New module.
6730         * modules/error (Files): Remove m4/strerror_r.m4.
6731         * modules/filemode (Files): Add m4/st_dm_mode.m4.
6732         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
6733         m4/inttypes_h.m4, m4/uintmax_t.m4.
6734         (Depends-on): Add stdint.
6735         (lib_SOURCES): Add fsusage.h.
6736         * modules/getcwd (Files): Remove d-ino.m4.
6737         (Depends-on): Add d-ino.
6738         * modules/getndelim2 (Depends-on): Add stdint.
6739         * modules/glob (Files): Remove m4/d-type.m4.
6740         (Depends-on): Add d-type.
6741         * modules/host-os: New module.
6742         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
6743         m4/inttypes_h.m4, m4/uintmax_t.m4.
6744         * Depends-on: Add stdint.
6745         (lib_SOURCES): Add human.h.
6746         * modules/inttostr (Files): Remove m4/intmax_t.m4,
6747         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
6748         m4/uintmax_t.m4, m4/ulonglong.m4.
6749         (Depends-on): Add stdint.
6750         (EXTRA_DIST): Add inttostr.h.
6751         * modules/lchmod: New module.
6752         * modules/link-follow: New module.
6753         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
6754         (Depends-on): Add lchmod.
6755         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
6756         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
6757         (Depends-on): Add stdint.
6758         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
6759         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
6760         (Depends-on): Add stdint.
6761         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
6762         * modules/perl: New module.
6763         * modules/regex (Depends-on): Add stdint.
6764         * modules/rmdir-errno: New module.
6765         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
6766         m4/intmax_t.m4.
6767         (Depends-on): Add stdint.
6768         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
6769         m4/uintmax_t.m4.
6770         (Depends-on): Add stdint.
6771         * modules/unlink-busy: New module.
6772         * modules/utimecmp (Depends-on): Add stdint.
6773         * modules/uptime: New module.
6774         * modules/winsz-ioctl: New module.
6775         * modules/winsz-termios: New module.
6776         * modules/xnanosleep (Depends-on): Add nanosleep.
6777         * modules/ullong_max: Remove.
6778         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
6779         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
6780         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
6781         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
6782         (Depends-on): Add inttypes.
6783         (lib_SOURCES): Add xstrtol.h.
6784         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
6785         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
6786         * MODULES.html.sh: Move 'assert' into the assert section.
6787         Move 'dummy' into the linking section.
6788         Remove ullong_max.
6789         Add section for compatibility checks for POSIX:2001 functions,
6790         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
6791         winsz-ioctl, and winsz-termios into it.
6792         Add lchmod.
6793         Add top-level Misc section and put host-os, perl, and uptime
6794         into it.
6795
6796 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
6797
6798         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
6799         now assume the stdint module.  Do not include inttypes.h.
6800         * lib/fsusage.h: Likewise.
6801         * lib/getndelim2.c: Likewise.
6802         * lib/human.h: Likewise.
6803         * lib/inttostr.h: Likewise.
6804         * lib/obstack.c: Likewise.
6805         * lib/regex_internal.h: Likewise.
6806         * lib/tempname.c: Likewise.
6807         * lib/utimecmp.c: Likewise.
6808         * lib/xstrtol.h: Likewise.
6809
6810         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
6811
6812         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
6813         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
6814         * lib/xtime.h: Likewise.
6815
6816 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
6817
6818         * modules/openat (Files): Add lib/fchmodat.c.
6819         Fixes problem reported by Jay Youngman.
6820
6821 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
6822
6823         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
6824         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
6825
6826 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
6827             Bruno Haible  <bruno@clisp.org>
6828
6829         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
6830         and is a script that invokes bison. Tighten the code. Add comments.
6831
6832 2006-08-18  Jim Meyering  <jim@meyering.net>
6833
6834         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
6835         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
6836         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
6837         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
6838
6839 2006-08-18  Bruno Haible  <bruno@clisp.org>
6840
6841         * modules/bison-i18n: New file.
6842         * MODULES.html.sh (Internationalization functions): Add it.
6843
6844 2006-08-18  Bruno Haible  <bruno@clisp.org>
6845
6846         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
6847         sys/statvfs.h. When getmntinfo was found, check its declaration and
6848         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
6849
6850 2006-08-18  Bruno Haible  <bruno@clisp.org>
6851
6852         * m4/bison-i18n.m4: New file, from bison.
6853
6854 2006-08-18  Bruno Haible  <bruno@clisp.org>
6855
6856         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
6857         (ME_DUMMY): Treat "kernfs" as a dummy.
6858         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
6859
6860 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
6861
6862         Update from coreutils.
6863
6864         2006-08-15  Jim Meyering  <jim@meyering.net>
6865
6866         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
6867
6868         2006-01-17  Jim Meyering  <jim@meyering.net>
6869
6870         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
6871
6872         2006-01-11  Jim Meyering  <jim@meyering.net>
6873
6874         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
6875         Check for the lchmod function.
6876
6877 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
6878
6879         Update from coreutils.
6880
6881         * lib/__fpending.h: Add copyright notice.
6882         * lib/fprintftime.h: Likewise.
6883         * lib/savedir.c: Use (C) in copyright notice.
6884         * lib/savedir.h: Likewise.
6885
6886         2006-08-15  Jim Meyering  <jim@meyering.net>
6887
6888         * lib/at-func.c: New file, with the logic of all emulated at-functions.
6889         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
6890         in support of the EXPECTED_ERRNO macro.
6891         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
6892         definitions.  Instead, define the appropriate symbols and include
6893         "at-func.c".
6894         * lib/mkdirat.c (mkdirat): Likewise.
6895         * lib/fchmodat.c (fchmodat): Likewise.
6896         (ENOSYS): Remove definition.
6897         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
6898         it.  Don't include "unistd--.h" -- it wasn't ever used.
6899
6900         2006-01-17  Jim Meyering  <jim@meyering.net>
6901
6902         Rewrite fts.c not to change the current working directory,
6903         by using openat, fstatat, fdopendir, etc..
6904
6905         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
6906         (HAVE_OPENAT_SUPPORT): Define.
6907         [_LIBC] (fchdir): Don't undef or define; no longer used.
6908         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
6909         Now, this `function' always succeeds, and consumes its file descriptor
6910         parameter -- so callers must not close such FDs.  Update callers.
6911         (diropen_fd, opendirat, cwd_advance_fd): New functions.
6912         (diropen): Add parameter, SP.  Adjust all callers.
6913         Implement using diropen_fd, rather than open.
6914         (fts_open): Initialize new member, fts_cwd_fd.
6915         Remove fts_rft-setting code.
6916         (fts_close): Close fts_cwd_fd, if necessary.
6917         (__opendir2): Define in terms of opendir or opendirat,
6918         depending on whether the FST_NOCHDIR flag is set.
6919         (fts_build): Since fts_safe_changedir consumes its FD, and since
6920         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
6921         and close the dup'd file descriptor upon failure.
6922         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
6923         (fts_safe_changedir): Tweak semantics to reflect that this function
6924         now calls cwd_advance_fd and hence consumes its FD argument.
6925         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
6926         [struct FTS] (fts_rft): Remove now-unused member.
6927         [struct FTS] (fts_cycle.state): Improve comment.
6928
6929         * lib/openat.c (openat_needs_fchdir): New function.
6930         * lib/openat.h (openat_needs_fchdir): Declare it.
6931
6932 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
6933
6934         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
6935         Problem and fix reported by Pádraig Brady in
6936         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
6937
6938 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6939
6940         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
6941
6942 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6943
6944         * lib/memcoll.c (memcoll): Optimize for the common case where the
6945         arguments are bytewise equal.
6946
6947 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6948
6949         * doc/regexprops-generic.texi: Add a copyright notice.
6950
6951 2006-08-15  Bruno Haible  <bruno@clisp.org>
6952
6953         * modules/tmpdir (License): Change to LGPL.
6954
6955 2006-08-15  Bruno Haible  <bruno@clisp.org>
6956
6957         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
6958         module.
6959
6960 2006-08-14  Simon Josefsson  <jas@extundo.com>
6961
6962         * config/srclist.txt: Add gnupload.
6963
6964 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6965
6966         Change copyright notice from LGPL 2 to GPL 2, since that's the
6967         standard form used in the gnulib repository.
6968         * tests/test-lock.c: Likewise.
6969         * tests/test-stdint.c: Likewise.
6970         * tests/test-tls.c: Likewise.
6971
6972         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
6973         prelude-manager.  User shorter URLs for GNU projects, without '?'.
6974         Add copyright notice.
6975
6976         * check-module: Add copyright notice.  Output a copyright
6977         notice if "--version" is specified.
6978         * modules/COPYING: New file.
6979         * tests/test-getaddrinfo.c: Add copyright notice.
6980         * tests/test-verify.c: Likewise.
6981
6982 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6983
6984         Change copyright notice from LGPL 2 to GPL 2, since that's the
6985         standard form used in the gnulib repository.
6986         * lib/lock.c: LGPL -> GPL.
6987         * lib/lock.h: Likewise.
6988         * lib/strnlen1.c: Likewise.
6989         * lib/strnlen1.h: Likewise.
6990         * lib/tls.c: Likewise.
6991         * lib/tls.h: Likewise.
6992         * lib/tmpdir.c: Likewise.
6993
6994         * lib/TODO: Remove; this belongs only in coreutils.
6995
6996 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6997
6998         Add copyright notices to long-enough files that lack them, since
6999         otherwise the files aren't clearly free.  Use the same notice that
7000         getdate.texi already uses.
7001         * doc/alloca-opt.texi: Add copyright notice.
7002         * doc/alloca.texi: Likewise.
7003         * doc/ctime.texi: Likewise.
7004         * doc/functions.texi: Likewise.
7005         * doc/gcd.texi: Likewise.
7006         * doc/gnulib-tool.texi: Likewise.
7007         * doc/inet_ntoa.texi: Likewise.
7008         * doc/visibility.texi: Likewise.
7009
7010         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
7011         * doc/quote.texi: Add copyright notice.
7012
7013         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
7014         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
7015         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
7016         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
7017         is now obsolete, and give a pointer to the Sun list.
7018         Add copyright notice.
7019
7020 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
7021
7022         * config/srclistvars.sh: Add copyright notice.
7023
7024 2006-08-14  Eric Blake  <ebb9@byu.net>
7025
7026         Import the following change from libc:
7027
7028         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
7029
7030         Upstream bug 2997.
7031         * lib/misc/error.c: Add space between program name and message if file
7032         name is missing.
7033
7034 2006-08-12  Karl Berry  <karl@gnu.org>
7035
7036         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
7037         remove, these originate in gnulib now.
7038
7039 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7040
7041         * doc/Makefile (standards.info standards.html standards.dvi):
7042         Also depend on make-stds.texi.
7043
7044 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
7045
7046         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
7047         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
7048
7049         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
7050         in wchar_t.  Problem reported by Eric Blake.
7051
7052         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
7053         LEN is smaller than SIZE.  Suggested by Bruno Haible.
7054         Also, help the compiler to keep LEN in a register.
7055
7056 2006-08-11  Eric Blake  <ebb9@byu.net>
7057
7058         * users.txt: Sort.  Add tar.
7059
7060 2006-08-11  Bruno Haible  <bruno@clisp.org>
7061
7062         * users.txt: New file.
7063
7064 2006-08-11  Bruno Haible  <bruno@clisp.org>
7065
7066         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
7067         before <wchar.h>. Needed for OSF/1 and BSD/OS.
7068
7069 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
7070
7071         * modules/snprintf (Depends-on): Remove minmax.
7072         (Maintainer): Add self and Bruno.
7073
7074 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
7075
7076         * lib/.cppi-disable: Add snprintf.h, socket_.h.
7077         * lib/snprintf.c: Include <errno.h> and <limits.h>.
7078         (EOVERFLOW): Define if the system does not.
7079         Do not include "minmax.h"; it wasn't used.
7080         (snprintf): Don't assume size_t promotes to an unsigned type.
7081         Fix bug when generated string was too long for the buffer: the
7082         buffer's contents are supposed to be the initial prefix of the
7083         output.  Don't assume vasnprintf returns EOVERFLOW if the size
7084         exceeds INT_MAX; do the check ourselves.
7085
7086         Import the following changes from libc:
7087
7088         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
7089
7090         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
7091         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
7092         set wc to the byte which couldn't be converted.
7093         (re_string_reconstruct): Don't clear valid_raw_len before calling
7094         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
7095         tip_context using re_string_context_at.
7096
7097         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
7098
7099         * lib/posix/regex.h: g++ still cannot handled [restrict].
7100
7101         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
7102
7103         * lib/posix/regex.h: Remove special handling for VMS.
7104
7105 2006-08-10  Jim Meyering  <jim@meyering.net>
7106
7107         * modules/same-inode: New module.
7108         * modules/dev-ino: New module.
7109         * modules/cycle-check: Depend on these modules, rather than simply
7110         including their .h files.
7111         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
7112         required via m4/cycle-check.m4.
7113         * modules/same: Depend on new same-inode module, rather than
7114         including same-inode.h.
7115         * modules/chdir-safer: New file.
7116
7117         * modules/chown (Depends-on): Add stat-macros.
7118
7119 2006-08-10  Jim Meyering  <jim@meyering.net>
7120
7121         * m4/cycle-check.m4: New file.
7122         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
7123         * m4/dev-ino.m4, m4/same-inode.m4: New files.
7124
7125 2006-08-10  Eric Blake  <ebb9@byu.net>
7126
7127         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
7128         in from original proposal.
7129
7130 2006-08-10  Eric Blake  <ebb9@byu.net>
7131         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7132
7133         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
7134         namespace.
7135
7136 2006-08-10  Bruno Haible  <bruno@clisp.org>
7137
7138         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
7139         as well.
7140
7141 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
7142
7143         Sync from coreutils.
7144
7145         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
7146
7147         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
7148         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
7149
7150 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
7151
7152         * modules/restrict: Remove; no longer needed now that we assume
7153         Autoconf 2.59 or later.
7154         * MODULES.html.sh: Remove 'restrict'.
7155         * modules/argp (Depends-on): Remove 'restrict'.
7156         * modules/base64 (Depends-on): Likewise.
7157         * modules/gc (Depends-on): Likewise.
7158         * modules/getaddrinfo (Depends-on): Likewise.
7159         * modules/glob (Depends-on): Likewise.
7160         * modules/inet_ntop (Depends-on): Likewise.
7161         * modules/inet_pton (Depends-on): Likewise.
7162         * modules/memxor (Depends-on): Likewise.
7163         * modules/regex (Depends-on): Likewise.
7164         * modules/strtok_r (Depends-on): Likewise.
7165         * modules/time_r (Depends-on): Likewise.
7166
7167 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
7168
7169         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
7170         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
7171         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
7172         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
7173         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
7174         * m4/memxor.m4 (gl_MEMXOR): Likewise.
7175         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
7176         gl_C_RESTRICT replaced by AC_C_RESTRICT.
7177
7178         Merge from coreutils.
7179         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
7180         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
7181         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
7182         * m4/time_r.m4 (gl_TIME_R): Likewise.
7183
7184 2006-08-09  Karl Berry  <karl@gnu.org>
7185
7186         * config/srclist.txt: no more gettext-tools, per Bruno.
7187
7188 2006-08-08  Eric Blake  <ebb9@byu.net>
7189
7190         * modules/verror: New module.
7191         * MODULES.html.sh: Document it.
7192
7193 2006-08-08  Eric Blake  <ebb9@byu.net>
7194
7195         * lib/verror.h, lib/verror.c: New files.
7196
7197 2006-08-08  Eric Blake  <ebb9@byu.net>
7198
7199         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
7200         verror_at_line output complies with GNU Coding Standards even when
7201         file is NULL.
7202
7203 2006-08-07  Bruno Haible  <bruno@clisp.org>
7204
7205         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
7206         versions of AIX.
7207         Reported by Ralf Wildenhues.
7208
7209 2006-08-07  Bruno Haible  <bruno@clisp.org>
7210
7211         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
7212         in an AC_DEFUN. Needed so that the autoconf snippets can use
7213         AC_REQUIRE.
7214
7215 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7216
7217         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7218         Initialize pkgdata_DATA.
7219         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
7220         overriding it.
7221
7222 2006-08-06  Eric Blake  <ebb9@byu.net>
7223
7224         * lib/error.h: Fold in some upstream changes from glibc.
7225         * lib/error.c: Likewise.
7226
7227 2006-08-04  Bruno Haible  <bruno@clisp.org>
7228
7229         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7230         Make the mostlyclean-local rule depend on mostlyclean-generic.
7231         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
7232
7233 2006-07-31  Bruno Haible  <bruno@clisp.org>
7234
7235         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
7236         <stdlib.h>, <string.h>.
7237
7238 2006-07-30  Bruno Haible  <bruno@clisp.org>
7239
7240         * modules/readlink (License): Change to LGPL.
7241
7242 2006-07-30  Bruno Haible  <bruno@clisp.org>
7243
7244         * modules/javaversion (Makefile.am): Distribute javaversion.java and
7245         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
7246         set PKGDATADIR to point to it.
7247
7248 2006-07-30  Bruno Haible  <bruno@clisp.org>
7249
7250         * modules/csharpexec (configure.ac): Comment out macro invocation.
7251         * modules/javaexec (configure.ac): Likewise.
7252         * modules/javacomp-script (configure.ac): Likewise.
7253
7254         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
7255
7256 2006-07-30  Bruno Haible  <bruno@clisp.org>
7257
7258         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
7259         linked-list.
7260
7261 2006-07-30  Bruno Haible  <bruno@clisp.org>
7262
7263         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
7264
7265 2006-07-30  Bruno Haible  <bruno@clisp.org>
7266
7267         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7268         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
7269         get removed.
7270
7271 2006-07-29  Bruno Haible  <bruno@clisp.org>
7272
7273         Make it possible for gnulib-tool to work with locally modified or
7274         augmented gnulib repositories.
7275         * gnulib-tool (func_usage): Document --local-dir option.
7276         (local_gnulib_dir): New variable.
7277         Handle --local-dir option.
7278         (func_lookup_file): New function.
7279         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
7280         (func_get_description, func_get_filelist, func_get_description,
7281         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
7282         func_get_automake_snippet, func_get_include_directive,
7283         func_get_license, func_get_maintainer): Use func_lookup_file.
7284         (func_import, func_create_testdir): Use func_lookup_file.
7285
7286 2006-07-29  Bruno Haible  <bruno@clisp.org>
7287
7288         * modules/setenv (Depends-on): Add unistd.
7289
7290 2006-07-29  Bruno Haible  <bruno@clisp.org>
7291
7292         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
7293
7294 2006-07-29  Bruno Haible  <bruno@clisp.org>
7295
7296         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
7297
7298 2006-07-29  Bruno Haible  <bruno@clisp.org>
7299
7300         * gnulib-tool (import, update): If there is no Makefile.am, look at
7301         aclocal.m4, instead of bailing out.
7302
7303 2006-07-29  Bruno Haible  <bruno@clisp.org>
7304
7305         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
7306         Categorize the options by when they are useful.
7307
7308 2006-07-29  Bruno Haible  <bruno@clisp.org>
7309
7310         * gnulib-tool (func_usage): Document option --no-libtool.
7311         Handle option --no-libtool.
7312         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
7313         for changed semantics of $libtool variable.
7314         (func_import): Likewise. If libtool is not used, show this through
7315         an option --no-libtool.
7316         (func_create_testdir): Update.
7317
7318 2006-07-29  Bruno Haible  <bruno@clisp.org>
7319
7320         * gnulib-tool (func_import): Extend error message about missing
7321         --doc-base.
7322
7323 2006-07-29  Bruno Haible  <bruno@clisp.org>
7324
7325         * gnulib-tool (func_import): Don't create the $docbase directory if
7326         there is no file to store there.
7327
7328 2006-07-29  Bruno Haible  <bruno@clisp.org>
7329
7330         * gnulib-tool (autoconf_minversion): If a --dir option is given and
7331         relevant, look for configure.ac there, not in the current directory.
7332         Also use a simple search for AC_PREREQ, not "autoconf --trace".
7333
7334 2006-07-29  Bruno Haible  <bruno@clisp.org>
7335
7336         * gnulib-tool (SORT): New variable.
7337         (func_usage): Undocument --assume-autoconf option.
7338         Remove --assume-autoconf option handling.
7339         (autoconf_minversion): Determine from the contents of configure.ac.
7340         (func_import): Remove autoconf_minversion handling.
7341         Suggested by Eric Blake.
7342
7343 2006-07-29  Bruno Haible  <bruno@clisp.org>
7344
7345         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
7346
7347 2006-07-29  Bruno Haible  <bruno@clisp.org>
7348
7349         * config/srclist.txt (*setenv.[ch]): Remove rules.
7350
7351 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7352
7353         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
7354
7355 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7356
7357         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
7358         arpa/inet.h.
7359
7360 2006-07-28  Simon Josefsson  <jas@extundo.com>
7361
7362         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
7363         * modules/inet_pton (Depends-on): Likewise.
7364
7365 2006-07-28  Simon Josefsson  <jas@extundo.com>
7366
7367         * m4/netinet_in_h.m4: New file.
7368
7369 2006-07-28  Simon Josefsson  <jas@extundo.com>
7370
7371         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
7372         #include's.
7373
7374 2006-07-28  Simon Josefsson  <jas@extundo.com>
7375
7376         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
7377         #include's.
7378
7379 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
7380
7381         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
7382         setgid on directories only if they set these bits.
7383         * lib/modechange.h: Remove obsolete comment about masks.
7384
7385 2006-07-28  Eric Blake  <ebb9@byu.net>
7386
7387         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
7388         macro expansion.
7389
7390 2006-07-28  Bruno Haible  <bruno@clisp.org>
7391
7392         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
7393
7394 2006-07-28  Bruno Haible  <bruno@clisp.org>
7395
7396         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
7397
7398 2006-07-28  Bruno Haible  <bruno@clisp.org>
7399
7400         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
7401         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
7402         Define fallbacks.
7403         Avoids link error on FreeBSD 4.x.
7404         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
7405
7406         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
7407         encoding.
7408         * lib/mbswidth.c (iswcntrl): Likewise.
7409
7410 2006-07-27  Bruno Haible  <bruno@clisp.org>
7411
7412         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
7413         test.
7414
7415 2006-07-27  Bruno Haible  <bruno@clisp.org>
7416
7417         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
7418         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
7419         defined.
7420
7421 2006-07-26  Eric Blake  <ebb9@byu.net>
7422
7423         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
7424
7425 2006-07-26  Eric Blake  <ebb9@byu.net>
7426
7427         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
7428         like mingw that lack mkstemp.
7429         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
7430         avoid compilation warning on mingw.
7431
7432 2006-07-26  Bruno Haible  <bruno@clisp.org>
7433
7434         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
7435         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
7436         INT_FAST*_MIN, INTPTR_MIN.
7437
7438 2006-07-25  Bruno Haible  <bruno@clisp.org>
7439
7440         * modules/version-etc (Depends-on): Add stdarg.
7441
7442 2006-07-25  Bruno Haible  <bruno@clisp.org>
7443
7444         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
7445         complex commands.
7446
7447 2006-07-25  Bruno Haible  <bruno@clisp.org>
7448
7449         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
7450         defined in <stdarg.h> or config.h.
7451
7452 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
7453
7454         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
7455         (gl_STDIO_SAFER): Remove.
7456
7457 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
7458
7459         * MODULES.html.sh (File stream based Input/Output):
7460         Add fopen-safer, tmpfile-safer; remove stdio-safer.
7461         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
7462         * modules/fopen-safer, modules/tmpfile-safer: New files.
7463         * modules/stdio-safer: Remove.
7464
7465 2006-07-24  Bruno Haible  <bruno@clisp.org>
7466
7467         * modules/tmpdir: New file.
7468         * MODULES.html.sh (File system functions): Add it.
7469
7470 2006-07-24  Bruno Haible  <bruno@clisp.org>
7471
7472         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
7473         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
7474
7475 2006-07-24  Bruno Haible  <bruno@clisp.org>
7476
7477         * modules/clean-temp: New file.
7478
7479 2006-07-24  Bruno Haible  <bruno@clisp.org>
7480
7481         * m4/tmpdir.m4: New file, from GNU gettext.
7482
7483 2006-07-24  Bruno Haible  <bruno@clisp.org>
7484
7485         * lib/tmpdir.h: New file, from GNU gettext.
7486         * lib/tmpdir.c: New file, from GNU gettext.
7487
7488 2006-07-24  Bruno Haible  <bruno@clisp.org>
7489
7490         * lib/clean-temp.h: New file, from GNU gettext.
7491         * lib/clean-temp.c: New file, from GNU gettext.
7492
7493 2006-07-23  Eric Blake  <ebb9@byu.net>
7494
7495         * modules/stdio-safer (Files): Add tmpfile-safer.c.
7496         (Depends-on): Add binary-io.
7497
7498 2006-07-23  Eric Blake  <ebb9@byu.net>
7499
7500         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
7501
7502 2006-07-23  Eric Blake  <ebb9@byu.net>
7503
7504         * lib/tmpfile-safer.c: New file.
7505         * lib/stdio-safer.h (fopen_safer): Add prototype.
7506         * lib/stdio--.h (tmpfile): Make safer.
7507
7508 2006-07-23  Bruno Haible  <bruno@clisp.org>
7509
7510         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
7511         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
7512         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
7513         gl_linked_remove_at): Use it.
7514
7515 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7516         and Simon Josefsson <jas@extundo.com>
7517
7518         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
7519
7520         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
7521
7522 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
7523
7524         * modules/close-stream: New file.
7525         * modules/closeout (Description): Make it clear that it exits
7526         with a diagnostic on error.
7527         (Depends-on): Add close-stream.  Remove fpending, stdbool.
7528         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
7529
7530 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
7531
7532         * m4/close-stream.m4: New file.
7533
7534 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
7535
7536         * lib/close-stream.c, lib/close-stream.h: New files.
7537
7538 2006-07-22  Bruno Haible  <bruno@clisp.org>
7539
7540         Merge from GNU gettext 0.15.
7541
7542         2006-05-01  Bruno Haible  <bruno@clisp.org>
7543
7544                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
7545
7546         2006-07-22  Bruno Haible  <bruno@clisp.org>
7547
7548                 * modules/javaversion: New file.
7549                 * MODULES.html.sh (Java): Add javaversion.
7550
7551         2006-03-12  Bruno Haible  <bruno@clisp.org>
7552
7553                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
7554
7555         2005-12-04  Bruno Haible  <bruno@clisp.org>
7556
7557                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
7558                 (untested).
7559
7560         2006-06-21  Bruno Haible  <bruno@clisp.org>
7561
7562                 Avoid warnings from recent versions of mcs.
7563                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
7564                 -o, -L, -r any more. Use options documented since mcs-1.0
7565                 instead. Similarly for -g.
7566
7567         2005-12-04  Bruno Haible  <bruno@clisp.org>
7568
7569                 * build-aux/csharpcomp.sh.in: Suffix for resources is
7570                 .resources, not .resource.
7571
7572         2005-07-09  Bruno Haible  <bruno@clisp.org>
7573
7574                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
7575                 add a .dll suffix.
7576                 Reported by Mark Junker <mjscod@gmx.de>.
7577
7578         2006-07-22  Bruno Haible  <bruno@clisp.org>
7579
7580                 * modules/gettext: Upgrade to gettext-0.15.
7581                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
7582                 m4/visibility.m4.
7583                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
7584
7585 2006-07-22  Bruno Haible  <bruno@clisp.org>
7586
7587         Merge from GNU gettext 0.15.
7588
7589         2006-03-25  Bruno Haible  <bruno@clisp.org>
7590
7591                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
7592
7593         2006-07-21  Bruno Haible  <bruno@clisp.org>
7594
7595                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
7596                 "1.1".
7597
7598         2006-05-09  Bruno Haible  <bruno@clisp.org>
7599
7600                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
7601                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
7602                 for the conftestver execution.
7603
7604         2006-05-01  Bruno Haible  <bruno@clisp.org>
7605
7606                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
7607                 optional target-version argument. Verify that the compiler
7608                 groks source of the specified source-version, or add -source
7609                 option as necessary. Verify that the compiler produces
7610                 bytecode in the specified target-version, or add -target and
7611                 -source options as necessary. Make the result of the test
7612                 available as variable CONF_JAVAC. Also log error output in
7613                 config.log.
7614
7615         2006-03-11  Bruno Haible  <bruno@clisp.org>
7616
7617                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
7618
7619         2006-05-09  Bruno Haible  <bruno@clisp.org>
7620
7621                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
7622                 CLASSPATH_SEPARATOR to a semicolon.
7623
7624         2006-03-12  Bruno Haible  <bruno@clisp.org>
7625
7626                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
7627                 available as variable CONF_JAVA, for subsequent autoconf
7628                 tests. Also log error output in config.log.
7629
7630         2006-07-19  Bruno Haible  <bruno@clisp.org>
7631
7632                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
7633                 that getline works on glibc2 systems. Needed to avoid trouble
7634                 in relocatable.c.
7635                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
7636
7637         2005-12-04  Bruno Haible  <bruno@clisp.org>
7638
7639                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
7640                 launcher (untested).
7641
7642         2005-12-04  Bruno Haible  <bruno@clisp.org>
7643
7644                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
7645
7646         2006-07-22  Bruno Haible  <bruno@clisp.org>
7647
7648                 * gettext.m4: Update from GNU gettext-0.15.
7649                 * nls.m4: Likewise.
7650                 * po.m4: Likewise.
7651                 * inttypes-pri.m4: Likewise.
7652                 * inttypes-h.m4: Renamed from inttypes.m4.
7653                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
7654
7655 2006-07-22  Bruno Haible  <bruno@clisp.org>
7656
7657         Merge from GNU gettext 0.15.
7658
7659         2005-07-05  Bruno Haible  <bruno@clisp.org>
7660
7661                 * printf-args.c (printf_fetchargs): Work around broken
7662                 definition of wint_t on mingw.
7663
7664         2005-02-12  Bruno Haible  <bruno@clisp.org>
7665
7666                 * xallocsa.h: Add extern "C" for C++.
7667
7668         2006-05-17  Bruno Haible  <bruno@clisp.org>
7669
7670                 Cygwin portability.
7671                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
7672
7673         2006-04-30  Bruno Haible  <bruno@clisp.org>
7674
7675                 * progreloc.c: Include <mach-o/dyld.h> if available.
7676                 (find_executable): Use _NSGetExecutablePath when possible.
7677
7678         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
7679
7680                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
7681                 function.
7682
7683         2005-12-29  Bruno Haible  <bruno@clisp.org>
7684
7685                 * progreloc.c (set_program_name_and_installdir): Fix
7686                 compilation error.
7687
7688         2005-12-04  Bruno Haible  <bruno@clisp.org>
7689
7690                 Cygwin portability.
7691                 * progreloc.c: Include <windows.h> also on Cygwin.
7692                 (find_executable): Add support for Cygwin.
7693                 (set_program_name_and_installdir): Handle also platforms with
7694                 nonempty EXEEXT.
7695
7696         2006-07-11  Bruno Haible  <bruno@clisp.org>
7697
7698                 * javacomp.c: Fix a comment.
7699                 Reported by Jim Meyering.
7700
7701         2006-04-30  Bruno Haible  <bruno@clisp.org>
7702
7703                 * javacomp.h (compile_java_class): Add source_version,
7704                 target_version arguments.
7705                 * javacomp.c: Rewritten to choose only a compiler that
7706                 respects the specified source_version and target_version.
7707
7708         2006-06-27  Bruno Haible  <bruno@clisp.org>
7709
7710                 Assume correct S_ISDIR macro.
7711                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
7712
7713         2006-07-22  Bruno Haible  <bruno@clisp.org>
7714
7715                 * javaversion.h: New file, from GNU gettext.
7716                 * javaversion.c: New file, from GNU gettext.
7717                 * javaversion.java: New file, from GNU gettext.
7718                 * javaversion.class: New file, from GNU gettext.
7719
7720         2006-05-17  Bruno Haible  <bruno@clisp.org>
7721
7722                 Cygwin portability.
7723                 * javaexec.c (execute_java_class): Test for jview program
7724                 also on Cygwin.
7725
7726         2006-04-09  Bruno Haible  <bruno@clisp.org>
7727
7728                 * fatal-signal.c: Don't include string.h.
7729                 (at_fatal_signal): Use a copying loop instead of memcpy.
7730
7731         2005-12-04  Bruno Haible  <bruno@clisp.org>
7732
7733                 * csharpexec.c: Add support for 'clix' launcher (untested).
7734                 (execute_csharp_using_sscli): New function.
7735                 (execute_csharp_program): Call it.
7736
7737         2006-06-21  Bruno Haible  <bruno@clisp.org>
7738
7739                 Avoid warnings from recent versions of mcs.
7740                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
7741                 -o, -L, -r any more. Use options documented since mcs-1.0
7742                 instead. Similarly for -g.
7743
7744         2005-07-09  Bruno Haible  <bruno@clisp.org>
7745
7746                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
7747                 add a .dll suffix.
7748                 Reported by Mark Junker <mjscod@gmx.de>.
7749
7750         2006-06-17  Bruno Haible  <bruno@clisp.org>
7751
7752                 * config.charset: Update for NetBSD 3.0.
7753
7754         2006-05-17  Bruno Haible  <bruno@clisp.org>
7755
7756                 Cygwin portability.
7757                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
7758
7759         2006-05-16  Bruno Haible  <bruno@clisp.org>
7760
7761                 * localcharset.c [CYGWIN]: Include <windows.h>.
7762                 (get_charset_aliases): For Cygwin, return the same CPxxx
7763                 aliases list as under WIN32.
7764                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
7765                 the environment variables. Fall back to GetACP().
7766
7767         2006-04-05  Bruno Haible  <bruno@clisp.org>
7768
7769                 * config.charset: Update Juan Manuel Guerrero's address.
7770
7771         2005-02-12  Bruno Haible  <bruno@clisp.org>
7772
7773                 * allocsa.h: Add extern "C" for C++.
7774
7775         2005-02-10  Bruno Haible  <bruno@clisp.org>
7776
7777                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
7778                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
7779
7780         2006-07-22  Bruno Haible  <bruno@clisp.org>
7781
7782                 * gettext.h: Update to GNU gettext-0.15.
7783
7784 2006-07-22  Bruno Haible  <bruno@clisp.org>
7785
7786         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
7787         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
7788         lib-prefix.m4, longdouble.m4, ssize_t.m4.
7789
7790 2006-07-21  Eric Blake  <ebb9@byu.net>
7791
7792         * modules/stdlib-safer: New file.
7793         * MODULES.html.sh (File stream based Input/Output): Add
7794         stdlib-safer.
7795
7796 2006-07-21  Eric Blake  <ebb9@byu.net>
7797
7798         * lib/stdlib-safer.h: New file from coreutils, required by
7799         stdlib--.h.
7800
7801 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
7802
7803         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
7804
7805 2006-07-20  Bruno Haible  <bruno@clisp.org>
7806
7807         * gnulib-tool: Recognize new option --assume-autoconf.
7808         (autoconf_minversion): New variable.
7809         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
7810
7811 2006-07-20  Bruno Haible  <bruno@clisp.org>
7812
7813         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
7814
7815 2006-07-19  Derek R. Price  <derek@ximbiot.com>
7816
7817         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
7818         Reindent and repaginate.
7819
7820 2006-07-19  Derek Price  <derek@ximbiot.com>
7821
7822         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
7823         Correct grammar.
7824
7825 2006-07-17  Bruno Haible  <bruno@clisp.org>
7826
7827         * modules/list: New file.
7828         * modules/array-list: New file.
7829         * modules/carray-list, modules/carray-list-tests: New files.
7830         * modules/linked-list, modules/linked-list-tests: New files.
7831         * modules/avltree-list, modules/avltree-list-tests: New files.
7832         * modules/rbtree-list, modules/rbtree-list-tests: New files.
7833         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
7834         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
7835         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
7836         * modules/oset: New file.
7837         * modules/array-oset: New file.
7838         * modules/avltree-oset, modules/avltree-oset-tests: New files.
7839         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
7840         * tests/test-carray_list.c: New file.
7841         * tests/test-linked_list.c: New file.
7842         * tests/test-avltree_list.c: New file.
7843         * tests/test-rbtree_list.c: New file.
7844         * tests/test-linkedhash_list.c: New file.
7845         * tests/test-avltreehash_list.c: New file.
7846         * tests/test-rbtreehash_list.c: New file.
7847         * tests/test-avltree_oset.c: New file.
7848         * tests/test-rbtree_oset.c: New file.
7849         * MODULES.html.sh (Container data structures): New section.
7850
7851 2006-07-17  Bruno Haible  <bruno@clisp.org>
7852
7853         * m4/gl_list.m4: New file.
7854
7855 2006-07-17  Bruno Haible  <bruno@clisp.org>
7856
7857         * lib/gl_list.h: New file.
7858         * lib/gl_list.c: New file.
7859         * lib/gl_array_list.h: New file.
7860         * lib/gl_array_list.c: New file.
7861         * lib/gl_carray_list.h: New file.
7862         * lib/gl_carray_list.c: New file.
7863         * lib/gl_linked_list.h: New file.
7864         * lib/gl_linked_list.c: New file.
7865         * lib/gl_anylinked_list1.h: New file.
7866         * lib/gl_anylinked_list2.h: New file.
7867         * lib/gl_avltree_list.h: New file.
7868         * lib/gl_avltree_list.c: New file.
7869         * lib/gl_anyavltree_list1.h: New file.
7870         * lib/gl_anyavltree_list2.h: New file.
7871         * lib/gl_rbtree_list.h: New file.
7872         * lib/gl_rbtree_list.c: New file.
7873         * lib/gl_anyrbtree_list1.h: New file.
7874         * lib/gl_anyrbtree_list2.h: New file.
7875         * lib/gl_anytree_list1.h: New file.
7876         * lib/gl_anytree_list2.h: New file.
7877         * lib/gl_linkedhash_list.h: New file.
7878         * lib/gl_linkedhash_list.c: New file.
7879         * lib/gl_anyhash_list1.h: New file.
7880         * lib/gl_anyhash_list2.h: New file.
7881         * lib/gl_avltreehash_list.h: New file.
7882         * lib/gl_avltreehash_list.c: New file.
7883         * lib/gl_rbtreehash_list.h: New file.
7884         * lib/gl_rbtreehash_list.c: New file.
7885         * lib/gl_anytreehash_list1.h: New file.
7886         * lib/gl_anytreehash_list2.h: New file.
7887
7888         * lib/gl_oset.h: New file.
7889         * lib/gl_oset.c: New file.
7890         * lib/gl_array_oset.h: New file.
7891         * lib/gl_array_oset.c: New file.
7892         * lib/gl_avltree_oset.h: New file.
7893         * lib/gl_avltree_oset.c: New file.
7894         * lib/gl_rbtree_oset.h: New file.
7895         * lib/gl_rbtree_oset.c: New file.
7896         * lib/gl_anytree_oset.h: New file.
7897
7898 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7899
7900         * m4/mkancesdirs.m4: New file.
7901         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
7902         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
7903         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
7904         it.
7905
7906 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7907
7908         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
7909         * lib/mkancesdirs.h: New files.
7910         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
7911         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
7912         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
7913         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
7914         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
7915         callers changed.  Revamp internals significantly, by not
7916         attempting to create directories that are temporarily more
7917         permissive than the final results.  Do not attempt to use
7918         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
7919         This removes some race conditions, fixes some bugs, and simplifies
7920         things.  Use new dirchownmod function to do owner and mode changes.
7921         * lib/mkdir-p.h: Likewise.
7922         * lib/modechange.c (octal_to_mode): New function.
7923         (struct mode_change): New member mentioned.
7924         (make_node_op_equals): New arg mentioned.  All callers changed.
7925         (mode_compile): Keep track of which mode bits the user has explicitly
7926         mentioned.
7927         (mode_adjust): New arg DIR, so that we implement the X op correctly.
7928         New arg PMODE_BITS, to keep track of which mode bits the user
7929         mentioned; it treats S_ISUID and S_ISGID speciall.
7930         All callers changed.
7931         * lib/modechange.h: Likewise.
7932
7933 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7934
7935         * MODULES.html.sh: Add mkancestors.
7936         * modules/mkancesdirs: New module.
7937         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
7938         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
7939         The chdir-safer and afs files are now orphans; I'll remove them
7940         unless someone speaks up.
7941         Add lib/dirchownmod.c, lib/dirchownmod.h.
7942         (Depends-on): Remove alloca, chown, save-cwd, dirname.
7943         Add lchown, mkancesdirs.
7944         (Maintainer): Add self.
7945
7946 2006-07-15  Karl Berry  <karl@gnu.org>
7947
7948         * gnulib-tool: help message wording/arrangement.
7949
7950 2006-07-14  Simon Josefsson  <jas@extundo.com>
7951
7952         * doc/gnulib.texi (Libtool and Windows): New section.
7953
7954 2006-07-12  Simon Josefsson  <jas@extundo.com>
7955
7956         * modules/gendocs (License): Fix license, approved by Karl.
7957
7958 2006-07-12  Eric Blake  <ebb9@byu.net>
7959
7960         * MODULES.html.sh: Add gendocs.
7961
7962 2006-07-11  Eric Blake  <ebb9@byu.net>
7963
7964         * modules/fdl: New module, to install doc/fdl.texi.
7965         * MODULES.html.sh: Add new section for documentation modules.
7966         * gnulib-tool: Avoid space-tab.
7967         (--doc-base): New option, to manage files from doc.
7968
7969 2006-07-11  Eric Blake  <ebb9@byu.net>
7970
7971         * m4/absolute-header.m4: Fix comments to match recent change.
7972
7973 2006-07-11  Eric Blake  <ebb9@byu.net>
7974
7975         * gnulib-tool: List --doc-base before --tests-base.
7976
7977 2006-07-11  Derek R. Price  <derek@ximbiot.com>
7978
7979         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
7980
7981 2006-07-11  Bruno Haible  <bruno@clisp.org>
7982
7983         * README: Mention where to put documentation.
7984
7985 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7986
7987         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
7988
7989 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
7990
7991         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
7992         to stdint.m4.
7993
7994 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
7995
7996         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
7997         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
7998         "no/such/file/stdint.h" when there is no such file, so that
7999         the resulting C code can be parsed by dodgy compilers.
8000         Problems reported by Bob Proulx.
8001
8002 2006-07-10  Derek R. Price  <derek@ximbiot.com>
8003
8004         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
8005         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
8006         macros into the GNU _D_EXACT_NAMLEN.
8007         * lib/savedir.c:  Likewise.
8008         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
8009
8010 2006-07-10  Derek R. Price  <derek@ximbiot.com>
8011         and Paul Eggert  <eggert@cs.ucla.edu>
8012
8013         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
8014         * m4/savedir.m4:
8015         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
8016         macros into the GNU _D_EXACT_NAMLEN.
8017
8018 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
8019
8020         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
8021         around the absolute name, to work around a problem with the HP-UX
8022         11.23 native C compiler, reported by Bob Proulx.
8023
8024 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
8025
8026         * doc/maintain.texi, make-stds.texi: Sync from
8027         <http://savannah.gnu.org/projects/gnustandards>.
8028
8029 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
8030
8031         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
8032
8033 2006-07-09  Jim Meyering  <jim@meyering.net>
8034
8035         * m4/glob.m4: Remove a doubled word in a comment.
8036
8037 2006-07-09  Jim Meyering  <jim@meyering.net>
8038
8039         * lib/argp-pv.c: Remove a doubled word in a comment.
8040         * lib/check-version.c (check_version): Likewise.
8041         * lib/javacomp.c (compile_java_class): Likewise.
8042
8043 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
8044
8045         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
8046         for the benefit of people using Autoconf 2.60.  If you want to
8047         support older Autoconf versions you can copy m4/onceonly_2_57.m4
8048         (or m4/onceonly.m4, if pre-2.57) manually.
8049
8050 2006-07-08  Jim Meyering  <jim@meyering.net>
8051
8052         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
8053         comment.
8054         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
8055         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
8056         comment.
8057
8058 2006-07-08  Jim Meyering  <jim@meyering.net>
8059
8060         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
8061
8062 2006-07-07  Simon Josefsson  <jas@extundo.com>
8063
8064         * tests/test-crc.c: Change expected crc value, the test vector
8065         were probably computed using the old broken crc.c?
8066
8067 2006-07-06  Simon Josefsson  <jas@extundo.com>
8068
8069         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
8070         now the canonical place for the M4 file).
8071
8072         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
8073         from the sys_socket dependency now.
8074
8075         * modules/inet_pton (Files): Ditto.
8076
8077         * modules/inet_ntop (Files): Ditto.
8078
8079 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
8080
8081         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
8082         not gl_PREREQ_GETUSERSHELL.
8083
8084 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8085
8086         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
8087         with only one argument, for Autoconf 2.60.
8088         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
8089         expand to nothing, so add a shell command to avoid syntax error.
8090         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
8091
8092 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8093
8094         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
8095
8096 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
8097
8098         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
8099         no longer needed.  Check for isblank decl.
8100         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
8101         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
8102         of existence.
8103
8104 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
8105
8106         * lib/getloadavg.c: Use __VMS, not VMS.
8107         * lib/getopt.c: Likewise.
8108         * lib/getpagesize.h: Likewise.
8109         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
8110         and probably does not work.
8111
8112 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
8113
8114         * lib/.cppi-disable: Add wcwidth.
8115         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
8116         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
8117         (ISGRAPH): Remove.  All uses changed to isgraph.
8118         (FOLD) [!defined _LIBC]: Remove special case.
8119         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
8120         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
8121         HAVE_ISBLANK.
8122         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
8123         case.
8124
8125 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
8126
8127         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
8128         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
8129         brackets.  Other minor changes to suppress some compiler
8130         warnings.
8131
8132 2006-07-06  Derek R. Price  <derek@ximbiot.com>
8133         and Paul Eggert  <eggert@cs.ucla.edu>
8134
8135         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
8136         of invoking obsolescent AC_HEADER_DIRENT macro.
8137         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
8138         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
8139         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
8140         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
8141         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
8142         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
8143         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
8144         * m4/readdir.m4: Remove; no longer needed.
8145
8146 2006-07-06  Derek R. Price  <derek@ximbiot.com>
8147         and Paul Eggert  <eggert@cs.ucla.edu>
8148
8149         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
8150         Don't worry about this obsolete case any more.
8151         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
8152         directories.
8153         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
8154         worry about this obsolete case any more.
8155         * lib/fts.c: Likewise.
8156         * lib/getcwd.c: Likewise.
8157         * lib/glob.h: Likewise.
8158         * lib/savedir.c: Likewise.
8159
8160 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
8161
8162         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
8163         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
8164         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
8165         needed.
8166         All uses removed.
8167         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
8168         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
8169         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
8170         needed.
8171         * m4/getdate.m4 (gl_GETDATE): Likewise.
8172         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
8173         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
8174         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
8175         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
8176         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
8177         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
8178         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
8179         needed.
8180
8181 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
8182
8183         * lib/memcasecmp.c: Include <limits.h>.
8184         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
8185         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
8186         Don't assume isdigit succeeds only on '0' through '9'.
8187
8188 2006-07-05  Eric Blake  <ebb9@byu.net>
8189
8190         * modules/getaddrinfo (Depends-on): Add snprintf.
8191
8192 2006-07-05  Eric Blake  <ebb9@byu.net>
8193
8194         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
8195         to avoid 'header present but could not be compiled' on cygwin.
8196
8197 2006-07-05  Eric Blake  <ebb9@byu.net>
8198
8199         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
8200         missing from netdb.h.
8201         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
8202
8203 2006-07-05  Derek R. Price  <derek@ximbiot.com>
8204
8205         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
8206         no longer needed.
8207         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
8208         * m4/getdate.m4 (gl_GETDATE): Likewise.
8209         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
8210         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
8211         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
8212         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
8213         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
8214
8215 2006-07-05  Derek R. Price  <derek@ximbiot.com>
8216
8217         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
8218         All uses of is_space replaced by isspace.
8219         * lib/exit.h: Don't talk about STDC_HEADERS.
8220         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
8221         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
8222         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
8223         replaced by isprint etc.
8224         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
8225         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
8226         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
8227         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
8228         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
8229         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
8230
8231 2006-07-05  Bruno Haible  <bruno@clisp.org>
8232
8233         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
8234         the function exists, before testing against AIX.
8235         Reported by Martin Lambers <marlam@marlam.de>.
8236
8237 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
8238
8239         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
8240         From Mark D. Baushke.
8241
8242 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
8243
8244         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
8245         to the absolute name, not just one, to bypass Sun C 5.8's
8246         "warning: #include of /usr/include/... may be non-portable".
8247
8248 2006-07-04  Eric Blake  <ebb9@byu.net>
8249
8250         * modules/dirname-tests: New test module.
8251         * tests/test-dirname.c: New file, replacing dirname.c
8252         TEST_DIRNAME section that was recently deleted.
8253
8254 2006-07-04  Bruno Haible  <bruno@clisp.org>
8255
8256         Assume ANSI C header files and <ctype.h> functions.
8257         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
8258         (mbsnwidth): Use isprint, iscntrl instead.
8259
8260 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8261
8262         Merge from coreutils.
8263         * MODULES.html.sh: Add xstrtold.
8264         * modules/xstrtold: New file.
8265         * modules/cycle-check (Files): Add lib/same-inode.h.
8266         * modules/dirname (Files): Add m4/double-slash-root.m4.
8267         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
8268         * modules/mkdir-p (Files): Add lib/same-inode.h.
8269         * modules/same (Files): Add lib/same-inode.h.
8270
8271 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8272
8273         * m4/absolute-header.m4: Renamed from full-header-path.m4.
8274         This is to keep the terminology clean; POSIX talks about
8275         "absolute pathnames", not "full pathnames", but the GNU
8276         Coding Standards say to use "path" for something else;
8277         so use "absolute" to keep both sides happy.
8278         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
8279         Set gl_absolute_header, not gl_full_header_path.
8280         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
8281         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
8282         All uses changed.
8283
8284         Merge from coreutils.
8285
8286         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
8287
8288         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
8289         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
8290         want to require the building of c-strtod.o.
8291         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
8292         needs -lm directly.
8293         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
8294
8295         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
8296
8297         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
8298         --as-needed option if available.  Problem reported by Albert Chin in
8299         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
8300         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
8301         cc merely issues a bunch of annoying warnings for --as-needed
8302         (this problem was reported by Bob Proulx).  Also, try linking with
8303         -lm to detect a bug in binutils 2.16 (this problem was reported
8304         by Ralf Wildenhues).
8305
8306         2006-06-18  Jim Meyering  <jim@meyering.net>
8307
8308         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
8309         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
8310         macro.
8311         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
8312         also check for glibc-2.4's abort-inducing bug.
8313
8314         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
8315         Low-probability clean-up should be to use rmdir to get rid of
8316         the just-created directory, not unlink.
8317
8318         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
8319         configure fail, and request a bug report to inform us about it.
8320         Add a comment that, barring reports to the contrary, in 2007 we'll
8321         assume ftruncate is universally available.
8322
8323         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
8324
8325         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
8326
8327         2006-03-12  Jim Meyering  <jim@meyering.net>
8328
8329         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
8330         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
8331         * m4/same.m4 (gl_SAME): Likewise.
8332         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
8333
8334         2006-03-11  Eric Blake  <ebb9@byu.net>
8335
8336         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
8337         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
8338         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
8339         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
8340
8341 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8342
8343         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
8344         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
8345         reported by Mark D. Baushke, one in
8346         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
8347
8348         Merge from coreutils.
8349
8350         * lib/.cppi-disable: Add stdint_.h.
8351         * lib/.cvsignore: Add stdint.h.
8352
8353         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
8354
8355         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
8356         both double and long double versions.
8357         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
8358         * lib/xstrtold.c: New file.
8359         * lib/xstrtod.h (xstrtold): New decl.
8360
8361         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
8362
8363         * lib/filemode.c (setst): Remove.
8364         (strmode): Rewrite to avoid setst.  This makes the code shorter,
8365         (arguably) clearer, and the generated code is a bit smaller on my
8366         Debian GNU/Linux stable x86 host.
8367
8368         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
8369
8370         * lib/filemode.c: Include "filemode.h" first, to test the interface.
8371         Assume that filemode.h includes sys/types.h and sys/stat.h.
8372         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
8373         (ftypelet): Reorder to put common cases first, for efficiency.
8374         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
8375         to do 'M'.
8376         (strmode): Renamed from mode_string, and now stores 12 bytes instead
8377         of 10, for compatibility with FreeBSD.  All callers changed.
8378         (filemodestring): Now stores 12 bytes instead of 10, and sets file
8379         types that can't be deduced solely from st_mode.  First arg is now a
8380         const pointer.
8381         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
8382         (strmode): Renamed from mode_string.
8383         (filemodestring): New decl.
8384         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
8385         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
8386         needed.
8387         (S_ISPORT, S_ISWHT): New macros, if not already defined.
8388
8389         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
8390
8391         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
8392         fsusage.h now does that.  Include fsusage.h first, to test interface.
8393         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
8394         at most one method (the old code could have generated decls that
8395         didn't conform to C89, not that this was ever exercised).
8396         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
8397
8398         2006-03-19  Jim Meyering  <jim@meyering.net>
8399
8400         Work even in a chroot where d_ino values for entries in "/"
8401         don't match the stat.st_ino values for the same names.
8402         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
8403         number, iterate through all entries again, using lstat instead.
8404         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
8405         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
8406
8407         * lib/getcwd.c (__getcwd): Clarify a comment.
8408         Use memcpy in place of a call to strcpy.
8409
8410         2006-03-12  Jim Meyering  <jim@meyering.net>
8411
8412         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
8413         matches that of the current directory (which we're about to chdir ".."
8414         out of), then save the dev-ino of the parent, instead.
8415
8416         * lib/same-inode.h (SAME_INODE): New file/macro.
8417         * lib/chdir-safer.c (SAME_INODE): Remove definition.
8418         Include "same-inode.h", instead.
8419         * lib/same.c: Likewise.
8420         * lib/cycle-check.h: Include "same-inode.h".
8421         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
8422         * lib/cycle-check.c (SAME_INODE): Remove definition.
8423         * lib/root-dev-ino.h: Include "same-inode.h".
8424
8425         2006-03-11  Eric Blake  <ebb9@byu.net>
8426
8427         * lib/same.c (same_name): s/base_name/last_component/
8428         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
8429         * lib/filenamecat.c (file_name_concat): Likewise.
8430
8431         2006-03-11  Eric Blake  <ebb9@byu.net>,
8432                     Paul Eggert  <eggert@cs.ucla.edu>
8433
8434         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
8435         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
8436         drive prefix.
8437         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
8438         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
8439         (last_component): New method.
8440         * lib/dirname.c (dir_len): Determine when drive letters need a
8441         subsequent slash.  Preserve // when it is special.
8442         (dir_name): Don't append dot when drive letter is absolute.
8443         [TEST_DIRNAME]: Move into a full-blown gnulib test.
8444         * lib/basename.c (base_name): New semantics - malloc the result.
8445         Preserve // when it is special.  Preserve relative files that look
8446         like drive letters.
8447         (base_len): Preserve // when it is special.
8448         (last_component): New method, similar to old base_name semantics.
8449         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
8450         base_name.  Strip redundant slashes from ///.
8451
8452 2006-07-03  Jim Meyering  <jim@meyering.net>
8453
8454         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
8455         macro is used before the first cycle_check call.
8456
8457 2006-07-03  Eric Blake  <ebb9@byu.net>
8458
8459         * modules/dirname (Depends-on): Add xstrndup.
8460
8461 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
8462
8463         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
8464         test cases, so that config.log is a bit easier to follow.
8465
8466 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
8467
8468         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
8469         both are 64 bits, since this seems to be the tradition, and this
8470         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
8471         we ever run into a host that prefers long long to long in this
8472         case, we'll need another configure-time test.  Problem reported by
8473         Jim Meyering.
8474
8475 2006-07-02  Eric Blake  <ebb9@byu.net>
8476
8477         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
8478
8479 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
8480
8481         * modules/inttypes (Depends-on): No longer depends on stdint.
8482         * modules/stdint (Description): Say more about assumptions.
8483         Say that the fast types might differ.  Say macros are used.
8484         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
8485         (Makefile.am): Revise list of substituted symbols to match
8486         new stdint.m4.
8487         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
8488         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
8489         * tests/test-stdint.c (verify_same_types)
8490         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
8491         the code conforms to C99/C89.
8492         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
8493         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
8494
8495 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
8496
8497         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
8498         but fix a bug, by requiring at least 64 bits.
8499         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
8500         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
8501         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
8502         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
8503
8504         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
8505         changes.  Make 2.59 a prerequisite.  Check and substitute for
8506         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
8507         inttypes.h.  Do not use special include files; just use the
8508         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
8509         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
8510         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
8511         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
8512         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
8513         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
8514         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
8515         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
8516         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
8517         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
8518         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
8519         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
8520         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
8521         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
8522         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
8523         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
8524         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
8525         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
8526         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
8527         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
8528         WINT_MAX.  Check for C99 conformance more strictly, by detecting
8529         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
8530         not check for things that C99 does not require, e.g., int8_t.  If
8531         a test isn't needed unless <stdint.h> isn't working, and is
8532         unlikely to be needed for any other reason, then don't do it
8533         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
8534         size_t, since we assume C89 freestanding at least.  Do not check
8535         for sig_atomic_t, wchar_t, or wint_t, since the code now does
8536         the right thing even if the types are not defined.  Instead use:
8537         (gl_STDINT_TYPE_PROPERTIES): New macro.
8538         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
8539         testing whether <sys/types.h> clashes, as Autoconf does this for
8540         us now.  All uses removed.
8541         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
8542         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
8543         (gl_CHECK_TYPE_SAME):
8544         Remove; no longer needed.
8545         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
8546         exists, since we'll return 0 anyway in that case.
8547         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
8548
8549 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
8550
8551         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
8552         possible collision with system files.
8553         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
8554         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
8555         WCHAR_MIN and WCHAR_MAX in this case.
8556         (<stddef.h>): Do not include; no longer needed.
8557         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
8558         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
8559         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
8560         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
8561         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
8562         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
8563         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
8564         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
8565         !defined(__c99))]: Include in this case too, since it's harmless
8566         now.
8567         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
8568         dangerous to do so.
8569         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
8570         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
8571         (_STDINT_MIN, _STDINT_MAX): New macros.
8572         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
8573         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
8574         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
8575         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
8576         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
8577         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
8578         macros, not typedefs; this simplifies things quite a bit.
8579         Use long int for all types narrower than int64_t.
8580         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
8581         Define in terms of long long int or int64_t or long int,
8582         not int64_t or int32_t.  This saves some compile-time testing.
8583         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
8584         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
8585         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
8586         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
8587         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
8588         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
8589         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
8590         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
8591         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
8592         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
8593         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
8594         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
8595         undef any previous version and define our own version, for
8596         simplicity and consistency with the new macros for types.
8597         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
8598         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
8599         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
8600         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
8601         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
8602         @WINT_T_SUFFIX@ to keep things simple here.
8603         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
8604         Simplify by assuming typical 8/16/32/64 host, since we're
8605         already doing that elsewhere anyway.
8606         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
8607         and assume long long int is 64 bits if available.  This
8608         speeds up 'configure'.
8609
8610 2006-07-01  Eric Blake  <ebb9@byu.net>
8611
8612         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
8613         Reported by Andreas Buening.
8614
8615 2006-07-01  Eric Blake  <ebb9@byu.net>
8616
8617         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
8618
8619 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
8620
8621         * lib/getaddrinfo.c: fixed typo
8622
8623 2006-06-29  Jim Meyering  <jim@meyering.net>
8624
8625         * modules/strftime (Maintainer): Add my name, since with the
8626         FPRINTFTIME changes strftime.c has forked from glibc.
8627
8628 2006-06-29  Eric Blake  <ebb9@byu.net>
8629
8630         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
8631
8632 2006-06-29  Eric Blake  <ebb9@byu.net>
8633
8634         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
8635
8636 2006-06-29  Eric Blake  <ebb9@byu.net>
8637
8638         * lib/stat_.h: New file.
8639
8640 2006-06-29  Eric Blake  <ebb9@byu.net>
8641
8642         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
8643         unused static function.
8644
8645 2006-06-29  Eric Blake  <ebb9@byu.net>
8646
8647         * doc/functions.texi (Function Portability): Document missing lstat
8648         on mingw.
8649
8650 2006-06-29  Eric Blake  <ebb9@byu.net>
8651
8652         * MODULES.html.sh: Add sys_stat.
8653         * modules/sys_stat: New module.
8654         * modules/mkstemp (Depends-on): Add sys_stat.
8655
8656 2006-06-29  Derek R. Price  <derek@ximbiot.com>
8657
8658         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
8659
8660 2006-06-29  Derek R. Price  <derek@ximbiot.com>
8661
8662         * m4/c-bs-a.m4: Removed.
8663
8664 2006-06-29  Derek R. Price  <derek@ximbiot.com>
8665
8666         * lib/strftime.c: Assume strftime() exists.
8667
8668 2006-06-29  Derek Price  <derek@ximbiot.com>
8669
8670         * modules/c-bs-a: Removed - \a is C89.
8671         * MODULES.html.sh: Remove c-bs-a.
8672
8673 2006-06-29  Bruno Haible  <bruno@clisp.org>
8674
8675         * modules/wcwidth (License): Change to LGPL.
8676
8677 2006-06-28  Simon Josefsson  <jas@extundo.com>
8678
8679         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
8680         on _WIN32.
8681
8682         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
8683         getnameinfo.
8684
8685 2006-06-28  Simon Josefsson  <jas@extundo.com>
8686
8687         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
8688
8689 2006-06-28  Simon Josefsson  <jas@extundo.com>
8690
8691         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
8692         functions there.  It will succeed on Windows XP, but on Windows
8693         2000 and (presumably) earlier, it will fail, and use the internal
8694         re-implementation.
8695         (use_win32_p): New function.
8696         (getaddrinfo): Use strtoul on servname, to support numeric ports.
8697         Support AI_NUMERICSERV to disable getservbyname.
8698         (getnameinfo): New function, only supports
8699         NI_NUMERICHOST|NI_NUMERICSERV for now.
8700
8701         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
8702         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
8703         getnameinfo.
8704
8705 2006-06-28  Eric Blake  <ebb9@byu.net>
8706
8707         * modules/wcwidth: New file.
8708         * modules/mbchar (Depends-on): Add wcwidth.
8709         * modules/mbswidth (Depends-on): Add wcwidth.
8710         * MODULES.html.sh: Add wcwidth.
8711
8712 2006-06-28  Eric Blake  <ebb9@byu.net>
8713
8714         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
8715         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
8716
8717 2006-06-28  Eric Blake  <ebb9@byu.net>
8718
8719         * lib/xvasprintf.h: Fix comments.
8720
8721 2006-06-28  Eric Blake  <ebb9@byu.net>
8722
8723         * lib/mbchar.h (wcwidth): Include wcwidth.h.
8724         * lib/mbswidth.c (wcwidth): Move from here...
8725         * lib/wcwidth.h: ...to this new file.
8726
8727 2006-06-28  Derek R. Price  <derek@ximbiot.com>
8728
8729         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
8730
8731         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
8732         it's obsolete.
8733         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
8734
8735 2006-06-28  Derek R. Price  <derek@ximbiot.com>
8736
8737         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
8738         Autoconf 2.60 says this stuff was obsolete.
8739
8740 2006-06-28  Bruno Haible  <bruno@clisp.org>
8741
8742         * modules/wcwidth (Files): Add m4/wchar_t.m4.
8743
8744 2006-06-28  Bruno Haible  <bruno@clisp.org>
8745
8746         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
8747         gt_TYPE_WCHAR_T.
8748
8749 2006-06-28  Bruno Haible  <bruno@clisp.org>
8750
8751         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
8752         declaration for wcwidth.
8753         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
8754
8755 2006-06-28  Bruno Haible  <bruno@clisp.org>
8756
8757         * lib/mkdtemp.c [MINGW]: Include <io.h>.
8758         (mkdir): Define using _mkdir.
8759
8760 2006-06-28  Bruno Haible  <bruno@clisp.org>
8761
8762         * lib/getaddrinfo.h: Fix POSIX URL.
8763         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
8764         _WIN32.
8765         (use_win32_p): Make static.
8766         (getaddrinfo): Reject service name if it is empty or does not consist
8767         solely of decimal digits, or if its value is > 65535.
8768         (getnameinfo): Remove useless casts.
8769
8770 2006-06-27  Simon Josefsson  <jas@extundo.com>
8771
8772         * modules/sys_select: New file, suggested by Bruno Haible, Paul
8773         Eggert and Martin Lambers.
8774
8775 2006-06-27  Simon Josefsson  <jas@extundo.com>
8776
8777         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
8778         Eggert and Martin Lambers.
8779
8780 2006-06-27  Bruno Haible  <bruno@clisp.org>
8781
8782         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
8783         result to 0, not to empty.
8784         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
8785
8786 2006-06-27  Bruno Haible  <bruno@clisp.org>
8787
8788         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
8789
8790 2006-06-26  Simon Josefsson  <jas@extundo.com>
8791
8792         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
8793         present.
8794
8795 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
8796
8797         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
8798         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
8799         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
8800
8801 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
8802
8803         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
8804
8805 2006-06-26  Bruno Haible  <bruno@clisp.org>
8806
8807         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
8808
8809 2006-06-26  Bruno Haible  <bruno@clisp.org>
8810
8811         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
8812
8813 2006-06-26  Bruno Haible  <bruno@clisp.org>
8814
8815         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
8816         SGI C compiler in pre-C99 mode.
8817         Suggested by Mark D. Baushke and Larry Jones.
8818
8819 2006-06-26  Bruno Haible  <bruno@clisp.org>
8820
8821         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
8822         WCHAR_MAX.
8823         Reported by Mark D. Baushke and Larry Jones.
8824
8825 2006-06-26  Bruno Haible  <bruno@clisp.org>
8826
8827         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
8828         in pre-C99 mode.
8829         Suggested by Mark D. Baushke and Larry Jones.
8830
8831 2006-06-23  Simon Josefsson  <jas@extundo.com>
8832             Bruno Haible  <bruno@clisp.org>
8833
8834         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
8835         Emit mostlyclean-local rule.
8836         (func_emit_tests_Makefile_am): Likewise.
8837         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
8838
8839 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
8840
8841         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
8842
8843 2006-06-23  Bruno Haible  <bruno@clisp.org>
8844
8845         * tests/test-stdint.c: Update to match ISO C 99 Technical
8846         Corrigendum 1.
8847
8848 2006-06-23  Bruno Haible  <bruno@clisp.org>
8849
8850         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
8851
8852 2006-06-23  Bruno Haible  <bruno@clisp.org>
8853
8854         * lib/stdint_.h: Treat IRIX like OpenBSD.
8855
8856 2006-06-23  Bruno Haible  <bruno@clisp.org>
8857
8858         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
8859         ISO C 99 Technical Corrigendum 1.
8860
8861 2006-06-22  Simon Josefsson  <jas@extundo.com>
8862
8863         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
8864         MinGW.
8865
8866 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
8867
8868         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
8869         needed.  Some compiler complained about some of them.  Problem reported
8870         by Larry Jones in
8871         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
8872
8873 2006-06-21  Simon Josefsson  <jas@extundo.com>
8874
8875         * tests/test-getaddrinfo.c: New file.
8876
8877         * modules/getaddrinfo-tests: New file.
8878
8879         * MODULES.html.sh: Add inet_pton.
8880
8881         * modules/inet_pton: New file.
8882
8883 2006-06-21  Simon Josefsson  <jas@extundo.com>
8884
8885         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
8886         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
8887         of using the (limited) gnulib implementation on Windows XP.
8888
8889         * m4/inet_pton.m4: New file.
8890
8891 2006-06-21  Simon Josefsson  <jas@extundo.com>
8892
8893         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
8894         variable.
8895
8896         * lib/socket_.h: Don't define WINVER.
8897
8898         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
8899         slightly modified to work in gnulib.
8900
8901 2006-06-21  Simon Josefsson  <jas@extundo.com>
8902
8903         * doc/gnulib.texi (Windows sockets): Add.
8904
8905 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
8906
8907         * lib/read-file.c (fread_file): Start with buffer allocation of
8908         0 bytes rather than 1 byte; this simplifies the code.
8909         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
8910         code to free buffer and save/restore errno.
8911         (internal_read_file): Remove unused local.
8912
8913 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
8914
8915         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
8916         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
8917         Problem reported by Denis Excoffier in
8918         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
8919
8920 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8921
8922         * modules/sys_socket, modules/socklen: Include sys/types since
8923         FreeBSD 4.x's sys/socket.h needs it.
8924
8925 2006-06-19  Simon Josefsson  <jas@extundo.com>
8926
8927         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
8928
8929 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
8930
8931         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
8932
8933 2006-06-19  Bruno Haible  <bruno@clisp.org>
8934
8935         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
8936         and FULL_PATH_INTTYPES_H in angle brackets.
8937         Reported by Mark D. Baushke <mdb@gnu.org>.
8938
8939 2006-06-17  Eric Blake  <ebb9@byu.net>
8940
8941         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
8942         errno.
8943
8944 2006-06-17  Bruno Haible  <bruno@clisp.org>
8945
8946         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
8947         <sys/inttypes.h>.
8948
8949 2006-06-17  Bruno Haible  <bruno@clisp.org>
8950
8951         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
8952         whether errno is declared. Assume <errno.h> declares errno.
8953
8954 2006-06-17  Bruno Haible  <bruno@clisp.org>
8955
8956         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
8957
8958 2006-06-17  Bruno Haible  <bruno@clisp.org>
8959
8960         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
8961         problem on Solaris 2.5.1.
8962
8963 2006-06-16  Eric Blake  <ebb9@byu.net>
8964
8965         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
8966         * lib/unicodeio.c [!defined errno]: Likewise.
8967         * lib/strtol.c [!defined errno]: Likewise.
8968         * lib/strtod.c [!defined errno]: Likewise.
8969
8970 2006-06-15  Eric Blake  <ebb9@byu.net>
8971
8972         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
8973
8974 2006-06-15  Eric Blake  <ebb9@byu.net>
8975
8976         * config/srclist.txt (ssize_t.m4): Lose sync.
8977
8978 2006-06-15  Bruno Haible  <bruno@clisp.org>
8979
8980         * modules/stdint (Files): Include m4/full-header-path.m4,
8981         m4/size_max.m4, m4/wchar_t.m4.
8982         (Makefile.am): Many more substitutions.
8983         * modules/stdint-tests: New file.
8984         * tests/test-stdint.c: New file.
8985
8986 2006-06-15  Bruno Haible  <bruno@clisp.org>
8987
8988         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
8989         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
8990         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
8991         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
8992         gl_CHECK_TYPE_SAME): New macros.
8993
8994 2006-06-15  Bruno Haible  <bruno@clisp.org>
8995
8996         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
8997
8998 2006-06-15  Bruno Haible  <bruno@clisp.org>
8999
9000         * lib/stdint_.h: Rewritten to be fully auto-configured.
9001         Fixes bug on HP-UX/IA64.
9002
9003 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
9004
9005         * lib/getdate.y (__attribute__): Don't define if already defined.
9006         Problem reported by Larry Jones.
9007         * lib/utimens.c (__attribute__): Likewise.
9008
9009 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
9010
9011         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
9012         reported by Andreas Schwab.
9013
9014 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9015             Bruno Haible  <bruno@clisp.org>
9016
9017         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
9018         check for the declaration of strnlen and a run test that exposes the
9019         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
9020         rpl_strndup.
9021
9022 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9023             Bruno Haible  <bruno@clisp.org>
9024
9025         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
9026
9027 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9028
9029         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
9030         compile test, for Tru64 4.0D.
9031
9032 2006-05-28  Karl Berry  <karl@gnu.org>
9033
9034         * config/srclist.txt (printf-args.c): lose sync.
9035
9036 2006-05-26  Martin Lambers  <marlam@marlam.de>
9037
9038         * lib/getpass.c: Updates the test for the native W32 API, and adds
9039         missing includes, thus fixing compilation warnings.
9040
9041 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
9042
9043         * lib/exclude.c (exclude_fnmatch): New function.
9044         (excluded_file_name): Call exclude_fnmatch.
9045         * lib/exclude.h (excluded_file_name): New prototype
9046
9047 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
9048
9049         * lib/tempname.c (small_open, large_open): New macros.
9050         (__open, __open64) [!_LIBC]: Remove.
9051         (__gen_tempname): Use small_open and large_open instead of __open
9052         and __open64.  This fixes a portability bug on HP-UX 11.11i
9053         reported by Simon Wing-Tang in
9054         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
9055
9056 2006-05-24  Bruno Haible  <bruno@clisp.org>
9057
9058         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
9059         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
9060         Reported by Thorsten Maerz <torte@netztorte.de> via
9061         Aaron Stone <aaron@serendipity.cx>.
9062
9063 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
9064
9065         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
9066         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
9067         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
9068         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
9069         not really conditional on the cache.
9070         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
9071
9072 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
9073
9074         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
9075         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
9076         (my_usleep): Don't mishandle maximum value.
9077
9078 2006-05-19  Jim Meyering  <jim@meyering.net>
9079
9080         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
9081
9082 2006-05-17  Bruno Haible  <bruno@clisp.org>
9083
9084         Cygwin portability.
9085         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
9086
9087 2006-05-17  Bruno Haible  <bruno@clisp.org>
9088
9089         * lib/stdint_.h: Fix recognition of Cygwin.
9090
9091 2006-05-15  Bruno Haible  <bruno@clisp.org>
9092
9093         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
9094         on libtool patch by Ralf Wildenhues.
9095
9096 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
9097
9098         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
9099         test for C99 conformance; (bool) 0.5 is an integer constant
9100         expression, but (bool) -0.5 is not.  Problem reported by Fedor
9101         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
9102
9103 2006-05-11  Simon Josefsson  <jas@extundo.com>
9104
9105         * m4/xvasprintf.m4: Fix obvious typo.
9106
9107 2006-05-11  Jim Meyering  <jim@meyering.net>
9108
9109         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
9110         James Lemley.
9111
9112 2006-05-10  Simon Josefsson  <jas@extundo.com>
9113
9114         * lib/md4.c: Typo fix, update copyright years.
9115         (K1, K2): Don't use L because it turn computations into 64-bit on
9116         64-bit platforms.
9117
9118 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
9119
9120         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
9121         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
9122         unwanted sign propagation, e.g., on hosts with 64-bit int.
9123         There still are some problems with reeelly weird theoretical hosts
9124         (e.g., 33-bit int) but it's not worth worrying about now.
9125         * lib/sha1.c (rol): Likewise.
9126         (K1, K2, K3, K4): Remove unnecessary L suffix.
9127
9128 2006-05-10  Bruno Haible  <bruno@clisp.org>
9129
9130         * lib/des.c: Cast to avoid warnings.
9131
9132 2006-05-09  Bruno Haible  <bruno@clisp.org>
9133
9134         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
9135         (Depends-on): Depend also on xsize, stdarg.
9136         (configure.ac): Add gl_XVASPRINTF.
9137
9138 2006-05-09  Bruno Haible  <bruno@clisp.org>
9139
9140         * m4/xvasprintf.m4: New file.
9141
9142 2006-05-09  Bruno Haible  <bruno@clisp.org>
9143
9144         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
9145         (EOVERFLOW): Define fallback value.
9146         (xstrcat): New function.
9147         (xvasprintf): Recognize the special case of a string concatenation.
9148
9149 2006-05-08  Eric Blake  <ebb9@byu.net>
9150
9151         * gnulib-tool (func_version): Base copyright year on CVS date.
9152         (func_emit_copyright_notice): New function.
9153         (func_emit_lib_Makefile_am): Use it.
9154         (func_emit_tests_Makefile_am): Likewise.
9155         (func_import): Likewise.
9156
9157 2006-05-08  Bruno Haible  <bruno@clisp.org>
9158
9159         * modules/stdarg: New file.
9160         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
9161
9162 2006-05-08  Bruno Haible  <bruno@clisp.org>
9163
9164         * m4/stdarg.m4: New file, from GNU gettext.
9165
9166 2006-05-08  Bruno Haible  <bruno@clisp.org>
9167
9168         * config/srclist.txt (build-aux/config.rpath): different from latest
9169         release.
9170
9171 2006-05-08  Bruno Haible  <bruno@clisp.org>
9172
9173         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
9174
9175 2006-05-05  Jim Meyering  <jim@meyering.net>
9176
9177         * m4/warning.m4: New file, derived from bison's file by the same name.
9178
9179 2006-05-03  Bruno Haible  <bruno@clisp.org>
9180
9181         * lib/stdint_.h: Shorter URL.
9182         * lib/inttypes.h: Likewise.
9183
9184 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
9185
9186         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
9187
9188 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
9189
9190         * lib/verify.h: Document the internals better.  Most of this change
9191         was written by Bruno Haible.
9192
9193 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
9194
9195         * doc/verify.texi: New file, partly based on a proposal by
9196         Bruno Haible.
9197
9198 2006-05-02  Bruno Haible  <bruno@clisp.org>
9199
9200         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
9201         test from here...
9202         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
9203
9204 2006-04-29  Bruno Haible  <bruno@clisp.org>
9205
9206         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
9207         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
9208
9209 2006-04-29  Bruno Haible  <bruno@clisp.org>
9210
9211         * gnulib-tool: Make --update option actually work.
9212
9213 2006-04-29  Bruno Haible  <bruno@clisp.org>
9214
9215         * doc/gcd.texi: New file.
9216         * doc/gnulib.texi: Include it.
9217
9218 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
9219
9220         * lib/getdate.y (get_date): When adding relative date, start with the
9221         initial time, not with the result of the first mktime call.
9222
9223 2006-04-25  Bruno Haible  <bruno@clisp.org>
9224
9225         * gnulib-tool (func_import): Output the include directives in three
9226         blocks, sorted separately.
9227         Reported by Ben Pfaff <blp@cs.stanford.edu>.
9228
9229 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
9230
9231         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
9232         to define main with arguments, for C++.  Reported by Eric Blake.
9233         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
9234         Prefer 'int main ()' to 'int main (void)', for C++.
9235         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
9236         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
9237         for 'main', for C99 and C++.
9238
9239 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
9240
9241         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
9242         Don't assume that exit status -1 is valid.
9243         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
9244         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
9245         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
9246         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
9247         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
9248         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
9249         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
9250         functions can be used without declaring them, or that you can
9251         exit with status -1.
9252         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
9253
9254 2006-04-24  Karl Berry  <karl@gnu.org>
9255
9256         * config/srclist.txt (longdouble.m4): sync lost.
9257
9258 2006-04-24  Eric Blake  <ebb9@byu.net>
9259
9260         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
9261
9262 2006-04-24  Bruno Haible  <bruno@clisp.org>
9263
9264         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
9265         poll() implementation in AIX.
9266         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9267
9268 2006-04-24  Bruno Haible  <bruno@clisp.org>
9269
9270         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
9271         assigned exactly once.
9272
9273 2006-04-23  Claudio Fontana  <claudio@gnu.org>
9274             Bruno Haible  <bruno@clisp.org>
9275
9276         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
9277         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
9278         for AM_CPPFLAGS.
9279
9280 2006-04-23  Bruno Haible  <bruno@clisp.org>
9281
9282         * modules/copy-file: Depend on unistd.
9283         * modules/execute: Likewise.
9284         * modules/fatal-signal: Likewise.
9285         * modules/findprog: Likewise.
9286         * modules/mkdtemp : Likewise.
9287         * modules/pipe: Likewise.
9288         * modules/wait-process: Likewise.
9289
9290 2006-04-23  Bruno Haible  <bruno@clisp.org>
9291
9292         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
9293         condition was already detected.
9294         Reported by Ben Pfaff <blp@cs.stanford.edu>.
9295
9296 2006-04-23  Bruno Haible  <bruno@clisp.org>
9297
9298         * lib/copy-file.c: Include <unistd.h> unconditionally.
9299         * lib/execute.c: Likewise.
9300         * lib/fatal-signal.c: Likewise.
9301         * lib/findprog.c: Likewise.
9302         * lib/mkdtemp.c: Likewise.
9303         * lib/pipe.h: Likewise.
9304         * lib/pipe.c: Likewise.
9305         * lib/wait-process.h: Likewise.
9306
9307 2006-04-23  Bruno Haible  <bruno@clisp.org>
9308
9309         * gnulib-tool (func_usage): Fix --import description. Document
9310         --update.
9311         (func_import): Create temporary file in a temporary directory, if
9312         --dry-run is specified. Silence errors from 'grep' when there are no
9313         m4 files in $m4dir.
9314         (func_create_testdir): Silence errors from 'grep' when there are no
9315         m4 files in $m4dir.
9316         Reported by Karl Berry <karl@freefriends.org>.
9317
9318 2006-04-20  Bruno Haible  <bruno@clisp.org>
9319
9320         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
9321         one argument, so that the code will be portable to Autoconf 2.60.
9322         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
9323         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
9324         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
9325
9326 2006-04-19  Derek Price  <derek@ximbiot.com>
9327             Eric Blake  <ebb9@byu.net>
9328
9329         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
9330         rather than "/full/path.h".  Update comment to match.  Shorten &
9331         generalize m4_translit call via AS_TR_CPP.
9332
9333 2006-04-19  Derek Price  <derek@ximbiot.com>
9334             Eric Blake  <ebb9@byu.net>
9335
9336         * lib/inttypes.h: Correct grammar in comment.
9337
9338 2006-04-18  Derek Price  <derek@ximbiot.com>
9339             Paul Eggert  <eggert@cs.ucla.edu>
9340
9341         * modules/inttypes: New file.
9342         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
9343
9344 2006-04-18  Derek Price  <derek@ximbiot.com>
9345             Paul Eggert  <eggert@cs.ucla.edu>
9346
9347         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
9348         New files.
9349
9350 2006-04-18  Derek Price  <derek@ximbiot.com>
9351             Paul Eggert  <eggert@cs.ucla.edu>
9352
9353         * lib/inttypes.h: New file.
9354         * lib/strtoimax.c: Assume <inttypes.h>.
9355
9356 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
9357
9358         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
9359         isn't mounted.  Problem reported by Kir Kolyshkin.
9360
9361 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
9362
9363         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
9364         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
9365         Derek R. Price.
9366         * lib/regex.h (RE_DUP_MAX): Update comment to match current
9367         implementation.
9368
9369 2006-04-12  Eric Blake  <ebb9@byu.net>
9370
9371         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
9372         is now done automatically by the corresponding Autoconf macro.
9373
9374 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
9375
9376         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
9377         time_r.h.
9378
9379 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9380
9381         Merge regex changes from libc, removing some of our
9382         POSIX-conformance changes that were rejected and redoing them in a
9383         less-intrusive way.
9384
9385         * lib/regcomp.c (re_compile_internal, init_dfa):
9386         Length arg is now size_t, not Idx.  All uses changed.
9387         (peek_token): Forward decl now says internal_function.
9388         (__re_error_msgid, __re_error_msgid_idx):
9389         Now static rather than extern with attribute_hidden.
9390         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
9391         For some reason libc prefers K&R style defns for external functions.
9392         (regerror) [!defined _LIBC]: Likewise.
9393         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
9394         (seek_collating_symbol_entry, lookup_collation_sequence_value):
9395         (build_range_exp, build_collating_symbol):
9396         Use K&R-style defn.
9397         (re_compile_fastmap): Use '\0' to memset, not 0.
9398         (utf8_sb_map): Make the calculations more obvious.
9399         (init_dfa, parse_bracket_exp, build_charclass_op):
9400         Call calloc and cast result, as glibc does.
9401         (init_word_char, fetch_token, peek_token, peek_token_bracket):
9402         (build_range_exp, build_collating_symbol):
9403         Now internal functions.
9404
9405         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
9406
9407         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
9408         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
9409         Don't depend on VMS; depend on __VMS instead, for POSIX
9410         namespace cleanness.
9411         (regoff_t): Define to ssize_t, not long int.
9412
9413         Remove the REG_ macros named below.  Instead, make the old names
9414         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
9415         __USE_GNU_REGEX.
9416         (REG_BACKSLASH_ESCAPE_IN_LISTS):
9417         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
9418         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
9419         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
9420         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
9421         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
9422         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
9423         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
9424         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
9425         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
9426         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
9427         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
9428         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
9429         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
9430         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
9431         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
9432         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
9433         (REG_NREGS):
9434         Remove.  All uses replaced by the old RE_* names.
9435         (RE_BACKSLASH_ESCAPE_IN_LISTS):
9436         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
9437         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
9438         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
9439         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
9440         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
9441         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
9442         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
9443         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
9444         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
9445         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
9446         Don't bother having these macros be independent of each others'
9447         values, since they no longer exist in the POSIX name space.
9448
9449         Rename the following member names back to their old names,
9450         unless !__USE_GNU_REGEX.  All uses changed back.
9451         (buffer): Renamed from re_buffer.
9452         (allocated): Renamed from re_allocated.
9453         (used): Renamed from re_used.
9454         (syntax): Renamed from re_syntax.
9455         (fastmap): Renamed from re_fastmap.
9456         (translate): Renamed from re_translate.
9457         (can_be_null): Renamed from re_can_be_null.
9458         (regs_allocated): Renamed from re_regs_allocated.
9459         (fastmap_accurate): Renamed from re_fastmap_accurate.
9460         (no_sub): Renamed from re_no_sub.
9461         (not_bol): Renamed from re_not_bol.
9462         (not_eol): Renamed from re_not_eol.
9463         (newline_anchor): Renamed from re_newline_anchor.
9464         (num_regs): Renamed from rm_num_regs.
9465         (start): Renamed from rm_start.
9466         (end): Renamed from rm_end.
9467
9468         (free_state): Move up a bit.
9469
9470         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
9471         #define to be empty.
9472         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
9473         when that is what is intended.
9474         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
9475         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
9476         (MAX): New macro.
9477         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
9478         All uses changed back to re_malloc, etc.  It's now the caller's
9479         responsibility to check for overflow; all callers changed.
9480         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
9481         (re_x2nrealloc): Remove.
9482         (free_state): Remove decl.
9483
9484         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
9485         (re_set_registers, re_exec):
9486         Use K&R-style defn.
9487
9488         2006-01-31  Roland McGrath  <roland@redhat.com>
9489
9490         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
9491         Reported by Mike Frysinger <vapier@gentoo.org>.
9492
9493         2006-01-15  Andreas Jaeger  <aj@suse.de>
9494
9495         [BZ #1950]
9496         * lib/regex_internal.c (re_string_reconstruct): Adjust for
9497         build_wcs_upper_buffer change.
9498         (build_wcs_upper_buffer): Change return type.
9499
9500         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
9501
9502         * lib/regex_internal.h: Include <stdint.h> if available.
9503
9504         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
9505
9506         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
9507
9508         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
9509
9510         * lib/regcomp.c: Adjust for changed secondary hash function.
9511
9512         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
9513
9514         * lib/regex.h: Pretty printing.
9515         Clean up namespace a bit.
9516
9517         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
9518
9519         * lib/regexec.c (update_cur_sifted_state, check_arrival,
9520         check_arrival_add_next_nodes): Avoid using uninitialized variable.
9521
9522         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
9523                     Ulrich Drepper  <drepper@redhat.com>
9524
9525         [BZ #1302]
9526         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
9527         changed.
9528         (bitset_word_t): Renamed from bitset_word.  All uses changed.
9529
9530         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
9531
9532         [BZ #281]
9533         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
9534         * lib/regcomp.c: Remove unnecessary uses of
9535         unsigned RE_TRANSLATE_TYPE.
9536         * lib/regex_internal.h: Likewise.
9537         * lib/regex_internal.c: Likewise.
9538         * lib/regexec.c: Likewise.
9539         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
9540
9541         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
9542
9543         * lib/regexec.c (find_recover_state): Remove unnecessary
9544         initialization.
9545         (transit_state_bkref): Make DFA a const pointer.
9546         (get_subexp): Likewise.
9547         (check_arrival): Likewise.
9548         (update_cur_sifted_state): Likewise.
9549         (re_search_internal): Likewise.
9550         (prune_impossible_nodes): Likewise.
9551         (acquire_init_state_context): Likewise.
9552         (proceed_next_node): Likewise.
9553         (set_regs): Likewise.
9554         (free_fail_stack_return): Likewise.
9555         (check_arrival_expand_ecl): Mark DFA parameter as const.
9556         (check_arrival_expand_ecl_sub): Likewise.
9557         (check_subexp_limits): Likewise.
9558         (sub_epsilon_src_nodes):  Likewise.
9559         (add_epsilon_src_nodes):  Likewise.
9560         (merge_state_array): Likewise.
9561         (update_regs): Likewise.
9562         (build_trtable): Likewise.
9563         (sift_states_backward): Mark MCTX parameter as const.
9564         (build_sifted_states): Likewise.
9565         (update_cur_sifted_state): Likewise.
9566         (sift_states_mkref): Likewise.
9567         (check_arrival_expand_ecl): Mark eclosure as const.
9568         (check_dst_limits_calc_pos_1): Likewise.
9569         * lib/regex_internal.h (re_match_context_t): Make dfa a const
9570         pointer.
9571
9572         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
9573
9574         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
9575         (transit_state_sb): Likewise.
9576         (transit_state_mb): Likewise.
9577         (sift_states_iter_mb): Likewise.
9578         (check_arrival_add_next_nodes): Likewise.
9579         (check_node_accept_bytes): Change first parameter to pointer-to-const.
9580         [_LIBC] (re_search_2_stub): Use mempcpy.
9581
9582         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
9583         mbrtowc for very simple UTF-8 case.
9584
9585         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
9586         a pointer-to-const.
9587         (re_acquire_state_context): Likewise.
9588         * lib/regex_internal.h: Adjust prototypes.
9589
9590         * lib/regex.c: Prevent using C++ compilers.
9591
9592         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
9593         (re_acquire_state_context): Likewise.
9594
9595 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9596
9597         * modules/regex (Depends-on): Add ssize_t.
9598
9599 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9600
9601         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
9602         translation table.
9603
9604 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9605
9606         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
9607
9608 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
9609             Bruno Haible  <bruno@clisp.org>
9610
9611         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
9612         <sys/types.h> and <inttypes.h>.
9613
9614 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9615
9616         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
9617         `__error_t_defined', so argp.h will not typedef the former.
9618
9619 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
9620
9621         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
9622         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
9623         glibc names.  Even if glibc is changed to conform to POSIX, the
9624         traditional names will be available anyway, since regex depends on
9625         the extensions module.  Also, fix a longstanding typo in the
9626         implementation of Spencer ERE test #75 from grep 2.3.  Problems
9627         reported by Emanuele Giaquinta.  Also, change sense of cached
9628         variable, so that the message makes sense.
9629
9630 2006-03-24  Simon Josefsson  <jas@extundo.com>
9631
9632         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
9633         including some doc fixes.
9634         (base64_encode_alloc): Fix +1 bug on allocation failures.
9635
9636 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9637
9638         * lib/base64.c (base64_encode): Do not read past end of array with
9639         unsanitized input on systems with CHAR_BIT > 8.
9640
9641 2006-03-24  Eric Blake  <ebb9@byu.net>
9642
9643         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
9644
9645 2006-03-22  Karl Berry  <karl@gnu.org>
9646
9647         * config/srclist.txt (*setenv.[ch]): get from coreutils.
9648         * config/srclistvars.sh (COREUTILS): new var.
9649
9650 2006-03-17  Jim Meyering  <jim@meyering.net>
9651
9652         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
9653         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
9654
9655 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
9656
9657         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
9658         no longer needs it.  Instead, check that regoff_t is as least
9659         as wide as ptrdiff_t.
9660
9661         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
9662         so that our regex.h stays compatible with the installed regex.
9663         This is helpful for installers who configure --without-included-regex.
9664         Problem reported by Emanuele Giaquinta.
9665
9666 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
9667
9668         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
9669         Typedef to long int, not to off_, as POSIX will likely change
9670         in that direction.
9671
9672 2006-03-15  Eric Blake  <ebb9@byu.net>
9673
9674         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
9675
9676 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
9677
9678         * lib/argp-help.c (validate_uparams): Fix typo
9679         * lib/argp-parse.c (argp_default_options): Consistently begin help
9680         messages with a lowercase letter.
9681
9682 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
9683
9684         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
9685         overrun buffers and shouldn't be used (much as gets shouldn't be
9686         used).
9687         * lib/time_r.c (asctime_r, ctime_r): Likewise.
9688
9689 2006-03-08  Simon Josefsson  <jas@extundo.com>
9690
9691         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
9692         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9693
9694 2006-03-08  Simon Josefsson  <jas@extundo.com>
9695
9696         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
9697         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9698
9699 2006-03-08  Simon Josefsson  <jas@extundo.com>
9700
9701         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
9702         signal that configure disabled the device.
9703
9704 2006-03-08  Simon Josefsson  <jas@extundo.com>
9705
9706         * build-aux/maint.mk: Fix refresh-po, to handle no translated
9707         languages.
9708
9709 2006-03-07  Simon Josefsson  <jas@extundo.com>
9710
9711         * modules/getopt (Depends-on): Add unistd.
9712
9713         * modules/unistd: New file.
9714
9715 2006-03-07  Simon Josefsson  <jas@extundo.com>
9716
9717         * modules/gc-random: New file.
9718
9719 2006-03-07  Simon Josefsson  <jas@extundo.com>
9720
9721         * m4/unistd_h.m4: New file.
9722
9723 2006-03-07  Simon Josefsson  <jas@extundo.com>
9724
9725         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
9726         test to be side-effect free by storing the result in the cache
9727         variable gl_cv_lib_readline, and moving the assignment of
9728         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
9729         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9730
9731 2006-03-07  Simon Josefsson  <jas@extundo.com>
9732
9733         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
9734         error on missing devices (the functions will return an error).
9735
9736         * m4/gc.m4: Move random stuff to gc-random.m4
9737
9738 2006-03-07  Simon Josefsson  <jas@extundo.com>
9739
9740         * lib/unistd_.h: New file.
9741
9742 2006-03-07  Simon Josefsson  <jas@extundo.com>
9743
9744         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
9745
9746 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9747
9748         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
9749         Problem reported by Juan Manuel Guerrero.
9750
9751 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9752
9753         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
9754         the unistd module.
9755         * lib/getlogin_r.c: Likewise.
9756         * lib/getlogin_r.h: Likewise.
9757         * lib/glob.c: Likewise.
9758         * lib/pagealign_alloc.c: Likewise.
9759         * lib/unistd_.h: Remove; no longer needed.
9760
9761 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9762
9763         * MODULES.html.sh (Support for systems lacking POSIX:2001):
9764         Add unistd.
9765         * modules/c-stack (Depends-on): Add unistd.
9766         * modules/getlogin_r: Likewise.
9767         * modules/glob: Likewise.
9768         * modules/pagealign_alloc: Likewise.
9769         * modules/unistd (Files): Remove lib/unistd_.h.
9770         (EXTRA_DIST): Remove.
9771         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
9772         need unistd_.h.
9773         (MOSTLYCLEANFILES): Remove unistd.h-t.
9774
9775 2006-03-03  Simon Josefsson  <jas@extundo.com>
9776
9777         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
9778
9779 2006-03-03  Simon Josefsson  <jas@extundo.com>
9780
9781         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
9782         libidn and bison.
9783
9784 2006-03-03  Simon Josefsson  <jas@extundo.com>
9785
9786         * build-aux/maint.mk: Add indent target.
9787
9788 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
9789
9790         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
9791         our replacement poll.h in any case, to avoid a differing
9792         declaration from a system header.  Seen on AIX.
9793
9794 2006-03-01  Simon Josefsson  <jas@extundo.com>
9795
9796         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
9797         <kasal@ucw.cz>.
9798
9799 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
9800
9801         * modules/gettime (Depends-on): Add extensions module.
9802         * modules/nanosleep (Depends-on): Likewise.
9803         * modules/settime (Depends-on): Likewise.
9804
9805 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
9806
9807         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
9808         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
9809         pedantically.
9810         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
9811         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
9812
9813         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
9814         not "==".  Reported by Ralf Wildenhues.
9815
9816 2006-03-01  Karl Berry  <karl@gnu.org>
9817
9818         * doc/Copyright/request-*: new files, synced from gnuorg.
9819
9820 2006-03-01  Karl Berry  <karl@gnu.org>
9821
9822         * config/srclist.txt (Copyright/*): new entries.
9823
9824 2006-02-28  Simon Josefsson  <jas@extundo.com>
9825
9826         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
9827
9828 2006-02-27  Simon Josefsson  <jas@extundo.com>
9829
9830         * lib/base64.h: Indent #define's.  From Jim Meyering
9831         <jim@meyering.net>.
9832
9833 2006-02-27  Jim Meyering  <jim@meyering.net>
9834
9835         Revert the change of 2006-02-24, so these files can continue
9836         to be sync'd from gettext.
9837         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
9838         of `config.h'.
9839
9840 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
9841
9842         * modules/intprops: New file.
9843         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
9844         Add intprops.
9845         * modules/getloadavg (Files): Remove lib/intprops.h.
9846         (Depends-on): Add intprops.
9847         * modules/human: Likewise.
9848         * modules/inttostr: Likewise.
9849         * modules/openat: Likewise.
9850         * modules/sig2str: Likewise.
9851         * modules/userspec: Likewise.
9852         * modules/utimecmp: Likewise.
9853         * modules/xnanosleep: Likewise.
9854         * modules/xstrtol: Likewise.
9855
9856 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
9857
9858         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
9859         * modules/lock-tests (TESTS): Use $(EXEEXT).
9860         * modules/tls-tests: Likewise.
9861         * modules/argp-tests: Likewise.
9862         (check_PROGRAMS): New var, replacing...
9863         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
9864
9865 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9866
9867         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
9868         `config.h'.
9869
9870 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
9871
9872         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
9873
9874 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9875
9876         Sync from coreutils.
9877         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
9878         gl_CHDIR_SAFER.
9879
9880 2006-02-22  Jim Meyering  <jim@meyering.net>
9881
9882         Sync from coreutils.
9883         * m4/chdir-safer.m4: New file.
9884
9885 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
9886
9887         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
9888         AT_FDCWD exceeds INT_MAX.
9889         * lib/openat.h (AT_FDCWD): Likewise.
9890
9891 2006-02-17  Eric Blake  <address@hidden>
9892
9893         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
9894
9895 2006-02-16  Simon Josefsson  <jas@extundo.com>
9896
9897         * modules/getaddrinfo (Depends-on): Add sys_socket.
9898
9899 2006-02-15  Simon Josefsson  <jas@extundo.com>
9900
9901         * build-aux/maint.mk: Add dsyntax-check rule.
9902
9903 2006-02-15  Eric Blake  <ebb9@byu.net>
9904
9905         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
9906         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
9907         'present but cannot compile' warnings on cygwin.
9908         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
9909         use ws2tcpip.h if sys/socket.h works.
9910         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
9911         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
9912
9913 2006-02-14  Simon Josefsson  <jas@extundo.com>
9914
9915         * modules/maintainer-makefile (Files): Rename.
9916
9917         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
9918         and (the local) Makefile.cfg to maint-cfg.mk.
9919
9920         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
9921         to the latter.
9922
9923         * modules/maintainer-makefile: New module.
9924
9925         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
9926         severaly stripped to make it possible to build it up from scratch
9927         with reliable tests.
9928
9929         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
9930         fixes to permit overriding the default actions when configure and
9931         makefile are not available.
9932
9933 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
9934
9935         Sync from coreutils.
9936         * modules/lstat (Depends-on): Don't depend on xalloc.
9937         (License): Change from GPL to LGPL, since this is now simply a
9938         replacement for a libc function.
9939
9940 2006-02-14  Jim Meyering  <jim@meyering.net>
9941
9942         Sync from coreutils.
9943
9944         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
9945         failure on deficient systems, and simplify gnulib lgpl dependencies.
9946         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
9947         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
9948
9949         * lib/xalloc-die.c: Remove unused definition of N_.
9950
9951 2006-02-14  Jim Meyering  <jim@meyering.net>
9952
9953         Sync from coreutils.
9954         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
9955         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
9956         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
9957         double-quote uses of that variable, to accommodate the rare case in
9958         which getmntent is available in none of the libraries checked.  This
9959         happens at least on FreeBSD 5.0.
9960
9961 2006-02-13  Simon Josefsson  <jas@extundo.com>
9962
9963         * gnulib-tool (Usage): Fix --import, from
9964         karl@freefriends.org (Karl Berry).
9965
9966 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
9967
9968         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
9969
9970 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
9971
9972         * lib/argp-namefrob.h: Restore changes accidentally lost during the
9973         "autoupdate" on 2005-12-12.
9974
9975 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
9976
9977         * modules/closeout (Depends-on): Remove atexit.
9978
9979 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
9980
9981         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
9982         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
9983
9984 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
9985
9986         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
9987         __EXTENSIONS__ if this causes compilation to fail.  Problem
9988         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
9989         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
9990
9991 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
9992
9993         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
9994         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
9995         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
9996         All uses changed.
9997
9998 2006-01-26  Simon Josefsson  <jas@extundo.com>
9999
10000         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
10001         prototype is visible on mingw32.
10002
10003         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
10004         for mingw32.
10005
10006         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
10007         mingw32).
10008
10009 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
10010
10011         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
10012         attempt to open for write; this always fails, at least on POSIX
10013         hosts.  This reinstates the 2006-01-09 change, which was
10014         inadvertently removed.
10015
10016 2006-01-26  Bruno Haible  <bruno@clisp.org>
10017
10018         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
10019         Reported by Paul Eggert.
10020
10021 2006-01-26  Bruno Haible  <bruno@clisp.org>
10022             Paul Eggert  <eggert@cs.ucla.edu>
10023
10024         * lib/stdbool_.h (_Bool)
10025         [(! (defined __cplusplus || defined __BEOS__)
10026           && !defined __GNUC__
10027           && !(defined __HP_cc || defined __xlc__
10028                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
10029                || defined __sgi))]:
10030         #define to signed char in these cases too; this simplifies
10031         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
10032         etc., separately) and makes it more conservative.
10033
10034 2006-01-25  Simon Josefsson  <jas@extundo.com>
10035
10036         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
10037         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
10038         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
10039
10040 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
10041
10042         * lib/argp-namefrob.h: Bugfix. Remove stray #
10043
10044 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
10045
10046         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
10047         so that we test the test.
10048         Check for yet another HP-UX cc bug involving *bool |= bool.
10049
10050 2006-01-25  Karl Berry  <karl@gnu.org>
10051
10052         * config/srclist.txt (vasnprintf.c): sync lost.
10053
10054 2006-01-25  Jim Meyering  <jim@meyering.net>
10055
10056         Sync from the stable (b5) branch of coreutils:
10057
10058         * lib/fts.c (fts_children): Don't let close() clobber errno from
10059         failed fchdir().
10060
10061         * lib/fts.c (fts_stat): When following a symlink-to-directory,
10062         don't necessarily interpret stat-fails+lstat-succeeds as indicating
10063         a dangling symlink.  That can also happen at least for ELOOP.
10064         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
10065         FYI, this bug predates the inclusion of fts.c in coreutils.
10066
10067         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
10068         in their own block, so pre-c99 compilers don't object.
10069
10070         Avoid the double-free (first in fts_read, second in fts_close) that
10071         would occur when an `active' directory is made inaccessible (e.g.,
10072         via chmod a-x) during a traversal.
10073         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
10074         before returning.  Reproduce this failure by
10075         mkdir -p a/b; cd a; chmod a-x . b
10076         Reported by Stavros Passas.
10077
10078 2006-01-25  Jim Meyering  <jim@meyering.net>
10079
10080         * lib/fileblocks.c: Remove more useless parentheses.
10081         * lib/readutmp.h: Likewise.
10082
10083 2006-01-25  Bruno Haible  <bruno@clisp.org>
10084
10085         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
10086         warnings.
10087         Reported by Paul Eggert.
10088
10089 2006-01-25  Bruno Haible  <bruno@clisp.org>
10090
10091         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
10092         rid of a trap command. For Solaris sh.
10093         Reported by Mark D. Baushke <mdb@gnu.org>.
10094
10095 2006-01-24  Simon Josefsson  <jas@extundo.com>
10096
10097         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
10098         Bruno.
10099
10100 2006-01-24  Karl Berry  <karl@gnu.org>
10101
10102         * config/srclist.txt (argp-namefrob.h): sync lost.
10103
10104 2006-01-24  Jim Meyering  <jim@meyering.net>
10105
10106         * modules/openat (Files): Add lib/intprops.h.
10107         From Mark D. Baushke.
10108
10109 2006-01-24  Jim Meyering  <jim@meyering.net>
10110
10111         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
10112         Reported by Mark D. Baushke.
10113
10114 2006-01-24  Jim Meyering  <jim@meyering.net>
10115
10116         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
10117
10118 2006-01-24  Bruno Haible  <bruno@clisp.org>
10119
10120         * modules/strnlen (Maintainer): Change from glibc to all.
10121
10122 2006-01-24  Bruno Haible  <bruno@clisp.org>
10123
10124         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
10125         Patch by Paul Eggert.
10126
10127 2006-01-24  Bruno Haible  <bruno@clisp.org>
10128
10129         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
10130         already has it.
10131         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
10132         2005-11-26.
10133
10134         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
10135         'signed char' to avoid problems with the built-in _Bool type.
10136         Reported by Paul Eggert on 2005-11-26.
10137
10138 2006-01-24  Bruno Haible  <bruno@clisp.org>
10139
10140         * gnulib-tool (func_import): Avoid constructing complicated sed
10141         expressions inside backquote.
10142         Report and solution by Mark D. Baushke <mdb@gnu.org>.
10143
10144 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
10145
10146         These changes imported from libc.
10147         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
10148         test and two separate function calls.
10149         * lib/strndup.c (__strndup): Add libc_hidden_def.
10150
10151 2006-01-23  Simon Josefsson  <jas@extundo.com>
10152
10153         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
10154         Remove the test_*_SOURCES variable: automake infers it by default.
10155         * modules/tls-tests: Likewise.
10156
10157 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10158
10159         Work around porting bugs reported by Dieter in
10160         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
10161         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
10162         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
10163         Include "getopt.h" first, to check interface.
10164         (getenv): Declare only if defined HAVE_DECL_GETENV &&
10165         !HAVE_DECL_GETENV.
10166         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
10167         (__strndup): Revert to K&R-style function dfns, the glibc style.
10168         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
10169         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
10170         Include strnlen.h first, to get prototype properly.
10171         (strnlen): Renamed from __strnlen.
10172         Remove weak alias.
10173
10174 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10175
10176         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
10177
10178 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10179
10180         * config/srclist.txt: Adjust to reflect glibc reorganization.
10181         This affects only comments.
10182
10183 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
10184
10185          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
10186          Reported by Bruce Korb <bkorb@gnu.org>.
10187
10188 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
10189
10190         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
10191         to pacify gcc -Wswitch-default.
10192
10193 2006-01-22  Bruno Haible  <bruno@clisp.org>
10194
10195         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
10196         temporary buffer for sprintf, take into account the precision also
10197         for 'd', 'i', 'u', 'o', 'x', 'X'.
10198
10199 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
10200
10201         * modules/argp-tests: New module
10202         * tests/test-argp.c: New file
10203         * tests/test-argp-2.sh: New file
10204
10205 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
10206
10207         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
10208         (__argp_base_name): Removed
10209         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
10210         typo.
10211         (__argp_base_name): Provide macro definition or extern declaration
10212         depending on the configuration
10213
10214 2006-01-20  Simon Josefsson  <jas@extundo.com>
10215
10216         * modules/inet_ntop (Depends-on): Depend on sys_socket.
10217
10218 2006-01-20  Simon Josefsson  <jas@extundo.com>
10219
10220         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
10221
10222 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
10223
10224         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
10225         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
10226         Suggested by Bruno Haible.
10227
10228 2006-01-20  Karl Berry  <karl@gnu.org>
10229
10230         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
10231         until changes propagate, I guess.
10232
10233 2006-01-19  Simon Josefsson  <jas@extundo.com>
10234
10235         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
10236
10237 2006-01-19  Simon Josefsson  <jas@extundo.com>
10238
10239         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
10240
10241 2006-01-19  Simon Josefsson  <jas@extundo.com>
10242
10243         * gnulib-tool: Set check_PROGRAMS.
10244
10245         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
10246         modules/des-tests, modules/gc-arcfour-tests,
10247         modules/gc-arctwo-tests, modules/gc-des-tests,
10248         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
10249         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
10250         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
10251         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
10252         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
10253         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
10254         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
10255         test_*_SOURCES.
10256
10257 2006-01-18  Simon Josefsson  <jas@extundo.com>
10258
10259         * modules/socklen (Depends-on): Depend on sys_socket.
10260
10261 2006-01-18  Simon Josefsson  <jas@extundo.com>
10262
10263         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
10264         modules/des-tests, modules/gc-arcfour-tests,
10265         modules/gc-arctwo-tests, modules/gc-des-tests,
10266         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
10267         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
10268         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
10269         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
10270         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
10271         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
10272         $(EXEEXT) to automake TESTS variable, for mingw32.
10273
10274 2006-01-17  Simon Josefsson  <jas@extundo.com>
10275
10276         * modules/socklen (Include): Need sys/socket.h.
10277
10278 2006-01-17  Bruno Haible  <bruno@clisp.org>
10279
10280         * modules/ssize_t (Include): Add <sys/types.h>.
10281
10282 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
10283
10284         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
10285         it's not portable and it doesn't work with cross-compiles.
10286         Problem reported by Bruno Haible.  Fix missing-$ typo in
10287         'test "gl_cv_ignore_unused_libraries" ...' that prevented
10288         -zignore from being used with Sun's C compiler.
10289
10290 2006-01-12  Simon Josefsson  <jas@extundo.com>
10291
10292         * lib/base64.c: Fix warning, reported by Bruno Haible
10293         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
10294
10295 2006-01-12  Bruno Haible  <bruno@clisp.org>
10296
10297         * modules/ldd: New file.
10298         * build-aux/ldd.sh.in: New file.
10299         * MODULES.html.sh (Support for building libraries and executables): Add
10300         ldd.
10301
10302 2006-01-12  Bruno Haible  <bruno@clisp.org>
10303
10304         * m4/ldd.m4: New file.
10305
10306 2006-01-12  Bruno Haible  <bruno@clisp.org>
10307
10308         * gnulib-tool (func_import, func_create_testdir): Don't go into an
10309         endless loop while replacing $auxdir with build-aux.
10310
10311 2006-01-11  Simon Josefsson  <jas@extundo.com>
10312
10313         * lib/stdint_.h (SIZE_MAX): Add missing (.
10314
10315 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
10316
10317         Sync from coreutils.
10318         * lib/md5.c: Fix commentary typos.
10319         (alignof, UNALIGNED_P): No need for a GCC-specific version.
10320         * lib/md5.h (__attribute__): Remove; unused.
10321         * lib/sha1.c: Fix commentary to match md5 better.
10322         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
10323         so that we don't need to worry about alignment.  All uses changed.
10324         This merges the 2005-10-28 md5 change into sha1.
10325
10326 2006-01-11  Jim Meyering  <jim@meyering.net>
10327
10328         Sync from coreutils.
10329         * lib/md5.c (OP): Fix spacing.
10330
10331 2006-01-11  Bruno Haible  <bruno@clisp.org>
10332
10333         Ensure automatic ordering between gl_LOCK and gl_ARGP.
10334         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
10335         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
10336
10337 2006-01-11  Bruno Haible  <bruno@clisp.org>
10338
10339         Ensure automatic ordering between gl_LOCK and gl_ARGP.
10340         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
10341         the "early" section as well.
10342
10343 2006-01-11  Bruno Haible  <bruno@clisp.org>
10344
10345         Avoid "ar: no archive members specified" error on MacOS X.
10346         * gnulib-tool (func_modules_add_dummy): New function.
10347         (func_import, func_create_testdir): Invoke it.
10348
10349 2006-01-11  Bruno Haible  <bruno@clisp.org>
10350
10351         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
10352         with $auxdir in AC_CONFIG_FILES statements.
10353
10354 2006-01-11  Bruno Haible  <bruno@clisp.org>
10355
10356         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
10357         Initialize also noinst_HEADERS to empty.
10358
10359 2006-01-11  Bruno Haible  <bruno@clisp.org>
10360
10361         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
10362         variables.
10363         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
10364         autoreconf.
10365
10366 2006-01-11  Bruno Haible  <bruno@clisp.org>
10367
10368         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
10369         overridable by the user.
10370         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10371
10372 2006-01-10  Simon Josefsson  <jas@extundo.com>
10373
10374         * modules/sys_socket: New file.
10375
10376 2006-01-10  Simon Josefsson  <jas@extundo.com>
10377
10378         * m4/sys_socket_h.m4: New file.
10379
10380 2006-01-10  Simon Josefsson  <jas@extundo.com>
10381
10382         * lib/socket_.h: New file.
10383
10384 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10385
10386         * modules/readutmp (Maintainer): Add myself.
10387
10388 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10389
10390         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
10391         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
10392         People who are still concerned with buggy memcmp implementations
10393         can invoke gl_FUNC_MEMCMP themselves.
10394
10395 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10396
10397         * lib/regex_internal.h (BITSET_WORD_BITS):
10398         Work around a bug in 64-bit PGC (before version 6.1-2), where the
10399         preprocessor mishandles large unsigned values as if they were signed.
10400         Problem reported by Claudio Fontana in
10401         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
10402
10403 2006-01-10  Jim Meyering  <jim@meyering.net>
10404
10405         Avoid the double-free (first in fts_read, second in fts_close) that
10406         would occur when an `active' directory is made inaccessible (e.g.,
10407         via chmod a-x) during a traversal.
10408         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
10409         before returning.  Reproduce this failure by
10410         mkdir -p a/b; cd a; chmod a-x . b
10411         Reported by Stavros Passas.
10412
10413         Sync from coreutils.
10414         * lib/sha1.c: Tweak grammar in a comment.
10415
10416 2006-01-10  Jim Meyering  <jim@meyering.net>
10417
10418         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
10419         Patch by Joerg Sonnenberger.
10420
10421 2006-01-10  Bruno Haible  <bruno@clisp.org>
10422
10423         * modules/readutmp: Depend on module free.
10424         * modules/strtok_r: Depend on module restrict.
10425
10426 2006-01-10  Bruno Haible  <bruno@clisp.org>
10427
10428         * modules/gettext (configure.ac): Add an invocation of
10429         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
10430
10431 2006-01-10  Bruno Haible  <bruno@clisp.org>
10432
10433         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
10434         Reported by Werner Lemberg <wl@gnu.org>.
10435
10436 2006-01-10  Bruno Haible  <bruno@clisp.org>
10437
10438         * lib/localcharset.c: Update from GNU gettext.
10439
10440 2006-01-10  Bruno Haible  <bruno@clisp.org>
10441
10442         * lib/argp.h (__const): Remove macro. Use const instead.
10443         * lib/argp-fmtstream.h (__const): Likewise.
10444         * lib/glob_.h (__const): Remove macro.
10445         * lib/glob-libc.h: Use const instead of __const.
10446
10447 2006-01-10  Bruno Haible  <bruno@clisp.org>
10448
10449         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
10450         variable.
10451         Needed to avoid an automake error regarding the 'gettext' module.
10452
10453 2006-01-09  Simon Josefsson  <jas@extundo.com>
10454
10455         * modules/inet_ntop (Depends-on): Add restrict.
10456
10457 2006-01-09  Simon Josefsson  <jas@extundo.com>
10458
10459         * modules/gc-rijndael-tests (License): Put under LGPL.
10460
10461         * modules/gc-des-tests (License): Likewise.
10462
10463         * modules/gc-arcfour-tests (License): Likewise.
10464
10465         * modules/gc-arctwo-tests (License): Likewise.
10466
10467         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
10468
10469         * modules/gc-hmac-sha1-tests (Files): Likewise.
10470
10471         * modules/gc-hmac-md5-tests (License): Likewise.
10472
10473         * modules/gc-sha1-tests (License): Likewise.
10474
10475         * modules/gc-md5-tests (License): Likewise.
10476
10477         * modules/gc-md4-tests (License): Likewise.
10478
10479         * modules/gc-md2-tests (License): Likewise.
10480
10481         * modules/gc-tests (License): Likewise.
10482
10483         * modules/des-tests (License): Likewise.
10484
10485         * modules/md4-tests (License): Likewise.
10486
10487         * modules/md2-tests (License): Likewise.
10488
10489 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10490
10491         Sync from coreutils:
10492
10493         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
10494         * modules/lib-ignore: New file.
10495         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
10496         chdir-safer.m4, lchmod.m4.
10497         * modules/openat: Add mkdirat.c, openat-priv.h.
10498
10499 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10500
10501         Sync from coreutils.
10502         * m4/lib-ignore.m4: New file.
10503         * m4/lchmod.m4: New file.
10504
10505 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10506
10507         Sync from coreutils.
10508         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
10509         for write access: POSIX says that must fail.
10510         * lib/fts.c (diropen): Likewise.
10511         * lib/save-cwd.c (save_cwd): Likewise.
10512         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
10513         well, for minor improvements on hosts that lack O_DIRECTORY.
10514         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
10515         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
10516         Fall back on chown if open failed with EACCES.
10517
10518         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
10519         Report an error at compile-time if only a 1-second nominal clock
10520         resolution is found.
10521
10522         * lib/lchmod.h: New file.
10523         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
10524         (make_dir_parents): Use lchown rather than chown, and
10525         lchmod rather than chmod.
10526
10527         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
10528         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
10529         "proc" reported by n0dalus.
10530
10531         * lib/mountlist.c: Include <limits.h>.
10532         (dev_from_mount_options)
10533         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
10534         New function.  It no longer assumes "dev=" has the System V meaning
10535         on Linux (since it doesn't).  It also parses "dev=" more carefully.
10536         (read_file_system_list)
10537         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
10538         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
10539         dev= in that case.
10540
10541         * lib/posixtm.h (PDS_PRE_2000): New macro.
10542         * lib/posixtm.c (year): Arg is now syntax_bits rather than
10543         allow_century.  All usages changed.  Reject dates outside the range
10544         1969-1999 if PDS_PRE_2000 is used.
10545
10546 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10547
10548         Sync from coreutils.
10549         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
10550         (Time of day items): Mention the possibility of leap seconds.
10551         Problem reported by Dr. David Alan Gilbert.
10552
10553 2006-01-09  Jim Meyering  <jim@meyering.net>
10554
10555         Sync from coreutils.
10556
10557         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
10558
10559         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
10560
10561         * lib/modechange.c (mode_compile): Reject an invalid mode string
10562         that starts with an octal digit.  From Andreas Gruenbacher.
10563
10564         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
10565         and dup to open_safer and dup_safer, respectively.
10566         (openat_permissive): Fix typo in comment.
10567
10568         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
10569         "gettext.h"; either no longer needed or are guaranteed by openat.h.
10570         (_): Remove; no longer needed.
10571         (openat): Renamed from rpl_openat; no need for rpl_openat
10572         since openat.h renames openat for us.
10573         Replace most of the body with a call to openat_permissive,
10574         to avoid duplicate code.
10575         Port to (probably hypothetical) environments were mode_t is
10576         wider than int.
10577         (openat_permissive): Require mode arg, so that we can check
10578         types better.  Put it just after flags.  Change cwd failure
10579         indicator from pointer-to-bool to pointer-to-errno-value.
10580         All callers changed.
10581         Invoke openat_save_fail and/or openat_restore_fail if
10582         cwd_errno is null, so that openat can call us.
10583         (openat_permissive, fdopendir, fstatat, unlinkat):
10584         Simplify errno handling to avoid some duplicate code,
10585         as it's OK to set errno on success.
10586         * lib/openat.h: Revamp code so that function macros depend on
10587         __OPENAT_PREFIX only, not also on AT_FDCWD.
10588         (openat_ro): Remove.  Caller changed to use openat_permissive.
10589         (openat_permissive): Now a macro, if not a function.
10590         (openat_restore_fail, openat_save_fail): Now always functions,
10591         since mkdirat needs them even if __OPENAT_PREFIX is defined.
10592
10593         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
10594         and openat.c.
10595         * lib/mkdirat.c: Include openat-priv.h.
10596         Remove definitions of macros defined therein.
10597         * lib/openat.c: Likewise.
10598
10599         * lib/mkdirat.c (mkdirat): New file and function.
10600         * lib/openat.h (mkdirat): Declare.
10601
10602         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
10603
10604         * lib/openat.h (openat_permissive): Declare.
10605         (openat_ro): Define.
10606
10607         * lib/openat.c (EXPECTED_ERRNO): New macro.
10608         (openat_permissive): New function -- used in remove.c rewrite.
10609         (all functions): Set errno just before returning, only if there
10610         was an actual failure.
10611         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
10612
10613         Emulate openat-family functions using Linux's procfs, if possible.
10614         Idea and some code based on Ulrich Drepper's glibc changes.
10615
10616         * lib/openat.c: (BUILD_PROC_NAME): New macro.
10617         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
10618         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
10619         before falling back on save_cwd and restore_cwd.
10620         (fdopendir, fstatat, unlinkat): Likewise.
10621
10622         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
10623         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
10624
10625         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
10626         as second argument to va_arg.  Otherwise, some versions of gcc
10627         warn that `if this code is reached, the program will abort'.
10628
10629 2006-01-09  Jim Meyering  <jim@meyering.net>
10630
10631         Sync from coreutils.
10632         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
10633         Require openat-priv.h.
10634
10635 2006-01-09  Bruno Haible  <bruno@clisp.org>
10636
10637         * modules/strnlen (Include): Use strnlen.h.
10638
10639 2006-01-09  Bruno Haible  <bruno@clisp.org>
10640
10641         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
10642
10643 2006-01-09  Bruno Haible  <bruno@clisp.org>
10644
10645         * lib/sysexit_.h (EX_OK): New macro.
10646         Suggested by Martin Lambers <marlam@marlam.de>.
10647
10648 2006-01-09  Bruno Haible  <bruno@clisp.org>
10649
10650         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
10651         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
10652
10653 2006-01-09  Bruno Haible  <bruno@clisp.org>
10654
10655         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
10656         numbers.
10657
10658 2006-01-09  Bruno Haible  <bruno@clisp.org>
10659
10660         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
10661         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
10662         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
10663         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
10664
10665 2006-01-09  Bruno Haible  <bruno@clisp.org>
10666
10667         * build-aux/javacomp.sh.in: New file, moved from lib/.
10668         * modules/javacomp-script (Files): Update.
10669         (configure.ac): Add AC_CONFIG_FILES invocation.
10670         (EXTRA_DIST): Remove variable.
10671
10672         * build-aux/javaexec.sh.in: New file, moved from lib/.
10673         * modules/javaexec (Files): Update.
10674         (configure.ac): Add AC_CONFIG_FILES invocation.
10675         (EXTRA_DIST): Remove javaexec.sh.in.
10676
10677         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
10678         * modules/csharpcomp-script (Files): Update.
10679         (configure.ac): Add AC_CONFIG_FILES invocation.
10680         (EXTRA_DIST): Remove variable.
10681
10682         * build-aux/csharpexec.sh.in: New file, moved from lib/.
10683         * modules/csharpexec (Files): Update.
10684         (configure.ac): Add AC_CONFIG_FILES invocation.
10685         (EXTRA_DIST): Remove csharpexec.sh.in.
10686
10687 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
10688
10689         Sync from coreutils.
10690
10691         Add POSIX ACL support
10692         * lib/acl.h (copy_acl, set_acl): Add declarations.
10693         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
10694         systems other than Linux.
10695         (chmod_or_fchmod): New function: use fchmod when possible,
10696         and chmod otherwise.
10697         (file_has_acl): Add a POSIX ACL implementation, with a
10698         Linux-specific subcase.
10699         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
10700         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
10701         acls are unsupported.
10702         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
10703         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
10704         are unsupported.
10705
10706 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
10707
10708         Sync from coreutils.
10709         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
10710
10711 2006-01-07  Bruno Haible  <bruno@clisp.org>
10712
10713         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
10714         gl_EARLY.
10715
10716 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
10717
10718         * lib/strftime.c (tzname): Don't declare if it is already #defined.
10719         Problem reported for Mingw by Mark Junker.
10720
10721 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
10722
10723         * README: Gnulib normally doesn't generate a tarball.
10724
10725 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
10726
10727         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
10728         long int, not int, for nanosecond counts, so that people who are
10729         used to POSIX struct timespec won't be surprised.  Reported by Jim
10730         Meyering.
10731
10732 2005-12-28  Bruno Haible  <bruno@clisp.org>
10733
10734         * build-aux/config.rpath: Update from GNU gettext.
10735
10736 2005-12-16  Jim Meyering  <jim@meyering.net>
10737
10738         * modules/fprintftime: New module.
10739         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
10740
10741 2005-12-16  Jim Meyering  <jim@meyering.net>
10742
10743         * m4/fprintftime.m4: New file.
10744
10745 2005-12-16  Jim Meyering  <jim@meyering.net>
10746
10747         * lib/fprintftime.c, lib/fprintftime.h: New files.
10748
10749 2005-12-15  Simon Josefsson  <jas@extundo.com>
10750
10751         * modules/socklen (configure.ac): Fix M4 macro name, to align with
10752         new m4/socklen.m4.
10753
10754 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
10755
10756         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
10757         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
10758
10759 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
10760
10761         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
10762         * lib/argp-help.c (fill_in_uparams): Check if the constructed
10763         struct uparams is valid. Fall back to the default values if it is
10764         not.
10765
10766 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10767
10768         * modules/argp (Files): Add argp-pin.c
10769         (Depends-on): dirname
10770         (lib_SOURCES): Add argp-pin.c
10771
10772 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10773
10774         * m4/argp.m4:  Check if program_invocation_name and
10775         program_invocation_short_name are declared and define appropriate
10776         macros if they are not.
10777
10778 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10779
10780         * lib/argp-help.c (__argp_base_name): New function
10781         (__argp_short_program_name): Rewrite using __argp_base_name
10782         * lib/argp-namefrob.h: Define program_invocation_name and
10783         program_invocation_short_name if requested
10784         (__argp_base_name): Add prototype
10785         * lib/argp-parse.c (argp_def): Use gettext wrappers
10786         (argp_default_parser): Use __argp_base_name
10787         * lib/argp-pin.c: New file. Defines program_invocation_name and
10788         program_invocation_short_name on systems that lack them.
10789
10790 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
10791
10792         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
10793         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
10794         porting problem reported by Georg Schwarz in
10795         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
10796
10797 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
10798
10799         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
10800         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
10801         porting problem reported by Georg Schwarz in
10802         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
10803
10804 2005-12-05  Bruno Haible  <bruno@clisp.org>
10805
10806         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
10807         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
10808         Reported by Mark Junker <mjscod@gmx.de>.
10809
10810 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
10811
10812         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
10813         Use implementation from Albert Chin, with some
10814         comments/corrections by Stepan Kasal and myself.
10815
10816 2005-12-02  Bruno Haible  <bruno@clisp.org>
10817
10818         * gnulib-tool (func_import): Accept GPLed build tool modules when
10819         --lgpl is given.
10820         * modules/csharpcomp-script: New file.
10821         * modules/csharpcomp: Depend on it.
10822         * modules/javacomp-script: New file.
10823         * modules/javacomp: Depend on it.
10824         Suggested by Simon Josefsson.
10825
10826 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
10827
10828         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
10829         statement, to work around an HP-UX 10.20 compiler bug reported by
10830         Peter O'Gorman.
10831
10832 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
10833
10834         * modules/savedir (Depends-on): Add openat.
10835
10836 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
10837
10838         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
10839         (uintmax_t) [defined uintmax_t]: Do not declare.
10840         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
10841         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
10842         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
10843         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
10844         sake of portability to weird hosts that C allows (though we don't
10845         know of any practical examples).
10846
10847         * lib/savedir.h (fdsavedir): New decl.
10848         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
10849         contains most of the former guts of savedir.
10850         (savedir): Use savedirstream.
10851         Include "openat.h".
10852
10853 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
10854
10855         * modules/obstack (Files): Add m4/ulonglong.m4.
10856         Problem reported by Davide Angelocola.
10857
10858 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
10859
10860         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
10861         coreutils no longer futzes with rounding modes.
10862
10863 2005-11-14  Jim Meyering  <jim@meyering.net>
10864
10865         * lib/mkstemp-safer.c: Include <config.h>, required for possible
10866         replacement of mkstemp.
10867
10868 2005-11-10  Simon Josefsson  <jas@extundo.com>
10869
10870         * lib/readline.c: Remove EOL.
10871
10872 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10873
10874         * modules/gethrxtime (Depends-on): Add gettime.
10875
10876 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10877
10878         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
10879         or gettimeofday; no longer needed.
10880
10881 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10882
10883         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
10884         time business.
10885         (gethrxtime) [! (HAVE_NANOUPTIME
10886         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
10887         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
10888         our own approximation.
10889
10890 2005-11-08  Eric Blake  <ebb9@byu.net>
10891
10892         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
10893
10894 2005-11-08  Eric Blake  <ebb9@byu.net>
10895
10896         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
10897
10898 2005-11-04  Bruno Haible  <bruno@clisp.org>
10899
10900         * gnulib-tool: Implement --update mode.
10901
10902 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
10903
10904         Fix porting problem reported by Theodoros V. Kalamatianos.
10905         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
10906         Don't assume that futimes failing means we must fail.
10907
10908 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
10909
10910         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
10911         variables to suggest the intended function of the PATH_MAX check.
10912
10913 2005-10-30  Kean Johnston  <jkj@sco.com>
10914
10915         Trivial changes to support SCO systems.
10916         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
10917         as PATH_MAX.
10918         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
10919         where __ptr is null when no I/O is pending.
10920
10921 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
10922
10923         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
10924         leave errno alone.  Problem reported by Dmitry V. Levin.
10925
10926 2005-10-28  Simon Josefsson  <jas@extundo.com>
10927
10928         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
10929         Test more.
10930
10931         * tests/test-gc-md2.c, tests/test-md2.c: New files.
10932
10933         * modules/md2, modules/md2-tests: New files.
10934
10935 2005-10-28  Simon Josefsson  <jas@extundo.com>
10936
10937         * m4/inet_ntop.m4: More tests.
10938
10939         * m4/gc-md2.m4, md2.m4: New file.
10940
10941 2005-10-28  Simon Josefsson  <jas@extundo.com>
10942
10943         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
10944         "restrict" keywords, as per POSIX.  Protect the function
10945         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
10946         Don't use K&R prototypes.  Check the sprintf return values.
10947         Re-define EAFNOSUPPORT if not present.  Indent.
10948
10949         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
10950         suggested by Bruno Haible <bruno@clisp.org>.
10951
10952         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
10953
10954         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
10955
10956         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
10957         libgcrypt).
10958
10959         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
10960
10961         * lib/md2.h, lib/md2.c: New files.
10962
10963 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
10964
10965         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
10966         errno alone.  Problem reported by Frederic Jolliton.
10967
10968 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
10969
10970         * modules/verify (License): Change from GPL to LGPL.  This is a
10971         tiny module and there are apparently near-equivalents that are
10972         under the BSD license.
10973
10974 2005-10-24  Simon Josefsson  <jas@extundo.com>
10975
10976         * modules/sha1: Relicense to LGPL.
10977
10978 2005-10-24  Simon Josefsson  <jas@extundo.com>
10979
10980         * lib/md4.h: Shrink buffer size, now that we changed the type.
10981
10982 2005-10-23  Simon Josefsson  <jas@extundo.com>
10983
10984         * gnulib-tool (func_import): Fix --tests-base.
10985
10986 2005-10-22  Simon Josefsson  <jas@extundo.com>
10987
10988         * modules/arcfour (Depends-on): Need stdint.
10989
10990 2005-10-22  Simon Josefsson  <jas@extundo.com>
10991
10992         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
10993         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
10994
10995 2005-10-22  Simon Josefsson  <jas@extundo.com>
10996
10997         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
10998         suggested by Bruno Haible <bruno@clisp.org>.
10999
11000 2005-10-22  Simon Josefsson  <jas@extundo.com>
11001
11002         * lib/crc.h: Include stddef.h, for size_t.
11003
11004 2005-10-22  Simon Josefsson  <jas@extundo.com>
11005
11006         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
11007         arcfour_context struct (simplify test vector testing in GNU
11008         Shishi).
11009
11010 2005-10-21  Simon Josefsson  <jas@extundo.com>
11011
11012         * modules/des, modules/des-tests: New files.
11013
11014         * modules/gc-des, modules/gc-des-tests: New files.
11015
11016         * tests/test-des.c, tests/test-gc-des.c: New file.
11017
11018 2005-10-21  Simon Josefsson  <jas@extundo.com>
11019
11020         * modules/arctwo, modules/arctwo-tests: New files.
11021
11022         * tests/test-arctwo.c: New file.
11023
11024         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
11025
11026         * tests/test-gc-arctwo.c: New file.
11027
11028 2005-10-21  Simon Josefsson  <jas@extundo.com>
11029
11030         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
11031         Bruno Haible <bruno@clisp.org>.
11032
11033         * m4/gc-des.m4: New file.
11034
11035 2005-10-21  Simon Josefsson  <jas@extundo.com>
11036
11037         * m4/arctwo.m4: New file.
11038
11039         * m4/gc-arctwo.m4: New file.
11040
11041 2005-10-21  Simon Josefsson  <jas@extundo.com>
11042
11043         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
11044         block.
11045
11046 2005-10-21  Simon Josefsson  <jas@extundo.com>
11047
11048         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
11049         <bruno@clisp.org>.
11050
11051         * lib/hmac-sha1.c (hmac_sha1): Likewise.
11052
11053         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
11054         Bruno Haible <bruno@clisp.org>.
11055
11056         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
11057         <bruno@clisp.org>.
11058
11059 2005-10-21  Simon Josefsson  <jas@extundo.com>
11060
11061         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
11062
11063 2005-10-21  Simon Josefsson  <jas@extundo.com>
11064
11065         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
11066
11067 2005-10-21  Simon Josefsson  <jas@extundo.com>
11068
11069         * lib/des.h, lib/des.c: New files.
11070
11071         * lib/gc-gnulib.c: Support DES.c
11072
11073 2005-10-21  Simon Josefsson  <jas@extundo.com>
11074
11075         * lib/arctwo.h, lib/arctwo.c: New files.
11076
11077         * lib/gc-gnulib.c: Support ARCTWO.
11078
11079 2005-10-21  Simon Josefsson  <jas@extundo.com>
11080
11081         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
11082         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11083
11084 2005-10-21  Simon Josefsson  <jas@extundo.com>
11085
11086         * gnulib-tool (func_import, func_create_testdir): Define automake
11087         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
11088         Makefile.am snippet),
11089         suggested by Bruno Haible <bruno@clisp.org>.
11090
11091         * modules/gc (Makefile.am): Use it.
11092
11093 2005-10-21  Bruno Haible  <bruno@clisp.org>
11094
11095         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
11096         patch.
11097
11098 2005-10-19  Simon Josefsson  <jas@extundo.com>
11099
11100         * tests/test-gc-rijndael.c: New file.
11101
11102         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
11103
11104 2005-10-19  Simon Josefsson  <jas@extundo.com>
11105
11106         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
11107         interface too.
11108
11109 2005-10-19  Simon Josefsson  <jas@extundo.com>
11110
11111         * tests/test-gc-arcfour.c: New file.
11112
11113         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
11114
11115 2005-10-19  Simon Josefsson  <jas@extundo.com>
11116
11117         * modules/gc-md4, modules/gc-md4-tests: New file.
11118
11119         * tests/test-gc-md4.c: New file.
11120
11121 2005-10-19  Simon Josefsson  <jas@extundo.com>
11122
11123         * m4/gc-md4.m4: New file.
11124
11125 2005-10-19  Simon Josefsson  <jas@extundo.com>
11126
11127         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
11128         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
11129         <kasal@ucw.cz>.
11130
11131 2005-10-19  Simon Josefsson  <jas@extundo.com>
11132
11133         * m4/gc-arcfour.m4: New file.
11134
11135         * m4/gc-rijndael.m4: New file.
11136
11137 2005-10-19  Simon Josefsson  <jas@extundo.com>
11138
11139         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
11140
11141 2005-10-19  Simon Josefsson  <jas@extundo.com>
11142
11143         * lib/gc-gnulib.c: Support ARCFOUR.
11144
11145 2005-10-19  Simon Josefsson  <jas@extundo.com>
11146
11147         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
11148         support.
11149
11150         * lib/gc.h: Add ECB enum type.
11151
11152         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
11153
11154 2005-10-18  Simon Josefsson  <jas@extundo.com>
11155
11156         * tests/test-md5.c: New file.
11157
11158         * modules/md5-tests: New file.
11159
11160 2005-10-18  Simon Josefsson  <jas@extundo.com>
11161
11162         * tests/test-md4.c: New file.
11163
11164         * modules/md4, modules/md4-tests: New files.
11165
11166 2005-10-18  Simon Josefsson  <jas@extundo.com>
11167
11168         * m4/md4.m4: New file.
11169
11170 2005-10-18  Simon Josefsson  <jas@extundo.com>
11171
11172         * lib/md4.h, lib/md4.c: New files, based on md5.?.
11173
11174 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
11175
11176         * gnulib-tool (func_create_testdir): Omit the second check whether
11177         BUILT_SOURCES in nonempty.
11178
11179 2005-10-17  Simon Josefsson  <jas@extundo.com>
11180
11181         * tests/test-rijndael.c: New file.
11182
11183 2005-10-17  Simon Josefsson  <jas@extundo.com>
11184
11185         * modules/sha1: Depend on stdint instead of md5.
11186
11187         * modules/md5: Depend on stdint, remove uint32_t.
11188
11189 2005-10-17  Simon Josefsson  <jas@extundo.com>
11190
11191         * modules/gc-sha1-tests: New file.
11192
11193         * tests/test-gc-sha1.c: New file.
11194
11195 2005-10-17  Simon Josefsson  <jas@extundo.com>
11196
11197         * m4/md5.m4: Remove call to uint32_t.m4.
11198
11199 2005-10-17  Simon Josefsson  <jas@extundo.com>
11200
11201         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
11202
11203         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
11204         md5.h.
11205
11206         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
11207
11208         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
11209
11210 2005-10-17  Simon Josefsson  <jas@extundo.com>
11211
11212         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
11213
11214 2005-10-17  Simon Josefsson  <jas@extundo.com>
11215
11216         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
11217
11218 2005-10-17  Simon Josefsson  <jas@extundo.com>
11219
11220         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
11221
11222         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
11223
11224 2005-10-17  Bruno Haible  <bruno@clisp.org>
11225
11226         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
11227         that it can also be used in a test.
11228
11229 2005-10-16  Bruno Haible  <bruno@clisp.org>
11230
11231         * gnulib-tool (func_emit_tests_Makefile_am): Also define
11232         TESTS_ENVIRONMENT, so that individual tests can augment it.
11233
11234         * gnulib-tool (func_create_testdir): Use an intermediate target for
11235         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
11236         macros, like $(ALLOCA_H), which cannot be passed through the command
11237         line.
11238
11239 2005-10-15  Simon Josefsson  <jas@extundo.com>
11240
11241         * modules/rijndael-tests: New file.
11242
11243         * modules/rijndael: New file.
11244
11245 2005-10-15  Simon Josefsson  <jas@extundo.com>
11246
11247         * m4/rijndael.m4: New file.
11248
11249 2005-10-15  Simon Josefsson  <jas@extundo.com>
11250
11251         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
11252
11253         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
11254
11255 2005-10-14  Simon Josefsson  <jas@extundo.com>
11256
11257         * tests/test-arcfour.c: New file.
11258
11259         * modules/arcfour, modules/arcfour-tests: New files.
11260
11261 2005-10-14  Simon Josefsson  <jas@extundo.com>
11262
11263         * m4/arcfour.m4: New file.
11264
11265 2005-10-14  Simon Josefsson  <jas@extundo.com>
11266
11267         * lib/arcfour.h, lib/arcfour.c: New files.
11268
11269 2005-10-14  Roland McGrath  <roland@redhat.com>
11270
11271         Import from libc.  [BZ #1331]
11272         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
11273         macro argument.
11274         Reported by Matej Vela <vela@debian.org>.
11275
11276 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
11277
11278         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
11279         include <wchar.h>; no longer needed.
11280
11281 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
11282
11283         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
11284
11285 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
11286         and  Ulrich Drepper  <drepper@redhat.com>
11287
11288         Import from libc.
11289         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
11290         instead of inline stream orientation test and two separate
11291         function calls.  Pay no attention to USE_IN_LIBIO.
11292
11293 2005-10-13  Simon Josefsson  <jas@extundo.com>
11294
11295         * modules/gc-hmac-md5-tests: New file.
11296
11297         * tests/test-gc-hmac-sha1.c: New file.
11298
11299         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
11300
11301         * modules/gc-hmac-md5-tests: New file.
11302
11303         * tests/test-gc-md5.c: New file.
11304
11305         * modules/gc-md5-tests: New file.
11306
11307 2005-10-13  Simon Josefsson  <jas@extundo.com>
11308
11309         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
11310         Move memory allocation outside of loop.
11311
11312 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
11313
11314         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
11315         intermediate directory is in a read-only file system.  Problem
11316         reported by Eric Blake.
11317
11318 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
11319
11320         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
11321
11322 2005-10-12  Simon Josefsson  <jas@extundo.com>
11323
11324         * tests/test-hmac-sha1.c: New file.
11325
11326         * modules/hmac-sha1-tests: New file.
11327
11328         * modules/hmac-sha1: New file.
11329
11330 2005-10-12  Simon Josefsson  <jas@extundo.com>
11331
11332         * modules/gc-sha1: New file.
11333
11334 2005-10-12  Simon Josefsson  <jas@extundo.com>
11335
11336         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
11337
11338         * tests/test-gc-pbkdf2-sha1.c: New file.
11339
11340 2005-10-12  Simon Josefsson  <jas@extundo.com>
11341
11342         * modules/gc-md5, modules/gc-hmac-md5: New files.
11343
11344         * modules/gc (Files): Remove md5, memxor and hmac files.
11345
11346 2005-10-12  Simon Josefsson  <jas@extundo.com>
11347
11348         * m4/gc-pbkdf2-sha1.m4: New file.
11349
11350         * m4/gc-hmac-sha1.m4: New file.
11351
11352         * m4/gc-sha1: New file.
11353
11354         * m4/hmac-sha1.m4: New file.
11355
11356 2005-10-12  Simon Josefsson  <jas@extundo.com>
11357
11358         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
11359
11360         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
11361
11362 2005-10-12  Simon Josefsson  <jas@extundo.com>
11363
11364         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
11365         suggested by Bruno Haible <bruno@clisp.org>.
11366
11367 2005-10-12  Simon Josefsson  <jas@extundo.com>
11368
11369         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
11370
11371 2005-10-12  Simon Josefsson  <jas@extundo.com>
11372
11373         * lib/gc-pbkdf2-sha1.c: New file.
11374
11375         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
11376
11377 2005-10-12  Simon Josefsson  <jas@extundo.com>
11378
11379         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
11380
11381         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
11382
11383 2005-10-12  Simon Josefsson  <jas@extundo.com>
11384
11385         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
11386         GC_USE_HMAC_MD5, respectively.
11387
11388         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
11389         (gc_md5): Fix typo.
11390
11391         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
11392
11393         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
11394
11395         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
11396
11397 2005-10-12  Bruno Haible  <bruno@clisp.org>
11398
11399         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
11400         Reported by Stepan Kasal <kasal@ucw.cz>.
11401
11402 2005-10-11  Simon Josefsson  <jas@extundo.com>
11403
11404         * tests/test-crc.c: New file.
11405
11406         * modules/crc, modules/crc-tests: New files.
11407
11408 2005-10-11  Simon Josefsson  <jas@extundo.com>
11409
11410         * m4/crc.m4: New file.
11411
11412 2005-10-11  Simon Josefsson  <jas@extundo.com>
11413
11414         * lib/gc.h: Add gc_hash and gc_hash_buffer.
11415
11416         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
11417
11418         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
11419
11420 2005-10-11  Simon Josefsson  <jas@extundo.com>
11421
11422         * lib/crc.h, lib/crc.c: New files.
11423
11424         * lib/gc.h (gc_hash_buffer): Add doc.
11425
11426 2005-10-11  Bruno Haible  <bruno@clisp.org>
11427
11428         * modules/c-strcasestr: New file.
11429         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
11430
11431 2005-10-11  Bruno Haible  <bruno@clisp.org>
11432
11433         * modules/c-strcase: New file.
11434         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
11435
11436 2005-10-11  Bruno Haible  <bruno@clisp.org>
11437
11438         * lib/strcasecmp.c: Include limits.h.
11439         (strcasecmp): Avoid integer overflow on exotic platforms.
11440         * lib/strncasecmp.c: Include limits.h.
11441         (strncasecmp): Avoid integer overflow on exotic platforms.
11442         Reported by Paul Eggert.
11443
11444 2005-10-11  Bruno Haible  <bruno@clisp.org>
11445
11446         * lib/c-strcasestr.h: New file, from GNU gettext.
11447         * lib/c-strcasestr.c: New file, from GNU gettext.
11448
11449 2005-10-11  Bruno Haible  <bruno@clisp.org>
11450
11451         * lib/c-strcase.h: New file, from GNU gettext.
11452         * lib/c-strcasecmp.c: New file, from GNU gettext.
11453         * lib/c-strncasecmp.c: New file, from GNU gettext.
11454
11455 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
11456
11457         * modules/mempcpy (License): GPL -> LGPL.
11458         * modules/strchrnul (License): Likewise.
11459         * modules/sysexits (License): Likewise.
11460
11461 2005-10-08  Simon Josefsson  <jas@extundo.com>
11462
11463         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
11464
11465 2005-10-07  Simon Josefsson  <jas@extundo.com>
11466
11467         * m4/memxor.m4: Remove gl_C_RESTRICT call.
11468
11469 2005-10-06  Simon Josefsson  <jas@extundo.com>
11470
11471         * tests/test-hmac-md5.c: New file.
11472
11473         * modules/hmac-md5-tests: New file.
11474
11475         * modules/hmac-md5: New file.
11476
11477 2005-10-06  Simon Josefsson  <jas@extundo.com>
11478
11479         * m4/hmac-md5.m4: New file.
11480
11481         * m4/memxor.m4: Require gl_C_RESTRICT.
11482
11483 2005-10-06  Simon Josefsson  <jas@extundo.com>
11484
11485         * lib/memxor.c (memxor): Avoid casts and warnings.
11486
11487 2005-10-06  Simon Josefsson  <jas@extundo.com>
11488
11489         * lib/hmac-md5.c: New file.
11490
11491         * lib/hmac.h: New file.
11492
11493 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
11494
11495         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
11496         promotes to int, not unsigned int, to catch the AIX 5.3
11497         compiler bug.
11498
11499 2005-10-05  Simon Josefsson  <jas@extundo.com>
11500
11501         * modules/memxor: New file.
11502
11503         * modules/iconv (Files): Move config.rpath to havelib, it is used
11504         there.
11505
11506         * modules/havelib (Files): Add config.rpath.
11507
11508 2005-10-05  Simon Josefsson  <jas@extundo.com>
11509
11510         * m4/memxor.m4: New file.
11511
11512 2005-10-05  Simon Josefsson  <jas@extundo.com>
11513
11514         * lib/memxor.c (memxor): Fix compiler error.
11515
11516         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
11517         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
11518
11519         * lib/memxor.h, lib/memxor.c: New files.
11520
11521         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
11522         we assume all systems have it, suggested by Jim Meyering
11523         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
11524         any systems lack sys/socket.h; mingw32 is known to lack it, but we
11525         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
11526         same reasons.
11527
11528 2005-10-05  Simon Josefsson  <jas@extundo.com>
11529
11530         * config/srclist.txt: Add glibc bug 1423 for md5.h.
11531
11532 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
11533
11534         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
11535         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
11536         needed, since the source code now assumes these .h files.
11537
11538 2005-10-05  Derek Price  <derek@ximbiot.com>
11539
11540         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
11541
11542 2005-10-05  Bruno Haible  <bruno@clisp.org>
11543
11544         * modules/stdint (License): Change to LGPL.
11545
11546 2005-10-04  Simon Josefsson  <jas@extundo.com>
11547
11548         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
11549         D. Baushke" <mdb@gnu.org>.
11550
11551 2005-10-04  Bruno Haible  <bruno@clisp.org>
11552
11553         * lib/verify.h (verify_true): Provide alternative definition for C++.
11554
11555 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
11556
11557         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
11558         (SSIZE_MAX): New macro, if not already defined.
11559         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
11560         than 2 GiB.
11561
11562 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
11563
11564         Sync from coreutils.
11565         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
11566         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
11567         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
11568         ULLONG_MAX doesn't work with 2.7.2.1.
11569
11570 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
11571
11572         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
11573         From Ben Pfaff.
11574
11575         * modules/exclude (Depends-on): Depend on verify.
11576         * modules/strtoimax (Depends-on): Likewise.
11577         * modules/utimecmp (Depends-on): Likewise.
11578
11579 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
11580
11581         * lib/exclude.c: Include verify.h.
11582         (verify): Remove.  All callers changed to use verify.h's version.
11583         * lib/strtoimax.c: Likewise.
11584         * lib/utimecmp.c: Likewis.e
11585
11586         Sync from coreutils.
11587         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
11588         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
11589         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
11590         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
11591         bother returning ENOSYS if settimeofday or stime fails; just let
11592         them return whatever errno they want to return.
11593         * lib/utimens.c: Include unistd.h, for dup2.
11594         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
11595         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
11596
11597 2005-10-02  Jim Meyering  <jim@meyering.net>
11598
11599         Sync from coreutils.
11600         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
11601         from glibc-2.2.5 that fails for read-only files.
11602
11603 2005-10-02  Jim Meyering  <jim@meyering.net>
11604
11605         Sync from coreutils.
11606         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
11607         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
11608         `#if HAVE_CONFIG_H'.
11609         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
11610         Remove AT_FDCWD test.
11611         Do not consume the fd unless successful.
11612         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
11613         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
11614         block, so that we don't even try to compile it if settimeofday is
11615         available.  This works around a compilation failure on OSF1 V5.1,
11616         due to stime requiring a `long int*' while tv_sec is `int'.
11617
11618 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
11619
11620         Sync from coreutils.
11621         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
11622         against `yes', rather than just testing for nonempty.
11623
11624 2005-10-01  Simon Josefsson  <jas@extundo.com>
11625
11626         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
11627         and Darwin.
11628
11629         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
11630         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
11631         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
11632         freeaddrinfo and gai_strerror are declared by the POSIX headers.
11633         Check if struct addrinfo is declared.
11634
11635 2005-10-01  Simon Josefsson  <jas@extundo.com>
11636
11637         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
11638         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
11639         AI_* and EAI_* definitions.  Protect function declarations.
11640
11641 2005-10-01  Jim Meyering  <jim@meyering.net>
11642
11643         Sync from coreutils.
11644
11645         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
11646         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
11647         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
11648         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
11649         in the inet and nsl libraries.  Required on Solaris 5.7.
11650
11651 2005-10-01  Jim Meyering  <jim@meyering.net>
11652
11653         Sync from coreutils.
11654         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
11655         in the inet and nsl libraries.  Required on Solaris 5.7.
11656
11657 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
11658
11659         * lib/getdelim.c (getdelim): Remove unused variables.
11660
11661 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
11662
11663         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
11664         so that the code works even with ancient cpp.  Portability problem
11665         with GCC 2.7.2.1 reported by Thomas M.Ott.
11666
11667 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
11668
11669         * modules/regex (Depends-on): Add strcase.
11670
11671         * modules/gethostname (Licence): Change from GPL to LGPL, since
11672         gethostname.c is a trivial implementation of a standard library
11673         function.
11674         * modules/poll (License): Change from GPL to LGPL, since it's
11675         derived from LGPL code.
11676
11677 2005-09-27  Jim Meyering  <jim@meyering.net>
11678
11679         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
11680         HAVE_CONFIG_H.
11681
11682         * lib/intprops.h (signed_type_or_expr__): Define.
11683         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
11684         for unsigned types.
11685
11686 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
11687
11688         * lib/verify.h (verify_expr): Remove, replacing with:
11689         (verify_true): New macro that returns true instead of void.
11690         (verify_type__): Remove.
11691         (verify): Use verify_true rather than verify_type__.
11692
11693 2005-09-26  Bruno Haible  <bruno@clisp.org>
11694
11695         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
11696         is necessary.
11697         (lib_SOURCES): Remove mbchar.c.
11698         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
11699         (Files): Add m4/mbrtowc.m4.
11700         * modules/mbiter: Likewise.
11701         * modules/mbuiter: Likewise.
11702
11703 2005-09-26  Bruno Haible  <bruno@clisp.org>
11704
11705         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
11706         compile mbchar.c if they are not both present.
11707         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
11708         * m4/mbiter.m4 (gl_MBITER): Likewise.
11709         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
11710         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
11711         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
11712
11713 2005-09-25  Jim Meyering  <jim@meyering.net>
11714
11715         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
11716         also uses socklen_t.
11717
11718 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
11719
11720         * lib/utimens.c (ENOSYS): Define if not already defined.
11721         (futimens): Support having a null PATH if the file descriptor
11722         is nonnegative.
11723
11724         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
11725         Remove.
11726         (__attribute): Define to empty unless GCC 3.1 or later.
11727         This works around a core dump on OpenBSD 3.4, which has GCC
11728         2.95.3, which dumps core when given __attribute__(()).  It also
11729         simplifies other tests, since we really don't want to bother with
11730         worrying about which ancient version of GCC supported what.
11731         Original problem reported by Yoann Vandoorselaere, with part of
11732         the fix suggested by Derek Price.
11733
11734 2005-09-24  Jim Meyering  <jim@meyering.net>
11735
11736         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
11737         so we can once again use a positive bitfield width of 1 -- now we
11738         don't have to explain why we were using a bitfield width of 2.
11739
11740 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
11741
11742         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
11743         and similarly for the other external symbols.  Problem reported
11744         by James Gallager.
11745
11746         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
11747         bug reported by Jim Meyering.
11748
11749         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
11750         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
11751         not needed, since socklen is a prerequisite module.
11752
11753 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
11754
11755         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
11756         Problem reported by Eric Blake.
11757         (getaddrinfo): Initialize se so that it's not garbage.
11758         Redo internal storage allocation so that it doesn't make unportable
11759         assumptions about alignment.
11760         Fix a memory leak.
11761
11762         * lib/utimens.c (futimens): Use futimesat if available.
11763         Prefer it to futimes since it doesn't have the futimes bug.
11764
11765         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
11766         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
11767         Instead, declare a function that returns a pointer to an array,
11768         and use verify_type__ to declare the size of the array.
11769         Problem and germ of a solution reported by Bruno Haible.
11770         (verify_type__): Use 2, not 1, for bitfield size, to avoid
11771         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
11772
11773 2005-09-23  Jim Meyering  <jim@meyering.net>
11774
11775         Sync from coreutils.
11776         Correct build failure (socklen_t not defined) on at least
11777         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
11778         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
11779
11780 2005-09-23  Jim Meyering  <jim@meyering.net>
11781
11782         * modules/getaddrinfo (Depends-on): Add socklen.
11783
11784 2005-09-23  Bruno Haible  <bruno@clisp.org>
11785
11786         * tests/test-verify.c: New file.
11787
11788 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11789
11790         Sync from coreutils.
11791
11792         * modules/argmatch (Depends-on): Add verify.
11793         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
11794         unistd-safer.
11795         * modules/save-cwd (Depends-on): Likewise.
11796
11797         * modules/openat (Files): Add lib/openat-die.c.
11798         (Depends-on): Remove error, exitfail.
11799         Add dirname.
11800
11801         * modules/verify: New file.
11802         * MODULES.html.sh (Diagnostics <assert.h>): New section,
11803         with "verify" module.
11804
11805 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11806
11807         Sync from coreutils.
11808
11809         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
11810         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
11811         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
11812         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
11813         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
11814         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
11815         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
11816         Don't bother checking for string.h, stdlib.h, unistd.h.
11817         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
11818         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
11819         module's job.
11820         * m4/jm-macros.m4 (gl_MACROS): Likewise.
11821         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
11822
11823         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
11824         (gl_GETDATE): Use it.
11825
11826         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
11827
11828 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11829
11830         Sync from coreutils.
11831
11832         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
11833         stat-time.h.
11834         * lib/argmatch.h: Include verify.h
11835         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
11836         (ARGMATCH_ASSERT): Remove; unused.
11837         * lib/canonicalize.c: Assume STDC_HEADERS.
11838         * lib/exclude.c: Include "strcase.h".
11839         * lib/regex_internal.h [!defined _LIBC]: Likewise.
11840         * lib/getusershell.c: Include stdio--.h rather than stdio.h
11841         and stdio-safer.h.
11842         (getusershell): Call fopen, not fopen_safer.
11843         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
11844         Do not include unistd-safer.h.
11845         (save_cwd): Don't call fd_safer; no longer needed
11846         now that we include fcntl--.h.
11847
11848         * lib/getdate.y (relative_time): New type.
11849         (RELATIVE_TIME_0): New constant.
11850         (parser_control): Use relative_time instead of doing it ourselves.
11851         (%union): Add new relative_time rel member.
11852         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
11853         Now typeless.
11854         (relunit, relunit_snumber): Now of type rel.
11855         (zone, rel, relunit, get_date): Adjust to above changes.
11856
11857         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
11858         Do not include unistd-safer.h.
11859         (getloadavg): Don't call fd_safer; no longer needed
11860         now that we include fcntl--.h.
11861
11862         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
11863         (make_dir_parents): Treat ENOSYS like EEXIST.
11864
11865         Improve quality of diagnostics on restore_cwd failure.
11866         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
11867         (make_dir_parents): Last arg is now int * (for errno), not bool *.
11868         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
11869         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
11870         each time through the loop.  Do not diagnose restore_cwd failure;
11871         that is the caller's job (and perhaps the caller does not care).
11872
11873         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
11874         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
11875         If the file already exists but is not a directory, don't bother
11876         to try to make its parents.
11877         Close potential file descriptor leak if we can't chdir("/") (!).
11878         Don't always return true if chdir($PWD) fails; return true only
11879         if the requested action was done successfully (except for the
11880         chdir($PWD)).
11881         Don't log final directory unless we actually made it.
11882         Refactor to avoid duplicate code to fix up permissions.
11883         Don't attempt to fix up parent permissions if chdir($PWD) fails.
11884
11885         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
11886         to make it a bit faster and (I hope) clearer.
11887         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
11888         Fix bug in formats like %2N.
11889
11890         * lib/verify.h: New file.
11891
11892 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11893
11894         Sync from coreutils.
11895         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
11896
11897 2005-09-22  Jim Meyering  <jim@meyering.net>
11898
11899         Sync from coreutils.
11900
11901         * m4/lstat.m4 (gl_FUNC_LSTAT):
11902         Use AC_LIBSOURCES to require lstat.c and lstat.h.
11903         Remove obsolete comment.
11904         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
11905         * m4/xstrtod.m4: Likewise.
11906
11907         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
11908
11909 2005-09-22  Jim Meyering  <jim@meyering.net>
11910
11911         Sync from coreutils.
11912
11913         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
11914
11915         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
11916         the .tm_year member, since otherwise gcc-4.0 would now warn about
11917         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
11918
11919         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
11920         order to avoid an unsuppressible warning from gcc on 64-bit systems.
11921
11922         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
11923         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
11924         when run in a time zone for which daylight savings time is in effect
11925         for the starting date.
11926
11927         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
11928         stop us from restricting permissions of just-created absolute-named
11929         directories.
11930         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
11931         to restore initial working directory.
11932         * lib/mkdir-p.c (make_dir_parents): New parameter:
11933         different_working_dir, to tell caller if/when we change the working
11934         directory and are unable to return to the initial one.
11935         * lib/mkdir-p.h (make_dir_parents): Update prototype.
11936         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
11937         `return false'.  This fixes a bug introduced on 2004-07-30.
11938
11939         * lib/openat.c (fdopendir): Be sure to close the supplied
11940         file descriptor before returning.  This makes our replacement
11941         implementation a little closer to Solaris's, where fdopendir
11942         ties the file descriptor to the returned DIR* pointer.
11943         * lib/openat.c (unlinkat): New function.
11944         * lib/openat.h (unlinkat): Add prototype.
11945         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
11946         (openat_restore_fail): Rename from openat_restore_die.
11947         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
11948
11949         Provide an alternative to exiting immediately upon save_cwd or
11950         restore_cwd failure.  Now, an application can arrange e.g.,
11951         to perform a longjump in that case.
11952         * lib/openat.c: Include dirname.h.
11953         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
11954         (rpl_openat, fdopendir, fstatat): Call openat_save_die
11955         and openat_restore_die rather than calling error directly.
11956         Don't include "error.h" or "exitfail.h"; they're no longer needed.
11957
11958         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
11959         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
11960         define.
11961
11962         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
11963         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
11964                             int utc, int nanoseconds);
11965         Background:
11966         date should not have to allocate a megabyte of virtual memory to
11967         handle a format argument like +%1048575T.  When implemented with
11968         strftime, it must allocate such a buffer, use strftime to fill it
11969         in, print it, then free it.
11970         With fprintftime, it simply prints everything and exits.
11971         With no need for memory allocation, that's one fewer way to fail.
11972         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
11973         optional field width, not before, so we accept %9:z, not %:9z.
11974         (my_strftime): Be sure to use L_('x') for literals.
11975
11976         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
11977         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
11978         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
11979         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
11980         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
11981         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
11982         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
11983         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
11984         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
11985         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
11986         * lib/xgethostname.c, lib/xreadlink.c:
11987         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
11988
11989         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
11990         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
11991         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
11992         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
11993         and don't include <sys/file.h>).
11994
11995 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
11996
11997         Sync from coreutils.
11998
11999         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
12000         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
12001         [!LDAV_DONE]: Avoid unused variable warning.
12002
12003 2005-09-21  Bruno Haible  <bruno@clisp.org>
12004
12005         * lib/unicodeio.h (unicode_to_mb): New declaration.
12006
12007 2005-09-20  Derek Price  <derek@ximbiot.com>
12008
12009         * lib/getaddrinfo.c: Don't include <netdb.h> included from
12010         getaddrinfo.h.
12011
12012 2005-09-20  Bruno Haible  <bruno@clisp.org>
12013
12014         * gnulib-tool: Remove trailing slashes from the values specified for
12015         --source-base, --m4-base, --tests-base, --aux-dir.
12016         Suggested by Simon Josefsson <jas@extundo.com>.
12017
12018 2005-09-20  Bruno Haible  <bruno@clisp.org>
12019
12020         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
12021         func_modules_to_filelist, func_import, func_create_testdir): Make all
12022         sorting results locale-independent, so that gnulib-cache.m4 doesn't
12023         change when gnulib-tool is invoked in a different locale.
12024
12025 2005-09-19  Simon Josefsson  <jas@extundo.com>
12026
12027         * m4/socklen.m4: Fix typo.
12028
12029 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12030
12031         Use a consistent style for including <config.h>.
12032         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
12033         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
12034         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
12035         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
12036         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
12037         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
12038         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
12039         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
12040         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
12041         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
12042         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
12043         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
12044         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
12045         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
12046         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
12047         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
12048         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
12049         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
12050         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
12051         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
12052         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
12053         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
12054         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
12055         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
12056         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
12057         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
12058         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
12059         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
12060         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
12061         lib/xstrtoumax.c, lib/yesno.c:
12062         Standardize inclusion of config.h.
12063         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
12064         lib/inttostr.h:  Removed inclusion of config.h from header files.
12065         * lib/inttostr.c:  Adjusted in-tree users.
12066         * lib/timespec.h: Remove superfluous warning to include config.h.
12067         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
12068         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
12069         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
12070         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
12071         config.h with HAVE_CONFIG_H.
12072
12073 2005-09-19  Jim Meyering  <jim@meyering.net>
12074
12075         * modules/pathmax (License): Change to LGPL.
12076
12077 2005-09-19  Derek Price  <derek@ximbiot.com>
12078
12079         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
12080
12081 2005-09-19  Bruno Haible  <bruno@clisp.org>
12082
12083         * gnulib-tool (import): Provide default for --tests-base.
12084
12085 2005-09-19  Bruno Haible  <bruno@clisp.org>
12086
12087         * doc/quote.texi: New file, extracted from gnulib.texi.
12088         * doc/ctime.texi: New file, extracted from gnulib.texi.
12089         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
12090         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
12091         * doc/gnulib.texi: Include them.
12092
12093 2005-09-18  Bruno Haible  <bruno@clisp.org>
12094
12095         Portability fix.
12096         * gnulib-tool (func_readlink): New function.
12097         (func_ln_if_changed): Use it.
12098
12099 2005-09-18  Bruno Haible  <bruno@clisp.org>
12100
12101         * gnulib-tool: Support --with-tests also with --import.
12102         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
12103         (func_import): Use variables $testsbase and $inctests. Emit a
12104         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
12105         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
12106         SUBDIRS += $testsdir.
12107         (func_create_testdir): Update.
12108
12109 2005-09-18  Bruno Haible  <bruno@clisp.org>
12110
12111         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
12112         instead of $dry_run.
12113         (func_cp_if_changed, func_mv_if_changed): Remove functions.
12114         (func_ln_if_changed): Don't handle dry-run here.
12115         (func_import): In dry-run mode, detect more precisely which actions
12116         would be performed, and don't use "...ing" verbs.
12117
12118 2005-09-18  Bruno Haible  <bruno@clisp.org>
12119
12120         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
12121         (func_import): Use join on two temporary files instead of three nested
12122         loops, in order to determine which files are new or old.
12123
12124 2005-09-18  Bruno Haible  <bruno@clisp.org>
12125
12126         * gnulib-tool (func_import): Comment out code that spits out the
12127         new files with --dry-run.
12128
12129 2005-09-18  Bruno Haible  <bruno@clisp.org>
12130
12131         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
12132
12133 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
12134
12135         * lib/stat-time.h: New file.
12136         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
12137         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
12138         in a different way.
12139         (timespec_cmp): New function.
12140         * lib/utimecmp.c: Include stat-time.h.
12141         (SYSCALL_RESOLUTION): Depend on whether various struct stat
12142         members exist, not on the obsolescent ST_MTIM_NSEC.
12143         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
12144
12145 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
12146
12147         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
12148
12149 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
12150
12151         * MODULES.html.sh (File system functions): Add stat-time.
12152         * modules/stat-time: New file.
12153         * modules/timespec (Files): Remove m4/st_mtim.m4; this
12154         is now done in a different way, by the stat-time module.
12155         * modules/utimecmp (Depends-on): Add stat-time.
12156
12157 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
12158
12159         * m4/st_mtim.m4: Remove.  Superseded by...
12160         * m4/stat-time.m4: New file.
12161         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
12162         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
12163
12164 2005-09-15  Derek Price  <derek@ximbiot.com>
12165
12166         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
12167
12168 2005-09-15  Derek Price  <derek@ximbiot.com>
12169
12170         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
12171         * lib/regex_internal.c: Ditto, using this...
12172         (__GNUC_PREREQ): ...new macro.
12173         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
12174         using...
12175         (__GNUC_PREREQ): ...this new macro.
12176
12177         * lib/strstr.h: Include string.h. Define strstr as a macro here.
12178
12179 2005-09-15  Derek Price  <derek@ximbiot.com>
12180             Paul Eggert  <eggert@cs.ucla.edu>
12181
12182         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
12183         changes, consolidating in...
12184         * lib/regex_internal.h: ...this file.
12185
12186 2005-09-13  Jim Meyering  <jim@meyering.net>
12187
12188         * lib/canon-host.c: Filter through gnu indent and reword comments
12189         slightly.
12190         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
12191
12192 2005-09-13  Derek Price  <derek@ximbiot.com>
12193
12194         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
12195         failure.
12196         Reported by Jim Meyering  <jim@meyering.net>.
12197
12198 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
12199
12200         * lib/base64.c: Typo.
12201         (base64_encode): Put b64str in initialized data section.
12202
12203 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
12204
12205         Merge glibc and coreutils changes into gnulib, plus a few
12206         extra fixes.
12207         * lib/md5.c: Use #error rather than a string.
12208         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
12209         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
12210         (__attribute__): Define to empty for non recent-GCC.
12211         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
12212         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
12213         Renamed from their non-__ counterparts, with new macros replacing
12214         them if not _LIBC.  Add __THROW attribute.
12215         (rol): Remove.
12216         (struct md5_ctx): Align buffer if using GCC.
12217         * lib/sha1.h (struct sha1_ctx): Likewise.
12218         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
12219         The old name was backwards.
12220         (NOTSWAP): Remove; not used.
12221         (rol): New macro, moved here from md5.h.
12222         (sha1_process_block): Remove a FIXME that doesn't make sense.
12223
12224 2005-09-12  Derek Price  <derek@ximbiot.com>
12225
12226         Return usable errors from canon-host.
12227         * lib/canon-host.h: New file.
12228         * lib/canon-host.c (canon_host): Wrap...
12229         (canon_host_r): ...this new function, which now relies exclusively on
12230         getaddrinfo.
12231         (ch_strerror): New function.
12232         (last_cherror): New global.
12233         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
12234         interface.
12235         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
12236         void *.
12237         (freeaddrinfo): Free ai->ai_canonname when set.
12238
12239 2005-09-12  Derek Price  <derek@ximbiot.com>
12240
12241         Make canon-host require getaddrinfo.
12242         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
12243         AC_LIBSOURCE canon-host.h.  Call...
12244         (gl_PREREQ_CANON_HOST): ...this new function, which requires
12245         gl_GETADDRINFO.
12246         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
12247
12248 2005-09-12  Derek Price  <derek@ximbiot.com>
12249
12250         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
12251         LGPL.
12252         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
12253
12254 2005-09-12  Derek Price  <derek@ximbiot.com>
12255
12256         * lib/gai_strerror.c: Include config.h when available.  Include
12257         getaddrinfo.h before other headers to test interface.
12258         Reported by Larry Jones <lawrence.jones@ugs.com>.
12259
12260 2005-09-12  Derek Price  <derek@ximbiot.com>
12261             Paul Eggert  <eggert@cs.ucla.edu>
12262
12263         * modules/glob (Files): Add glob-libc.h.
12264
12265 2005-09-12  Derek Price  <derek@ximbiot.com>
12266             Paul Eggert  <eggert@cs.ucla.edu>
12267
12268         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
12269         glob_.h, glob-libc.h.
12270         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
12271
12272 2005-09-12  Derek Price  <derek@ximbiot.com>
12273             Paul Eggert  <eggert@cs.ucla.edu>
12274
12275         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
12276         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
12277         protecting things that should be done only in gnulib contexts.
12278         * lib/glob_.h: New file, containing only the glob things needed for
12279         gnulib.
12280         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
12281         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
12282         (glob, globfree, glob_pattern_p): Now defined simply in terms of
12283         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
12284         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
12285         and to respect the namespace rules better.
12286
12287 2005-09-08  Simon Josefsson  <jas@extundo.com>
12288
12289         * modules/socklen: New file.
12290
12291 2005-09-08  Simon Josefsson  <jas@extundo.com>
12292
12293         * m4/socklen.m4: New file.
12294
12295 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12296
12297         * modules/utimens (Files): Add m4/utimbuf.m4, since
12298         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
12299         Reported by Sergey Poznyakoff.
12300
12301 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12302
12303         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
12304         definitions, since that's the preferred style in glibc.
12305         Fix a minor spacing issue, and update copyright notice to match
12306         glibc's.
12307
12308 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12309
12310         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
12311
12312 2005-09-06  Simon Josefsson  <jas@extundo.com>
12313
12314         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
12315         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
12316
12317 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
12318
12319         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
12320         warning.
12321
12322 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
12323
12324         * config/srclist.txt: Add glibc bug 1302.
12325
12326 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
12327
12328         Change bitset word type from unsigned int to unsigned long int,
12329         as this has better performance on typical 64-bit hosts.
12330         Port bitset code to hosts with unusual word sizes.
12331         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
12332         (build_collating_symbol):
12333         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
12334         argument is a bitset.  This is merely a style issue, but it makes
12335         it clearer that an entire array is expected.
12336         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
12337         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
12338         Port to the case where bitset_word is not the same as unsigned int.
12339         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
12340         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
12341         Likewise.
12342         * lib/regexec.c (check_dst_limits_calc_pos_1,
12343         check_subexp_matching_top):
12344         (build_trtable, group_nodes_into_DFAstates):
12345         Likewise.
12346         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
12347         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
12348         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
12349         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
12350         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
12351         * lib/regcomp.c (optimize_subexps, lower_subexp):
12352         Work even if bitset_word has holes in its bitwise representation.
12353         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
12354         * lib/regexec.c (check_dst_limits_calc_pos_1,
12355         check_subexp_matching_top):
12356         Likewise.
12357         * lib/regex_internal.c (re_string_reconstruct):
12358         Don't assume UCHAR_MAX == 255.
12359         * lib/regex_internal.h (bitset_set_all): Likewise.
12360         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
12361         All uses changed.
12362         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
12363         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
12364         All uses changed.
12365         (BITSET_WORD_MAX): New macro.
12366         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
12367         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
12368         (bitset_empty, bitset_copy):
12369         Prefer sizeof (bitset) to multiplying it out ourselves.
12370         (bitset_not_merge): Remove; unused.
12371         (bitset_contain): Return bool, not unsigned int with one bit on.
12372         All callers changed.
12373         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
12374         alignment than re_node_set; do this by defining a new internal
12375         type struct dests_alloc and using it to allocate memory.
12376
12377 2005-09-05  Bruno Haible  <bruno@clisp.org>
12378
12379         * gnulib-tool (func_import): Fix comparison in handling of symbolic
12380         links.
12381
12382 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
12383
12384         * modules/size_max (Makefile.am): Add size_max.h
12385
12386 2005-09-04  Derek Price  <derek@ximbiot.com>
12387
12388         * gnulib-tool (func_import): Fix reversed $symbolic logic.
12389
12390 2005-09-03  Simon Josefsson  <jas@extundo.com>
12391
12392         * gnulib-tool: Fix typo.
12393
12394 2005-09-03  Simon Josefsson  <jas@extundo.com>
12395
12396         * config/srclist.txt: Add glibc bug 1293.
12397
12398 2005-09-03  Derek Price  <derek@ximbiot.com>
12399
12400         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
12401         From Larry Jones <lawrence.jones@ugs.com>.
12402
12403 2005-09-02  Simon Josefsson  <jas@extundo.com>
12404
12405         * modules/socklen: New file.
12406
12407 2005-09-02  Simon Josefsson  <jas@extundo.com>
12408
12409         * modules/havelib: New module.
12410
12411         * modules/gettext, modules/iconv, modules/lock, modules/readline:
12412         Use havelib.
12413
12414 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
12415
12416         Check for arithmetic overflow when calculating sizes, to prevent
12417         some buffer-overflow issues.  These patches are conservative, in the
12418         sense that when I couldn't determine whether an overflow was possible,
12419         I inserted a run-time check.
12420         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
12421         macros.
12422         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
12423         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
12424         (re_xnrealloc, re_x2nrealloc): New inline functions.
12425         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
12426         parse_bracket_exp):
12427         (build_equiv_class, build_charclass): Check for arithmetic overflow
12428         in size expression calculations.
12429         * lib/regex_internal.c (re_string_realloc_buffers):
12430         (build_wcs_upper_buffer, re_node_set_add_intersect):
12431         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
12432         (re_dfa_add_node, register_state): Likewise.
12433         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
12434         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
12435         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
12436         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
12437
12438 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
12439
12440         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
12441         m4/ulonglong.m4.  Problem reported by Martin Lambers.
12442
12443 2005-09-02  Bruno Haible  <bruno@clisp.org>
12444
12445         Support for lib vs. lib64 distinction on biarch platforms.
12446         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
12447         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
12448         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
12449
12450 2005-09-02  Bruno Haible  <bruno@clisp.org>
12451
12452         * gnulib-tool (import): In the other first-use case, provide defaults
12453         as well.
12454
12455 2005-09-02  Bruno Haible  <bruno@clisp.org>
12456
12457         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
12458         patches not yet found in the latest gettext release.
12459
12460 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
12461
12462         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
12463         to avoid a collision with bits/local_lim.h in glibc.
12464         All uses changed.  Problem reported by Dmitry V. Levin in
12465         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
12466
12467         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
12468         bugs in int versus size_t comparisons.
12469         (re_string_context_at): Fix bug where the code assumed that
12470         Idx is signed.
12471
12472         Use bool where appropriate.
12473         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
12474         All callers changed.
12475         (calc_eclosure_iter): Likewise, for ROOT arg.
12476         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
12477         (build_charclass_op): Likewise, for NON_MATCH arg.
12478         * lib/regex_internal.c (re_string_allocate, re_string_construct):
12479         (re_string_construct_common): Likewise, for ICASE arg.
12480         * lib/regexec.c (re_search_2_stub, re_search_stub):
12481         Likewise, for RET_LEN arg.
12482         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
12483         (set_regs): Likewise, for FL_BACKTRACK arg.
12484         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
12485         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
12486         (calc_eclosure_iter, parse_bracket_exp):
12487         Use bool for internal variables that are booleans.
12488         * lib/regexec.c (re_search_internal, check_matching,
12489         proceed_next_node):
12490         (set_regs, build_sifted_states, sift_states_bkref):
12491         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
12492         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
12493         (find_collation_sequence_value):
12494         Likewise.
12495         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
12496         (re_node_set_compare):
12497         Return bool, not int. All callers changed.
12498         * lib/regexec.c (check_halt_node_context, check_dst_limits):
12499         (build_trtable, check_node_accept): Likewise.
12500         * lib/regex_internal.h: Include stdbool.h.
12501
12502         Fix bugs uncovered when converting to bool.
12503         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
12504         failure instead of charging ahead blindly.
12505         * lib/regex_internal.c (register_state): Likewise.
12506         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
12507         for freeing internal storage.
12508         (group_nodes_into_DFA_states): Use unsigned int, not int, for
12509         bitset pieces used as boolean, to avoid undefined behavior
12510         on hosts that do int overflow checking.
12511
12512 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
12513
12514         * config/srclist.txt: Add glibc bugs 1285-1287.
12515
12516 2005-09-01  Jim Meyering  <jim@meyering.net>
12517
12518         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
12519         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
12520         Require gl_STAT_MACROS, too.
12521
12522 2005-09-01  Bruno Haible  <bruno@clisp.org>
12523
12524         * gnulib-tool (import): In the first-use case, provide defaults.
12525
12526 2005-09-01  Bruno Haible  <bruno@clisp.org>
12527
12528         * gnulib-tool (func_import): Remove the .tmp files.
12529
12530 2005-09-01  Bruno Haible  <bruno@clisp.org>
12531
12532         * gnulib-tool (func_import): Fix handling of symbolic links.
12533
12534 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12535
12536         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
12537         old glibc regex code mishandles strings longer than 2**31 bytes.
12538         This patch fixes this when the regex code is used in gnulib
12539         (i.e., outside glibc).
12540
12541         This patch should not affect the use of the regex code inside
12542         glibc.  No doubt this problem also needs to be handled for glibc
12543         as well, but the result will be an incompatible change to the
12544         glibc ABI, and the old ABI will have to be supported too.  That
12545         can be the the subject for another patch.
12546
12547         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
12548         governing whether the rest of this patch is active.  By default,
12549         the macro is disabled and the patch has no effect.
12550         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
12551         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
12552         (struct re_pattern_buffer, re_search, re_search_2, re_match):
12553         (re_match_2, re_set_registers): Use the new types.
12554         * lib/regex_internal.h (Idx, re_hashval_t): New types.
12555         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
12556         New macros.
12557         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
12558         (re_string_context_at, bin_tree_t, re_dfastate_t):
12559         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
12560         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
12561         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
12562         (re_string_char_size_at, re_string_wchar_at):
12563         (re_string_elem_size_at):
12564         Use the new types and macros to port to 64-bit hosts.
12565         Use unsigned types for internal values, so that the code
12566         mostly works even for arrays larger than SSIZE_MAX.
12567         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
12568         (search_duplicated_node, calc_eclosure_iter, fetch_number):
12569         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
12570         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
12571         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
12572         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
12573         (calc_inveclosure, parse_dup_op, build_range_exp):
12574         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
12575         (fetch_number, create_token_tree, mark_opt_subexp):
12576         Likewise.
12577         * lib/regex_internal.c (re_string_construct_common,
12578         create_ci_newstate):
12579         (create_cd_newstate, re_string_allocate, re_string_construct):
12580         (re_string_realloc_buffers, build_wcs_upper_buffer):
12581         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
12582         (re_string_reconstruct, re_string_peek_byte_case):
12583         (re_string_fetch_byte_case, re_string_context_at):
12584         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
12585         (re_node_set_init_copy, re_node_set_add_intersect):
12586         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
12587         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
12588         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
12589         (re_acquire_state, re_acquire_state_context, register_state):
12590         Likewise.
12591         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
12592         search_cur_bkref_entry):
12593         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
12594         (re_search_internal, re_search_2_stub, re_search_stub)
12595         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
12596         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
12597         (update_cur_sifted_state, check_dst_limits):
12598         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
12599         (check_subexp_limits, sift_states_bkref, merge_state_array):
12600         (check_subexp_matching_top, get_subexp, get_subexp_sub):
12601         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
12602         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
12603         (expand_bkref_cache, check_node_accept_bytes):
12604         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
12605         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
12606         (acquire_init_state_context, check_halt_node_context):
12607         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
12608         (sift_states_backward, clean_state_log_if_needed):
12609         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
12610         (find_recover_state, transit_state_sb, transit_state_mb):
12611         (transit_state_bkref, build_trtable, match_ctx_clean):
12612         Likewise.
12613         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
12614         to work around an assumption that REG_MISSING is negative.
12615
12616         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
12617         (seek_collating_symbol_entry) [defined _LIBC]:
12618         (lookup_collation_sequence_value) [defined _LIBC]:
12619         (build_range_exp, build_collating_symbol) [defined _LIBC]:
12620         Use prototypes rather than old-style function definitions.
12621         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
12622         (transit_state_sb) [0]:
12623         (find_collation_sequence_value) [defined _LIBC]: Likewise.
12624
12625         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
12626         rm_eo.
12627
12628         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
12629         (optimize_subexps, lower_subexp):
12630         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
12631         since the signed shift might overflow.  Use 1u<<31 instead.
12632         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
12633         Likewise.
12634         * lib/regexec.c (check_dst_limits_calc_pos_1,
12635         check_subexp_matching_top): Likewise.
12636
12637         * lib/regcomp.c (optimize_subexps, lower_subexp):
12638         Use CHAR_BIT rather than 8, for clarity.
12639         * lib/regexec.c (check_dst_limits_calc_pos_1):
12640         (check_subexp_matching_top): Likewise.
12641         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
12642         have to worry about portability issues when shifting it left.
12643         Remove no-longer-needed test for table_size > 0.
12644         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
12645         in a word, as the resulting behavior is undefined.
12646         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
12647         in one case, a <= should have been an <, and in another case the
12648         whole test was missing.
12649         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
12650         the standard name CHAR_BIT.
12651         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
12652         this is not true on one's complement and signed-magnitude hosts.
12653
12654         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
12655         next_last_offset.
12656         (struct re_dfa_t): Remove unused member states_alloc.
12657         * lib/regcomp.c (init_dfa): Don't initialize unused members.
12658
12659 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12660
12661         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
12662         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
12663         and large-file glibc and in 32-bit large-file Solaris.
12664
12665 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12666
12667         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
12668         lengths fit in regoff_t; this isn't true if regoff_t is the same
12669         width as size_t.
12670         * lib/regex.c (re_search_internal): 5th arg is LAST_START
12671         (= START + RANGE) instead of RANGE.  This avoids overflow
12672         problems when regoff_t is the same width as size_t.
12673         All callers changed.
12674         (re_search_2_stub): Check for overflow when adding the
12675         sizes of the two strings.
12676         (re_search_stub): Check for overflow when adding START
12677         to RANGE; if it occurs, substitute the extreme value.
12678
12679 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12680
12681         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
12682
12683 2005-08-31  Jim Meyering  <jim@meyering.net>
12684
12685         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
12686         a pointer-to-const.
12687         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
12688         (register_state): Likewise.
12689         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
12690         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
12691         (group_nodes_into_DFAstates): Likewise.
12692
12693 2005-08-31  Jim Meyering  <jim@meyering.net>
12694
12695         * check-module: Add a FIXME comment.
12696
12697 2005-08-31  Eric Blake  <ebb9@byu.net>
12698
12699         * modules/unistd-safer (Files): Add unistd--.h.
12700         * modules/stdio-safer (Files): Add stdio--.h.
12701
12702 2005-08-31  Derek Price  <derek@ximbiot.com>
12703
12704         * lib/getdelim.c (getdelim): Return EOF on EOF.
12705         Reported by Larry Jones <lawrence.jones@ugs.com>.
12706
12707 2005-08-31  Bruno Haible  <bruno@clisp.org>
12708
12709         Avoid unnecessary diffs in the generated lib/Makefile.am.
12710         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
12711         the generated files.
12712         (func_import): Don't set cmd.
12713
12714 2005-08-31  Bruno Haible  <bruno@clisp.org>
12715
12716         * lib/strstr.c: Include <stddef.h>, for NULL.
12717         * lib/strcasestr.c: Likewise.
12718         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
12719
12720 2005-08-31  Bruno Haible  <bruno@clisp.org>
12721
12722         * gnulib-tool: New option --macro-prefix.
12723         (func_import): Use macro_prefix.
12724         (import): Handle option --macro-prefix.
12725
12726 2005-08-31  Bruno Haible  <bruno@clisp.org>
12727
12728         * gnulib-tool (import): Rename most ac_* variables to cached_*.
12729         Also use new variables cached_lgpl, cached_libtool.
12730
12731 2005-08-31  Bruno Haible  <bruno@clisp.org>
12732
12733         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
12734         always instantiating them.
12735
12736 2005-08-31  Bruno Haible  <bruno@clisp.org>
12737
12738         * gnulib-tool (func_import): Read the previous cached settings
12739         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
12740         earlier added by gnulib but are now dropped. Warn when a gnulib file
12741         overwrites a non-gnulib file.
12742
12743 2005-08-31  Bruno Haible  <bruno@clisp.org>
12744
12745         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
12746         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
12747         projects that don't keep autogenerated files in CVS. Put into
12748         actioncmd only the specified modules, not the transitive closure.
12749
12750 2005-08-31  Bruno Haible  <bruno@clisp.org>
12751
12752         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
12753         Create directories that shall be filled.
12754         (import): Don't look for gl_* macros in configure.ac. Recurse across
12755         all directories containing a gnulib-cache.m4 files, if meaningful.
12756
12757 2005-08-31  Bruno Haible  <bruno@clisp.org>
12758
12759         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
12760         (import): Set seen_libtool when we see gl_LIBTOOL.
12761
12762 2005-08-31  Bruno Haible  <bruno@clisp.org>
12763
12764         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
12765         declaration macro definitions from generated gnulib.m4.
12766
12767 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
12768
12769         * lib/iconvme.h: Add prototype for iconv_alloc.
12770
12771 2005-08-29  Simon Josefsson  <jas@extundo.com>
12772
12773         * lib/iconvme.c: Fix errno.
12774
12775 2005-08-29  Bruno Haible  <bruno@clisp.org>
12776
12777         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
12778         that it works when the directory contains spaces.
12779
12780 2005-08-29  Bruno Haible  <bruno@clisp.org>
12781
12782         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
12783
12784 2005-08-29  Bruno Haible  <bruno@clisp.org>
12785
12786         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
12787         Emit more advice.
12788
12789 2005-08-29  Bruno Haible  <bruno@clisp.org>
12790         and Stepan Kasal  <kasal@ucw.cz>
12791
12792         * check-module: If more parameters are given, check each of them
12793         separately; add more exceptions, as noted by Jim Meyering.
12794         (check_module): New procedure.
12795         (%exempt_header): Now contains all exceptions.
12796
12797 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
12798
12799         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
12800
12801 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
12802
12803         * lib/iconvme.c: Split iconv_string into iconv_alloc.
12804
12805 2005-08-28  Bruno Haible  <bruno@clisp.org>
12806
12807         * m4/gnulib-tool.m4: New file.
12808
12809 2005-08-27  Jim Meyering  <jim@meyering.net>
12810
12811         * modules/unistd-safer (Files): Add pipe-safer.c.
12812         * modules/fcntl-safer (Files): Add creat-safer.c.
12813
12814 2005-08-27  Jim Meyering  <jim@meyering.net>
12815
12816         * m4/stdlib-safer.m4: New file.  From coreutils.
12817         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
12818         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
12819         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
12820         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
12821         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
12822
12823 2005-08-27  Jim Meyering  <jim@meyering.net>
12824
12825         * lib/fopen-safer.c: Merge minor changes from coreutils.
12826         * lib/dup-safer.c: Likewise.
12827         * lib/fd-safer.c: Likewise.
12828
12829         Merge from coreutils.
12830         * lib/stdio--.h: New file.
12831         * lib/stdlib--.h: New file.
12832         * lib/mkstemp-safer.c: New file.
12833
12834         GNU tar needs these.
12835         * lib/pipe-safer.c: New file.
12836         * lib/creat-safer.c: New file.
12837         * lib/fcntl--.h (creat): Define to creat_safer.
12838         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
12839         * lib/unistd--.h (pipe): Define to pipe_safer.
12840         * lib/unistd-safer.h: Declare pipe_safer.
12841
12842 2005-08-26  Simon Josefsson  <jas@extundo.com>
12843
12844         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
12845         Haible <bruno@clisp.org>.
12846
12847 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
12848
12849         * lib/regex_internal.h: Remove all references to
12850         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
12851         or better.
12852         (bitset_not, bitset_merge, bitset_not_merge):
12853         (bitset_mask, re_string_allocate, re_string_construct):
12854         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
12855         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
12856         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
12857         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
12858         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
12859         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
12860         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
12861         (re_acquire_state_context):
12862         Remove unnecessary forward decls.
12863         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
12864         Put __attribute at function definition,
12865         now that the function decl has been removed.
12866         * lib/regex_internal.c (re_string_peek_byte_case):
12867         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
12868         Likewise.
12869
12870 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
12871
12872         * m4/regex.m4: Add AC_PREREQ(2.50).
12873         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
12874
12875 2005-08-25  Simon Josefsson  <jas@extundo.com>
12876
12877         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
12878         __fsetlocking.
12879
12880 2005-08-25  Simon Josefsson  <jas@extundo.com>
12881
12882         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
12883         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
12884         GLIBC specific code.
12885
12886 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12887
12888         Make regex safe for g++.  This fixes one real bug (an "err"
12889         that should have been "*err").  g++ problem reported by
12890         Sam Steingold.
12891         * lib/regex_internal.h (re_calloc): New macro, consistent with
12892         re_malloc etc.  All callers of calloc changed to use re_calloc.
12893         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
12894         not int.  All callers changed.
12895         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
12896         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
12897         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
12898         (find_recover_state): Change "err" to "*err"; this fixes what
12899         appears to be a real bug.
12900         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
12901         versus int.
12902
12903 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12904
12905         * modules/regex (Depends-on): Add malloc, since the code
12906         assumes that !malloc(0) means failure.
12907
12908 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12909
12910         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
12911
12912         alloca modernization/simplification for regex.
12913         * lib/regex.c: Remove portability cruft for alloca.  This no longer
12914         needs to be at the start of the file, and can be moved into
12915         regex_internal.h and simplified.
12916         * lib/regex_internal.h: Include <alloca.h>.
12917         (__libc_use_alloca) [!defined _LIBC]: New macro.
12918         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
12919         now works outside glibc.
12920
12921 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12922
12923         * config/srclist.txt: Add glibc bugs 1241, 1245.
12924
12925 2005-08-25  Jim Meyering  <jim@meyering.net>
12926
12927         * lib/open-safer.c: Include <config.h>.
12928         Otherwise, we'd lose LARGEFILE support in any file using
12929         e.g. "fcntl--.h"
12930
12931 2005-08-25  Bruno Haible  <bruno@clisp.org>
12932
12933         * m4/minmax.m4: Require autoconf 2.52.
12934         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
12935         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
12936         alternatives of translit over the alphabet.
12937         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
12938
12939 2005-08-24  Simon Josefsson  <jas@extundo.com>
12940
12941         * tests/test-getpass.c: New file.
12942
12943 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12944
12945         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
12946         for GNU regex features.
12947
12948 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12949
12950         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
12951         * lib/regex.h (regerror): Likewise.
12952
12953         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
12954         requires this.  (The code never needed it.)
12955
12956         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
12957         All uses of recently-renamed identifiers changed to use the new,
12958         POSIX-compliant names.  The code will build and run just fine
12959         without these changes, but it's better to eat our own dog food
12960         and use the standard-conforming names.
12961
12962         * lib/regex.h: Fix a multitude of POSIX name space violations.
12963         These changes have an effect only for programs that define
12964         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
12965         do not change anything for programs compiled in the normal way.
12966         Also, there is no effect on the ABI.
12967
12968         (_REGEX_SOURCE): New macro.
12969         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
12970         defined and _GNU_SOURCE is not; this fixes a name space violation.
12971
12972         Rename the following macros to obey POSIX requirements.
12973         The old names are still visible as macros if _REGEX_SOURCE is defined.
12974         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
12975         RE_BACKSLASH_ESCAPE_IN_LISTS.
12976         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
12977         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
12978         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
12979         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
12980         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
12981         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
12982         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
12983         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
12984         (REG_INTERVALS): renamed from RE_INTERVALS.
12985         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
12986         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
12987         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
12988         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
12989         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
12990         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
12991         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
12992         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
12993         RE_UNMATCHED_RIGHT_PAREN_ORD.
12994         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
12995         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
12996         (REG_DEBUG): renamed from RE_DEBUG.
12997         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
12998         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
12999         unusual, since we can't clash with the POSIX REG_ICASE.
13000         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
13001         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
13002         (REG_NO_SUB): renamed from RE_NO_SUB.
13003         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
13004         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
13005         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
13006         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
13007         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
13008         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
13009         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
13010         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
13011         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
13012         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
13013         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
13014         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
13015         RE_SYNTAX_POSIX_MINIMAL_BASIC.
13016         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
13017         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
13018         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
13019         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
13020         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
13021         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
13022         (REG_FIXED): Renamed from REGS_FIXED.
13023         (REG_NREGS): Renamed from RE_NREGS.
13024
13025         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
13026         of other REG_* macros, since POSIX says the user is allowed to
13027         #undef these macros selectively.
13028
13029         (reg_errcode_t): Update comment stating what other tables need
13030         to be consistent.
13031
13032         Rename the following enum values to obey POSIX requirements.
13033         The old names are still visible as macros.
13034         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
13035         is not defined, since GNU is supposed to be a superset of POSIX as
13036         much as possible, and since we want reg_errcode_t to be a signed
13037         type for implementation consistency.
13038         (_REG_NOERROR): Renamed from REG_NOERROR.
13039         (_REG_NOMATCH): Renamed from REG_NOMATCH.
13040         (_REG_BADPAT): Renamed from REG_BADPAT.
13041         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
13042         (_REG_ECTYPE): Renamed from REG_ECTYPE.
13043         (_REG_EESCAPE): Renamed from REG_EESCAPE.
13044         (_REG_ESUBREG): Renamed from REG_ESUBREG.
13045         (_REG_EBRACK): Renamed from REG_EBRACK.
13046         (_REG_EPAREN): Renamed from REG_EPAREN.
13047         (_REG_EBRACE): Renamed from REG_EBRACE.
13048         (_REG_BADBR): Renamed from REG_BADBR.
13049         (_REG_ERANGE): Renamed from REG_ERANGE.
13050         (_REG_ESPACE): Renamed from REG_ESPACE.
13051         (_REG_BADRPT): Renamed from REG_BADRPT.
13052         (_REG_EEND): Renamed from REG_EEND.
13053         (_REG_ESIZE): Renamed from REG_ESIZE.
13054         (_REG_ERPAREN): Renamed from REG_ERPAREN.
13055         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
13056         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
13057         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
13058         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
13059
13060         (_REG_RE_NAME, _REG_RM_NAME): New macros.
13061         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
13062         changed.  But support the old name if the new one is not defined
13063         and if _REGEX_SOURCE.
13064
13065         Change the following member names in struct re_pattern_buffer.
13066         The old names are still supported if !_REGEX_SOURCE.
13067         The new names are always supported, regardless of _REGEX_SOURCE.
13068         (re_buffer): Renamed from buffer.
13069         (re_allocated): Renamed from allocated.
13070         (re_used): Renamed from used.
13071         (re_syntax): Renamed from syntax.
13072         (re_fastmap): Renamed from fastmap.
13073         (re_translate): Renamed from translate.
13074         (re_can_be_null): Renamed from can_be_null.
13075         (re_regs_allocated): Renamed from regs_allocated.
13076         (re_fastmap_accurate): Renamed from fastmap_accurate.
13077         (re_no_sub): Renamed from no_sub.
13078         (re_not_bol): Renamed from not_bol.
13079         (re_not_eol): Renamed from not_eol.
13080         (re_newline_anchor): Renamed from newline_anchor.
13081
13082         Change the following member names in struct re_registers.
13083         The old names are still supported if !_REGEX_SOURCE.
13084         The new names are always supported, regardless of _REGEX_SOURCE.
13085         (rm_num_regs): Renamed from num_regs.
13086         (rm_start): Renamed from start.
13087         (rm_end): Renamed from end.
13088
13089         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
13090         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
13091         Prepend __ to parameter names.
13092
13093         Undo yesterday's changes.
13094
13095 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
13096
13097         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
13098         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
13099         lib/regex.c.
13100
13101 2005-08-24  Jim Meyering  <jim@meyering.net>
13102
13103         Sync from coreutils.
13104         * m4/fcntl-safer.m4: New file.
13105
13106         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
13107         and object files for this module.
13108
13109 2005-08-24  Jim Meyering  <jim@meyering.net>
13110
13111         Sync from coreutils.
13112         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
13113
13114 2005-08-24  Jim Meyering  <jim@meyering.net>
13115
13116         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
13117         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
13118
13119 2005-08-24  Jim Meyering  <jim@meyering.net>
13120
13121         * modules/fcntl-safer: New module.
13122         * modules/fts (Depends-on): Add fcntl-safer.
13123         * MODULES.html.sh (File descriptor based Input/Output):
13124         Add fcntl-safer.
13125
13126 2005-08-24  Bruno Haible  <bruno@clisp.org>
13127
13128         Support for unit test modules.
13129         * modules/README: Mention tests modules.
13130         * modules/TEMPLATE-TESTS: New file.
13131         * gnulib-tool: New options --extract-tests-module, --with-tests and
13132         --tests-base (unused for the moment).
13133         (testsbase, inctests): New variables.
13134         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
13135         (func_verify_module): Exclude TEMPLATE-TESTS.
13136         (func_verify_nontests_module, func_verify_tests_module): New functions.
13137         (func_get_dependencies): Add implicit dependency for tests modules.
13138         (func_get_tests_module): New function.
13139         (func_modules_transitive_closure): When --with-tests was specified,
13140         include the unit tests as well, unless explicitly avoided.
13141         (func_emit_lib_Makefile_am): Ignore the tests modules here.
13142         (func_emit_tests_Makefile_am): New function.
13143         (func_create_testdir): When --with-tests was specified, emit a
13144         tests/ directory.
13145         * MODULES.html.sh (Future developments): Update.
13146
13147 2005-08-24  Bruno Haible  <bruno@clisp.org>
13148
13149         * modules/tls-tests: New file.
13150         * tests/test-tls.c: New file, from GNU gettext.
13151
13152 2005-08-24  Bruno Haible  <bruno@clisp.org>
13153
13154         * modules/lock-tests: New file.
13155         * tests/test-lock.c: New file, from GNU gettext.
13156
13157 2005-08-24  Bruno Haible  <bruno@clisp.org>
13158
13159         * lib/lock.h: Add multiple inclusion guard.
13160         * lib/tls.h: Add multiple inclusion guard.
13161
13162 2005-08-24  Bruno Haible  <bruno@clisp.org>
13163
13164         * gnulib-tool: Add support for the --aux-dir option to
13165         --create-testdir, --create-megatestdir, --test, --megatest.
13166         (func_create_testdir, func_create_megatestdir): Optionally emit a
13167         AC_CONFIG_AUX_DIR directive.
13168         (create-testdir, create-megatestdir, test, megatest): Provide a
13169         default value for $auxdir.
13170
13171 2005-08-24  Bruno Haible  <bruno@clisp.org>
13172
13173         * gnulib-tool (import): Use compound statement instead of subshell
13174         where possible.
13175
13176 2005-08-24  Bruno Haible  <bruno@clisp.org>
13177
13178         * gnulib-tool (import): Change --aux-dir default to "build-aux".
13179
13180 2005-08-24  Bruno Haible  <bruno@clisp.org>
13181
13182         * gnulib-tool (func_version): Update.
13183
13184 2005-08-24  Bruno Haible  <bruno@clisp.org>
13185
13186         * gnulib-tool (func_import, func_create_testdir,
13187         func_create_megatestdir): Quote all autoconf macro arguments.
13188
13189 2005-08-24  Bruno Haible  <bruno@clisp.org>
13190
13191         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
13192         option --force, because --force causes the aclocal.m4 of each
13193         subdirectory to be newer than the corresponding config.h.in.
13194
13195 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
13196
13197         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
13198         All contents moved to gl_REGEX.
13199         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
13200         assume that it does.
13201
13202 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
13203
13204         * lib/regex.h (REG_NOSYS)
13205         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
13206         Define, since POSIX requires it as of 2001.
13207         (_REG_ENOSYS)
13208         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
13209         New private symbol, used to keep the enum signed in all cases.
13210         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
13211         Youngman in
13212         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
13213
13214         * lib/regex_internal.c (re_string_skip_chars, register_state):
13215         (calc_state_hash):
13216         Remove forward decls; no longer needed now that we use prototypes.
13217         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
13218         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
13219         (clean_state_log_if_needed): Likewise.
13220
13221 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
13222
13223         * config/srclist.txt: Add glibc bugs 1231-1233.
13224
13225 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13226
13227         Fix problems reported by Sam Steingold in
13228         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
13229         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
13230         assumed that reg_errcode_t is a signed type, which is not
13231         necessarily true if _XOPEN_SOURCE is not defined.
13232         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
13233         since some compilers warn about it otherwise.
13234
13235 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13236
13237         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
13238         (init_word_char, create_initial_state, duplicate_node_closure):
13239         (fetch_token, peek_token_bracket, build_range_exp):
13240         (build_collating_symbol): Remove forward decls; no longer needed
13241         now that we use prototypes.
13242
13243         * lib/regcomp.c:
13244         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
13245         (re_compile_fastmap_iter, regcomp, regerror, regfree):
13246         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
13247         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
13248         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
13249         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
13250         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
13251         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
13252         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
13253         (build_range_exp, build_collating_symbol, parse_bracket_exp):
13254         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
13255         (build_charclass, build_charclass_op, fetch_number, create_tree):
13256         (create_token_tree, mark_opt_subexp, duplicate_tree):
13257         Use prototypes rather than old-style definitions.
13258
13259         * lib/regex_internal.c:
13260         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
13261         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
13262         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
13263         (re_string_reconstruct, re_string_peek_byte_case):
13264         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
13265         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
13266         (re_node_set_init_copy, re_node_set_add_intersect):
13267         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
13268         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
13269         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
13270         (re_acquire_state, re_acquire_state_context, register_state):
13271         (create_ci_newstate, create_cd_newstate, free_state):
13272         Likewise.
13273         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
13274         re_search_2):
13275         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
13276         (re_search_internal, prune_impossible_nodes):
13277         (acquire_init_state_context, check_matching, static):
13278         (check_halt_node_context, check_halt_state_context, proceed_next_node):
13279         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
13280         (update_regs, sift_states_backward, build_sifted_states):
13281         (clean_state_log_if_needed, merge_state_array):
13282         (update_cur_sifted_state, add_epsilon_src_nodes):
13283         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
13284         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
13285         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
13286         (find_recover_state, check_subexp_matching_top, transit_state_mb):
13287         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
13288         (check_arrival, check_arrival_add_next_nodes):
13289         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
13290         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
13291         (check_node_accept_bytes, check_node_accept, extend_buffers):
13292         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
13293         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
13294         (sift_ctx_init):
13295         Likewise.
13296
13297         * lib/regex_internal.h:
13298         (re_string_allocate, re_string_construct, re_string_reconstruct):
13299         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
13300         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
13301         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
13302         (re_string_context_at, re_string_peek_byte_case):
13303         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
13304         is defined, since we now use prototypes always.
13305
13306         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
13307         C89 or better.  All uses removed.
13308
13309 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13310
13311         * config/srclist.txt: Add glibc bugs 1220-1227.
13312
13313 2005-08-20  Jim Meyering  <jim@meyering.net>
13314
13315         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
13316         of unused local, dfa.
13317
13318 2005-08-20  Bruno Haible  <bruno@clisp.org>
13319
13320         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
13321
13322 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13323
13324         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
13325         (re_node_set_insert_last, re_dfa_add_node):
13326         Rename local variables to avoid GCC shadowing warnings.
13327
13328 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13329
13330         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
13331         [defined lint]: Suppress bogus uninitialized-variable warnings.
13332
13333         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
13334         and let the caller return REG_ESPACE if out of space.  This
13335         removes an uninitialied-variable warning with GCC 4.0.1, and also
13336         avoids taking the address of a local variable.  All callers
13337         changed.
13338
13339 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13340
13341         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
13342         $LIBCSRC/posix/regexec.c.
13343         Add glibc bug 1217 for regcomp.c.
13344
13345 2005-08-19  Jim Meyering  <jim@meyering.net>
13346
13347         * lib/regexec.c (proceed_next_node): Redo local variables to
13348         avoid GCC shadowing warnings.
13349
13350 2005-08-18  Bruno Haible  <bruno@clisp.org>
13351
13352         * lib/strstr.c (strstr): Fix return value in multibyte case.
13353         * lib/strcasestr.c (strcasestr): Likewise.
13354
13355 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
13356
13357         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
13358
13359 2005-08-17  Jim Meyering  <jim@meyering.net>
13360
13361         Make the %s format (seconds since the epoch) work for a negative
13362         number and when used with a zero-padded field width, e.g. %015s.
13363
13364         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
13365         label so that it precedes the code to set `digits'.  Otherwise,
13366         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
13367         print `00-22'.  Now, it prints `-0022', as it should.
13368
13369 2005-08-17  Bruno Haible  <bruno@clisp.org>
13370
13371         * modules/strstr (Files): Add m4/mbrtowc.m4.
13372         (Depends-on): Add mbuiter.
13373
13374 2005-08-17  Bruno Haible  <bruno@clisp.org>
13375
13376         * modules/strcasestr: New file.
13377         * MODULES.html.sh (String handling, based on ANSI C 89): Add
13378         strcasestr.
13379
13380 2005-08-17  Bruno Haible  <bruno@clisp.org>
13381
13382         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
13383
13384 2005-08-17  Bruno Haible  <bruno@clisp.org>
13385
13386         * modules/mbuiter: New file.
13387         * MODULES.html.sh (Extended multibyte and wide character utilities):
13388         Add mbuiter.
13389
13390 2005-08-17  Bruno Haible  <bruno@clisp.org>
13391
13392         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
13393         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
13394
13395 2005-08-17  Bruno Haible  <bruno@clisp.org>
13396
13397         * m4/strcasestr.m4: New file.
13398
13399 2005-08-17  Bruno Haible  <bruno@clisp.org>
13400
13401         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
13402         * lib/strstr.c: Completely rewritten, with multibyte locale support.
13403
13404 2005-08-17  Bruno Haible  <bruno@clisp.org>
13405
13406         * lib/strcasestr.h: New file.
13407         * lib/strcasestr.c: New file.
13408
13409 2005-08-17  Bruno Haible  <bruno@clisp.org>
13410
13411         * lib/strcasecmp.c: Use mbuiter.h.
13412
13413 2005-08-17  Bruno Haible  <bruno@clisp.org>
13414
13415         * lib/mbuiter.h: New file.
13416
13417 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
13418
13419         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
13420         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
13421         and gl_GETOPT are both invoked via different paths (as happens
13422         with GNU tar CVS because it uses both argp and getopt), the former
13423         wins.
13424
13425 2005-08-16  Bruno Haible  <bruno@clisp.org>
13426
13427         * modules/tls: New file.
13428         * MODULES.html.sh (Multithreading): Add tls.
13429
13430 2005-08-16  Bruno Haible  <bruno@clisp.org>
13431
13432         * modules/strnlen1: New file.
13433         * MODULES.html.sh (String handling): Add strnlen1.
13434
13435 2005-08-16  Bruno Haible  <bruno@clisp.org>
13436
13437         * modules/strcase (Files): Add m4/mbrtowc.m4.
13438         (Depends-on): Add strnlen1, mbchar.
13439
13440 2005-08-16  Bruno Haible  <bruno@clisp.org>
13441
13442         * modules/mbiter: New file.
13443         * MODULES.html.sh (Extended multibyte and wide character utilities):
13444         Add mbiter.
13445
13446 2005-08-16  Bruno Haible  <bruno@clisp.org>
13447
13448         * modules/mbfile: New file.
13449         * MODULES.html.sh (Extended multibyte and wide character utilities):
13450         Add mbfile.
13451
13452 2005-08-16  Bruno Haible  <bruno@clisp.org>
13453
13454         * modules/mbchar: New file.
13455         * MODULES.html.sh (Extended multibyte and wide character utilities):
13456         New section.
13457
13458 2005-08-16  Bruno Haible  <bruno@clisp.org>
13459
13460         * m4/tls.m4: New file, from GNU gettext.
13461
13462 2005-08-16  Bruno Haible  <bruno@clisp.org>
13463
13464         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
13465         always.
13466         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
13467
13468 2005-08-16  Bruno Haible  <bruno@clisp.org>
13469
13470         * m4/mbiter.m4: New file.
13471
13472 2005-08-16  Bruno Haible  <bruno@clisp.org>
13473
13474         * m4/mbfile.m4: New file.
13475
13476 2005-08-16  Bruno Haible  <bruno@clisp.org>
13477
13478         * m4/mbchar.m4: New file.
13479
13480 2005-08-16  Bruno Haible  <bruno@clisp.org>
13481
13482         * lib/tls.h: New file, from GNU gettext.
13483         * lib/tls.c: New file, from GNU gettext.
13484
13485 2005-08-16  Bruno Haible  <bruno@clisp.org>
13486
13487         * lib/strnlen1.h: New file.
13488         * lib/strnlen1.c: New file.
13489
13490 2005-08-16  Bruno Haible  <bruno@clisp.org>
13491
13492         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
13493         (mbi_init): Update.
13494         (mbi_avail, mbi_advance): Let the iteration end before the terminating
13495         NUL byte, not after it.
13496
13497 2005-08-16  Bruno Haible  <bruno@clisp.org>
13498
13499         * lib/strcase.h (strcasecmp): Add note in comments.
13500         * lib/strncasecmp.c: Use code from strcasecmp.c.
13501         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
13502         (strcasecmp): Work correctly in multibyte locales.
13503
13504 2005-08-16  Bruno Haible  <bruno@clisp.org>
13505
13506         * lib/mbiter.h: New file.
13507
13508 2005-08-16  Bruno Haible  <bruno@clisp.org>
13509
13510         * lib/mbfile.h: New file.
13511
13512 2005-08-16  Bruno Haible  <bruno@clisp.org>
13513
13514         * lib/mbchar.h: New file.
13515         * lib/mbchar.c: New file.
13516
13517 2005-08-16  Bruno Haible  <bruno@clisp.org>
13518
13519         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
13520         the valid ones. Makes the comparison operations transitive:
13521         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
13522         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
13523
13524 2005-08-15  Simon Josefsson  <jas@extundo.com>
13525
13526         * modules/ssize_t (License): Change to 'unlimited'.
13527
13528         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
13529
13530 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
13531
13532         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
13533         Add comments for each pending glibc patch.
13534
13535 2005-08-15  Bruno Haible  <bruno@clisp.org>
13536
13537         * lib/regex.h (__restrict_arr): Don't define to __restrict if
13538         __cplusplus is defined.
13539
13540 2005-08-14  Jim Meyering  <jim@meyering.net>
13541
13542         Sync from coreutils.
13543
13544         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
13545         Use the hash-table-based cycle-detection code not just when
13546         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
13547         Reported by James Youngman in
13548         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
13549         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
13550         FTS_TIGHT_CYCLE_CHECK.
13551         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
13552         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
13553         once again.
13554         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
13555         * lib/fts.c (fd_safer): Remove decl.
13556         Include fcntl--.h rather than unistd-safer.h
13557         (fts_safe_changedir): Don't call fd_safer; no longer needed
13558         now that we include fcntl--.h.
13559
13560 2005-08-12  Simon Josefsson  <jas@extundo.com>
13561
13562         * modules/getndelim2: Use ssize_t module.
13563         * modules/getnline: Likewise.
13564         * modules/safe-read: Likewise.
13565         * modules/xreadlink: Likewise.
13566
13567         * modules/ssize_t: New file.
13568
13569 2005-08-12  Simon Josefsson  <jas@extundo.com>
13570
13571         * m4/readline.m4: Look for termcap, curses or ncurses if required.
13572
13573 2005-08-12  Simon Josefsson  <jas@extundo.com>
13574
13575         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13576         ssize_t.
13577
13578 2005-08-12  Simon Josefsson  <jas@extundo.com>
13579
13580         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
13581         readline, getdelim and check_version.
13582         (Support for systems lacking ISO C 99: Sizes of integer types):
13583         Add size_max.
13584
13585 2005-08-12  Bruno Haible  <bruno@clisp.org>
13586
13587         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
13588
13589 2005-08-11  Simon Josefsson  <jas@extundo.com>
13590
13591         * modules/readline: New file.
13592
13593         * modules/strnlen (Files): Add strnlen.h.
13594
13595 2005-08-11  Simon Josefsson  <jas@extundo.com>
13596
13597         * m4/readline.m4: New file.
13598
13599 2005-08-11  Simon Josefsson  <jas@extundo.com>
13600
13601         * lib/readline.h, readline.c: New file.
13602
13603 2005-08-11  Simon Josefsson  <jas@extundo.com>
13604
13605         * doc/gnulib.texi (Initial import, Finishing touches): Mention
13606         gl_AVOID.
13607
13608 2005-08-11  Bruno Haible  <bruno@clisp.org>
13609
13610         * lib/strnlen.h (strnlen): Change parameter name to match comment.
13611
13612 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
13613
13614         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
13615
13616 2005-08-10  Simon Josefsson  <jas@extundo.com>
13617
13618         * tests/test-iconvme.c: New file.
13619
13620 2005-08-10  Simon Josefsson  <jas@extundo.com>
13621
13622         * m4/strnlen.m4: New file.
13623
13624         * m4/strndup.m4: Don't check for strnlen declaration, done in
13625         strnlen.m4.
13626
13627 2005-08-10  Simon Josefsson  <jas@extundo.com>
13628
13629         * lib/strndup.c: Use strnlen.h.
13630
13631         * lib/strnlen.h: New file.
13632
13633 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
13634
13635         * README: Typos.
13636
13637 2005-08-02  Simon Josefsson  <jas@extundo.com>
13638
13639         * modules/readline: New file.
13640
13641 2005-08-02  Simon Josefsson  <jas@extundo.com>
13642
13643         * modules/getdelim: New file.
13644
13645         * modules/getline: Rewrite, don't use getndelim2.
13646
13647 2005-08-02  Simon Josefsson  <jas@extundo.com>
13648
13649         * m4/getline.m4: Separate out getdelim stuff into separate module.
13650
13651         * m4/getdelim.m4: New file.
13652
13653 2005-08-02  Simon Josefsson  <jas@extundo.com>
13654
13655         * lib/getline.h, getline.c: Rewrite.
13656
13657         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
13658
13659 2005-07-31  Bruno Haible  <bruno@clisp.org>
13660
13661         * lib/lock.h (gl_lock_initializer): New macro.
13662         (gl_lock_define_initialized): Use it.
13663         (gl_rwlock_initializer): New macro.
13664         (gl_rwlock_define_initialized): Use it.
13665         (gl_recursive_lock_initializer): New macro.
13666         (gl_recursive_lock_define_initialized): Use it.
13667
13668 2005-07-30  Karl Berry  <karl@gnu.org>
13669
13670         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
13671         Report from Ben Pfaff, regarding getopt.
13672
13673 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
13674
13675         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
13676         normal way.
13677         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
13678         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
13679         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
13680         (gl_GETOPT): Use the new macros.  Most of the implementation
13681         is moved to the new macros.  This is for programs like Emacs
13682         that don't want all the functionality of gl_GETOPT.
13683
13684 2005-07-26  Bruno Haible  <bruno@clisp.org>
13685
13686         * m4/lock.m4: Update from GNU gettext.
13687
13688 2005-07-26  Bruno Haible  <bruno@clisp.org>
13689
13690         * lib/lock.h: Update from GNU gettext.
13691         * lib/lock.c: Update from GNU gettext.
13692
13693 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
13694
13695         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
13696         obsolescent AC_TRY_RUN.  Include the default includes files, for
13697         'exit'.
13698
13699 2005-07-24  Bruno Haible  <bruno@clisp.org>
13700
13701         * modules/visibility: New file.
13702         * MODULES.html.sh (Misc): Add visibility.
13703
13704 2005-07-24  Bruno Haible  <bruno@clisp.org>
13705
13706         * m4/visibility.m4: New file.
13707
13708 2005-07-24  Bruno Haible  <bruno@clisp.org>
13709
13710         * doc/visibility.texi: New file.
13711
13712 2005-07-22  Bruno Haible  <bruno@clisp.org>
13713
13714         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
13715         $(ALLOCA_H), redundant through BUILT_SOURCES.
13716         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
13717         redundant through BUILT_SOURCES.
13718         * modules/byteswap (Makefile.am): Remove explicit dependency on
13719         $(BYTESWAP_H), redundant through BUILT_SOURCES.
13720         * modules/fnmatch (Makefile.am): Remove explicit dependency on
13721         $(FNMATCH_H), redundant through BUILT_SOURCES.
13722         * modules/getopt (Makefile.am): Remove explicit dependency on
13723         $(GETOPT_H), redundant through BUILT_SOURCES.
13724         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
13725         redundant through BUILT_SOURCES.
13726         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
13727         redundant through BUILT_SOURCES.
13728         * modules/stdbool (Makefile.am): Remove explicit dependency on
13729         $(STDBOOL_H), redundant through BUILT_SOURCES.
13730         * modules/stdint (Makefile.am): Remove explicit dependency on
13731         $(STDINT_H), redundant through BUILT_SOURCES.
13732         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
13733         Remove explicit dependency on $(SYSEXITS_H).
13734         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
13735
13736 2005-07-18  Simon Josefsson  <jas@extundo.com>
13737
13738         * lib/check-version.c (check_version): Accept identical versions too.
13739
13740 2005-07-18  Bruno Haible  <bruno@clisp.org>
13741
13742         * modules/lock: New file.
13743         * MODULES.html.sh (Multithreading): New section.
13744
13745 2005-07-18  Bruno Haible  <bruno@clisp.org>
13746
13747         * m4/lock.m4: New file, from GNU gettext.
13748
13749 2005-07-18  Bruno Haible  <bruno@clisp.org>
13750
13751         * lib/lock.h: New file, from GNU gettext.
13752         * lib/lock.c: New file, from GNU gettext.
13753
13754 2005-07-18  Bruno Haible  <bruno@clisp.org>
13755
13756         * lib/lock.h (gl_once_t): New type.
13757         (gl_once_define, gl_once): New macros.
13758         * lib/lock.c (fresh_once): New variable.
13759         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
13760         functions.
13761
13762 2005-07-16  Simon Josefsson  <jas@extundo.com>
13763
13764         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
13765         workaround, suggested by Bruno.
13766
13767 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
13768
13769         * modules/xalloc (Depends-on): Add xalloc-die.
13770         * modules/xvasprintf (Depends-on): Add xalloc-die.
13771
13772 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
13773
13774         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
13775         with a minor change.
13776
13777 2005-07-15  Bruno Haible  <bruno@clisp.org>
13778
13779         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
13780         When using lib/poll.c, define poll as rpl_poll.
13781
13782 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
13783
13784         * modules/argp (Depends-on): Remove unlocked-io.
13785
13786 2005-07-14  Derek Price  <derek@ximbiot.com>
13787
13788         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
13789         for glob symlink bug.
13790
13791 2005-07-14  Bruno Haible  <bruno@clisp.org>
13792
13793         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
13794         Instead, test for *_unlocked function declarations directly.
13795
13796 2005-07-11  Simon Josefsson  <jas@extundo.com>
13797
13798         * modules/size_max: New file.
13799
13800         * modules/xsize: Depend on size_max module for size_max.m4.
13801
13802 2005-07-11  Simon Josefsson  <jas@extundo.com>
13803
13804         * lib/size_max.h: New file.
13805
13806 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
13807
13808         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
13809         copyright symbol and the year.
13810         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
13811         (version_etc_va): Use parameterized copyright notice.
13812         Reword to conform to the current GNU coding standards.
13813
13814 2005-07-11  Karl Berry  <karl@gnu.org>
13815
13816         * doc/gnulib.texi (Quoting): new node.
13817         (Initial import): more info, from Patrice.
13818
13819 2005-07-11  Bruno Haible  <bruno@clisp.org>
13820
13821         * gnulib-tool (func_usage): Document option --avoid.
13822         (Command line options): Handle --avoid.
13823         (func_acceptable): New function.
13824         (func_modules_transitive_closure): Use it.
13825
13826 2005-07-11  Bruno Haible  <bruno@clisp.org>
13827
13828         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
13829         Reported by Jim Meyering.
13830
13831 2005-07-10  Bruno Haible  <bruno@clisp.org>
13832
13833         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
13834         Needed when size_t is smaller than 'unsigned int'.
13835         Reported by Paul Eggert.
13836
13837 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13838
13839         * modules/argp (Depends-on): Add unlocked-io
13840
13841 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13842
13843         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
13844         block of defines.
13845
13846 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
13847
13848         * config/srclist.txt: Comment out regcomp.c, since we have a porting
13849         fix now.
13850
13851 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
13852         and Paul Eggert  <eggert@cs.ucla.edu>
13853
13854         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
13855         in wint_t, not wchar_t.  Remove now-unnecessary cast.
13856
13857 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13858
13859         * modules/regex (Files): Add lib/regex_internal.c,
13860         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
13861         (Depends-on): Add extensions.
13862         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
13863
13864 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13865
13866         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
13867         pathconf.
13868         * m4/same.m4 (gl_SAME): Likewise.
13869         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
13870
13871         * m4/regex.m4: Adjust to new libc regex implementation.
13872         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
13873         all the .c and .h parts of (the new) regex.
13874         Quote the m4 stuff better.
13875         Check for RE_ICASE bug of old gnulib.
13876         Check for REG_STARTEND of recent libc.
13877         Rename local variables from jm_* to gl_*.
13878         Quote operand of "test -f".
13879         Say "recent enough" version of libc, not "version 2".
13880         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
13881         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
13882         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
13883         Remove check for btowc, isascii.
13884         Require AM_LANGINFO_CODESET.
13885
13886 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13887
13888         * lib/regex.c, regex.h: Sync from libc.
13889         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
13890         * lib/regexec.c:
13891         New files, synced from libc, except that regex_internal.h
13892         currently has a small porting fix.
13893
13894 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13895
13896         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
13897         regex_internal.c, regexec.c.
13898         Add regex_internal.h too, but as a comment, since the libc version
13899         is currently broken in gnulib mode.
13900
13901 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
13902
13903         Support programs like Emacs that use gnulib but not gettext.
13904         * MODULES.html.sh (Internationalization functions): Add gettext-h.
13905         * modules/gettext-h: New file.
13906         * modules/gettext (Files): Remove lib/gettext.h.
13907         (Depends-on): Add gettext-h.
13908         (Makefile.am): Remove lib_SOURCES.
13909         * modules/argmatch, modules/c-stack, modules/closeout:
13910         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
13911         * modules/execute, modules/file-type, modules/getaddrinfo:
13912         * modules/getopt, modules/human, modules/javacomp:
13913         * modules/javaexec, modules/mkdir-p, modules/obstack:
13914         * modules/openat, modules/pagealign_alloc, modules/pipe:
13915         * modules/quotearg, modules/regex, modules/rpmatch:
13916         * modules/unicodeio, modules/userspec, modules/version-etc:
13917         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
13918         * modules/xsetenv:
13919         Depend on gettext-h, not gettext.
13920
13921 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
13922
13923         * gnulib-tool (func_import): Add support for 'public domain' license.
13924         * modules/alloca, modules/atexit, modules/memmove:
13925         Now public domain, not GPL.
13926         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
13927         * modules/realloc, modules/strerror, modules/strtod:
13928         Now LGPL, not GPL.
13929
13930 2005-07-05  Bruno Haible  <bruno@clisp.org>
13931
13932         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
13933         autoconf CVS. Needed for mingw.
13934
13935 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13936
13937         Remove the dependency of the strftime module on the tzset module.
13938         * modules/strftime (Depends-on): Remove dependency on tzset.
13939
13940 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13941
13942         Remove the dependency of the strftime module on the tzset module.
13943         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
13944         gl_FUNC_TZSET_CLOBBER.
13945
13946 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13947
13948         Remove the dependency of the strftime module on the tzset module.
13949         * lib/strftime.c (my_strftime)
13950         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
13951         Copy the input structure, to work around some of the bug with
13952         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
13953         Solaris releases, you should also use the tzset module, but we won't
13954         require it as a dependency any more since we don't want LGPLed code
13955         to depend on GPLed code.
13956
13957 2005-07-02  Jim Meyering  <jim@meyering.net>
13958
13959         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
13960         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
13961         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
13962         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
13963
13964 2005-07-02  Jim Meyering  <jim@meyering.net>
13965
13966         * lib/backupfile.c (backup_args): Change a `0' to NULL.
13967
13968 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13969
13970         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
13971         declares only 'struct timespec;' (!).
13972
13973 2005-07-01  Jim Meyering  <jim@meyering.net>
13974
13975         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
13976         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
13977         * lib/save-cwd.c, tempname.c:
13978         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
13979         and don't include <sys/file.h>).
13980
13981 2005-06-29  Jim Meyering  <jim@meyering.net>
13982
13983         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
13984         type name.  Use the variable name instead.
13985         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
13986         Likewise.
13987
13988 2005-06-28  Simon Josefsson  <jas@extundo.com>
13989
13990         * modules/check-version (Files): Add check-version.m4.
13991
13992 2005-06-28  Simon Josefsson  <jas@extundo.com>
13993
13994         * m4/check-version.m4: New file, suggested by Jim Meyering
13995         <jim@meyering.net>.
13996
13997 2005-06-28  Simon Josefsson  <jas@extundo.com>
13998
13999         * lib/check-version.h, lib/check-version.c: New files.
14000
14001 2005-06-28  Simon Josefsson  <jas@extundo.com>
14002
14003         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
14004         collision with global variable.  Better indentation.  Don't
14005         increment buffer pointer beyond buffer end.  Based on comments
14006         from Paul Eggert <eggert@cs.ucla.edu>.
14007
14008         * lib/base64.h: Indent.
14009
14010 2005-06-28  Simon Josefsson  <jas@extundo.com>
14011
14012         * doc/gnulib.texi (Library version handling): New section.
14013
14014 2005-06-28  Jim Meyering  <jim@meyering.net>
14015
14016         * check-module (find_included_lib_files): Hard-code another
14017         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
14018         but modules/fts-lgpl (correctly) does not list those files.
14019
14020         * modules/canonicalize (Files): Add lib/pathmax.h.
14021
14022 2005-06-25  Simon Josefsson  <jas@extundo.com>
14023
14024         * modules/check-version: New file.
14025
14026 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
14027
14028         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
14029         initializer of struct addrinfo, as an indication that we don't
14030         care how many members the structure has.
14031
14032 2005-06-24  Derek Price  <derek@ximbiot.com>
14033         and Bruno Haible  <bruno@clisp.org>
14034
14035         Remove stat module & update lstat.
14036         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
14037         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
14038         * m4/stat.m4: Remove this file.
14039
14040 2005-06-24  Derek Price  <derek@ximbiot.com>
14041         and Bruno Haible  <bruno@clisp.org>
14042
14043         Remove stat module & update lstat.
14044         * lib/stat.c: Remove this file...
14045         (slash_aware_lstat): ...moving this content and its support...
14046         * lib/lstat.c (rpl_lstat): ...into here.
14047         * lib/lstat.h: New file.
14048
14049 2005-06-24  Derek Price  <derek@ximbiot.com>
14050         and Bruno Haible  <bruno@clisp.org>
14051
14052         Remove stat module & update lstat.
14053         * config/srclist.txt (libc sources): Remove stat.
14054
14055 2005-06-24  Derek Price  <derek@ximbiot.com>
14056         and Bruno Haible  <bruno@clisp.org>
14057
14058         Remove stat module & update lstat.
14059         * MODULES.html.sh (stat): Remove.
14060         * MODULES.html: Regenerated.
14061         * modules/lstat (Description): Correct function name.
14062         (Files): Add "lstat.h".
14063         (Depends-on): Remove stat, add xalloc, stat-macros.
14064         * modules/stat: Remove this file.
14065         (Include): Add "lstat.h", remove <sys/stat.h>.
14066
14067 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
14068
14069         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
14070         (ranged_convert): Don't save conversion in a temporary struct.
14071         This causes a warning with GCC 4.0.0, and anyway in the typical
14072         case it's not worth the extra 100 bytes or so of code.
14073         (ranged_convert, __mktime_internal): When calling a function via a
14074         pointer P, use P () rather than (*P) (), as we now assume C89 or
14075         better.
14076
14077 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14078
14079         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
14080         "who -r" failed to give output.  Problem reported by Tim Waugh.
14081
14082         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
14083         (xcalloc): Use it to avoid needless tests.
14084         Problem reported by Jim Meyering.
14085
14086 2005-06-20  Derek Price  <derek@ximbiot.com>
14087
14088         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
14089         unnecessary for Autoconfs > 2.59c.
14090
14091 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14092
14093         * lib/argp.h (__option_is_short): Check upper limit of
14094         __key. Isprint() requires its argument to have the value
14095         of an unsigned char or EOF.
14096
14097 2005-06-16  Jim Meyering  <jim@meyering.net>
14098
14099         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
14100         when either N or S is zero.
14101
14102 2005-06-16  Derek Price  <derek@ximbiot.com>
14103
14104         * m4/bison.m4: Declare YACC & YFLAGS precious.
14105
14106 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
14107
14108         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
14109         multibyte string or pattern, fall back on unibyte matching.
14110         Problem reported by James Youngman.
14111
14112 2005-06-08  Bruno Haible  <bruno@clisp.org>
14113
14114         * modules/csharpcomp: New file.
14115         * MODULES.html.sh (C#): Add csharpcomp.
14116
14117 2005-06-08  Bruno Haible  <bruno@clisp.org>
14118
14119         * m4/csharpcomp.m4: New file, from GNU gettext.
14120
14121 2005-06-08  Bruno Haible  <bruno@clisp.org>
14122
14123         * lib/csharpcomp.h: New file, from GNU gettext.
14124         * lib/csharpcomp.c: New file, from GNU gettext.
14125         * lib/csharpcomp.sh.in: New file, from GNU gettext.
14126
14127 2005-06-08  Bruno Haible  <bruno@clisp.org>
14128
14129         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
14130         warning on mingw.
14131
14132 2005-06-07  Derek Price  <derek@ximbiot.com>
14133
14134         Sync from CVS.
14135         * lib/glob_.h: Indent nested #ifdef.
14136
14137 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
14138
14139         Sync from coreutils.
14140         Use "file name" when talking about file names, instead of "filename"
14141         or "path", as per the GNU coding standards.
14142         * lib/mkdir-p.c: Renamed from makepath.c.
14143         (make_dir_parents): Renamed from make_path.  All callers changed.
14144         * lib/mkdir-p.h: Likewise.  All includers changed.
14145         * lib/filenamecat.c: Renamed from path-concat.c.
14146         (file_name_concat): Renamed from path_concat.  All callers changed.
14147         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
14148         * lib/filenamecat.h: Likewise.  All includers changed.
14149         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
14150         in comments or local variable names.
14151         * lib/basename.c: Likewise.
14152         * lib/canonicalize.c, canonicalize.h: Likewise.
14153         * lib/dirname.c, dirname.h: Likewise.
14154         * lib/euidaccess.c: Likewise.
14155         * lib/exclude.c: Likewise
14156         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
14157         * lib/fsusage.c, fsuage.h: Likewise.
14158         * lib/fts.c, fts_.h: Likewise.
14159         * lib/getcwd.c: Likewise.
14160         * lib/getloadavg.c: Likewise.
14161         * lib/mkstemp.c: Likewise.
14162         * lib/mountlist.c, mountlist.h: Likewise.
14163         * lib/openat.c, openat.h: Likewise.
14164         * lib/readlink-stub.c: Likewise.
14165         * lib/readutmp.c, readutmp.h: Likewise.
14166         * lib/rename.c: Likewise.
14167         * lib/rmdir.c: Likewise.
14168         * lib/same.c: Likewise.
14169         * lib/savedir.c: Likewise.
14170         * lib/stripslash.c: Likewise.
14171         * lib/tempname.c: Likewise.
14172         * lib/xreadlink.c: Likewise.
14173         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
14174         All uses changed.
14175         * lib/exclude.h: Likewise.
14176
14177         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
14178         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
14179         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
14180         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
14181         * lib/pathmax.h: Include <limits.h> unconditionally, since other
14182         files have been getting away with it for years (MORE/BSD 4.3
14183         is extinct now).
14184         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
14185         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
14186
14187         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
14188         Define to 256, not 255, as per modern POSIX.
14189
14190 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
14191
14192         Sync from coreutils.
14193         Use "file name" when talking about file names, instead of "filename"
14194         or "path", as per the GNU coding standards.
14195         * MODULES.html.sh: mkdir-p renamed from makepath.
14196         filenamecat renamed from path-concat.
14197         * modules/filenamecat: Renamed from modules/path-concat.
14198         (Files): filenamecat.h and filenamecat.c renamed from
14199         path-concat.h and path-concat.c.
14200         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
14201         (Include): filenamecat.h, not path-concat.h.
14202         * modules/mkdir-p: Renamed from modules/makepath.
14203         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
14204         makepath.c.
14205         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
14206         (Include): mkdir-p.h, not makepath.h.
14207
14208 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
14209
14210         Sync from coreutils.
14211         * m4/mkdir-p.m4: Renamed from makepath.m4.
14212         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
14213         Rename files from makepath.c to mkdir-p.c, and from
14214         makepath.h to mkdir-p.h.
14215         * m4/filenamecat.m4: Renamed from path-concat.m4.
14216         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
14217         Rename files from path-concat.c to filenamecat.c,
14218         and from path-concat.h to filenamecat.h.
14219         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
14220         "file name" in local variables or comments.
14221         * m4/rename.m4: Likewise.
14222
14223 2005-06-01  Bruno Haible  <bruno@clisp.org>
14224
14225         * modules/csharpexec: New file.
14226         * MODULES.html.sh (C#): New section.
14227
14228 2005-06-01  Bruno Haible  <bruno@clisp.org>
14229
14230         * m4/csharp.m4: New file, from GNU gettext.
14231         * m4/csharpexec.m4: New file, from GNU gettext.
14232
14233 2005-06-01  Bruno Haible  <bruno@clisp.org>
14234
14235         * lib/csharpexec.h: New file, from GNU gettext.
14236         * lib/csharpexec.c: New file, from GNU gettext.
14237         * lib/csharpexec.sh.in: New file, from GNU gettext.
14238
14239 2005-05-31  Derek Price  <derek@ximbiot.com>
14240             Paul Eggert  <eggert@cs.ucla.edu>
14241
14242         Sync from cvs.
14243         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
14244
14245 2005-05-31  Derek Price  <derek@ximbiot.com>
14246             Paul Eggert  <eggert@cs.ucla.edu>
14247
14248         Sync from cvs.
14249         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
14250
14251 2005-05-29  Derek Price  <derek@ximbiot.com>
14252
14253         * config/srclist.txt (glob_.h, glob.c): Add these files.
14254
14255 2005-05-29  Derek Price  <derek@ximbiot.com>
14256
14257         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
14258         * modules/glob: New file.
14259         * modules/getlogin_r: Add link to POSIX spec in description.
14260
14261 2005-05-29  Derek Price  <derek@ximbiot.com>
14262             Paul Eggert  <eggert@cs.ucla.edu>
14263
14264         * m4/glob.m4: New file.
14265
14266 2005-05-29  Derek Price  <derek@ximbiot.com>
14267             Paul Eggert  <eggert@cs.ucla.edu>
14268
14269         * lib/glob_.h, lib/glob.c: New files.
14270
14271 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14272
14273         * modules/fts (Files): Remove m4/inttypes-pri.m4.
14274         * modules/fts-lgpl (Depends-on): Remove gettext.
14275
14276 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14277
14278         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
14279         and don't require gt_INTTYPES_PRI.
14280
14281 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14282
14283         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
14284
14285         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
14286         the configuration hassle isn't worth it.
14287         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
14288         (LONGEST_MODIFIER, PRIuMAX): Remove.
14289
14290 2005-05-27  Bruno Haible  <bruno@clisp.org>
14291
14292         * lib/getlogin_r.h: Remove second include of <stddef.h>.
14293
14294 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
14295
14296         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
14297         _POSIX_PTHREAD_SEMANTICS for Solaris.
14298
14299 2005-05-25  Derek Price  <derek@ximbiot.com>
14300
14301         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
14302
14303 2005-05-25  Derek Price  <derek@ximbiot.com>
14304             Paul Eggert  <eggert@cs.ucla.edu>
14305
14306         * modules/getlogin_r, m4/getlogin_r.m4: New files.
14307         * lib/getlogin_r.c, getlogin_r.h: New files.
14308
14309 2005-05-25  Bruno Haible  <bruno@clisp.org>
14310             Derek Price  <derek@ximbiot.com>
14311
14312         * lib/getlogin_r.h: Simplify API documentation.
14313
14314 2005-05-23  Derek Price  <derek@ximbiot.com>
14315
14316         * modules/minmax (Files): Add m4/minmax.m4.
14317         (configure.ac): Add gl_MINMAX.
14318
14319 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
14320
14321         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
14322         so that unistd-safer.h (GPL'ed code) need not be included.
14323
14324 2005-05-22  Bruno Haible  <bruno@clisp.org>
14325
14326         * m4/minmax.m4: New file.
14327         Based on a patch by Derek Price <derek@ximbiot.com>.
14328
14329 2005-05-22  Bruno Haible  <bruno@clisp.org>
14330
14331         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
14332         (INT64_MIN): Fix definition.
14333         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
14334
14335         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
14336         NEED_SIGNED_INT_TYPES.
14337
14338         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
14339         HAVE_SYSTEM_INTTYPES.
14340
14341 2005-05-22  Bruno Haible  <bruno@clisp.org>
14342
14343         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
14344         Also include <sys/param.h> if it defines MIN, MAX.
14345         Based on a patch by Derek Price <derek@ximbiot.com>.
14346
14347 2005-05-21  Jim Meyering  <jim@meyering.net>
14348
14349         * modules/fts (Files): Add m4/inttypes-pri.m4.
14350         (Depends-on): Add lstat and remove gettext.  Alphabetize.
14351
14352 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14353
14354         New fts module.
14355         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
14356         (setup_dir, free_dir): New functions.
14357         (enter_dir, leave_dir): Define trivial
14358         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
14359         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
14360         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
14361         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
14362         Move to fts-cycle.c.
14363         (fts_open): Use setup_dir.
14364         (fts_close): Use free_dir.
14365         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
14366         This adds a label and some gotos, but the alternatives were messier.
14367         Check for memory allocation failure when entering a dir.
14368         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
14369         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
14370         (FTS): New member fts_cycle, that is a union that contains the
14371         old active_dir_ht and cycle_state.  All uses changed to mention
14372         fts_cycle.ht and fts_cycle.state.
14373         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
14374         fts.c, with the following changes:
14375         (setup_dir, free_dir): New functions.
14376         (enter_dir): Now returns bool.  Return true if successful, false
14377         if memory exhausted.  All callers changed.
14378         Do not bother partly cleaning up on
14379         memory allocation failure; that is free_dir's job.
14380         However, free ad if hash_insert fails, to avoid memory leak.
14381         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
14382         fts->fts_options to see which union member to use.
14383
14384 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14385
14386         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
14387         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
14388
14389 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14390
14391         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
14392
14393 2005-05-20  Jim Meyering  <jim@meyering.net>
14394
14395         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
14396         Now a macro, to pacify GCC.
14397
14398 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
14399
14400         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
14401         of -1.
14402
14403 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
14404
14405         * lib/chown.c (rpl_chown): Return -1 on failure.
14406
14407 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
14408
14409         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
14410         Don't check for stddef.h.
14411         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
14412         don't use its results.
14413         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
14414         since we include them unconditionally.  Don't require
14415         AM_STDBOOL_H, since stdbool is a prerequisite.
14416         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
14417         since we assume C89 or better.
14418         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
14419         as we don't use their results.
14420         Don't check for fchdir, memmove, memset, strrchr, as we use
14421         them unconditionally.
14422         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
14423         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
14424
14425 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
14426
14427         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
14428         Include <stddef.h> unconditionally, since we assume C89 now.
14429         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
14430         * lib/fts.c: Include fts_.h first, to check interface.
14431         Do not include intprops.h; no longer needed.
14432         Include cycle-check.h and hash.h, since fts_.h no longer does.
14433         Remove unnecessary casts of closedir to void.
14434         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
14435         decide whether to decrement nlinks.
14436         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
14437         (FTS): Use struct hash_table * instead of Hash_table, so that
14438         we no longer need to include hash.h here.
14439
14440 2005-05-18  Jim Meyering  <jim@meyering.net>
14441
14442         * modules/dirfd (License): Change to LGPL.  Most of the code
14443         is already in the public domain.
14444
14445 2005-05-18  Jim Meyering  <jim@meyering.net>
14446
14447         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
14448         Reported by Yoann Vandoorselaere.
14449
14450 2005-05-17  Jim Meyering  <jim@meyering.net>
14451
14452         * m4/fts.m4: New file, from coreutils.
14453
14454 2005-05-17  Jim Meyering  <jim@meyering.net>
14455
14456         * lib/fts.c, lib/fts_.h: New files, from coreutils.
14457
14458 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14459
14460         Sync from coreutils.
14461         * m4/unlinkdir.m4: New file.
14462
14463 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14464
14465         Sync from coreutils.
14466         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
14467         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
14468         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
14469         White space changes only.
14470         * lib/makepath.c (make_path): Port to hosts where leading "//" is
14471         special.
14472         * lib/yesno.c: Include getline.h, not ctype.h.
14473         (yesno): Don't remove leading white space; POSIX doesn't allow it.
14474         Use getline to remove arbitrary restriction on response length.
14475
14476 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14477
14478         * config/srclist-update: Spell out "Street" in FSF postal
14479         mail address; this is the style the FSF seems to prefer.
14480
14481         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
14482         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
14483         this updates FSF postal mail address.
14484
14485         Sync from coreutils.
14486         * modules/unlinkdir: New file.
14487         * modules/yesno (Depends-on): Add getline.
14488         * MODULES.html.sh (File system functions): Add unlinkdir.
14489
14490 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14491
14492         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
14493         lib/strsep.h:
14494         Change the initial comment to refer to GPL, not LGPL.
14495         gnulib-tool will change it to LGPL as needed.
14496
14497         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
14498         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
14499         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
14500         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
14501         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
14502         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
14503         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
14504         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
14505         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
14506         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
14507         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
14508         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
14509         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
14510         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
14511         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
14512         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
14513         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
14514         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
14515         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
14516         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
14517         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
14518         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
14519         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
14520         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
14521         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
14522         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
14523         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
14524         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
14525         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
14526         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
14527         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
14528         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
14529         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
14530         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
14531         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
14532         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
14533         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
14534         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
14535         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
14536         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
14537         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
14538         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
14539         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
14540         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
14541         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
14542         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
14543         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
14544         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
14545         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
14546         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
14547         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
14548         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
14549         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
14550         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
14551         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
14552         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
14553         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
14554         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
14555         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
14556         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
14557         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
14558         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
14559         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
14560         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
14561         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
14562         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
14563         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
14564         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
14565         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
14566         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
14567         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
14568         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
14569         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
14570         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
14571         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
14572         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
14573         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
14574         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
14575         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
14576         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
14577         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
14578         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
14579         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
14580         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
14581         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
14582         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
14583         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
14584         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
14585         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
14586         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
14587         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
14588         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
14589         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
14590         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
14591         lib/yesno.c, lib/yesno.h:
14592         Update FSF postal mail address.
14593
14594 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14595
14596         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
14597         tests/test-memmem.c, tests/test-stpncpy.c:
14598         Update FSF postal mail address.
14599
14600 2005-05-13  Bruno Haible  <bruno@clisp.org>
14601
14602         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
14603         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
14604         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
14605         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
14606         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
14607         Add support for 64-bit integers in the MSVC compiler.
14608
14609 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14610
14611         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
14612
14613 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
14614
14615         * gnulib-tool (func_import): Sort and uniquify recommended includes.
14616
14617 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
14618
14619         * doc/getdate.texi (General date syntax): Don't say that date
14620         date --iso-8601=ns generates acceptable dates; it doesn't yet.
14621         Problem reported by Nic Ferrier.
14622
14623 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14624
14625         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
14626         specified in ai_socktype. Fix invalid ai_protocol
14627         check. ai_protocol is usually set to 0 or depending on
14628         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
14629         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
14630         ai_socktype / ai_protocol in the returned addrinfo structure.
14631
14632 2005-05-10  Simon Josefsson  <jas@extundo.com>
14633
14634         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
14635         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
14636
14637 2005-05-10  Karl Berry  <karl@gnu.org>
14638
14639         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
14640         (from http://www.gnu.org/licenses).
14641         * doc/COPYING.LIB: also rename to COPYING.LESSER.
14642         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
14643         fdl.texi suffices.
14644
14645 2005-05-10  Karl Berry  <karl@gnu.org>
14646
14647         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
14648         (COPYING.DOC): remove.
14649
14650         * config/srclist-update: new FSF address.
14651
14652 2005-05-10  Derek Price  <derek@ximbiot.com>
14653
14654         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
14655         possible.
14656
14657 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14658             Bruno Haible  <bruno@clisp.org>
14659
14660         * modules/inet_ntop: New file.
14661         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14662         inet_ntop.
14663
14664 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14665             Bruno Haible  <bruno@clisp.org>
14666
14667         * m4/inet_ntop.m4: New file.
14668
14669 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14670             Bruno Haible  <bruno@clisp.org>
14671
14672         * lib/inet_ntop.h: New file.
14673         * lib/inet_ntop.c: New file, from glibc with modifications.
14674
14675 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
14676
14677         * modules/time_r (License): Change to LGPL.
14678         * modules/extensions (License): Change to LGPL.  Actually,
14679         the license is more permissive than that, but currently gnulib-tool
14680         doesn't know how to handle more-permissive licenses.
14681
14682         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
14683         Problem reported by Dave Love.
14684
14685 2005-05-08  Jim Meyering  <jim@meyering.net>
14686
14687         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
14688         blank.
14689
14690 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
14691
14692         * modules/argmatch (Depends-on): Add stdbool.
14693         * modules/backupfile (Depends-on): Likewise.
14694         * modules/chdir-long (Depends-on): Likewise.
14695         * modules/closeout (Depends-on): Likewise.
14696         * modules/cycle-check (Depends-on): Likewise.
14697         * modules/dirname (Depends-on): Likewise.
14698         * modules/fnmatch (Depends-on): Likewise.
14699         * modules/fsusage (Depends-on): Likewise.
14700         * modules/fwriteerror (Depends-on): Likewise.
14701         * modules/getcwd (Depends-on): Likewise.
14702         * modules/getloadavg (Depends-on): Likewise.
14703         * modules/hard-locale (Depends-on): Likewise.
14704         * modules/makepath (Depends-on): Likewise.
14705         * modules/mountlist (Depends-on): Likewise.
14706         * modules/nanosleep (Depends-on): Likewise.
14707         * modules/posixtm (Depends-on): Likewise.
14708         * modules/quotearg (Depends-on): Likewise.
14709         * modules/readtokens (Depends-on): Likewise.
14710         * modules/readtokens0 (Depends-on): Likewise.
14711         * modules/readutmp (Depends-on): Likewise.
14712         * modules/save-cwd (Depends-on): Likewise.
14713         * modules/strftime (Depends-on): Likewise.
14714         * modules/userspec (Depends-on): Likewise.
14715         * modules/utimecmp (Depends-on): Likewise.
14716         * modules/xgetcwd (Depends-on): Likewise.
14717         * modules/xnanosleep (Depends-on): Likewise.
14718         * modules/xstrtod (Depends-on): Likewise.
14719         * modules/yesno (Depends-on): Likewise.
14720
14721 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
14722
14723         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
14724         needless checks.
14725
14726 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14727
14728         Merge from coreutils.  Among other things,
14729         add bulletproofing for cases where stdin, stdout, or stderr are closed.
14730         * lib/fd-safer.c: New file.
14731         * lib/fcntl-safer.h, open-safer.c: Remove.
14732         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
14733         * lib/dup-safer.c: Include unistd-safer.h first.
14734         Don't include errno.h.
14735         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
14736         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
14737         * lib/file-type.c: Rely on file-type.h change.
14738         * lib/getloadavg.c: Include unistd-safer.h.
14739         (getloadavg): Use safer open.
14740         * lib/getusershell.c: Include "stdio-safer.h".
14741         (getusershell): Use safer fopen.
14742         * lib/long-options.c (long_options): Use NULL rather than 0.
14743         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
14744         'free'.
14745         * lib/modechange.c: Likewise.
14746         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
14747         (MODE_DONE): New constant.
14748         (struct mode_change): Remove 'next' member.
14749         (make_node_op_equals): New function; like the old one of the
14750         same name, except it allocates an array.
14751         (mode_compile, mode_create_from_ref): Use it.
14752         (mode_compile): Allocate result as an array, not a linked list.
14753         Parse octal string ourself, so that we catch mistakes like "+0".
14754         (mode_adjust): Arg is an array, not a linked list.
14755         * lib/modechange.c: Include stat-macros.h, xalloc.h.
14756         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
14757         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
14758         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
14759         Remove.  This is now stat-macros.h's job.
14760         (talloc): Remove.  All callers replaced by xalloc, so that
14761         our invokers don't have to worry about reporting memory failures.
14762         (make_node_op_equals): Remove.
14763         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
14764         New constants.
14765         (struct mode_change): Moved here from modechange.h.
14766         (mode_append_entry): Remove.
14767         (mode_compile): Remove MASKED_OPS arg, since it encouraged
14768         apps to have incorrect behavior.  Use simpler algorithm for head
14769         and tail.  Don't futz with umask; that's now the job of mode_adjust.
14770         Detect more invalid usages rather than having somewhat-random behavior.
14771         Don't insert an "a=" action, as that leads to incorrect behavior.
14772         (mode_compile, mode_create_from_ref): Return NULL on error instead
14773         of an enum, since now there's only one way to have an error.  All
14774         callers changed.
14775         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
14776         at the correct time.  Simplify calculation of "+u" and its ilk.
14777         Don't mishandle "+X".
14778         (mode_free): Remove "register" and localize decls.
14779         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
14780         (struct mode_change): Move to modechange.c; callers don't
14781         need to see this stuff.
14782         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
14783         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
14784         (mode_change, mode_adjust): Reflect the new signatures noted above.
14785         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
14786         that might redefine system include files.
14787         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
14788         (my_usleep): Use NULL rather than (void *) 0.
14789         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
14790         Use siginterrupt to specify that system calls should be interrupted.
14791         (rpl_nanosleep): Move initialization of suspended closer to call of
14792         my_usleep.
14793         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
14794         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
14795         (desirable_utmp_entry): New function.
14796         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
14797         using x2nrealloc, to simplify logic.
14798         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
14799         size calculation.  Do not assume utmp file is a regular file.
14800         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
14801         (READ_UTMP_CHECK_PIDS): New constant.
14802         * lib/save-cwd.c: Include unistd-safer.h.
14803         (save_cwd): Use fd_safer.
14804         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
14805         [!_LIBC] Include "stat-macros.h" instead.
14806         * lib/unistd-safer.h (fd_safer): New decl.
14807
14808 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14809
14810         * modules/getloadavg (Depends-on): Add unistd-safer.
14811         * modules/getusershell (Depends-on): Add stdio-safer.
14812         * modules/lstat (Depends-on): Remove xalloc.
14813         * modules/mkstemp (Depends-on): Add stat-macros.
14814         * modules/modechange (Depends-on): Remove xstrtol.
14815         Add stat-macros, xalloc.
14816         * modules/save-cwd (Depends-on): Add unistd-safer.
14817         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
14818         * modules/unistd-safer (Files): Add lib/fd-safer.c
14819         (Makefile.am): Remove lib_SOURCES.
14820
14821         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
14822         Remove fcntl-safer; unistd-safer supersedes it.
14823
14824 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14825
14826         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
14827         AC_HEADER_STAT.
14828         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
14829         (gl_PREREQ_CHOWN): Remove.
14830         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
14831         it.  Don't require AC_HEADER_STAT.
14832         (gl_PREREQ_LSTAT): Remove.
14833         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
14834         Don't require AC_HEADER_STAT.
14835         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
14836         (gl_PREREQ_RMDIR): Remove.
14837         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
14838         mention stat-macros.h or AC_HEADER_STAT, since we'll make
14839         the stat-macros module a prerequisite.
14840         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
14841         * m4/filemode.m4 (gl_FILEMODE): Likewise.
14842         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
14843         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
14844         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
14845         variable names.
14846         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
14847         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
14848         variable prefixes.
14849         * m4/fcntl-safer.m4: Remove.
14850         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
14851         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
14852         Invoke gl_PREREQ_FD_SAFER.
14853         (gl_PREREQ_FD_SAFER): New macro.
14854         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
14855         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
14856         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
14857         Remove duplicate call to AC_LIBOBJ(readutmp).
14858         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
14859
14860         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
14861         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
14862
14863 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14864
14865         * MODULES.html.sh (Misc): Add byteswap.
14866
14867 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14868
14869         * modules/getcwd (Depends-on): Add extensions.
14870         * modules/openat (Depends-on): Likewise.
14871
14872 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14873
14874         * modules/byteswap: New file.
14875
14876 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14877
14878         * m4/byteswap.m4: New file.
14879
14880 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14881
14882         * lib/byteswap_.h: New file.
14883
14884 2005-04-25  Karl Berry  <karl@gnu.org>
14885
14886         * m4/gettext.m4: Update from GNU gettext 0.14.4.
14887
14888 2005-04-25  Albert Chin  <china@thewrittenword.com>
14889
14890         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
14891         Toolkit C bug.
14892
14893 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
14894
14895         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
14896         (func_ln_if_changed) Remove forcibly for no error message
14897         in case file does not exist.
14898
14899 2005-04-19  Simon Josefsson  <jas@extundo.com>
14900
14901         * gnulib-tool (Options): Make --symlink mean --symbolic.
14902
14903 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
14904
14905         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
14906
14907 2005-04-16  Simon Josefsson  <jas@extundo.com>
14908
14909         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
14910
14911 2005-04-15  Simon Josefsson  <jas@extundo.com>
14912
14913         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
14914
14915 2005-04-15  Simon Josefsson  <jas@extundo.com>
14916
14917         * gnulib-tool: Rename --symlink to --symbolic.
14918
14919 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
14920
14921         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
14922         symbolic links to files instead of copying/moving.  Add --aux-dir,
14923         specifying directory relative --dir where auxiliary build tools
14924         are placed.
14925
14926 2005-04-14  Bruno Haible  <bruno@clisp.org>
14927
14928         * modules/allocsa (License): Change to LGPL.
14929         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
14930
14931 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
14932
14933         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
14934         that "UTC +1 second" continues to work.  Problem reported
14935         by Dmitry V. Levin.
14936         (relunit_snumber): New rule.
14937         (relunit): Use it.
14938
14939 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
14940
14941         * lib/getdate.y (universal_time_zone_table): New constant.
14942         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
14943         universal_time_zone_table.
14944         (lookup_zone): Prefer universal_time_zone_table to
14945         local_time_zone_table, so that "GMT" time stamps are allowed in
14946         London during the summer.  Problem reported by Ian Abbott.
14947
14948 2005-04-12  Jim Meyering  <jim@meyering.net>
14949
14950         * lib/human.c (humblock): Set *options even when returning due to
14951         xstrtoumax conversion failure.  Thanks to a used-uninitialized
14952         warning from gcc-4.
14953
14954 2005-04-09  Jim Meyering  <jim@meyering.net>
14955
14956         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
14957         -Wuninitialized: initialize tm0.tm_year.
14958
14959 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
14960
14961         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
14962         count, since there's no maximum.  All uses changed.
14963         Add member dsts_seen.
14964         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
14965         not being INT_MAX.
14966         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
14967         Use pc_rels_seen to decide whther a date is absolute.
14968
14969         * lib/getdate.y (number): Don't overwrite year.
14970         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
14971         check.
14972
14973 2005-04-02  Simon Josefsson  <jas@extundo.com>
14974
14975         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
14976         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
14977
14978 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
14979
14980         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
14981         where no absolute path name can be longer than PATH_MAX.
14982
14983 2005-03-27  Jim Meyering  <jim@meyering.net>
14984
14985         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
14986
14987 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
14988
14989         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
14990         "one's complement" -> "ones' complement" in comment, as per Knuth.
14991         "value of type" -> "type or expression" in comment.
14992         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
14993
14994 2005-03-26  Jim Meyering  <jim@meyering.net>
14995
14996         Comment nits.
14997         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
14998         Correct typos: s/or/of/.
14999
15000 2005-03-26  Jim Meyering  <jim@meyering.net>
15001
15002         * modules/check-include-files: Move to ../ and rename to...
15003         * check-module: ...this.
15004
15005 2005-03-25  Jim Meyering  <jim@meyering.net>
15006
15007         * modules/xvasprintf (Files): Add xalloc.h.
15008
15009 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
15010
15011         * modules/gettext (Files): config/config.rpath ->
15012         build-aux/config.rpath
15013         * modules/iconv (Files): Likewise.
15014         Problem reported by Oskar Liljeblad.
15015
15016 2005-03-23  Jim Meyering  <jim@meyering.net>
15017
15018         * modules/check-include-files: New script to check for
15019         missing dependencies, multiple includes, etc.
15020
15021         * modules/c-strtold (Depends-on): Add xalloc.
15022         * modules/c-strtod (Depends-on): Add xalloc.
15023         * modules/hash (Depends-on): Add xalloc.
15024         (Files): Remove lib/xalloc.h.
15025
15026         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
15027         * modules/userspec (Files): Add lib/inttostr.h.
15028
15029 2005-03-23  Jim Meyering  <jim@meyering.net>
15030
15031         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
15032
15033 2005-03-22  Jim Meyering  <jim@meyering.net>
15034
15035         * modules/stat-macros: New module.
15036         * modules/canonicalize, modules/euidaccess, modules/file-type,
15037         * modules/filemode, modules/lchown, modules/makepath,
15038         * modules/rmdir, modules/stat: Depend on new stat-macros module
15039         rather than listing lib/stat-macros.h manually.
15040         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
15041
15042 2005-03-22  Jim Meyering  <jim@meyering.net>
15043
15044         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
15045
15046 2005-03-22  Bruno Haible  <bruno@clisp.org>
15047
15048         * config/srclist.txt: Replace target directory 'config' with
15049         'build-aux'.
15050         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
15051         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
15052         ../build-aux/.
15053
15054 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
15055
15056         * modules/chdir-long (Depends-on): Add mempcpy.
15057
15058         * modules/acl, modules/backupfile, modules/c-strtod,
15059         modules/c-strtold, modules/canon-host, modules/canonicalize,
15060         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
15061         modules/exclude, modules/exitfail, modules/file-type,
15062         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
15063         modules/getdate, modules/getline, modules/getpagesize,
15064         modules/getpass, modules/getugroups, modules/group-member,
15065         modules/hard-locale, modules/hash, modules/human, modules/idcache,
15066         modules/inttostr, modules/long-options, modules/makepath,
15067         modules/md5, modules/memcasecmp, modules/memcoll,
15068         modules/modechange, modules/mountlist, modules/path-concat,
15069         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
15070         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
15071         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
15072         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
15073         modules/strftime, modules/strndup, modules/strverscmp,
15074         modules/timespec, modules/unlocked-io, modules/userspec,
15075         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
15076         modules/yesno:
15077         Remove lib_SOURCES line from Makefile.am section, as this is now
15078         done automatically by the corresponding Autoconf macro.
15079
15080 2005-03-21  Jim Meyering  <jim@meyering.net>
15081
15082         Changes imported from coreutils.
15083
15084         * lib/cycle-check.c: Don't include xalloc.h.
15085
15086         * lib/path-concat.c: Don't include assert.h.
15087         (path_concat): Remove assertion that would have triggered
15088         for ABASE starting with more than one slash.
15089         Reported by Andreas Schwab.
15090
15091         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
15092         properly when ABASE is an absolute file name.
15093         Correct the description of this function.
15094         Include <assert.h>.
15095         Add an assertion and a test driver.
15096         This fixes a bug introduced on 2004-07-02.
15097         Andreas Schwab reported the resulting failure of cp --parents:
15098         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
15099
15100 2005-03-21  Jim Meyering  <jim@meyering.net>
15101
15102         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
15103         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
15104
15105 2005-03-21  Jim Meyering  <jim@meyering.net>
15106         and  Paul Eggert  <eggert@cs.ucla.edu>
15107
15108         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
15109         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
15110         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
15111         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
15112         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
15113         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
15114         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
15115         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
15116         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
15117         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
15118         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
15119         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
15120         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
15121         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
15122         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
15123         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
15124         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
15125         for these modules.
15126
15127 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
15128
15129         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
15130         (which shouldn't happen), generate nothing instead of returning 0
15131         immediately, so that nstrftime (NULL, ...) doesn't return 0.
15132
15133 2005-03-16  Bruno Haible  <bruno@clisp.org>
15134
15135         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
15136         HAVE_LONGLONG_64BIT.
15137
15138 2005-03-16  Bruno Haible  <bruno@clisp.org>
15139
15140         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
15141         HAVE_LONGLONG_64BIT.
15142
15143 2005-03-16  Bruno Haible  <bruno@clisp.org>
15144
15145         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
15146         HAVE_LONGLONG_64BIT.
15147
15148 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
15149
15150         * lib/strftime.c (my_strftime): Prepend space to format so that we can
15151         reliably distinguish strftime failure from empty output on POSIX
15152         hosts.
15153
15154 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
15155
15156         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
15157         (iconv_string): Don't guess a size-zero buffer, as that might cause
15158         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
15159         result would be 'too large', where 'too large' is (heuristically)
15160         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
15161         overflow concerns.  This will prevent some unwanted malloc failures
15162         when the inputs are very large.
15163
15164 2005-03-15  Karl Berry  <karl@gnu.org>
15165
15166         * config/srclist.txt (config.rpath): from gettext.
15167         * config/config.rpath: update.
15168
15169 2005-03-15  Bruno Haible  <bruno@clisp.org>
15170
15171         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
15172         to 'negate'.
15173
15174         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
15175         variable.
15176
15177         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
15178         results.
15179
15180 2005-03-14  Simon Josefsson  <jas@extundo.com>
15181
15182         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
15183         <fx@gnu.org>.
15184
15185 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
15186
15187         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
15188         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
15189         intprops.h.
15190         * lib/strtol.c: Likewise.
15191
15192 2005-03-14  Jim Meyering  <jim@meyering.net>
15193
15194         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
15195         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
15196         to be nonzero so that we (and caller) can detect the difference
15197         between a valid zero-length expansion and an error return, even
15198         when the underlying strftime fails before writing anything into
15199         that location.
15200
15201 2005-03-14  Bruno Haible  <bruno@clisp.org>
15202
15203         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
15204         Update from GNU gettext 0.14.3.
15205
15206 2005-03-10  Jim Meyering  <jim@meyering.net>
15207
15208         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
15209
15210 2005-03-10  Jim Meyering  <jim@meyering.net>
15211
15212         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
15213         so that this module works on systems without fchdir.
15214
15215 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
15216
15217         Factor int-properties macros into a single file, except for
15218         glibc-related files.
15219         * lib/intprops.h: New file.
15220         * lib/getloadavg.c: Include it instead of limits.h.
15221         (INT_STRLEN_BOUND): Remove.
15222         * lib/human.c: Include intprops.h.
15223         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
15224         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
15225         302/1000.
15226         * lib/inttostr.h: Include intprops.h instead of limits.h.
15227         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
15228         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
15229         for consistency with intprops.h.
15230         (time_t_is_integer, twos_complement_arithmetic): Use them.
15231         * lib/sig2str.h: Include <signal.h>, intprops.h.
15232         (INT_STRLEN_BOUND): Remove.
15233         * lib/strftime.c (TYPE_SIGNED): Remove.
15234         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
15235         * lib/strtol.c: Adjust comments to match intprops.h.
15236         * lib/userspec.c: Include intprops.h.
15237         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
15238         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
15239         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
15240         instead of rolling our own expressions.
15241         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
15242
15243         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
15244         instead of int.
15245         (my_strftime): Do not mishandle years close to INT_MAX, by doing
15246         the right thing even if adding 1900 would overflow.  Similarly
15247         for tm_mon + 1 and tm_yday + 1.
15248         Make %Y always equivalent to %C%y, and similarly for %G and %g.
15249         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
15250         (DO_SIGNED_NUMBER): New macro.
15251         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
15252
15253 2005-03-07  Bruno Haible  <bruno@clisp.org>
15254
15255         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
15256
15257 2005-03-07  Bruno Haible  <bruno@clisp.org>
15258
15259         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
15260
15261 2005-03-04  Derek R. Price  <derek@ximbiot.com>
15262
15263         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
15264         (func_import): Only replace files via --import when they have actually
15265         changed.
15266
15267 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15268
15269         * m4/mmap-anon.m4: New file.
15270         * m4/pagealign_alloc.m4: New file.
15271
15272 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15273             Bruno Haible  <bruno@clisp.org>
15274
15275         * modules/pagealign_alloc: New file.
15276         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
15277
15278 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15279             Bruno Haible  <bruno@clisp.org>
15280
15281         * lib/pagealign_alloc.h: New file.
15282         * lib/pagealign_alloc.c: New file.
15283
15284 2005-03-03  Bruno Haible  <bruno@clisp.org>
15285
15286         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
15287         Use an all-permissive copyright notice, recommended by RMS.
15288
15289 2005-03-02  Bruno Haible  <bruno@clisp.org>
15290
15291         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
15292         of AIX, the replacement has to be done only after <string.h> is
15293         included, therefore not in config.h. stpncpy.h does the replacement,
15294         and stpncpy.c uses it.
15295
15296 2005-03-02  Bruno Haible  <bruno@clisp.org>
15297
15298         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
15299         stpncpy.c uses it.
15300
15301 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15302
15303         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
15304         The workaround isn't strictly needed for POSIX conformance, and
15305         it's too much of a pain to configure and maintain.  We'll ask
15306         people to fix their kernels instead.
15307         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
15308         (NANOSLEEP_BUG_WORKAROUND): Remove.
15309         (xnanosleep): Remove the workaround.
15310
15311 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15312
15313         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
15314         Reported by Derek Price.
15315         (Include): Add "timespec.h".
15316
15317         * modules/xnanosleep (Depends-on): Remove gethrxtime.
15318
15319 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15320
15321         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
15322         to detect nanosleep bug.
15323
15324 2005-03-01  Bruno Haible  <bruno@clisp.org>
15325
15326         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
15327
15328 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
15329
15330         * modules/gethrxtime: New file.
15331         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
15332         (Depends-on): Add gethrxtime.
15333         (configure.ac): Add gl_XNANOSLEEP.
15334         (Makefile.am): Remove lib_SOURCES line.
15335
15336 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
15337
15338         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
15339         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
15340
15341 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
15342
15343         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
15344         * lib/timespec.h (gettime): Return void, since it always
15345         succeeds now.  All uses changed.
15346         * lib/gettime.c (gettime) Likewise.
15347         [HAVE_NANOTIME]: Prefer nanotime.
15348         Assume gettimeofday succeeds, as POSIX requires.
15349         Assime time () succeeds, since other code already does.
15350         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
15351         (timespec_subtract): Remove.
15352         (NANOSLEEP_BUG_WORKAROUND): New constant.
15353         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
15354         things considerably.  Use it only on GNU/Linux hosts, since the
15355         workaround shouldn't be needed elsewhere.
15356
15357 2005-02-24  Bruno Haible  <bruno@clisp.org>
15358
15359         * modules/gettext (Files): Add m4/glibc2.m4.
15360
15361 2005-02-24  Bruno Haible  <bruno@clisp.org>
15362
15363         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
15364         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
15365         * m4/progtest.m4:
15366         Update from GNU gettext 0.14.2.
15367         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
15368
15369 2005-02-24  Bruno Haible  <bruno@clisp.org>
15370
15371         * lib/localcharset.c: Update from GNU gettext 0.14.2.
15372         * lib/config.charset: Update from GNU gettext 0.14.2.
15373
15374 2005-02-24  Bruno Haible  <bruno@clisp.org>
15375
15376         * lib/gettext.h: Update from GNU gettext 0.14.2.
15377
15378 2005-02-23  Simon Josefsson  <jas@extundo.com>
15379
15380         * m4/iconvme.m4: New file.
15381
15382 2005-02-23  Jim Meyering  <jim@meyering.net>
15383
15384         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
15385         change.
15386         Thanks to Bruno Haible for catching it.
15387
15388 2005-02-22  Simon Josefsson  <jas@extundo.com>
15389
15390         * modules/iconvme: New file.
15391
15392         * MODULES.html.sh: Add iconvme.
15393
15394 2005-02-22  Simon Josefsson  <jas@extundo.com>
15395
15396         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
15397
15398 2005-02-22  Simon Josefsson  <jas@extundo.com>
15399
15400         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
15401
15402 2005-02-22  Jim Meyering  <jim@meyering.net>
15403
15404         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
15405         s/ifndef/ifdef/.
15406
15407 2005-02-20  Neil Conway  <neilc@samurai.com>
15408
15409         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
15410         returned by OSX/Darwin if the specified buffer is not large
15411         enough for the hostname.
15412
15413 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15414
15415         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
15416         pass it to _help, otherwise the latter coredumps trying to
15417         dereference state.root_argp.
15418
15419 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15420
15421         * modules/chdir-long (Depends-on): Add memrchr.
15422         * modules/memrchr (Files): Add lib/memrchr.h.
15423         (Include): "memrchr.h".
15424
15425 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15426
15427         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
15428
15429 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15430
15431         * lib/memrchr.h: New file.
15432         * lib/chdir-long.c: Include it.
15433         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
15434         Don't bother including stddef.h.
15435
15436 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
15437
15438         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
15439         inclusion.
15440         Include <sys/types.h>, for dev_t.
15441         (ME_DUMMY, ME_REMOTE): Move from here....
15442         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
15443         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
15444         Dmitry V. Levin.
15445         Include mountlist.h first, to test the interface.
15446
15447 2005-01-29  Bruno Haible  <bruno@clisp.org>
15448
15449         * lib/progname.c (program_name): Initialize.
15450         Needed when linking statically on MacOS X.
15451
15452 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
15453
15454         Sync from coreutils.
15455         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
15456         (Depends-on): Add c-strtod.
15457         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
15458
15459 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
15460
15461         Sync from coreutils.
15462         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
15463
15464         Remove files that are specific to coreutils.
15465         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
15466
15467 2005-01-28  Bruno Haible  <bruno@clisp.org>
15468
15469         * modules/javacomp: New file.
15470         * MODULES.html.sh (Java): Add javacomp.
15471
15472 2005-01-28  Bruno Haible  <bruno@clisp.org>
15473
15474         * m4/javacomp.m4: New file, from GNU gettext.
15475
15476 2005-01-28  Bruno Haible  <bruno@clisp.org>
15477
15478         * lib/javacomp.sh.in: New file, from GNU gettext.
15479         * lib/javacomp.h: New file, from GNU gettext.
15480         * lib/javacomp.c: New file, from GNU gettext.
15481
15482 2005-01-26  Simon Josefsson  <jas@extundo.com>
15483
15484         * lib/gai_strerror.c: Use GPL in header.
15485
15486 2005-01-26  Bruno Haible  <bruno@clisp.org>
15487
15488         * modules/javaexec: New file.
15489         * MODULES.html.sh (Java): Add javaexec.
15490
15491 2005-01-26  Bruno Haible  <bruno@clisp.org>
15492
15493         * m4/javaexec.m4: New file, from GNU gettext.
15494
15495 2005-01-26  Bruno Haible  <bruno@clisp.org>
15496
15497         * lib/javaexec.sh.in: New file, from GNU gettext.
15498         * lib/javaexec.h: New file, from GNU gettext.
15499         * lib/javaexec.c: New file, from GNU gettext.
15500
15501 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15502
15503         * modules/lchown (Depends-on): Remove lchown.h
15504
15505 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15506
15507         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
15508         must be defined if the header file was not found, in order
15509         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
15510
15511 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15512
15513         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
15514         initializers for struct pentry_state.
15515         (__argp_error): Check return value of __asprintf
15516         (__argp_failure): Translate error message
15517
15518         * lib/argp-parse.c: Removed braces around the expansion of N_()
15519
15520 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
15521
15522         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
15523         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
15524         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
15525         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
15526         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
15527         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
15528         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
15529         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
15530         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
15531         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
15532         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
15533         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
15534         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
15535         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
15536         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
15537         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
15538         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
15539         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
15540         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
15541         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
15542         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
15543         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
15544         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
15545         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
15546         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
15547         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
15548         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
15549         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
15550         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
15551         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
15552         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
15553         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
15554         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
15555         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
15556         xstrtol.m4, xstrtoumax.m4, yesno.m4:
15557         Use an all-permissive copyright notice, recommended by RMS.
15558
15559 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
15560
15561         * modules/chdir-long (Depends-on): Remove mempcpy.
15562
15563 2005-01-21  Jim Meyering  <jim@meyering.net>
15564
15565         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
15566         same value as for Solaris 9.
15567
15568         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
15569         component length.  This included changing the parameter to be
15570         of type `char *' rather than `char const *'.
15571         * lib/chdir-long.h (chdir_long): Update prototype.
15572
15573         * lib/openat.c (fdopendir, fstatat): New functions.
15574         * lib/openat.h: Include headers required for use of DIR and struct
15575         stat.
15576         [AT_SYMLINK_NOFOLLOW]: Define.
15577         (fdopendir, fstatat): Add prototypes.
15578
15579 2005-01-21  Bruno Haible  <bruno@clisp.org>
15580
15581         * modules/classpath: New file.
15582         * MODULES.html.sh (Java): Add classpath.
15583
15584 2005-01-21  Bruno Haible  <bruno@clisp.org>
15585
15586         * lib/classpath.h: New file, from GNU gettext.
15587         * lib/classpath.c: New file, from GNU gettext.
15588
15589 2005-01-20  Simon Josefsson  <jas@extundo.com>
15590
15591         * modules/version-etc-fsf: New file.
15592
15593 2005-01-20  Simon Josefsson  <jas@extundo.com>
15594
15595         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
15596         * lib/version-etc.c: Remove version_etc_copyright.
15597         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
15598         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
15599
15600 2005-01-20  Simon Josefsson  <jas@extundo.com>
15601
15602         * lib/base64.h (isbase64): Add.
15603
15604         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
15605         using a unsigned prototype, don't inline.
15606         (base64_decode): Use it.
15607
15608 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15609
15610         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
15611         it.
15612
15613 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15614
15615         * lib/save-cwd.c (save_cwd): Remove code to support the case
15616         where fchdir is missing or flaky.
15617
15618 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15619
15620         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
15621
15622 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
15623
15624         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
15625         AC_LIBSOURCES now does this.
15626         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
15627         with new ullong_max module.
15628
15629 2005-01-19  Bruno Haible  <bruno@clisp.org>
15630
15631         * modules/sh-quote: New file.
15632         * MODULES.html.sh (Executing programs): Add sh-quote.
15633
15634 2005-01-19  Bruno Haible  <bruno@clisp.org>
15635
15636         * lib/sh-quote.h: New file, from GNU gettext.
15637         * lib/sh-quote.c: New file, from GNU gettext.
15638
15639 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
15640
15641         Merge from coreutils.
15642         * m4/ullong_max.m4: New file.
15643         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
15644         (gl_MACROS): Assume localeconv exists.
15645
15646 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
15647
15648         Merge changes from coreutils, as described below in several
15649         changelogs dated today.
15650
15651         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
15652         (O_DIRECTORY): Remove; not needed here, since "." must be
15653         a directory.  All uses removed.
15654         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
15655         universal on Suns, and we also need to test for IRIX.
15656         Revamp code to use 'if' rather than '#if'.
15657         Avoid unnecessary comparison of cwd->desc to 0.
15658
15659         * lib/utimens.c (futimens): Robustify the previous patch, by checking
15660         for known valid error numbers rather than observed invalid ones.
15661
15662 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
15663
15664         * modules/ullong_max: New file.
15665
15666         * modules/chdir-long, modules/openat: New files.
15667         * modules/save-cwd (Depends-on): Depend on chdir-long.
15668         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
15669
15670 2005-01-18  Jim Meyering  <jim@meyering.net>
15671
15672         Merge from coreutils.
15673         * m4/chdir-long.m4, m4/openat.m4: New files.
15674         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
15675         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
15676         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
15677         is sane and DOES follow symlinks.  Besides, testing 20 different
15678         systems found no broken chown implementations.
15679         Prompted by a change in rsync's copy of this macro.
15680         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
15681
15682         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
15683
15684         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
15685         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
15686         NULL-means-set-to-current-time semantics.
15687         Remove temporary file immediately, rather than waiting
15688         for configure's at-exit trap code to do it.
15689
15690 2005-01-18  Jim Meyering  <jim@meyering.net>
15691
15692         * lib/version-etc.c (version_etc_copyright): Update copyright date.
15693
15694         * lib/utimens.c (futimens): Account for the fact that futimes
15695         can also fail with errno == ENOSYS or errno == ENOENT.
15696         Patch from Dmitry V. Levin.
15697
15698         Change the name of the robust chdir function from chdir to chdir_long.
15699         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
15700         (restore_cwd): Use chdir_long, not chdir.
15701         * lib/chdir-long.c: Renamed from chdir.c.
15702         * lib/chdir-long.h: Renamed from chdir.h.
15703         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
15704         Hurd.
15705
15706 2005-01-18  Bruno Haible  <bruno@clisp.org>
15707
15708         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
15709         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
15710         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
15711         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
15712         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
15713         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
15714         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
15715         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
15716         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
15717         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
15718         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
15719         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
15720         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
15721         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
15722         Use an all-permissive copyright notice, recommended by RMS.
15723
15724 2005-01-18  Bob Proulx  <bob@proulx.com>
15725
15726         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
15727         simplify offsetof() macro construct to avoid compile failure with
15728         native HP-UX 11.0 ANSI C compiler.
15729
15730 2005-01-17  Bruno Haible  <bruno@clisp.org>
15731
15732         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
15733         redundant because stpncpy.m4 takes care of it.
15734
15735 2005-01-17  Bruno Haible  <bruno@clisp.org>
15736
15737         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
15738
15739 2005-01-17  Bruno Haible  <bruno@clisp.org>
15740
15741         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
15742         used.
15743
15744 2005-01-17  Bruno Haible  <bruno@clisp.org>
15745
15746         * lib/fwriteerror.h (fwriteerror): Change specification to include
15747         fclose.
15748         * lib/fwriteerror.c: Include <stdbool.h>.
15749         (fwriteerror): At the end, close the file stream. Record whether
15750         stdout was already closed.
15751
15752 2005-01-17  Bruno Haible  <bruno@clisp.org>
15753
15754         * lib/execute.c (environ): Declare if needed.
15755         * lib/pipe.c (environ): Likewise.
15756         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
15757
15758 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15759
15760         * modules/argp: Depend on vsnprintf
15761
15762 2005-01-10  Jim Meyering  <jim@meyering.net>
15763
15764         * modules/closeout (Depends-on): Add atexit.
15765
15766 2005-01-06  Bruno Haible  <bruno@clisp.org>
15767
15768         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
15769
15770 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
15771
15772         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
15773         definitions to be after all include files, to avoid collisions.
15774         Problem reported by Bob Proulx.
15775
15776 2005-01-04  Jim Meyering  <jim@meyering.net>
15777
15778         Changes imported from coreutils.
15779         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
15780         as the mkstemp template, use a temporary directory and an
15781         8.3-friendly template to avoid trouble on systems like DJGPP.
15782         Reported by Juan M. Guerrero via Stepan Kasal.
15783         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
15784         close. Remove the temporary directory right away, rather than waiting
15785         for configure's at-exit trap code to do it.
15786         Suggestion from Stepan Kasal.
15787
15788 2005-01-01  Simon Josefsson  <jas@extundo.com>
15789
15790         * gnulib-tool: Print #include directives when --import'ing.
15791
15792 2004-12-28  Simon Josefsson  <jas@extundo.com>
15793
15794         * tests/test-base64.c: Include required header files.  Remove
15795         unused variables.
15796
15797 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
15798
15799         * modules/error (Depends-on): Remove gettext.
15800
15801 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
15802
15803         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
15804         not needed.  This removes a dependency on the gettext module.
15805         [defined _LIBC]: Do not include <libintl.h>; not needed.
15806
15807 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
15808
15809         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
15810         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
15811
15812 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
15813
15814         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
15815         HAVE_DECL_STRTOLD.
15816
15817 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15818
15819         * modules/getdate (Depends-on): Remove alloca-opt.
15820
15821 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15822
15823         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
15824
15825 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15826
15827         * lib/argp-parse.c: Include <stddef.h>.
15828         (alignof, alignto): New macros.
15829         (parser_init): Don't assume that void * is aligned sufficiently
15830         for struct option.
15831
15832         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
15833         need to extend the stack.
15834         (YYINITDEPTH): New macro, so that the initial stack isn't overly
15835         large.
15836
15837 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15838
15839         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
15840
15841 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
15842
15843         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
15844         (2004-10-24) change.  Apparently this was a false alarm.
15845
15846         * modules/getdate: Depend on alloca-opt, not alloca.
15847
15848 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
15849
15850         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
15851         Remove now-obsolete comment about AIX.
15852         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
15853         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
15854         (YYMAXDEPTH): New macro.
15855
15856 2004-12-18  Simon Josefsson  <jas@extundo.com>
15857
15858         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
15859
15860 2004-12-18  Bruno Haible  <bruno@clisp.org>
15861
15862         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
15863
15864 2004-12-18  Bruno Haible  <bruno@clisp.org>
15865
15866         * lib/fatal-signal.c (fatal_signals): Make non-const.
15867         (init_fatal_signals): New function.
15868         (uninstall_handlers, install_handlers): Ignore signals that were set to
15869         SIG_IGN.
15870         (at_fatal_signal): Call init_fatal_signals.
15871         (init_fatal_signal_set): Likewise. Ignore signals that were set to
15872         SIG_IGN.
15873         Reported by Paul Eggert.
15874
15875 2004-12-18  Bruno Haible  <bruno@clisp.org>
15876
15877         * doc/alloca.texi: New file.
15878         * doc/alloca-opt.texi: New file.
15879
15880 2004-12-17  Jim Meyering  <jim@meyering.net>
15881
15882         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
15883         Otherwise, install-sh could exit with improper exit status when
15884         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
15885
15886 2004-12-16  Simon Josefsson  <jas@extundo.com>
15887
15888         * tests/test-base64.c: Add license.
15889
15890 2004-12-15  Stepan Kasal  <address@hidden>
15891
15892         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
15893
15894 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
15895
15896         * modules/getcwd (Files): Add m4/d-ino.m4.
15897         Suggested by Mark D. Baushke.
15898
15899 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
15900
15901         * lib/getdate.y (textint): New member "negative".
15902         (time_zone_hhmm): New function.
15903         Expect 14 shift-reduce conflicts, not 13.
15904         (o_colon_minutes): New rule.
15905         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
15906         (yylex): Set the "negative" member of signed numbers.
15907
15908 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
15909
15910         * doc/getdate.texi (Time of day items, Time zone items):
15911         Describe new formats +00:00, UTC+00:00.
15912
15913 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
15914
15915         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
15916         spurious "-l"s.  Problem reported by Stepan Kasal.
15917
15918 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
15919
15920         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
15921         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
15922
15923 2004-12-04  Simon Josefsson  <jas@extundo.com>
15924
15925         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
15926         Vandoorselaere <yoann@prelude-ids.org>.
15927
15928 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15929
15930         Changes imported from coreutils.
15931         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
15932         exist.
15933         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
15934
15935 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15936
15937         Changes imported from coreutils.
15938         * lib/hard-locale.c: Assume <locale.h> exists.
15939         Include "strdup.h".
15940         (GLIBC_VERSION): New macro.
15941         (hard_locale): Assume setlocale exists.
15942         Rewrite to avoid #ifdef.
15943         Use strdup rather than malloc + strcpy.
15944         * lib/human.c: Assume <locale.h> exists.
15945         (human_readable): Assume localeconv exists.
15946
15947 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15948
15949         * modules/hard-locale (Depends-on): Add strdup.
15950
15951 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
15952
15953         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
15954         convert T2, not T.  (Imported from libc.)
15955
15956 2004-11-30  Simon Josefsson  <jas@extundo.com>
15957
15958         * modules/restrict (License): Change to LGPL.
15959
15960 2004-11-30  Simon Josefsson  <jas@extundo.com>
15961
15962         * m4/restrict.m4: Add copyright and copying conditions.
15963
15964 2004-11-30  Simon Josefsson  <jas@extundo.com>
15965
15966         * m4/base64.m4: New file.
15967
15968 2004-11-30  Simon Josefsson  <jas@extundo.com>
15969
15970         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
15971         base64.
15972
15973         * tests/test-base64.c: New file.
15974
15975         * modules/base64: New file.
15976
15977 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
15978
15979         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
15980         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
15981
15982         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
15983
15984 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
15985
15986         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
15987         (__getcwd.c): Don't restore errno; glibc doesn't.
15988         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
15989         first, falling back to our code only if its results look suspicious.
15990         Ensure that the resulting buffer is only as large as necessary.
15991
15992         * lib/readutmp.c: Include readutmp.h first.
15993         Include <errno.h>, since readutmp.h no longer does that.
15994         * lib/readutmp.h: Don't include <errno.h>,
15995         <sys/param.h>, <time.h>; not needed to establish interface.
15996         (errno): Remove decl.
15997         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
15998         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
15999         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
16000
16001 2004-11-28  Simon Josefsson  <jas@extundo.com>
16002
16003         * lib/base64.h, base64.c: New file.
16004
16005 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
16006
16007         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
16008
16009 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
16010
16011         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
16012         (Depends-on): Remove pathmax, same.  Add mempcpy.
16013         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
16014         (Makefile.am): Append getcwd.h to lib_SOURCES.
16015         (Include): Add getcwd.h.
16016         (Maintainer): Change from Jim Meyering to "all, glibc",
16017         since getdate now uses intended-for-glibc code.
16018         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
16019         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
16020
16021 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
16022
16023         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
16024         HP's ANSI C compiler.
16025         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
16026         Declaring int functions causes warnings on some modern systems and
16027         shouldn't be needed to compile on ancient ones.
16028         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
16029         defined.
16030
16031         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
16032         with the following changes.
16033         (__set_errno): Parenthesize properly.
16034         Include <stdbool.h>.
16035         (MIN, MAX, MATCHING_INO): New macros.
16036         (__getcwd): Define with prototype, not K&R form.
16037         Use heuristics to allocate default buffer on stack if possible.
16038         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
16039         behavior, and to avoid the PATH_MAX limit when computing
16040         ../../../../...
16041         Use MATCHING_INO to compare inode number to file.
16042         Check for arithmetic overflow in size calculations.
16043         Fix bug in reallocation of dot array that caused getcwd to fail
16044         on directories nested deeper than 75.
16045         Be more careful about saving errno on error.
16046         Do not use realloc; use only free+malloc, as this is a bit
16047         more flexible and avoids a needless copy operation.
16048         Do not inspect st_dev and st_ino for symbolic links; POSIX
16049         doesn't specify the latter.
16050         Check for closedir errors.
16051         Avoid needless casts.
16052         Use "#ifdef weak_alias" around weak_alias, to be like other
16053         glibc code.
16054         The following changes to getcwd.c have effect only when used in
16055         gnulib; they have no effect inside glibc proper.
16056         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
16057         as alloca isn't used.
16058         (alloca, __alloca): Likewise.
16059         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
16060         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
16061         unconditionally, as gnulib assumes C89 or better.
16062         Do not include <sys/param.h>.
16063         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
16064         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
16065         better.
16066         (NULL) [!defined NULL]: Remove; we assume C89 or better.
16067         Include <dirent.h> in a way that is compatible with modern Autoconf.
16068         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
16069         New macros, if not already defined.
16070         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
16071         Use "_LIBC", not "defined _LIBC", for consistency.
16072         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
16073         a mempcpy module.
16074         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
16075         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
16076         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
16077         credit only to Jim Meyering and adjust the copyright dates.
16078         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
16079         <stdlib.h>, <unistd.h>, "pathmax.h".
16080         Instead, include "xgetcwd.h" (first) and "getcwd.h".
16081         (INITIAL_BUFFER_SIZE): Remove.
16082         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
16083
16084 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
16085
16086         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
16087         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
16088         Use the _ONCE methods, for efficiency.
16089         Check for fcntl.h.  In test program, include <errno.h>
16090         and <fcntl.h> if available.  Remove old K&R cruft from
16091         test program.  Check for common errors in GNU/Linux,
16092         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
16093         don't do AC_LIBOBJ, as that's getcwd.m4's job.
16094         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
16095         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
16096         name accordingly.
16097         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
16098         accommodate new getcwd.c.
16099         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
16100         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
16101         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
16102         that's all we need now.
16103
16104 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16105
16106         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
16107         argp-parse.c depends on getopt internals, that means we should
16108         always use our getopt, to be on the safe side.
16109         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
16110         order not to spoil the result of an eventual previous invocation
16111         of gl_GETOPT_SUBSTITUTE.
16112
16113 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16114
16115         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
16116         redefinition warnings. To avoid them, include the defines
16117         in `#if !defined __need_getopt ... #endif'. The only place
16118         where __getopt_argv_const is used is in definitions
16119         of getopt_long and getopt_long_only below, which are as well
16120         protected by `#ifndef __need_getopt'.
16121         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
16122         __need_getopt after including <stdio.h> and <unistd.h> These
16123         headers might have defined it.
16124
16125 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
16126
16127         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
16128
16129 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
16130
16131         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
16132         (futimens): New function, which uses futimes if available.
16133         (futimens, utimens): Support timespec==NULL, with same semantics
16134         as utime and utimens.
16135         * lib/utimens.h (futimens): New decl.
16136
16137 2004-11-23  Jim Meyering  <jim@meyering.net>
16138
16139         * lib/getopt_.h: Remove trailing blanks.
16140
16141 2004-11-23  Jim Meyering  <jim@meyering.net>
16142
16143         * lib/__fpending.c: Add comment.
16144
16145 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
16146
16147         * modules/canonicalize (Depends-on): Add xreadlink.
16148         Problem reported by James Youngman.
16149
16150 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
16151
16152         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
16153         New macros.
16154         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
16155         optopt): Use them instead of invoking ## directly; otherwise, the
16156         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
16157
16158 2004-11-19  Bruno Haible  <bruno@clisp.org>
16159
16160         * lib/strtok_r.c: Move comments from here...
16161         * lib/strtok_r.h: ... to here.
16162
16163 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
16164
16165         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
16166         implementations that mishandle size_t overflow.
16167
16168 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
16169
16170         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
16171         might fail.  Problem reported by Yoann Vandoorselaere.
16172         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
16173         implementations that mishandle size_t overflow.
16174
16175 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16176
16177         * modules/canon-host (Depends-on): Add strdup.
16178
16179 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16180
16181         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
16182
16183 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16184
16185         * lib/canon-host.c: Include "strdup.h".
16186         (canon_host): Use getaddrinfo if available, so that IPv6 works.
16187         Use strdup instead of malloc/strcpy to duplicate strings.
16188
16189         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
16190         (human_space_before_unit): New constant.
16191         * lib/human.c (human_readable): Support it.
16192
16193         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
16194         (xgetcwd): Set errno correctly when failing.
16195         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
16196         the failure is actually due to a PATH_MAX problem.
16197
16198         Further getopt changes to make it more likely that glibc will
16199         buy the changes back.
16200         * lib/getopt.c (POSIXLY_CORRECT): New constant.
16201         (getopt): Use it, so to preserve glibc semantic
16202         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
16203         when compiling for libc.
16204         * lib/getopt_.h (__getopt_argv_const): Bring it back.
16205         (getopt_long, getopt_long_only): Use it.
16206
16207         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
16208         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
16209         (getopt): Argv is now char * const *, as per standard.
16210         (_getopt_internal_r, _getopt_internal): Argv is now char **,
16211         not char *__getopt_argv_const *.
16212         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
16213         _getopt_long_only_r): Likewise.
16214         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
16215         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
16216         _getopt_long_r, _getopt_long_only_r): Likewise.
16217         * lib/getopt_.h (__getopt_argv_const): Remove.
16218         (getopt): Argv is now char * const *, as per standard.
16219
16220         * lib/getdate.y (tORDINAL): New token.
16221         (day, relunit): Allow it for relative times.
16222         (relative_time_table): Use tORDINAL for ordinals.
16223
16224 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16225
16226         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
16227         Document that "second" isn't allowed as an ordinal number.
16228
16229 2004-11-16  Jim Meyering  <jim@meyering.net>
16230
16231         * modules/closeout (Depends-on): Add fpending.
16232
16233 2004-11-15  Jim Meyering  <jim@meyering.net>
16234
16235         * lib/closeout.c: Include "__fpending.h" once again.
16236         Include <stdbool.h>.
16237         (close_stdout): Don't fail just because stdout was closed initially,
16238         since some programs don't write to stdout in the normal course of
16239         operation (other than --version and --help), and we don't want this
16240         function to make e.g. `touch file >&-' fail.
16241         But do fail if it was closed and someone has tried to write to it.
16242         E.g., `printf foo >&-' must fail.
16243
16244 2004-11-13  Jim Meyering  <jim@meyering.net>
16245
16246         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
16247
16248 2004-11-12  Simon Josefsson  <jas@extundo.com>
16249
16250         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
16251         small doc fix is still pending.
16252
16253 2004-11-11  Simon Josefsson  <jas@extundo.com>
16254
16255         * modules/strtok_r: New file.
16256
16257         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16258         strtok_r.
16259
16260 2004-11-11  Simon Josefsson  <jas@extundo.com>
16261
16262         * m4/strtok_r.m4: New file.
16263
16264         * m4/getopt.m4: Replace opterr.
16265
16266 2004-11-11  Simon Josefsson  <jas@extundo.com>
16267
16268         * lib/strtok_r.h, strtok_r.c: New file.
16269
16270 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
16271
16272         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
16273         of replacing opterr, getopt, etc.  This should handle the
16274         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
16275
16276 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
16277
16278         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
16279         we can stop lying to compilers about the constness of argv when we
16280         are compiled outside glibc.
16281         (getopt, getopt_long, getopt_long_only): Use it.
16282         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
16283         _getopt_internal, getopt): Likewise.
16284         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
16285         _getopt_long_only_r): Likewise.
16286         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
16287         _getopt_long_r, _getopt_long_only_r): Likewise.
16288
16289         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
16290         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
16291         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
16292         the other external symbols.
16293         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
16294         declaration, since the above renaming now works around collisions.
16295
16296 2004-11-11  Jim Meyering  <jim@meyering.net>
16297
16298         * lib/linebreak.c: Remove trailing blanks.
16299         * lib/alloca_.h: Likewise.
16300         * lib/acosl.c: Likewise.
16301         * lib/euidaccess.c: Likewise.
16302         * lib/allocsa.h: Likewise.
16303
16304 2004-11-10  Simon Josefsson  <jas@extundo.com>
16305
16306         * m4/getaddrinfo.m4: New file.
16307
16308 2004-11-10  Simon Josefsson  <jas@extundo.com>
16309
16310         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
16311
16312 2004-11-10  Simon Josefsson  <jas@extundo.com>
16313
16314         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16315         getaddrinfo.
16316
16317         * modules/getaddrinfo: New file.
16318
16319 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16320
16321         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
16322
16323 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16324
16325         * lib/mktime.c (SHR): New macro, which is a portable
16326         substitute for >> that should work even on Crays.
16327         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
16328         Problem reported by Mark D. Baushke in
16329         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
16330         * lib/getdate.y (SHR): Likewise.
16331         (tm_diff): Use it.
16332         * lib/strftime.c (SHR): Likewise.
16333         (tm_diff): Use it.
16334         * lib/quotearg.c (struct quoting_options): Use unsigned int for
16335         quote_these_too, so that right shifts are well defined.  All uses
16336         changed.
16337
16338 2004-11-10  Jim Meyering  <jim@meyering.net>
16339
16340         Ensure that no close failure goes unreported.
16341         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
16342         return early when it seems there's nothing to flush.
16343         Don't include __fpending.h.
16344
16345 2004-11-10  Jim Meyering  <jim@meyering.net>
16346
16347         * modules/closeout (Depends-on): Remove fpending.
16348
16349 2004-11-10  Jim Meyering  <jim@meyering.net>
16350
16351         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
16352
16353 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
16354
16355         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
16356         gl_FUNC_STRFTIME.
16357         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
16358         and AC_REQUIRE when possible, to avoid duplicate checks.
16359         Check for <wchar.h>.
16360
16361 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
16362
16363         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
16364
16365 2004-11-09  Bruno Haible  <bruno@clisp.org>
16366
16367         * m4/sockpfaf.m4: New file.
16368
16369 2004-11-05  Bruno Haible  <bruno@clisp.org>
16370
16371         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
16372         Reported by Mark D. Baushke <mdb@cvshome.org>.
16373
16374 2004-11-04  Bruno Haible  <bruno@clisp.org>
16375
16376         2004-09-11  Bruno Haible  <bruno@clisp.org>
16377                 * allocsa.valgrind: New file.
16378         2004-02-06  Bruno Haible  <bruno@clisp.org>
16379                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
16380                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
16381                 Reported by Christopher Seip <chris.seip@hp.com>.
16382
16383 2004-11-04  Bruno Haible  <bruno@clisp.org>
16384
16385         * modules/allocsa (Files): Add lib/allocsa.valgrind.
16386         (Makefile.am): Distribute it.
16387
16388 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
16389
16390         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
16391         with errno == ERANGE if the buffer is too small.
16392         Problem reported by Mark D. Baushke.
16393
16394 2004-11-03  Albert Chin  <china@thewrittenword.com>
16395             Paul Eggert  <eggert@cs.ucla.edu>
16396
16397         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
16398         equivalent, substitute $ac_type for equivalent type rather than
16399         blindly using uint32_t *always* which won't work if uint32_t is not
16400         available.  Define _UINT32_T to work around typedef of uint32_t if
16401         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
16402         2.5.1.
16403
16404 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16405
16406         * m4/jm-macros.m4: Sync from coreutils.
16407         (gl_MACROS): Check for mbrlen, for pathchk.
16408         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
16409
16410 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16411
16412         * lib/xreadlink.c (MAXSIZE): New macro.
16413         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
16414         size does not exceed MAXSIZE.  Avoid cast.
16415         As suggested by Mark D. Baushke in
16416         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
16417         if readlink fails with buffer size just under MAXSIZE, try again
16418         with MAXSIZE.
16419
16420 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16421
16422         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
16423
16424 2004-11-02  Derek R. Price  <derek@ximbiot.com>
16425         and  Paul Eggert  <eggert@cs.ucla.edu>
16426
16427         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
16428         (get_date): Overparenthesize to avoid GCC warning.
16429
16430 2004-11-02  Bruno Haible  <bruno@clisp.org>
16431
16432         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
16433         returns void.
16434
16435 2004-11-02  Bruno Haible  <bruno@clisp.org>
16436
16437         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
16438         function returns void.
16439
16440 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
16441
16442         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
16443         fflush_unlocked, flockfile, funlockfile, funlockfile,
16444         fputs_unlocked, putc_unlocked.
16445
16446 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
16447
16448         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
16449         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
16450         already declared.
16451
16452 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16453
16454         * modules/getdate (Files): Add doc/getdate.texi.
16455         (Depends-on): Add setenv, xalloc.
16456
16457 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16458
16459         * lib/getdate.y: Add support for TZ="foo" within a date string.
16460         Fix some bugs near time_t boundaries.  Reject dates with
16461         out-of-range components, e.g., "Sept 31".
16462         Include <stdlib.h>, "setenv.h", "xalloc.h".
16463         (ISDIGIT_LOCALE): Remove; unused.
16464         Note that the TZ and time functions used here are not reentrant.
16465         (mktime_ok, get_tz): New functions.
16466         (TZBUFSIZE): New constant.
16467         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
16468         This requires that we sometimes generate our own TZ="XXX..." setting.
16469
16470 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16471
16472         * doc/getdate.texi: New file, from coreutils with modifications for
16473         the new TZ parsing.
16474
16475 2004-10-27  Derek R. Price  <derek@ximbiot.com>
16476
16477         * lib/mktime.c (not_equal_tm): Remove redundant check.
16478
16479 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
16480
16481         * modules/regex (lib_SOURCES): Add regex.c.
16482         Reported by James Youngman in
16483         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
16484
16485 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
16486
16487         * lib/getdate.y: Use Bison 1.875 features, and some minor
16488         code cleanups.  This change does not affect semantics.
16489         Don't include <stdlib.h>; no longer needed.
16490         Don't include unlocked-io.h; only the "#if TEST" code uses
16491         stdio, and performance isn't crucial there.
16492         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
16493         Bison 1.875 features as described below.
16494         All uses of "PC." replaced by "pc->".
16495         (YYSTYPE): Add a forward declaration.
16496         (yylex, yyerror): Use full prototypes in forward decls.
16497         Use "%pure-parser" rather than obsolescent "%pure_parser".
16498         Use %parse-param and %lex-param instead of obsolescent
16499         YYPARSE_PARAM and YYLEX_PARAM.
16500         (meridian_table, month_and_day_table, time_units_table,
16501         relative_time_table, time_zone_table, military_table,
16502         lookup_zone, lookup_word, get_date):
16503         Use NULL instead of 0 where appropriate.
16504         (to_hour): Avoid abort (), to avoid a dependency on
16505         stdlib.h.
16506         (yyerror, yylex): Now accepts parser_control * arg.
16507         (main) [TEST]: Use '\0' rather than 0 for char.
16508
16509 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
16510
16511         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
16512
16513 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
16514
16515         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
16516         It's now the caller's responsibility to handle the case where
16517         !HAVE_GETPAGESIZE && !defined getpagesize.
16518
16519         * lib/mktime.c (leapyear): Arg is long int, not int.
16520
16521 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
16522
16523         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
16524
16525 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
16526
16527         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
16528         missing.  Problem reported by James Youngman.
16529
16530 2004-10-16  Simon Josefsson  <jas@extundo.com>
16531
16532         * gnulib-tool: Fix comments.  Fix parse problem.
16533         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
16534
16535 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
16536
16537         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
16538         implementation of getopt_long.  Problem reported by Alexander Taler in:
16539         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
16540
16541 2004-10-15  Bruno Haible  <bruno@clisp.org>
16542
16543         * gnulib-tool: Untabify. Initialize supplied_libname.
16544         (func_usage): More homogenous output.
16545         (func_modules_transitive_closure, func_modules_to_filelist,
16546         func_emit_lib_Makefile_am): New functions.
16547         (func_import): New function, extracted from big case statement. Use
16548         func_get_license, func_modules_transitive_closure,
16549         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
16550         opt_lgpl. Don't use test -a, as it's not portable.
16551         (func_create_testdir): Use func_modules_transitive_closure,
16552         func_modules_to_filelist, func_emit_lib_Makefile_am.
16553
16554 2004-10-15  Bruno Haible  <bruno@clisp.org>
16555
16556         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
16557
16558 2004-10-15  Bruno Haible  <bruno@clisp.org>
16559
16560         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
16561         the portions belonging to each module.
16562         Suggested by Derek Robert Price <derek@ximbiot.com>.
16563
16564 2004-10-12  Simon Josefsson  <jas@extundo.com>
16565
16566         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
16567         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
16568         to real functions.
16569
16570 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16571
16572         * modules/vsnprintf: New file.
16573
16574 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16575
16576         * m4/vsnprintf.m4: New file.
16577
16578 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16579
16580         * lib/vsnprintf.h: New file.
16581         * lib/vsnprintf.c: New file.
16582
16583 2004-10-11  Bruno Haible  <bruno@clisp.org>
16584
16585         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
16586         vsnprintf.
16587
16588 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
16589
16590         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
16591
16592 2004-10-07  Bruno Haible  <bruno@clisp.org>
16593
16594         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
16595         fits into the provided buffer.
16596
16597 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
16598
16599         * lib/diacrit.c, diacrit.h: Add GPL notice.
16600
16601         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
16602         notice.
16603         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
16604         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
16605         This avoids a potential constant-folding bug.
16606
16607 2004-10-05  Bruno Haible  <bruno@clisp.org>
16608
16609         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
16610         for the declaration of strsep.
16611
16612 2004-10-05  Bruno Haible  <bruno@clisp.org>
16613
16614         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
16615
16616 2004-10-04  Simon Josefsson  <jas@extundo.com>
16617
16618         * modules/memmem: New file.
16619         * tests/test-memmem.c: New file.
16620         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
16621
16622 2004-10-04  Simon Josefsson  <jas@extundo.com>
16623
16624         * m4/memmem.m4: New file.
16625
16626 2004-10-04  Simon Josefsson  <jas@extundo.com>
16627
16628         * lib/memmem.h: New file.
16629         * lib/memmem.c: New file, taken from glibc.
16630
16631 2004-10-04  Simon Josefsson  <jas@extundo.com>
16632
16633         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
16634         '#ifdef USE_UNLOCKED_IO'.
16635
16636 2004-10-04  Simon Josefsson  <jas@extundo.com>
16637
16638         * config/srclist.txt: Add memmem from glibc.
16639
16640 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16641
16642         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
16643
16644         * modules/argmatch, modules/argp, modules/closeout, modules/error,
16645         modules/exclude, modules/getdate, modules/getline,
16646         modules/getndelim2, modules/getpass, modules/getpass-gnu,
16647         modules/getusershell, modules/linebuffer, modules/md5,
16648         modules/mountlist, modules/posixtm, modules/readtokens,
16649         modules/readutmp, modules/regex, modules/sha1,
16650         modules/version-etc, modules/yesno:
16651         Remove dependency on unlocked-io.
16652
16653 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16654
16655         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
16656
16657         * m4/unlocked-io.m4: Add copyright notice.
16658         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
16659
16660 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16661
16662         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
16663         * lib/xmalloc.c (xmemdup): Likewise.
16664         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
16665         XFREE): Remove these long-obsolescent macros.
16666         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
16667         * lib/xstrdup.c: Remove.
16668
16669         * lib/regex.c (re_comp): Cast gettext return value to char *,
16670         Problem reported by Martin Neitzel via Mark D. Baushke.
16671
16672 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16673
16674         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
16675         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
16676         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
16677         regex.c, sha1.c, version-etc.c, yesno.c:
16678         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
16679         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
16680         the includer's responsibility.
16681
16682         Sync from coreutils.
16683
16684         * lib/modechange.c (mode_compile): Don't decrement a pointer that
16685         points to the start of a string, as the C Standard says the
16686         resulting behavior is undefined.
16687
16688         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
16689         simple -> simple_backups, numbered_existing ->
16690         numbered_existing_backups, numbered -> numbered_backups
16691         to avoid shadowing problems.  All uses changed.
16692         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
16693         * lib/backupfile.c (check_extension, numbered_backup):
16694         Rename locals to avoid shadowing 'basename'.
16695         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
16696         once.
16697
16698         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
16699         * lib/.cvsignore: Add getopt.h.
16700
16701 2004-10-04  Bruno Haible  <bruno@clisp.org>
16702
16703         * modules/README: New file.
16704         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
16705         not a module.
16706
16707 2004-10-02  Jim Meyering  <jim@meyering.net>
16708
16709         * lib/dirfd.h, getpagesize.h: Add copyright notice.
16710
16711 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16712
16713         * modules/strsep: New file.
16714
16715 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16716
16717         * m4/strsep.m4: New file.
16718
16719 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16720
16721         * lib/strsep.h: New file.
16722         * lib/strsep.c: New file.
16723
16724 2004-10-01  Simon Josefsson  <jas@extundo.com>
16725
16726         * lib/snprintf.c (snprintf): Handle size==0.
16727
16728 2004-10-01  Simon Josefsson  <jas@extundo.com>
16729             Bruno Haible  <bruno@clisp.org>
16730
16731         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
16732         (snprintf): Declare 'args'.
16733
16734 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
16735
16736         * lib/snprintf.c: Remove comments as to why each header is needed.
16737
16738 2004-10-01  Bruno Haible  <bruno@clisp.org>
16739
16740         * MODULES.html.sh: Add strsep.
16741
16742 2004-09-30  Simon Josefsson  <jas@extundo.com>
16743
16744         * modules/snprintf: New file.
16745
16746 2004-09-30  Simon Josefsson  <jas@extundo.com>
16747
16748         * m4/snprintf.m4: New file.
16749
16750 2004-09-30  Simon Josefsson  <jas@extundo.com>
16751
16752         * lib/snprintf.h, lib/snprintf.c: New files.
16753
16754 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16755
16756         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
16757         (hol_entry_help): Never translate an empty string.
16758         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
16759         * lib/argp.h (OPTION_NO_TRANS): New option.
16760
16761 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16762
16763         * modules/argp (Maintainer): Replace Simon Josefsson
16764         by Sergey Poznyakoff.
16765
16766 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16767
16768         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
16769         changes merged back into glibc.
16770
16771 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16772
16773         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
16774
16775 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
16776
16777         * lib/xvasprintf.c: Include xalloc.h.
16778         (xvasprintf): Use xalloc_die, not xmalloc_die.
16779
16780 2004-09-29  Bruno Haible  <bruno@clisp.org>
16781
16782         * modules/alloca-opt: New file, derived from modules/alloca.
16783         * modules/allocsa: Depend on alloca-opt instead of alloca.
16784         * modules/setenv: Likewise.
16785         * modules/vasnprintf: Likewise.
16786         * MODULES.html.sh: Add alloca-opt.
16787
16788 2004-09-28  Simon Josefsson  <jas@extundo.com>
16789
16790         * gnulib-tool: New parameter --lgpl, to asseert that modules are
16791         LGPL, and to replace license template from GPL to LGPL.
16792
16793 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
16794
16795         * modules/dummy: Change license to LGPL.
16796
16797 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
16798
16799         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
16800
16801 2004-09-24  Simon Josefsson  <jas@extundo.com>
16802
16803         * modules/minmax (License): Change from GPL to LGPL.
16804
16805 2004-09-23  Simon Josefsson  <jas@extundo.com>
16806
16807         * gnulib-tool (--import): Typo.
16808
16809 2004-09-23  Simon Josefsson  <jas@extundo.com>
16810
16811         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
16812
16813 2004-09-22  Bruno Haible  <bruno@clisp.org>
16814
16815         * modules/*: Add 'License' field.
16816         * gnulib-tool: Accept --extract-license option.
16817         (func_get_license): New function.
16818
16819 2004-09-21  Bruno Haible  <bruno@clisp.org>
16820
16821         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
16822         Reported by Simon Josefsson.
16823
16824 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
16825
16826         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
16827         gl_AC_TYPE_LONG_LONG.
16828
16829 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
16830
16831         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
16832
16833 2004-09-18  Simon Josefsson  <jas@extundo.com>
16834         and  Paul Eggert  <eggert@cs.ucla.edu>
16835
16836         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
16837         calls with autoreconf.  Define GL_LIB.
16838
16839 2004-09-14  Karl Berry  <karl@gnu.org>
16840
16841         * config/srclist.txt: unsync setenv.c, sigh.
16842
16843 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
16844
16845         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
16846         Problem reported by Bruno Haible in:
16847         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
16848
16849 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
16850
16851         * config/srclist.txt: Comment out argp-pvh.c.
16852
16853 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
16854
16855         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
16856         in case some system header has #define'd it.  Problem reported by
16857         Soeren D. Schulze in
16858         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
16859
16860 2004-09-09  Karl Berry  <karl@gnu.org>
16861
16862         * regex.[ch]: delete from the root.  These were supposed to be
16863                 synced with emacs cvs, but this has not happened for about
16864                 a year, and anyway nothing else uses emacs regex.[ch].
16865                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
16866                 lib/regex[.ch] is untouched.
16867
16868 2004-09-09  Bruno Haible  <bruno@clisp.org>
16869
16870         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
16871
16872 2004-09-09  Bruno Haible  <bruno@clisp.org>
16873
16874         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
16875         modifications.
16876         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
16877
16878 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
16879
16880         * modules/xvasprintf: New file.
16881         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
16882
16883 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
16884
16885         * lib/xvasprintf.h: New file.
16886         * lib/xvasprintf.c: New file.
16887         * lib/xasprintf.c: New file.
16888
16889 2004-09-08  Bruno Haible  <bruno@clisp.org>
16890
16891         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
16892
16893 2004-09-08  Bruno Haible  <bruno@clisp.org>
16894
16895         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
16896         length is > INT_MAX.
16897         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
16898         more.
16899
16900 2004-09-08  Bruno Haible  <bruno@clisp.org>
16901
16902         * lib/stdint_.h: New file, taken from GNU clisp.
16903
16904 2004-09-08  Bruno Haible  <bruno@clisp.org>
16905             Oskar Liljeblad  <oskar@osk.mine.nu>
16906
16907         * modules/stdint: New file.
16908         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
16909
16910 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16911
16912         Import from coreutils.
16913         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
16914         strings on unbounded length.  alloca's performance benefits aren't
16915         that important here.
16916         (V_STRDUP): Remove.
16917         (parse_with_separator): New function, with most of the internals
16918         of the old parse_user_spec.  Allow user to omit both user and group,
16919         for compatibility with FreeBSD.
16920         Clone only the user name, not the entire spec.
16921         Do not set *uid, *gid unless entirely successful.
16922         Avoid memory leak in some failing cases.
16923         Fix regression for USER.GROUP reported by Dmitry V. Levin in
16924         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
16925         (parse_user_spec): Rewrite to use parse_with_separator.
16926
16927 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16928
16929         * modules/userspec: Don't depend on alloca.
16930
16931 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16932
16933         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
16934
16935 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
16936
16937         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
16938         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
16939         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
16940
16941 2004-08-16  Simon Josefsson  <jas@extundo.com>
16942
16943         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
16944         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
16945         Add --dry-run for --import.
16946         Let user provided command line parameters override configure.ac
16947         settings.
16948
16949 2004-08-12  Simon Josefsson  <jas@extundo.com>
16950
16951         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
16952         as discussed with Paul Eggert in threads rooted at
16953         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
16954         and
16955         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
16956         Before, the test was empty, and relied on ELIDE_CODE in source
16957         code.)
16958         (gl_PREREQ_GETOPT): New macro.
16959         (gl_GETOPT): Use them.
16960
16961 2004-08-12  Simon Josefsson  <jas@extundo.com>
16962
16963         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
16964         * lib/getopt_.h: Renamed from getopt.h.
16965
16966 2004-08-12  Simon Josefsson  <jas@extundo.com>
16967
16968         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
16969         Change default library name from libfoo to libgnu.
16970         Now, if you have a configure.ac that says:
16971                 gl_SOURCE_BASE(gl)
16972                 gl_M4_BASE(gl/m4)
16973                 gl_MODULES(error getopt etcetera)
16974                 gl_INIT
16975         you can import all you need by running:
16976                 ../gnulib/gnulib-tool --import
16977
16978         * modules/getopt (Files): Rename getopt.h to getopt_.h.
16979         (Makefile.am): Rewrite, use logic from argz.
16980         (Include): Use <getopt.h> instead of "getopt.h".
16981
16982 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16983
16984         * modules/argp (Files): Add m4/unlocked-io.m4.
16985         (Depends-on): Add extensions.
16986
16987 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16988
16989         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
16990         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
16991         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
16992         Check for program_invocation_name, program_invocation_short_name,
16993         flockfile, funlockfile, features.h, _getopt_long_only_r.
16994
16995 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16996
16997         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
16998         its complicated substitute.
16999         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
17000         and program_invocation_name.
17001         (__argp_basename) [!_LIBC]: Remove; the only use was
17002         replaced by its body.
17003         (__argp_short_program_name): Change condition from
17004         !defined __argp_short_program_name to
17005         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
17006         to match argp-namefrob.h.
17007         (__argp_failure): Don't assume strerror_r returns char *.
17008         * lib/argp-parse.c (N_): Define unconditionally.
17009         (argp_default_options): Fill out initializers with 0 to avoid
17010         gcc warnings.
17011
17012 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
17013
17014         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
17015         getopt1.c.
17016
17017 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
17018
17019         Merge from coreutils.
17020
17021         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
17022
17023         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
17024         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
17025
17026 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
17027
17028         Merge from coreutils.
17029
17030         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
17031         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
17032         for Reliant Unix 5.43.
17033
17034         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
17035         (union fooround): Use uintmax_t, not long int.
17036         The rest is a merge from libc:
17037         [defined _LIBC]: Include <shlib-compat.h>.
17038         (_obstack) [defined _LIBC]: Remove after 2.3.4.
17039
17040         * lib/settime.c (settime): Recode to avoid warning with
17041         Sun Forte C 6U2.
17042
17043         * lib/strverscmp.c: Convert to UTF-8.
17044
17045 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
17046
17047         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
17048         m4/uintmax_t.m4.
17049
17050 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
17051
17052         * modules/xalloc-die: New file.
17053         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
17054
17055         * modules/md5 (Files): Add m4/uint32_t.m4.
17056         * modules/sha1: Renamed from modules/sha.
17057         (Files):
17058         Rename lib/sha.h to lib/sha1.h.
17059         Rename lib/sha.c to lib/sha1.c.
17060         Rename m4/sha.m4 to m4/sha1.m4.
17061         (lib_SOURCES): Likewise.
17062         (configure.ac): Rename gl_SHA to gl_SHA1.
17063         (Include): sha.h -> sha1.h.
17064
17065 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
17066
17067         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
17068         * m4/sha1.m4: Renamed from sha.m4.
17069         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
17070
17071 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
17072
17073         * lib/obstack.h (obstack_empty_p):
17074         Don't assume that chunk->contents is suitably aligned.
17075         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
17076         Likewise. Problem reported by Benno in
17077         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
17078
17079         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
17080         readable.  This could be improved further but it'd take some work.
17081
17082 2004-08-08  Simon Josefsson  <jas@extundo.com>
17083
17084         * modules/xgethostname (Depends-on): Remove exit and error (not
17085         used).
17086
17087         * modules/getpass-gnu: Add getpass.h.
17088         (Depends-on): Add stdbool.
17089         * modules/getpass: Add getpass.h.
17090
17091 2004-08-08  Simon Josefsson  <jas@extundo.com>
17092
17093         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
17094         Check getpass declaration.
17095
17096 2004-08-08  Simon Josefsson  <jas@extundo.com>
17097
17098         * lib/xgethostname.c: Don't include error.h (not used).
17099
17100         * lib/getpass.h: Add.
17101         * lib/getpass.c: Include getpass.h first.
17102
17103 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
17104
17105         * lib/xalloc-die.c: New file.
17106         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
17107         All uses removed.
17108         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
17109         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
17110         xalloc-die.c.
17111         (_, N_, xalloc_die): Move to xalloc-die.c.
17112         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
17113         so that we needn't mess with xalloc_msg_memory_exhausted.
17114
17115         * lib/sha1.h: Renamed from sha.h.
17116         (SHA1_H): Renamed from _SHA_H.
17117         (sha1_ctx): Renamed from sha_ctx.
17118         (sha1_init_ctx): Renamed from sha_init_ctx.
17119         (sha1_process_block): Renamed from sha_process_block.
17120         (sha1_process_bytes): Renamed from sha_process_bytes.
17121         (sha1_finish_ctx): Renamed from sha_finish_ctx.
17122         (sha1_read_ctx): Renamed from sha_read_ctx.
17123         (sha1_stream): Renamed from sha_stream.
17124         (sha1_buffer): Renamed from sha_buffer.
17125         * lib/sha1.c: Likewise; renamed from sha.c.
17126         Do not include <sys/types.h>.
17127         Include <stddef.h> rather than <stdlib.h>.
17128
17129 2004-08-08  Bruno Haible  <bruno@clisp.org>
17130
17131         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
17132         FILESYSTEM_PREFIX_LEN.
17133         * lib/progreloc.c: Likewise.
17134         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
17135
17136 2004-08-06  Simon Josefsson  <jas@extundo.com>
17137
17138         * modules/progname (Depends-on): Don't depend on stdbool.
17139
17140 2004-08-06  Simon Josefsson  <jas@extundo.com>
17141
17142         * modules/getsubopt: New file.
17143         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
17144         getsubopt.
17145
17146 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
17147
17148         More merge from coreutils.
17149
17150         * m4/utimens.m4, m4/utimecmp.m4: New files.
17151         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
17152         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
17153         prereq.m4, sha.m4: Import changes from coreutils.
17154
17155 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
17156
17157         More merge from coreutils.
17158         * modules/raise, modules/readtokens0, modules/utimens:
17159         * modules/utimecmp, module/xnanosleep: New files.
17160         * modules/strftime: Add lib/strftime.h.
17161         Change include from <time.h> to "strftime.h".
17162         * modules/yesno: Add lib/yesno.h.
17163         * modules/backupfile: Remove lib/addext.c.
17164         * modules/euidaccess: Add stat-macros.h.
17165         * modules/canonicalize, modules/euidaccess,
17166         modules/filemode, modules/lchown, modules/makepath,
17167         modules/rmdir, modules/stat: Likewise.
17168
17169 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
17170
17171         Merge from tar.
17172         * lib/argp-help.c (make_hol, hol_append): Don't assume that
17173         SIZE_MAX is a valid preprocessor constant.
17174         (__argp_basename): Change from "#ifndef _LIBC"
17175         to "#ifndef __argp_short_program_name", so that
17176         we don't compile these functions for tar.
17177
17178         More merges from coreutils.
17179         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
17180         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
17181         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
17182         * lib/addext.c: Remove; no longer needed.
17183         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
17184         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
17185         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
17186         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
17187         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
17188         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
17189         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
17190         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
17191         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
17192         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
17193         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
17194         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
17195         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
17196         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
17197         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
17198         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
17199         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
17200         Import changes from coreutils.
17201
17202 2004-08-05  Simon Josefsson  <jas@extundo.com>
17203
17204         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
17205
17206 2004-08-05  Simon Josefsson  <jas@extundo.com>
17207
17208         * m4/getsubopt.m4: New file.
17209
17210 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17211
17212         Merge from coreutils.
17213
17214         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
17215         * m4/getcwd-path-max.m4: New files.
17216
17217         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
17218         FILESYSTEM_PREFIX_LEN ->
17219         FILE_SYSTEM_PREFIX_LEN.
17220         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
17221         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
17222         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
17223         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
17224
17225         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
17226         prerequisite modules now handle the DOS stuff.
17227         Don't check for unistd.h.
17228
17229 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17230
17231         Merge from coreutils.
17232
17233         * lib/.gdb-history: Remove; this doesn't belong here.
17234
17235         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
17236         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
17237         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
17238         * lib/getcwd.c: New files.
17239
17240         * lib/dirname.h: Include <stdbool.h>.
17241         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
17242         for consistency with POSIX terminology.  All uses changed.
17243         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
17244         (strip_trailing_slashes): Use bool for booleans.
17245         * lib/stripslash.c (strip_trailing_slashes): Likewise.
17246
17247         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
17248         sometimes returns a positive errno value even when it succeeds.
17249         (print_errno_message) [!LIBC]: Fall back on strerror if
17250         __strerror_r fails.
17251
17252         * lib/path-concat.c (mempcpy): Don't define if a system header defines
17253         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
17254         (longest_relative_suffix): New function.
17255         (path_concat): Use it.  Assume first argument is not NULL.
17256         Port to DOS.  Omit redundant separators.
17257         Report an error instead of returning NULL.
17258         Use mempcpy instead of memcpy.
17259         (xpath_concat): Remove: not declared or used.
17260
17261         * lib/same.h: Include <stdbool.h>
17262         (same_name): Return bool, not int.
17263         * lib/same.c (same_name): Likewise.
17264         (errno): Don't declare; we assume C89 or better now.
17265
17266         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
17267         if not already defined.
17268
17269         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
17270         * lib/dup-safer.c (errno): Likewise.
17271
17272 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17273
17274         Merge from coreutils.
17275         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
17276         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
17277         * modules/path-concat: Don't depend on strdup.
17278
17279 2004-08-03  Simon Josefsson  <jas@extundo.com>
17280
17281         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
17282         * lib/progname.h: Don't include stdbool.h.
17283
17284 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17285
17286         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
17287         * MODULES.html.sh (func_all_modules): Remove fatal.
17288
17289 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17290
17291         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
17292
17293 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17294
17295         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
17296         working.
17297
17298 2004-08-02  Simon Josefsson  <jas@extundo.com>
17299
17300         * lib/getsubopt.h: New file, with comments from Bruno Haible.
17301         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
17302         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
17303
17304 2004-08-01  Simon Josefsson  <jas@extundo.com>
17305
17306         * lib/xgetdomainname.c: Include stdlib.h, for free().
17307
17308 2004-07-19  Bruno Haible  <bruno@clisp.org>
17309
17310         * MODULES.html.sh (func_all_modules): Add dummy.
17311
17312 2004-07-16  Simon Josefsson  <jas@extundo.com>
17313
17314         * modules/dummy: New file.
17315
17316 2004-07-16  Simon Josefsson  <jas@extundo.com>
17317
17318         * lib/dummy.c: New file.
17319
17320 2004-07-16  Bruno Haible  <bruno@clisp.org>
17321
17322         * lib/backupfile.h: Add extern "C" for C++.
17323         * lib/closeout.h: Likewise.
17324         * lib/copy-file.h: Likewise.
17325         * lib/findprog.h: Likewise.
17326         * lib/full-write.h: Likewise.
17327         * lib/pathname.h: Likewise.
17328         * lib/progname.h: Likewise.
17329         * lib/stpcpy.h: Likewise.
17330         * lib/stpncpy.h: Likewise.
17331         * lib/strcase.h: Likewise.
17332         * lib/strstr.h: Likewise.
17333         * lib/xalloc.h: Likewise.
17334
17335         * lib/mbswidth.h: Add extern "C" for C++.
17336         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
17337
17338 2004-07-13  Robert Millan  <robertmh@gnu.org>
17339
17340         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
17341
17342 2004-07-09  Simon Josefsson  <jas@extundo.com>
17343
17344         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
17345         failed without this.)
17346
17347 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
17348
17349         * modules/chown (Files): Add lib/fchown-stub.c, since
17350         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
17351
17352 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
17353
17354         * lib/fchown-stub.c: New file.
17355
17356 2004-06-24  Jim Meyering  <jim@meyering.net>
17357
17358         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
17359
17360 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17361
17362         * modules/argz: Omit "#include".
17363
17364         * MODULES.html.sh (func_all_modules): Add calloc, to match
17365         2004-06-01 addition of calloc module.
17366
17367 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17368
17369         * m4/argz.m4: New file, which is autoupdated from libtool.
17370
17371 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17372
17373         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
17374         libtool.
17375
17376 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17377
17378         * config/srclist-update: Don't insist on "USA." before the
17379         close-comment, as libtool omits the period and puts the */ on a
17380         separate line.
17381         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
17382         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
17383
17384 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
17385
17386         * modules/argz: New file.
17387         * MODULES.html.sh (func_all_modules): Add argz.
17388
17389 2004-06-12  Jim Meyering  <jim@meyering.net>
17390         and  Paul Eggert  <eggert@cs.ucla.edu>
17391
17392         * modules/hash (Files): Add lib/xalloc.h.
17393         * modules/pipe (Depends-on): Add wait-process.
17394         * modules/stat (Depends-on): Add xalloc.
17395         * modules/userspec (Files): Add lib/userspec.h.
17396         * modules/xstrto
17397
17398         Upgrade from gettext-0.13.
17399         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
17400         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
17401         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
17402
17403 2004-06-10  Jim Meyering  <jim@meyering.net>
17404
17405         * lib/calloc.c: New file.
17406
17407 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
17408
17409         * lib/getdate.y (yylex): Allow space between sign and number.
17410         Problem reported by Dan Jacobson.
17411
17412 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
17413
17414         Merge from coreutils CVS.
17415
17416         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
17417         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
17418         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
17419         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
17420         xstrtol.m4: Fix copyright date and/or serial number.
17421
17422         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
17423         See if we need an fchown replacement.
17424         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
17425         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
17426         and use the replacement function if we detect either defect.
17427
17428         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
17429         gl_UTIMECMP.
17430
17431 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
17432         and  Jim Meyering  <jim@meyering.net>
17433
17434         Merge from coreutils CVS.
17435
17436         * lib/stat-macros.h: New file, with contents from file-type.h
17437         and coreutils' system.h.
17438         * lib/file-type.c: Include "stat-macros.h".
17439         * lib/file-type.h (file_type): Move all macro definitions to new file,
17440         stat-macros.h.
17441
17442         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
17443         Wrap old code with this conditional.
17444         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
17445         function that does not dereference symlinks.
17446         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
17447
17448         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
17449         dependency problems.
17450         (xreadlink): Accept new arg SIZE, for efficiency.
17451         All decls and uses changed.
17452         * lib/xreadlink.h: Include <stddef.h>, for size_t.
17453
17454         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
17455         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
17456
17457         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
17458         sysexits.h.
17459
17460 2004-06-01  Jim Meyering  <jim@meyering.net>
17461
17462         * m4/calloc.m4: New file.
17463
17464 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
17465
17466         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
17467         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
17468         Also, fix a typo in a diagnostic.
17469
17470 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
17471
17472         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
17473         or AC_FUNC_REALLOC.
17474
17475 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
17476
17477         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
17478         macros to be defined.
17479         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
17480         the allocator returns NULL because the requested size is zero.
17481
17482 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
17483
17484         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
17485         var.  Add comment explaining why libc still defines it.  This
17486         merges the following patch from glibc:
17487         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
17488
17489 2004-05-20  Andreas Schwab  <schwab@suse.de>
17490
17491         * m4/free.m4: Replace free if it not known to work, not the other
17492         way round.
17493
17494 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
17495
17496         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
17497         present in glibc since revision 1.1 of this file.
17498         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
17499         obstack_alignment_mask, obstack_alloc, obstack_base,
17500         obstack_blank, obstack_blank_fast, obstack_chunk_size,
17501         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
17502         obstack_grow0, obstack_init, obstack_int_grow,
17503         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
17504         obstack_next_free, obstack_object_size, obstack_ptr_grow,
17505         obstack_ptr_grow_fast, obstack_room): Remove declarations of
17506         nonexistent functions.
17507
17508 2004-05-18  Karl Berry  <karl@gnu.org>
17509
17510         * config/srclist.txt: break link for vasnprintf.c.
17511
17512 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
17513
17514         Port obstack to the AS/400, where pointers are 16 bytes wide and
17515         you cannot cast an integer to a valid pointer.  This patch is
17516         currently waiting to be integrated into glibc; see
17517         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
17518
17519         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
17520         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
17521         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
17522         (struct obstack): temp member is now a union of a pointer and
17523         an integer, instead of an integer.  All integer uses changed.
17524         This does not affect the physical layout of struct obstack,
17525         except on hosts (like the AS/400) where the size or alignment of
17526         void * is greater than that of ptrdiff_t.
17527         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
17528         __STDC__)]: Store temporary in pointer member of union, not
17529         integer member.
17530         * lib/obstack.c: Include <stddef.h>, for offsetof.
17531         (struct fooalign): Remove; it doesn't need a name.
17532         (union fooround): Change double to long double, and add void *.
17533         (DEFAULT_ALIGNMENT): Use offsetof to compute.
17534         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
17535         not a macro.  Hence the values are always int; so remove all
17536         casts-to-int in uses.
17537
17538 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
17539
17540         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
17541         we can get this patch merged into glibc.
17542
17543 2004-05-17  Derek R. Price  <derek@ximbiot.com>
17544             Paul Eggert  <eggert@cs.ucla.edu>
17545
17546         * m4/argp: Depend on alloca.
17547
17548 2004-05-17  Derek R. Price  <derek@ximbiot.com>
17549             Paul Eggert  <eggert@cs.ucla.edu>
17550
17551         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
17552         freecoding.
17553
17554 2004-05-17  Bruno Haible  <bruno@clisp.org>
17555
17556         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
17557         precision that consists of a '.' followed by an empty digit string.
17558         Patch by Tor Lillqvist <tml@iki.fi>.
17559
17560 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
17561
17562         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
17563         for backward compatibility with older code.  We need our own
17564         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
17565         it under some other name, and our alloca.h will define it.
17566
17567 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
17568             Derek Price  <derek@ximbiot.com>
17569
17570         * lib/alloca.c: Include <alloca.h>, to get our interface.
17571         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
17572         include <alloca.h> first.  Use C89 prototype for alloca; this
17573         requires including <stddef.h> for size_t.  Use extern "C" if C++.
17574         Use #elif for simplicity, since we can assume C89 now.
17575         Don't try to source the system alloca.h since it will not be found
17576         and to prevent recursively including its replacement.
17577         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
17578         * lib/regex.c: Likewise.
17579
17580 2004-05-16  Derek Price  <derek@ximbiot.com>
17581             Paul Eggert  <eggert@cs.ucla.edu>
17582
17583         getline cleanup.  This changes the getndelim2 API: both order of
17584         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
17585         no delimiter).
17586
17587         * lib/getline.c: Don't include stddef.h or stdio.h, since our
17588         interface does that.
17589         (getline): Always use getdelim, so that we don't have two
17590         copies of this code.
17591         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
17592         if available.
17593         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
17594         (GETNDELIM2_MAXIMUM): New macro.
17595         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
17596         instead of the old practice of delim2==0.  All callers changed.
17597         Return -1 on overflow, instead of returning junk.
17598         Do not set *linesize unless allocation succeeds.
17599         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
17600         that we include sys/types.h.
17601         * lib/getnline.h: Likewise.
17602         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
17603         (getndelim2): Reorder arguments.
17604         * lib/getnline.c (getnline, getndelim):
17605         Don't discard the NMAX argument.
17606         (getnline): Invoke getndelim, to avoid code duplication.
17607         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
17608         of (size_t) -1 by callers of the getnline family.
17609
17610 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
17611
17612         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
17613         Check for gettimeofday.
17614         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
17615         Check for settimeofday, stime.
17616
17617 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
17618
17619         * lib/nanosleep.c (suspended): Change its type from int to
17620         sig_atomic_t volatile.
17621         (first_call): Make it private to rpl_nanosleep, and have it
17622         be zero initially as that's a bit faster.
17623         (my_usleep): Round up fractional times instead of truncating them,
17624         as this is the usual meaning for 'sleep'.
17625
17626         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
17627         doesn't work.
17628         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
17629         (ENOSYS): Define if not defined.
17630         (settime): Fall back on stime if it exists and settimeofday fails.
17631         But don't bother with fallbacks if a method fails with errno == EPERM.
17632
17633 2004-05-11  Jim Meyering  <jim@meyering.net>
17634
17635         Prior to this change, the save_cwd caller required read access to the
17636         current directory on most systems (ones with the fchdir function).
17637
17638         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
17639         fails, try write-only, and finally, resort to using xgetcwd.
17640
17641 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
17642
17643         * lib/obstack.c, obstack.h: Import changes from libc.
17644
17645 2004-04-28  Bruno Haible  <bruno@clisp.org>
17646
17647         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
17648         also implicitly appends .exe to executables.
17649         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
17650         accepts Windows pathnames.
17651         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
17652         Treat Cygwin like Windows, since it now accepts Windows pathnames.
17653         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
17654         Treat Cygwin like Windows, since it now accepts Windows pathnames.
17655         Reported by Derek Robert Price <derek@ximbiot.com>.
17656
17657 2004-04-21  Karl Berry  <karl@gnu.org>
17658
17659         * config/srclist.txt (localcharset.c): break sync.
17660
17661 2004-04-20  Paul Eggert  <eggert@twinsun.com>
17662
17663         * m4/host-os.m4: Add a copyright notice.
17664
17665 2004-04-20  Jim Meyering  <jim@meyering.net>
17666
17667         Change UTILS_ to gl_ in AC_DEFINE'd names.
17668         Change utils_- and jm_-prefixed variables, too.
17669         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
17670         UTILS_FUNC_MKDIR_TRAILING_SLASH.
17671         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
17672
17673         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
17674         Don't emit trailing blanks.
17675         Also rename jm_-prefixed variables to have gl_ prefix.
17676
17677         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
17678         Also rename jm_-prefixed variables to have gl_ prefix.
17679
17680         * m4/jm-macros.m4: Reflect the renamings.
17681         * m4/prereq.m4: Likewise.
17682
17683 2004-04-20  Jim Meyering  <jim@meyering.net>
17684
17685         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
17686         memory.
17687
17688 2004-04-20  Jim Meyering  <jim@meyering.net>
17689             Bruno Haible  <bruno@clisp.org>
17690
17691         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
17692         memory when realloc fails.
17693
17694 2004-04-19  Jim Meyering  <jim@meyering.net>
17695
17696         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
17697         now that readutmp.c may call `free (0)'.
17698
17699 2004-04-19  Bruno Haible  <bruno@clisp.org>
17700
17701         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
17702         * m4/inttypes_h.m4: Likewise.
17703         * m4/stdint_h.m4: Likewise.
17704         * m4/intmax_t.m4: Likewise.
17705         * m4/uintmax_t.m4: Likewise.
17706
17707 2004-04-18  Jim Meyering  <jim@meyering.net>
17708
17709         * m4/prereq.m4: Don't forbid jm_ prefix.
17710
17711         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
17712         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
17713         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
17714         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
17715         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
17716         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
17717         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
17718         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
17719         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
17720         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
17721         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
17722         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
17723         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
17724         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
17725         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
17726         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
17727         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
17728         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
17729         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
17730
17731 2004-04-18  Jim Meyering  <jim@meyering.net>
17732
17733         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
17734         failure, don't leak memory and do call END_UTMP_ENT.
17735
17736 2004-04-16  Jim Meyering  <jim@meyering.net>
17737
17738         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
17739         coreutils' stat program.
17740         (gl_PREREQ): Don't require jm_PREREQ_STAT.
17741
17742 2004-04-11  Paul Eggert  <eggert@twinsun.com>
17743
17744         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
17745         C89.
17746         (CHAR_BIT): Remove, since we assume C89.
17747         Include <stdint.h> if available, as per current Autoconf CVS advice.
17748
17749 2004-03-31  Jim Meyering  <jim@meyering.net>
17750
17751         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
17752         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
17753         * m4/xalloc.m4: Likewise.
17754
17755 2004-03-30  Paul Eggert  <eggert@twinsun.com>
17756
17757         Merge from coreutils.
17758
17759         * m4/inttostr.m4: New file.
17760         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
17761         Require AM_STDBOOL_H and gl_TIMESPEC instead.
17762         Require gl_CLOCK_TIME.
17763         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
17764
17765 2004-03-30  Paul Eggert  <eggert@twinsun.com>
17766
17767         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
17768         not bool, to be more consistent with Unix conventions.
17769         Suggested by Bruno Haible.
17770
17771         Merge from coreutils.
17772
17773         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
17774         * lib/umaxtostr.c: New files.
17775
17776         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
17777         the usual <time.h> dance.
17778         (get_date): Change signature to support fractional time stamps.
17779         All callers changed.
17780         * lib/getdate.y: Include "getdate.h" first, as we can now
17781         assume C89 and don't need to worry about 'const'.
17782         Similarly, include "unlocked-io.h" near start, not in middle.
17783         Include <limits.h>.
17784         (textint.value): Use long int rather than int.
17785         (textint.digits): Use size_t rather than int.
17786         (BILLION, LOG10_BILLION): New constants.
17787         (parser_control): New member rel_ns.  Members day_ordinal,
17788         time_zone, month, day, hour, minutes, rel_year, rel_month,
17789         rel_day, rel_hour, rel_minutes, rel_seconds
17790         are now long int, not int.  Member seconds is now struct timespec,
17791         not int.  New member timespec_seen.  Members dates_seen, days_seen,
17792         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
17793         not int.
17794         (%union.intval): Now long int, not int.
17795         New member timespec.
17796         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
17797         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
17798         (spec): Now is a timespec or an item list.
17799         (timespec, items): New nonterminals.
17800         (time, rel, relunit, number, get_date):
17801         Add support for fractional seconds.
17802         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
17803         (gmtime, localtime, mktime): Remove decls; not needed with C89.
17804         (to_hour): First arg is now long int, not int.
17805         (to_year): Returns long int, not int.
17806         Don't treat year -70 like 70.
17807         (tm_diff): Returns long int, not int.
17808         (lookup_word): Use bool instead of int when appropriate.
17809         (yylex): Use size_t for count, not int.
17810         Detect overflow when parsing large integer constants.
17811         Add support for fractions.
17812         (get_date): Make pointers 'const' if possible.
17813         Use more-portable code to detect integer overflow.
17814         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
17815         Don't use ctime; it's not reliable if the year has >4 digits.
17816
17817         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
17818         This is for compatibility with BSD.
17819
17820         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
17821         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
17822         From coreutils' system.h.
17823
17824         * lib/userspec.c: Don't include "posixver.h".
17825         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
17826         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
17827         compatible extension.  Simplify code by removing a boolean int
17828         that was always nonzero if a string was nonnull.
17829
17830 2004-03-30  Jim Meyering  <jim@meyering.net>
17831
17832         Merge from coreutils.
17833
17834         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
17835         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
17836         on some systems one must include <grp.h> before it.
17837         Reported by Christian Krackowizer.
17838
17839 2004-03-30  Jim Meyering  <jim@meyering.net>
17840
17841         Merge from coreutils.
17842
17843         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
17844
17845         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
17846         an empty input stream.
17847
17848         * lib/readtokens.c: Include <stdbool.h>.
17849         (readtoken): Use `size_t' rather than int/long.
17850         All callers adjusted.
17851         Use `bool' rather than `int' where appropriate.
17852         Use memset rather than an explicit loop.
17853         Use x2nrealloc rather than xrealloc.
17854         Allow the use of `\0' as a delimiter.
17855         (readtokens): Likewise.
17856         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
17857
17858 2004-03-30  Jim Meyering  <jim@meyering.net>
17859
17860         * m4/realloc.m4: Remove file, since now it does no more than
17861         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
17862         the `configure.ac' section of module/realloc.
17863         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
17864
17865 2004-03-30  Bruno Haible  <bruno@clisp.org>
17866
17867         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
17868         nonnull.
17869
17870 2004-03-29  Paul Eggert  <eggert@twinsun.com>
17871
17872         Merge changes to getloadavg.c from coreutils and Emacs.
17873
17874         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
17875         Define to an expression, not to the empty string.
17876         Include cloexec.h and xalloc.h.
17877         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
17878         Use set_cloexec_flag rather than rolling our own.
17879         * lib/cloexec.c, lib/cloexec.h: New files.
17880
17881 2004-03-29  Paul Eggert  <eggert@twinsun.com>
17882
17883         * m4/cloexec.m4: New file.
17884
17885 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17886
17887         * lib/getopt.h: Sync with libc CVS.
17888
17889 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17890             Bruno Haible  <bruno@clisp.org>
17891
17892         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
17893         mbswidth.
17894
17895 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17896             Bruno Haible  <bruno@clisp.org>
17897
17898         * lib/mbswidth.h: Include <wchar.h> only if
17899         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
17900         <wchar.h>.
17901         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
17902
17903 2004-03-09  Paul Eggert  <eggert@twinsun.com>
17904
17905         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
17906         Sync with libc CVS.
17907         * lib/getopt_int.h: New file, also synced from libc.
17908
17909 2004-03-09  Paul Eggert  <eggert@twinsun.com>
17910
17911         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
17912         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
17913         Bring back getopt.c, getopt.h, getopt1.c.
17914
17915 2004-03-07  Paul Eggert  <eggert@twinsun.com>
17916
17917         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
17918         All uses changed.  Check for sa_sigaction member; this fixes
17919         a bug first reported by Jason Andrade in
17920         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
17921
17922 2004-03-07  Paul Eggert  <eggert@twinsun.com>
17923
17924         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
17925         '#if' expressions.  Unlike the code it replaces, it does not
17926         depend on (defined _SC_PAGESIZE).  However, it does depend on
17927         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
17928         first reported by Jason Andrade in
17929         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
17930
17931 2004-02-25  Simon Josefsson  <jas@extundo.com>
17932
17933         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
17934
17935 2004-02-25  Simon Josefsson  <jas@extundo.com>
17936
17937         * lib/strdup.h: New file.
17938         * lib/strdup.c: Include it.
17939         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
17940         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
17941
17942 2004-02-23  Karl Berry  <karl@gnu.org>
17943
17944         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
17945         (from fencepost.gnu.org:/gd/gnuorg).
17946
17947 2004-02-23  Karl Berry  <karl@gnu.org>
17948
17949         * config/srclistvars.sh (GNUORG) [karl]: redefine.
17950         * config/srclist.txt: add maintain/standards documents.
17951
17952 2004-02-18  Bruno Haible  <bruno@clisp.org>
17953
17954         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
17955         Reported by Derek Robert Price <derek@ximbiot.com>.
17956
17957 2004-02-16  Karl Berry  <karl@gnu.org>
17958
17959         * config/mkinstalldirs, install-sh: update from automake.
17960
17961 2004-02-06  Karl Berry  <karl@gnu.org>
17962
17963         * m4/po.m4: update from gettext 0.14.1.
17964
17965 2004-02-06  Karl Berry  <karl@gnu.org>
17966
17967         * lib/config.charset: update from gettext 0.14.1.
17968
17969 2004-02-05  Paul Eggert  <eggert@twinsun.com>
17970
17971         Add comments and code, prompted by suggestions from Bruno Haible
17972         for sh-quote.
17973         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
17974         describing the enum quoting_style values.
17975         * lib/quotearg.c (quotearg_alloc): New function.
17976         (quotearg_buffer_restyled): Treat lone { and } as special.
17977         Treat = as special.  Work around bug with older shells
17978         that "see" a '\' that is really the 2nd byte of a multibyte char.
17979         Quote empty string with shell_quoting_style.
17980
17981 2004-02-03  Bruno Haible  <bruno@clisp.org>
17982
17983         * m4/pipe.m4: New file, from GNU gettext.
17984
17985 2004-02-03  Bruno Haible  <bruno@clisp.org>
17986
17987         * lib/pipe.h: New file, from GNU gettext.
17988         * lib/pipe.c: New file, from GNU gettext.
17989
17990 2004-01-27  Bruno Haible  <bruno@clisp.org>
17991
17992         * m4/execute.m4: New file, from GNU gettext.
17993
17994 2004-01-27  Bruno Haible  <bruno@clisp.org>
17995
17996         * lib/execute.h: New file, from GNU gettext.
17997         * lib/execute.c: New file, from GNU gettext.
17998         * lib/w32spawn.h: New file, from GNU gettext.
17999
18000 2004-01-24  Paul Eggert  <eggert@twinsun.com>
18001
18002         Merge from diffutils.
18003
18004         * lib/file-type.c (file_type): Add typed memory objects.
18005         * lib/file-type.h (S_TYPEISTMO): New macro.
18006
18007         * lib/c-stack.h (c_stack_action): Remove argv argument.
18008         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
18009         (die): Don't calculate message unless segv_action returns.
18010         (get_stack_location, min_address_from_argv, max_address_from_argv,
18011         volatile stack_base, volatile_stack_size): Remove.
18012         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
18013         that every segmentation violation is a stack overflow.  (Ouch!)
18014         See Debian bug 136249 (still outstanding) for more info about why
18015         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
18016
18017 2004-01-24  Paul Eggert  <eggert@twinsun.com>
18018
18019         Exit-status fix from coreutils.
18020
18021         Use exit_failure consistently in place of EXIT_FAILURE,
18022         so that program exit statuses are consistent on failure.
18023
18024         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
18025         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
18026         * lib/argmatch.h: Comment fix to match the above.
18027         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
18028         Now a macro referring to exit_failure, instead of a separate
18029         variable.  Include "exitfail.h" to get it.
18030         * lib/xstrtol.h: Include "exitfail.h".
18031         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
18032
18033         * lib/long-options.c (parse_long_options): Use prototype
18034         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
18035         for clarity.
18036
18037 2004-01-21  Jim Meyering  <jim@meyering.net>
18038
18039         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
18040         so as not to conflict with a different-sized __mktime_internal
18041         function in GNU libc.
18042         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
18043         Problem building statically-linked `ls' reported by Michael Brunnbauer.
18044
18045 2004-01-20  Karl Berry  <karl@gnu.org>
18046
18047         * config/config.guess: update from config.
18048
18049         * config/srclistvars.sh: GNUWWWLICENSES for karl.
18050
18051 2004-01-20  Bruno Haible  <bruno@clisp.org>
18052
18053         Safer stack allocation.
18054         * lib/setenv.c: Include allocsa.h.
18055         (alloca): Remove fallback definition.
18056         (freea): Remove macro.
18057         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
18058         instead of freea.
18059
18060 2004-01-20  Bruno Haible  <bruno@clisp.org>
18061
18062         * m4/eealloc.m4: New file, from GNU gettext.
18063
18064 2004-01-20  Bruno Haible  <bruno@clisp.org>
18065
18066         * m4/allocsa.m4: New file, from GNU gettext.
18067
18068 2004-01-20  Bruno Haible  <bruno@clisp.org>
18069
18070         * lib/xallocsa.h: New file, from GNU gettext.
18071         * lib/xallocsa.c: New file, from GNU gettext.
18072
18073 2004-01-20  Bruno Haible  <bruno@clisp.org>
18074
18075         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
18076
18077 2004-01-20  Bruno Haible  <bruno@clisp.org>
18078
18079         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
18080         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
18081         specially.
18082
18083 2004-01-20  Bruno Haible  <bruno@clisp.org>
18084
18085         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
18086         patch.
18087
18088 2004-01-20  Bruno Haible  <bruno@clisp.org>
18089
18090         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
18091
18092 2004-01-20  Bruno Haible  <bruno@clisp.org>
18093
18094         * lib/eealloc.h: New file.
18095
18096 2004-01-20  Bruno Haible  <bruno@clisp.org>
18097
18098         * lib/binary-io.h: Avoid warnings on Cygwin.
18099
18100 2004-01-20  Bruno Haible  <bruno@clisp.org>
18101
18102         * lib/allocsa.h: New file, from GNU gettext.
18103         * lib/allocsa.c: New file, from GNU gettext.
18104
18105 2004-01-18  Karl Berry  <karl@gnu.org>
18106
18107         * doc/gpl.texi, doc/lgpl.texi: new files.
18108
18109 2004-01-18  Karl Berry  <karl@gnu.org>
18110
18111         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
18112         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
18113
18114 2004-01-15  Paul Eggert  <eggert@twinsun.com>
18115
18116         Merge from coreutils.
18117
18118         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
18119         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
18120         (gl_DEFAULT_POSIX2_VERSION): Move
18121         the documentation from 'configure' into 'config.hin',
18122         so that 'configure --help' isn't burdened by it and
18123         we don't have to worry about its formatting there.
18124         Reword the documentation so that it's more succinct
18125         and can be run together into a single paragraph.
18126         * m4/same.m4 (gl_SAME): Check for pathconf.
18127
18128 2004-01-15  Paul Eggert  <eggert@twinsun.com>
18129
18130         Merge from coreutils.
18131
18132         * lib/posixver.c: Include posixver.h.
18133
18134         * lib/same.c: Include <stdbool.h>, <limits.h>.
18135         (_POSIX_NAME_MAX): Define if not defined.
18136         (MIN): New macro.
18137         (same_name): If file names are silently truncated, report
18138         that the file names are the same if they are the same after
18139         the silent truncation.
18140
18141         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
18142         conversion function.
18143         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
18144         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
18145         longer needed.
18146
18147 2004-01-15  Jim Meyering  <jim@meyering.net>
18148
18149         Merge from coreutils.
18150
18151         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
18152         if no library is required.
18153         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
18154         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
18155         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
18156         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
18157         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
18158         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
18159         value, $ac_cv_search_crypt, if it's "none required".
18160         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
18161         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
18162         not gl_FUNC_GETLOADAVG.
18163         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
18164         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
18165
18166 2004-01-15  Jim Meyering  <jim@meyering.net>
18167
18168         Merge from coreutils.
18169
18170         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
18171         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
18172         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
18173
18174         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
18175         optional configure-time default.
18176
18177         * lib/version-etc.c (version_etc_copyright): Update copyright date.
18178
18179         * lib/xreadlink.c (xreadlink): Correct outdated comment.
18180
18181 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
18182
18183         Merge from coreutils.
18184
18185         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
18186         value, $ac_cv_search_nanosleep, if it's "none required".
18187
18188 2004-01-14  Paul Eggert  <eggert@twinsun.com>
18189
18190         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
18191         with like-named macro in fnmatch.c.
18192         (EXT): Use an internal constant instead.
18193
18194         Merge fnmatch patches from glibc.
18195         * lib/fnmatch.c (mbsinit): Remove define.
18196         Add libc_hidden_ver (__fnmatch, fnmatch).
18197         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
18198         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
18199
18200 2004-01-14  Karl Berry  <karl@gnu.org>
18201
18202         * config/install-sh: update from automake.
18203
18204 2004-01-13  Karl Berry  <karl@gnu.org>
18205
18206         * config/install-sh: update from automake.
18207
18208 2004-01-09  Karl Berry  <karl@gnu.org>
18209
18210         * config/install-sh: update from automake.
18211
18212 2004-01-05  Karl Berry  <karl@gnu.org>
18213
18214         * config/config.{sub,guess}: update from config.
18215
18216 2003-12-31  Karl Berry  <karl@gnu.org>
18217
18218         * config/depcomp: update from automake.
18219
18220 2003-12-14  Karl Berry  <karl@gnu.org>
18221
18222         * lib/config.charset: update from gettext-runtime.
18223
18224 2003-12-03  Paul Eggert  <eggert@twinsun.com>
18225
18226         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
18227         Bug reported by Alfred M. Szmidt.
18228
18229 2003-12-03  Bruno Haible  <bruno@clisp.org>
18230
18231         * m4/gettext.m4: Upgrade from gettext-0.13.
18232         * m4/po.m4: Upgrade from gettext-0.13.
18233         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
18234         * m4/intmax.m4: New file, from gettext-0.13.
18235         * m4/printf-posix.m4: New file, from gettext-0.13.
18236
18237 2003-11-29  Karl Berry  <karl@gnu.org>
18238
18239         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
18240
18241 2003-11-25  Paul Eggert  <eggert@twinsun.com>
18242             Bruno Haible  <bruno@clisp.org>
18243
18244         * lib/printf-parse.h: Don't include sys/types.h.
18245         (ARG_NONE): New macro.
18246         (char_directive): Change type of *arg_index fields to size_t.
18247         * lib/printf-parse.c: Don't include sys/types.h.
18248         (SSIZE_MAX): Remove macro.
18249         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
18250         Remove unnecessary overflow check.
18251         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
18252         fields.
18253
18254 2003-11-25  Bruno Haible  <bruno@clisp.org>
18255
18256         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
18257
18258 2003-11-25  Bruno Haible  <bruno@clisp.org>
18259
18260         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
18261         gt_TYPE_SSIZE_T.
18262
18263 2003-11-24  Paul Eggert  <eggert@twinsun.com>
18264
18265         * modules/alloca: Remove dependency on xalloc.
18266
18267 2003-11-24  Paul Eggert  <eggert@twinsun.com>
18268
18269         * lib/alloca.c: Remove dependency on xalloc module.
18270         (xalloc_die): Remove.
18271         (memory_full) [!defined emacs]: New macro.
18272         [!defined emacs]: Don't include xalloc.h.
18273         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
18274         address arithmetic overflows.  Change datatypes a bit to avoid
18275         unnecessary casts.
18276
18277 2003-11-22  Jim Meyering  <jim@meyering.net>
18278
18279         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
18280         s/size/size_t/.
18281
18282 2003-11-21  Karl Berry  <karl@gnu.org>
18283
18284         * config/config.{sub,guess}: update from config.
18285
18286 2003-11-18  Karl Berry  <karl@gnu.org>
18287
18288         * config/config.{sub,guess}: update from config.
18289
18290         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
18291
18292 2003-11-17  Paul Eggert  <eggert@twinsun.com>
18293
18294         * README: Mention that S+T cannot overflow if S is the size of
18295         an existing object and T is sufficiently small.
18296
18297 2003-11-17  Jim Meyering  <jim@meyering.net>
18298
18299         On systems without utime and without a utimes function capable of
18300         dealing with a NULL struct utimbuf* argument, this utime replacement
18301         could -- in unusual circumstances -- leak a file descriptor.
18302         * lib/utime.c: Include <unistd.h> and <errno.h>.
18303         (utime_null): Be sure to close `fd' and to preserve errno.
18304         Reported by Geoff Collyer via Arnold Robbins.
18305
18306 2003-11-17  Bruno Haible  <bruno@clisp.org>
18307
18308         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
18309         (Depends-on): Add xsize.
18310
18311 2003-11-17  Bruno Haible  <bruno@clisp.org>
18312
18313         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
18314
18315 2003-11-17  Bruno Haible  <bruno@clisp.org>
18316
18317         * lib/vasnprintf.c (alloca): Remove fallback definition.
18318         (freea): Remove definition.
18319         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
18320         Reported by Paul Eggert.
18321
18322 2003-11-16  Paul Eggert  <eggert@twinsun.com>
18323             Bruno Haible  <bruno@clisp.org>
18324
18325         Protect against address arithmetic overflow.
18326         * lib/printf-args.h: Include stddef.h.
18327         (arguments): Change type of field 'count' to size_t.
18328         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
18329         'unsigned int' where appropriate.
18330         * lib/printf-parse.h: Include sys/types.h.
18331         (char_directive): Change type of *arg_index fields to ssize_t.
18332         (char_directives): Change type of fields 'count', max_*_length to
18333         size_t.
18334         * lib/printf-parse.c: Include sys/types.h and xsize.h.
18335         (SSIZE_MAX): Define fallback value.
18336         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
18337         instead of 'int' where appropriate. Check a_allocated, d_allocated
18338         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
18339         * lib/vasnprintf.c: Include xsize.h.
18340         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
18341         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
18342         overflow. Avoid wraparound when converting a width or precision from
18343         decimal to binary.
18344
18345 2003-11-16  Bruno Haible  <bruno@clisp.org>
18346
18347         Update from GNU gettext.
18348         * lib/printf-parse.c: Generalize to it can be compiled for wide
18349         strings.
18350         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
18351         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
18352         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
18353         SNPRINTF): New macros.
18354         Don't include <alloca.h> if the file is used inside libintl.
18355         (local_wcslen): New function, for Solaris 2.5.1.
18356         (VASNPRINTF): Use it instead of wcslen.
18357
18358 2003-11-16  Bruno Haible  <bruno@clisp.org>
18359
18360         * lib/xsize.h (xmax): New function.
18361         (xsum, xsum3, xsum4): Declare as "pure" functions.
18362
18363 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18364
18365         * modules/xalloc (Files): Undo latest change, since xalloc.h
18366         no longer needs SIZE_MAX or PTRDIFF_MAX.
18367
18368 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18369
18370         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
18371         gl_PTRDIFF_MAX.
18372
18373 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18374
18375         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
18376         "return", to pacify some unknown compiler.  Problem reported
18377         by Joerg Schilling.
18378
18379 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18380
18381         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
18382         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
18383         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
18384         heuristic is just as accurate as far as we know, and it removes a
18385         dependency on size_max.m4 and ptrdiff_max.m4.
18386
18387 2003-11-11  Bruno Haible  <bruno@clisp.org>
18388
18389         * modules/xsize (Files): Add m4/size_max.m4.
18390         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
18391
18392 2003-11-11  Bruno Haible  <bruno@clisp.org>
18393
18394         * m4/size_max.m4: New file.
18395         * m4/ptrdiff_max.m4: New file.
18396         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
18397         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
18398         (gl_XALLOC): Invoke it.
18399
18400 2003-11-11  Bruno Haible  <bruno@clisp.org>
18401
18402         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
18403         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
18404         defined.
18405
18406 2003-11-10  Paul Eggert  <eggert@twinsun.com>
18407
18408         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
18409         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
18410         rejected some allocations of exactly SIZE_MAX - 2 bytes.
18411         From Bruno Haible.
18412         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
18413         not (size_t) -1, since it's defined here.
18414
18415 2003-11-09  Karl Berry  <karl@gnu.org>
18416
18417         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
18418
18419 2003-11-06  Paul Eggert  <eggert@twinsun.com>
18420
18421         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
18422         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
18423         Reject sizes of exactly SIZE_MAX bytes.
18424         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
18425         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
18426
18427 2003-11-05  Bruno Haible  <bruno@clisp.org>
18428
18429         * lib/xsize.h: Include limits.h, to avoid a possible collision with
18430         SIZE_MAX defined in <limits.h> on Solaris.
18431
18432 2003-11-04  Jim Meyering  <jim@meyering.net>
18433
18434         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
18435         variable names, rather than @VAR@.
18436         * modules/poll: Likewise.
18437
18438 2003-11-04  Bruno Haible  <bruno@clisp.org>
18439
18440         * modules/xsize: New file.
18441         * modules/linebreak: Depend on xsize.
18442         * MODULES.html.sh (func_all_modules): Add xsize.
18443
18444 2003-11-04  Bruno Haible  <bruno@clisp.org>
18445
18446         * m4/xsize.m4: New file.
18447
18448 2003-11-04  Bruno Haible  <bruno@clisp.org>
18449
18450         * lib/xsize.h: New file.
18451         * lib/linebreak.c: Include xsize.h.
18452         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
18453         argument for overflow.
18454         Suggested by Paul Eggert.
18455
18456 2003-11-03  Karl Berry  <karl@gnu.org>
18457
18458         * config/config.{guess,sub}: update from config.
18459
18460 2003-11-03  Jim Meyering  <jim@meyering.net>
18461
18462         * modules/userspec (lib_SOURCES): Add userspec.h.
18463         (Include): Add "userspec.h".
18464         Improve description.
18465
18466 2003-11-03  Jim Meyering  <jim@meyering.net>
18467
18468         * lib/userspec.c: Include "userspec.h".
18469         * lib/userspec.h: New file.
18470
18471 2003-11-03  Bruno Haible  <bruno@clisp.org>
18472
18473         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
18474
18475 2003-11-03  Bruno Haible  <bruno@clisp.org>
18476
18477         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
18478         available, to avoid (extremely rare) race condition.
18479         Suggested by Paul Eggert.
18480
18481 2003-11-02  Karl Berry  <karl@gnu.org>
18482
18483         * config/srclist.txt (vasprintf.c): sync broken, sigh.
18484
18485 2003-10-31  Paul Eggert  <eggert@twinsun.com>
18486
18487         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
18488         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
18489         (read_filesystem_list): Set and use me_type_malloced.
18490         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
18491         whatever the type happens to be), for brevity and consistency.
18492         Check for size calculation overflow on Alphas running OSF/1.
18493
18494 2003-10-31  Jim Meyering  <jim@meyering.net>
18495
18496         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
18497
18498         * lib/linebuffer.c: Include <string.h> for declaration of memset.
18499
18500 2003-10-30  Paul Eggert  <eggert@twinsun.com>
18501             Bruno Haible  <bruno@clisp.org>
18502
18503         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
18504         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
18505
18506 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
18507
18508         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
18509         netbsd*-gnu*.  Suggested by Robert Millan.
18510
18511 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18512
18513         * modules/group-member: Depend on stdbool.
18514
18515 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18516
18517         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
18518
18519 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18520
18521         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
18522         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
18523         after the 'gnu' in these cases.  This fixes some bugs in the
18524         previous change, and is based on suggestions by Robert Millan.
18525
18526 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18527
18528         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
18529         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
18530         no longer needed.
18531         * lib/quotearg.c (quotearg_n_options): Use it.
18532         * lib/group-member.c: Include <stdbool.h>.
18533         (free_group_info): Arg is now const *; don't free arg.
18534         (get_group_info): Now returns bool and accepts struct group_info *,
18535         rather than returning a malloc'ed struct group_info *.
18536         All uses changed.  Check for overflow in internal size calculation.
18537
18538         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
18539         rather than xmalloc/xrealloc.
18540         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
18541         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
18542         conformance bug: the old code used a pointer after freeing the
18543         storage that it addressed.
18544         * lib/hash.c (hash_initialize): Simplify the code by using
18545         xalloc_oversized rather than doing it by hand.
18546         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
18547         the buffer preserved.  Use free and xmalloc instead.
18548         * lib/quotearg.c (quotearg_n_options): Likewise.
18549         Use a simpler test for size overflow.  Don't use xalloc_oversized
18550         because unsigned int might be wider than size_t (!); this suggests
18551         that we should switch from unsigned int to size_t for slot numbers.
18552
18553 2003-10-28  Paul Eggert  <eggert@twinsun.com>
18554
18555         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
18556         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
18557         NetBSD kernels.  Requested by Richard Stallman.
18558
18559 2003-10-27  Paul Eggert  <eggert@twinsun.com>
18560
18561         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
18562         to allocate the returned structure.  Do not allocate a subarray,
18563         as x2nrealloc will do that.
18564         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
18565         instead of xnrealloc.
18566         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
18567
18568 2003-10-27  Bruno Haible  <bruno@clisp.org>
18569
18570         * lib/stdbool_.h: Better support for BeOS.
18571
18572 2003-10-26  Paul Eggert  <eggert@twinsun.com>
18573
18574         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
18575         now uses inline.
18576
18577 2003-10-26  Paul Eggert  <eggert@twinsun.com>
18578
18579         * lib/xalloc.h (xalloc_oversized): New static inline function, for
18580         callers that want to do their own size-overflow checking.  Include
18581         <stdbool.h>, since xalloc_oversized returns bool.
18582         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
18583         to use xalloc_oversized.
18584
18585         Add two functions x2realloc, x2nrealloc, for programs that grow
18586         arrays dynamically by doubling their sizes.
18587         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
18588         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
18589         New functions.
18590
18591         Port to C99 semantics for 'inline' of external functions.
18592         Bug reported by Bruno Haible.
18593         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
18594         with the old contents of xnmalloc.
18595         (xnmalloc, xmalloc): Use it.
18596         (xnrealloc_inline): New static inline function,
18597         with the old contents of xnrealloc.
18598         (xnrealloc, xrealloc): Use it.
18599
18600         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
18601         that.
18602
18603 2003-10-26  Karl Berry  <karl@gnu.org>
18604
18605         * config/srclist.txt (COPYING.DOC): no longer available from
18606         /gd/gnuorg; don't know where the ultimate source is.
18607
18608 2003-10-25  Paul Eggert  <eggert@twinsun.com>
18609
18610         Fix several address-calculation bugs in the hash modules,
18611         plus some minor code cleanup.
18612
18613         * lib/hash.h: Include <stdbool.h>, for bool.
18614         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
18615         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
18616         hash_get_n_entries, hash_get_max_bucket_length,
18617         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
18618         hash_rehash): Use size_t rather than unsigned.
18619         * lib/hash.c (struct hash_table, hash_get_n_buckets,
18620         hash_get_n_buckets_used, hash_get_n_entries,
18621         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
18622         hash_get_entries, hash_do_for_each, hash_string, is_prime,
18623         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
18624         Likewise.
18625         (SIZE_MAX): Define if not defined.
18626         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
18627         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
18628         hash_print):
18629         Use const * when possible.
18630         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
18631         (check_tuning): Fix bug: if tuning parameters were very close to
18632         0 or 1, rounding errors could have caused subscript violations.
18633         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
18634         (hash_initialize): Add 'fail:' label
18635         to free table and return NULL, and use it to simplify code.
18636         Use calloc rather than clearing the storage ourself.
18637         (hash_initialize, hash_rehash): Check for arithmetic overflow in
18638         buffer size calculations.
18639         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
18640         Include <stddef.h>, for size_t.
18641         * lib/hash-pjw.c (hash_pjw): Likewise.
18642         Switch to method described by Bruno Haible.
18643         Include <limits.h>, for CHAR_BIT.
18644         (SIZE_BITS): New macro.
18645
18646 2003-10-23  Paul Eggert  <eggert@twinsun.com>
18647
18648         * m4/getline.m4 (AM_FUNC_GETLINE):
18649         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
18650         hosts.  Problem reported by Derek Robert Price in
18651         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
18652         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
18653         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
18654
18655 2003-10-21  Paul Eggert  <eggert@twinsun.com>
18656
18657         * lib/getndelim2.c (getndelim2): When size calculation overflows,
18658         ceiling the allocation at NMAX bytes rather than silently
18659         discarding input bytes before NMAX is reached.  This makes
18660         a difference only if NMAX exceeds SIZE_MAX / 2.
18661
18662         * lib/obstack.c: Merge from glibc.
18663         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
18664         Add libc_hidden_def (_obstack_newchunk).
18665         (_obstack_free) [! defined _LIBC]: Remove.
18666         [defined _LIBC]: Make a strong alias from obstack_free, rather than
18667         a clone of the function body.
18668         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
18669         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
18670
18671         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
18672         glibc.
18673         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
18674         arg to memcpy.
18675
18676         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
18677         (obstack_ptr_grow_fast, obstack_int_grow_fast):
18678         Don't use lvalue casts, as GCC plans to remove support for them
18679         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
18680         was also present in the non-GCC version, indicating that this
18681         code had always been buggy and had never been widely used.
18682         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
18683         Use the fast variant of each macro, rather than copying the
18684         definiens of the fast variant; that way, we'll be more likely to
18685         catch future bugs in the fast variants.
18686
18687 2003-10-20  Bruno Haible  <bruno@clisp.org>
18688
18689         * modules/wait-process: New file.
18690         * MODULES.html.sh (func_all_modules): Add wait-process.
18691
18692 2003-10-20  Bruno Haible  <bruno@clisp.org>
18693
18694         * m4/wait-process.m4: New file.
18695
18696 2003-10-20  Bruno Haible  <bruno@clisp.org>
18697
18698         * lib/wait-process.h: New file, from GNU gettext.
18699         * lib/wait-process.c: New file, from GNU gettext.
18700
18701 2003-10-19  Jim Meyering  <jim@meyering.net>
18702
18703         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
18704         HPUX 10.20.
18705
18706 2003-10-18  Karl Berry  <karl@gnu.org>
18707
18708         * config/config.guess: update from config.
18709
18710 2003-10-16  Paul Eggert  <eggert@twinsun.com>
18711
18712         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
18713         (getgroups): First arg is int, not size_t.
18714         Don't let 'free' mangle errno.
18715
18716 2003-10-16  Paul Eggert  <eggert@twinsun.com>
18717
18718         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
18719
18720 2003-10-16  Karl Berry  <karl@gnu.org>
18721
18722         * config/config.{guess,sub}: update from config.
18723
18724 2003-10-16  Jim Meyering  <jim@meyering.net>
18725
18726         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
18727         memcpy.
18728
18729 2003-10-15  Paul Eggert  <eggert@twinsun.com>
18730
18731         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
18732         (SIZE_MAX): Remove.
18733         (new_exclude, add_exclude_file): Initial size no longer needs to
18734         be a power of 2.
18735         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
18736         our own address arithmetic overflow checking.
18737
18738         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
18739         (fnmatch): Do not alloca more than 2000 wide characters;
18740         instead, use malloc for large buffers.
18741         Check for address arithmetic overflow, and return -1
18742         with errno set to ENOMEM in that case.
18743         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
18744         (NEW_PATTERN): Do not alloca more than 8000 bytes;
18745         instead, return -1.  Check for address arithmetic overflow.
18746
18747 2003-10-14  Paul Eggert  <eggert@twinsun.com>
18748
18749         Handle invalid suffixes and overflow independently, so that
18750         callers can treat them independently as needed.  Fix some bugs in
18751         suffix handling, e.g., "100k@" was not diagnosed as an invalid
18752         suffix for a human-readable blocksize.  The major caller-visible
18753         change is the addition of a new
18754         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
18755         that both overflow and suffix chars were found.
18756
18757         * lib/human.c (humblock): Don't check separately for invalid suffix
18758         char; that is xstrtoumax's job (now that its bug is fixed).
18759         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
18760         INTMAX_MAX]: New macros.
18761         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
18762         TYPE_MAXIMUM): New macros.
18763         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
18764         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
18765         if overflow occurs, as it's what __strtol does and it's more useful
18766         in practice.
18767         (__xstrtol): If __strtol reports some error other than ERANGE,
18768         reflect it to the caller as LONGINT_INVALID.  If it reports
18769         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
18770         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
18771         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
18772         value.
18773         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
18774         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
18775         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
18776         [defined UINTMAX_MAX]: New macros.
18777
18778 2003-10-14  Bruno Haible  <bruno@clisp.org>
18779
18780         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
18781
18782 2003-10-14  Bruno Haible  <bruno@clisp.org>
18783
18784         * m4/sig_atomic_t: New file, from GNU gettext.
18785         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
18786
18787 2003-10-14  Bruno Haible  <bruno@clisp.org>
18788
18789         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
18790         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
18791         Also use volatile where needed.
18792
18793 2003-10-12  Paul Eggert  <eggert@twinsun.com>
18794
18795         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
18796         Change maintainer from Bruno Haible to 'all'.
18797
18798 2003-10-12  Paul Eggert  <eggert@twinsun.com>
18799
18800         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
18801
18802 2003-10-12  Paul Eggert  <eggert@twinsun.com>
18803
18804         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
18805         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
18806         and define in terms of the other primitives.
18807         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
18808         (SIZE_MAX): Define if not already defined.
18809         (array_size_overflow): New function.
18810         (xalloc_die): Abort instead of exiting if 'error' returns.
18811         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
18812         (xmalloc, xrealloc): Use them.
18813         (xcalloc): Check for address arithmetic overflow.
18814         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
18815         a bit faster than strcpy.
18816
18817 2003-10-10  Simon Josefsson  <jas@extundo.com>
18818
18819         * modules/argp (Depends-on): Add restrict and strcase.
18820
18821 2003-10-10  Simon Josefsson  <jas@extundo.com>
18822
18823         * m4/argp.m4: Add AC_C_INLINE.
18824
18825 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18826
18827         Merge getpass from libc, plus a few fixes.
18828
18829         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
18830         Include <stdbool.h>.
18831         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
18832         __fsetlocking to empty.
18833         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
18834         do include <bits/libc-lock.h>.
18835         Do not include <fcntl.h>; not needed.
18836         [_LIBC]: Include <wchar.h>.
18837         (NOTCANCEL_MODE): New macro.
18838         (flockfile, funlockfile) [_LIBC]: New macros.
18839         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
18840         [!_LIBC]: New macros.
18841         (call_fclose): New function.
18842         (getpass): Use it.  Save tty stream separately; this simplifies the
18843         code and makes it more reliable if stdin happens to equal stdout.
18844         Invoke __fsetlocking on tty.
18845         Handle thread cancellation if needed.
18846         Namespace cleanup (use __tcgetattr, __getline).
18847         Use bool for Booleans.
18848         [USE_IN_LIBIO]: Handle wide streams.
18849         [!_LIBC]: Unconditionally do the fseek, since we don't know what
18850         stream might go where.
18851
18852         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
18853         doesn't have to include <stdio.h> before us.
18854         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
18855         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
18856         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
18857         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
18858         if not declared, so that we can use getpass.c code from libc without
18859         rewriting it.
18860         (flockfile, ftrylockfile, funlockfile): New macros.
18861
18862 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18863
18864         * modules/getpass: Depend on stdbool.
18865
18866 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18867
18868         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
18869
18870 2003-10-07  Karl Berry  <karl@gnu.org>
18871
18872         * config/config.{guess,sub}: update from config.
18873
18874 2003-10-06  Jim Meyering  <jim@meyering.net>
18875             Bruno Haible  <bruno@clisp.org>
18876
18877         This lets translators provide better translations for the
18878         "Written by ..." part of --version output.
18879         * lib/version-etc.h: Include stdarg.h.
18880         (version_etc_copyright): Declare as readonly.
18881         (version_etc): Make this function variadic with a NULL-terminated list
18882         of author name strings.
18883         (version_etc_va): New declaration.
18884         * lib/version-etc.c: Include stdarg.h, stdlib.h.
18885         (version_etc_copyright): Declare as readonly.
18886         (version_etc_va): New function. Provide a different translatable string
18887         for each possible number of authors < 10. Abbreviate when there are 10
18888         authors or more.
18889         (version_etc): Make this function variadic. Call version_etc_va.
18890         Suggestion from Gary V. Vaughan.
18891
18892         * lib/long-options.h (parse_long_options): Change prototype: the
18893         authors string is moved to the end and becomes variadic.
18894         * lib/long-options.c: Include stdarg.h.
18895         (parse_long_options): Make this function variadic, too.
18896         Call version_etc_va, not version_etc.
18897
18898 2003-10-06  Bruno Haible  <bruno@clisp.org>
18899
18900         * modules/version-etc-2: Remove file.
18901         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
18902
18903 2003-10-06  Bruno Haible  <bruno@clisp.org>
18904
18905         * modules/fatal-signal: New file.
18906         * MODULES.html.sh (func_all_modules): Add fatal-signal.
18907
18908 2003-10-06  Bruno Haible  <bruno@clisp.org>
18909
18910         * m4/fatal-signal.m4: New file.
18911         * m4/signalblocking.m4: New file, from GNU gettext.
18912
18913 2003-10-06  Bruno Haible  <bruno@clisp.org>
18914
18915         * lib/version-etc-2.h: Remove file.
18916         * lib/version-etc-2.c: Remove file.
18917
18918 2003-10-06  Bruno Haible  <bruno@clisp.org>
18919
18920         * lib/fatal-signal.h: New file, from GNU gettext.
18921         * lib/fatal-signal.c: New file, from GNU gettext.
18922
18923 2003-10-05  Paul Eggert  <eggert@twinsun.com>
18924
18925         * README: Rework advice for preventing empty .o files.
18926         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
18927         not <sys/types.h>.
18928
18929 2003-10-04  Karl Berry  <karl@gnu.org>
18930
18931         * lib/argp*: update from libc.
18932
18933 2003-10-04  Karl Berry  <karl@gnu.org>
18934
18935         * config/config.{guess,sub}: update from config.
18936
18937 2003-10-02  Bruno Haible  <bruno@clisp.org>
18938
18939         * modules/lchown (Include): Add lchown.h.
18940         * modules/time_r (Include): Use "..." syntax.
18941         * modules/xgetdomainname (Include): Add xgetdomainname.h.
18942
18943 2003-10-01  Simon Josefsson  <jas@extundo.com>
18944
18945         * MODULES.html.sh (func_all_modules): Move gethostname from section
18946         'based on' to section 'lacking' POSIX:2001.
18947
18948 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
18949
18950         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
18951         to output mode on the same stream.
18952
18953 2003-09-29  Paul Eggert  <eggert@twinsun.com>
18954
18955         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
18956         Fix arg typo in previous patch.
18957
18958 2003-09-28  Jim Meyering  <jim@meyering.net>
18959
18960         * lib/error.c: Correct cpp indentation.
18961
18962 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18963
18964         * modules/free: New file.
18965
18966 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18967
18968         * m4/free.m4: New file.
18969
18970 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18971
18972         * lib/minmax.h (MIN, MAX)
18973         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
18974         Omit the special code that used __typeof__, since we worry that
18975         it could be more trouble than it's worth.  See:
18976         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
18977         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
18978
18979         * lib/free.c: New file.
18980
18981 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
18982
18983         Trivial fixes to Makefile.am parts of module listings.
18984         * modules/strstr: Append strstr.h to lib_SOURCES.
18985         * modules/strcase: Likewise, for strcase.h.
18986
18987 2003-09-27  Karl Berry  <karl@gnu.org>
18988
18989         * config/mkinstalldirs: update from automake.
18990
18991 2003-09-26  Paul Eggert  <eggert@twinsun.com>
18992
18993         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
18994         (error_tail): Do not loop, reallocating temporary buffer, since
18995         the output cannot contain more wide characters than the input
18996         contains bytes, the size must be big enough already.  This avoids
18997         one potential size overflow calculation.  Check for size overflow
18998         when calculating temporary buffer size.  Free temporary buffer
18999         when done, if it was allocated with malloc; this plugs a memory
19000         leak.  Remove casts from void * to pointers, that are no longer
19001         needed now that we're assuming C89 or better.
19002
19003         Merge error changes from glibc.
19004
19005         * lib/error.c, error.h: Update copyright notice header to match glibc.
19006         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
19007         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
19008         Disable cancellation while printing error.
19009         * lib/error.h: Prepend __ to parameter names.
19010
19011 2003-09-26  Jim Meyering  <jim@meyering.net>
19012
19013         * lib/error.c (error_tail): Move some declarations
19014         into inner scope where the local variables are used.
19015
19016 2003-09-26  Bruno Haible  <bruno@clisp.org>
19017
19018         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
19019         stpncpy().
19020         Don't define stpncpy through config.h; it's now done through stpncpy.h.
19021
19022 2003-09-26  Bruno Haible  <bruno@clisp.org>
19023
19024         * lib/stpncpy.h (gnu_stpncpy): New declaration.
19025         (stpncpy): Define as alias for gnu_stpncpy.
19026         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
19027
19028 2003-09-25  Simon Josefsson  <jas@extundo.com>
19029
19030         * lib/xgetdomainname.h: New file.
19031         * lib/xgetdomainname.c: New file.
19032
19033 2003-09-25  Simon Josefsson  <jas@extundo.com>
19034             Bruno Haible  <bruno@clisp.org>
19035
19036         * modules/getdomainname: New file.
19037         * modules/xgetdomainname: New file.
19038         * MODULES.html.sh (func_all_modules): Add getdomainname,
19039         xgetdomainname.
19040
19041 2003-09-25  Simon Josefsson  <jas@extundo.com>
19042             Bruno Haible  <bruno@clisp.org>
19043
19044         * m4/getdomainname.m4: New file.
19045
19046 2003-09-25  Simon Josefsson  <jas@extundo.com>
19047             Bruno Haible  <bruno@clisp.org>
19048
19049         * lib/getdomainname.h: New file.
19050         * lib/getdomainname.c: New file.
19051
19052 2003-09-25  Karl Berry  <karl@gnu.org>
19053
19054         * lib/argp-fmtstream.c, argp-help.c: update from libc.
19055
19056 2003-09-25  Karl Berry  <karl@gnu.org>
19057
19058         * config/install-sh: update from automake.
19059
19060 2003-09-25  Bruno Haible  <bruno@clisp.org>
19061
19062         * modules/version-etc-2: New file, from modules/version-etc with
19063         modifications.
19064         * MODULES.html.sh (func_all_modules): Add version-etc-2.
19065
19066 2003-09-25  Bruno Haible  <bruno@clisp.org>
19067
19068         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
19069         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
19070
19071 2003-09-24  Simon Josefsson  <jas@extundo.com>
19072
19073         * modules/xgethostname: Add xgethostname.h.
19074
19075 2003-09-24  Paul Eggert  <eggert@twinsun.com>
19076
19077         * lib/linebuffer.c (freebuffer): Don't free the argument, just
19078         the buffer associated with the argument.  Bug reported by
19079         Simon Josefsson.
19080
19081 2003-09-24  Paul Eggert  <eggert@twinsun.com>
19082
19083         * README: Document assumptions that 'int' is at least 32 bits
19084         wide, that integer arithmetic is 2's complement without overflow,
19085         that there are no holes in integer values, that adding sizes of
19086         two nonoverlapping objects can't overflow, and that all-bits-zero
19087         yields scalar zero.  Fix spelling and capitalization typos.
19088
19089 2003-09-19  Karl Berry  <karl@gnu.org>
19090
19091         * lib/argp.h: update from libc.
19092
19093 2003-09-17  Paul Eggert  <eggert@twinsun.com>
19094
19095         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
19096         to avoid spurious warnings like "AC_RUN_IFELSE was called before
19097         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
19098
19099 2003-09-17  Paul Eggert  <eggert@twinsun.com>
19100
19101         * gnulib-tool: Use "test -h", not "test -L", for portability
19102         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
19103         (tags_regexp): Remove, since \| doesn't conform to POSIX.
19104         (sed_extract_prog): Issue s commands one-by-one, rather than
19105         using \| in one s command.
19106
19107 2003-09-16  Paul Eggert  <eggert@twinsun.com>
19108
19109         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
19110         input error, instead of returning NULL the next time we are called
19111         (and therefore losing track of errno).
19112
19113 2003-09-16  Bruno Haible  <bruno@clisp.org>
19114
19115         * gnulib-tool (func_create_testdir): Warn about duplicated
19116         dependencies.
19117
19118 2003-09-15  Paul Eggert  <eggert@twinsun.com>
19119
19120         * modules/argmatch, modules/fatal, modules/obstack,
19121         modules/xalloc, modules/xgethostname: Sort dependencies by
19122         importance, not alphabetically.
19123
19124 2003-09-15  Paul Eggert  <eggert@twinsun.com>
19125
19126         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
19127         fails, so that the caller gets the proper errno.
19128
19129         * lib/readutmp.c (read_utmp): Likewise.
19130         Check for fstat error.  Close stream and free storage
19131         when failing.
19132
19133 2003-09-14  Karl Berry  <karl@gnu.org>
19134
19135         * config/srclist.txt (strdup.c): disable for c89 changes.
19136
19137 2003-09-14  Jim Meyering  <jim@meyering.net>
19138
19139         * lib/getloadavg.c: Correct cpp indentation.
19140         * lib/strdup.c: Likewise.
19141         * lib/vasnprintf.c: Likewise.
19142
19143 2003-09-14  Bruno Haible  <bruno@clisp.org>
19144
19145         * modules/fwriteerror: New file.
19146         * MODULES.html.sh (func_all_modules): Add fwriteerror.
19147
19148 2003-09-14  Bruno Haible  <bruno@clisp.org>
19149
19150         * lib/fwriteerror.h: New file.
19151         * lib/fwriteerror.c: New file.
19152
19153 2003-09-12  Paul Eggert  <eggert@twinsun.com>
19154
19155         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
19156         modules/xgethostname, modules/xalloc: Depend on exit.
19157
19158 2003-09-12  Paul Eggert  <eggert@twinsun.com>
19159
19160         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
19161
19162         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
19163         and AC_MINIX, too, so that their extensions are available.
19164
19165         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
19166         This macro has been superseded by gl_BACKUPFILE.
19167
19168         More patches to assume C89 or better.
19169
19170         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
19171
19172         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
19173         unconditionally.
19174         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
19175         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
19176         Include <string.h>, <stdlib.h> unconditionally.
19177         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
19178         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
19179         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
19180         headers or for string.h.
19181         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
19182         or strtoul.
19183
19184         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
19185         headers.
19186         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
19187         * m4/userspec.m4 (gl_USERSPEC): Likewise.
19188         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
19189         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
19190         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
19191         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
19192         memcpy, memset.
19193         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
19194         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
19195         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
19196         strtol.
19197         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
19198         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
19199         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
19200         strtoul.
19201
19202 2003-09-12  Paul Eggert  <eggert@twinsun.com>
19203
19204         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
19205         * lib/obstack.c [!defined _LIBC]: Likewise.
19206         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
19207         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
19208         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
19209
19210         More changes to assume C89 or better.
19211
19212         * lib/error.c (error_tail): Assume vprintf.
19213
19214         * lib/argmatch.c (getenv): Remove decl.
19215         * lib/progreloc.c (get_full_program_name): Define via prototype.
19216         * lib/setenv.c (clearenv): Likewise.
19217         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
19218         needed.
19219         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
19220         (malloc, memcpy): Remove decls.
19221         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
19222         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
19223         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
19224         (memcpy): Remove macro.
19225         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
19226         (__P): Remove.  All uses removed.
19227         (PTR): Remove.  All uses changed to void *.
19228         (CHAR_BIT, NULL): Remove.
19229         (spaces, zeros, memset_space, memset_zero)
19230         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
19231         Remove.
19232         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
19233         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
19234         Define with prototype.
19235         Remove now-unnecessary prototype decl.
19236         (extra_args_spec): Assume ANSI C.  All uses changed.
19237         (extra_args_spec_iso): Remove.
19238         (my_strftime, emacs_strftimeu): Define via prototype.
19239         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
19240         unconditionally.
19241         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
19242         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
19243         (strtoul, strtol): Remove decls.
19244         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
19245         LONG_MAX): Remove.
19246         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
19247         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
19248         (LOCALE_PARAM_PROTO): New macro.
19249         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
19250         (INTERNAL (strtol), strtol): Define with a prototype.
19251         (PARAMS): Remove.  All uses removed.
19252         * lib/tempname.c: Include <string.h> unconditionally.
19253         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
19254         * lib/xgethostname.c (main): Define with a prototype.
19255         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
19256         Include <stdlib.h> unconditionally.
19257         (calloc, malloc, realloc, free): Remove decls.
19258         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
19259         Include <stdlib.h> unconditionally.  Sort include file names.
19260         (strtod): Remove.
19261         (xstrtod): Define with a prototype.
19262         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
19263         (strtol, strtoul): Remove decls.
19264
19265 2003-09-11  Paul Eggert  <eggert@twinsun.com>
19266
19267         More patches to assume C89 or better.
19268         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
19269         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
19270         string.h, memchr, STDC_HEADERS.
19271
19272 2003-09-11  Paul Eggert  <eggert@twinsun.com>
19273
19274         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
19275         Include <stdlib.h>, <string.h> unconditionally.
19276         Remove now-unnecessary cast to char *.
19277         * lib/strnlen.c: Include <string.h> unconditionally.
19278         * lib/yesno.c (yesno): Define with a prototype.
19279
19280 2003-09-11  Bruno Haible  <bruno@clisp.org>
19281
19282         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
19283
19284 2003-09-10  Jim Meyering  <jim@meyering.net>
19285
19286         * lib/error.c: Correct indentation of cpp directives.
19287
19288 2003-09-10  Bruno Haible  <bruno@clisp.org>
19289
19290         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
19291         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
19292         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
19293         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
19294         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
19295         <stdlib.h> and <string.h> checks.
19296         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
19297         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
19298
19299 2003-09-10  Bruno Haible  <bruno@clisp.org>
19300
19301         * lib/strcspn.c: Include <string.h> unconditionally.
19302         * lib/strpbrk.c: Include <string.h> unconditionally.
19303         * lib/strstr.c: Include <string.h> unconditionally.
19304         * lib/unicodeio.c: Include <string.h> unconditionally.
19305         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
19306         * lib/unsetenv.c: Likewise.
19307         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
19308         * lib/yesno.c: Include <stdlib.h> unconditionally.
19309         (rpmatch): Add prototype.
19310
19311 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19312
19313         More patches to assume C89 or better.
19314         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
19315         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
19316         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
19317         or for string.h.
19318         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
19319         stdlib.h.
19320         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
19321         C headers.
19322         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
19323         string.h.
19324         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
19325         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
19326         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
19327         or for string.h.
19328         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
19329         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
19330         C headers.
19331         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
19332         memcpy.
19333         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
19334         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
19335         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
19336         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
19337         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
19338         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
19339         string.h, free.
19340         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
19341         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
19342         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
19343         C headers, or for string.h.
19344         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
19345         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
19346         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
19347         headers, memory.h, stdlib.h, string.h, strings.h.
19348         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
19349         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
19350         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
19351         strchr.
19352         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
19353         headers, memory.h, string.h.
19354         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
19355         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
19356         free.
19357         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
19358         headers.
19359         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
19360         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
19361         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
19362         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
19363         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
19364
19365 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19366
19367         More K&R removal.
19368
19369         * lib/acosl.c (main): Use a prototype.
19370         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
19371         tanl.c: Likewise.
19372
19373         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
19374
19375         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
19376         (getopt, etopt_long, getopt_long_only, _getopt_internal)
19377         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
19378         with a prototype.
19379         * lib/getopt.c (const): Remove macro.
19380         Include <string.h> unconditionally.
19381         (my_index): Remove; all uses changed to strchr.
19382         (strlen): Remove decl.
19383         (exchange): Remove forward decl; no longer needed.
19384         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
19385         Define with prototype.
19386         * lib/getopt1.c (const): Remove macro.
19387         (getopt_long, getopt_long_only, main): Define with prototype.
19388
19389         * lib/getugroups.c: Include <string.h> unconditionally.
19390
19391         * lib/getusershell.c: Include <stdlib.h> unconditionally.
19392         (getusershell, setusershell, endusershell, readname, main):
19393         Define with prototypes.
19394
19395         * lib/group-member.c: Include group-member.h first.
19396         Include <stdlib.h> unconditionally.
19397
19398         * lib/hard-locale.c: Include hard-locale.h first.
19399         Include <stdlib.h>, <string.h> unconditionally.
19400
19401         * lib/hash.c (free, malloc): Remove decls.
19402         Include <stdlib.h> unconditionally.
19403
19404         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
19405         (getenv): Do not declare.
19406
19407         * lib/idcache.c: Include <string.h> unconditionally.
19408
19409         * lib/long-options.c: Include long-options.h first, to test interface.
19410         Include <stdlib.h> unconditionally.
19411
19412         * lib/makepath.c: Include makepath.h first, to test interface.
19413         Include <stdlib.h> and <string.h> unconditionally.
19414
19415         * lib/linebuffer.c: Include <stdlib.h>.
19416         (free): Remove decl.
19417
19418         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
19419         stddef.h. rpl_malloc returns void *, not char *.
19420         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
19421         prototype.
19422
19423         * lib/md5.h: Include <limits.h> unconditionally.
19424         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
19425         (__P): Remove; all uses removed.
19426         * lib/md5.c: Include "md5.h" first.
19427         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
19428         md5_buffer, md5_process_bytes, md5_process_block):
19429         Define with prototypes.
19430         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
19431         * lib/sha.c: Include "sha.h" first.
19432         Include <stdlib.h>, <string.h> unconditionally.
19433
19434         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
19435         * lib/memcmp.c (__ptr_t): Likewise.
19436         * lib/memrchr.c (__ptr_t): Likewise.
19437         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
19438         Include <string.h> unconditionally.
19439         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
19440         * lib/memchr.c: Include <stdlib.h> unconditionally.
19441         * lib/memchr.c (LONG_MAX): Remove.
19442         * lib/memrchr.c (LONG_MAX): Likewise.
19443         * lib/memchr.c (__memchr): Define via a prototype.
19444         * lib/memrchr.c (__memrchr): Likewise.
19445         * lib/memcmp.c (__P): Remove, and remove all uses.
19446         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
19447         Remove forward decls; no longer needed.
19448         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
19449         Use types required by C89 in prototype.
19450
19451         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
19452         * lib/savedir.c: Likewise.
19453         * lib/mkdir.c (free): Remove decl.
19454         * lib/rmdir.c (rmdir): Define with a prototype.
19455         * lib/savedir.c: Include savedir.h first, to test interface.
19456
19457         * lib/mktime.c (STDC_HEADERS): Remove.
19458         Include <stdlib.h>, <string.h> unconditionally.
19459
19460         * lib/modechange.c: Include <stdlib.h> unconditionally.
19461         (malloc): Remove decl.
19462
19463         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
19464         (free): Remove decl.
19465
19466         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
19467         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
19468         (This type really should be intptr_t, but that's a C99ism.)
19469         (_obstack_memcpy): Remove: all uses changed to memcpy.
19470         Include <string.h> unconditionally.
19471         (struct obstack): Assume __STDC__ for types of members
19472         chunkfun, freefun, extra_arg.
19473         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
19474         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
19475         obstack_begin, obstack_specify_allocation,
19476         obstack_specify_allocation_with_arg, obstack_chunkfun,
19477         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
19478         Remove unprototyped decls and the macros that use them.
19479         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
19480         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
19481         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
19482         (defined __STDC__ && __STDC__)]:
19483         Remove nonprototyped code.
19484         Include <stdlib.h> unconditionally.
19485         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
19486         _obstack_allocated_p, _obstack_free, obstack_free,
19487         _obstack_memory_used, print_and_abort):
19488         Define using prototypes.
19489         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
19490         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
19491         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
19492         obstack_next_free, obstack_object_size, obstack_room) [0]:
19493         Remove unused, unprototyped code.
19494
19495         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
19496
19497         * lib/physmem.c (physmem_total, physmem_available, main): Define
19498         with prototypes.
19499
19500         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
19501         (main): Define with a prototype.
19502
19503         * lib/posixver.c (getenv): Remove decl.
19504
19505         * lib/putenv.c (malloc): Returns void *, not char *.
19506         Include <string.h> unconditionally.
19507         (strchr, memcpy, NULL): Do not define.
19508
19509         * lib/readtokens.c: Include readtokens.h first, to test interface.
19510         Include <stdlib.h>, <string.h> unconditionally.
19511         (init_tokenbuffer): Define with a prototype.
19512
19513         * lib/regex.c (PARAMS): Remove.  All uses removed.
19514         All uses of _RE_ARGS removed, too.
19515         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
19516         unconditionally.
19517         (bzero): Assume memset exists.
19518         (memcmp, memcpy, NULL): Remove.
19519         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
19520         char, or assignments to local vars of type signed char.
19521         (init_syntax_once, PREFIX(extract_number_and_incr),
19522         PREFIX(print_partial_compiled_pattern),
19523         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
19524         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
19525         PREFIX(regex_grow_registers), PREFIX(regex_compile),
19526         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
19527         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
19528         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
19529         wcs_compile_range, byte_compile_range, truncate_wchar,
19530         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
19531         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
19532         count_mbs_length, wcs_re_match_2_internal,
19533         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
19534         PREFIX(alt_match_null_string_p),
19535         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
19536         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
19537         regfree, PREFIX(extract_number)): Define with prototype.  Remove
19538         now-unnecessary declaration, if any.
19539         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
19540         regcomp, regexec):
19541         Remove now-unnecessary casts among pointer types.
19542         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
19543
19544         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
19545         (free): Remove decl.
19546
19547         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
19548
19549         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
19550         (free): Remove decl.
19551
19552         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
19553         * lib/xgetcwd.c: Likewise.
19554
19555         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
19556         (free): Remove decl.
19557
19558         * lib/strchrnul.c (strchrnul): Define with a prototype.
19559         Fix bug: c_in was not converted to char before searching.
19560
19561         The following changes are not K&R related:
19562
19563         * lib/group-member.h: Include <sys/types.h>, so that this file is
19564         self-contained.
19565         * lib/makepath.h: Likewise.
19566
19567         * lib/getusershell.c (readname, default_index, line_size, readname):
19568         Use size_t, not int, for sizes.
19569         (readname): If the size overflows, report an error instead of
19570         looping forever.
19571
19572 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19573
19574         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
19575         libc.
19576
19577 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19578
19579         * README: New section: portability guidelines.
19580
19581 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
19582
19583         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
19584         C89 spec.
19585
19586 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
19587
19588         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
19589
19590 2003-09-08  Paul Eggert  <eggert@twinsun.com>
19591
19592         Assume C89 or better; remove K&R cruft.
19593         A few of these changes were first proposed by Derek Robert Price
19594         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
19595
19596         * lib/addext.c: Include <string.h> unconditionally.
19597         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
19598         Don't declare getenv or malloc.
19599
19600         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
19601         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
19602         (NULL): Remove.
19603         (find_stack_direction, alloca): Use prototypes.
19604
19605         * lib/atexit.c (atexit): Define using a prototype.
19606
19607         * lib/basename.c, dirname.c, stripslash.c:
19608         Include <string.h> unconditionally.
19609
19610         * lib/bcopy.c: Include <stddef.h>.
19611         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
19612
19613         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
19614
19615         * lib/error.h (error, error_at_line, error_print_progname)
19616         [! (defined (__STDC__) && __STDC__)]: Remove decls.
19617         * lib/error.c: Include error.h first, to check interface.
19618         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
19619         (VA_START): Remove; all uses changeed to va_start.
19620         (exit, strerror): Remove decls.
19621         (error_print_progname): Prototype uncondionally.
19622         Don't include <errno.h>; no longer needed.
19623         (private_strerror): Remove.
19624         (error_tail): Always define.
19625         (error, error_at_line): Assume C89 or better; always use prototypes.
19626         * lib/fatal.c: Include "fatal.h" first, to test interface.
19627         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
19628         (VA_START): Remove; all uses changed to va_start.
19629         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
19630         this case.
19631         (exit): Remove decl.
19632         (fatal): Prototype unconditionally.  Assume va_start works.
19633         Abort at end, to pacify gcc.
19634
19635         * lib/euidaccess.c (main): Define with a prototype.
19636
19637         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
19638
19639         * lib/exitfail.c: Include <stdlib.h> unconditionally.
19640
19641         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
19642         prototypes.
19643         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
19644         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
19645         (getenv): Remove decl.
19646         (fnmatch): Define using a prototype.
19647         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
19648         (FCT): Define using a prototype.
19649
19650         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
19651
19652         * lib/gethostname.c: Include <stddef.h>.
19653         (gethostname): Define with prototype.  Length is size_t, not int.
19654
19655 2003-09-08  Paul Eggert  <eggert@twinsun.com>
19656
19657         Assume C89 or better; remove K&R cruft.
19658         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
19659         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
19660         string.h, getenv, malloc.
19661         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
19662         headers.
19663         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
19664         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
19665         do not check for strerror.
19666         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
19667         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
19668         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
19669         do not check for doprnt or vprintf.
19670         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
19671         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
19672
19673 2003-09-08  Paul Eggert  <eggert@twinsun.com>
19674
19675         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
19676         getversion.c should have been removed then, but was accidentally
19677         preserved.
19678
19679         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
19680         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
19681
19682 2003-09-08  Karl Berry  <karl@gnu.org>
19683
19684         * config/config.sub, config.guess, srclistvars.sh: update from savannah
19685                 config, forget about prep.
19686
19687         * config/depcomp, missing: update from automake.
19688
19689 2003-09-07  Paul Eggert  <eggert@twinsun.com>
19690
19691         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
19692         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
19693
19694 2003-09-07  Paul Eggert  <eggert@twinsun.com>
19695
19696         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
19697         copy_tm_result.  Bug reported by Simon Josefsson in
19698         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
19699
19700 2003-09-06  Paul Eggert  <eggert@twinsun.com>
19701
19702         * m4/time_r.m4: New file.
19703         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
19704         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
19705         is. Check for timegm declaration.
19706         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
19707         Do not check for gmtime_r.
19708         Replace mktime if __mktime_internal does not exist and if mktime
19709         hasn't been replaced already.
19710
19711 2003-09-06  Paul Eggert  <eggert@twinsun.com>
19712
19713         * lib/time_r.c, lib/time_r.h: New files.
19714
19715         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
19716         __localtime_r.
19717         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
19718         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
19719
19720         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
19721         __gmtime_r.
19722         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
19723         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
19724         Include <time_r.h>.
19725
19726         * lib/timegm.c: Switch to glibc implementation, with the following
19727         changes:
19728         [defined HAVE_CONFIG_H]: Include <config.h>.
19729         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
19730         (__mktime_internal) [!defined _LIBC]: New decl.
19731         (__gmtime_r) [!defined _LIBC]: New macro and function.
19732         (timegm): Use a prototype, since gnulib assumes C89.
19733         Do not bother declaring tmp to be const, as it's not really usefu.
19734         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
19735         (timegm): Declare only if HAVE_DECL_TIMEGM.
19736
19737 2003-09-06  Paul Eggert  <eggert@twinsun.com>
19738
19739         * MODULES.html.sh (func_all_modules): Add time_r.
19740         * modules/time_r: New file.
19741         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
19742         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
19743
19744 2003-09-03  Paul Eggert  <eggert@twinsun.com>
19745
19746         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
19747         Bug reported by Lute Kamstra in
19748         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
19749
19750         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
19751         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
19752         course with correspondingly smaller numbers for tomorrow and
19753         yesterday.  From Tadayoshi Funaba.  Originally installed into
19754         sh-utils on 1999-08-07, but the patch got lost (I guess during the
19755         coreutils merge?).
19756
19757 2003-08-31  Simon Josefsson  <jas@extundo.com>
19758
19759         * modules/timegm: New file.
19760         * MODULES.html.sh (func_all_modules): Add timegm.
19761
19762 2003-08-31  Simon Josefsson  <jas@extundo.com>
19763
19764         * m4/timegm.m4: New file.
19765
19766 2003-08-31  Simon Josefsson  <jas@extundo.com>
19767
19768         * lib/timegm.h: New file.
19769         * lib/timegm.c: New file.  Based on
19770         wget-1.8.2/src/http.c:mktime_from_utc.
19771
19772 2003-08-31  Karl Berry  <karl@gnu.org>
19773
19774         * lib/argp.h: update from libc.
19775
19776 2003-08-28  Bruno Haible  <bruno@clisp.org>
19777
19778         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
19779         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
19780         followed by '#define fnmatch fnmatch_posix' gives an error.
19781
19782 2003-08-28  Bruno Haible  <bruno@clisp.org>
19783
19784         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
19785         warning on QNX, which defines O_BINARY to 000000.
19786
19787 2003-08-27  Jim Meyering  <jim@meyering.net>
19788
19789         * m4/mkstemp.m4: Require that the system mkstemp be able to create
19790         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
19791         would fail after 32.  Reported by Danny Levinson.  Details here:
19792         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
19793
19794 2003-08-24  Bruno Haible  <bruno@clisp.org>
19795
19796         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
19797         MSVC7 <stdio.h> is included later.
19798
19799 2003-08-22  Simon Josefsson  <jas@extundo.com>
19800
19801         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
19802
19803 2003-08-20  Karl Berry  <karl@gnu.org>
19804
19805         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
19806
19807 2003-08-20  Bruno Haible  <bruno@clisp.org>
19808
19809         * modules/progname: New file.
19810         * MODULES.html.sh (func_all_modules): Add progname.
19811
19812 2003-08-20  Bruno Haible  <bruno@clisp.org>
19813
19814         * lib/progname.h: New file, from GNU gettext.
19815         * lib/progname.c: New file, from GNU gettext.
19816         * lib/progreloc.c: New file, from GNU gettext.
19817
19818 2003-08-19  Jim Meyering  <jim@meyering.net>
19819
19820         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
19821         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
19822
19823 2003-08-19  Bruno Haible  <bruno@clisp.org>
19824
19825         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
19826         more.
19827
19828 2003-08-19  Bruno Haible  <bruno@clisp.org>
19829
19830         * lib/xstrdup.c: Assume <string.h> exists.
19831
19832 2003-08-18  Paul Eggert  <eggert@twinsun.com>
19833
19834         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
19835         in makefile rules.
19836
19837 2003-08-18  Jim Meyering  <jim@meyering.net>
19838
19839         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
19840         * m4/lib-ld.m4: Likewise.
19841
19842 2003-08-18  Jim Meyering  <jim@meyering.net>
19843
19844         * lib/setenv.h: Indent nested cpp directive.
19845         * lib/vasnprintf.c: Remove trailing blanks.
19846
19847 2003-08-17  Simon Josefsson  <jas@extundo.com>
19848
19849         * modules/xstrndup: New file.
19850         * MODULES.html.sh (func_all_modules): Add xstrndup.
19851
19852 2003-08-17  Simon Josefsson  <jas@extundo.com>
19853
19854         * modules/argp: Fix autoconf macro name. Add more dependencies.
19855
19856 2003-08-17  Simon Josefsson  <jas@extundo.com>
19857
19858         * m4/xstrndup.m4: New file.
19859
19860 2003-08-17  Simon Josefsson  <jas@extundo.com>
19861
19862         * m4/argp.m4: New file.
19863
19864 2003-08-17  Simon Josefsson  <jas@extundo.com>
19865             Bruno Haible  <bruno@clisp.org>
19866
19867         * lib/xstrndup.h: New file.
19868         * lib/xstrndup.c: New file.
19869
19870 2003-08-17  Bruno Haible  <bruno@clisp.org>
19871
19872         * modules/strndup (Files, Include): Add lib/strndup.h.
19873
19874 2003-08-17  Bruno Haible  <bruno@clisp.org>
19875
19876         * modules/euidaccess (Files): Add lib/euidaccess.h.
19877
19878 2003-08-17  Bruno Haible  <bruno@clisp.org>
19879
19880         * lib/strndup.h: New file.
19881
19882 2003-08-17  Bruno Haible  <bruno@clisp.org>
19883
19884         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
19885         like AC_GNU_SOURCE.
19886         * modules/extensions (configure.ac): Comment out the invocation of
19887         gl_USE_SYSTEM_EXTENSIONS.
19888
19889 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19890
19891         Merges from coreutils, etc.
19892         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
19893         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
19894         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
19895         fixing a typo.
19896         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
19897         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
19898
19899 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19900
19901         Document merge from coreutils.
19902         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
19903         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
19904         * modules/utime: Add m4/utimes-null.m4.
19905
19906 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19907
19908         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
19909         space, undoing this 2003-08-12 change:
19910         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
19911
19912 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19913
19914         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
19915         strtoul.c from libc, undoing this 2003-08-12 change:
19916         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
19917
19918 2003-08-16  Jim Meyering  <jim@meyering.net>
19919
19920         Merges from coreutils.
19921         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
19922         prefix.  Adjust cache variables similarly.  Create 500 rather than
19923         just 300 files, to exercise bug on Darwin6.5, too.
19924         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
19925         $missing_dir.
19926         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
19927         AM_SYS_POSIX_TERMIOS.
19928         Reported by mkc@mathdogs.com.
19929         Also change use of $am_cv_sys_posix_termios
19930         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
19931         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
19932         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
19933         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
19934         in /proc/mounts until it finds one with matching device number.  This
19935         is unnecessary when the FILE argument *is* a mount point.  No stat call
19936         is necessary in that case.  So, disable the statvfs-testing code on
19937         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
19938         as RedHat bug# 84846.
19939         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
19940         to 1MB, so as not to render systems with no stack size limit (e.g.,
19941         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
19942         Include <unistd.h>.  On some systems,
19943         it is required for the definition of _SC_PAGESIZE.
19944
19945 2003-08-16  Jim Meyering  <jim@meyering.net>
19946
19947         Merge from coreutils.
19948         * lib/xstrtoimax.c: #else #if -> #elif.
19949         * lib/xstrtoumax.c: Likewise.
19950
19951 2003-08-16  Jim Meyering  <jim@meyering.net>
19952
19953         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
19954         * m4/utimes.m4: Removed.
19955         * m4/utimes-null.m4: Renamed from utimes.m4.
19956
19957         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
19958         to 1MB, so as not to render systems with no stack size limit (e.g.,
19959         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
19960         Include <unistd.h>.  On some systems,
19961         it is required for the definition of _SC_PAGESIZE.
19962
19963 2003-08-16  Jim Meyering  <jim@meyering.net>
19964         and Paul Eggert  <eggert@cs.ucla.edu>
19965
19966         Merges from coreutils, etc.
19967
19968         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
19969         using the latest version from cvs.  This avoids problems with #line
19970         directives using a vendor (Sun) compiler.
19971         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
19972         Don't set GETGROUPS_LIB here; now it's
19973         done via getgroups.m4's wrapper function.
19974         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
19975         rather than just in sh-util/configure.in, so that the
19976         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
19977         same.
19978         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
19979         AC_FUNC_GETLOADAVG where to find getloadavg.c.
19980         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
19981         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
19982         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
19983         Remove code that is now done by the newly-required macros.
19984         Append $(EXEEXT) to DF_PROG.
19985         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
19986         Do not invoke or require the following here,
19987         since prereq.m4 or some gnulib .m4 now does this for us:
19988         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
19989         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
19990         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
19991         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
19992         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
19993         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
19994         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
19995         AC_FUNC_OBSTACK.
19996         Do not replace the following functions, as this is now the job
19997         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
19998         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
19999         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
20000         atexit getpass, strdup, getpagesize.
20001         Replace 'raise'.
20002         Do not check for the following functions, as this is now the job
20003         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
20004         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
20005         setregid.
20006         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
20007         Check for sys/sysctl.h.
20008         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
20009         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
20010         of checking for ssize_t ourselves.
20011
20012         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
20013         Require every macro that gnulib/modules/* suggests for us.
20014         (jm_PREREQ_ADDEXT): New macro.
20015         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
20016         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
20017
20018         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
20019         (gl_PHYSMEM): Use it.
20020         Also check for `table' function.
20021         Check for new headers and functions.
20022         Add check for sys/sysmp.h.
20023         With suggestions from Kaveh Ghazi.
20024         Ignore headers that are present but cannot be compiled.  This
20025         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
20026         C 5.4.
20027
20028 2003-08-15  Paul Eggert  <eggert@twinsun.com>
20029
20030         Document merge from coreutils.
20031         * modules/userspec: Depend on posixver.
20032         * modules/strftime: Depend on tzset.
20033
20034 2003-08-15  Paul Eggert  <eggert@twinsun.com>
20035
20036         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
20037         rather than tab, after '#' in shell-script copyright notices.
20038         Suggested by Bruno Haible.
20039
20040 2003-08-15  Paul Eggert  <eggert@twinsun.com>
20041
20042         * config/srclist-update: Use three spaces, rather than tab, after '#'
20043         in shell-script copyright notices.  Suggested by Bruno Haible.
20044         Remove unnecessary parenthesization in regular expression.
20045
20046 2003-08-15  Jim Meyering  <jim@meyering.net>
20047
20048         Merge from coreutils.
20049         * lib/xgethostname.c: Include <stdlib.h>.
20050         (xghostname): Don't exit for anything other than memory-related
20051         failure; just return NULL.
20052         * lib/userspec.c: Include "posixver.h".
20053         (parse_user_spec): Accept `.' as a separator only
20054         in pre-POSIX-200112 mode.
20055         * lib/strtoimax.c: Use #elif rather than #else #if.
20056         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
20057         Remove function, now that we can rely on a working tzset function.
20058         [!_LIBC]: Ensure that the required autoconf test has been run.
20059         [!defined _NL_CURRENT && HAVE_STRFTIME]:
20060         Use underlying_strftime for %r.
20061         * lib/sha.c: Merge in some clean-up and optimization changes from
20062         glibc.
20063         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
20064         Ensure that it is a multiple of 64.
20065         Rearrange loop exit tests so as to avoid performing an
20066         additional fread after encountering an error or EOF.
20067         * lib/realloc.c: Update copyright date.
20068
20069 2003-08-15  Jim Meyering  <jim@meyering.net>
20070         and Paul Eggert  <eggert@twinsun.com>
20071
20072         Merge from coreutils.
20073         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
20074         member but strut utmpx does not.  Needed for AIX 4.3.3.
20075         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
20076
20077 2003-08-15  Jim Meyering  <jim@meyering.net>
20078         and Paul Eggert  <eggert@cs.ucla.edu>
20079
20080         Merges from coreutils, etc.
20081         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
20082         Require gl_FUNC_TZSET_CLOBBER.
20083         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
20084         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
20085         members.
20086
20087 2003-08-14  Paul Eggert  <eggert@twinsun.com>
20088
20089         Help the merge from coreutils.
20090         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
20091         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
20092         * m4/tzset.m4: Use it too.
20093
20094 2003-08-14  Paul Eggert  <eggert@twinsun.com>
20095
20096         * modules/tzset: New file.
20097
20098 2003-08-14  Jim Meyering  <jim@meyering.net>
20099
20100         Merges from coreutils.
20101         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
20102         variable names, rather than @FNMATCH_H@.
20103         * modules/alloca: Likewise for $(ALLOCA_H).
20104
20105         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
20106         the three copies of the literal target, `fnmatch.h'.
20107         * modules/alloca (alloca.h): Likewise.
20108
20109 2003-08-14  Jim Meyering  <jim@meyering.net>
20110
20111         Merge from coreutils.
20112         * m4/tzset.m4: New file.
20113         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
20114         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
20115         otherwise, AIX 5.1 systems would end up using the latter.
20116         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
20117         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
20118         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
20119         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
20120
20121 2003-08-14  Jim Meyering  <jim@meyering.net>
20122
20123         Merge from coreutils.
20124         * lib/obstack.h: Whitespace changes.
20125         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
20126         and xcalloc return values.
20127         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
20128         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
20129         hang on OSF/1 5.1 for DIR on both local and remote file systems.
20130         Reported by (and fix confirmed by) Nelson H. F. Beebe.
20131         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
20132         error from mntctl.
20133         Use mntctl's return value to drive the entry-processing loop, since
20134         we can't rely on the value of the vmt_length member in the last
20135         entry.  On some systems doing so could result in exhausting
20136         virtual memory.  Based in part on a patch from Mike Jetzer.
20137
20138 2003-08-14  Jim Meyering  <jim@meyering.net>
20139         and Paul Eggert  <eggert@twinsun.com>
20140
20141         Merges from coreutils, plus other fixes.
20142         * lib/physmem.c: Merge in portability changes from gcc/libiberty
20143         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
20144         for credits and details.  Thanks to Kaveh Ghazi for helping
20145         to keep these files in sync.
20146         (ARRAY_SIZE): Define it.
20147         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
20148         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
20149         (memcasecmp): Don't assume size_t fits in unsigned int.
20150         Remove casts and duplicate code.
20151         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
20152         (memcpy): Remove definition.
20153         Merge in some clean-up and optimization changes from glibc.
20154         [BLOCKSIZE]: Move definition to top of file.
20155         Ensure that it is a multiple of 64.
20156         Rearrange loop exit tests so as to avoid performing an
20157         additional fread after encountering an error or EOF.
20158         * lib/md5.h (md5_uintptr): Define.
20159         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
20160         return to the initial working directory.  Preserve errno
20161         for caller.
20162         * lib/idcache.c: Include "xalloc.h".
20163         (xmalloc, xrealloc): Remove decls.
20164         (getuser): Remove casts no longer required in C89.
20165         * lib/human.c: Include stdio.h, for sprintf.
20166         * lib/group-member.c: Include "xalloc.h".
20167         (xmalloc, xrealloc): Remove decls.
20168         (get_group_info): Remove casts no longer required in C89.
20169         * lib/getusershell.c (readname): Remove casts no longer required in
20170         C89.
20171         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
20172         * lib/getline.c: Whitespace fix, from coreutils.
20173
20174 2003-08-13  Paul Eggert  <eggert@twinsun.com>
20175
20176         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
20177         Check for isascii.
20178
20179         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
20180         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
20181         Undo previous (whitespace-only) change.
20182
20183 2003-08-13  Paul Eggert  <eggert@twinsun.com>
20184
20185         * lib/exclude.c: Include <ctype.h>
20186         (IN_CTYPE_DOMAIN): New macro.
20187         (is_space): New fn.
20188         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
20189         and empty lines.
20190
20191         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
20192         Undo previous (whitespace-only) change.
20193
20194 2003-08-13  Paul Eggert  <eggert@twinsun.com>
20195
20196         * config/srclist-update: Change update back to the old behavior,
20197         leaving whitespace alone.  Use one 'sed' command rather than a
20198         pipeline.
20199         (fixlicense): Now a variable, not a function.
20200         (remove_trailing_blanks): Remove.
20201         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
20202         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
20203         Undo previous (whitespace-only) change.
20204
20205 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20206
20207         Merge from coreutils.
20208         * modules/euidaccess: Add lib_SOURCES, include for new
20209         file euidaccess.h
20210
20211 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20212
20213         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
20214         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
20215         Normalize leading white space and remove trailing white space.
20216
20217         Merge from coreutils
20218         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
20219
20220         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
20221         0.12.1.  These files are now being upgraded automatically by
20222         ../config/srclist-update.
20223
20224 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20225
20226         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
20227         Normalize leading white space and remove trailing white space.
20228         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
20229         notice, as per ../config/srclist-update.
20230
20231         Merge from coreutils.
20232         * lib/euidaccess.h: New file.
20233         * lib/euidaccess.c: Include it.
20234         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
20235         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
20236         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
20237
20238 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20239
20240         * config/srclist-update: Add copyright notice.
20241         (remove_id_lines, remove_trailing_blanks): New constants.
20242         (fixfile): Use them to normalize spacing a bit in copied files.
20243         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
20244         Normalize leading white space and remove trailing white space.
20245
20246         * config/texinfo.tex: Sync with texinfo.
20247
20248         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
20249         strtoul.c from libc, to merge coreutils whitespace changes.
20250
20251         * config/srclist.txt: Get the following m4 files from gettext:
20252         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
20253         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
20254         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
20255         wint_t.m4.
20256
20257 2003-08-12  Karl Berry  <karl@gnu.org>
20258
20259         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
20260         been made.
20261
20262 2003-08-11  Paul Eggert  <eggert@twinsun.com>
20263
20264         * modules/gnu-source, m4/gnu-source.m4:
20265         Remove; we're assuming Autoconf 2.54 or later now.
20266         Suggested by Bruno Haible.
20267         * MODULES.html.sh (func_all_modules): Remove gnu-source.
20268
20269 2003-08-11  Bruno Haible  <bruno@clisp.org>
20270
20271         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
20272
20273 2003-08-11  Bruno Haible  <bruno@clisp.org>
20274
20275         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
20276         (vasnprintf): Use it instead of wcslen.
20277
20278 2003-08-11  Bruno Haible  <bruno@clisp.org>
20279
20280         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
20281         value to ensure that _Bool promotes to int. Use #define for _Bool when
20282         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
20283
20284 2003-08-10  Karl Berry  <karl@gnu.org>
20285
20286         * lib/regex.h: update from libc (whitespace fix).
20287
20288 2003-08-09  Paul Eggert  <eggert@twinsun.com>
20289
20290         Merge some files from coreutils.  These changes were
20291         originally made by Jim Meyering.
20292         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
20293         many older Unixes require this.
20294         * lib/alloca.c (alloca): Remove cast to argument of free;
20295         no longer needed in C89.
20296         * lib/alloca_.h, regex.h: Fix white space to match
20297         what GNU indent does.
20298
20299 2003-08-09  Paul Eggert  <eggert@twinsun.com>
20300
20301         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
20302         apparently Emacs's Unicode mode got confused before my 2003-08-05
20303         checkin.
20304
20305 2003-08-08  Paul Eggert  <eggert@twinsun.com>
20306
20307         * m4/extensions.m4: New file.
20308         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
20309         Require gl_USE_SYSTEM_EXTENSIONS.
20310         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
20311         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
20312
20313 2003-08-08  Paul Eggert  <eggert@twinsun.com>
20314
20315         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
20316         * modules/extensions, modules/gnu-source: New files.
20317         * modules/timespec, modules/unlocked-io: Depend on extensions.
20318
20319 2003-08-07  Paul Eggert  <eggert@twinsun.com>
20320
20321         * modules/restrict: New file.
20322         * MODULES.html.sh (func_all_modules): Add restrict.
20323         * modules/regex: Depend on restrict.
20324
20325 2003-08-07  Paul Eggert  <eggert@twinsun.com>
20326
20327         * m4/restrict.m4: New file.
20328         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
20329
20330 2003-08-07  Bruno Haible  <bruno@clisp.org>
20331
20332         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
20333         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
20334
20335 2003-08-07  Bruno Haible  <bruno@clisp.org>
20336
20337         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
20338         makes the module 'getndelim2' compatible with the module 'getline'.
20339
20340 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20341
20342         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
20343         byte with "\201" to avoid glitches when editing that source file
20344         with multi-gnome-terminal.
20345
20346 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20347
20348         * lib/bumpalloc.h: Remove.
20349
20350 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20351
20352         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
20353         * modules/bumpalloc: Remove.
20354
20355 2003-08-04  Paul Eggert  <eggert@twinsun.com>
20356
20357         * lib/getloadavg.c: Change copyright notice and spacing to conform to
20358         GNU coding style.
20359
20360         Merge from coreutils.
20361         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
20362         1. From glibc.
20363         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
20364         from Karl Berry, implemented by Jim Meyering.
20365         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
20366         from Dmitry V. Levin.
20367         Remove anachronistic cast of xrealloc.
20368         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
20369         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
20370         type. Otherwise, it wouldn't compile with at least /bin/cc on
20371         ymp-cray-unicos9.0.2.X.
20372         Combine two mostly-identical uses of alloca into one.
20373         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
20374
20375 2003-08-04  Dave Love  <d.love@dl.ac.uk>
20376
20377         [From Emacs.]
20378
20379         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
20380         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
20381         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
20382         obsolete NLIST_NAME_UNION.
20383         [__GNU__]: Undef BSD and FSCALE.
20384         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
20385
20386 2003-08-03  Paul Eggert  <eggert@twinsun.com>
20387
20388         * lib/stdbool_.h (_Bool): Make it signed char, instead of
20389         an enum type, so that it's guaranteed to promote to int.  See:
20390         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
20391
20392 2003-08-03  Karl Berry  <karl@gnu.org>
20393
20394         * config/depcomp: update from automake.
20395
20396 2003-07-31  Paul Eggert  <eggert@twinsun.com>
20397
20398         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
20399         (strerror): Don't assume that a printable int fits in 14 bytes.
20400
20401 2003-07-31  Bruno Haible  <bruno@clisp.org>
20402
20403         * modules/getpass-gnu: New file.
20404         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
20405
20406 2003-07-31  Bruno Haible  <bruno@clisp.org>
20407
20408         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
20409
20410 2003-07-24  Karl Berry  <karl@gnu.org>
20411
20412         * config/missing: update from automake.
20413
20414 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
20415             Bruno Haible  <bruno@clisp.org>
20416
20417         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
20418         * lib/getline.c (getline, getdelim): Likewise.
20419         Remove _GNU_SOURCE define; now it's defined in config.h through
20420         m4/getline.m4.
20421
20422 2003-07-23  Karl Berry  <karl@gnu.org>
20423
20424         * config/config.sub: update from prep.
20425
20426 2003-07-22  Paul Eggert  <eggert@twinsun.com>
20427
20428         * modules/xalloc (Depends-on): Add exitfail.
20429         * modules/xmemcoll: Likewise.
20430
20431 2003-07-22  Paul Eggert  <eggert@twinsun.com>
20432
20433         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
20434         over-parenthesization in macros.
20435
20436         Sync with coreutils.
20437
20438         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
20439         required by C99.
20440
20441         Use `exit_failure' for xalloc and xmemcoll instead of their own
20442         private exit-failure variables.
20443         * lib/xalloc.h (xalloc_exit_failure): Remove.
20444         * lib/xmalloc.c: Likewise.  Include exitfail.h.
20445         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
20446         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
20447         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
20448         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
20449
20450 2003-07-20  Jim Meyering  <jim@meyering.net>
20451
20452         * modules/closeout (Depends-on): Add exitfail.
20453         Suggestion from Bruno Haible.
20454
20455 2003-07-19  Karl Berry  <karl@gnu.org>
20456
20457         * config/config.sub: update from prep.
20458
20459 2003-07-18  Paul Eggert  <eggert@twinsun.com>
20460
20461         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
20462         Remove.
20463         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
20464         to test that it can stand by itself.  Include "exitfail.h".
20465         Clients should set exit_failure instead.
20466         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
20467
20468 2003-07-18  Bruno Haible  <bruno@clisp.org>
20469
20470         * modules/getndelim2: New file.
20471         * modules/getline: Share files with module getndelim2.
20472         * modules/getnline: Depend on getndelim2 instead of sharing files with
20473         it. Add getnline.c to lib_SOURCES.
20474         * MODULES.html.sh (func_all_modules): Add getndelim2.
20475
20476 2003-07-18  Bruno Haible  <bruno@clisp.org>
20477
20478         * m4/getndelim2.m4: New file.
20479         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
20480         invoke gl_PREREQ_GETNDELIM2.
20481         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
20482         gl_PREREQ_GETNDELIM2.
20483         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
20484         gl_GETNDELIM2.
20485
20486 2003-07-18  Bruno Haible  <bruno@clisp.org>
20487
20488         * lib/getndelim2.h: New file.
20489         * lib/getndelim2.c: Make into a module of its own. Include config.h,
20490         getndelim2.h.
20491         (getndelim2): Make non-static. Change return type to ssize_t.
20492         * lib/getline.h: Change argument names.
20493         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
20494         * lib/getnline.c: Include getndelim2.h.
20495
20496 2003-07-18  Andreas Schwab  <schwab@suse.de>
20497
20498         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
20499
20500 2003-07-17  Karl Berry  <karl@gnu.org>
20501
20502         * config/config.sub: update from prep.
20503
20504 2003-07-17  Bruno Haible  <bruno@clisp.org>
20505
20506         * modules/getnline: New file.
20507         * modules/getline: Add lib/getndelim2.c to source file list.
20508         * MODULES.html.sh (func_all_modules): Add getnline.
20509
20510 2003-07-17  Bruno Haible  <bruno@clisp.org>
20511
20512         * m4/getnline.m4: New file.
20513
20514 2003-07-17  Bruno Haible  <bruno@clisp.org>
20515
20516         * m4/Makefile.am.in: Remove file.
20517         * m4/Makefile.am: Remove file.
20518         * m4/Makefile.in: Remove file.
20519
20520 2003-07-17  Bruno Haible  <bruno@clisp.org>
20521
20522         * lib/getnline.h: New file.
20523         * lib/getnline.c: New file.
20524         * lib/getndelim2.c: New file, extracted from getline.c.
20525         (getndelim2): Renamed from getdelim2, with added nmax argument.
20526         * lib/getline.c: Include getndelim2.c.
20527         (getdelim2): Moved out to getndelim2.c.
20528         (getline, getdelim): Update.
20529
20530 2003-07-17  Bruno Haible  <bruno@clisp.org>
20531
20532         * lib/Makefile.am: Remove file.
20533         * lib/Makefile.in: Remove file.
20534
20535 2003-07-17  Bruno Haible  <bruno@clisp.org>
20536
20537         * configure.in: Remove file.
20538         * Makefile.in: Remove file.
20539
20540 2003-07-17  Bruno Haible  <bruno@clisp.org>
20541
20542         * MODULES.html.sh: Put the </BODY> right before </HTML>.
20543
20544 2003-07-16  Karl Berry  <karl@gnu.org>
20545
20546         * config/srclist-update: was running fixlicense twice, which caused
20547                 texinfo.tex to be nullified for some reason.  Simplify,
20548                 $gplsrc is no longer needed as far as I can see?
20549
20550 2003-07-16  Jim Meyering  <jim@meyering.net>
20551
20552         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
20553
20554 2003-07-15  Paul Eggert  <eggert@twinsun.com>
20555
20556         * config/srclist.txt: Get the following files from gettext-runtime/intl
20557         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
20558         ref-del.sin.  From Bruno Haible.
20559         * config/srclist-update (fixfile): Change grep pattern again, since the
20560         previous fix didn't work (there was another trailing $).  Use
20561         '[$]' to escape the $s.
20562
20563 2003-07-15  Karl Berry  <karl@gnu.org>
20564
20565         * lib/vasnprintf.c: update from gettext.
20566
20567 2003-07-15  Karl Berry  <karl@gnu.org>
20568
20569         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
20570         gets expanded when surrounded by '$'.
20571
20572 2003-07-15  Jim Meyering  <jim@meyering.net>
20573
20574         * modules/save-cwd: Don't depend on error.  From Derek Price.
20575
20576 2003-07-15  Jim Meyering  <jim@meyering.net>
20577
20578         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
20579
20580 2003-07-14  Simon Josefsson  <jas@extundo.com>
20581
20582         * modules/mempcpy: New file.
20583         * MODULES.html.sh (func_all_modules): Add mempcpy.
20584
20585 2003-07-14  Simon Josefsson  <jas@extundo.com>
20586
20587         * m4/mempcpy.m4: New file.
20588
20589 2003-07-14  Simon Josefsson  <jas@extundo.com>
20590
20591         * lib/mempcpy.h: New file.
20592         * lib/mempcpy.c: New file.
20593
20594 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20595
20596         * modules/getdate, modules/posixtm: Depend on mktime.
20597
20598 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20599
20600         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
20601         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
20602         unicodeio.c, unicodeio.h, unlocked-io.h:
20603         Switch from LGPL to GPL.
20604
20605 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20606
20607         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
20608         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
20609         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
20610         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
20611         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
20612         updated automatically by ../config/srclist-update.  This changes
20613         their license from LPGL to GPL.
20614
20615 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20616
20617         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
20618         assumed to refer to the root of the most recent stable gettext version.
20619         * config/srclistvars.sh: Add defaults for eggert.
20620         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
20621         Match "This program" as well as "The program".  This is needed
20622         for gettext.
20623
20624 2003-07-14  Jim Meyering  <jim@meyering.net>
20625
20626         Don't emit diagnostics.  Let callers do that.
20627         * lib/save-cwd.c: Don't include "error.h".
20628         (save_cwd): Don't call error.  Ensure that errno is valid
20629         when returning nonzero.
20630
20631         * lib/save-cwd.h (restore_cwd): Update prototype.
20632         * lib/save-cwd.c (restore_cwd): Remove two parameters.
20633         Simplify.  Don't call error upon failure.  Let callers do that.
20634         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
20635         when auditing is enabled.  But don't bother updating the #if.
20636
20637 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
20638
20639         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
20640         it breaks C++ compilation.
20641         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
20642
20643 2003-07-10  Simon Josefsson  <jas@extundo.com>
20644
20645         * modules/strchrnul (Makefile.am): Add strchrnul.h.
20646
20647 2003-07-10  Jim Meyering  <jim@meyering.net>
20648
20649         * m4/clock_time.m4: Remove trailing blank.
20650         * m4/intmax_t.m4: Likewise.
20651
20652 2003-07-10  Jim Meyering  <jim@meyering.net>
20653
20654         * lib/vasnprintf.c: Remove trailing blanks.
20655         Make cpp indentation consistent.
20656
20657 2003-07-09  Paul Eggert  <eggert@twinsun.com>
20658
20659         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
20660         posixver.c, strftime.c, strnlen.c, strverscmp.c:
20661         Switch from LGPL to GPL.
20662
20663 2003-07-09  Paul Eggert  <eggert@twinsun.com>
20664
20665         * config/srclist.txt: Sort sublists.  Add
20666         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
20667         that differ from gnulib for one reason or another; we'd like this list
20668         to be smaller but for now let's document what we have.
20669
20670 2003-07-08  Paul Eggert  <eggert@twinsun.com>
20671
20672         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
20673         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
20674         and sweeter "eval x=$x".
20675         * config/srclist.txt: Get lib/argp* from glibc.
20676
20677 2003-07-07  Paul Eggert  <eggert@twinsun.com>
20678
20679         * lib/mktime.c: Fix some boundary cases and remove need for floating
20680         point.
20681
20682         Issue a compile-time diagnostic if time_t is floating point, or if
20683         two's complement arithmetic is not in effect, or if arithmetic
20684         right shift does not propagate the sign.  These assumptions were
20685         all in the original code but they weren't checked.
20686
20687         (TIME_T_MIDPOINT, verify): New macros.
20688         (__isleap): Remove; it has integer overflow problems.
20689         (leapyear): New function, without those problems.
20690         (ydhms_tm_diff): Remove; splitting into two parts.
20691         (ydhms_diff): New function, containing the arithmetic part of
20692         the old ydhms_tm_diff function.  Issue a compile-time
20693         diagnostic if we are not using C99 integer division.
20694         Avoid casts when possible.
20695         (guess_time_tm): New function, containing the checking part of
20696         the old ydhms_tm_diff function.  Return the new value, rather than
20697         the difference between it and the old.  Accept a new argument T
20698         so that *T specifies the old value.  Check for overflow in the result.
20699
20700         (__mktime_internal): Use a time_t offset, not a long int offset.
20701         This undoes the 2003-06-04 change, which is no longer needed now
20702         that we have better overflow checking.
20703         (localtime_offset): Likewise.
20704
20705         (__mktime_internal): Avoid harmful overflow on hosts where time_t
20706         and long are 64-bit but int is only 32-bit.
20707         (ydhms_diff): Use long int to store year1 and yday1.
20708         Issue a compile-time diagnostic if long int is not wide enough.
20709
20710         (__mktime_internal): Use long int to store adjusted year and yday.
20711         Use plain C rather than preprocessor commands, if that doesn't
20712         affect efficiency.
20713         Check for overflow (and try to repair) after each probe
20714         rather than checking only at the very end.  This avoids some bugs
20715         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
20716         does not equal GMT offset at maximum time).
20717         Use integer to check for overflow rather than floating point; this
20718         is more portable to non-IEEE hosts, and is a tad faster.
20719         When we detect that we are oscillating between two values,
20720         don't check whether tm_isdst has the requested value, since
20721         we already know the answer.  When tm_isdst has the wrong value,
20722         use a different heuristic to find the right one, based on the
20723         extreme values actually observed in practice in tz2003a,
20724         rather than the (overly optimistic) "previous 3 calendar quarters".
20725
20726         (not_equal_tm, print_tm, check_result): Use "const T" rather than
20727         "T const" to accommodate glibc style.
20728         (check_result): Use less-confusing report format.  "long" -> "long int.
20729         (main): Likewise.
20730         Don't loop if the iteration overflows time_t.
20731         Allow a negative step in the iteration.
20732
20733 2003-07-06  Karl Berry  <karl@gnu.org>
20734
20735         * config/depcomp: update from automake.
20736         * config/config.sub: update from prep.
20737
20738 2003-07-03  Karl Berry  <karl@gnu.org>
20739
20740         * config/config.guess: update from prep.
20741
20742 2003-07-01  Paul Eggert  <eggert@twinsun.com>
20743
20744         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
20745         xreadlink.c now includes it unconditionally.
20746
20747 2003-07-01  Paul Eggert  <eggert@twinsun.com>
20748
20749         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
20750         having it depend on HAVE_SYS_TYPES_H.
20751
20752 2003-07-01  Bruno Haible  <bruno@clisp.org>
20753
20754         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
20755         <sys/types.h> should be sufficient.
20756         Reported by Paul Eggert.
20757
20758 2003-06-26  Karl Berry  <karl@gnu.org>
20759
20760         * config/depcomp: update from automake.
20761
20762 2003-06-26  Bruno Haible  <bruno@clisp.org>
20763
20764         * modules/human: Depend on module stdbool.
20765
20766 2003-06-25  Bruno Haible  <bruno@clisp.org>
20767
20768         * modules/readlink: New file.
20769         * modules/xreadlink: Depend on it.
20770         * MODULES.html.sh (func_all_modules): Add readlink.
20771
20772 2003-06-25  Bruno Haible  <bruno@clisp.org>
20773
20774         * m4/readlink.m4: New file.
20775
20776 2003-06-25  Bruno Haible  <bruno@clisp.org>
20777
20778         * lib/readlink.c: New file.
20779
20780 2003-06-22  Karl Berry  <karl@gnu.org>
20781
20782         * config/srclist.txt: update mkinstalldirs from automake.
20783         * config/mkinstalldirs: update.
20784
20785 2003-06-22  Bruno Haible  <bruno@clisp.org>
20786
20787         Portability to mingw32.
20788         * m4/ssize_t.m4: New file, from GNU gettext.
20789         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
20790         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
20791
20792 2003-06-22  Bruno Haible  <bruno@clisp.org>
20793
20794         * modules/safe-read: Add m4/ssize_t.m4.
20795         * modules/xreadlink: Add m4/ssize_t.m4.
20796
20797 2003-06-20  Bruno Haible  <bruno@clisp.org>
20798
20799         Assume C89, so PARAMS isn't needed.
20800         * lib/unicodeio.h (PARAMS): Remove.
20801         * lib/unicodeio.c: Don't use PARAMS.
20802
20803 2003-06-18  Karl Berry  <karl@gnu.org>
20804
20805         * config/config.{guess,sub}: update from prep.
20806
20807 2003-06-18  Jim Meyering  <jim@meyering.net>
20808
20809         Merge changes from coreutils.
20810         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
20811         Remove explicit declarations of xmalloc and realloc.
20812         Include xalloc.h.
20813         (read_utmp): Remove anachronistic cast of xmalloc.
20814
20815 2003-06-17  Paul Eggert  <eggert@twinsun.com>
20816
20817         Assume C89, so PARAMS isn't needed.
20818         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
20819         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
20820         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
20821         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
20822         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
20823         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
20824         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
20825         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
20826         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
20827         lib/xstrtod.h, lib/xstrtol.h: Likewise.
20828         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
20829         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
20830         no longer needed. Anyway, config.h should always be included before any
20831         other file.
20832
20833 2003-06-11  Simon Josefsson  <jas@extundo.com>
20834
20835         * modules/sysexits: New file.
20836         * MODULES.html.sh (func_all_modules): Add sysexits.
20837
20838 2003-06-11  Simon Josefsson  <jas@extundo.com>
20839
20840         * lib/sysexit_.h: New file.
20841
20842 2003-06-11  Derek Price  <derek@ximbiot.com>
20843
20844         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
20845         necessary.
20846
20847 2003-06-11  Bruno Haible  <bruno@clisp.org>
20848
20849         * m4/sysexits.m4: New file.
20850
20851 2003-06-10  Simon Josefsson  <jas@extundo.com>
20852
20853         * lib/argp.h: New file, from glibc.
20854         * lib/argp-ba.c: New file, from glibc.
20855         * lib/argp-eexst.c: New file, from glibc.
20856         * lib/argp-fmtstream.c: New file, from glibc.
20857         * lib/argp-fmtstream.h: New file, from glibc.
20858         * lib/argp-fs-xinl.c: New file, from glibc.
20859         * lib/argp-help.c: New file, from glibc.
20860         * lib/argp-namefrob.h: New file, from glibc.
20861         * lib/argp-parse.c: New file, from glibc.
20862         * lib/argp-pv.c: New file, from glibc.
20863         * lib/argp-pvh.c: New file, from glibc.
20864         * lib/argp-xinl.c: New file, from glibc.
20865
20866 2003-06-10  Simon Josefsson  <jas@extundo.com>
20867
20868         * modules/strchrnul: New file.
20869
20870 2003-06-10  Simon Josefsson  <jas@extundo.com>
20871
20872         * modules/argp: New file.
20873
20874 2003-06-10  Simon Josefsson  <jas@extundo.com>
20875
20876         * m4/strchrnul.m4: New file.
20877
20878 2003-06-10  Simon Josefsson  <jas@extundo.com>
20879
20880         * lib/strchrnul.h: New file.
20881         * lib/strchrnul.c: New file.
20882
20883 2003-06-10  Bruno Haible  <bruno@clisp.org>
20884
20885         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
20886
20887 2003-06-07  Karl Berry  <karl@gnu.org>
20888
20889         * config/config.{guess,sub}: update from prep.
20890
20891 2003-06-07  Jim Meyering  <jim@meyering.net>
20892
20893         * modules/strtod: Use $(...) notation, not @...@ for
20894         AC_REPLACE'd variables.
20895         * modules/localcharset: Likewise.
20896
20897 2003-06-07  Jim Meyering  <jim@meyering.net>
20898
20899         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
20900         in place of my name in the copyright comment.
20901         Remove definition and uses of __P.
20902
20903         From coreutils.
20904         * lib/stat.c: Don't declare xmalloc explicitly.
20905         Instead, include "xalloc.h".
20906         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
20907         xrealloc, and xcalloc return values.
20908         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
20909         Improve comment.
20910         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
20911
20912 2003-06-07  Bruno Haible  <bruno@clisp.org>
20913
20914         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
20915         avoid AC_CONFIG_LINKS.
20916         * modules/fnmatch (Makefile.am): Use explicit creation rule for
20917         fnmatch.h, to avoid AC_CONFIG_LINKS.
20918         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
20919
20920 2003-06-07  Bruno Haible  <bruno@clisp.org>
20921
20922         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
20923         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
20924         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
20925         directory.
20926         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
20927         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
20928         directory.
20929
20930 2003-06-06  Jim Meyering  <jim@meyering.net>
20931
20932         Merge from coreutils.
20933         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
20934         Consolidate declarations and initializations of *_base* locals.
20935
20936         Merge from coreutils.
20937         This avoids a core dump on systems without GNU putenv,
20938         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
20939         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
20940         (unsetenv): New static function, from GNU libc.
20941         (rpl_putenv): Use it.
20942
20943         * lib/modechange.c: Remove trailing blanks.
20944
20945         Merge from coreutils.
20946         * lib/fsusage.c: Remove declaration of statfs.
20947         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
20948
20949         * lib/posixtm.c: Include <stdbool.h> unconditionally.
20950
20951 2003-06-06  Jim Meyering  <jim@meyering.net>
20952
20953         * lib/stdbool_.h: Renamed from stdbool.h.in.
20954
20955 2003-06-06  Jim Meyering  <jim@meyering.net>
20956             Bruno Haible  <bruno@clisp.org>
20957
20958         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
20959         Adjust Makefile.am snippet not to redirect directly to target.
20960         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
20961
20962 2003-06-05  Paul Eggert  <eggert@twinsun.com>
20963
20964         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
20965         mismatch, look in future quarters as well as past.  This fixes a
20966         bug when processing fall-backwards gaps immediately after a long
20967         period of daylight-saving time.
20968
20969         * lib/mktime.c: Assume freestanding C89 or better.
20970         (HAVE_LIMITS_H): Remove.  Assume it's 1.
20971         (__P): Remove; not used.
20972         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
20973         (mktime, not_equal_tm, print_tm, check_result,
20974         main): Use prototypes.  Use const * where appropriate.
20975         (main): Fix typo in testing code that uncovered by above changes.
20976         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
20977
20978 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20979
20980         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
20981         locale.h, localeconv.  This merges changes from coreutils.
20982
20983         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
20984         It can be removed after the next Autoconf is released.
20985         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
20986         needed.
20987
20988 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20989
20990         * lib/mktime.c: Fix Debian bug 177940
20991         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
20992         (localtime_offset): Now long int, not time_t, because we want it
20993         to be guaranteed to be signed.  All uses changed.
20994         (__mktime_internal): If overflow would occur when adding offset,
20995         don't add it.
20996
20997         Merge 'human' changes from coreutils.  Rewrite to support
20998         locale-specific notations like thousands separators.
20999         * lib/human.c: Simplify authorship notice.
21000         Include human.h immediately after config.h.
21001         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
21002         <limits.h>: Do not include, since human.h does.
21003         (SIZE_MAX, UINTMAX_MAX): New macros.
21004         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
21005         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
21006         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
21007         (power_letter): Renamed from suffixes.
21008         (generate_suffix_backwards): Remove.
21009         (adjust_value): Now takes int style (because of human.h changes)
21010         and long double value (for greater precision on some platforms).
21011         (group_number): New function.
21012         (human_readable): Use it.  Use integer options, not enum.
21013         Put the options before the sizes in the arg list.
21014         Support all the new options.
21015         The old human_readable function has been removed;
21016         use inttostr.h instead.
21017         (human_readable, default_block_size, humblock):
21018         Use uintmax_t, not int, for block sizes.
21019         (human_readable_inexact, block_size_types): Remove.
21020         (block_size_opts): New constant.
21021         (human_options): Renamed from human_block_size, with new signature
21022         that allows block sizes up to UINTMAX_MAX.  All callers changed.
21023         * lib/human.h: Add copyright and authorship notice.
21024         Include <limits.h> and <stdbool.h> unconditionally.
21025         (PARAMS): Remove.  All uses removed.
21026         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
21027         (enum human_inexact_style): Remove tag; now a nameless enum.
21028         (human_floor, human_ceiling, human_round_to_even): Now have
21029         values 2, 0, 1 rather than -1, 1, 0.
21030         (human_group_digits, human_suppress_point_zero, human_autoscale,
21031         human_base_1024, human_SI, human_B): New constants.
21032         (human_readable_inexact, human_block_size): Remove.
21033         (human_readable): Size args are now uintmax_t, not int.
21034         (human_options): New decl.
21035
21036         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
21037         unnecessary now that we assume C89 or better.  This change
21038         imported from coreutils.
21039
21040         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
21041         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
21042         in the 2003-05-30 sync from glibc.
21043
21044         .h files should stand alone, but we shouldn't include <sys/types.h>
21045         if we can get away with just <stddef.h>.
21046
21047         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
21048         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
21049         rather than <sys/types.h>, as we merely need size_t.
21050         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
21051         to get size_t.
21052         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
21053         Include <stdio.h>, to get FILE.
21054         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
21055         memcasecmp.h has included <stddef.h> and all we need is size_t.
21056         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
21057         our interface, instead of including <sys/types.h>
21058
21059 2003-06-04  Paul Eggert  <eggert@twinsun.com>
21060
21061         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
21062         now, as glibc mktime is buggy on non-glibc systems.
21063
21064 2003-06-03  Karl Berry  <karl@gnu.org>
21065
21066         * config/config.sub: update from prep.
21067
21068 2003-06-02  Paul Eggert  <eggert@twinsun.com>
21069
21070         [from coreutils]
21071         Fix some minor time-related bugs with POSIX time arguments.
21072         Some valid time stamps were being rejected (notably -1, and
21073         time stamps before 1900 on 64-bit hosts).  And some invalid
21074         time stamps were being accepted, e.g. September 31.
21075
21076         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
21077         that we can return (time_t) -1 successfully.
21078         * lib/posixtm.c: Likewise.
21079         [HAVE_STDBOOL_H]: Include <stdbool.h>.
21080         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
21081         (t): Remove static var.
21082         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
21083         of static var.  All uses changed.
21084         (year): Do not reject years before 1900; they can occur with
21085         64-bit time_t.
21086         (posix_time_parse): Do not check for out-of-range components;
21087         that is now the caller's responsibility, since our checks were
21088         only approximations.
21089         (posixtime): Use mktime to check for out-of-range components,
21090         since it knows them exactly.
21091         If mktime returns (time_t) -1, check whether an error actually occurred
21092         by invoking localtime on -1.
21093         (main) [TEST_POSIXTIME]: Check for input data errors, and report
21094         posixtime failures better.
21095         Improve the test data (in comments only).
21096
21097 2003-06-02  Karl Berry  <karl@gnu.org>
21098
21099         * config/mkinstalldirs (version): new variable.
21100         (--version): new option.
21101         (usage): improve message.
21102
21103 2003-05-30  Karl Berry  <karl@gnu.org>
21104
21105         * lib/mktime.c: update from libc.
21106
21107 2003-05-30  Bruno Haible  <bruno@clisp.org>
21108
21109         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
21110         * config/config.rpath: Upgrade to gettext-0.12.1.
21111
21112 2003-05-30  Bruno Haible  <bruno@clisp.org>
21113
21114         * m4/gettext.m4: Upgrade to gettext-0.12.1.
21115         * m4/nls.m4: New file, from gettext-0.12.1.
21116         * m4/po.m4: New file, from gettext-0.12.1.
21117         * m4/progtest.m4: Upgrade to gettext-0.12.1.
21118
21119 2003-05-30  Bruno Haible  <bruno@clisp.org>
21120
21121         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
21122         * lib/localcharset.h: Likewise.
21123         * lib/localcharset.c: Likewise.
21124
21125 2003-05-29  Karl Berry  <karl@gnu.org>
21126
21127         * config/config.rpath: update from gettext.
21128
21129 2003-05-28  Paul Eggert  <eggert@twinsun.com>
21130
21131         Assume the headers required for C89 freestanding compilers.
21132         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
21133         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
21134         * m4/human.m4 (gl_HUMAN): Likewise.
21135         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
21136         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
21137         * m4/userspec.m4 (gl_USERSPEC): Likewise.
21138         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
21139         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
21140         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
21141
21142 2003-05-28  Paul Eggert  <eggert@twinsun.com>
21143
21144         Assume the headers required for C89 freestanding compilers.
21145         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
21146         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
21147         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
21148         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
21149         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
21150         define, since <limits.h> is guaranteed to do that.
21151         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
21152         * lib/exclude.c: Include <stdbool.h> unconditionally.
21153         * lib/tempname.c: Include <stddef.h> unconditionally.
21154         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
21155         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
21156         <stddef.h> does that.
21157         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
21158         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
21159         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
21160         needed.
21161         * lib/xstrtol.c: Likewise.
21162         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
21163         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
21164
21165         * lib/addext.c (addext): Use assignment rather than cast, to avoid
21166         warnings on some platforms.
21167
21168         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
21169         arbitrarily.
21170
21171 2003-05-26  Jim Meyering  <jim@meyering.net>
21172
21173         Merge in a change from coreutils:
21174         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
21175         that is guaranteed to be `no'.  Use `no_such_member' to indicate
21176         that condition, rather than `-1' which is slightly misleading.
21177         Change the name of the cache variable to have the gl_ prefix.
21178         Prompted by a patch from Richard Dawe for DJGPP.
21179
21180 2003-05-24  Karl Berry  <karl@gnu.org>
21181
21182         * config/config.guess: update from prep.
21183
21184 2003-05-22  Karl Berry  <karl@gnu.org>
21185
21186         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
21187
21188 2003-05-20  Karl Berry  <karl@gnu.org>
21189
21190         * config/config.guess: update from prep.
21191
21192 2003-05-18  Karl Berry  <karl@gnu.org>
21193
21194         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
21195         might actually be set by the user.
21196
21197         * config/depcomp, install-sh, mdate-sh: update from automake.
21198
21199 2003-05-17  Bruno Haible  <bruno@clisp.org>
21200
21201         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
21202         invalid expansion for AC_EGREP_CPP.
21203         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
21204         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
21205         Suggested by Akim Demaille <akim@epita.fr> in
21206         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
21207
21208 2003-05-12  Jim Meyering  <jim@meyering.net>
21209
21210         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
21211         the space-padded-by-default conversion specifiers, %e, %k, %l.
21212
21213 2003-05-12  Bruno Haible  <bruno@clisp.org>
21214
21215         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
21216         the string is longer than 4 KB.
21217
21218 2003-05-11  Karl Berry  <karl@gnu.org>
21219
21220         * config/config.{guess,sub}: update from prep.
21221
21222 2003-05-09  Bruno Haible  <bruno@clisp.org>
21223
21224         * modules/error: Add m4/strerror_r.m4 to file list.
21225
21226 2003-05-03  Bruno Haible  <bruno@clisp.org>
21227
21228         Upgrade to Unicode-4.0.
21229         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
21230         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
21231         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
21232         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
21233         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
21234         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
21235         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
21236         Change width of U+E0100..U+E01EF from 1 to 0.
21237
21238 2003-04-25  Jim Meyering  <jim@meyering.net>
21239
21240         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
21241         of type size_t, not int.
21242
21243 2003-04-25  Bruno Haible  <bruno@clisp.org>
21244
21245         * lib/copy-file.c: Include <stddef.h>, for size_t.
21246
21247 2003-04-21  Paul Eggert  <eggert@twinsun.com>
21248
21249         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
21250         code which expansion is under static control.  Patch imported from
21251         Akim Demaille's patch to Bison; see
21252         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
21253
21254 2003-04-14  Bruno Haible  <bruno@clisp.org>
21255
21256         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
21257
21258 2003-04-11  Jim Meyering  <jim@meyering.net>
21259
21260         Merge changes from Coreutils.
21261
21262         2003-03-22  Jim Meyering  <jim@meyering.net>
21263
21264         * lib/strftime.c (widen): Cast alloca return value to proper type.
21265
21266         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
21267
21268         From GNU libc.
21269         * lib/strftime.c (my_strftime): Handle very large width
21270         specifications for numeric values correctly.  Improve checks for
21271         overflow.
21272
21273         2003-01-19  Jim Meyering  <jim@meyering.net>
21274
21275         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
21276         definitions.
21277         (nl_get_alt_digit) [! defined my_strftime]: Define.
21278         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
21279         _nl_get_alt_digit and _nl_get_walt_digit.
21280
21281         * lib/strftime.c (my_strftime): Merge in locale-related changes from
21282         libc. These changes have no effect outside of _LIBC.
21283
21284 2003-04-10  Bruno Haible  <bruno@clisp.org>
21285
21286         * modules/findprog: New file.
21287         * MODULES.html.sh (func_all_modules): Add it.
21288
21289 2003-04-10  Bruno Haible  <bruno@clisp.org>
21290
21291         * m4/findprog.m4: New file.
21292         * m4/eaccess.m4: New file.
21293
21294 2003-04-10  Bruno Haible  <bruno@clisp.org>
21295
21296         * lib/findprog.h: New file, from GNU gettext.
21297         * lib/findprog.c: New file, from GNU gettext.
21298
21299 2003-04-05  Jim Meyering  <jim@meyering.net>
21300
21301         Merge changes from Coreutils.
21302
21303         * lib/exclude.h (PARAMS): Remove definition and uses.
21304         * lib/exclude.c: Remove uses of `PARAMS'.
21305
21306         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
21307         Add test-cases for DOS filenames. Declare program_name.
21308         (main): Set up program_name.  Patch by Rich Dawe.
21309
21310         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
21311         error from mntctl.
21312         Use mntctl's return value to drive the entry-processing loop, since
21313         we can't rely on the value of the vmt_length member in the last
21314         entry.  On some systems doing so could result in exhausting
21315         virtual memory.  Based in part on a patch from Mike Jetzer.
21316
21317 2003-04-04  Bruno Haible  <bruno@clisp.org>
21318
21319         * modules/linebreak: New file.
21320         * MODULES.html.sh (func_all_modules): Add it.
21321
21322 2003-04-04  Bruno Haible  <bruno@clisp.org>
21323
21324         * m4/linebreak.m4: New file.
21325
21326 2003-04-04  Bruno Haible  <bruno@clisp.org>
21327
21328         * lib/linebreak.h: New file, from GNU gettext.
21329         * lib/linebreak.c: New file, from GNU gettext with slight
21330         modifications.
21331         * lib/lbrkprop.h: New file, from GNU gettext.
21332
21333 2003-04-03  Bruno Haible  <bruno@clisp.org>
21334
21335         * modules/utf8-ucs4: New file.
21336         * modules/utf16-ucs4: New file.
21337         * modules/ucs4-utf8: New file.
21338         * modules/ucs4-utf16: New file.
21339         * MODULES.html.sh (func_all_modules): Add them.
21340
21341 2003-04-03  Bruno Haible  <bruno@clisp.org>
21342
21343         * m4/utf-ucs4.m4: New file.
21344         * m4/ucs4-utf.m4: New file.
21345
21346 2003-04-03  Bruno Haible  <bruno@clisp.org>
21347
21348         * lib/utf8-ucs4.h: New file, from GNU gettext.
21349         * lib/utf16-ucs4.h: New file, from GNU gettext.
21350         * lib/ucs4-utf8.h: New file, from GNU gettext.
21351         * lib/ucs4-utf16.h: New file, from GNU gettext.
21352
21353 2003-04-02  Bruno Haible  <bruno@clisp.org>
21354
21355         * modules/binary-io: New file.
21356         * MODULES.html.sh (func_all_modules): Add it.
21357
21358 2003-04-02  Bruno Haible  <bruno@clisp.org>
21359
21360         * lib/binary-io.h: New file, from GNU gettext.
21361
21362 2003-04-01  Bruno Haible  <bruno@clisp.org>
21363
21364         * modules/pathname: New file.
21365         * MODULES.html.sh (func_all_modules): Add it.
21366
21367 2003-04-01  Bruno Haible  <bruno@clisp.org>
21368
21369         * lib/pathname.h: New file, from GNU gettext.
21370         * lib/concatpath.c: New file, from GNU gettext.
21371
21372 2003-03-30  Bruno Haible  <bruno@clisp.org>
21373
21374         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
21375
21376 2003-03-30  Bruno Haible  <bruno@clisp.org>
21377
21378         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
21379         function chown() doesn't exist.
21380
21381 2003-03-28  Bruno Haible  <bruno@clisp.org>
21382
21383         * modules/copy-file: New file.
21384         * MODULES.html.sh (func_all_modules): Add it.
21385
21386 2003-03-28  Bruno Haible  <bruno@clisp.org>
21387
21388         * m4/copy-file.m4: New file.
21389
21390 2003-03-28  Bruno Haible  <bruno@clisp.org>
21391
21392         * lib/copy-file.h: New file, from GNU gettext.
21393         * lib/copy-file.c: New file, from GNU gettext.
21394
21395 2003-03-18  Jim Meyering  <jim@meyering.net>
21396
21397         * lib/quote.c (quote_n): Fix typo in comment.
21398
21399 2003-03-18  Bruno Haible  <bruno@clisp.org>
21400
21401         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
21402         checking.
21403         * m4/onceonly_2_57.m4: Likewise.
21404
21405 2003-03-17  Bruno Haible  <bruno@clisp.org>
21406
21407         * m4/onceonly.m4: Require autoconf 2.54 or newer.
21408         (m4_quote): Remove macro.
21409         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
21410
21411 2003-03-14  Jim Meyering  <jim@meyering.net>
21412
21413         Merge changes from Coreutils.
21414         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
21415         to be const, in order to avoid warnings.
21416         (obstack_room): Likewise.
21417         (obstack_empty_p): Likewise.
21418
21419 2003-03-14  Bruno Haible  <bruno@clisp.org>
21420
21421         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
21422         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
21423
21424 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21425
21426         Merge changes from Bison.
21427         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
21428         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
21429         when compiling Bison 1.875's `bitset bset = obstack_alloc
21430         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
21431         * lib/hash.c: Include <stdbool.h> unconditionally.
21432
21433 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21434
21435         * m4/onceonly.m4 (m4_quote): New macro.
21436         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
21437         Quote AC_FOREACH variable-expansions properly.
21438
21439 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21440
21441         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
21442
21443 2003-03-09  Paul Eggert  <eggert@twinsun.com>
21444
21445         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
21446         Reported by Bruce Becker; see:
21447         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
21448
21449 2003-03-03  Paul Eggert  <eggert@twinsun.com>
21450             Bruno Haible  <bruno@clisp.org>
21451
21452         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
21453         Reported by John Hughes, see
21454         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
21455
21456 2003-02-20  Bruno Haible  <bruno@clisp.org>
21457
21458         * MODULES.html.sh (func_all_modules): Add poll.
21459
21460 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
21461
21462         * modules/poll: New file.
21463
21464 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
21465
21466         * lib/poll_.h: New file.
21467         * lib/poll.c: New file.
21468
21469 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
21470
21471         * m4/poll.m4: New file.
21472
21473 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
21474
21475         * modules/mathl: New file.
21476
21477 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
21478
21479         * lib/mathl.h: New file.
21480         * lib/acosl.c: New file.
21481         * lib/asinl.c: New file.
21482         * lib/atanl.c: New file.
21483         * lib/ceill.c: New file.
21484         * lib/cosl.c: New file.
21485         * lib/expl.c: New file.
21486         * lib/floorl.c: New file.
21487         * lib/frexpl.c: New file.
21488         * lib/ldexpl.c: New file.
21489         * lib/logl.c: New file.
21490         * lib/sincosl.c: New file.
21491         * lib/sinl.c: New file.
21492         * lib/sqrtl.c: New file.
21493         * lib/tanl.c: New file.
21494         * lib/trigl.c: New file.
21495         * lib/trigl.h: New file.
21496
21497 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
21498
21499         * m4/mathl.m4: New file.
21500
21501 2003-02-18  Bruno Haible  <bruno@clisp.org>
21502
21503         * MODULES.html.sh (func_all_modules): Add mathl.
21504
21505 2003-02-17  Bruno Haible  <bruno@clisp.org>
21506
21507         * modules/mkdtemp: New module.
21508         * MODULES.html.sh (func_all_modules): Add it.
21509
21510 2003-02-17  Bruno Haible  <bruno@clisp.org>
21511
21512         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
21513
21514 2003-02-17  Bruno Haible  <bruno@clisp.org>
21515
21516         * lib/mkdtemp.h: New file, from GNU gettext.
21517         * lib/mkdtemp.c: New file, from GNU gettext.
21518
21519 2003-02-02  Jim Meyering  <jim@meyering.net>
21520
21521         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
21522         e.g. glibc-2.2.93.
21523
21524 2003-01-31  Bruno Haible  <bruno@clisp.org>
21525
21526         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
21527         'rpl_rename'.
21528         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
21529         'rpl_strnlen'.
21530         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
21531         'rpl_strtod'.
21532         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
21533         'rpl_utime'.
21534
21535 2003-01-31  Bruno Haible  <bruno@clisp.org>
21536
21537         * lib/rename.c: #undef rename before defining rpl_rename.
21538         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
21539
21540 2003-01-30  Bruno Haible  <bruno@clisp.org>
21541
21542         * modules/vasnprintf, modules/vasprintf: New modules.
21543         * MODULES.html.sh (func_all_modules): Add them.
21544
21545 2003-01-30  Bruno Haible  <bruno@clisp.org>
21546
21547         * m4/signed.m4: New file, from GNU gettext.
21548         * m4/longdouble.m4: New file, from GNU gettext.
21549         * m4/wchar_t.m4: New file, from GNU gettext.
21550         * m4/wint_t.m4: New file, from GNU gettext.
21551         * m4/vasnprintf.m4: New file.
21552         * m4/vasprintf.m4: New file.
21553
21554 2003-01-30  Bruno Haible  <bruno@clisp.org>
21555
21556         * lib/printf-args.h: New file, from GNU gettext.
21557         * lib/printf-args.c: New file, from GNU gettext.
21558         * lib/printf-parse.h: New file, from GNU gettext.
21559         * lib/printf-parse.c: New file, from GNU gettext.
21560         * lib/vasnprintf.h: New file, from GNU gettext.
21561         * lib/vasnprintf.c: New file, from GNU gettext.
21562         * lib/asnprintf.c: New file, from GNU gettext.
21563         * lib/vasprintf.h: New file, from GNU gettext with modifications.
21564         * lib/vasprintf.c: New file, from GNU gettext.
21565         * lib/asprintf.c: New file, from GNU gettext.
21566
21567 2003-01-29  Bruno Haible  <bruno@clisp.org>
21568
21569         * modules/stpncpy: New module.
21570         * MODULES.html.sh (func_all_modules): Add it.
21571
21572 2003-01-29  Bruno Haible  <bruno@clisp.org>
21573
21574         * m4/stpncpy.m4: New file.
21575
21576 2003-01-29  Bruno Haible  <bruno@clisp.org>
21577
21578         * lib/stpncpy.h: New file, from GNU gettext with modifications.
21579         * lib/stpncpy.c: New file, from GNU gettext with modifications.
21580
21581 2003-01-28  Bruno Haible  <bruno@clisp.org>
21582
21583         * modules/c-ctype: New module.
21584         * MODULES.html.sh (func_all_modules): Add it.
21585
21586 2003-01-28  Bruno Haible  <bruno@clisp.org>
21587
21588         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
21589         Paul Eggert.
21590         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
21591         Paul Eggert.
21592
21593 2003-01-27  Bruno Haible  <bruno@clisp.org>
21594
21595         * modules/xsetenv: New module.
21596         * MODULES.html.sh (func_all_modules): Add it.
21597
21598 2003-01-27  Bruno Haible  <bruno@clisp.org>
21599
21600         * lib/xsetenv.h: New file, from GNU gettext.
21601         * lib/xsetenv.c: New file, from GNU gettext.
21602
21603 2003-01-23  Jim Meyering  <jim@meyering.net>
21604
21605         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
21606         from working on systems without dirfd (at least Irix and OSF1/Tru64).
21607
21608 2003-01-23  Bruno Haible  <bruno@clisp.org>
21609
21610         * modules/minmax: New module.
21611         * MODULES.html.sh (func_all_modules): Add it.
21612
21613 2003-01-23  Bruno Haible  <bruno@clisp.org>
21614
21615         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
21616         Eggert.
21617
21618 2003-01-22  Bruno Haible  <bruno@clisp.org>
21619
21620         * modules/exit: New module.
21621         * MODULES.html.sh (func_all_modules): Add it.
21622
21623 2003-01-22  Bruno Haible  <bruno@clisp.org>
21624
21625         * lib/exit.h: New file, from GNU gettext.
21626
21627 2003-01-19  Bruno Haible  <bruno@clisp.org>
21628
21629         * gnulib-tool: Recognize option --extract-maintainer.
21630         (func_get_maintainer): New function.
21631         * modules/*: Add Maintainer entry.
21632
21633 2003-01-16  Jim Meyering  <jim@meyering.net>
21634
21635         * m4/regex.m4: The `regex' struct is both input and output.
21636         Initialize it before each use.  Patch by Tim Waugh.
21637
21638 2003-01-16  Bruno Haible  <bruno@clisp.org>
21639
21640         * MODULES.html.sh: Add a table of contents. Add the module name as
21641         leftmost column. Add hyperlinks.
21642
21643 2003-01-15  Bruno Haible  <bruno@clisp.org>
21644
21645         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
21646
21647 2003-01-15  Bruno Haible  <bruno@clisp.org>
21648
21649         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
21650         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
21651         suffix.
21652
21653 2003-01-15  Bruno Haible  <bruno@clisp.org>
21654
21655         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
21656
21657 2003-01-15  Bruno Haible  <bruno@clisp.org>
21658
21659         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
21660         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
21661
21662 2003-01-14  Jim Meyering  <jim@meyering.net>
21663
21664         * lib/same.c (same_name): Tweak a comment.
21665
21666 2003-01-14  Bruno Haible  <bruno@clisp.org>
21667
21668         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
21669         when a string comparison is sufficient.
21670
21671 2003-01-14  Bruno Haible  <bruno@clisp.org>
21672
21673         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
21674         'unsigned int'.
21675
21676 2003-01-14  Bruno Haible  <bruno@clisp.org>
21677
21678         * lib/hash-pjw.c: Add comment about low quality of this function.
21679
21680 2003-01-13  Bruno Haible  <bruno@clisp.org>
21681
21682         * modules/stpcpy: Distribute lib/stpcpy.h.
21683         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
21684
21685 2003-01-13  Bruno Haible  <bruno@clisp.org>
21686
21687         * modules/*: Add a description.
21688         * modules/strpbrk: Fix Makefile.am snippet.
21689         * modules/strtoimax: Fix dependencies.
21690         * modules/strtoumax: Likewise.
21691
21692 2003-01-13  Bruno Haible  <bruno@clisp.org>
21693
21694         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
21695         * modules/alloca (Makefile.am): All object files depend on alloca.h.
21696         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
21697
21698 2003-01-13  Bruno Haible  <bruno@clisp.org>
21699
21700         * gnulib-tool (func_create_testdir): Store config/* files in the main
21701         directory.
21702         * config.rpath: Move to ...
21703         * config/config.rpath: ... here.
21704         * modules/gettext: Contains config/config.rpath, not config.rpath.
21705         * modules/iconv: Likewise.
21706
21707 2003-01-12  Paul Eggert  <eggert@twinsun.com>
21708
21709         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
21710         to avoid collisions with libcurses and libreadline.
21711
21712         * m4/getstr.m4: Remove.
21713         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
21714
21715 2003-01-12  Paul Eggert  <eggert@twinsun.com>
21716
21717         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
21718         to avoid collisions with libcurses and libreadline.
21719
21720         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
21721         * lib/getstr.h, getstr.c: Remove.
21722         * lib/getline.c: Include "getline.h", to check interface.
21723         Move body of old getstr.c here: this defines MIN_CHUNK and
21724         declares getdelim2, which is renamed from getstr.
21725         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
21726
21727         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
21728         All uses changed.
21729         * lib/linebuffer.h: Likewise.
21730         (readline): Remove backward-compatibility macro.
21731
21732 2003-01-12  Paul Eggert  <eggert@twinsun.com>
21733
21734         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
21735         to avoid collisions with libcurses and libreadline.
21736         * getstr: Remove.
21737         * MODULES.html.sh: Remove getstr.
21738         * modules/getline: Depend on unlocked-io, not getstr.
21739
21740 2003-01-12  Jim Meyering  <jim@meyering.net>
21741
21742         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
21743
21744 2003-01-10  Bruno Haible  <bruno@clisp.org>
21745
21746         * modules/alloca: Change Makefile.am requirements. Simplify Include
21747         requirements. Add lib/alloca_.h to file list.
21748
21749 2003-01-10  Bruno Haible  <bruno@clisp.org>
21750
21751         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
21752
21753 2003-01-10  Bruno Haible  <bruno@clisp.org>
21754
21755         * lib/alloca_.h: New file.
21756         * lib/getdate.y: Unconditionally include alloca.h.
21757         * lib/makepath.c: Likewise.
21758         * lib/setenv.c: Likewise.
21759         * lib/userspec.c: Likewise.
21760
21761 2003-01-09  Karl Berry  <karl@gnu.org>
21762
21763         * MODULES.html.sh: include `dirname $0` in PATH, to find
21764         gnulib-tool.
21765
21766 2003-01-09  Bruno Haible  <bruno@clisp.org>
21767
21768         * modules/stdbool: Change configure.ac, Makefile.am requirements.
21769         Simplify Include requirements. Add lib/stdbool.h.in to file list.
21770
21771 2003-01-09  Bruno Haible  <bruno@clisp.org>
21772
21773         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
21774
21775 2003-01-09  Bruno Haible  <bruno@clisp.org>
21776
21777         * lib/stdbool.h.in: New file.
21778
21779 2003-01-09  Bruno Haible  <bruno@clisp.org>
21780
21781         * gnulib-tool (func_all_modules): Ignore files ending in ~.
21782         * MODULES.html.sh: Likewise.
21783
21784 2003-01-08  Jim Meyering  <jim@meyering.net>
21785
21786         * lib/full-write.c: Undefine and define-away `const' after inclusion
21787         of errno.h, not before.  Suggestion from Bruno Haible.
21788
21789 2003-01-08  Bruno Haible  <bruno@clisp.org>
21790
21791         * modules/full-read: Depend on full-write.
21792
21793 2003-01-08  Bruno Haible  <bruno@clisp.org>
21794
21795         * lib/safe-read.c: Include specification header first, to ensure its
21796         selfcontainedness.
21797         * lib/full-write.c: Likewise.
21798
21799 2003-01-07  Jim Meyering  <jim@meyering.net>
21800
21801         * lib/full-write.c: Rework so that it may serve to define full_read,
21802         too.
21803         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
21804
21805 2003-01-07  Bruno Haible  <bruno@clisp.org>
21806
21807         * lib/strtoimax.c: Include <stdint.h> as an alternative to
21808         <inttypes.h>.
21809         * lib/xstrtol.h: Likewise.
21810         * lib/xstrtoimax.c: Likewise.
21811         * lib/xstrtoumax.c: Likewise.
21812         * lib/human.h: Likewise.
21813
21814         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
21815         on systems that have <inttypes.h> but not <stdint.h>.
21816
21817 2003-01-07  Bruno Haible  <bruno@clisp.org>
21818
21819         * MODULES.html.sh: Add copyright notice.
21820         (missed_files): Omit CVS directory entries.
21821         (func_module): Make it work with sed-3.02.
21822         * MODULES.txt: Remove file.
21823
21824 2003-01-06  Jim Meyering  <jim@meyering.net>
21825
21826         * lib/version-etc.c: Update year in translatable copyright string.
21827
21828 2003-01-03  Karl Berry  <karl@gnu.org>
21829
21830         * config/config.{guess,sub}: update from prep.
21831
21832 2003-01-02  Karl Berry  <karl@gnu.org>
21833
21834         * doc/COPYING.DOC: belatedly updated to 1.2.
21835
21836 2003-01-01  Karl Berry  <karl@gnu.org>
21837
21838         * gnulib-tool (func_verify_module): report module name $module in
21839         error message, not $1.
21840         * gnulib-tool (create-testdir): don't complain if destdir couldn't
21841         be created, only if it doesn't exist.
21842         * gnulib-tool (last_checkin_date): don't expand the $Date here.
21843
21844 2002-12-31  Paul Eggert  <eggert@twinsun.com>
21845
21846         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
21847
21848 2002-12-31  Paul Eggert  <eggert@twinsun.com>
21849
21850         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
21851         memcmp if strcoll doesn't work.
21852
21853 2002-12-31  Bruno Haible  <bruno@clisp.org>
21854
21855         * lib/utime.c (utime_null): No need to call ftruncate if the file was
21856         nonempty.
21857
21858 2002-12-31  Bruno Haible  <bruno@clisp.org>
21859
21860         * lib/memcoll.c (STRCOLL): New macro.
21861         (memcoll): Use it.
21862
21863 2002-12-31  Bruno Haible  <bruno@clisp.org>
21864
21865         * lib/localcharset.h: New file.
21866         * lib/localcharset.c: Include it.
21867         * lib/unicodeio.c: Likewise.
21868
21869 2002-12-31  Bruno Haible  <bruno@clisp.org>
21870
21871         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
21872         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
21873
21874 2002-12-31  Bruno Haible  <bruno@clisp.org>
21875
21876         * lib/getline.h: Include <stddef.h>, for size_t.
21877
21878         * lib/unicodeio.h: Include <stddef.h>, for size_t.
21879         * lib/unicodeio.c: Don't include <stddef.h>.
21880
21881 2002-12-31  Bruno Haible  <bruno@clisp.org>
21882
21883         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
21884         HAVE_TM_ZONE.
21885
21886 2002-12-24  Karl Berry  <karl@gnu.org>
21887
21888         * config/config.guess: update from prep.
21889
21890 2002-12-24  Bruno Haible  <bruno@clisp.org>
21891
21892         General infrasructure.
21893         * m4/README: Rewritten.
21894         * m4/onceonly.m4: New file.
21895         * m4/onceonly_2_57.m4: New file.
21896
21897         Module atexit.
21898         * m4/atexit.m4: New file.
21899
21900         Module strtod.
21901         * m4/strtod.m4: New file.
21902
21903         Module strtol.
21904         * m4/strtol.m4: New file.
21905
21906         Module strtoul.
21907         * m4/strtoul.m4: New file.
21908
21909         Module memchr.
21910         * m4/memchr.m4: New file.
21911
21912         Module memcmp.
21913         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
21914         (jm_FUNC_MEMCMP): Invoke it.
21915
21916         Module memcpy.
21917         * m4/memcpy.m4: New file.
21918
21919         Module memmove.
21920         * m4/memmove.m4: New file.
21921
21922         Module memset.
21923         * m4/memset.m4: New file.
21924
21925         Module strcspn.
21926         * m4/strcspn.m4: New file.
21927
21928         Module strpbrk.
21929         * m4/strpbrk.m4: New file.
21930
21931         Module strstr.
21932         * m4/strstr.m4: New file.
21933
21934         Module strerror.
21935         * m4/strerror.m4: New file.
21936
21937         Module mktime.
21938         * m4/mktime.m4: Renamed from jm-mktime.m4.
21939         (gl_PREREQ_MKTIME): New macro.
21940         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
21941
21942         Module malloc.
21943         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
21944         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
21945         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
21946
21947         Module realloc.
21948         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
21949         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
21950         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
21951
21952         Module strftime.
21953         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
21954         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
21955         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
21956         gl_TM_GMTOFF.
21957         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
21958
21959         Module xalloc.
21960         * m4/xalloc.m4: New file.
21961
21962         Module alloca.
21963         * m4/alloca.m4: New file.
21964
21965         Module putenv.
21966         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
21967         (jm_FUNC_PUTENV): Invoke it.
21968
21969         Module setenv.
21970         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
21971         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
21972         when invoked twice.
21973         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
21974         gt_FUNC_SETENV.
21975
21976         Module memrchr.
21977         * m4/memrchr.m4: New file.
21978
21979         Module stpcpy.
21980         * m4/stpcpy.m4: New file.
21981
21982         Module strcase.
21983         * m4/strcase.m4: New file.
21984
21985         Module strdup.
21986         * m4/strdup.m4: New file.
21987
21988         Module strnlen.
21989         * m4/strnlen.m4: New file.
21990
21991         Module strndup.
21992         * m4/strndup.m4: New file.
21993
21994         Module xstrtod.
21995         * m4/xstrtod.m4: New file.
21996
21997         Module xstrtol.
21998         * m4/xstrtol.m4: New file.
21999
22000         Module getdate.
22001         * m4/getdate.m4: New file.
22002
22003         Module unlocked-io.
22004         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
22005         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
22006         * m4/jm-glibc-io.m4n: Remove file.
22007
22008         Module long-options.
22009         * m4/long-options.m4: New file.
22010
22011         Module md5.
22012         * m4/md5.m4: New file.
22013
22014         Module sha.
22015         * m4/sha.m4: New file.
22016
22017         Module getstr.
22018         * m4/getstr.m4: New file.
22019
22020         Module getline.
22021         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
22022         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
22023         <sys/types.h>, for size_t. Use the function name gnu_getline, not
22024         simply getline. Infoke gl_PREREQ_GETLINE.
22025
22026         Module obstack.
22027         * m4/obstack.m4: New file.
22028
22029         Module hash.
22030         * m4/hash.m4: New file.
22031
22032         Module readtokens.
22033         * m4/readtokens.m4: New file.
22034
22035         Module strverscmp.
22036         * m4/strverscmp.m4: New file.
22037
22038         Module stdbool.
22039         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
22040         OSF/1.
22041
22042         Module strtoll.
22043         * m4/strtoll.m4: New file.
22044
22045         Module strtoull.
22046         * m4/strtoull.m4: New file.
22047
22048         Module strtoimax.
22049         * m4/strtoimax.m4: New file.
22050
22051         Module strtoumax.
22052         * m4/strtoumax.m4: New file.
22053
22054         Module xstrtoimax.
22055         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
22056         jm_AC_PREREQ_XSTRTOIMAX.
22057         Moved the strtol prerequisites to strtol.m4.
22058         Moved the strtoll prerequisites to strtoll.m4.
22059         Moved the strtoimax prerequisites to strtoimax.m4.
22060
22061         Module xstrtoumax.
22062         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
22063         jm_AC_PREREQ_XSTRTOUMAX.
22064         Moved the strtoul prerequisites to strtoul.m4.
22065         Moved the strtoull prerequisites to strtoull.m4.
22066         Moved the strtoumax prerequisites to strtoumax.m4.
22067
22068         Module chown.
22069         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
22070         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
22071
22072         Module dup2.
22073         * m4/dup2.m4: New file.
22074
22075         Module ftruncate.
22076         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
22077         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
22078
22079         Module getgroups.
22080         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
22081         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
22082
22083         Module gettimeofday.
22084         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
22085         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
22086         gl_PREREQ_GETTIMEOFDAY.
22087
22088         Module mkdir.
22089         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
22090         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
22091
22092         Module mkstemp.
22093         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
22094         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
22095         jm_AC_TYPE_UINTMAX_T.
22096         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
22097
22098         Module stat.
22099         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
22100         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
22101
22102         Module lstat.
22103         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
22104         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
22105
22106         Module timespec.
22107         * m4/timespec.m4 (gl_TIMESPEC): New macro.
22108         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
22109         * m4/st_mtim.m4: Indentation.
22110
22111         Module nanosleep.
22112         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
22113         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
22114         gl_PREREQ_NANOSLEEP.
22115
22116         Module regex.
22117         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
22118         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
22119         (gl_REGEX): New macro.
22120
22121         Module rename.
22122         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
22123         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
22124
22125         Module rmdir.
22126         * m4/rmdir.m4: New file.
22127
22128         Module utime.
22129         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
22130         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
22131         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
22132
22133         Module dirname.
22134         * m4/dirname.m4: New file.
22135
22136         Module getopt.
22137         * m4/getopt.m4: New file.
22138
22139         Module unistd-safer.
22140         * m4/unistd-safer.m4: New file.
22141
22142         Module fnmatch.
22143         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
22144         declaration.
22145         (gl_PREREQ_FNMATCH_EXTRA): New macro.
22146         (gl_FUNC_FNMATCH_POSIX): New macro.
22147         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
22148         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
22149         simply fnmatch.
22150
22151         Module exclude.
22152         * m4/exclude.m4: New file.
22153
22154         Module human.
22155         * m4/human.m4: New file.
22156
22157         Module acl.
22158         * m4/acl.m4: Nop.
22159
22160         Module backupfile.
22161         * m4/backupfile.m4: New file.
22162         * m4/d-ino.m4: Indentation.
22163
22164         Module fsusage.
22165         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
22166         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
22167         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
22168
22169         Module dirfd.
22170         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
22171         requirements.
22172
22173         Module euidaccess.
22174         * m4/euidaccess.m4: New file.
22175
22176         Module file-type.
22177         * m4/file-type.m4: New file.
22178
22179         Module fileblocks.
22180         * m4/fileblocks.m4: New file.
22181
22182         Module filemode.
22183         * m4/filemode.m4: New file.
22184
22185         Module isdir.
22186         * m4/isdir.m4: New file.
22187
22188         Module lchown.
22189         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
22190         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
22191
22192         Module makepath.
22193         * m4/makepath.m4: New file.
22194
22195         Module modechange.
22196         * m4/modechange.m4: New file.
22197
22198         Module mountlist.
22199         * m4/mountlist.m4: New file.
22200         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
22201         Indentation.
22202
22203         Module path-concat.
22204         * m4/path-concat.m4: New file.
22205
22206         Module pathmax.
22207         * m4/pathmax.m4: New file.
22208
22209         Module same.
22210         * m4/same.m4: New file.
22211
22212         Module save-cwd.
22213         * m4/save-cwd.m4: New file.
22214
22215         Module savedir.
22216         * m4/savedir.m4: New file.
22217
22218         Module xgetcwd.
22219         * m4/xgetcwd.m4: New file.
22220         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
22221
22222         Module xreadlink.
22223         * m4/xreadlink.m4: New file.
22224
22225         Module safe-read.
22226         * m4/safe-read.m4: New file.
22227
22228         Module safe-write.
22229         * m4/safe-write.m4: New file.
22230
22231         Module closeout.
22232         * m4/closeout.m4: New file.
22233
22234         Module stdio-safer.
22235         * m4/stdio-safer.m4: New file.
22236
22237         Module getpass.
22238         * m4/getpass.m4: New file.
22239
22240         Module getugroups.
22241         * m4/getugroups.m4: New file.
22242
22243         Module group-member.
22244         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
22245         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
22246
22247         Module idcache.
22248         * m4/idcache.m4: New file.
22249
22250         Module userspec.
22251         * m4/userspec.m4: New file.
22252
22253         Module gettime.
22254         * m4/clock_time.m4: New file.
22255         * m4/gettime.m4: New file.
22256
22257         Module settime.
22258         * m4/settime.m4: New file.
22259
22260         Module posixtm.
22261         * m4/posixtm.m4: New file.
22262
22263         Module gethostname.
22264         * m4/gethostname.m4: New file.
22265
22266         Module canon-host.
22267         * m4/canon-host.m4: New file.
22268
22269         Module gettext.
22270         * m4/codeset.m4: New file, from gettext-0.11.5.
22271         * m4/gettext.m4: New file, from gettext-0.11.5.
22272         * m4/glibc21.m4: New file, from gettext-0.11.5.
22273         * m4/iconv.m4: New file, from gettext-0.11.5.
22274         * m4/intdiv0.m4: New file, from gettext-0.11.5.
22275         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
22276         * m4/inttypes.m4: New file, from gettext-0.11.5.
22277         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
22278         * m4/isc-posix.m4: New file, from gettext-0.11.5.
22279         * m4/lcmessage.m4: New file, from gettext-0.11.5.
22280         * m4/lib-ld.m4: New file, from gettext-0.11.5.
22281         * m4/lib-link.m4: New file, from gettext-0.11.5.
22282         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
22283         * m4/progtest.m4: New file, from gettext-0.11.5.
22284         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
22285         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
22286         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
22287
22288         Module localcharset.
22289         * m4/localcharset.m4: New file.
22290
22291         Module hard-locale.
22292         * m4/hard-locale.m4: New file.
22293
22294         Module mbswidth.
22295         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
22296         onceonly macros.
22297         * m4/mbrtowc.m4: Add comment.
22298
22299         Module memcasecmp.
22300         * m4/memcasecmp.m4: New file.
22301
22302         Module memcoll.
22303         * m4/memcoll.m4: New file.
22304
22305         Module unicodeio.
22306         * m4/unicodeio.m4: New file.
22307
22308         Module rpmatch.
22309         * m4/rpmatch.m4: New file.
22310
22311         Module yesno.
22312         * m4/yesno.m4: New file.
22313
22314         Module exitfail.
22315         * m4/exitfail.m4: New file.
22316
22317         Module c-stack.
22318         * m4/c-stack.m4 (gl_C_STACK): New macro.
22319         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
22320
22321         Module error.
22322         * m4/error.m4 (gl_ERROR): New macro.
22323         (jm_PREREQ_ERROR): Use onceonly macros.
22324
22325         Module fatal.
22326         * m4/fatal.m4: New file.
22327
22328         Module getloadavg.
22329         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
22330         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
22331
22332         Module getpagesize.
22333         * m4/getpagesize.m4: New file.
22334
22335         Module getusershell.
22336         * m4/getusershell.m4: New file.
22337
22338         Module physmem.
22339         * m4/physmem.m4: New file.
22340
22341         Module posixver.
22342         * m4/posixver.m4: New file.
22343
22344         Module quotearg.
22345         * m4/quotearg.m4: New file.
22346
22347         Module quote.
22348         * m4/quote.m4: New file.
22349
22350         Module readutmp.
22351         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
22352
22353         Module sig2str.
22354         * m4/sig2str.m4: New file.
22355
22356         Other.
22357         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
22358         ulonglong.m4.
22359         * m4/intmax_t.m4: New file.
22360         * m4/d-type.m4: Indentation.
22361         * m4/jm-macros.m4: Update.
22362         * m4/prereq.m4 (jm_PREREQ): Update.
22363         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
22364         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
22365         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
22366         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
22367         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
22368         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
22369         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
22370         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
22371         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
22372         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
22373         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
22374         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
22375         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
22376         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
22377         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
22378         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
22379         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
22380         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
22381         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
22382
22383 2002-12-24  Bruno Haible  <bruno@clisp.org>
22384
22385         * MODULES.txt: Update according to m4/ changes.
22386
22387         Module gettext.
22388         * config.rpath: New file, from gettext-0.11.5.
22389
22390         * modules/*: New module descriptions.
22391         * gnulib-tool: New file.
22392         * MODULES.html.sh: New file.
22393
22394 2002-12-21  Karl Berry  <karl@gnu.org>
22395
22396         * doc/fdl.texi: update to version 1.2.
22397
22398 2002-12-19  Karl Berry  <karl@gnu.org>
22399
22400         * config/config.guess: update from prep.
22401
22402 2002-12-18  Bruno Haible  <bruno@clisp.org>
22403
22404         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
22405         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
22406
22407 2002-12-17  Bruno Haible  <bruno@clisp.org>
22408
22409         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
22410         stdlib.h, string.h.
22411
22412 2002-12-17  Bruno Haible  <bruno@clisp.org>
22413
22414         * lib/canon-host.c (strdup): Remove unused declaration.
22415
22416         * lib/fsusage.c: Include full_read.h.
22417         (get_fs_usage): Use full_read instead of safe_read.
22418
22419         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
22420
22421 2002-12-12  Karl Berry  <karl@gnu.org>
22422
22423         * config/config.guess: update from prep.
22424
22425 2002-12-11  Bruno Haible  <bruno@clisp.org>
22426
22427         * m4/setenv.m4: New file, from gettext-0.11.5.
22428
22429 2002-12-11  Bruno Haible  <bruno@clisp.org>
22430
22431         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
22432         not unsetenv().
22433         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
22434         modifications:
22435
22436         2002-12-11  Bruno Haible  <bruno@clisp.org>
22437
22438                 * setenv.c (alloca): Fall back to malloc.
22439                 (freea): New macro.
22440                 (setenv): Use freea() to free memory allocated with alloca().
22441
22442         2002-11-13  Bruno Haible  <bruno@clisp.org>
22443
22444                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
22445                 function declarations.
22446                 * unsetenv.c (unsetenv): Likewise.
22447
22448         2002-03-04  Bruno Haible  <bruno@clisp.org>
22449
22450                 Portability to AIX 4.3.3.
22451                 * unsetenv.c: New file, extracted from setenv.c.
22452                 * setenv.c: Move the unsetenv() function to unsetenv.c.
22453
22454         2001-12-20  Bruno Haible  <bruno@clisp.org>
22455
22456                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
22457                 use malloc instead. For SunOS 4.
22458
22459         2001-12-11  Bruno Haible  <bruno@clisp.org>
22460
22461                 * setenv.c: Declare alloca.
22462                 (compar_fn_t): New typedef.
22463                 (KNOWN_VALUE, STORE_VALUE): Use it.
22464
22465         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
22466         setenv.h.
22467
22468 2002-12-10  Paul Eggert  <eggert@twinsun.com>
22469
22470         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
22471         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
22472         Choose values that are less likely to collide with system fnmatch
22473         options.
22474         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
22475         defined (e.g., a pure POSIX system).
22476         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
22477         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
22478
22479 2002-12-06  Paul Eggert  <eggert@twinsun.com>
22480
22481         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
22482         a pain in practice to deal with generated m4 files.  This change
22483         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
22484
22485         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
22486         and jm-glibc-io.m4, as they are no longer a special case.
22487         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
22488         kludge and the auto-generation stuff.  Check only whether the
22489         functions are declared, not whether they exist, since older hosts
22490         that don't declare the functions can't use the optimization anyway.
22491
22492 2002-12-06  Jim Meyering  <jim@meyering.net>
22493
22494         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
22495
22496         Merge in changes from libc's misc/error.c, in preparation
22497         for the merge of gnulib's changes back into libc.
22498
22499         * lib/error.c (_): Define only if not already defined.
22500         Move definition to follow all #include directives.
22501         Include unlocked-io.h only if !_LIBC.
22502         [_LIBC]: Include <libio/libioP.h>.
22503         [USE_IN_LIBIO]: Include <libio/iolibio.h>
22504         (fflush): Tweak definition to use INTUSE.
22505         (putc): Define.
22506
22507 2002-12-05  Paul Eggert  <eggert@twinsun.com>
22508
22509         * lib/alloca.c [defined emacs]: Include "lisp.h".
22510         (xalloc_die) [defined emacs]: New macro.
22511         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
22512         [! defined emacs]: Include <xalloc.h>.
22513         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
22514         (pointer): Typedef to POINTER_TYPE *.
22515         (malloc): Remove decl; we now always use xmalloc.
22516         (alloca): Use old-style definition, since Emacs needs this.
22517         Check for arithmetic overflow when computing combined size.
22518
22519 2002-12-04  Paul Eggert  <eggert@twinsun.com>
22520
22521         Do not generate unlocked-io.h automatically, since it's easier to
22522         maintain it by hand.
22523
22524         * lib/unlocked-io.h: New file, from GNU diffutils,
22525         but with proper copyright notice and attribution.
22526         * lib/gen-uio: Remove.
22527         * lib/Makefile.am: Add copyright notice.
22528         (libfetish_a_SOURCES): Add unlocked-io.h.
22529         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
22530         (DISTCLEANFILES, io_functions): Remove macros.
22531         (EXTRA_DIST): Remove gen_uio.
22532         (unlocked-io.h): Remove rule.
22533
22534 2002-12-04  Jim Meyering  <jim@meyering.net>
22535
22536         Reflect the fact that stat.c and lstat.c are no longer generated.
22537         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
22538         (DISTCLEANFILES): Likewise.
22539         (EXTRA_DIST): Likewise.
22540         (all_local): Don't depend on stat.c or lstat.c.
22541         (stat.c, lstat.c): Remove rules.
22542         (EXTRA_DIST): Remove xstat.in.
22543
22544         * lib/xstat.in: Remove file.  Contents moved into stat.c.
22545         * lib/stat.c: New file.  Contents mostly from xstat.in.
22546         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
22547         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
22548
22549         * lib/safe-read.c: Rework so that it may serve to define safe_write,
22550         too.
22551         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
22552
22553 2002-12-03  Jim Meyering  <jim@meyering.net>
22554
22555         * lib/safe-read.c, safe-write.c: Change variable names and comments,
22556         but not semantics, to minimize the differences between these two files.
22557         (safe_read): Change comment to mention SAFE_READ_ERROR.
22558
22559         * lib/safe-read.c (IS_EINTR): Define.
22560         (safe_read): Use IS_EINTR in place of in-function cpp directives.
22561
22562 2002-12-02  Jim Meyering  <jim@meyering.net>
22563
22564         * lib/safe-read.c (EINTR): Define.
22565         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
22566         (INT_MAX): Provide fallback.
22567         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
22568
22569         * lib/safe-read.h (SAFE_READ_ERROR): Define.
22570
22571 2002-12-02  Bruno Haible  <bruno@clisp.org>
22572
22573         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
22574         Define, taken from safe-read.c.
22575         (INT_MAX): Provide fallback.
22576         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
22577         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
22578
22579         * lib/safe-read.c (EINTR): Remove definition.
22580         (safe_read): Don't use EINTR if it is absent.
22581
22582 2002-12-01  Jim Meyering  <jim@meyering.net>
22583
22584         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
22585         zero.
22586         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
22587
22588 2002-11-27  Paul Eggert  <eggert@twinsun.com>
22589
22590         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
22591         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
22592         with `if (! (value < limit)) abort ();', for readability.
22593
22594 2002-11-26  Karl Berry  <karl@gnu.org>
22595
22596         * lib/strdup.c: copy from libc again, with jim's ok.
22597         * lib/.cppi-disable: re-add strdup.c
22598
22599 2002-11-25  Karl Berry  <karl@gnu.org>
22600
22601         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
22602         instead of "strtol.c".
22603
22604 2002-11-25  Karl Berry  <karl@gnu.org>
22605
22606         * config/install-sh: update from automake for variable quoting, $0 in
22607         error msgs, etc.
22608
22609         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
22610         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
22611         entry.
22612
22613 2002-11-25  Jim Meyering  <jim@meyering.net>
22614
22615         * lib/mktime.c: Sync from libc, now that it has the latest fix.
22616
22617 2002-11-24  Karl Berry  <karl@gnu.org>
22618
22619         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
22620         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
22621
22622 2002-11-24  Jim Meyering  <jim@meyering.net>
22623
22624         Update from coreutils:
22625
22626         * lib/mktime.c: Merge in changes from libc.
22627
22628         Avoid a link-time failure on some Linux systems.
22629         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
22630         (otherwise).
22631         (__mon_yday): Declare with the STATIC attribute.
22632         (__mktime_internal): Likewise.
22633         Based on a report from Greg Schafer.
22634
22635 2002-11-23  Jim Meyering  <jim@meyering.net>
22636
22637         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
22638         Use `unsigned', not `int', as type of index.
22639
22640         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
22641
22642         * lib/fsusage.c: Remove unneeded parentheses around operands of
22643         `defined'.
22644
22645 2002-11-22  Paul Eggert  <eggert@twinsun.com>
22646
22647         * lib/quotearg.h: Allow multiple inclusion by surrounding with
22648         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
22649         so that we can be included first.
22650         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
22651         * lib/quotearg.c: Include quotearg.h immediately after config.h.
22652         No need to include stddef.h or sys/types.h any more.
22653         Surround local include files with "", not "<>".
22654         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
22655         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
22656         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
22657         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
22658         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
22659         (ISPRINT): Remove; no longer needed now that we assume C89.
22660
22661         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
22662         Preserve errno.
22663
22664         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
22665         quotearg_char): Use SIZE_MAX rather than
22666         (size_t) -1 when we are talking about "infinity".
22667
22668         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
22669
22670 2002-11-22  Paul Eggert  <eggert@twinsun.com>
22671
22672         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
22673         hint that one should use `if (! x) abort ();' rather than `assert
22674         (x);', and anyway it's one less thing to worry about configuring.
22675         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
22676         hash_rehash, hash_insert): Use abort rather than assert.
22677
22678 2002-11-22  Bruno Haible  <bruno@clisp.org>
22679
22680         * lib/safe-read.h: Assume C89. Add comments.
22681         (safe_read): Change return type to size_t.
22682         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
22683         byte counts > SSIZE_MAX correctly.
22684         * lib/safe-write.h: New file.
22685         * lib/safe-write.c: New file.
22686         * lib/full-read.h: New file.
22687         * lib/full-read.c: New file.
22688         * lib/full-write.h: Assume C89. Add comments.
22689         * lib/full-write.c: Include safe-write.h.
22690         (full_write): Rewritten to use safe_write.
22691         Suggested by Jim Meyering and Paul Eggert.
22692
22693 2002-11-21  Jim Meyering  <jim@meyering.net>
22694
22695         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
22696
22697         Merge in changes from the coreutils.
22698
22699         2002-09-25  Paul Eggert  <eggert@twinsun.com>
22700         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
22701         <stdint.h>.
22702         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
22703         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
22704         int.  Work more efficiently if X is the same width as uintmax_t.
22705         Do not compare X to -1, to avoid bogus compiler warning.
22706         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
22707         Don't assume that f_frsize and f_bsize are the same type.
22708
22709         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
22710         warning on FreeBSD.
22711
22712         * lib/makepath.c (make_path): Restore umask *before* creating the final
22713         component.
22714         (make_path): Minor reformatting.
22715
22716         * lib/xmalloc.c: Adjust to work with new autoconf macros,
22717         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
22718         HAVE_MALLOC/HAVE_REALLOC.
22719
22720         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
22721         dummy ones.  At least on GNU/Linux systems, `auto' means something
22722         else.
22723         From Michael Stone.
22724
22725 2002-11-21  Bruno Haible  <bruno@clisp.org>
22726
22727         Remove case insensitive option matching.
22728         * lib/argmatch.h (argcasematch): Remove declaration.
22729         (ARGCASEMATCH): Remove macro.
22730         (__xargmatch_internal): Remove case_sensitive argument.
22731         (XARGMATCH): Update.
22732         (XARGCASEMATCH): Remove macro.
22733         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
22734         case_sensitive argument.
22735         (argcasematch): Remove function.
22736         (__xargmatch_internal): Remove case_sensitive argument.
22737         (main): Use XARGMATCH instead of XARGCASEMATCH.
22738
22739         * lib/xmalloc.c: Change compile-time error message. Add comment about
22740         required autoconf version.
22741
22742 2002-11-20  Paul Eggert  <eggert@twinsun.com>
22743
22744         Merge argmatch cleanups from Bison.  Assume C89.
22745
22746         * lib/argmatch.c: Include config.h here, not in argmatch.h.
22747         Include stdlib.h, for EXIT_FAILURE.
22748         Always include <string.h>, since we assume C89.
22749         (EXIT_FAILURE): Remove pre-C89 bug workaround.
22750         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
22751         Include <stddef.h> instead, since it's all we need for size_t.
22752         (PARAMS): Remove.  All uses removed.
22753         (ARRAY_CARDINALITY): Do not bother to #undef.
22754         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
22755         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
22756         Remove unnecessary parentheses.
22757         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
22758         Insert necessary parentheses.
22759         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
22760         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
22761
22762 2002-11-19  Bruno Haible  <bruno@clisp.org>
22763
22764         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
22765         * lib/mbswidth.h: Include <stddef.h>, for size_t.
22766
22767         * lib/mbswidth.h (PARAMS): Remove macro.
22768         (mbswidth, mbsnwidth): Use ANSI C function declarations.
22769         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
22770
22771         * lib/gcd.h (PARAMS): Remove macro.
22772         (gcd): Use ANSI C function declarations.
22773         * lib/gcd.c (gcd): Likewise.
22774
22775 2002-11-15  Bruno Haible  <bruno@clisp.org>
22776
22777         * lib/strcspn.c: Include <stddef.h>.
22778         (strcspn): Use ANSI C function declaration. Change return type to
22779         size_t. Use NULL.
22780         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
22781         (strpbrk): Use NULL.
22782         * lib/strpbrk.h (PARAMS): Remove macro.
22783         (strpbrk): Use ANSI C function declaration.
22784         * lib/strstr.c: Don't include <sys/types.h>.
22785         * lib/strstr.h (PARAMS): Remove macro.
22786         (strstr): Use ANSI C function declarations.
22787
22788 2002-11-14  Karl Berry  <karl@gnu.org>
22789
22790         * config/mkinstalldirs: `do' on separate line, instead of
22791         `for var; do'.
22792
22793 2002-11-06  Bruno Haible  <bruno@clisp.org>
22794
22795         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
22796         * lib/gcd.c (gcd): Likewise.
22797
22798 2002-11-05  Bruno Haible  <bruno@clisp.org>
22799
22800         * lib/gcd.h: New file, from gettext-0.11.5.
22801         * lib/gcd.c: New file, from gettext-0.11.5.
22802
22803 2002-11-05  Bruno Haible  <bruno@clisp.org>
22804
22805         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22806         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22807         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22808         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22809
22810         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
22811         <libintl.h>.
22812         * lib/makepath.c: Include gettext.h instead of <locale.h> and
22813         <libintl.h>.
22814
22815         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
22816         * lib/human.c: Include gettext.h instead of <libintl.h>.
22817         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
22818         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
22819         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
22820         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
22821         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
22822         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
22823         (textdomain): Remove definition.
22824         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
22825
22826         * lib/long-options.c: Remove include of <libintl.h> and definition of
22827         _.
22828         * lib/same.c: Remove include of <libintl.h> and definition of _.
22829
22830 2002-11-04  Owen Taylor  <otaylor@redhat.com>
22831
22832         * lib/config.charset: A few additions for Solaris.
22833
22834 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
22835
22836         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
22837         * lib/localcharset.c (locale_charset): Declare as extern "C".
22838
22839 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
22840
22841         * lib/config.charset: msdos in uk_UA uses CP1125.
22842
22843 2002-11-04  Bruno Haible  <bruno@clisp.org>
22844
22845         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
22846         * lib/strcase.h: New file, from GNU gettext-0.11.5.
22847         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
22848         * lib/strstr.h: New file, from GNU gettext-0.11.5.
22849         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
22850
22851 2002-11-04  Bruno Haible  <bruno@clisp.org>
22852
22853         * lib/localcharset.c (locale_charset): Don't return an empty string.
22854
22855 2002-11-04  Bruno Haible  <bruno@clisp.org>
22856
22857         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
22858         aliases.
22859
22860 2002-11-04  Bruno Haible  <bruno@clisp.org>
22861
22862         * lib/config.charset: Update for newest glibc. Add canonical names
22863         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
22864
22865 2002-11-04  Bruno Haible  <bruno@clisp.org>
22866
22867         * lib/config.charset: Add support for NetBSD.
22868
22869 2002-11-04  Bruno Haible  <bruno@clisp.org>
22870
22871         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
22872
22873 2002-11-01  Bruno Haible  <bruno@clisp.org>
22874
22875         * configure.in: Add AC_CONFIG_AUX_DIR call.
22876         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
22877         test/Makefile.
22878         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
22879
22880 2002-09-28  Karl Berry  <karl@gnu.org>
22881
22882         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
22883         installed automake until the next release, since changes have been
22884         made.
22885
22886 2002-09-25  Karl Berry  <karl@gnu.org>
22887
22888         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
22889         * lib/getopt*: copy from libc/posix.
22890         * lib/gettext.h: copy from gettext.
22891         * lib/.cppi-disable: add strdup.c, gettext.h.
22892
22893 2002-09-25  Karl Berry  <karl@gnu.org>
22894
22895         * config/srclist.txt: enable gettext.h check.
22896         * config/config.{guess,sub}: update from prep.
22897         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
22898                 from automake 1.6.3.
22899         See srclist*.
22900
22901 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
22902
22903         * regex.c (PATFETCH): Remove the translating fetch.
22904         (PATFETCH_RAW): Rename to PATFETCH.
22905         (set_image_of_range): New fun.
22906         (SET_RANGE_TABLE_WORK_AREA): Use it.
22907         (regex_compile): Don't translate the pattern chars so eagerly.
22908         Only do it when inserting an `exactn' bytecode or when handling
22909         a char-range.
22910         (mutually_exclusive_p): Avoid empty statement.
22911
22912 2002-07-06  Jim Meyering  <meyering@lucent.com>
22913
22914         * m4/README: Don't mention Makefile.am.in.
22915         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
22916
22917 2002-07-01  Jim Meyering  <meyering@lucent.com>
22918
22919         * lib/c-stack.c: Include sys/time.h.
22920         From Volker Borchert.
22921
22922 2002-06-26  Paul Eggert  <eggert@twinsun.com>
22923
22924         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
22925
22926 2002-06-26  Paul Eggert  <eggert@twinsun.com>
22927
22928         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
22929         New macro.  Use it uniformly instead of
22930         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
22931         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
22932         reported by Vin Shelton.
22933
22934 2002-06-22  Paul Eggert  <eggert@twinsun.com>
22935
22936         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
22937         Do not assume SA_SIGINFO behavior.
22938         Bug reported by Jim Meyering on NetBSD 1.5.2.
22939
22940 2002-06-22  Jim Meyering  <meyering@lucent.com>
22941
22942         * m4/c-stack.m4: New file, from diffutils-2.8.2.
22943         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
22944
22945         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
22946         now that configure.ac uses AC_GNU_SOURCE.
22947         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
22948         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
22949
22950         Update to latest tools.  Suggestions from Paul Eggert.
22951         * m4/stdbool.m4: New file, from diffutils-2.8.2.
22952         * m4/gnu-source.m4: Update from diffutils-2.8.2.
22953         * m4/fnmatch.m4: Likewise.
22954         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
22955         to AC_HEADER_STDBOOL
22956
22957 2002-06-22  Jim Meyering  <meyering@lucent.com>
22958
22959         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
22960         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
22961
22962 2002-06-22  Jim Meyering  <meyering@lucent.com>
22963
22964         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
22965
22966         * lib/exitfail.c, exitfail.h: Likewise.
22967         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
22968
22969         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
22970         of fnmatch.h.
22971         (EXTRA_DIST): Add fnmatch_loop.c.
22972         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
22973
22974         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
22975         * lib/fnmatch.c: Update from diffutils-2.8.2.
22976         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
22977         * lib/fnmatch.h: Remove file.
22978
22979 2002-06-21  Jim Meyering  <meyering@lucent.com>
22980
22981         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
22982         * m4/mbrtowc.m4: Likewise.
22983
22984         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
22985         * m4/mbswidth.m4: Reflect name change:
22986         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
22987         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
22988
22989         * m4/lib-link.m4: Update from gettext-0.11.2.
22990         * m4/gettext.m4: Likewise.
22991
22992         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
22993         From Alfred M. Szmidt.
22994
22995 2002-06-18  Paul Eggert  <eggert@twinsun.com>
22996
22997         * lib/file-type.h: Report an error if neither S_ISREG nor
22998         S_IFREG is defined, instead of using a test specific to glibc
22999         2.2.  This should be safe, since POSIX requires S_ISREG and
23000         Unix Version 7 had S_IFREG.  We don't need to check for
23001         <sys/types.h> since we don't use any symbols that it defines.
23002
23003 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
23004
23005         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
23006         $@-t, so that each temporary file name is unique and valid in the first
23007         8 characters, for operation under DOS.
23008
23009 2002-06-15  Paul Eggert  <eggert@twinsun.com>
23010
23011         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
23012
23013 2002-06-15  Jim Meyering  <meyering@lucent.com>
23014
23015         Work even with DJGPP 2.03, which lacks support for symlinks.
23016         From Richard Dawe.
23017         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
23018         is defined.
23019         * lib/lchown.c (S_ISLNK): Likewise.
23020
23021 2002-06-15  Jim Meyering  <meyering@lucent.com>
23022
23023         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
23024         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
23025         have been included before this file.
23026
23027 2002-06-14  Jim Meyering  <meyering@lucent.com>
23028
23029         * lib/file-type.h: Use the version from diffutils-2.8.2.
23030         * lib/file-type.c: Likewise.
23031
23032 2002-06-07  Jim Meyering  <meyering@lucent.com>
23033
23034         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
23035         They're needed at least for NetBSD 1.5.2.
23036         ($statxfs_includes): Include those same headers.
23037         ($statxfs_includes): Include sys/vfs.h if available.
23038         ($statxfs_includes): Likewise for sys/statvfs.h.
23039         Check for the following members in both structs statfs and statvfs:
23040         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
23041
23042 2002-06-01  Jim Meyering  <meyering@lucent.com>
23043
23044         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
23045         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
23046
23047 2002-05-28  Jim Meyering  <meyering@lucent.com>
23048
23049         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
23050         Reported by Volker Borchert.
23051
23052 2002-05-27  Jim Meyering  <meyering@lucent.com>
23053
23054         Fix a problem seen only on nonconforming systems whereby ls.c's
23055         use of localtime, and then of gettimeofday would cause trouble:
23056         the localtime call used to initialize rpl_gettimeofday's save
23057         mechanism would clobber ls's current local time information so
23058         that in any long listing the first file would always be listed
23059         with date 1970-01-01.  Analysis by Volker Borchert.
23060
23061         * lib/gettimeofday.c (localtime): Undefine.
23062         (rpl_localtime): New function.
23063
23064 2002-05-27  Jim Meyering  <meyering@lucent.com>
23065
23066         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
23067         localtime.
23068
23069         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
23070         use the replacement function; it wouldn't resolve at link time.
23071         Reported by Volker Borchert.
23072
23073 2002-05-22  Jim Meyering  <meyering@lucent.com>
23074
23075         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
23076         file-type.h.
23077         * lib/file-type.h: New file.
23078         * lib/file-type.c (file_type): New file/function.  Extracted from
23079         diffutils.
23080
23081 2002-04-30  Jim Meyering  <meyering@lucent.com>
23082
23083         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
23084
23085 2002-04-29  Paul Eggert  <eggert@twinsun.com>
23086
23087         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
23088
23089 2002-04-29  Paul Eggert  <eggert@twinsun.com>
23090
23091         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
23092         Do not check for alloca.h (no longer used) or stdbool.h (was never
23093         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
23094
23095 2002-04-29  Paul Eggert  <eggert@twinsun.com>
23096
23097         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
23098
23099 2002-04-29  Jim Meyering  <meyering@lucent.com>
23100
23101         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
23102         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
23103         Use AC_FUNC_STRNLEN here instead.
23104
23105         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
23106         With autoconf-2.53a, it's part of AC_PROG_CC.
23107
23108 2002-04-28  Paul Eggert  <eggert@twinsun.com>
23109
23110         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
23111         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
23112
23113 2002-04-28  Paul Eggert  <eggert@twinsun.com>
23114
23115         * lib/sig2str.h, lib/sig2str.c: New files.
23116         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
23117
23118 2002-04-28  Paul Eggert  <eggert@twinsun.com>
23119
23120         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
23121         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
23122         of 127, since 64 is the largest conceivable number for ancient
23123         nonstandard hosts.
23124         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
23125
23126 2002-04-28  Jim Meyering  <meyering@lucent.com>
23127
23128         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
23129
23130 2002-04-24  Jim Meyering  <meyering@lucent.com>
23131
23132         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
23133         (jm_PREREQ): Use it.
23134
23135         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
23136         mach/mach.h fcntl.h.
23137         Check for this function: setlocale.
23138
23139 2002-04-24  Jim Meyering  <meyering@lucent.com>
23140
23141         * lib/gettext.h: New file, from Gettext.
23142         * lib/Makefile.am (INCLUDES): Remove -I../intl.
23143         (libfetish_a_SOURCES): Add gettext.h.
23144
23145 2002-04-16  Jim Meyering  <meyering@lucent.com>
23146
23147         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
23148         ut_pid, ut_id, ut_exit.
23149
23150 2002-04-16  Jim Meyering  <meyering@lucent.com>
23151
23152         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
23153         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
23154         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
23155
23156 2002-04-12  Jim Meyering  <meyering@lucent.com>
23157
23158         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
23159         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
23160         existence of the getmntinfo function.  Needed for Darwin 5.3.
23161
23162         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
23163         This is necessary at least on Darwin 5.3.
23164
23165         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
23166         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
23167         strnlen.o in the library, and that makes some versions of ranlib
23168         object.
23169
23170 2002-04-12  Jim Meyering  <meyering@lucent.com>
23171
23172         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
23173
23174 2002-04-09  Jim Meyering  <meyering@lucent.com>
23175
23176         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
23177         to be more precise.  Rather than saying we're checking whether the
23178         function `works', say what we're testing.
23179         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
23180         Reported by Bruno Haible.
23181
23182 2002-03-10  Jim Meyering  <meyering@lucent.com>
23183
23184         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
23185         Suggestion from Santiago Vila.
23186
23187 2002-03-08  Jim Meyering  <meyering@lucent.com>
23188
23189         * lib/rename.c: Mention that this wrapper is needed also on
23190         mips-dec-ultrix4.4 systems.
23191
23192 2002-03-02  Jim Meyering  <meyering@lucent.com>
23193
23194         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
23195         not HAVE_CLOCK_SETTIME.
23196
23197 2002-02-27  Paul Eggert  <eggert@twinsun.com>
23198
23199         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
23200         Check for clock_settime.
23201
23202 2002-02-27  Paul Eggert  <eggert@twinsun.com>
23203
23204         * lib/nanosleep.h: Rename to....
23205         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
23206
23207         * lib/gettime.c: New file.
23208         * lib/settime.c: New file.
23209         * lib/stime.c: Remove.
23210
23211         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
23212         timespec.h.  Remove nanosleep.h.
23213
23214 2002-02-25  Paul Eggert  <eggert@twinsun.com>
23215
23216         * m4/acl.m4: New file.
23217         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
23218         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
23219
23220 2002-02-25  Paul Eggert  <eggert@twinsun.com>
23221
23222         * lib/acl.c, lib/acl.h: New files.
23223         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
23224
23225 2002-02-24  Jim Meyering  <meyering@lucent.com>
23226
23227         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
23228         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
23229         cause trouble.  Reported by Nelson Beebe.
23230
23231 2002-02-23  Paul Eggert  <eggert@twinsun.com>
23232
23233         * lib/path-concat.c (xpath_concat): Reorder code to pacify
23234         compilers that don't know that xalloc_die never returns.
23235
23236 2002-02-20  Jim Meyering  <meyering@lucent.com>
23237
23238         * lib/getdate.c: Regenerate using bison-1.33.
23239
23240 2002-02-17  Jim Meyering  <meyering@lucent.com>
23241
23242         * config/config.guess (main): Don't use `head -1'; it's no longer
23243         portable. Use `sed 1q' instead.
23244
23245 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
23246
23247         * m4/codeset.m4: Upgrade to gettext-0.11.
23248         * m4/gettext.m4: Upgrade to gettext-0.11.
23249         * m4/glibc21.m4: Upgrade to gettext-0.11.
23250         * m4/iconv.m4: Upgrade to gettext-0.11.
23251         * m4/isc-posix.m4: Upgrade to gettext-0.11.
23252         * m4/lcmessage.m4: Upgrade to gettext-0.11.
23253         * m4/lib-ld.m4: New file, from gettext-0.11.
23254         * m4/lib-link.m4: New file, from gettext-0.11.
23255         * m4/lib-prefix.m4: New file, from gettext-0.11.
23256         * m4/progtest.m4: Upgrade to gettext-0.11.
23257
23258 2002-02-15  Paul Eggert  <eggert@twinsun.com>
23259
23260         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
23261         (jm_PREREQ): Use it.
23262
23263 2002-02-15  Paul Eggert  <eggert@twinsun.com>
23264
23265         * lib/posixver.c, lib/posixver.h: New files.
23266         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
23267
23268 2002-02-02  Paul Eggert  <eggert@twinsun.com>
23269             Bruno Haible  <bruno@clisp.org>
23270
23271         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
23272         (fwrite_success_callback): New declaration.
23273         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
23274         print_unicode_char. Call failure callback instead of error.
23275         (fwrite_success_callback): New function.
23276         (exit_failure_callback): New function.
23277         (fallback_failure_callback): New function.
23278         (print_unicode_char): Call unicode_to_mb.
23279
23280 2002-01-26  Jim Meyering  <meyering@lucent.com>
23281
23282         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
23283         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
23284
23285 2002-01-26  Jim Meyering  <meyering@lucent.com>
23286
23287         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
23288
23289 2002-01-22  Paul Eggert  <eggert@twinsun.com>
23290
23291         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
23292
23293 2002-01-22  Jim Meyering  <meyering@lucent.com>
23294
23295         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
23296         Otherwise, some versions of automake would omit the rule that makes
23297         Makefile from Makefile.in.
23298
23299 2002-01-21  Paul Eggert  <eggert@twinsun.com>
23300
23301         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
23302         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
23303         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
23304         (memcoll): Set errno to zero if there is no error.
23305
23306         * lib/quotearg.c (quotearg_buffer_restyled):
23307         Fix bug with quoting buffers containing NUL when backslashing escapes.
23308         This bug was exposed by the other changes in this patch.
23309         (quotearg_n_options): New arg ARGSIZE.
23310         All callers changed.
23311         (quoting_options_from_style): New function.
23312         (quotearg_n_style): Use it.
23313         (quotearg_n_style_mem): New function.
23314
23315         * lib/quotearg.h (quotearg_n_style_mem): New function.
23316
23317 2002-01-19  Jim Meyering  <meyering@lucent.com>
23318
23319         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
23320         Remove useless quotes: DF_PROG="df".
23321         * m4/strnlen.m4: New file.
23322
23323 2002-01-16  Paul Eggert  <eggert@twinsun.com>
23324
23325         * lib/backupfile.c (ISDIGIT): Comment fix.
23326         * lib/getdate.y (ISDIGIT): Likewise.
23327         * lib/posixtm.c (ISDIGIT, year): Likewise.
23328         * lib/strverscmp.c (ISDIGIT): Likewise.
23329         * lib/userspec.c (ISDIGIT): Likewise.
23330
23331 2002-01-16  Jim Meyering  <meyering@lucent.com>
23332
23333         * lib/getdate.y: Add three semicolons, each just before a closing
23334         brace. Bison (as of version 1.31) no longer papers over that mistake.
23335
23336 2002-01-05  Jim Meyering  <meyering@lucent.com>
23337
23338         * lib/version-etc.c (version_etc_copyright): Update copyright year.
23339
23340 2001-12-19  Paul Eggert  <eggert@twinsun.com>
23341
23342         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
23343         not silently exit merely because the output buffer happens to
23344         have nothing pending.
23345
23346 2001-12-18  Paul Eggert  <eggert@twinsun.com>
23347
23348         See the big note in ../ChangeLog.
23349         * lib/human.c (suffixes): Prefer K to k for 1024.
23350         (generate_suffix_backwards): New function.
23351         (human_readable_inexact): Use it.
23352         * lib/xstrtol.c (__xstrtol): If there is no number but there
23353         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
23354         Accept 'K' as well as 'k'.
23355
23356 2001-12-15  Jim Meyering  <meyering@lucent.com>
23357
23358         * lib/regex.h (__restrict_arr): Update from libc.
23359
23360         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
23361         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
23362         (STREQ): Define.
23363
23364 2001-12-14  Jim Meyering  <meyering@lucent.com>
23365
23366         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
23367         Suggestion from Bruno Haible.
23368
23369 2001-12-10  Jim Meyering  <meyering@lucent.com>
23370
23371         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
23372         xrealloc, Instead, include "xalloc.h".
23373         (initbuffer): Don't cast xmalloc return value to char*.
23374         (readline): Reword comment.
23375         Don't cast xrealloc return value to char*
23376         Return NULL, not 0.
23377
23378 2001-12-09  Jim Meyering  <meyering@lucent.com>
23379
23380         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
23381         about `signed and unsigned type in conditional expression'.
23382         * lib/posixtm.c (posix_time_parse): Likewise.
23383
23384         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
23385
23386         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
23387         to avoid a pedantic warning.
23388
23389         * lib/getstr.c: Don't include assert.h.
23390         (getstr): Remove warning-evoking assertions.
23391         Return -1 if offset parameter is out of bounds.
23392         Change the type of a local from int to size_t.
23393
23394         * lib/strftime.c (my_strftime_localtime_r): Include this function
23395         definition in the `#if ! HAVE_TM_GMTOFF' block.
23396
23397         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
23398         Include xalloc.h instead.
23399
23400 2001-12-02  Jim Meyering  <meyering@lucent.com>
23401
23402         * lib/tempname.c: Don't declare getenv, thus reverting the change of
23403         2001-11-18.  It's no longer necessary, now that stdlib.h is always
23404         included.
23405
23406         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
23407         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
23408
23409 2001-11-30  Akim Demaille  <akim@epita.fr>
23410
23411         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
23412         before being defined.
23413
23414 2001-11-27  Paul Eggert  <eggert@twinsun.com>
23415
23416         * lib/quotearg.h (quotearg_n, quotearg_n_style):
23417         First arg is int, not unsigned.
23418         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
23419         (SIZE_MAX, UINT_MAX): New macros.
23420         (quotearg_n_options): Abort if N is negative.
23421         Avoid overflow check on hosts where size_t is 64 bits and int
23422         is 32 bits, as overflow is impossible there.
23423         Fix off-by-one typo that caused unnecessary reallocation.
23424
23425 2001-11-27  Jim Meyering  <meyering@lucent.com>
23426
23427         * lib/tempname.c: Merge with version from libc.
23428         * lib/regex.c: Likewise.
23429
23430         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
23431         systems for which STDC_HEADERS is 0, it was not included, resulting in
23432         a warning about an integer-to-pointer conversion problem with getenv.
23433         Reported by Volker Borchert.
23434
23435 2001-11-26  Jim Meyering  <meyering@lucent.com>
23436
23437         * lib/gtod.h: Remove file.
23438         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
23439         * lib/gettimeofday.c: Don't include gtod.h.
23440         (GTOD_init): Remove function.
23441         (rpl_gettimeofday): Do its job here instead, rather than aborting.
23442         Suggestion from Volker Borchert.
23443
23444 2001-11-23  Jim Meyering  <meyering@lucent.com>
23445
23446         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
23447         it.
23448         * lib/hash.c (struct hash_table): Define it here instead.
23449
23450 2001-11-22  Jim Meyering  <meyering@lucent.com>
23451
23452         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
23453
23454 2001-11-20  Jim Meyering  <meyering@lucent.com>
23455
23456         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
23457         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
23458
23459 2001-11-19  Jim Meyering  <meyering@lucent.com>
23460
23461         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
23462         directory.  Use "conftestXXXXXX" as the template.
23463         Suggestion from Paul Eggert.
23464
23465         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
23466         immediately, so the test doesn't mistakenly hit the max-open-files
23467         limit.
23468
23469 2001-11-18  Paul Eggert  <eggert@twinsun.com>
23470
23471         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
23472         (TEMPORARIES): New macro.
23473         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
23474         removes an artificial limitation (e.g. HP-UX 10.20, where
23475         TMP_MAX is 17576).
23476
23477 2001-11-18  Jim Meyering  <meyering@lucent.com>
23478
23479         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
23480
23481 2001-11-18  Jim Meyering  <meyering@lucent.com>
23482
23483         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
23484         on SunOS 4.
23485
23486         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
23487         files will be created before anything else.
23488
23489 2001-11-17  Paul Eggert  <eggert@twinsun.com>
23490
23491         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
23492         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
23493
23494 2001-11-17  Jim Meyering  <meyering@lucent.com>
23495
23496         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
23497         Prompted by a report from Bob Proulx.
23498
23499         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
23500         Instead, require UTILS_FUNC_MKSTEMP.
23501
23502 2001-11-17  Jim Meyering  <meyering@lucent.com>
23503
23504         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
23505         Now, that's done as part of AC_FUNC_STRTOD.
23506
23507 2001-11-17  Jim Meyering  <meyering@lucent.com>
23508
23509         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
23510         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
23511         rather than group writable.  Patch by Juan F. Codagnone.
23512
23513         * lib/readtokens.c: Remove explicit declarations of xmalloc and
23514         xrealloc, Instead, include "xalloc.h".
23515
23516         * lib/mountlist.c: Include unlocked-io.h after all system headers.
23517         Remove explicit declarations of xmalloc, xrealloc,
23518         and xstrdup.  Instead, include "xalloc.h".
23519
23520         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
23521         unlocked-io.h.
23522         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
23523         Likewise.
23524         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
23525
23526         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
23527         Reported by Padraig Brady.
23528
23529         * lib/mkstemp.c: #undef mkstemp.
23530         Include config.h.
23531         (rpl_mkstemp): Rename from mkstemp.
23532         Protoize.
23533
23534 2001-11-16  Jim Meyering  <meyering@lucent.com>
23535
23536         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
23537         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
23538         determine the amount of total physical memory, use pstat_getstatic.
23539         HPUX-11 doesn't define _SC_PHYS_PAGES.
23540         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
23541         If sysconf couldn't be used to determine the amount of available
23542         physical memory, use both pstat_getstatic and pstat_getdynamic.
23543         Based on a patch from Bob Proulx.
23544
23545 2001-11-10  Jim Meyering  <meyering@lucent.com>
23546
23547         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
23548         (jm_PREREQ): Use it.
23549
23550 2001-11-09  Jim Meyering  <meyering@lucent.com>
23551
23552         * m4/jm-macros.m4: Require autoconf-2.52f.
23553         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
23554         Use these AC_-prefixed names, not the AM_-prefixed ones.
23555
23556         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
23557
23558 2001-11-05  Jim Meyering  <meyering@lucent.com>
23559
23560         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
23561
23562 2001-11-04  Jim Meyering  <meyering@lucent.com>
23563
23564         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
23565         $DEFS.
23566
23567 2001-11-03  Jim Meyering  <meyering@lucent.com>
23568
23569         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
23570         of AC_DEFUN.
23571
23572         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
23573         know the name of the variable in the macro definition.
23574
23575 2001-11-03  Jim Meyering  <meyering@lucent.com>
23576
23577         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
23578         in argmatch_to_argument call.
23579
23580         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
23581         argument.
23582
23583         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
23584         e.g., a fault due to an attempt to free a NULL pointer.
23585
23586 2001-11-01  Jim Meyering  <meyering@lucent.com>
23587
23588         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
23589         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
23590
23591 2001-11-01  Jim Meyering  <meyering@lucent.com>
23592
23593         * lib/dirfd.c, lib/dirfd.h: New files.
23594         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
23595
23596         * lib/hash.c (hash_print) [TESTING]: Clean up.
23597
23598 2001-10-22  Paul Eggert  <eggert@twinsun.com>
23599
23600         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
23601         to avoid a warning if -Wall.
23602
23603 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
23604
23605         * README: New file
23606         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
23607         (per RMS's instructions, this is now the canonical source)
23608         * lgpl/, gpl/: New directories.
23609
23610 2001-10-21  Paul Eggert  <eggert@twinsun.com>
23611
23612         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
23613
23614 2001-10-21  Jim Meyering  <meyering@lucent.com>
23615
23616         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
23617         this code would end up calling gettext even in packages built
23618         with --disable-nls.
23619         * lib/getopt.c (_): Likewise.
23620         * lib/regex.c (_): Likewise.
23621
23622 2001-10-20  Paul Eggert  <eggert@twinsun.com>
23623
23624         * m4/error.m4 (jm_PREREQ_ERROR):
23625         Do not invoke AC_CHECK_FUNCS with strerror_r, as
23626         AC_FUNC_STRERROR_R does that.
23627         Check for strerror declaration.
23628
23629         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
23630         are supposed to have them these days.
23631         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
23632         Merge changes from latest Autoconf CVS.
23633         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
23634         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
23635         POSIX decided to standardize on the int flavor of strerror_r.
23636
23637 2001-10-20  Paul Eggert  <eggert@twinsun.com>
23638
23639         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
23640         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
23641         Use strerror_r that is only a macro, even if it is not a function.
23642         (strerror): Check for HAVE_DECL_STRERROR before declaring.
23643         (private_strerror): Use prototypes, not old-style function definition.
23644         (print_errno_message): New function.
23645         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
23646         char*-flavored one.
23647         (error_tail, error, error_at_line): Use it.
23648
23649 2001-10-11  Jim Meyering  <meyering@lucent.com>
23650
23651         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
23652         and quote_n (1, ... to avoid clobbering a buffer.
23653
23654 2001-10-05  Jim Meyering  <meyering@lucent.com>
23655
23656         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
23657         hash-pjw.h.
23658         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
23659         * lib/hash-pjw.h: New file.
23660
23661 2001-09-30  Jim Meyering  <meyering@lucent.com>
23662
23663         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
23664         `struct fsstat' has the `f_fstypename' member.
23665         Use that to define FS_TYPE, which is now used to make
23666         the getfsstat link test tighter.
23667
23668 2001-09-30  Jim Meyering  <meyering@lucent.com>
23669
23670         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
23671         Include <sys/ucred.h>, for Apple Darwin.
23672         Include sys/mount.h and sys/fs_types.h only if available.
23673         (FS_TYPE): Define.
23674         (read_filesystem_list): Use FS_TYPE.
23675
23676 2001-09-29  Paul Eggert  <eggert@twinsun.com>
23677
23678         * lib/exclude.c (excluded_filename): 0 -> false, since it's
23679         a boolean context.
23680
23681 2001-09-29  Jim Meyering  <meyering@lucent.com>
23682
23683         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
23684         [one-argument getmntent function]): Include stdio.h before mntent.h.
23685         SunOS 4.1.x needs it for the declaration of `FILE'.
23686         Patch by Volker Borchert.
23687
23688         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
23689         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
23690         sys/fs_types.h, and make the link-test for getfsstat guard #include
23691         directives with appropriate #if HAVE_*_H tests so that we can
23692         detect getfsstat on Apple Darwin1.3.7 systems.
23693         Reported by Nelson Beebe.
23694         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
23695
23696 2001-09-28  Paul Eggert  <eggert@twinsun.com>
23697
23698         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
23699         #defines strtoimax.  Also treat the other strto* functions
23700         like strtoimax.
23701
23702         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
23703         Check for strtoul and strtoumax,
23704         as those declarations are made even in the signed case.
23705         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
23706         Likewise, for strtol and strtoimax.
23707
23708 2001-09-28  Paul Eggert  <eggert@twinsun.com>
23709
23710         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
23711         #defines strtoimax.  Also treat the other strto* functions
23712         like strtoimax.
23713
23714         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
23715         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
23716         (strtoimax, strtoumax): Do not declare if already defined as a macro.
23717
23718 2001-09-26  Jim Meyering  <meyering@lucent.com>
23719
23720         Most macros in unlocked-io.h had the wrong number of arguments.
23721         * lib/gen-uio: New script.
23722         (USE_UNLOCKED_IO): Define to 1 if not already defined.
23723         * lib/unlocked-io.hin: Remove file.
23724         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
23725         rather than trying to embed it here.
23726         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
23727         Reported by Padraig Brady.
23728
23729 2001-09-25  Volker Borchert  <bt@teknon.de>
23730
23731         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
23732         `result'.
23733
23734 2001-09-24  Jim Meyering  <meyering@lucent.com>
23735
23736         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
23737
23738 2001-09-23  Jim Meyering  <meyering@lucent.com>
23739
23740         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
23741         instead of the mere test for existence of mntent.h.  The latter
23742         would get a false-positive on AIX 3.4 systems.
23743         In the outer getmntent if-block, don't die if neither of the getmntent
23744         tests succeeds.  Instead, just fall through and continue with the
23745         remaining tests.
23746
23747 2001-09-23  Jim Meyering  <meyering@lucent.com>
23748
23749         * lib/mountlist.c: Remove useless parentheses in #if directives.
23750         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
23751         the deprecated MOUNTED symbol is no longer defined in mntent.h.
23752
23753 2001-09-22  Jim Meyering  <meyering@lucent.com>
23754
23755         * m4/gettext.m4: New file.  From gettext.
23756         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
23757         * m4/progtest.m4: Likewise
23758         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
23759         * m4/glibc21.m4: Likewise.
23760
23761         * m4/libintl.m4: Remove.  No longer used.
23762
23763 2001-09-22  Jim Meyering  <meyering@lucent.com>
23764
23765         * lib/localcharset.c: Update from latest gettext.
23766         * lib/config.charset: Likewise.
23767
23768 2001-09-20  Jim Meyering  <meyering@lucent.com>
23769
23770         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
23771         strtoimax.
23772         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
23773         strtoumax.
23774
23775 2001-09-20  Jim Meyering  <meyering@lucent.com>
23776
23777         * lib/xstrtol.c (strtoimax): Guard declaration with
23778         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
23779         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
23780         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
23781         (strtoumax): Likewise, for completeness (it wasn't necessary).
23782
23783 2001-09-17  Paul Eggert  <eggert@twinsun.com>
23784
23785         * lib/strtoimax.c (HAVE_LONG_LONG):
23786         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
23787         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
23788         to work around bug in IBM C compiler.
23789
23790 2001-09-17  Jim Meyering  <meyering@lucent.com>
23791
23792         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
23793         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
23794         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
23795         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
23796         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
23797         whenever the right hand side need not be expanded by the shell.
23798
23799 2001-09-16  Paul Eggert  <eggert@twinsun.com>
23800
23801         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
23802         library.  It's not correct, as some older glibcs are buggy.
23803         fnmatch wasn't fixed until glibc 2.2.
23804
23805         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
23806         special shell magic here.
23807
23808 2001-09-16  Jim Meyering  <meyering@lucent.com>
23809
23810         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
23811         * m4/jm-macros.m4: Require it.
23812
23813 2001-09-16  Jim Meyering  <meyering@lucent.com>
23814
23815         * lib/mkdir.c: New file.
23816
23817 2001-09-15  Jim Meyering  <meyering@lucent.com>
23818
23819         * m4/jm-macros.m4: Check for help2man.
23820
23821 2001-09-11  Jim Meyering  <meyering@lucent.com>
23822
23823         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
23824         The body, by Paul Eggert, was moved here from configure.in.
23825         * m4/jm-macros.m4: Require UTILS_HOST_OS.
23826
23827 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23828
23829         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
23830         (jm_PREREQ): Use it.
23831
23832 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23833
23834         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
23835         Use ssize_t, not int, to store result of readlink.
23836         Check for ssize_t overflow as well as size_t overflow,
23837         as POSIX says the result of readlink is implementation-defined
23838         when ssize_t overflows.
23839         Remove unnecessary cast to char*.
23840         Use free+malloc instead of realloc, as the storage doesn't need
23841         to be preserved and it's clearer and can be more efficient that way.
23842         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
23843         * lib/xreadlink.h (xreadlink): Update prototype.
23844
23845 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23846
23847         * lib/xgetcwd.c: Revert some of the previous change; intead,
23848         fix the HAVE_GETCWD_NULL code to behave more like the
23849         !HAVE_GETCWD_NULL code used to.
23850
23851         Include "xalloc.h".
23852         (xgetcwd): Do not return NULL when memory is exhausted; instead,
23853         invoke xalloc_die.
23854
23855 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23856
23857         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
23858         sys/param.h, as pathmax.h includes them.
23859
23860 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23861
23862         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
23863         (jm_PREREQ_XGETCWD): New macro.
23864
23865         * m4/getcwd.m4: New file.
23866
23867 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23868
23869         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
23870         like the HAVE_GETCWD_NULL code.
23871         Include pathmax.h if not HAVE_GETCWD.
23872         Do not include xalloc.h.
23873         (INITIAL_BUFFER_SIZE): New symbol.
23874         Do not use xmalloc / xrealloc, since the caller is responsible for
23875         handling errors.  Preserve errno around `free' during failure.
23876         Do not overrun buffer when using getwd.
23877
23878 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23879
23880         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
23881         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
23882         getcwd (NULL, 0).
23883
23884 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23885
23886         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
23887         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
23888         spotted by Jim Meyering.
23889
23890 2001-09-03  Jim Meyering  <meyering@lucent.com>
23891
23892         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
23893         failure.
23894
23895 2001-09-02  Jim Meyering  <meyering@lucent.com>
23896
23897         * lib/error.c: Update from GNU libc.
23898
23899 2001-09-01  Jim Meyering  <meyering@lucent.com>
23900
23901         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
23902         Used by df.
23903
23904 2001-09-01  Jim Meyering  <meyering@lucent.com>
23905
23906         * lib/xreadlink.c: New file.
23907         * lib/xreadlink.h: New file.
23908         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
23909         xreadlink.h.
23910
23911         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
23912         doesn't conflict with sparc Solaris 7's definition in
23913         /usr/include/sys/int_types.h.
23914
23915         * lib/exclude.c: Use `""', not `<>' to #include non-system header
23916         files.
23917         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
23918         and strncasecmp as r-values.  Unixware didn't have declarations.
23919
23920 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23921
23922         * lib/xstrtol.h: Add copyright notice.
23923         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
23924         LONGINT_INVALID_SUFFIX_CHAR.
23925
23926 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23927
23928         * lib/xstrtol.c (strtoimax): New decl.
23929
23930 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23931
23932         * lib/xgetcwd.c: Don't include pathmax.h.
23933         Include stdlib.h and unistd.h if available.
23934         Include xalloc.h.
23935         (xmalloc, xstrdup, free): Remove decls.
23936         (xgetcwd): Don't assume sizes fit in unsigned.
23937         Check for overflow when computing sizes.
23938         Simplify reallocation code.
23939
23940 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23941
23942         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
23943         a directory's st_size can have an arbitrary value, so the old
23944         usage could waste an arbitrary amount of memory.  All uses
23945         changed.
23946         * lib/savedir.h: Update prototype.
23947
23948 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23949
23950         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
23951
23952         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
23953         old strtoimax.c.
23954
23955         Also, make the following further changes to make this file's
23956         configuration more similar to that of strtol.c:
23957         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
23958         (strtoumax, uintmax_t, strtoull, strtol): Remove.
23959         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
23960         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
23961         changed to signed values.
23962
23963         And make the following changes as well:
23964         Fix copyright notice, as 1999 was missing.
23965         (verify): New macro.
23966         (strtoimax): Check sizes at compile-time, not run-time.
23967         Prefer strtol to strtoll if both work.
23968         (main): Remove; it was not that useful and was a pain to maintain.
23969
23970         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
23971
23972 2001-08-31  Jim Meyering  <meyering@lucent.com>
23973
23974         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
23975         Use an initial, malloc'd, buffer of length 128 rather than
23976         a statically allocated one of length 1024.
23977
23978 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23979
23980         Simplify code, partly by assuming autoconf 2.52 semantics.
23981
23982         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
23983
23984         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
23985         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
23986         All uses removed.
23987         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
23988         Move AC_REQUIRE to next-to-top level, to avoid confusion.
23989         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
23990         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
23991         jm_AC_HEADER_INTTYPES_H.
23992         * m4/jm-macros.m4 (jm_MACROS): Likewise.
23993
23994         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
23995
23996         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
23997         Quote first arg of AC_DEFUN.
23998         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
23999         since they are needed to parse the include file even if we need
24000         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
24001         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
24002         but with opposite signedness.
24003
24004 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24005
24006         Merge 'exclude' changes from tar 1.13.22.
24007         This fixes one or two unlikely storage allocation overflow bugs,
24008         but doesn't change user-visible behavior otherwise.
24009
24010 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24011
24012         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
24013         (jm_PREREQ_EXCLUDE): New macro.
24014
24015 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24016
24017         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
24018         tm to be declared.
24019
24020 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24021
24022         * lib/hash.c: Remove '2001' from copyright notice.
24023
24024 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24025
24026         * lib/full-write.h: New file.
24027         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
24028         * lib/full-write.c: Correct credits, as cccp.c no longer
24029         exists and anyway it was so heavily changed from the old cccp
24030         code as to be unrecognizable.  Include full-write.h.
24031         (full_write) Return size_t, with short writes meaning failure.
24032         All callers changed.  This fixes a bug with large buffers
24033         on 64-bit hosts.
24034         * lib/utime.c: Include full-write.h.
24035
24036 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24037
24038         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
24039         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
24040         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
24041         Include if available.
24042         (<xalloc.h>): Include
24043         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
24044         (verify): New macro.  Use it to verify that EXCLUDE macros do not
24045         collide with FNM macros.
24046         (struct patopts): New struct.
24047         (struct exclude): Use it, as exclude patterns now come with options.
24048         (new_exclude): Support above changes.
24049         (new_exclude, add_exclude_file):
24050         Initial size must now be a power of two to simplify overflow checking.
24051         (free_exclude, fnmatch_no_wildcards): New function.
24052         (excluded_filename): No longer requires options arg, as the options
24053         are determined by add_exclude.  Now returns bool, not int.
24054         (excluded_filename, add_exclude):
24055         Add support for the fancy new exclusion options.
24056         (add_exclude, add_exclude_file): Now takes int options arg.
24057         Check for arithmetic overflow when computing sizes.
24058         (add_exclude_file): xrealloc might modify errno, so don't
24059         realloc until after errno might be used.
24060
24061         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
24062         New macros.
24063         (free_exclude): New decl.
24064         (add_exclude, add_exclude_file): Now takes int options arg.
24065         (excluded_filename): No longer requires options arg, as the options
24066         are determined by add_exclude.  Now returns bool, not int.
24067
24068 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24069
24070         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
24071
24072 2001-08-27  Jim Meyering  <meyering@lucent.com>
24073
24074         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
24075
24076         * lib/version-etc.c (N_): Remove definition.
24077         Revert most of last change.
24078         Instead, simply don't mark the `Copyright...' string for translation.
24079         Based on advice from Paul Eggert.
24080
24081         * lib/strtoxmax.c: Tweak comment.
24082
24083 2001-08-26  Jim Meyering  <meyering@lucent.com>
24084
24085         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
24086
24087         * m4/xstrtoimax.m4: New file.
24088         * m4/xstrtoumax.m4: Add comments explaining why we
24089         AC_REPLACE_FUNCS(strtol).
24090
24091 2001-08-26  Jim Meyering  <meyering@lucent.com>
24092
24093         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
24094         of copyright with `%s' so translators don't get an untranslated
24095         message in 2002.
24096         (COPYRIGHT_YEAR): Define.
24097         (version_etc): Use fprintf rather than fputs.
24098         Suggestion from Ulrich Drepper.
24099
24100         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
24101
24102         * lib/strtoll.c: New file, from GNU libc.
24103         * lib/xstrtoimax.c: New file.
24104
24105         * lib/xstrtol.h: Add xstrtoimax.
24106         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
24107         * lib/strtoimax.c: New file.  Likewise, but first define
24108         STRTOUXMAX_SIGNED.
24109
24110         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
24111         ...
24112         * lib/strtoxmax.c: ... then renamed to this.
24113
24114 2001-08-18  Paul Eggert  <eggert@twinsun.com>
24115
24116         * m4/inttypes.m4: Add AC_PREREQ(2.13).
24117         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
24118         (jm_AC_TYPE_INTMAX_T): New macro.
24119         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
24120
24121         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
24122
24123         * m4/longlong.m4: Renamed from ulonglong.m4.
24124         * m4/inttypes.m4: Renamed from inttypes_h.m4.
24125         * m4/uintmax_t.m4: Removed.
24126
24127 2001-08-13  Paul Eggert  <eggert@twinsun.com>
24128
24129         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
24130         Port to Solaris 8, where 'sed' requires a space after the 'r'
24131         command, and where sh dislikes "$/".  Clean up the spacing a bit.
24132         Redirect output to $tmp just once.
24133
24134 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
24135
24136         * lib/addext.c (<errno.h>): Include.
24137         (errno): Declare if not defined.
24138         (addext): Work correctly when pathconf returns -1 and leaves
24139         errno alone because there is no limit.  Also, work even if
24140         pathconf returns a value greater than SIZE_MAX.
24141
24142 2001-08-12  Jim Meyering  <meyering@lucent.com>
24143
24144         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
24145         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
24146         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
24147         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
24148         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
24149         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
24150         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
24151         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
24152         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
24153         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
24154         utime.m4, utimes.m4, xstrtoumax.m4:
24155         Quote the first argument in each use of AC_DEFUN.
24156
24157 2001-08-12  Jim Meyering  <meyering@lucent.com>
24158
24159         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
24160         Simply `return getcwd (NULL, 0);'.
24161         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
24162         Use 1300 as initial value for length, not PATH_MAX.
24163
24164         * lib/pathmax.h: Clean up cpp syntax.
24165
24166 2001-08-12  Jim Meyering  <meyering@lucent.com>
24167
24168         * lib/gettimeofday.c: New file.
24169         * lib/gtod.h: New file.
24170         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
24171
24172 2001-08-05  Jim Meyering  <meyering@lucent.com>
24173
24174         * m4/jm-macros.m4: Require autoconf-2.52.
24175
24176 2001-08-04  Jim Meyering  <meyering@lucent.com>
24177
24178         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
24179         stmt, to get in sync with glibc.
24180
24181 2001-08-03  Paul Eggert  <eggert@twinsun.com>
24182
24183         The following changes are from gettext 0.10.39 as maintained by
24184         Bruno Haible.
24185
24186         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
24187         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
24188         with inverted sense.  All uses changed.
24189
24190         * lib/mbswidth.c: Don't include <limits.h>.
24191         Include <stdlib.h> and <string.h> unconditionally.
24192         (iswcntrl, mbsinit, ISCNTRL): New macros.
24193         (mbsnwidth): Use K&R style function declarations.
24194         Don't bother checking for MB_LEN_MAX == 1, since the compiler
24195         can optimize it when MB_CUR_MAX == 1.
24196         The width of control characters is zero, not 1.
24197
24198 2001-08-03  Paul Eggert  <eggert@twinsun.com>
24199
24200         The following changes are from gettext 0.10.39 as maintained by
24201         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
24202
24203         * m4/codeset.m4: Upgrade to serial AM1.
24204         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
24205         all uses changed.  Quote first arg of AC_DEFUN.
24206         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
24207
24208         * m4/iconv.m4: Upgrade to serial AM2.
24209         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
24210         Add --with-libconv-prefix.
24211         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
24212         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
24213         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
24214         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
24215         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
24216
24217         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
24218         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
24219         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
24220         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
24221         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
24222         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
24223         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
24224         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
24225         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
24226
24227         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
24228         string.h any more.
24229
24230         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
24231         not the default value.
24232
24233         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
24234         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
24235         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
24236         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
24237         Also check for iswcntrl, used for wcwidth fallback.
24238         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
24239         to Autoconf 2.13.
24240
24241 2001-08-03  Jim Meyering  <meyering@lucent.com>
24242
24243         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
24244         as it was in the original.  Reported by Paul Eggert.
24245
24246 2001-07-16  Jim Meyering  <meyering@lucent.com>
24247
24248         * m4/gettimeofday.m4: New file.
24249         Prompted by a report from Bernhard Baehr.
24250
24251 2001-07-15  Jim Meyering  <meyering@lucent.com>
24252
24253         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
24254         stuff. Now it's in ../Makefile.cfg.
24255
24256 2001-07-15  Jim Meyering  <meyering@lucent.com>
24257
24258         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
24259         (BUILT_SOURCES): Add unlocked-io.h.
24260         (io_functions): Define.
24261         (unlocked-io.h): New rule.
24262         (DISTCLEANFILES): Add unlocked-io.h.
24263         (all-local): Depend on unlocked-io.h, to ensure it is created.
24264
24265         * lib/unlocked-io.hin: New file
24266
24267         * lib/regex.c: Update from glibc.
24268
24269 2001-07-05  Jim Meyering  <meyering@lucent.com>
24270
24271         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
24272         recommendation.
24273         (libfetish_a_SOURCES): Put all .h files here instead.
24274         Remove a thus-exposed (better checks in automake) duplicate and
24275         two unnecessary .h files.
24276
24277 2001-07-04  Jim Meyering  <meyering@lucent.com>
24278
24279         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
24280         that generates jm-glibc-io.m4 so that it doesn't trigger any make
24281         distcheck failure.
24282
24283 2001-07-02  Jim Meyering  <meyering@lucent.com>
24284
24285         The following changes were prompted by suggestions from Bruno Haible.
24286
24287         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
24288         is now generated.
24289         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
24290         definition of EXTRA_DIST.
24291         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
24292         ensure that the generated file is created/updated whenever the list
24293         of $(unlocked_functions) is changed.
24294         (jm-glibc-io.m4): New rule.
24295         (unlocked-io.h): New rule -- currently unused.
24296
24297 2001-06-24  Jim Meyering  <meyering@lucent.com>
24298
24299         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
24300         unmatched right bracket, rather than kludging it with an extra,
24301         falsely-matching quote in a comment.  Patch by Akim Demaille.
24302
24303 2001-06-11  Jim Meyering  <meyering@lucent.com>
24304
24305         * lib/regex.c: Update from GNU libc.
24306
24307 2001-05-27  Jim Meyering  <meyering@lucent.com>
24308
24309         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
24310         Check for ut_type in struct utmp.
24311
24312 2001-05-27  Jim Meyering  <meyering@lucent.com>
24313
24314         * lib/readutmp.h (UT_TYPE): Define.
24315
24316 2001-05-24  Jim Meyering  <meyering@lucent.com>
24317
24318         * lib/argmatch.c: Include "quote.h".
24319         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
24320         quote function.  Reported by Göran Uddeborg.
24321
24322 2001-05-22  Jim Meyering  <meyering@lucent.com>
24323
24324         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
24325         now that we use the package-supplied version unconditionally.
24326         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
24327
24328 2001-05-21  Jim Meyering  <meyering@lucent.com>
24329
24330         * m4/regex.m4: Change a couple backticks to single quotes to avoid
24331         shell syntax errors.
24332
24333 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
24334
24335         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
24336
24337 2001-05-20  Paul Eggert  <eggert@twinsun.com>
24338
24339         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
24340         Don't bother to check library strftime, since
24341         we'll be using our own my_strftime function anyway.
24342         Define my_strftime instead of strftime.
24343
24344 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
24345
24346         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
24347         which is not yet declared.
24348
24349 2001-05-15  Jim Meyering  <meyering@lucent.com>
24350
24351         * m4/regex.m4: Use proper quoting so brackets appear in the test
24352         program.
24353         Reported by, and with help from, Bruno Haible.
24354
24355 2001-05-13  Jim Meyering  <meyering@lucent.com>
24356
24357         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
24358         undefined.
24359
24360 2001-05-11  Paul Eggert  <eggert@twinsun.com>
24361
24362         dirname code cleanup.  base_name now behaves more compatibly
24363         with POSIX basename when given file names that have trailing
24364         slashes, and similarly for dir_name.  Add new primitives
24365         base_len and dir_len.  Put the directory-name-related decls
24366         into dirname.h.
24367
24368         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
24369         * lib/backupfile.c (base_name): Likewise.
24370         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
24371         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
24372         * lib/makepath.c (strip_trailing_slashes): Likewise.
24373         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
24374         ISSLASH): Likewise.
24375         * lib/rename.c (strip_trailing_slashes): Likewise.
24376         * lib/same.c (base_name): Likewise.
24377         * lib/stripslash.c (ISSLASH): Likewise.
24378
24379         * lib/addext.c: Include <dirname.h> after size_t is defined.
24380         * lib/backupfile.c: Likewise.
24381
24382         * lib/addext.c (addext): Use base_len to trim redundant
24383         trailing slashes instead of doing it ourselves.
24384         But do not trim the last slash if it is not redundant.
24385
24386         * lib/backupfile.c (find_backup_file_name,
24387         max_backup_version): Use base_len instead of rolling it ourselves.
24388         Handle the case of "" and (on DOS) "C:" correctly.
24389
24390         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
24391         needed. Include <string.h>, <dirname.h>.
24392         (base_name): Allow file names ending in slashes, other than names
24393         that are all slashes.  In this case, return the basename followed
24394         by the slashes.  This is more general, and can be used in places
24395         where the original base_name purposely had an assertion failure.
24396         (base_len): New function.
24397
24398         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
24399         Do not include <assert.h>; no longer needed.
24400         Include xalloc.h.
24401         (memrchr): Remove decl.
24402         (dir_name_r): Remove.
24403         (dir_len): Renamed from dirlen.  All callers changed.
24404         Rewrite in terms of base_name, for simplicity and consistency.
24405         (dir_name): Never return NULL.  All callers changed.
24406         Do not include <stdlib.h> in test program; no longer needed.
24407         return 0; is fine for test program.
24408
24409         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
24410         New macros.
24411         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
24412
24413         * lib/path-concat.c (path_concat): Use base_len to compute
24414         base length, not strlen; this means we cannot rely on memcpy
24415         to null-terminate.
24416
24417         * lib/same.c (STREQ): Remove.
24418         (same_name): Handle the case where the basename ends in trailing '/'.
24419
24420         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
24421         a slash was stripped.  Do not strip the last slash after a
24422         file system prefix.
24423
24424 2001-05-11  Paul Eggert  <eggert@twinsun.com>
24425
24426         * lib/Makefile.am (libfetish_a_SOURCES):
24427         Add strftime.c, since we now compile it on all hosts.
24428
24429         * lib/strftime.c (my_strftime):
24430         Define to nstrftime if emacs, but only if my_strftime is not defined.
24431         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
24432         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
24433         Add one more extra argument: a nanoseconds value.
24434         All uses changed.
24435         (ns): New macro.
24436         (my_strftime function): Add %N format.
24437         (emacs_strftimeu): Renamed from emacs_strftime,
24438         with extra ut argument.
24439
24440 2001-05-09  Paul Eggert  <eggert@twinsun.com>
24441
24442         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
24443
24444 2001-04-21  Jim Meyering  <meyering@lucent.com>
24445
24446         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
24447         doesn't interfere.
24448
24449 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
24450
24451         * m4/ftruncate.m4: Check for chsize.
24452         Link with ftruncate.o unconditionally if ftruncate is missing.
24453         This was required when cross-compiling to i586-mingw32msvc.
24454
24455 2001-04-08  Jim Meyering  <meyering@lucent.com>
24456
24457         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
24458         recomputed; that's necessary when the offset spans a DST transition.
24459         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
24460
24461 2001-04-02  Jim Meyering  <meyering@lucent.com>
24462
24463         * lib/regex.h, regex.c: Update from GNU libc.
24464
24465 2001-03-24  Jim Meyering  <meyering@lucent.com>
24466
24467         * m4/jm-macros.m4: Require autoconf-2.49d.
24468
24469 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
24470
24471         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
24472
24473 2001-03-19  Paul Eggert  <eggert@twinsun.com>
24474
24475         * lib/version-etc.c (version_etc_copyright): Update to 2001.
24476
24477 2001-03-17  Jim Meyering  <meyering@lucent.com>
24478
24479         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
24480         now that the version in autoconf is equivalent.
24481         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
24482
24483         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
24484         Suggestion from Akim Demaille.
24485
24486         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
24487         (jm_PREREQ_TEMPNAME): New function.
24488
24489 2001-03-16  Paul Eggert  <eggert@twinsun.com>
24490
24491         * lib/tempname.c (uint64_t): Define to uintmax_t if
24492         not defined, and if UINT64_MAX is not defined.
24493         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
24494         Reported by John David Anglin.
24495
24496 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
24497
24498         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
24499         resolve alias if codeset is empty.
24500         * lib/config.charset (BeOS): Use wildcard syntax.
24501
24502 2001-03-13  Jim Meyering  <meyering@lucent.com>
24503
24504         * lib/path-concat.c (path_concat)
24505         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
24506         concatenating e.g., `C:' and `foo'.
24507         From Bruno Haible.
24508
24509 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
24510
24511         * lib/localcharset.c (locale_charset): Don't use
24512         setlocale(LC_CTYPE,NULL). Don't return NULL.
24513         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
24514
24515 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
24516
24517         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
24518         support for DOS/DJGPP.
24519
24520 2001-03-01  Paul Eggert  <eggert@twinsun.com>
24521
24522         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
24523         lacks mkstemp.  Compile our own tempname.c if we compile our own
24524         mkstemp.c, as mkstemp relies on tempname.
24525
24526 2001-03-01  Jim Meyering  <meyering@lucent.com>
24527
24528         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
24529         AH_VERBATIM really does output its argument verbatim.
24530
24531 2001-02-28  Paul Eggert  <eggert@twinsun.com>
24532
24533         * lib/Makefile.am (libfetish_a_SOURCES):
24534         Add dup-safer.c, fopen-safer.c.
24535         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
24536
24537         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
24538         * lib/unistd-safer.h: New files.
24539
24540 2001-02-25  Paul Eggert  <eggert@twinsun.com>
24541
24542         The mkstemp replacement is taken from glibc 2.2.2, with some
24543         portability fixes for use outside glibc, as follows:
24544
24545         * lib/tempname.c (struct_stat64): New macro.
24546         (direxists, __gen_tempname): Use it.
24547         This avoids a portability problem with Solaris 8.
24548
24549         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
24550         (<stddef.h>, <stdint.h>, <string.h>):
24551         Include only if STDC_HEADERS || _LIBC.
24552         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
24553         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
24554         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
24555         (__set_errno): Define this macro if <errno.h> doesn't.
24556         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
24557         Define these macros if <stdio.h> doesn't.
24558         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
24559         Define these macros if <sys/stat.h>
24560         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
24561         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
24562         __xstat64): Define if not _LIBC.
24563         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
24564         (__gen_tempname): Invoke gettimeofday only if
24565         HAVE_GETTIMEOFDAY || _LIBC;
24566         otherwise, fall back on plain "time".
24567         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
24568
24569         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
24570
24571         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
24572
24573 2001-02-18  Paul Eggert  <eggert@twinsun.com>
24574
24575         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
24576
24577 2001-02-17  Paul Eggert  <eggert@twinsun.com>
24578
24579         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
24580         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
24581         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
24582         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
24583
24584 2001-02-17  Paul Eggert  <eggert@twinsun.com>
24585
24586         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
24587         Remove workaround macros for hosts that have mbrtowc but not
24588         mbstate_t, as we now insist on proper declarations for both
24589         before using mbrtowc.
24590
24591 2001-02-17  Jim Meyering  <meyering@lucent.com>
24592
24593         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
24594         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
24595         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
24596         UnixWare 7.1.1.
24597
24598         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
24599         rather than AC_CACHE_VAL.
24600
24601 2001-02-17  Jim Meyering  <meyering@lucent.com>
24602
24603         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
24604         around included file name.
24605
24606         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
24607
24608         * lib/strftime.c: Update from GNU libc (the only changes were to
24609         comments).
24610
24611 2001-02-17  Jim Meyering  <meyering@lucent.com>
24612
24613         * lib/regex.c: Update from libc.
24614
24615 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
24616
24617         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
24618         clash.
24619
24620 2001-02-16  Paul Eggert  <eggert@twinsun.com>
24621
24622         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
24623         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
24624         Reported by Mark Hounschell via Paul Eggert.
24625
24626 2001-02-07  Jim Meyering  <meyering@lucent.com>
24627
24628         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
24629
24630 2001-02-05  Jim Meyering  <meyering@lucent.com>
24631
24632         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
24633         it includes the patch required for `large file' support with at least
24634         HP-UX's 10.20 /bin/cc.
24635
24636 2001-02-03  Jim Meyering  <meyering@lucent.com>
24637
24638         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
24639         AS_IF, now that it works once again (mysteriously).
24640         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
24641
24642 2001-01-30  Jim Meyering  <meyering@lucent.com>
24643
24644         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
24645         * m4/chown.m4: Rename conftestchown to conftest.chown.
24646         * m4/rename.m4: s/conftestdir/conftest.d1/ and
24647         s/conftestdir2/conftest.d2/.
24648         * m4/utimes.m4: s/conftestdata/conftest.data/
24649         Inspired by Pavel Roskin's change in autoconf.
24650
24651 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
24652
24653         * lib/config.charset: Update for FreeBSD 4.2.
24654
24655 2001-01-27  Jim Meyering  <meyering@lucent.com>
24656
24657         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
24658         a use of AS_IF.
24659         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
24660
24661 2001-01-26  Jim Meyering  <meyering@lucent.com>
24662
24663         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
24664         quotearg.c includes it.
24665
24666 2001-01-26  Jim Meyering  <meyering@lucent.com>
24667
24668         * lib/quotearg.c: Include stddef.h.
24669         * lib/quote.c: Include stddef.h.
24670         Reported by Axel Kittenberger.
24671
24672         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
24673         line in double quotes so that it evokes a better diagnostic.
24674         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
24675         Reported by Axel Kittenberger.
24676
24677 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
24678
24679         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
24680         as if it was a `charset'.
24681
24682 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
24683
24684         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
24685         has const.
24686
24687 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
24688
24689         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
24690         to avoid a warning.  Add back 'const' to inptr.
24691
24692 2001-01-20  Jim Meyering  <meyering@lucent.com>
24693
24694         Be sure that headers are checked before used in code compiled
24695         for the type checks.
24696         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
24697         In place of that, invoke jm_CHECK_ALL_TYPES.
24698         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
24699         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
24700         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
24701         The check for ssize_t was mistakenly run before the test for unistd.h.
24702
24703         The configure-time check for stdbool.h was missing.
24704         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
24705         (jm_PREREQ_HASH): New function.
24706
24707 2001-01-17  Jim Meyering  <meyering@lucent.com>
24708
24709         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
24710         for autoconf-2.49c.
24711         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
24712
24713 2001-01-16  Jim Meyering  <meyering@lucent.com>
24714
24715         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
24716         From Bruno Haible.
24717
24718 2001-01-14  Jim Meyering  <meyering@lucent.com>
24719
24720         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
24721         foo and bar.  Create conftestdir/ in the script, not in the C code.
24722         Remove directories in the script, not in the C code.
24723         Remove conftestdir{,2} before trying to create the directory.
24724         Make the entire configure script fail if the mkdir fails.
24725
24726 2001-01-14  Jim Meyering  <meyering@lucent.com>
24727
24728         * lib/rename.c: New file.  From Volker Borchert.
24729         Include stdlib.h, string.h or strings.h, and xalloc.h.
24730         Use strip_trailing_slashes rather than open-coding it.
24731
24732 2001-01-03  Paul Eggert  <eggert@twinsun.com>
24733
24734         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
24735
24736 2001-01-03  Jim Meyering  <meyering@lucent.com>
24737
24738         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
24739         of local `inptr' to avoid warning with some system declarations of
24740         iconv.
24741
24742 2001-01-02  Volker Borchert  <bt@teknon.de>
24743
24744         * m4/rename.m4: New file.
24745         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
24746
24747 2001-01-01  Jim Meyering  <meyering@lucent.com>
24748
24749         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
24750         even on systems with utmpx.h.  It's necessary for the declaration of
24751         utmp's ut_user member.  Reported by Andreas Jaeger.
24752
24753         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
24754         available. They are required for the declarations of getgrgid and
24755         getpwuid resp.
24756         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
24757         Reported by Andreas Jaeger.
24758
24759 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
24760
24761         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
24762         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
24763         so `make install' also works in VPATH builds.
24764
24765 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
24766
24767         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
24768         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
24769         can be used in subdirectories.
24770
24771 2000-12-29  Paul Eggert  <eggert@twinsun.com>
24772
24773         * lib/modechange.c: Do not assume that mode_t uses the
24774         traditional octal encoding.  E.g. "chmod 1 FOO" should set
24775         the other-execute bit of FOO even if S_IXOTH != 1.
24776
24777         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
24778         WOTH, XOTH, ALLM): New macros.
24779         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
24780          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
24781         Use them.
24782         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
24783         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
24784         (mode_compile):
24785         No need to use uintmax_t; unsigned long is long enough.
24786         Don't bother to get suffix since we don't use it.
24787
24788 2000-12-26  Jim Meyering  <meyering@lucent.com>
24789
24790         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
24791         better with autoheader.
24792
24793 2000-12-24  Jim Meyering  <meyering@lucent.com>
24794
24795         * lib/hash.c (is_prime): Return explicit boolean values.
24796         (hash_get_first): Return NULL to appease Irix5.6's 89.
24797         Reported by Nelson Beebe.
24798
24799 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
24800
24801         * lib/localcharset.c (locale_charset): Add support for Win32.
24802
24803 2000-12-18  Paul Eggert  <eggert@twinsun.com>
24804
24805         * lib/physmem.h, lib/physmem.c: New files.
24806
24807         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
24808         (noinst_HEADERS): Add physmem.h.
24809
24810         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
24811         't' for compatibility with Solaris 8 sort.
24812
24813 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
24814
24815         * lib/config.charset: Add support for BeOS.
24816
24817 2000-12-17  Jim Meyering  <meyering@lucent.com>
24818
24819         * m4/dos.m4 (jm_AC_DOS): New file and macro.
24820         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
24821
24822 2000-12-16  Jim Meyering  <meyering@lucent.com>
24823
24824         This bug had a serious impact on chown: `chown N:M FILE' (for integer
24825         N and M) would have treated it like `chown N:N FILE'.
24826
24827         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
24828
24829 2000-12-16  Jim Meyering  <meyering@lucent.com>
24830
24831         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
24832         SHELLS_FILE to a file name that's useful on djgpp systems.
24833         Include stdlib.h.
24834         (ADDITIONAL_DEFAULT_SHELLS): Define.
24835         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
24836         Based mostly on a patch from Prashant TR.
24837
24838 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
24839
24840         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
24841         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
24842         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
24843
24844 2000-12-08  Andreas Schwab  <schwab@suse.de>
24845
24846         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
24847         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
24848
24849 2000-12-07  Jim Meyering  <meyering@lucent.com>
24850
24851         * lib/stripslash.c (ISSLASH): Define.
24852         (strip_trailing_slashes): Use ISSLASH rather than comparing against
24853         `/'.
24854         From Prashant TR.
24855
24856         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
24857         (dir_name_r): Declare this function as static.
24858         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
24859         manifest itself on a name containing a mix of slashes and
24860         backslashes.
24861         Make this function work with names starting with a DOS-style
24862         drive letter and colon prefix.
24863         (dir_name): Append `.' if necessary.
24864         Based mostly on patches from Prashant TR and Eli Zaretskii.
24865
24866         * lib/dirname.h (dir_name_r): Remove prototype.
24867
24868 2000-12-06  Paul Eggert  <eggert@twinsun.com>
24869
24870         * m4/off_t-format.m4: Remove this file.
24871         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
24872
24873 2000-12-06  Jim Meyering  <meyering@lucent.com>
24874
24875         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
24876         replacement strtoull, we may well need the replacement strtoul, too.
24877         Check for declarations of strtoul and strtoull.
24878         Check for strtol.  Mainly as a cue to cause automake to include
24879         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
24880         Check for limits.h -- strtol.c needs it.
24881
24882 2000-12-05  Jim Meyering  <meyering@lucent.com>
24883
24884         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
24885
24886 2000-12-04  Jim Meyering  <meyering@lucent.com>
24887
24888         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
24889         Also include memory.h, stdlib.h, unistd.h if appropriate.
24890         Reported by Andreas Jaeger (conflicting declaration of malloc).
24891
24892 2000-12-02  Jim Meyering  <meyering@lucent.com>
24893
24894         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
24895         * m4/jm-macros.m4 (jm_MACROS): require it.
24896
24897 2000-12-02  Jim Meyering  <meyering@lucent.com>
24898
24899         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
24900
24901 2000-12-01  Paul Eggert  <eggert@twinsun.com>
24902
24903         * lib/memrchr.c: Include <config.h> before any system include file.
24904
24905 2000-11-30  Jim Meyering  <meyering@lucent.com>
24906
24907         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
24908
24909 2000-11-30  Jim Meyering  <meyering@lucent.com>
24910
24911         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
24912
24913 2000-11-29  Paul Eggert  <eggert@twinsun.com>
24914
24915         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
24916
24917 2000-11-26  Jim Meyering  <meyering@lucent.com>
24918
24919         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
24920
24921 2000-11-22  Paul Eggert  <eggert@twinsun.com>
24922
24923         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
24924         size of (size_t) -1; it's not portable.
24925
24926 2000-11-17  Jim Meyering  <meyering@lucent.com>
24927
24928         * lib/strstr.c: Update from GNU libc.
24929
24930 2000-11-17  Akim Demaille  <akim@epita.fr>
24931
24932         * lib/obstack.h: Formatting changes.
24933         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
24934         prevent type checking.
24935         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
24936         cast the value to (void *): assigning a `foo *' to a `void *'
24937         variable is valid.
24938         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
24939
24940 2000-11-16  Jim Meyering  <meyering@lucent.com>
24941
24942         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
24943
24944 2000-11-11  Jim Meyering  <meyering@lucent.com>
24945
24946         * lib/error.c: Add a couple #includes, merging from GNU libc version.
24947
24948 2000-11-10  Jim Meyering  <meyering@lucent.com>
24949
24950         * lib/obstack.h: Update from GNU libc.
24951         * lib/obstack.c: Likewise.
24952
24953 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
24954
24955         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
24956
24957 2000-11-06  Paul Eggert  <eggert@twinsun.com>
24958
24959         * lib/getusershell.c (setusershell): Use rewind rather than
24960         fseek/fseeko, to avoid configuration hassles with fseeko.
24961         Don't bother opening SHELLS_FILE if shellstream is NULL;
24962         it's not necessary.
24963
24964 2000-11-05  Jim Meyering  <meyering@lucent.com>
24965
24966         * lib/makepath.h (make_dir): Declare.
24967         * lib/makepath.c (make_dir): Remove `static' attribute.
24968         Tweak a comment.
24969
24970 2000-11-04  Jim Meyering  <meyering@lucent.com>
24971
24972         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
24973
24974 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
24975
24976         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
24977         last one in a bucket, advance to the next bucket.
24978
24979 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
24980
24981         * lib/fnmatch.c: Do not comment out all the code if we are using
24982         the GNU C library, because in some cases we are replacing buggy
24983         code in the GNU C library itself.
24984
24985 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
24986
24987         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
24988         (regex_compile): Catch bogus \(\1\).
24989
24990 2000-10-30  Paul Eggert  <eggert@twinsun.com>
24991
24992         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
24993         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
24994         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
24995
24996 2000-10-30  Paul Eggert  <eggert@twinsun.com>
24997
24998         * lib/error.h, getline.h, modechange.h:
24999         Remove "2000" from Copyright line, as the file hasn't been
25000         changed this year other than in the copyright notice.
25001
25002         * lib/xalloc.h: Add "2000" to Copyright line, as this file
25003         was changed this year.
25004
25005 2000-10-29  Jim Meyering  <meyering@lucent.com>
25006
25007         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
25008         renaming.
25009         * m4/ls-mntd-fs.m4: Likewise
25010
25011 2000-10-29  Jim Meyering  <meyering@lucent.com>
25012
25013         * lib/xstat.in: Fix grammar in comment.
25014
25015 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
25016
25017         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
25018         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
25019         doesn't define __restrict_arr.
25020
25021 2000-10-28  Jim Meyering  <meyering@lucent.com>
25022
25023         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
25024         (jm_PREREQ_MEMCHR): New function.
25025
25026 2000-10-28  Jim Meyering  <meyering@lucent.com>
25027
25028         * lib/memchr.c: Update from libc.
25029         Adjust for portability:
25030         [HAVE_STDLIB_H]: Include stdlib.h.
25031         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
25032         Undef __memchr, too.
25033         [!weak_alias]: Define __memchr to memchr.
25034
25035         * lib/regex.c: Update from libc.
25036         * lib/regex.h: Likewise.
25037         * lib/getopt1.c: Likewise.
25038         * lib/memcmp.c: Likewise.
25039
25040         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
25041         Avoid using fseek, when possible -- it's broken by design.
25042         Patch by Ulrich Drepper.
25043
25044 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
25045
25046         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
25047         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
25048         Giving in to popular pressure to shut up the compiler with casts.
25049
25050 2000-10-26  Jim Meyering  <meyering@lucent.com>
25051
25052         * lib/strftime.c: Update from libc.
25053
25054 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
25055
25056         * regex.c: More `unsigned char' -> `re_char' changes.
25057         Also change several `int' into `re_wchar_t'.
25058         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
25059         (PUSH_FAILURE_POINTER): Don't cast any more.
25060         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
25061         We want GCC to complain, since this piece of code makes
25062         re_match non-reentrant, which *should* be fixed.
25063         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
25064         (EXTEND_BUFFER): Use RETALLOC.
25065         (SET_LIST_BIT): Don't cast.
25066         (re_wchar_t): New type.
25067         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
25068         that those two functions will always properly return.
25069         (IMMEDIATE_QUIT_CHECK): Cast to void.
25070         (analyse_first): Use recursion rather than an explicit stack.
25071         (re_compile_fastmap): Can't fail anymore.
25072         (re_search_2): Don't check re_compile_fastmap for failure.
25073         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
25074         Now also sets the new value (passed in a new argument).
25075         (re_match_2_internal): Use it.
25076         Also, use a new var `reg' of type size_t when looping through regs
25077         rather than reuse the inappropriate `mcnt'.
25078
25079 2000-10-25  Jim Meyering  <meyering@lucent.com>
25080
25081         * lib/obstack.c: Update from libc.
25082
25083 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
25084
25085         * regex.c (regex_compile): Change the way of handling a range from
25086         a char less than 256 to a char not less than 256.
25087
25088 2000-10-24  Andrew Innes  <andrewi@gnu.org>
25089
25090         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
25091         NT-Emacs only.
25092         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
25093         so that re_search functions only quit when callers expect them to.
25094
25095 2000-10-23  Jim Meyering  <meyering@lucent.com>
25096
25097         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
25098         wrong.  That set_locale call must not have any side effects.
25099         From Paul Eggert.
25100
25101 2000-10-22  Jim Meyering  <meyering@lucent.com>
25102
25103         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
25104         [CYCLIC]: Remove now-unused definition.
25105
25106         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
25107         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
25108         Suggestion from Ulrich Drepper.
25109
25110 2000-10-21  Jim Meyering  <meyering@lucent.com>
25111
25112         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
25113         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
25114         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
25115
25116 2000-10-21  Jim Meyering  <meyering@lucent.com>
25117
25118         * lib/dirname.c (memrchr): Declare if necessary.
25119         (dir_name): Remove the restriction that there be no
25120         trailing slashes.  Now, this code skips past them, effectively
25121         ignoring them.
25122         [TEST_DIRNAME] (main): New unit tests.
25123
25124         * lib/memrchr.c: New file from GNU libc.
25125         Undef __memrchr, too.
25126         [!weak_alias]: Define __memrchr to memrchr.
25127         Guard weak_alias use with `#ifdef weak_alias'.
25128
25129 2000-10-21  Jim Meyering  <meyering@lucent.com>
25130
25131         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
25132         (dir_name): Use dir_name_r.
25133         * lib/dirname.h (dir_name_r): Declare it.
25134
25135 2000-10-17  Jim Meyering  <meyering@lucent.com>
25136
25137         * lib/quote.h (PARAMS): Define and use.
25138         Reported by Akim Demaille.
25139
25140         * lib/getopt.c: Update from libc.
25141
25142 2000-10-16  Jim Meyering  <meyering@lucent.com>
25143
25144         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
25145         setlocale.
25146         From Jan Fedak.
25147
25148 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
25149
25150         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
25151
25152 2000-09-25  Jim Meyering  <meyering@lucent.com>
25153
25154         * lib/md5.h (rol): Define (from GnuPG).
25155
25156         * lib/sha.c: Give credit (GnuPG) where due.
25157         (M): Use rol rather than open-coding it.
25158         Add a FIXME comment.
25159
25160 2000-09-21  Jim Meyering  <meyering@lucent.com>
25161
25162         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
25163         Reported by Michael Stone.
25164
25165 2000-09-20  Jim Meyering  <meyering@lucent.com>
25166
25167         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
25168         (noinst_HEADERS): Add sha.h.
25169         Based on code from Scott G. Miller and from GnuPG.
25170
25171 2000-09-18  Jim Meyering  <meyering@lucent.com>
25172
25173         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
25174         LIBS. Otherwise, everyone ends up linking with -lelf for some
25175         configurations.
25176         Reported by Mike Stone.
25177
25178 2000-09-15  Jim Meyering  <meyering@lucent.com>
25179
25180         * lib/regex.c: Update from libc.
25181
25182 2000-09-10  Jim Meyering  <meyering@lucent.com>
25183
25184         * lib/getopt.c (_getopt_internal): Update from glibc.
25185
25186 2000-09-09  Jim Meyering  <meyering@lucent.com>
25187
25188         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
25189         think it should be used as a general replacement for isascii.
25190         * lib/fnmatch.c: Likewise.
25191         * lib/mbswidth.c: Likewise
25192         * lib/regex.c: Likewise.
25193
25194         Don't use atoi.
25195         * lib/userspec.c: Include sys/param.h and limits.h.
25196         Include xstrtol.h.
25197         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
25198         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
25199         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
25200         UID, GID.  Check range.
25201
25202 2000-09-06  Jim Meyering  <meyering@lucent.com>
25203
25204         * lib/getopt.c (_getopt_internal): Update from glibc.
25205
25206 2000-08-30  Jim Meyering  <meyering@lucent.com>
25207
25208         * lib/strftime.c: Merge in changes from GNU libc.
25209
25210 2000-08-26  Jim Meyering  <meyering@lucent.com>
25211
25212         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
25213         * m4/fpending.m4: New file.
25214
25215 2000-08-26  Jim Meyering  <meyering@lucent.com>
25216
25217         * lib/closeout.c: Include "__fpending.h".
25218         (close_stdout_status): Return right away if there's nothing to flush.
25219
25220         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
25221         * lib/__fpending.c: New file.
25222         * lib/__fpending.h: New file.
25223
25224 2000-08-20  Jim Meyering  <meyering@lucent.com>
25225
25226         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
25227         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
25228         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
25229
25230 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
25231
25232         Improve fileutils installation on systems where running
25233         programs (like install) can't be unlinked.
25234         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
25235         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
25236
25237 2000-08-07  Paul Eggert  <eggert@twinsun.com>
25238
25239         Standardize on "memory exhausted" instead of "Memory exhausted"
25240         or "virtual memory exhausted".
25241         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
25242         "virtual memory exhausted".
25243         * lib/same.c (same_name): Invoke xalloc_die instead of printing
25244         our own message.
25245         * lib/userspec.c (parse_user_spec): Likewise.
25246         * lib/bumpalloc.h: comment fix
25247         * lib/same.c, userspec.c: Include xalloc.h.
25248
25249         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
25250         not char *const and pointing to a constant array.
25251         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
25252         (xrealloc): Comment fix.
25253
25254         * lib/userspec.c (parse_user_spec):
25255         Don't translate a message until just before returning,
25256         to avoid unnecessary translation.
25257
25258 2000-08-07  Jim Meyering  <meyering@lucent.com>
25259
25260         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
25261         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
25262         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
25263         getgroups.c, gethostname.c, getopt.h, group-member.c,
25264         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
25265         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
25266         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
25267         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
25268         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
25269         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
25270         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
25271         yesno.c: Back out Copyright date changes for each file with no change
25272         this year.  This eases coordination with other programs using the same
25273         source code modules.  From Paul Eggert.
25274
25275 2000-08-06  Paul Eggert  <eggert@twinsun.com>
25276
25277         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
25278         not char, for compatibility with glibc 2.1.3 strftime.c.
25279
25280 2000-08-03  Greg McGary  <greg@mcgary.org>
25281
25282         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
25283         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
25284         (EXTEND_BUFFER): Use them.
25285
25286 2000-08-01  Jim Meyering  <meyering@lucent.com>
25287
25288         * lib/dirname.c (ISSLASH): Define.
25289         (BACKSLASH_IS_PATH_SEPARATOR): Define.
25290         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
25291         both `\' and `/' may be use as path separators.
25292         Based on a patch from Prashant TR.
25293
25294 2000-07-31  Paul Eggert  <eggert@twinsun.com>
25295
25296         * lib/quotearg.c (quotearg_n_options): Don't make the initial
25297         slot vector a constant, since it might get modified.
25298
25299 2000-07-31  Jim Meyering  <meyering@lucent.com>
25300
25301         * lib/xmalloc.c: Use `virtual memory exhausted', not
25302         `Memory exhausted'.
25303         * lib/obstack.c (print_and_abort): Likewise.
25304
25305 2000-07-30  Paul Eggert  <eggert@twinsun.com>
25306
25307         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
25308         buffer, so that the caller can always quote one small
25309         component of a "memory exhausted" message in slot 0.
25310         From a suggestion by Jim Meyering.
25311
25312 2000-07-30  Jim Meyering  <meyering@lucent.com>
25313
25314         * lib/makepath.c (make_path): Quote the other instance, too.
25315
25316         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
25317         (STATIC_BUF_SIZE): Define.
25318         (quotearg_n_options): Use only statically allocated storage when
25319         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
25320         than STATIC_BUF_SIZE.
25321
25322 2000-07-29  Jim Meyering  <meyering@lucent.com>
25323
25324         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
25325         * lib/dirname.c (dir_name): Likewise.
25326
25327         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
25328         `/'.
25329
25330         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
25331         (dir_name): Assert that there are no trailing slashes.
25332
25333 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
25334
25335         * lib/mbswidth.h (mbswidth): Add a flags argument.
25336         (mbswidth): New declaration.
25337         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
25338         * lib/mbswidth.c (mbswidth): Add a flags argument.
25339         (mbsnwidth): New function.
25340
25341 2000-07-24  Jim Meyering  <meyering@lucent.com>
25342
25343         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
25344
25345 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25346
25347         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
25348
25349 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25350
25351         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
25352         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
25353         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
25354         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
25355         invoke multibyte primitives.
25356
25357 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25358
25359         * lib/quotearg.c:
25360         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
25361         so that mbstate_t is always defined.
25362
25363         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
25364         be 1 in at least one GCC installation, and this configuration
25365         error is likely to be common.  Ignoring MB_LEN_MAX hurts
25366         performance on hosts that have mbrtowc but have only unibyte
25367         locales, but I assume these hosts are rare.
25368
25369 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25370
25371         * lib/mbswidth.c (_XOPEN_SOURCE):
25372         Don't define; this causes problems on Solaris 7.
25373         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
25374
25375 2000-07-23  Jim Meyering  <meyering@lucent.com>
25376
25377         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
25378         too: getgrgid, getpwuid, getuid.
25379
25380 2000-07-23  Jim Meyering  <meyering@lucent.com>
25381
25382         * lib/basename.c (base_name): Add an assertion.
25383
25384 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
25385
25386         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
25387         shadow its mbsinit function.
25388
25389 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
25390
25391         * lib/mbswidth.h: New file.
25392         * lib/mbswidth.c: New file.
25393         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
25394         (noinst_HEADERS): Add mbswidth.h.
25395
25396 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
25397
25398         * lib/config.charset: Add support for FreeBSD. Improve support for
25399         HP-UX and IRIX 6.
25400
25401 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
25402
25403         * m4/mbswidth.m4: New file.
25404         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
25405
25406 2000-07-15  Jim Meyering  <meyering@lucent.com>
25407
25408         * lib/makepath.c: Include quote.h.
25409         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
25410         corresponding argument in a `quote (...)' call.
25411         Give better diagnostics.
25412
25413         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
25414         (noinst_HEADERS): Add quote.h.
25415
25416         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
25417         from tar's src/misc.c.
25418         * lib/quote.h: New file.  Prototypes for same.
25419
25420 2000-07-14  Paul Eggert  <eggert@twinsun.com>
25421
25422         From a suggestion by Bruno Haible.
25423         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
25424         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
25425         to decide whether to define the BeOS workaround macro;
25426         this adjusts to the change to AC_MBSTATE_T.
25427
25428 2000-07-14  Jim Meyering  <meyering@lucent.com>
25429
25430         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
25431         jm_AC_TYPE_UINTMAX_T.
25432
25433 2000-07-13  Paul Eggert  <eggert@twinsun.com>
25434
25435         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
25436
25437         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
25438         quotearg_buffer_restyled): Add support for
25439         clocale_quoting_style.  Undo previous change to
25440         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
25441         and "{RIGHT QUOTATION MARK}" msgids.
25442
25443 2000-07-10  Paul Eggert  <eggert@twinsun.com>
25444
25445         From a suggestion by Bruno Haible.
25446         * m4/mbstate_t.m4 (AC_MBSTATE_T):
25447         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
25448         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
25449         and mbstate_t, to a single-part test that simply defines mbstate_t.
25450         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
25451         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
25452
25453 2000-07-10  Jim Meyering  <meyering@lucent.com>
25454
25455         * m4/strerror_r.m4: Mirror the correction made in autoconf.
25456
25457         * m4/gnu-source.m4: Output to confdefs.h directly.
25458         Suggestion from Akim Demaille.
25459
25460 2000-07-09  Paul Eggert  <eggert@twinsun.com>
25461
25462         The old behavior of quoting `like this' doesn't look good with
25463         newer, ISO-style fonts.  See:
25464         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
25465
25466         Instead, quote "like this" by default.  Let the translator
25467         tailor the locale-specific quoting behavior by providing
25468         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
25469
25470         * lib/quotearg.c (N_): New macro.
25471         (gettext_default): New function.
25472         (quotearg_buffer_restyled): Use
25473         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
25474         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
25475
25476 2000-07-09  Jim Meyering  <meyering@lucent.com>
25477
25478         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
25479         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
25480
25481         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
25482         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
25483
25484 2000-07-09  Jim Meyering  <meyering@lucent.com>
25485
25486         * lib/Most files: Update copyright dates to include 2000.
25487
25488 2000-07-08  Jim Meyering  <meyering@lucent.com>
25489
25490         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
25491         if not defined.
25492         (xgethostname): Remove now-unnecessary #ifdef.
25493         Move declaration of `err' into loop where it's used.
25494
25495 2000-07-05  Paul Eggert  <eggert@twinsun.com>
25496         and Bruno Haible  <haible@clisp.cons.org>
25497
25498         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
25499         only if the test for an object-type mbstate_t fails.  This
25500         prevents us from mistakenly reporting that mbstate_t is a
25501         system object type after we "#define mbstate_t int" to work
25502         around its lack.
25503
25504 2000-07-05  Paul Eggert  <eggert@twinsun.com>
25505         and Bruno Haible  <haible@clisp.cons.org>
25506
25507         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
25508
25509 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
25510
25511         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
25512         to strerror_r.
25513         Include <ctype.h> for use of isalpha.
25514
25515 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
25516
25517         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
25518         by allocating a larger buffer. Test the gethostname return value for
25519         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
25520         returns an error and ENAMETOOLONG isn't defined.
25521
25522 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
25523
25524         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
25525         dimension.
25526
25527 2000-07-04  Jim Meyering  <meyering@lucent.com>
25528
25529         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
25530         of the deprecated AC_CHECKING.
25531
25532 2000-07-04  Jim Meyering  <meyering@lucent.com>
25533
25534         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
25535         Reported by Bruno Haible.
25536
25537 2000-07-04  Jim Meyering  <meyering@lucent.com>
25538
25539         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
25540         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
25541         lacks mbrtowc.
25542
25543 2000-07-03  Paul Eggert  <eggert@twinsun.com>
25544
25545         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
25546         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
25547
25548 2000-07-03  Paul Eggert  <eggert@twinsun.com>
25549         and Bruno Haible  <haible@clisp.cons.org>
25550
25551         * lib/quotearg.c (mbrtowc):
25552         Assign to *pwc, and return 1 only if result is nonzero.
25553         (iswprint): Use ISPRINT when substituting our own mbrtowc.
25554
25555 2000-07-03  Jim Meyering  <meyering@lucent.com>
25556
25557         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
25558
25559 2000-07-03  Jim Meyering  <meyering@lucent.com>
25560
25561         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
25562         This is necessary to get a definition of e.g., UTMP_FILE on
25563         HP-UX 10.20.
25564         From Bob Proulx.
25565
25566 2000-07-02  Jim Meyering  <meyering@lucent.com>
25567
25568         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
25569
25570         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
25571         AC_LIBOBJ(function_name).
25572         * m4/chown.m4: Likewise.
25573         * m4/fnmatch.m4: Likewise.
25574         * m4/ftruncate.m4: Likewise.
25575         * m4/getgroups.m4: Likewise.
25576         * m4/getline.m4: Likewise.
25577         * m4/group-member.m4: Likewise.
25578         * m4/jm-macros.m4: Likewise.
25579         * m4/lstat.m4: Likewise.
25580         * m4/malloc.m4: Likewise.
25581         * m4/memcmp.m4: Likewise.
25582         * m4/nanosleep.m4: Likewise.
25583         * m4/putenv.m4: Likewise.
25584         * m4/realloc.m4: Likewise.
25585         * m4/regex.m4: Likewise.
25586         * m4/stat.m4: Likewise.
25587         * m4/strftime.m4: Likewise.
25588
25589 2000-07-02  Jim Meyering  <meyering@lucent.com>
25590
25591         * lib/quotearg.c (mbstate_t): Don't define here.
25592
25593 2000-07-02  Jim Meyering  <meyering@lucent.com>
25594
25595         * lib/nanosleep.c (SIGCONT): Define if not already defined.
25596
25597 2000-07-01  Jim Meyering  <meyering@lucent.com>
25598
25599         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
25600
25601 2000-07-01  Jim Meyering  <meyering@lucent.com>
25602
25603         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
25604         problem.
25605
25606 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
25607
25608         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
25609         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
25610
25611 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
25612
25613         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
25614         per change in ../m4/ls-mntd-fs.m4.
25615         (read_filesystem_list): Ignore symbolic links.
25616
25617 2000-06-29  Jim Meyering  <meyering@lucent.com>
25618
25619         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
25620         for declaration of strcmp.
25621
25622         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
25623
25624         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
25625         Avoid warning by casting result to `char *' to remove `const'.
25626
25627 2000-06-28  Jim Meyering  <meyering@lucent.com>
25628
25629         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
25630         included by quotearg.c, for which we perform this test.  From
25631         Bruno Haible.
25632
25633 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
25634
25635         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
25636         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
25637         <utmpx.h> exists, put readutmp.o into LIBOBJS.
25638
25639 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
25640
25641         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
25642
25643 2000-06-26  Paul Eggert  <eggert@twinsun.com>
25644
25645         savedir now sets errno on failure and invokes xmalloc to get memory.
25646         Fix a couple of other minor bugs while we're at it.
25647
25648         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
25649         (NAMLEN): Remove macro.
25650         (malloc, realloc): Remove decls.
25651         (stpcpy): Likewise.
25652         ("xalloc.h"): Include.
25653         (NAME_SIZE_DEFAULT): New macro.
25654         (savedir): Use xmalloc / xrealloc to allocate memory.
25655         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
25656         Skip "" directory entries.
25657         Use strlen to calculate directory entry length, since the old method
25658         is rarely used these days and isn't worth supporting.
25659         Don't use a pointer after freeing it.
25660         Check for integer overflow when calculating allocation size.
25661         Use memcpy to copy entries, instead of stpcpy.
25662         Set errno properly when returning NULL.
25663         Check for readdir error.
25664
25665 2000-06-26  Jim Meyering  <meyering@lucent.com>
25666
25667         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
25668
25669 2000-06-25  Jim Meyering  <meyering@lucent.com>
25670
25671         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
25672         Linux header bug when _XOPEN_SOURCE is defined to 500.
25673
25674 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
25675
25676         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
25677         deficiency.
25678
25679 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
25680
25681         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
25682         Include xalloc.h.
25683         Don't include <stdlib.h>.  Don't declare malloc, realloc.
25684
25685 2000-06-24  Jim Meyering  <meyering@lucent.com>
25686
25687         * m4/strerror_r.m4: Revive this file -- to try out an experimental
25688         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
25689         for which strerror does return char*, but which lacks a conveniently
25690         accessible declaration of the function.  If the compile-test says
25691         strerror_r doesn't work, then resort to a `run'-test that works on
25692         BeOS and segfaults on DEC Unix.
25693
25694 2000-06-24  Jim Meyering  <meyering@lucent.com>
25695
25696         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
25697
25698 2000-06-23  Paul Eggert  <eggert@twinsun.com>
25699
25700         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
25701         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
25702
25703 2000-06-23  Paul Eggert  <eggert@twinsun.com>
25704
25705         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
25706         (mbrtowc, mbstate_t): Define substitutes if
25707         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
25708         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
25709         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
25710
25711 2000-06-23  Jim Meyering  <meyering@lucent.com>
25712
25713         * m4/afs.m4: Add missing AC_MSG_RESULT.
25714         Reported by Bruno Haible.
25715
25716         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
25717         Suggestion from Bruno Haible.
25718
25719 2000-06-23  Jim Meyering  <meyering@lucent.com>
25720
25721         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
25722
25723 2000-06-21  Jim Meyering  <meyering@lucent.com>
25724
25725         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
25726
25727 2000-06-21  Jim Meyering  <meyering@lucent.com>
25728
25729         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
25730         (noinst_HEADERS): Add getstr.h.
25731
25732         * lib/getline.c (getstr): Move into a separate file.
25733         * lib/getstr.c (getstr): New file, extracted from getline.c, with
25734         the following changes: new parameter, delim2; both delim[12]
25735         parameters have type `int', not `char'.  The latter would lose
25736         with 8-bit delimiters.
25737         * lib/getstr.h: New file.
25738
25739 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
25740
25741         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
25742         than 1024, return a memory chunk of least possible size, instead
25743         of size PATH_MAX + 2. In the loop, increment the size proportionally.
25744         Use free/xmalloc instead of xrealloc to avoid copying for very long
25745         paths.
25746
25747 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
25748
25749         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
25750         the empty string.
25751
25752 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
25753
25754         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
25755         address, not strdup.  Include <stdlib.h> and don't declare free().
25756
25757 2000-06-19  Jim Meyering  <meyering@lucent.com>
25758
25759         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
25760
25761 2000-06-18  Jim Meyering  <meyering@lucent.com>
25762
25763         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
25764
25765         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
25766         `checking whether...' message to be consistent with that of the
25767         lstat test.
25768
25769 2000-06-18  Jim Meyering  <meyering@lucent.com>
25770
25771         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
25772         Besides, these days every porting target provides a mkdir function.
25773
25774         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
25775         needed. (this snippet comes from src/system.h).
25776
25777 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
25778
25779         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
25780
25781 2000-06-15  Paul Eggert  <eggert@twinsun.com>
25782
25783         * lib/human.c (adjust_value): New function.
25784         (human_readable_inexact): Apply rounding style even when
25785         printing approximate values.
25786
25787 2000-06-14  Paul Eggert  <eggert@twinsun.com>
25788
25789         * lib/human.c (human_readable_inexact): Allow an input block
25790         size that is not a multiple of the output block size, and vice versa.
25791         Reported by Piergiorgio Sartor.
25792
25793 2000-06-14  Paul Eggert  <eggert@twinsun.com>
25794
25795         * lib/getdate.y (get_date): Apply relative times after time
25796         zone indicator, not before.  Reported by Todd A. Jacobs.
25797
25798 2000-06-13  Jim Meyering  <meyering@lucent.com>
25799
25800         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
25801
25802         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
25803
25804 2000-06-12  Paul Eggert  <eggert@twinsun.com>
25805
25806         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
25807
25808 2000-06-12  Jim Meyering  <meyering@lucent.com>
25809
25810         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
25811         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
25812         optional argument.
25813         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
25814         the optional argument, `lib'.
25815
25816 2000-06-08  Jim Meyering  <meyering@lucent.com>
25817
25818         * m4/largefile.m4: Remove file (now that it's part of autoconf).
25819
25820 2000-06-04  Paul Eggert  <eggert@twinsun.com>