3d953dada20f42c16f9c15f4a1aa1feb9a0975a4
[gnulib.git] / ChangeLog
1 2007-02-24  Bruno Haible  <bruno@clisp.org>
2
3         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
4         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
5         function; instead check whether isnan with a double argument links.
6         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
7         function; instead check whether isnan with a 'long double' argument
8         links.
9         Reported by Eric Blake <ebb9@byu.net>.
10
11 2007-02-24  Bruno Haible  <bruno@clisp.org>
12
13         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
14         defined.
15         * lib/isnanl.c: Remove all code. Just include isnan.c.
16         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
17
18 2007-02-25  Jim Meyering  <jim@meyering.net>
19
20         Avoid conflicting types for 'unsetenv' on FreeBSD.
21         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
22         conflicting with FreeBSD's (5.0 and 6.1) function declaration
23         in stdlib.h.
24
25 2007-02-24  Bruno Haible  <bruno@clisp.org>
26
27         * modules/isnanl-nolibm-tests: New file.
28         * tests/test-isnanl.c: New file.
29
30         * modules/isnanl-nolibm: New file.
31         * lib/isnanl.h: New file.
32         * lib/isnanl.c: New file.
33         * m4/isnanl.m4: New file.
34
35 2007-02-24  Bruno Haible  <bruno@clisp.org>
36
37         * modules/isnan-nolibm-tests: New file.
38         * tests/test-isnan.c: New file.
39
40         * modules/isnan-nolibm: New file.
41         * lib/isnan.h: New file.
42         * lib/isnan.c: New file.
43         * m4/isnan.m4: New file.
44
45 2007-02-24  Bruno Haible  <bruno@clisp.org>
46
47         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
48         assume that an exponent fits in 20 bits.
49
50 2007-02-24  Jim Meyering  <jim@meyering.net>
51
52         * m4/regex.m4: Update the description of the configure-time option,
53         --without-included-regex, to state accurately what the defaults are,
54         and perhaps to give people an idea why using this option is risky.
55
56 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
57
58         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
59         loops on small arguments.  This attempts to avoid the problem
60         Bruno Haible reported for AIX 4.3.2 in
61         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00309.html>.
62
63 2007-02-23  Bruno Haible  <bruno@clisp.org>
64
65         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
66         Needed for help2man.
67
68 2007-02-23  Karl Berry  <karl@gnu.org>
69
70         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
71         exists, foo.h should be cvs-ignored, not committed.
72
73 2007-02-23  Eric Blake  <ebb9@byu.net>
74
75         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
76         * lib/stat-time.h (includes): Likewise.
77         * lib/utimecmp.c (includes): Likewise.
78         * lib/utimens.h (includes): Likewise.
79         * lib/getdate.y (includes): Also include "timespec.h" for use
80         internal to the module.
81         * modules/utimens (Depends-on): Revert yesterday's patch.
82         * modules/nanosleep (Depends-on): Add missing dependency.
83
84 2007-02-22  Bruno Haible  <bruno@clisp.org>
85
86         * lib/glob.c: Don't include getlogin_r.h.
87
88 2007-02-22  Jim Meyering  <jim@meyering.net>
89
90         * modules/utimens (Depends-on): Add timespec, required for
91         utimens.h's inclusion of timespec.h.
92
93 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
94
95         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
96         long unreadable paths in GNU/Linux.  Problem reported by Andreas
97         Schwab in
98         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
99         I'll try to think of a better way to fix the Solaris problem.
100
101         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
102         like glibc; on Solaris 10, it fails with errno == EINVAL.
103         POSIX says the behavior is unspecified if the first argument is NULL,
104         so play it safe and never pass NULL to the system getcwd.
105
106 2007-02-21  Jim Meyering  <jim@meyering.net>
107
108         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
109         of gettimeofday.  It would conflict with the one now always
110         provided via sys_time_.h.  Reported by Matthew Woehlke, as
111         an IRIX 6.5 build failure.
112
113 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
114
115         Minor fixups to port to Solaris 10 with Sun C 5.8.
116         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
117         * modules/getcwd (Depends-on): Add dirfd.
118         * lib/putenv.c (putenv): #undef it.
119         (rpl_putenv): New decl.
120         (malloc, free): Include <stdlib.h> rather than prototyping separately.
121
122 2007-02-20  Bruno Haible  <bruno@clisp.org>
123
124         * modules/stdio-tests: New file.
125         * tests/test-stdio.c: New file.
126
127         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
128         (Depends-on): Add stdio.
129         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
130         (Include): Use <stdio.h> instead of vsnprintf.h.
131         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
132         HAVE_DECL_VSNPRINTF.
133         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
134
135         * modules/snprintf (Files): Remove lib/snprintf.h.
136         (Depends-on): Add stdio.
137         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
138         (Include): Use <stdio.h> instead of snprintf.h.
139         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
140         HAVE_DECL_SNPRINTF.
141         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
142         * lib/getaddrinfo.c: Likewise.
143
144         * modules/stdio: New file.
145         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
146         * lib/snprintf.h: Remove file.
147         * lib/vsnprintf.h: Remove file.
148         * lib/.cppi-disable: Remove snprintf.h.
149         * m4/stdio_h.m4: New file.
150         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
151
152 2007-02-20  Jim Meyering  <jim@meyering.net>
153
154         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
155         used by e.g., mingw.  From Bruno Haible.
156
157 2007-02-19  Bruno Haible  <bruno@clisp.org>
158
159         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
160         warnings.
161         Reported by Ben Pfaff <blp@cs.stanford.edu>.
162
163 2007-02-19  Bruno Haible  <bruno@clisp.org>
164
165         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
166         from mingw users.
167
168 2007-02-19  Bruno Haible  <bruno@clisp.org>
169
170         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
171         warnings.
172         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
173
174 2007-02-19  Jim Meyering  <jim@meyering.net>
175
176         Don't use FD after a successful "fdopendir (fd)".
177         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
178         Reset it by calling dirfd on the just-obtained DIR*.
179
180         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
181         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
182
183 2007-02-18  Bruno Haible  <bruno@clisp.org>
184
185         * lib/readlink.c: Include <unistd.h>.
186         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
187         HAVE_READLINK.
188         * modules/readlink (Depends-on): Add unistd.
189         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
190         (Include): Add <unistd.h>.
191
192         * lib/getlogin_r.h: Remove file.
193         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
194         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
195         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
196         HAVE_DECL_GETLOGIN_R.
197         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
198         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
199         (Include): Use <unistd.h> instead of getlogin_r.h.
200
201         * lib/getcwd.h: Remove file.
202         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
203         * lib/xgetcwd.c: Likewise.
204         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
205         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
206         * modules/getcwd (Files): Remove lib/getcwd.h.
207         (Depends-on): Add unistd.
208         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
209         (Include): Use <unistd.h> instad of getcwd.h.
210
211         * lib/ftruncate.c: Include <unistd.h> first.
212         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
213         Set HAVE_FTRUNCATE.
214         * modules/ftruncate (Depends-on): Add unistd.
215         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
216
217         * lib/fchdir.c: Include <unistd.h> first.
218         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
219         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
220         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
221         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
222         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
223
224         * lib/dup2.c: Include <unistd.h> first.
225         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
226         HAVE_DUP2.
227         * modules/dup2 (Depends-on): Add unistd.
228         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
229
230         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
231         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
232         REPLACE_CHOWN. Don't define chown as a macro here.
233         * modules/chown (Depends-on): Add unistd.
234         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
235
236         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
237         Add definition for GL_LINK_WARNING.
238         (chown, dup2): New declarations.
239         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
240         link warning.
241         (ftruncate): New declaration.
242         (getcwd): New declaration, taken from old getcwd.h.
243         (getlogin_r): New declaration, taken from old getlogin_r.h.
244         (readlink): New declaration.
245         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
246         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
247         (gl_PREREQ_UNISTD): Remove macro.
248         (gl_UNISTD_MODULE_INDICATOR): New macro.
249         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
250         many new variables. Don't set UNISTD_H.
251         * modules/unistd (Description): Change.
252         (Depends-on): Add link-warning.
253         (configure.ac): Update.
254         (Makefile.am): Create unistd.h always. Substitute many new variables
255         into it.
256
257 2007-02-18  Bruno Haible  <bruno@clisp.org>
258
259         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
260         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
261         HAVE_GETSUBOPT.
262         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
263         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
264         * lib/getsubopt.h: Remove file.
265         * modules/getsubopt (Files): Remove lib/getsubopt.h.
266         (Depends-on): Add stdlib.
267         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
268         (Includes): Use <stdlib.h> instead of getsubopt.h.
269         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
270         Set HAVE_GETSUBOPT.
271         * lib/getsubopt.c: Don't include getsubopt.h.
272
273 2007-02-18  Bruno Haible  <bruno@clisp.org>
274
275         * modules/fchdir (Depends-on): Add dup2.
276
277 2007-02-18  Bruno Haible  <bruno@clisp.org>
278
279         * lib/stdlib_.h: Handle glibc's special invocation convention
280         specially.
281
282 2007-02-18  Bruno Haible  <bruno@clisp.org>
283
284         * modules/stdlib-tests: New file.
285         * tests/test-stdlib.c: New file.
286
287         * modules/mkstemp (Files): Remove lib/mkstemp.h.
288         (Depends-on): Add stdlib.
289         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
290         (Includes): Use <stdlib.h> instead of mkstemp.h.
291         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
292         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
293         * lib/mkstemp.c: Don't include mkstemp.h.
294         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
295         * lib/stdlib--.h: Don't include mkstemp.h.
296
297         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
298         (Depends-on): Add stdlib.
299         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
300         (Includes): Use <stdlib.h> instead of mkdtemp.h.
301         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
302         HAVE_MKDTEMP.
303         * lib/mkdtemp.c: Don't include mkdtemp.h.
304         * lib/clean-temp.c: Don't include mkdtemp.h.
305
306         * modules/exit (Files): Remove lib/exit.h.
307         (Depends-on): Add stdlib.
308         (Makefile.am): Remove lib_SOURCES.
309         (Include): Use <stdlib.h> instead of exit.h.
310         * lib/argmatch.c: Don't include exit.h.
311         * lib/execute.c: Likewise.
312         * lib/pagealign_alloc.c: Likewise.
313         * lib/pipe.c: Likewise.
314         * lib/wait-process.c: Likewise.
315         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
316         * lib/exitfail.c: Likewise.
317         * lib/savewd.c: Likewise.
318         * lib/xsetenv.c: Likewise.
319
320         * modules/stdlib: New file.
321         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
322         and extra comments about mkstemp().
323         * lib/exit.h: Remove file.
324         * lib/mkdtemp.h: Remove file.
325         * lib/mkstemp.h: Remove file.
326         * m4/stdlib_h.m4: New file.
327         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
328
329 2007-02-18  Bruno Haible  <bruno@clisp.org>
330
331         * modules/math-tests: New file.
332         * tests/test-math.c: New file.
333
334         * modules/math: New file.
335         * modules/mathl (Files): Remove lib/mathl.h.
336         (Depends-on): Add math.
337         (Makefile.am): Don't mention mathl.h.
338         (Include): Use <math.h> instead of mathl.h.
339         * lib/math_.h: New file.
340         * lib/mathl.h: Remove file.
341         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
342         mathl.h.
343         * lib/asinl.c: Likewise.
344         * lib/atanl.c: Likewise.
345         * lib/ceill.c: Likewise.
346         * lib/cosl.c: Likewise.
347         * lib/expl.c: Likewise.
348         * lib/floorl.c: Likewise.
349         * lib/frexpl.c: Likewise.
350         * lib/ldexpl.c: Likewise.
351         * lib/logl.c: Likewise.
352         * lib/sincosl.c: Likewise.
353         * lib/sinl.c: Likewise.
354         * lib/sqrtl.c: Likewise.
355         * lib/tanl.c: Likewise.
356         * lib/trigl.c: Likewise.
357         * m4/math_h.m4: New file.
358         * MODULES.html.sh (Mathematics): Add math.
359
360 2007-02-17  Bruno Haible  <bruno@clisp.org>
361
362         * modules/wctype-tests: New file.
363         * tests/test-wctype.c: New file.
364
365         * modules/wchar-tests: New file.
366         * tests/test-wchar.c: New file.
367
368         * modules/unistd-tests: New file.
369         * tests/test-unistd.c: New file.
370
371         * modules/time-tests: New file.
372         * tests/test-time.c: New file.
373
374         * modules/sysexits-tests: New file.
375         * tests/test-sysexits.c: New file.
376
377         * modules/sys_time-tests: New file.
378         * tests/test-sys_time.c: New file.
379
380         * modules/sys_stat-tests: New file.
381         * tests/test-sys_stat.c: New file.
382
383         * modules/sys_socket-tests: New file.
384         * tests/test-sys_socket.c: New file.
385
386         * modules/sys_select-tests: New file.
387         * tests/test-sys_select.c: New file.
388
389         * modules/string-tests: New file.
390         * tests/test-string.c: New file.
391
392         * modules/stdbool-tests: New file.
393         * tests/test-stdbool.c: New file.
394
395         * modules/netinet_in-tests: New file.
396         * tests/test-netinet_in.c: New file.
397
398         * modules/inttypes-tests: New file.
399         * tests/test-inttypes.c: New file.
400
401         * modules/fcntl-tests: New file.
402         * tests/test-fcntl.c: New file.
403
404         * modules/byteswap-tests: New file.
405         * tests/test-byteswap.c: New file.
406
407         * modules/arpa_inet-tests: New file.
408         * tests/test-arpa_inet.c: New file.
409
410 2007-02-17  Bruno Haible  <bruno@clisp.org>
411
412         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
413         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
414         if the corresponding module is not enabled. Emit link warnings if
415         the function is used nevertheless.
416         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
417         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
418         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
419         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
420         * modules/inttypes (Depends-on): Add link-warning.
421         (Makefile.am): Copy the contents of build-aux/link-warning.h into
422         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
423         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
424         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
425         * modules/imaxdiv (configure.ac): Likewise.
426         * modules/strtoimax (configure.ac): Likewise.
427         * modules/strtoumax (configure.ac): Likewise.
428
429 2007-02-17  Bruno Haible  <bruno@clisp.org>
430
431         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
432         gl_STRING_MODULE_INDICATOR_DEFAULTS.
433         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
434         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
435
436 2007-02-17  Bruno Haible  <bruno@clisp.org>
437
438         * modules/link-warning: New file.
439         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
440         * lib/string_.h (GL_LINK_WARNING): Remove definition.
441         * modules/string (Depends-on): Add link-warning.
442         (Makefile.am): Copy the contents of build-aux/link-warning.h into
443         string.h.
444         * MODULES.html.sh (Support for building libraries and executables): Add
445         link-warning.
446
447 2007-02-17  Bruno Haible  <bruno@clisp.org>
448
449         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
450         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
451         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
452         long lines.
453
454 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
455             Bruno Haible  <bruno@clisp.org>
456
457         * modules/tmpfile: New file.
458         * lib/tmpfile.c: New file.
459         * m4/tmpfile.m4: New file.
460         * MODULES.html.sh (func_all_modules): New section "Input/output".
461
462 2007-02-15  Bruno Haible  <bruno@clisp.org>
463
464         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
465         (supports_delete_on_close): New function.
466         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
467
468 2007-02-14  Bruno Haible  <bruno@clisp.org>
469
470         * modules/mbspcasecmp-tests: New file.
471         * tests/test-mbspcasecmp.sh: New file.
472         * tests/test-mbspcasecmp.c: New file.
473
474         New module mbspcasecmp.
475         * modules/mbspcasecmp: New file.
476         * lib/mbspcasecmp.c: New file.
477         * lib/string_.h (strncasecmp): Change warning message.
478         (mbspcasecmp): New declaration.
479         * m4/mbspcasecmp.m4: New file.
480         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
481         GNULIB_MBSPCASECMP.
482         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
483         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
484
485 2007-02-14  Bruno Haible  <bruno@clisp.org>
486
487         * modules/mbsncasecmp-tests: New file.
488         * tests/test-mbsncasecmp.sh: New file.
489         * tests/test-mbsncasecmp.c: New file.
490
491         New module mbsncasecmp.
492         * modules/mbsncasecmp: New file.
493         * lib/mbsncasecmp.c: New file.
494         * lib/string_.h (mbsncasecmp): New declaration.
495         * m4/mbsncasecmp.m4: New file.
496         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
497         GNULIB_MBSNCASECMP.
498         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
499         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
500
501 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
502
503         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
504         Verify that it doesn't overlap with our flags.
505         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
506         do not have the desired effect in multibyte locales; instead, use
507         mbscasecmp.
508         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
509         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
510         we don't require GNU fnmatch ourselves (if our users require it, they
511         should do so explicitly).
512
513         Fix regex code so it doesn't rely on strcasecmp.
514         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
515         Otherwise, include gnulib's langinfo.h.
516         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
517         undesirable behavior in non-C locales.  Instead, rely on localecharset.
518         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
519         * modules/regex (FILES): Remove m4/codeset.m4.
520         (Depends-on): Add localcharset.  Remove strcase.
521
522 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
523
524         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
525         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
526
527 2007-02-13  Bruno Haible  <bruno@clisp.org>
528
529         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
530         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
531
532 2007-02-12  Bruno Haible  <bruno@clisp.org>
533
534         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
535         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
536         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
537         time warning rather than a link error.
538
539 2007-02-12  Bruno Haible  <bruno@clisp.org>
540
541         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
542         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
543         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
544
545 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
546
547         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
548         args, not 2.
549
550 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
551
552         New module 'time', so that apps can include <time.h> as per
553         POSIX and GNU instead of separate include files like time_r.h
554         and timegm.h.  This implementation tries out a simpler approach
555         for replacing decls in standard include files (as compared to
556         the string module), somewhat as an experiment.
557
558         * config/srclist.txt: Comment out mktime.c for now.
559         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
560         since it doesn't apply any more.  Use generic wording instead.
561         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
562         'time'.
563         * lib/time_.h, m4/time_h.m4, modules/time: New files.
564         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
565         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
566         Don't include <sys/types.h>; no longer needed since we assume C89.
567         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
568         * lib/strftime.c: Likewise.
569         * lib/time_r.c: Likewise.
570         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
571         * lib/nanosleep.c: Include <time.h> first, to check interface.
572         * lib/strptime.c: Likewise.
573         * lib/time_r.c: Likewise.
574         * lib/timegm.c: Likewise.
575         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
576         needed.
577         * lib/timegm.c: Don't include timegm.h; no longer needed.
578         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
579         time.h now handles any problems in that area.
580         (struct timespec, nanosleep): Remove; time.h now arranges for these.
581         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
582         that time.h defines struct timespec.
583         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
584         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
585         handles that.
586         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
587         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
588         needed.  Set REPLACE_LOCALTIME.
589         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
590         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
591         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
592         nanosleep; time_h.m4 now does that.  Don't require
593         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
594         module handles this now.
595         * modules/getdate (Depends-on): Remove timespec.  Add time.
596         * modules/nanosleep (Depends-on): Likewise.
597         * modules/stat-time (Depends-on): Likewise.
598         * modules/nanosleep (Include): Include time.h, not timespec.h.
599         * modules/strptime (Files): Remove lib/strptime.h.
600         (Depends-on): Add extensions, time.
601         (Include): Include time.h, not strptime.h.
602         * modules/time_r (Files): Remove lib/time_r.h.
603         (Depends-on): Add time.
604         (Include): Include time.h, not time_r.h.
605         * modules/timegm: Likewise.
606         * modules/timespec (Description): Now does timespec-related decls
607         of our own, instead of struct timespec itself.
608         (Depends-on): Add time; remove extensions.
609         (Maintainer): Add self.
610         * modules/utimecmp (Depends-on): Add time; remove timespec.
611         * modules/utimens (Depends-on): Likewise.
612         * modules/xnanosleep (Depends-on): Likewise.
613
614 2007-02-11  Bruno Haible  <bruno@clisp.org>
615
616         * lib/c-strstr.c: Include allocsa.h.
617         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
618         * lib/c-strcasestr.c: Include allocsa.h.
619         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
620         * lib/strcasestr.c: Include allocsa.h.
621         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
622         * lib/mbsstr.c: Include allocsa.h.
623         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
624         allocsa/freesa instead of malloc/free.
625         * lib/mbscasestr.c: Include allocsa.h.
626         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
627         allocsa/freesa instead of malloc/free.
628         * modules/c-strstr (Depends-on): Add allocsa.
629         * modules/c-strcasestr (Depends-on): Likewise.
630         * modules/strcasestr (Depends-on): Likewise.
631         * modules/mbsstr (Depends-on): Likewise.
632         * modules/mbscasestr (Depends-on): Likewise.
633
634 2007-02-11  Bruno Haible  <bruno@clisp.org>
635
636         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
637
638         * modules/mbsspn-tests: New file.
639         * tests/test-mbsspn.sh: New file.
640         * tests/test-mbsspn.c: New file.
641
642 2007-02-11  Bruno Haible  <bruno@clisp.org>
643
644         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
645
646         * modules/mbspbrk-tests: New file.
647         * tests/test-mbspbrk.sh: New file.
648         * tests/test-mbspbrk.c: New file.
649
650 2007-02-11  Bruno Haible  <bruno@clisp.org>
651
652         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
653         unneeded cast.
654
655         * modules/mbscspn-tests: New file.
656         * tests/test-mbscspn.sh: New file.
657         * tests/test-mbscspn.c: New file.
658
659 2007-02-11  Bruno Haible  <bruno@clisp.org>
660
661         * modules/mbscasecmp-tests: New file.
662         * tests/test-mbscasecmp.sh: New file.
663         * tests/test-mbscasecmp.c: New file.
664
665 2007-02-11  Bruno Haible  <bruno@clisp.org>
666
667         Ensure O(n) worst-case complexity of mbscasestr.
668         * lib/mbscasestr.c: Include stdbool.h.
669         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
670         functions.
671         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
672         the bookkeeping indicates that it's worth it.
673         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
674
675         * modules/mbscasestr-tests: New file.
676         * tests/test-mbscasestr1.c: New file.
677         * tests/test-mbscasestr2.sh: New file.
678         * tests/test-mbscasestr2.c: New file.
679         * tests/test-mbscasestr3.sh: New file.
680         * tests/test-mbscasestr3.c: New file.
681         * tests/test-mbscasestr4.sh: New file.
682         * tests/test-mbscasestr4.c: New file.
683         * m4/locale-tr.m4: New file.
684
685 2007-02-11  Bruno Haible  <bruno@clisp.org>
686
687         Ensure O(n) worst-case complexity of mbsstr.
688         * lib/mbsstr.c: Include stdbool.h.
689         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
690         functions.
691         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
692         bookkeeping indicates that it's worth it.
693         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
694
695         * modules/mbsstr-tests: New file.
696         * tests/test-mbsstr1.c: New file.
697         * tests/test-mbsstr2.sh: New file.
698         * tests/test-mbsstr2.c: New file.
699         * tests/test-mbsstr3.sh: New file.
700         * tests/test-mbsstr3.c: New file.
701         * m4/locale-fr.m4: New file.
702
703 2007-02-11  Bruno Haible  <bruno@clisp.org>
704
705         * lib/mbsrchr.c (mbsrchr): Fix bug.
706
707         * modules/mbsrchr-tests: New file.
708         * tests/test-mbsrchr.sh: New file.
709         * tests/test-mbsrchr.c: New file.
710
711 2007-02-11  Bruno Haible  <bruno@clisp.org>
712
713         * lib/mbschr.c (mbschr): Fix bug.
714
715         * modules/mbschr-tests: New file.
716         * tests/test-mbschr.sh: New file.
717         * tests/test-mbschr.c: New file.
718         * m4/locale-zh.m4: New file.
719
720 2007-02-11  Bruno Haible  <bruno@clisp.org>
721
722         Support for copying multibyte string iterators.
723         * lib/mbiter.h: Include <string.h>.
724         (mbiter_multi_copy): New function.
725         (mbi_copy): New macro.
726         * lib/mbuiter.h: Include <string.h>.
727         (mbuiter_multi_copy): New function.
728         (mbui_copy): New macro.
729
730 2007-02-11  Bruno Haible  <bruno@clisp.org>
731
732         New module mbslen.
733         * modules/mbslen: New file.
734         * lib/mbslen.c: New file.
735         * lib/string_.h (mbslen): New declaration.
736         * m4/mbslen.m4: New file.
737         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
738         GNULIB_MBSLEN.
739         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
740         * MODULES.html.sh (Internationalization functions): Add mbslen.
741
742 2007-02-11  Bruno Haible  <bruno@clisp.org>
743
744         Ensure O(n) worst-case complexity of strcasestr substitute.
745         * lib/strcasestr.c: Include stdbool.h.
746         (knuth_morris_pratt): New function.
747         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
748         bookkeeping indicates that it's worth it.
749         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
750
751         * modules/strcasestr-tests: New file.
752         * tests/test-strcasestr.c: New file.
753
754 2007-02-11  Bruno Haible  <bruno@clisp.org>
755
756         Ensure O(n) worst-case complexity of c_strcasestr.
757         * lib/c-strcasestr.c: Include stdbool.h, string.h.
758         (knuth_morris_pratt): New function.
759         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
760         the bookkeeping indicates that it's worth it.
761         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
762
763         * modules/c-strcasestr-tests: New file.
764         * tests/test-c-strcasestr.c: New file.
765
766 2007-02-11  Bruno Haible  <bruno@clisp.org>
767
768         Ensure O(n) worst-case complexity of c_strstr.
769         * lib/c-strstr.c: Include stdbool.h, string.h.
770         (knuth_morris_pratt): New function.
771         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
772         bookkeeping indicates that it's worth it.
773         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
774
775         * lib/c-strstr.c: Complete rewrite for maintainability.
776
777         * modules/c-strstr-tests: New file.
778         * tests/test-c-strstr.c: New file.
779
780 2007-02-11  Bruno Haible  <bruno@clisp.org>
781
782         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
783         5.2.1 and earlier, whereby \055 was treated just like the range
784         delimiter '-'.
785         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
786
787 2007-02-08  Bruno Haible  <bruno@clisp.org>
788
789         * modules/regex (Depends-on): Add stdbool.
790         Reported by Dalibor Topic <robilad@kaffe.org>.
791
792 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
793
794         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
795         Prefer returning from main to exiting from it.
796         Remove unnecessary parens after sizeof.
797
798 2007-02-05  Bruno Haible  <bruno@clisp.org>
799
800         New module mbssep.
801         * modules/mbssep: New file.
802         * lib/mbssep.c: New file.
803         * lib/string_.h (strsep): Add a conditional link warning.
804         (mbssep): New declaration.
805         * m4/mbssep.m4: New file.
806         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
807         GNULIB_MBSSEP.
808         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
809         * MODULES.html.sh (Internationalization functions): Add mbssep.
810
811 2007-02-05  Bruno Haible  <bruno@clisp.org>
812
813         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
814         Optimize search in case of 1 delimiter.
815
816 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
817
818         * lib/acl.h: Include sys/types.h before sys/acl.h.
819
820 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
821
822         Merge upstream fix for glibc bugzilla #3957:
823
824         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
825
826         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
827         bit for RE_HAT_LISTS_NOT_NEWLINE.
828         (build_charclass_op): Remove bogus comment.
829
830 2007-02-05  Simon Josefsson  <simon@josefsson.org>
831
832         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
833
834 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
835
836         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
837         * lib/memmem.c [!defined _LIBC]: Include config.h.
838
839 2007-02-04  Bruno Haible  <bruno@clisp.org>
840
841         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
842         warning message.
843
844 2007-02-04  Bruno Haible  <bruno@clisp.org>
845
846         New module mbstok_r.
847         * modules/mbstok_r: New file.
848         * lib/mbstok_r.c: New file.
849         * lib/string_.h (strtok_r): Change argument names to match the
850         comments. Add a conditional link warning.
851         (mbstok_r): New declaration.
852         * m4/mbstok_r.m4: New file.
853         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
854         GNULIB_MBSTOK_R.
855         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
856         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
857
858 2007-02-04  Bruno Haible  <bruno@clisp.org>
859
860         New module mbsspn.
861         * modules/mbsspn: New file.
862         * lib/mbsspn.c: New file.
863         * lib/string_.h (strspn): Add a conditional link warning.
864         (mbsspn): New declaration.
865         * m4/mbsspn.m4: New file.
866         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
867         GNULIB_MBSSPN.
868         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
869         * MODULES.html.sh (Internationalization functions): Add mbsspn.
870
871 2007-02-04  Bruno Haible  <bruno@clisp.org>
872
873         New module mbspbrk.
874         * modules/mbspbrk: New file.
875         * lib/mbspbrk.c: New file.
876         * lib/string_.h (strpbrk): Add a conditional link warning.
877         (mbspbrk): New declaration.
878         * m4/mbspbrk.m4: New file.
879         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
880         GNULIB_MBSPBRK.
881         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
882         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
883
884 2007-02-04  Bruno Haible  <bruno@clisp.org>
885
886         New module mbscspn.
887         * modules/mbscspn: New file.
888         * lib/mbscspn.c: New file.
889         * lib/string_.h (strcspn): Add a conditional link warning.
890         (mbscspn): New declaration.
891         * m4/mbscspn.m4: New file.
892         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
893         GNULIB_MBSCSPN.
894         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
895         * MODULES.html.sh (Internationalization functions): Add mbscspn.
896
897 2007-02-04  Bruno Haible  <bruno@clisp.org>
898
899         New module mbscasestr, reduced goal of strcasestr.
900         * modules/mbscasestr: New file.
901         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
902         (mbscasestr): Renamed from strcasestr.
903         * lib/strcasestr.c: Don't include mbuiter.h.
904         (strcasestr): Remove support for multibyte locales.
905         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
906         Change the conditional link warning.
907         (mbscasestr): New declaration.
908         * m4/mbscasestr.m4: New file.
909         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
910         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
911         REPLACE_STRCASESTR.
912         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
913         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
914         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
915         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
916         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
917         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
918         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
919         (Depends-on): Remove mbuiter.
920         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
921
922 2007-02-04  Bruno Haible  <bruno@clisp.org>
923
924         Simplify handling of strncasecmp.
925         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
926         the conditional link warning.
927         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
928         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
929         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
930         * modules/strcase (configure.ac): Don't invoke
931         gl_STRING_MODULE_INDICATOR.
932         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
933
934 2007-02-04  Bruno Haible  <bruno@clisp.org>
935
936         New module mbscasecmp, reduced goal of strcasecmp.
937         * modules/mbscasecmp: New file.
938         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
939         (mbscasecmp): Renamed from strcasecmp.
940         * lib/strcasecmp.c: Don't include mbuiter.h.
941         (strcasecmp): Remove support for multibyte locales.
942         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
943         Change the conditional link warning.
944         (mbscasecmp): New declaration.
945         * m4/mbscasecmp.m4: New file.
946         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
947         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
948         REPLACE_STRCASECMP.
949         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
950         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
951         GNULIB_MBSCASECMP.
952         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
953         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
954         * modules/strcase (Files): Remove m4/mbrtowc.m4.
955         (Depends-on): Remove mbuiter.
956         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
957
958 2007-02-04  Bruno Haible  <bruno@clisp.org>
959
960         New module mbsstr. Remove module strstr.
961         * modules/mbsstr: New file.
962         * modules/strstr: Remove file.
963         * lib/mbsstr.c: Renamed from lib/strstr.c.
964         (mbsstr): Renamed from strstr.
965         * lib/string_.h (strstr): Remove declaration. Change the conditional
966         link warning.
967         (mbsstr): New declaration.
968         * m4/mbsstr.m4: New file.
969         * m4/strstr.m4: Remove file.
970         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
971         REPLACE_STRSTR.
972         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
973         Don't initialize GNULIB_STRSTR.
974         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
975         substitute GNULIB_STRSTR and REPLACE_STRSTR.
976         * MODULES.html.sh (Internationalization functions): Add mbsstr.
977         (Support for systems lacking ANSI C 89): Remove strstr.
978
979 2007-02-04  Bruno Haible  <bruno@clisp.org>
980
981         New module mbsrchr.
982         * modules/mbsrchr: New file.
983         * lib/mbsrchr.c: New file.
984         * lib/string_.h (strrchr): Add a conditional link warning.
985         (mbsrchr): New declaration.
986         * m4/mbsrchr.m4: New file.
987         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
988         GNULIB_MBSRCHR.
989         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
990         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
991
992 2007-02-04  Bruno Haible  <bruno@clisp.org>
993
994         New module mbschr.
995         * modules/mbschr: New file.
996         * lib/mbschr.c: New file.
997         * lib/string_.h (strchr): Add a conditional link warning.
998         (mbschr): New declaration.
999         * m4/mbschr.m4: New file.
1000         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1001         GNULIB_MBSCHR.
1002         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
1003         * MODULES.html.sh (Internationalization functions): Add mbschr.
1004
1005 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
1006
1007         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
1008
1009         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
1010
1011 2007-02-04  Bruno Haible  <bruno@clisp.org>
1012
1013         New module description section 'configure.ac-early'.
1014         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
1015         (func_get_autoconf_early_snippet): New function.
1016         (func_import, func_create_testdir): Use it. Remove special cases for
1017         modules 'extensions' and 'lock'.
1018         * modules/extensions (configure.ac-early): Require
1019         gl_USE_SYSTEM_EXTENSIONS.
1020         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
1021
1022 2007-02-04  Bruno Haible  <bruno@clisp.org>
1023
1024         Make use of gcj-4.3's -fsource and -ftarget option.
1025         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
1026         and if so try the options -fsource and -ftarget.
1027         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
1028         source_version, ftarget_option, target_version arguments.
1029         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
1030         (is_envjavac_oldgcj_14_14_usable): Renamed from
1031         is_envjavac_gcj_14_14_usable.
1032         (is_envjavac_oldgcj_14_13_usable): Renamed from
1033         is_envjavac_gcj_14_13_usable.
1034         (is_gcj_present): Update.
1035         (is_gcj_43, is_gcj43_usable): New functions.
1036         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
1037         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
1038         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
1039         try the options -fsource and -ftarget.
1040
1041 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
1042
1043         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
1044         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
1045         larger value.
1046
1047 2007-02-03  Jim Meyering  <jim@meyering.net>
1048
1049         Give tools a better chance to allocate space for very large buffers.
1050         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
1051
1052         Make pwd and readlink work also when run with an unreadable parent dir
1053         on systems with openat support.
1054         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
1055         provided getcwd function, even when we have openat support.
1056         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
1057
1058 2007-02-02  Bruno Haible  <bruno@clisp.org>
1059
1060         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
1061         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
1062         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
1063         portability problems if one of these functions is only used on specific
1064         platforms.
1065         Reported by Paul Eggert.
1066
1067 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
1068
1069         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
1070         is causing more trouble than it's curing.
1071         * lib/regex_internal.h (__mempcpy): Remove.
1072         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
1073         (and make the code a tad smaller to boot).
1074         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
1075
1076 2007-02-02  Jim Meyering  <jim@meyering.net>
1077
1078         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
1079         section, not in the Makefile.am: one.
1080
1081 2007-02-02  Eric Blake  <ebb9@byu.net>
1082
1083         * lib/strchrnul.c: Always include config.h first.
1084
1085         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
1086         gnulib strstr is not necessary here.
1087
1088 2007-02-02  Simon Josefsson  <simon@josefsson.org>
1089
1090         * m4/socklen.m4: Fix typo.
1091
1092 2007-02-02  Eric Blake  <ebb9@byu.net>
1093
1094         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
1095         * modules/netinet_in (Makefile.am): Likewise.
1096
1097 2007-02-01  Bruno Haible  <bruno@clisp.org>
1098
1099         * lib/string_.h (GL_LINK_WARNING): New macro.
1100         (strcasecmp, strstr, strcasestr): If provided by the system,
1101         conditionally define as a macro that leads to a warning instead of to
1102         an error.
1103         (strncasecmp): Conditionally define as a macro that leads to a warning.
1104
1105 2007-02-01  Karl Berry  <karl@gnu.org>
1106
1107         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
1108
1109 2007-02-01  Bruno Haible  <bruno@clisp.org>
1110
1111         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
1112         renamings.
1113
1114 2007-02-01  Eric Blake  <ebb9@byu.net>
1115
1116         * modules/regex (Depends-on): Revert dependence on mempcpy.
1117         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
1118         module's definition of mempcpy.
1119         Reported by Paul Eggert.
1120
1121 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
1122
1123         * lib/string_.h: If the gnulib module XYZ is not present, undefine
1124         the symbol XYZ before redefining it.  This fixes a problem with
1125         programs that don't use XYZ, when compiled on systems that define
1126         XYZ to something else.
1127
1128 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
1129
1130         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
1131         occurs when "mkdir -m foo" creates a setgid directory that is (1)
1132         writeable to group or other and (2) is intended to have a special
1133         mode bit that is set or cleared.  In such a case, the directory
1134         should be neither group- nor other-writeable until the special
1135         mode bits are right.
1136
1137 2007-01-31  Eric Blake  <ebb9@byu.net>
1138
1139         * modules/mountlist (Depends-on): Add strstr.
1140
1141         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
1142         bug.
1143         * modules/string (Makefile.am): Remove redundant replacement.
1144         * modules/regex (Depends-on): Add mempcpy.
1145
1146 2007-01-31  Bruno Haible  <bruno@clisp.org>
1147
1148         New module description field 'Link'.
1149         * gnulib-tool (func_usage): Document --extract-link-directive.
1150         (sed_extract_prog): Recognize 'Link' directive.
1151         (func_get_link_directive): New function.
1152         (func_import): Show summary of link directives.
1153         Handle --extract-link-directive option.
1154         * modules/acl (Link): New section.
1155         * modules/clock-time (Link): New section.
1156         * modules/euidaccess (Link): New section.
1157         * modules/gettext (Link): New section.
1158         * modules/iconv (Link): New section.
1159         * modules/lock (Link): New section.
1160         * modules/nanosleep (Link): New section.
1161         * modules/readline (Link): New section.
1162
1163 2007-01-27  Bruno Haible  <bruno@clisp.org>
1164
1165         Enforce the use of gnulib modules for unportable <string.h> functions.
1166         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
1167         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
1168         (gl_HEADER_STRING_H_BODY): Require it.
1169         * lib/string_.h: If the gnulib module XYZ is not present, redefine
1170         the symbol XYZ to one that gives a link error.
1171         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
1172         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
1173         * modules/mempcpy (configure.ac): Likewise.
1174         * modules/memrchr (configure.ac): Likewise.
1175         * modules/stpcpy (configure.ac): Likewise.
1176         * modules/stpncpy (configure.ac): Likewise.
1177         * modules/strcase (configure.ac): Likewise.
1178         * modules/strcasestr (configure.ac): Likewise.
1179         * modules/strchrnul (configure.ac): Likewise.
1180         * modules/strdup (configure.ac): Likewise.
1181         * modules/strndup (configure.ac): Likewise.
1182         * modules/strnlen (configure.ac): Likewise.
1183         * modules/strpbrk (configure.ac): Likewise.
1184         * modules/strsep (configure.ac): Likewise.
1185         * modules/strstr (configure.ac): Likewise.
1186         * modules/strtok_r (configure.ac): Likewise.
1187
1188 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
1189
1190         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
1191
1192 2007-01-30  Jim Meyering  <jim@meyering.net>
1193
1194         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
1195
1196 2007-01-29  Bruno Haible  <bruno@clisp.org>
1197
1198         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
1199         * lib/execute.c: Likewise.
1200         * lib/pipe.c: Likewise.
1201         * lib/printf-args.h: Likewise.
1202         * lib/printf-args.c: Likewise.
1203         * lib/printf-parse.c: Likewise.
1204         * lib/vasnprintf.c: Likewise.
1205
1206 2007-01-29  Eric Blake  <ebb9@byu.net>
1207
1208         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
1209         declaration.
1210
1211 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
1212
1213         * lib/strptime.h (strptime): Use 'restrict' for args where
1214         POSIX requires this.
1215         * lib/strptime.c (strptime): Likewise.
1216         Change license notice from LGPL to GPL, since gnulib-tool will
1217         change this as needed.
1218         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
1219         defined.
1220         Include "strptime.h" first, to check interface.
1221         Do not #undef _LIBC and _NL_CURRENT.
1222         Do not include <stdlib.h>; no longer needed.
1223         Include "time_r.h" and declare ptime_locale_status
1224         only if _LIBC is not defined.
1225         (__P): Remove unused macro.
1226         (match_string): Bring back glibc version, but use it only if _LIBC
1227         is defined.
1228         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
1229         Remove unnecessary assertion and abort() call.
1230         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
1231         * m4/strptime.m4: Fix serial number comment.
1232         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
1233         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
1234         (Depends-on): Add time_r.
1235
1236 2007-01-29  Bruno Haible  <bruno@clisp.org>
1237
1238         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
1239         strptime.
1240         * modules/strptime (Depends-on): Add stdbool.
1241         * lib/strptime.h: Include <time.h> always. Add comments.
1242
1243 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
1244
1245         * modules/strptime: New file.
1246         * lib/strptime.h: New file.
1247         * lib/strptime.c: New file.
1248         * m4/strptime.m4: New file.
1249
1250 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
1251
1252         * MODULES.html.sh: New module mpsort.
1253         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
1254
1255         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
1256         a circularity problem with HP-UX ia64 reported by Bob Proulx in
1257         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
1258         All uses changed.
1259         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
1260         All uses changed.
1261         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
1262         to _Restrict_.
1263         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
1264         the parameter matches the prototype.
1265
1266 2007-01-28  Jim Meyering  <jim@meyering.net>
1267
1268         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
1269         sys/time.h here, reverting that part of the previous patch:
1270         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
1271
1272 2007-01-28  Bruno Haible  <bruno@clisp.org>
1273
1274         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
1275         value of $(SYS_TIME_H).
1276         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
1277         remove it conditionally, too. [added by Jim Meyering]
1278         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
1279         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
1280         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
1281         GETTIMEOFDAY_REPLACEMENT to 1.
1282
1283 2007-01-28  Bruno Haible  <bruno@clisp.org>
1284
1285         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
1286         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
1287         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
1288         Set UNISTD_H instead of UNISTD_H2.
1289         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
1290
1291 2007-01-28  Bruno Haible  <bruno@clisp.org>
1292
1293         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
1294         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
1295
1296 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1297
1298         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
1299         (func_create_testdir): Ensure C locale for `grep' and `tr'
1300         character ranges.
1301         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
1302         ACLOCAL_AMFLAGS parsing state machine.
1303
1304 2007-01-27  Bruno Haible  <bruno@clisp.org>
1305
1306         * modules/unistr/base: Update.
1307
1308 2007-01-27  Bruno Haible  <bruno@clisp.org>
1309
1310         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
1311         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
1312         * modules/unistr/u32-mbtouc-unsafe: Renamed from
1313         modules/unistr/u32-mbtouc.
1314         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
1315         * lib/unistr.h: Update.
1316         * lib/linebreak.c: Update.
1317         * modules/unistr/u32-mbtouc: Renamed from
1318         modules/unistr/u32-mbtouc-safe.
1319         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
1320         * lib/unistr.h: Update.
1321         * lib/unistr/u32-to-u8.c: Update.
1322         * lib/unistr/u32-to-u16.c: Update.
1323
1324 2007-01-27  Bruno Haible  <bruno@clisp.org>
1325
1326         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
1327         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
1328         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
1329         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
1330         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
1331         * modules/unistr/u16-mbtouc-unsafe: Renamed from
1332         modules/unistr/u16-mbtouc.
1333         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
1334         * lib/unistr.h: Update.
1335         * lib/linebreak.c: Update.
1336         * modules/linebreak: Update.
1337         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
1338         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
1339         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
1340         * modules/unistr/u16-mbtouc: Renamed from
1341         modules/unistr/u16-mbtouc-safe.
1342         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
1343         * lib/unistr.h: Update.
1344         * lib/unistr/u16-to-u8.c: Update.
1345         * modules/unistr/u16-to-u8: Update.
1346         * lib/unistr/u16-to-u32.c: Update.
1347         * modules/unistr/u16-to-u32: Update.
1348
1349 2007-01-27  Bruno Haible  <bruno@clisp.org>
1350
1351         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
1352         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
1353         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
1354         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
1355         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
1356         * modules/unistr/u8-mbtouc-unsafe: Renamed from
1357         modules/unistr/u8-mbtouc.
1358         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
1359         * lib/unistr.h: Update.
1360         * lib/striconveh.c: Update.
1361         * modules/striconveh: Update.
1362         * lib/linebreak.c: Update.
1363         * modules/linebreak: Update.
1364         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
1365         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
1366         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
1367         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
1368         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
1369         * lib/unistr.h: Update.
1370         * lib/striconveh.c: Update.
1371         * modules/striconveh: Update.
1372         * lib/unistr/u8-to-u16.c: Update.
1373         * modules/unistr/u8-to-u16: Update.
1374         * lib/unistr/u8-to-u32.c: Update.
1375         * modules/unistr/u8-to-u32: Update.
1376
1377 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1378
1379         Sync from Libtool.
1380         * lib/argz.c: Do not include strings.h nor memory.h, include
1381         string.h unconditionally.  Patch by Simon Josefsson.
1382
1383 2007-01-27  Bruno Haible  <bruno@clisp.org>
1384
1385         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
1386         from gl_HEADER_STRING_H_BODY.
1387         (gl_HEADER_STRING_H_BODY): Require it.
1388         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
1389         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
1390         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
1391         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
1392         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
1393         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
1394         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
1395         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
1396         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
1397         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
1398         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
1399         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
1400         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
1401         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
1402         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
1403
1404 2007-01-27  Bruno Haible  <bruno@clisp.org>
1405
1406         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
1407         check_PROGRAMS into noinst_PROGRAMS.
1408         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
1409         check_PROGRAMS in this case.
1410         (func_import): Set for_test to false.
1411         (func_create_testdir): Set for_test to true.
1412
1413 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
1414             Bruno Haible  <bruno@clisp.org>
1415
1416         * modules/strcasestr (Files): Remove lib/strcasestr.h.
1417         (Depends-on): Add string.
1418         (Includes): Use <string.h> instead of strcasestr.h.
1419         * modules/string (Makefile.am): Also substitute the value of
1420         REPLACE_STRCASESTR.
1421         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
1422         assume strcasestr is declared in <string.h> not <strings.h>. Also
1423         set REPLACE_STRCASESTR.
1424         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
1425         REPLACE_STRCASESTR.
1426         * lib/strcasestr.h: Remove file.
1427         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
1428         * lib/string_.h (strcasestr): New declaration.
1429
1430 2007-01-27  Bruno Haible  <bruno@clisp.org>
1431
1432         * lib/string_.h: Use 'extern'.
1433
1434 2007-01-27  Jim Meyering  <jim@meyering.net>
1435
1436         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
1437         of set-but-not-used local, "q".
1438
1439         * lib/mempcpy.c: Include <config.h> before <string.h>.
1440         This fixes a compilation error on HP-UX, due to the system's
1441         "restrict"-using mempcpy prototype.
1442
1443 2007-01-26  Bruno Haible  <bruno@clisp.org>
1444
1445         Small optimization.
1446         * lib/javacomp.c: Include c-strstr.h.
1447          (is_envjavac_gcj): Use c_strstr instead of strstr.
1448         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
1449
1450 2007-01-26  Bruno Haible  <bruno@clisp.org>
1451
1452         * MODULES.html.sh (Unicode string functions): Add the new modules.
1453
1454         * modules/uniconv/u32-strconv-to-locale: New file.
1455         * lib/uniconv/u32-strconv-to-locale.c: New file.
1456
1457         * modules/uniconv/u16-strconv-to-locale: New file.
1458         * lib/uniconv/u16-strconv-to-locale.c: New file.
1459
1460         * modules/uniconv/u8-strconv-to-locale: New file.
1461         * lib/uniconv/u8-strconv-to-locale.c: New file.
1462
1463         * modules/uniconv/u32-strconv-from-locale: New file.
1464         * lib/uniconv/u32-strconv-from-locale.c: New file.
1465
1466         * modules/uniconv/u16-strconv-from-locale: New file.
1467         * lib/uniconv/u16-strconv-from-locale.c: New file.
1468
1469         * modules/uniconv/u8-strconv-from-locale: New file.
1470         * lib/uniconv/u8-strconv-from-locale.c: New file.
1471
1472         * modules/uniconv/u32-strconv-to-enc: New file.
1473         * lib/uniconv/u32-strconv-to-enc.c: New file.
1474         * modules/uniconv/u32-strconv-to-enc-tests: New file.
1475         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
1476
1477         * modules/uniconv/u16-strconv-to-enc: New file.
1478         * lib/uniconv/u16-strconv-to-enc.c: New file.
1479         * lib/uniconv/u-strconv-to-enc.h: New file.
1480         * modules/uniconv/u16-strconv-to-enc-tests: New file.
1481         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
1482
1483         * modules/uniconv/u8-strconv-to-enc: New file.
1484         * lib/uniconv/u8-strconv-to-enc.c: New file.
1485         * modules/uniconv/u8-strconv-to-enc-tests: New file.
1486         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
1487
1488         * modules/uniconv/u32-strconv-from-enc: New file.
1489         * lib/uniconv/u32-strconv-from-enc.c: New file.
1490         * modules/uniconv/u32-strconv-from-enc-tests: New file.
1491         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
1492
1493         * modules/uniconv/u16-strconv-from-enc: New file.
1494         * lib/uniconv/u16-strconv-from-enc.c: New file.
1495         * modules/uniconv/u16-strconv-from-enc-tests: New file.
1496         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
1497
1498         * modules/uniconv/u8-strconv-from-enc: New file.
1499         * lib/uniconv/u8-strconv-from-enc.c: New file.
1500         * lib/uniconv/u-strconv-from-enc.h: New file.
1501         * modules/uniconv/u8-strconv-from-enc-tests: New file.
1502         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
1503
1504         * modules/uniconv/u32-conv-from-enc: New file.
1505         * lib/uniconv/u32-conv-from-enc.c: New file.
1506         * modules/uniconv/u32-conv-from-enc-tests: New file.
1507         * tests/uniconv/test-u32-conv-from-enc.c: New file.
1508
1509         * modules/uniconv/u16-conv-from-enc: New file.
1510         * lib/uniconv/u16-conv-from-enc.c: New file.
1511         * lib/uniconv/u-conv-from-enc.h: New file.
1512         * modules/uniconv/u16-conv-from-enc-tests: New file.
1513         * tests/uniconv/test-u16-conv-from-enc.c: New file.
1514
1515         * modules/uniconv/u8-conv-from-enc: New file.
1516         * lib/uniconv/u8-conv-from-enc.c: New file.
1517         * modules/uniconv/u8-conv-from-enc-tests: New file.
1518         * tests/uniconv/test-u8-conv-from-enc.c: New file.
1519
1520         * modules/uniconv/base: New file.
1521         * lib/uniconv.h: New file.
1522
1523 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
1524
1525         * doc/gnulib-tool.texi (Initial import): Update to match current
1526         behavior with strdup module.
1527         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
1528         * lib/memmem.h: Remove; all uses removed.  This is now done
1529         by <string.h>.
1530         * lib/mempcpy.h: Likewise.
1531         * lib/memrchr.h: Likewise.
1532         * lib/stpcpy.h: Likewise.
1533         * lib/stpncpy.h: Likewise.
1534         * lib/strcase.h: Likewise.
1535         * lib/strchrnul.h: Likewise.
1536         * lib/strdup.h: Likewise.
1537         * lib/strndup.h: Likewise.
1538         * lib/strnlen.h: Likewise.
1539         * lib/strpbrk.h: Likewise.
1540         * lib/strsep.h: Likewise.
1541         * lib/strstr.h: Likewise.
1542         * lib/strtok_r.h: Likewise.
1543         * lib/string_.h: New file.
1544         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
1545         Rely on <string.h> instead.
1546         * lib/canon-host.c: Likewise.
1547         * lib/chdir-long.c: Likewise.
1548         * lib/concatpath.c: Likewise.
1549         * lib/exclude.c: Likewise.
1550         * lib/fchdir.c: Likewise.
1551         * lib/getaddrinfo.c: Likewise.
1552         * lib/getcwd.c: Likewise.
1553         * lib/getsubopt.c: Likewise.
1554         * lib/glob.c: Likewise.
1555         * lib/hard-locale.c: Likewise.
1556         * lib/iconvme.c: Likewise.
1557         * lib/javacomp.c: Likewise.
1558         * lib/mempcpy.c: Likewise.
1559         * lib/memrchr.c: Likewise.
1560         * lib/regex_internal.h: Likewise.
1561         * lib/stpncpy.c: Likewise.
1562         * lib/strcasecmp.c: Likewise.
1563         * lib/strchrnul.c: Likewise.
1564         * lib/strdup.c: Likewise.
1565         * lib/striconv.c: Likewise.
1566         * lib/striconveh.c: Likewise.
1567         * lib/striconveha.c: Likewise.
1568         * lib/strncasecmp.c: Likewise.
1569         * lib/strndup.c: Likewise.
1570         * lib/strnlen.c: Likewise.
1571         * lib/strsep.c: Likewise.
1572         * lib/strstr.c: Likewise.
1573         * lib/strtok_r.c: Likewise.
1574         * lib/userspec.c: Likewise.
1575         * lib/w32spawn.h: Likewise.
1576         * lib/xstrndup.c: Likewise.
1577         * lib/mountlist.c (strstr): Remove decl.
1578         * m4/string_h.m4: New file.
1579         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
1580         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
1581         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
1582         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
1583         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
1584         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
1585         Set REPLACE_STRCASECMP if necessary.
1586         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
1587         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
1588         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
1589         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
1590         HAVE_DECL_STRDUP if necessary.
1591         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
1592         since gl_FUNC_STRNDUP does that now.
1593         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
1594         Check for decl here...
1595         (gl_PREREQ_STRNLEN): ... not here.
1596         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
1597         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
1598         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
1599         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
1600         necessary.
1601         * modules/string: New file.
1602         * modules/memmem (Files): Remove special-purpose include file.
1603         (Depends-on): Add string.
1604         (Include): Include <string.h>, not the removed file.
1605         * modules/mempcpy: Likewise.
1606         * modules/memrchr: Likewise.
1607         * modules/stpcpy: Likewise.
1608         * modules/stpncpy: Likewise.
1609         * modules/strcase: Likewise.
1610         * modules/strchrnul: Likewise.
1611         * modules/strdup: Likewise.
1612         * modules/strndup: Likewise.
1613         * modules/strnlen: Likewise.
1614         * modules/strpbrk: Likewise.
1615         * modules/strsep: Likewise.
1616         * modules/strstr: Likewise.
1617         * modules/strtok_r: Likewise.
1618         * tests/test-dirname.c: Don't include "strdup.h", since
1619         <string.h> now suffices.
1620         * tests/test-memmem.c: Don't include "memmem.h", since
1621         <string.h> now suffices.
1622
1623 2007-01-25  Bruno Haible  <bruno@clisp.org>
1624
1625         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
1626         *resultp is 0.
1627
1628         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
1629         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
1630         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
1631         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
1632
1633         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
1634         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
1635         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
1636         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
1637         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
1638         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
1639
1640 2007-01-24  Bruno Haible  <bruno@clisp.org>
1641
1642         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
1643         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
1644         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
1645         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
1646         gl_FUNC_FTS_CORE.
1647         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
1648         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
1649         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
1650         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
1651         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
1652         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
1653         gl_FUNC_FCHOWNAT.
1654         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
1655         gl_FUNC_STRFTIME.
1656         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
1657         Reported by Ralf Wildenhues.
1658
1659 2007-01-24  Bruno Haible  <bruno@clisp.org>
1660
1661         Drop AC_REQUIRE calls that are redundant with the module dependencies.
1662         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
1663         gl_GETADDRINFO.
1664         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
1665         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
1666         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
1667
1668 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
1669
1670         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
1671         Don't use 'exit'; just return from 'main'.
1672         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
1673
1674         * lib/fnmatch_.h: Readjust white space and comments to match
1675         glibc, to avoid spurious diffs.
1676
1677 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
1678
1679         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
1680         2004-12-01 change by Jakub Jelinek, since this code won't compile
1681         if !LIBC.  Problem reported by Bob Proulx.
1682
1683 2007-01-23  Bruno Haible  <bruno@clisp.org>
1684
1685         * lib/striconveh.c: Include c-strcaseeq.h.
1686         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
1687         * modules/striconveh (Depends-on): Add c-strcaseeq.
1688
1689 2007-01-23  Bruno Haible  <bruno@clisp.org>
1690
1691         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
1692
1693         * modules/c-strcaseeq: New file.
1694         * lib/c-strcaseeq.h: New file.
1695
1696         * modules/streq: New file.
1697         * lib/streq.h: New file.
1698
1699 2007-01-23  Bruno Haible  <bruno@clisp.org>
1700
1701         * modules/striconveha-tests: New file.
1702         * tests/test-striconveha.c: New file.
1703
1704         * lib/striconveha.h: Include <stdbool.h>.
1705         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
1706         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
1707         (mem_iconveha_notranslit): Renamed from mem_iconveha.
1708         (mem_iconveha): New function.
1709         (str_iconveha_notranslit): Renamed from str_iconveha.
1710         (str_iconveha): New function.
1711         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
1712         c-strcase.
1713
1714 2007-01-23  Bruno Haible  <bruno@clisp.org>
1715
1716         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
1717         encodings without forgiving before trying any encoding with handler.
1718         (str_iconveha): Try all encodings without forgiving before trying any
1719         encoding with handler.
1720
1721 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
1722
1723         Import the following changes from libc.
1724
1725         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
1726
1727         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
1728
1729         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
1730
1731         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
1732         normal_bracket label.
1733
1734         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
1735
1736         [BZ #361]
1737         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
1738         to normal_bracket after fetching the next character.
1739
1740 2007-01-22  Bruno Haible  <bruno@clisp.org>
1741
1742         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
1743         argument.
1744         * lib/striconveh.c (iconv_carefully_1): New function.
1745         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
1746         argument.
1747         (str_cd_iconveh): Update.
1748         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
1749         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
1750         * tests/test-striconveh.c (MAGIC): New macro.
1751         (new_offsets): New function.
1752         (main): Test call with and without offsets.
1753
1754 2007-01-22  Bruno Haible  <bruno@clisp.org>
1755
1756         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
1757         * modules/sys_select (Makefile.am): Likewise.
1758         * modules/sys_socket (Makefile.am): Likewise.
1759         * modules/sys_time (Makefile.am): Likewise.
1760
1761 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
1762
1763         * modules/gettimeofday (License): Change from GPL to LGPL, since
1764         gettimeofday is a library function.
1765
1766 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1767
1768         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
1769
1770 2007-01-21  Bruno Haible  <bruno@clisp.org>
1771
1772         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
1773
1774 2007-01-21  Bruno Haible  <bruno@clisp.org>
1775
1776         * modules/striconveha: New file.
1777         * lib/striconveha.h: New file.
1778         * lib/striconveha.c: New file.
1779         * MODULES.html.sh (Internationalization functions): Add striconveha.
1780         * lib/striconv.c (str_iconv): Optimize the case of an empty input
1781         string.
1782         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
1783
1784 2007-01-21  Bruno Haible  <bruno@clisp.org>
1785
1786         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
1787         * lib/striconveh.c (str_iconveh): Likewise.
1788
1789 2007-01-21  Bruno Haible  <bruno@clisp.org>
1790
1791         * lib/striconveh.h (mem_iconveh): New declaration.
1792         * lib/striconveh.c (mem_iconveh): New function.
1793         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
1794
1795 2007-01-21  Bruno Haible  <bruno@clisp.org>
1796
1797         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
1798
1799         * lib/striconveh.h (mem_cd_iconveh): Change specification.
1800         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
1801         original result buffer.
1802         (str_cd_iconveh): Update.
1803         * tests/test-striconveh.c (main): Update.
1804
1805         * lib/striconv.h (mem_cd_iconv): Change specification.
1806         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
1807         result buffer.
1808         (str_cd_iconv): Update.
1809         * tests/test-striconv.c (main): Update.
1810
1811 2007-01-21  Bruno Haible  <bruno@clisp.org>
1812
1813         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
1814
1815 2007-01-20  Jim Meyering  <jim@meyering.net>
1816
1817         * lib/userspec.c (parse_with_separator): If a user or group string
1818         starts with "+", skip the corresponding name-to-ID look-up, since
1819         such a look-up must fail: user and group names may not include "+".
1820
1821 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
1822
1823         * lib/poll.c: Include sys/time.h and time.h unconditionally,
1824         since we now assume the sys_time module.
1825         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
1826         check for sys/time.h; no longer needed.
1827         * modules/poll (Depends-on): Depend on sys_time.
1828
1829 2007-01-18  Bruno Haible  <bruno@clisp.org>
1830
1831         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
1832         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
1833
1834         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
1835         gettimeofday.
1836
1837         * tests/test-gettimeofday.c: Include <time.h>.
1838         (dummy): Remove variable.
1839
1840         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
1841         gl_HEADER_SYS_TIME_H.
1842         (gl_HEADER_SYS_TIME_H): New macro.
1843
1844         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
1845         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1846         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
1847         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
1848         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1849         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
1850         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
1851         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1852         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
1853         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
1854         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1855
1856         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
1857         last change; it caused a compilation error when cross-compiling to
1858         Cygwin.
1859
1860 2007-01-18  Jim Meyering  <jim@meyering.net>
1861
1862         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
1863         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
1864         than the race-prone "test -d sys || mkdir sys".
1865         (configure.ac): Use AC_PROG_MKDIR_P.
1866         * modules/sys_select: Likewise.
1867         * modules/sys_socket: Likewise.
1868         * modules/sys_time: Likewise.
1869
1870 2007-01-18  Eric Blake  <ebb9@byu.net>
1871
1872         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
1873         replace gettimeofday.
1874         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
1875         name, to avoid infinite recursion.
1876
1877 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
1878
1879         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
1880         module sys_time.
1881         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
1882         assume timespec.h defines struct timeval.
1883         * lib/settime.c: Likewise.
1884         * lib/utimens.c: Likewise.
1885         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
1886         since we now assume the gettimeofday module.
1887         * lib/tempname.c (__gen_tempname): Likewise.
1888         * lib/gettimeofday.h: Remove.
1889         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
1890         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
1891         Include <time.h>, for 'time()'.
1892         (localtime_buffer_addr): Also use this workaround if
1893         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
1894         to simplify the uses.  All uses changed.
1895         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
1896         that #undef is inside {}, and 'const' follows type name consistently.
1897         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
1898         (gettimeofday): Do not use the maximum possible value for
1899         tv->tv_usec, since that might break usages other than ls.c.
1900         Instead, we'll leave ls.c alone.  This undoes today's patch
1901         by Bruno.  Add a compile-time warning for 1s-clock resolution;
1902         we've never observed the problem but might as well keep the
1903         canary.
1904         * lib/nanosleep.c: Include timespec.h first, for interface check.
1905         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
1906         now assume the sys_time module.
1907         * lib/tempname.c: Likewise.
1908         * lib/timespec.h: Likewise.
1909         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
1910         needed.
1911         * lib/strftime.c: Likewise.
1912         * lib/timespec.h: Likewise.
1913         * lib/posixtm.c: Include posixtm.h first, for interface check.
1914         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
1915         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
1916         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
1917         * lib/sys_time_.h: New file.
1918         * lib/timespec.h (struct timespec): Use long int, not long.
1919         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
1920         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
1921         Remove obsolescent call to AC_HEADER_TIME.
1922         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
1923         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
1924         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
1925         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
1926         Likewise.
1927         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
1928         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
1929         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
1930         into the sys_time module.  Check for gettimeofday just once.
1931         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
1932         for gettimeofday signature to just check the signature.  Merely
1933         compile it, since linking doesn't test signature.  Improve test for
1934         whether gettimeofday.o is actually needed.
1935         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
1936         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
1937         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
1938         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1939         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
1940         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
1941         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
1942         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
1943         than worrying about sys/time.h.
1944         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
1945         Don't bother worrying about TIME_WITH_SYS_TIME.
1946         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
1947         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
1948         * m4/sys_time_h.m4: New file.
1949         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
1950         Don't include sys/time.h.  Return from main rather than exiting.
1951         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
1952         all uses changed.
1953         * modules/gethrxtime (Depends-on): Add sys_time.
1954         * modules/gettime (Depends-on): Likewise.
1955         * modules/gettimeofday (Depends-on): Likewise.
1956         * modules/nanosleep (Depends-on): Likewise.
1957         * modules/settime (Depends-on): Likewise.
1958         * modules/tempname (Depends-on): Likewise.
1959         * modules/utimens (Depends-on): Likewise.
1960         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
1961         (Include:) Change back to <sys/time.h>.
1962         (Maintainer:) Add self.
1963         * modules/sys_time: New file.
1964         * modules/tempname (Depends-on): Add gettimeofday.
1965         * tests/test-gettimeofday.c: Include <sys/time.h>
1966         rather than gettimeofday.h.
1967
1968 2007-01-17  Bruno Haible  <bruno@clisp.org>
1969
1970         * gnulib-tool (func_get_license): Revert last patch. Instead, let
1971         the license default to GPL.
1972         (func_create_testdir): Don't complain if a module is LGPL and its
1973         tests module depends on GPLed modules.
1974
1975 2007-01-17  Bruno Haible  <bruno@clisp.org>
1976
1977         * lib/gettimeofday.c (gettimeofday): Add code for the case
1978         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
1979         maximum possible value for tv->tv_usec, rather than the minimum one.
1980
1981 2005-10-08  Martin Lambers  <marlam@marlam.de>
1982 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
1983 2007-01-16  Bruno Haible  <bruno@clisp.org>
1984
1985         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
1986         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
1987         gl_FUNC_GETTIMEOFDAY.
1988         (Include): Add gettimeofday.h.
1989         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
1990         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
1991         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
1992         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
1993         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
1994         * lib/gettimeofday.h: New file.
1995         * lib/gettimeofday.c: Include <sys/timeb.h>.
1996         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
1997         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1998         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
1999         fall back on time().
2000
2001         * tests/test-gettimeofday.c: New file.
2002         * modules/gettimeofday-tests: New file.
2003
2004 2007-01-16  Eric Blake  <ebb9@byu.net>
2005
2006         * modules/fnmatch (Depends-on): Depend on wchar.
2007         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
2008         * m4/fnmatch.m4: Likewise.
2009         * modules/mbchar (Makefile.am): Assume <wchar.h>.
2010         * m4/mbchar.m4: Likewise.
2011         * modules/mbswidth (Depends-on): Depend on wchar.
2012         * lib/mbswidth.c: Assume <wchar.h>.
2013         * m4/mbswidth.m4: Likewise.
2014         * modules/quotearg (Depends-on): Depend on wchar.
2015         * lib/quotearg.c: Assume <wchar.h>.
2016         * m4/quotearg.m4: Likewise.
2017         * modules/regex (Depends-on): Depend on wchar.
2018         * lib/regex_internal.h: Assume <wchar.h>.
2019         * m4/regex.m4: Likewise.
2020         * modules/stdint (Depends-on): Depend on wchar.
2021         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
2022         * m4/stdint.m4: Likewise.
2023         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
2024         * modules/strftime (Depends-on): Depend on wchar.
2025         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
2026         * modules/strtol (Depends-on): Depend on wchar.
2027         * lib/strtol.c: Assume <wchar.h>.
2028         * modules/wcwidth (Depends-on): Depend on wchar.
2029         * lib/wcwidth.h: Assume <wchar.h>.
2030         * m4/wcwidth.m4: Likewise.
2031
2032 2007-01-16  Bruno Haible  <bruno@clisp.org>
2033
2034         * modules/csharpexec-script: New, created from...
2035         * modules/csharpexec: ... this.
2036
2037 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
2038
2039         * modules/javaexec-script: New, created from...
2040         * modules/javaexec: ... this.
2041
2042 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
2043
2044         * modules/poll (Dependencies): Add sys_select.
2045
2046 2007-01-15  Jim Meyering  <jim@meyering.net>
2047
2048         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
2049         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
2050         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
2051         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
2052
2053 2007-01-15  Bruno Haible  <bruno@clisp.org>
2054
2055         * modules/striconveh: New file.
2056         * lib/striconveh.h: New file.
2057         * lib/striconveh.c: New file.
2058         * MODULES.html.sh (Internationalization functions): Add striconveh.
2059
2060         * modules/striconveh-tests: New file.
2061         * tests/test-striconveh.c: New file.
2062
2063 2007-01-15  Bruno Haible  <bruno@clisp.org>
2064
2065         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
2066         not from GNU libiconv or GNU libc.
2067
2068 2007-01-15  Bruno Haible  <bruno@clisp.org>
2069
2070         * doc/gnulib-intro.texi (Copyright): Explain the different license
2071         terms for module descriptions, autoconf macros, tests, documentation.
2072
2073 2007-01-14  Bruno Haible  <bruno@clisp.org>
2074
2075         * modules/striconv-tests: New file.
2076         * tests/test-striconv.c: New file.
2077
2078 2007-01-14  Bruno Haible  <bruno@clisp.org>
2079
2080         * modules/iconv-tests: New file.
2081         * tests/test-iconv.c: New file.
2082
2083 2007-01-14  Bruno Haible  <bruno@clisp.org>
2084
2085         * gnulib-tool (func_get_license): For test modules, use the license of
2086         the main module.
2087
2088 2007-01-14  Bruno Haible  <bruno@clisp.org>
2089
2090         * modules/iconv (Include): Clarify that <iconv.h> can only be included
2091         if iconv is found to exist.
2092
2093 2007-01-14  Bruno Haible  <bruno@clisp.org>
2094
2095         * modules/c-ctype-tests: New file.
2096         * tests/test-c-ctype.c: New file.
2097
2098 2007-01-14  Bruno Haible  <bruno@clisp.org>
2099
2100         * modules/binary-io-tests: New file.
2101         * tests/test-binary-io.sh: New file.
2102         * tests/test-binary-io.c: New file.
2103
2104 2007-01-14  Bruno Haible  <bruno@clisp.org>
2105
2106         * modules/array-oset-tests: New file.
2107         * tests/test-array_oset.c: New file.
2108
2109 2007-01-14  Bruno Haible  <bruno@clisp.org>
2110
2111         * modules/array-list-tests: New file.
2112         * tests/test-array_list.c: New file.
2113
2114 2007-01-14  Bruno Haible  <bruno@clisp.org>
2115
2116         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
2117         and make.
2118         Reported by Simon Josefsson in
2119         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
2120
2121 2007-01-14  Bruno Haible  <bruno@clisp.org>
2122
2123         * modules/allocsa-tests: New file.
2124         * tests/test-allocsa.c: New file.
2125
2126 2007-01-14  Bruno Haible  <bruno@clisp.org>
2127
2128         * modules/fchdir (Depends-on): Add absolute-header.
2129         * modules/unistd (Depends-on): Likewise.
2130
2131 2006-12-30  Bruno Haible  <bruno@clisp.org>
2132
2133         * modules/fchdir: New file.
2134         * modules/unistd (Files): Add lib/unistd_.h.
2135         (Makefile.am): Generate unistd.h from unistd_.h.
2136         * lib/fchdir.c: New file.
2137         * lib/dirent_.h: New file.
2138         * lib/unistd_.h: New file.
2139         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
2140         * m4/fchdir.m4: New file.
2141         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
2142         (gl_HEADER_UNISTD): Invoke it.
2143         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
2144         function.
2145         * lib/backupfile.c (opendir, closedir): Undefine.
2146         * lib/chown.c (open, close): Undefine.
2147         * lib/clean-temp.c (open, close): Undefine.
2148         * lib/copy-file.c (open, close): Undefine.
2149         * lib/execute.c (open, close): Undefine.
2150         * lib/fsusage.c (open, close): Undefine.
2151         * lib/gc-gnulib.c (open, close): Undefine.
2152         * lib/getcwd.c (opendir, closedir): Undefine.
2153         * lib/glob.c (opendir, closedir): Undefine.
2154         * lib/javacomp.c (open, close): Undefine.
2155         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
2156         * lib/openat-proc.c (open, close): Undefine.
2157         * lib/pagealign_alloc.c (open, close): Undefine.
2158         * lib/pipe.c (open, close): Undefine.
2159         * lib/progreloc.c (open, close): Undefine.
2160         * lib/savedir.c (opendir, closedir): Undefine.
2161         * lib/utime.c (open, close): Undefine.
2162         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
2163
2164 2007-01-10  Bruno Haible  <bruno@clisp.org>
2165
2166         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
2167
2168 2007-01-12  Eric Blake  <ebb9@byu.net>
2169
2170         Provide a robust <wchar.h>.  Further simplifications are now
2171         possible in other modules, but not included here.
2172         * modules/wchar: New module.
2173         * m4/wchar.m4: New file.
2174         * lib/wchar_.h: Likewise.
2175         * modules/mbchar (Depends-on): Depend on wchar, as the first use
2176         of the new module.
2177         * MODULES.html.sh (Extended multibyte and wide character utilities):
2178         New section.
2179
2180 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
2181
2182         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
2183         to a reasonable default for memory allocation.
2184         (xreadlink): Don't allocate a huge buffer, to work around a buggy
2185         file system that reports garbage st_size values for symlinks.
2186         Problem reported by Liyang Hu.
2187
2188 2007-01-11  Simon Josefsson  <simon@josefsson.org>
2189
2190         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
2191         Emacs .#* auto-save files).
2192
2193 2007-01-11  Bruno Haible  <bruno@clisp.org>
2194
2195         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
2196         directory.
2197
2198 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
2199
2200         Use @...@ consistently in lib/wctype_.h.
2201         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
2202         on it being set to 1 or 0.
2203         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
2204         go back to AC_SUBSTing it.
2205         * modules/wctype (Makefile.am): Undo previous change.
2206
2207 2007-01-10  Eric Blake  <ebb9@byu.net>
2208
2209         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
2210         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
2211         * modules/wctype (Makefile.am): Likewise.
2212         Reported by Chris McGuire.
2213
2214 2007-01-10  Jim Meyering  <jim@meyering.net>
2215
2216         fts.c: a small readability/maintainability improvement
2217         * lib/fts.c (fts_read): Make this code slightly more readable and
2218         maintainable by hoisting the "sp->fts_cur = p" assignments to
2219         immediately follow the statements that set P.  Derived from
2220         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
2221
2222 2007-01-10  Eric Blake  <ebb9@byu.net>
2223
2224         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
2225         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
2226         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
2227         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
2228         Reported by Chris McGuire.
2229
2230 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2231
2232         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
2233         in sed script.
2234
2235 2007-01-09  Bruno Haible  <bruno@clisp.org>
2236
2237         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
2238         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
2239         variables.
2240         (func_module): Use them.
2241
2242 2007-01-09  Bruno Haible  <bruno@clisp.org>
2243
2244         * modules/unistr/base: New file.
2245         * lib/unistr.h: New file.
2246
2247         * modules/unistr/u8-to-u16: New file.
2248         * lib/unistr/u8-to-u16.c: New file.
2249
2250         * modules/unistr/u8-to-u32: New file.
2251         * lib/unistr/u8-to-u32.c: New file.
2252
2253         * modules/unistr/u16-to-u8: New file.
2254         * lib/unistr/u16-to-u8.c: New file.
2255
2256         * modules/unistr/u16-to-u32: New file.
2257         * lib/unistr/u16-to-u32.c: New file.
2258
2259         * modules/unistr/u32-to-u8: New file.
2260         * lib/unistr/u32-to-u8.c: New file.
2261
2262         * modules/unistr/u32-to-u16: New file.
2263         * lib/unistr/u32-to-u16.c: New file.
2264
2265         * modules/unistr/u8-check: New file.
2266         * modules/unistr/u16-check: New file.
2267         * modules/unistr/u32-check: New file.
2268         * lib/unistr/u8-check.c: New file.
2269         * lib/unistr/u16-check.c: New file.
2270         * lib/unistr/u32-check.c: New file.
2271
2272         * modules/unistr/u8-chr: New file.
2273         * modules/unistr/u16-chr: New file.
2274         * modules/unistr/u32-chr: New file.
2275         * lib/unistr/u8-chr.c: New file.
2276         * lib/unistr/u16-chr.c: New file.
2277         * lib/unistr/u32-chr.c: New file.
2278
2279         * modules/unistr/u8-cmp: New file.
2280         * modules/unistr/u16-cmp: New file.
2281         * modules/unistr/u32-cmp: New file.
2282         * lib/unistr/u8-cmp.c: New file.
2283         * lib/unistr/u16-cmp.c: New file.
2284         * lib/unistr/u32-cmp.c: New file.
2285
2286         * modules/unistr/u8-cpy: New file.
2287         * modules/unistr/u16-cpy: New file.
2288         * modules/unistr/u32-cpy: New file.
2289         * lib/unistr/u8-cpy.c: New file.
2290         * lib/unistr/u16-cpy.c: New file.
2291         * lib/unistr/u32-cpy.c: New file.
2292         * lib/unistr/u-cpy.h: New file.
2293
2294         * modules/unistr/u8-cpy-alloc: New file.
2295         * modules/unistr/u16-cpy-alloc: New file.
2296         * modules/unistr/u32-cpy-alloc: New file.
2297         * lib/unistr/u8-cpy-alloc.c: New file.
2298         * lib/unistr/u16-cpy-alloc.c: New file.
2299         * lib/unistr/u32-cpy-alloc.c: New file.
2300         * lib/unistr/u-cpy-alloc.h: New file.
2301
2302         * modules/unistr/u8-endswith: New file.
2303         * modules/unistr/u16-endswith: New file.
2304         * modules/unistr/u32-endswith: New file.
2305         * lib/unistr/u8-endswith.c: New file.
2306         * lib/unistr/u16-endswith.c: New file.
2307         * lib/unistr/u32-endswith.c: New file.
2308         * lib/unistr/u-endswith.h: New file.
2309
2310         * modules/unistr/u8-mblen: New file.
2311         * modules/unistr/u16-mblen: New file.
2312         * modules/unistr/u32-mblen: New file.
2313         * lib/unistr/u8-mblen.c: New file.
2314         * lib/unistr/u16-mblen.c: New file.
2315         * lib/unistr/u32-mblen.c: New file.
2316
2317         * modules/unistr/u8-mbtouc: New file.
2318         * modules/unistr/u16-mbtouc: New file.
2319         * modules/unistr/u32-mbtouc: New file.
2320         * lib/unistr/u8-mbtouc.c: New file.
2321         * lib/unistr/u16-mbtouc.c: New file.
2322         * lib/unistr/u32-mbtouc.c: New file.
2323
2324         * modules/unistr/u8-mbtouc-safe: New file.
2325         * modules/unistr/u16-mbtouc-safe: New file.
2326         * modules/unistr/u32-mbtouc-safe: New file.
2327         * lib/unistr/u8-mbtouc-safe.c: New file.
2328         * lib/unistr/u16-mbtouc-safe.c: New file.
2329         * lib/unistr/u32-mbtouc-safe.c: New file.
2330
2331         * modules/unistr/u8-move: New file.
2332         * modules/unistr/u16-move: New file.
2333         * modules/unistr/u32-move: New file.
2334         * lib/unistr/u8-move.c: New file.
2335         * lib/unistr/u16-move.c: New file.
2336         * lib/unistr/u32-move.c: New file.
2337         * lib/unistr/u-move.h: New file.
2338
2339         * modules/unistr/u8-next: New file.
2340         * modules/unistr/u16-next: New file.
2341         * modules/unistr/u32-next: New file.
2342         * lib/unistr/u8-next.c: New file.
2343         * lib/unistr/u16-next.c: New file.
2344         * lib/unistr/u32-next.c: New file.
2345
2346         * modules/unistr/u8-prev: New file.
2347         * modules/unistr/u16-prev: New file.
2348         * modules/unistr/u32-prev: New file.
2349         * lib/unistr/u8-prev.c: New file.
2350         * lib/unistr/u16-prev.c: New file.
2351         * lib/unistr/u32-prev.c: New file.
2352
2353         * modules/unistr/u8-set: New file.
2354         * modules/unistr/u16-set: New file.
2355         * modules/unistr/u32-set: New file.
2356         * lib/unistr/u8-set.c: New file.
2357         * lib/unistr/u16-set.c: New file.
2358         * lib/unistr/u32-set.c: New file.
2359         * lib/unistr/u-set.h: New file.
2360
2361         * modules/unistr/u8-startswith: New file.
2362         * modules/unistr/u16-startswith: New file.
2363         * modules/unistr/u32-startswith: New file.
2364         * lib/unistr/u8-startswith.c: New file.
2365         * lib/unistr/u16-startswith.c: New file.
2366         * lib/unistr/u32-startswith.c: New file.
2367         * lib/unistr/u-startswith.h: New file.
2368
2369         * modules/unistr/u8-stpcpy: New file.
2370         * modules/unistr/u16-stpcpy: New file.
2371         * modules/unistr/u32-stpcpy: New file.
2372         * lib/unistr/u8-stpcpy.c: New file.
2373         * lib/unistr/u16-stpcpy.c: New file.
2374         * lib/unistr/u32-stpcpy.c: New file.
2375         * lib/unistr/u-stpcpy.h: New file.
2376
2377         * modules/unistr/u8-stpncpy: New file.
2378         * modules/unistr/u16-stpncpy: New file.
2379         * modules/unistr/u32-stpncpy: New file.
2380         * lib/unistr/u8-stpncpy.c: New file.
2381         * lib/unistr/u16-stpncpy.c: New file.
2382         * lib/unistr/u32-stpncpy.c: New file.
2383         * lib/unistr/u-stpncpy.h: New file.
2384
2385         * modules/unistr/u8-strcat: New file.
2386         * modules/unistr/u16-strcat: New file.
2387         * modules/unistr/u32-strcat: New file.
2388         * lib/unistr/u8-strcat.c: New file.
2389         * lib/unistr/u16-strcat.c: New file.
2390         * lib/unistr/u32-strcat.c: New file.
2391         * lib/unistr/u-strcat.h: New file.
2392
2393         * modules/unistr/u8-strchr: New file.
2394         * modules/unistr/u16-strchr: New file.
2395         * modules/unistr/u32-strchr: New file.
2396         * lib/unistr/u8-strchr.c: New file.
2397         * lib/unistr/u16-strchr.c: New file.
2398         * lib/unistr/u32-strchr.c: New file.
2399
2400         * modules/unistr/u8-strcmp: New file.
2401         * modules/unistr/u16-strcmp: New file.
2402         * modules/unistr/u32-strcmp: New file.
2403         * lib/unistr/u8-strcmp.c: New file.
2404         * lib/unistr/u16-strcmp.c: New file.
2405         * lib/unistr/u32-strcmp.c: New file.
2406
2407         * modules/unistr/u8-strcpy: New file.
2408         * modules/unistr/u16-strcpy: New file.
2409         * modules/unistr/u32-strcpy: New file.
2410         * lib/unistr/u8-strcpy.c: New file.
2411         * lib/unistr/u16-strcpy.c: New file.
2412         * lib/unistr/u32-strcpy.c: New file.
2413         * lib/unistr/u-strcpy.h: New file.
2414
2415         * modules/unistr/u8-strcspn: New file.
2416         * modules/unistr/u16-strcspn: New file.
2417         * modules/unistr/u32-strcspn: New file.
2418         * lib/unistr/u8-strcspn.c: New file.
2419         * lib/unistr/u16-strcspn.c: New file.
2420         * lib/unistr/u32-strcspn.c: New file.
2421         * lib/unistr/u-strcspn.h: New file.
2422
2423         * modules/unistr/u8-strdup: New file.
2424         * modules/unistr/u16-strdup: New file.
2425         * modules/unistr/u32-strdup: New file.
2426         * lib/unistr/u8-strdup.c: New file.
2427         * lib/unistr/u16-strdup.c: New file.
2428         * lib/unistr/u32-strdup.c: New file.
2429         * lib/unistr/u-strdup.h: New file.
2430
2431         * modules/unistr/u8-strlen: New file.
2432         * modules/unistr/u16-strlen: New file.
2433         * modules/unistr/u32-strlen: New file.
2434         * lib/unistr/u8-strlen.c: New file.
2435         * lib/unistr/u16-strlen.c: New file.
2436         * lib/unistr/u32-strlen.c: New file.
2437         * lib/unistr/u-strlen.h: New file.
2438
2439         * modules/unistr/u8-strmblen: New file.
2440         * modules/unistr/u16-strmblen: New file.
2441         * modules/unistr/u32-strmblen: New file.
2442         * lib/unistr/u8-strmblen.c: New file.
2443         * lib/unistr/u16-strmblen.c: New file.
2444         * lib/unistr/u32-strmblen.c: New file.
2445
2446         * modules/unistr/u8-strmbtouc: New file.
2447         * modules/unistr/u16-strmbtouc: New file.
2448         * modules/unistr/u32-strmbtouc: New file.
2449         * lib/unistr/u8-strmbtouc.c: New file.
2450         * lib/unistr/u16-strmbtouc.c: New file.
2451         * lib/unistr/u32-strmbtouc.c: New file.
2452
2453         * modules/unistr/u8-strncat: New file.
2454         * modules/unistr/u16-strncat: New file.
2455         * modules/unistr/u32-strncat: New file.
2456         * lib/unistr/u8-strncat.c: New file.
2457         * lib/unistr/u16-strncat.c: New file.
2458         * lib/unistr/u32-strncat.c: New file.
2459         * lib/unistr/u-strncat.h: New file.
2460
2461         * modules/unistr/u8-strncmp: New file.
2462         * modules/unistr/u16-strncmp: New file.
2463         * modules/unistr/u32-strncmp: New file.
2464         * lib/unistr/u8-strncmp.c: New file.
2465         * lib/unistr/u16-strncmp.c: New file.
2466         * lib/unistr/u32-strncmp.c: New file.
2467
2468         * modules/unistr/u8-strncpy: New file.
2469         * modules/unistr/u16-strncpy: New file.
2470         * modules/unistr/u32-strncpy: New file.
2471         * lib/unistr/u8-strncpy.c: New file.
2472         * lib/unistr/u16-strncpy.c: New file.
2473         * lib/unistr/u32-strncpy.c: New file.
2474         * lib/unistr/u-strncpy.h: New file.
2475
2476         * modules/unistr/u8-strnlen: New file.
2477         * modules/unistr/u16-strnlen: New file.
2478         * modules/unistr/u32-strnlen: New file.
2479         * lib/unistr/u8-strnlen.c: New file.
2480         * lib/unistr/u16-strnlen.c: New file.
2481         * lib/unistr/u32-strnlen.c: New file.
2482         * lib/unistr/u-strnlen.h: New file.
2483
2484         * modules/unistr/u8-strpbrk: New file.
2485         * modules/unistr/u16-strpbrk: New file.
2486         * modules/unistr/u32-strpbrk: New file.
2487         * lib/unistr/u8-strpbrk.c: New file.
2488         * lib/unistr/u16-strpbrk.c: New file.
2489         * lib/unistr/u32-strpbrk.c: New file.
2490         * lib/unistr/u-strpbrk.h: New file.
2491
2492         * modules/unistr/u8-strrchr: New file.
2493         * modules/unistr/u16-strrchr: New file.
2494         * modules/unistr/u32-strrchr: New file.
2495         * lib/unistr/u8-strrchr.c: New file.
2496         * lib/unistr/u16-strrchr.c: New file.
2497         * lib/unistr/u32-strrchr.c: New file.
2498
2499         * modules/unistr/u8-strspn: New file.
2500         * modules/unistr/u16-strspn: New file.
2501         * modules/unistr/u32-strspn: New file.
2502         * lib/unistr/u8-strspn.c: New file.
2503         * lib/unistr/u16-strspn.c: New file.
2504         * lib/unistr/u32-strspn.c: New file.
2505         * lib/unistr/u-strspn.h: New file.
2506
2507         * modules/unistr/u8-strstr: New file.
2508         * modules/unistr/u16-strstr: New file.
2509         * modules/unistr/u32-strstr: New file.
2510         * lib/unistr/u8-strstr.c: New file.
2511         * lib/unistr/u16-strstr.c: New file.
2512         * lib/unistr/u32-strstr.c: New file.
2513         * lib/unistr/u-strstr.h: New file.
2514
2515         * modules/unistr/u8-strtok: New file.
2516         * modules/unistr/u16-strtok: New file.
2517         * modules/unistr/u32-strtok: New file.
2518         * lib/unistr/u8-strtok.c: New file.
2519         * lib/unistr/u16-strtok.c: New file.
2520         * lib/unistr/u32-strtok.c: New file.
2521         * lib/unistr/u-strtok.h: New file.
2522
2523         * modules/unistr/u8-uctomb: New file.
2524         * modules/unistr/u16-uctomb: New file.
2525         * modules/unistr/u32-uctomb: New file.
2526         * lib/unistr/u8-uctomb.c: New file.
2527         * lib/unistr/u16-uctomb.c: New file.
2528         * lib/unistr/u32-uctomb.c: New file.
2529
2530         * MODULES.html.sh (Unicode string functions): Add the new modules.
2531
2532 2007-01-08  Bruno Haible  <bruno@clisp.org>
2533
2534         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
2535         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
2536         subdirectories.
2537
2538 2007-01-08  Karl Berry  <karl@gnu.org>
2539
2540         * doc/error.texi: mention that main() fns must set program_name
2541         when progname is used.
2542
2543 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
2544
2545         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
2546         WCTYPE_H is empty, for the benefit of builds from non-distclean
2547         directories.  Problem reported by Eric Blake in
2548         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
2549
2550 2007-01-08  Bruno Haible  <bruno@clisp.org>
2551
2552         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
2553         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
2554         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
2555         PROVIDE_CANONICALIZE_FILENAME_MODE.
2556         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
2557
2558 2007-01-08  Bruno Haible  <bruno@clisp.org>
2559
2560         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
2561         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
2562         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
2563         * lib/fts.c: Likewise.
2564         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
2565
2566 2006-12-25  Bruno Haible  <bruno@clisp.org>
2567
2568         * modules/utf8-ucs4-safe: New file.
2569         * lib/utf8-ucs4-safe.h: New file.
2570         * lib/unistr/utf8-ucs4-safe.c: New file.
2571
2572         * modules/utf16-ucs4-safe: New file.
2573         * lib/utf16-ucs4-safe.h: New file.
2574         * lib/unistr/utf16-ucs4-safe.c: New file.
2575
2576         * MODULES.html.sh (Unicode string functions): Add the new modules.
2577
2578 2007-01-08  Bruno Haible  <bruno@clisp.org>
2579
2580         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
2581         (Depends-on): Add unitypes.
2582         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
2583         (u8_mbtouc_aux): Move out to separate file.
2584         (u8_mbtouc): Use ucs4_t, uint8_t types.
2585         * lib/unistr/utf8-ucs4.c: New file.
2586
2587         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
2588         (Depends-on): Add unitypes.
2589         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
2590         (u16_mbtouc_aux): Move out to separate file.
2591         (u16_mbtouc): Use ucs4_t, uint16_t types.
2592         * lib/unistr/utf16-ucs4.c: New file.
2593
2594         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
2595         (Depends-on): Add unitypes.
2596         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
2597         (u8_uctomb_aux): Move out to separate file.
2598         (u8_uctomb): Use ucs4_t, uint8_t types.
2599         * lib/unistr/ucs4-utf8.c: New file.
2600
2601         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
2602         (Depends-on): Add unitypes.
2603         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
2604         (u16_uctomb_aux): Move out to separate file.
2605         (u16_uctomb): Use ucs4_t, uint16_t types.
2606         * lib/unistr/ucs4-utf16.c: New file.
2607
2608 2006-12-25  Bruno Haible  <bruno@clisp.org>
2609
2610         * modules/unitypes: New file.
2611         * lib/unitypes.h: New file.
2612         * MODULES.html.sh (func_all_modules): New section "Unicode string
2613         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
2614         this section. Add unitypes.
2615
2616 2007-01-08  Bruno Haible  <bruno@clisp.org>
2617
2618         Avoid variable names that conflict with those from libtool.
2619         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
2620         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
2621         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
2622         library_names_spec to acl_library_names_spec, hardcode_* to
2623         acl_hardcode_*.
2624         Reported by Ralf Wildenhues.
2625
2626 2007-01-08  Bruno Haible  <bruno@clisp.org>
2627
2628         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
2629         definition.
2630         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
2631         definition.
2632         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
2633         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
2634         definition.
2635         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
2636         definition.
2637         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
2638         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
2639         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
2640         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
2641         definition.
2642         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
2643         definition.
2644         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
2645         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
2646         GC_USE_<algorithm>.
2647         * lib/gc-libgcrypt.c: Likewise.
2648         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
2649         * modules/gc-arctwo (configure.ac): Likewise.
2650         * modules/gc-des (configure.ac): Likewise.
2651         * modules/gc-hmac-md5 (configure.ac): Likewise.
2652         * modules/gc-hmac-sha1 (configure.ac): Likewise.
2653         * modules/gc-md2 (configure.ac): Likewise.
2654         * modules/gc-md4 (configure.ac): Likewise.
2655         * modules/gc-md5 (configure.ac): Likewise.
2656         * modules/gc-random (configure.ac): Likewise.
2657         * modules/gc-rijndael (configure.ac): Likewise.
2658         * modules/gc-sha1 (configure.ac): Likewise.
2659
2660 2007-01-08  Bruno Haible  <bruno@clisp.org>
2661
2662         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
2663         macro definition.
2664         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
2665         definition.
2666         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
2667         definition.
2668         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
2669         * modules/fcntl-safer (configure.ac): Likewise.
2670         * modules/fopen-safer (configure.ac): Likewise.
2671         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
2672         GNULIB_FWRITEERROR macro definition.
2673
2674 2007-01-08  Bruno Haible  <bruno@clisp.org>
2675
2676         * m4/gnulib-common.m4: New file.
2677         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
2678         (func_get_filelist): Add m4/gnulib-common.m4.
2679
2680 2007-01-08  Bruno Haible  <bruno@clisp.org>
2681
2682         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
2683         command.
2684
2685 2007-01-08  Jim Meyering  <jim@meyering.net>
2686
2687         Use a more robust test for a "can't happen" condition.
2688         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
2689         narrowed the st_size value.  Presuming the "can't happen" condition
2690         is true, that narrowing could conceivably convert an invalid st_size
2691         value into a valid one.  Instead, use a change based on Matthew
2692         Woehlke's original patch.
2693
2694         Slight readability improvement: use an assert-like macro
2695         in place of literal "abort ()" uses.
2696         * lib/fts.c (fts_assert): Define.
2697         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
2698         Use this macro instead of a bare 'abort'.
2699
2700 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
2701
2702         Don't worry about using IRIX 5.3's wctype.h broken definitions;
2703         simply work around them.
2704         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
2705         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
2706         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before declaring.
2707         Don't bother to define as macros, since the standard doesn't require it.
2708         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
2709         longer worry about IRIX 5.3.
2710         (HAVE_WCTYPE_CTMP_BUG): Remove.
2711
2712 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
2713
2714         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
2715         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
2716         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
2717         Problems reported by Georg Schwarz for IRIX 5.3.
2718
2719         * gnulib-tool (autoconf_minversion): Take the maximum version number
2720         found, not the minimum.  Problem reported by James Youngman.
2721
2722 2007-01-03  Karl Berry  <karl@gnu.org>
2723
2724         * doc/error.texi: new file, explaining interaction with progname.
2725         * doc/gnulib.texi: include it.  Update copyright.
2726
2727 2007-01-03  Simon Josefsson  <simon@josefsson.org>
2728
2729         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
2730         AC_CANONICAL_HOST, to improve autobuild outputs.
2731
2732 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
2733             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
2734
2735         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
2736         sockets, server sockets, and other file descriptors.  Count errors
2737         to compute the return value.  Reorder the code a bit to be easier
2738         to follow.  Don't set event bits that were not requested (except
2739         POLLERR and POLLHUP).
2740
2741 2007-01-01  Bruno Haible  <bruno@clisp.org>
2742
2743         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
2744
2745 2007-01-03  Jim Meyering  <jim@meyering.net>
2746
2747         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
2748
2749 2007-01-02  Bruno Haible  <bruno@clisp.org>
2750
2751         * modules/settime (Include): Require timespec.h.
2752         * modules/nanosleep (Include): Likewise.
2753
2754 2007-01-01  Bruno Haible  <bruno@clisp.org>
2755
2756         * gnulib-tool (func_emit_copyright_notice): Bump year.
2757         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
2758
2759 2007-01-01  Bruno Haible  <bruno@clisp.org>
2760
2761         Improve support for OpenBSD.
2762         * build-aux/config.rpath (libname_spec): Export.
2763         (library_names_spec): New variable. Export.
2764         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
2765         library_names_spec from the config.rpath output. Locate shared library
2766         through the name pattern in library_names_spec.
2767
2768 2007-01-01  Eric Blake  <ebb9@byu.net>
2769
2770         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
2771
2772 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
2773
2774         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
2775         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
2776         assume the C locale, and avoid an "eval" that could cause trouble.
2777         Problem with SORT reported by Bob Proulx.
2778
2779         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
2780         Define.  Trivial patch from Henning Nielsen Lund, originally
2781         sent to bug-grep@gnu.org today.
2782
2783 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
2784
2785         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
2786         struct stat.  Problem reported by Henning Nielsen Lund.
2787         * lib/acl.c: Include acl.h first, to check interface.  Don't
2788         bother to include sys/types.h and sys/stat.h again.
2789
2790 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
2791
2792         Import the following change from libc; problem reported by
2793         Sven Verdoolaege.
2794
2795         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
2796
2797         [BZ #1373]
2798         * lib/argp.h: Remove __NTH for __argp_usage inline function.
2799
2800 2006-12-28  Jim Meyering  <jim@meyering.net>
2801
2802         * build-aux/announce-gen: Do not assume that the package
2803         builds any of tar.gz, tar.bz2, and .xdelta files.
2804         Suggestion from Simon Josefsson.
2805
2806 2006-12-28  Simon Josefsson  <simon@josefsson.org>
2807
2808         * modules/announce-gen: New file.
2809
2810 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
2811
2812         * lib/mbchar.h: Just include <wctype.h>; the wctype module
2813         handles its gotchas now.
2814         * lib/mbswidth.c: Likewise.
2815         * lib/wcwidth.h: Likewise.
2816         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
2817         and iswcntrl; the wctype module does this stuff now.
2818         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
2819         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
2820         * modules/mbchar (Depends-on): Add wctype.
2821         * modules/mbswidth (Depends-on): Likewise.
2822         * modules/wcwidth (Depends-on): Likewise.
2823
2824 2006-12-27  Eric Blake  <ebb9@byu.net>
2825
2826         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
2827         module uses more than what <wctype.h> is required to provide.
2828
2829 2006-12-26  Eric Blake  <ebb9@byu.net>
2830
2831         * gnulib-tool (sed_extract_prog): Avoid space-tab.
2832
2833 2006-12-26  Eric Blake  <ebb9@byu.net>
2834
2835         * modules/absolute-header: New module.
2836         * modules/fcntl (Depends-on): Depend on it.
2837         * modules/inttypes (Depends-on): Likewise.
2838         * modules/stdint (Depends-on): Likewise.
2839         * modules/sys_stat (Depends-on): Likewise.
2840         * modules/wctype (Depends-on): Likewise.
2841         * MODULES.html.sh (Support for building libraries and
2842         executables): Document it.
2843
2844 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
2845
2846         * gnulib-tool (SED): Remove, undoing previous change.
2847         The problem was that it broke coreutils on Solaris, because
2848         "sed --posix" leaked into a makefile.
2849         (sed): New alias, if 'alias' and GNU sed.
2850
2851 2006-12-24  Jim Meyering  <jim@meyering.net>
2852
2853         Work around an fchownat bug in glibc-2.4:
2854         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
2855         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
2856         in spite of the -P option.
2857         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
2858         New macros.
2859         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
2860         * modules/openat (Files): Add lib/fchownat.c.
2861         * lib/openat.c (fchownat): Don't define here.  Move to...
2862         * lib/fchownat.c: ...this new file.
2863
2864 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
2865
2866         Fix bug reported by Bruno Haible in
2867         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
2868         where quotearg.c didn't compile on Mac OS X 10.2 because it
2869         lacks <wchar.h> and wint_t.
2870         * lib/wctype_.h (__wctype_wint_t): New type.
2871         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
2872         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
2873         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
2874         Arg is now of type __wctype_wint_t, not wint_t.
2875         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
2876         substitute HAVE_WINT_T.
2877         * modules/wctype (Files): Add m4/wint_t.m4.
2878         (wctype.h): Substitute HAVE_WINT_T.
2879
2880 2006-12-23  Bruno Haible  <bruno@clisp.org>
2881
2882         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
2883
2884 2006-12-23  Bruno Haible  <bruno@clisp.org>
2885
2886         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
2887         S_ISLNK.
2888         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
2889         mingw.
2890
2891 2006-12-22  Bruno Haible  <bruno@clisp.org>
2892
2893         * lib/copy-file.c: Include acl.h.
2894         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
2895         Close the file descriptors only after being done with copy_acl.
2896         * modules/copy-file (Depends-on): Add acl.
2897
2898 2006-12-22  Bruno Haible  <bruno@clisp.org>
2899
2900         * gnulib-tool (SED): New variable.
2901         Use $SED instead of sed everywhere.
2902
2903 2006-12-22  Bruno Haible  <bruno@clisp.org>
2904
2905         * modules/no-c++: New file.
2906         * m4/no-c++.m4: New file.
2907         * MODULES.html.sh (Support for building libraries and executables):
2908         Add no-c++.
2909
2910 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
2911
2912         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
2913         Include <limits.h>, and use its INT_MAX to rewrite the
2914         j loop so that it does not overflow 'int'.  Problem reported by
2915         Ralf Wildenhues in
2916         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
2917         Play it safe by shifting left by 1 rather than multiplying by 2,
2918         as GCC is less likely to optimize this away when the value
2919         is signed (when it assumes overflow leads to undefined behavior).
2920         Also, don't assume time_t uses two's complement.
2921
2922 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
2923
2924         * MODULES.html.sh: New module wctype.
2925         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
2926         * lib/fnmatch.c: Don't bother to include <wchar.h> before
2927         <wctype.h>, since the new wctype module should fix this.
2928         * lib/quotearg.c: Include <wctype.h> unconditionally, since
2929         the wctype module should arrange for it.
2930         * lib/regex_internal.h: Likewise.
2931         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
2932         since the wctype module should handle this now.
2933         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
2934         * modules/fnmatch (Depends-on): Add wctype.
2935         * modules/quotearg (Depends-on): Likewise.
2936         * modules/regex (Depends-on): Likewise.
2937
2938 2006-12-19  Bruno Haible  <bruno@clisp.org>
2939
2940         * lib/strdup.h [C++]: Wrap definitions in extern "C".
2941         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
2942
2943 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2944
2945         * modules/savewd (Depends-on): Fix dependency on fcntl.
2946
2947 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
2948
2949         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
2950         conforms to C99, rather than relying on the user's environment
2951         setting of STDINT_H.
2952
2953 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
2954         and Eric Blake  <ebb9@byu.net>
2955
2956         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
2957         This is more consistent with the other defines here.
2958         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
2959         Port to z/OS.  Problem reported by Paul Gilmartin.
2960         Change local vars to use gl_ prefix rather than ac_.
2961         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
2962         with other defines.
2963         * modules/double-slash-root: New module.
2964         * modules/dirname (Files): Remove m4/double-slash-root.m4.
2965         (Depends-on): Add double-slash-root.
2966         * MODULES.html.sh (File system functions): Mention new module.
2967
2968 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
2969
2970         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
2971         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
2972         This is for the benefit of gzip, which doesn't do i18n.
2973
2974 2006-12-12  Jim Meyering  <jim@meyering.net>
2975
2976         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
2977         Reported by Andreas Schwab <schwab@suse.de>.
2978
2979 2006-12-12  Bruno Haible  <bruno@clisp.org>
2980
2981         Merge these changes.
2982         2006-09-05  Bruno Haible  <bruno@clisp.org>
2983         * lib/iconvme.c (iconv_string): No need to save and restore errno when
2984         iconv_alloc succeeded.
2985         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
2986         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
2987         test for " && dest " at the end - dest is always != NULL there. Call
2988         iconv with 4xNULL arguments initially, to reset the state. Call iconv
2989         with 2xNULL arguments, also to flush the state storage. Handle the
2990         IRIX iconv behaviour. Realloc the final result, to throw away unused
2991         memory.
2992
2993 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
2994
2995         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
2996         and fchmodat unconditionally, since glibc 2.4 has them.
2997         Problem reported by Arkadiusz Miskiewicz.
2998
2999 2006-12-10  Bruno Haible  <bruno@clisp.org>
3000
3001         * gnulib-tool (func_import): Show the include files only for those
3002         modules that are copied and specified.
3003         Reported by Karl Berry.
3004
3005 2006-12-08  Jim Meyering  <jim@meyering.net>
3006
3007         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
3008         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
3009
3010         * build-aux/announce-gen: Add two new options, both optional:
3011         --bootstrap-tools=TOOL_LIST
3012               a comma-separated list of tools, e.g.,
3013               autoconf,automake,bison,gnulib
3014         --gnulib-snapshot-date=DATE
3015               if gnulib is in the bootstrap tool list,
3016               then report this as the snapshot date.
3017               If not specified, use the current date/time.
3018               If you specify a date here, be sure it's UTC.
3019
3020 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3021
3022         * tests/test-argp-2.sh: Fix test to match actual output.
3023         (func_compare): Fix sed script to be portable.
3024
3025 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
3026
3027         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
3028         workaround for this case.  It is not autoconfigured now; offhand
3029         it's hard to see how to autoconfigure it.
3030
3031 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
3032
3033         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
3034         a directory that is about to be chowned.  Such a directory's
3035         initial file permissions should permit the owner only and this
3036         should not be changed until after the chown, since the group and
3037         other bits would be incorrect if they granted permission before
3038         the chown.
3039
3040         Fix porting problem for iswctype reported by Georg Schwarz in:
3041         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
3042         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
3043         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
3044         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
3045         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
3046
3047 2006-12-03  Jim Meyering  <jim@meyering.net>
3048
3049         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
3050         p->fts_statp may not yet be defined.
3051         (fts_read): Instead, set it in the caller, once p->fts_statp is
3052         sure to be defined, and corresponds to a top-level directory.
3053         This bug made du -x fail.  Here's the coreutils test case:
3054         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
3055         Reported by Mike Frysinger.
3056
3057 2006-12-01  Jim Meyering  <jim@meyering.net>
3058
3059         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
3060         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
3061         Reported by Simon Josefsson.
3062
3063 2006-11-30  Jim Meyering  <jim@meyering.net>
3064
3065         * m4/warning.m4: Use the all-permissive copyright notice
3066         recommended by RMS (rather than LGPL).
3067         * m4/vararrays.m4: Likewise.
3068         * m4/flexmember.m4: Likewise.
3069
3070 2006-11-29  Bruno Haible  <bruno@clisp.org>
3071
3072         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
3073         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
3074         using +=.
3075         Reported by Simon Josefsson <simon@josefsson.org>.
3076
3077 2006-11-28  James Youngman <jay@gnu.org>
3078
3079         * README: Advise users that they might find the bug-gnulib@gnu.org
3080         and autotools-announce@gnu.org mailing lists useful.
3081
3082 2006-11-28  Bruno Haible  <bruno@clisp.org>
3083
3084         * m4/ptrdiff_max.m4: Remove file.
3085
3086 2006-11-21  Bruno Haible  <bruno@clisp.org>
3087
3088         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
3089         _AC_COMPUTE_INT.
3090         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3091         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
3092         _AC_COMPUTE_INT.
3093         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3094         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
3095         _AC_COMPUTE_INT.
3096         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3097
3098 2006-11-28  Jim Meyering  <jim@meyering.net>
3099
3100         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
3101         warning from "gcc -Wshadow" about shadowing the builtin.
3102
3103 2006-11-27  Bruno Haible  <bruno@clisp.org>
3104
3105         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
3106         _AC_COMPUTE_INT.
3107         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3108
3109 2006-11-27  Bruno Haible  <bruno@clisp.org>
3110             Paul Eggert  <eggert@cs.ucla.edu>
3111
3112         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
3113
3114 2006-11-26  Bruno Haible  <bruno@clisp.org>
3115
3116         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
3117         noinst_LTLIBRARIES.
3118
3119 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
3120             Bruno Haible  <bruno@clisp.org>
3121
3122         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
3123         if compiling with "gcc -ansi".
3124
3125 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
3126
3127         Fix some incompatibilities with gcc -ansi -pedantic.
3128         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
3129         if compiling pedantically with GCC, unless it's C99 or later.
3130         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
3131         it mishandles gcc -ansi -pedantic as well.
3132         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
3133         if gcc -pedantic.
3134         * lib/regexec.c (check_node_accept_bytes): Don't use auto
3135         initializers for struct if -pedantic, unless it's C99 or later.
3136
3137 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
3138
3139         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
3140         Don't close an fd more than once. Identical atimes indicate
3141         success, not failure.
3142
3143 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
3144
3145         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
3146
3147 2006-11-23  Jim Meyering  <jim@meyering.net>
3148
3149         * build-aux/announce-gen: New file.  From coreutils.
3150
3151 2006-11-22  Jim Meyering  <jim@meyering.net>
3152
3153         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
3154         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
3155         (fts_read): Use a temporary to narrow the overused st_size member
3156         before using it in a switch statement.  Reported by Matthew Woehlke.
3157
3158         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
3159         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
3160
3161 2006-11-20  Bruno Haible  <bruno@clisp.org>
3162
3163         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
3164         changequote instead of pairs of brackets.
3165         Reported by Andreas Schwab <schwab@suse.de>.
3166
3167 2006-11-21  Jim Meyering  <jim@meyering.net>
3168
3169         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
3170         so as to remain compatible with older compilers.
3171         Patch from Michael Deutschmann.
3172
3173 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
3174
3175         * MODULES.html.sh (File system functions): Add openat.
3176
3177         * lib/openat.h (rpl_fstatat): New macro, if
3178         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
3179         (fstatat): Define to rpl_fstatat under the same conditions,
3180         unless COMPILING_FSTATAT.
3181         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
3182         seems to have the bug.
3183         * lib/fstatat.c: New file.
3184         * modules/openat (Files): Add it.
3185
3186 2006-11-20  Bruno Haible  <bruno@clisp.org>
3187
3188         * Makefile: New file.
3189
3190 2006-11-20  Jim Meyering  <jim@meyering.net>
3191
3192         The beginnings of syntax-related checks for gnulib.
3193         * lib/Makefile: New file.
3194         * lib/t-idcache: New script.  Ensure that the two halves of
3195         idcache.c stay in sync.
3196
3197         * lib/idcache.c: Adjust comments in user- and group- portions to
3198         be more accurate, and to be consistent with one another.
3199
3200 2006-11-20  Jim Meyering  <jim@meyering.net>
3201
3202         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
3203         continue using the flexible array member (thus, this module performs
3204         half as many malloc calls), with the addition that...
3205         (getgroup, getuser): Consistently record a non-match via an empty
3206         "name" string, and map an empty string match to a NULL return value.
3207         * modules/idcache (Depends-on): Re-add flexmember.
3208
3209         * lib/idcache.c (getuser): Remove all uses of the register keyword.
3210         (getuidbyname, getgroup, getgidbyname): Likewise.
3211
3212         Use cleaner syntax: NULL rather than 0.
3213         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
3214
3215 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
3216
3217         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
3218         It mishandled the case where the group was missing.
3219         Problem reported by Greg Schafer.
3220         * modules/idcache: Likewise.
3221
3222 2006-11-18  Jim Meyering  <jim@meyering.net>
3223
3224         * check-module (%exempt_header): Add exception for some
3225         conditionally-included headers.
3226
3227         * modules/i-ring (Depends-on): Add verify.
3228         (License): Change to LGPL.
3229
3230 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
3231
3232         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
3233         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
3234         and inttostr.h.  Use snprintf rather than uinttostr, so that
3235         LGPLed code doesn't depend on GPLed.
3236
3237 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
3238
3239         * modules/inline (License): Change from GPL to LGPL.
3240
3241 2006-11-17  Jim Meyering  <jim@meyering.net>
3242
3243         * modules/d-type (License): Switch to LGPL.
3244
3245 2006-11-15  Bruno Haible  <bruno@clisp.org>
3246
3247         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
3248
3249 2006-11-15  Eric Blake  <ebb9@byu.net>
3250
3251         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
3252         the module dependency.
3253
3254 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
3255             Bruno Haible  <bruno@clisp.org>
3256
3257         * gnulib-tool (func_create_testdir): Add license consistency check.
3258
3259 2006-11-15  Eric Blake  <ebb9@byu.net>
3260
3261         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
3262         random "(cached)" in configure output.
3263
3264 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3265
3266         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
3267         test for conforming inttypes.h is both announced and cached.
3268
3269         * MODULES.html.sh (seen_modules, seen_files): New variables.
3270         (func_module): Rewrite to use a few less gnulib-tool and sed
3271         invocations.  Avoid a couple of quadratic algorithms for ...
3272         (missed_modules, missed_files): ... these, with ...
3273         (func_append, func_tmpdir): ... these new functions, from
3274         gnulib-tool.  Analogously, install traps for cleanup.
3275
3276         * tests/test-gc.c (main): Remove unused variables.
3277         * tests/test-read-file.c: Include stdlib.h, for 'free'.
3278
3279 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
3280
3281         * modules/inttostr (License): Change to LGPL.
3282
3283 2006-11-14  Eric Blake  <ebb9@byu.net>
3284
3285         * modules/tempname (License): Change to LGPL.
3286
3287 2006-11-14  Eric Blake  <ebb9@byu.net>
3288
3289         * doc/functions.texi (Function Portability): *printf functions on
3290         Cygwin now understand all POSIX size specifiers.
3291
3292 2006-11-14  Bruno Haible  <bruno@clisp.org>
3293
3294         * modules/c-ctype (License): Change to LGPL.
3295
3296 2006-11-12  Bruno Haible  <bruno@clisp.org>
3297
3298         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
3299         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
3300         for GNOME libraries, for which the include files are installed in
3301         subdirectories of $prefix/include.
3302
3303 2006-11-12  Bruno Haible  <bruno@clisp.org>
3304
3305         * m4/lib-link.m4: Require at least autoconf-2.54.
3306         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
3307         name to underscores for the --with option.
3308
3309 2006-11-13  Bruno Haible  <bruno@clisp.org>
3310
3311         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
3312         the tests directory.
3313         Reported by Ralf Wildenhues.
3314
3315 2006-11-13  Bruno Haible  <bruno@clisp.org>
3316
3317         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
3318         (func_emit_initmacro_end): Undo the override here.
3319         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
3320         Works around the famous automake error in coreutils.
3321
3322 2006-11-13  Eric Blake  <ebb9@byu.net>
3323
3324         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
3325         element, not its node.
3326
3327 2006-11-12  Bruno Haible  <bruno@clisp.org>
3328
3329         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
3330         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
3331
3332 2006-11-12  Bruno Haible  <bruno@clisp.org>
3333
3334         * gnulib-tool: New option --local-symlink.
3335         (func_usage): Document it.
3336         (lsymbolic): New variable.
3337         (func_import, func_create_testdir): If --symlink was not specified,
3338         test whether --local-symlink was specified and the file comes from
3339         the local_gnulib_dir.
3340
3341 2006-11-12  Bruno Haible  <bruno@clisp.org>
3342
3343         * gnulib-tool (func_ln): New function.
3344         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
3345
3346 2006-11-12  Bruno Haible  <bruno@clisp.org>
3347
3348         Finish support for source files in subdirectories.
3349         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
3350         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
3351         AUTOMAKE_OPTIONS.
3352         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
3353
3354 2006-11-12  Bruno Haible  <bruno@clisp.org>
3355
3356         * gnulib-tool (func_get_automake_snippet): Synthesize also an
3357         EXTRA_lib_SOURCES augmentation.
3358         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
3359
3360 2006-11-12  Jim Meyering  <jim@meyering.net>
3361
3362         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
3363         file descriptors.  This also averts a failure on systems with
3364         native openat support when a traversed directory lacks "x" access.
3365         * lib/fts_.h: Include "i-ring.h"
3366         (struct FTS) [fts_fd_ring]: New member.
3367         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
3368         (FCHDIR): Add parentheses.
3369         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
3370         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
3371         When descending, rather than simply closing the previous
3372         fts_cwd_fd value, push that file descriptor onto the ring.
3373         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
3374         (fts_open): Initialize the new fd_ring member.
3375         (fts_close): Clear the ring.
3376         (fts_safe_changedir): When possible, use our new fd_ring to skip
3377         the diropen and fstat and dev/ino comparison that would normally
3378         accompany a virtual `chdir ("..")'.
3379
3380         * modules/fts (Depends-on): Add i-ring.
3381         * modules/i-ring: New module.
3382         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
3383         * m4/i-ring.m4: New file.
3384
3385 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3386
3387         * gnulib-tool (func_create_testdir): Fix replacement of
3388         `build-aux' in configure.ac.  Run autotools in gltests
3389         subdirectory.
3390         (func_create_testdir, func_create_megatestdir, test): There is
3391         no need for '--force' in most autotool invocations in a new
3392         tree.  Actually fail the whole test if any of the tools, or the
3393         configure or make stages fail.
3394
3395         Sync from Automake.
3396         * build-aux/gnupload: Revert last change.  Add pointer to upload
3397         instructions of the GNU Maintenance Instructions.
3398         Suggestion by Karl Berry.
3399
3400 2006-11-10  Jim Meyering  <jim@meyering.net>
3401
3402         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
3403
3404 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
3405
3406         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
3407         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
3408         (bind_textdomain_codeset) [! ENABLE_NLS]:
3409         Evaluate all the arguments.  That way, callers get compatible behavior
3410         if the arguments have side effects.  Also, it avoids some GCC
3411         diagnostics in some cases; Joel E. Denny reported problems when Bison
3412         was configured with --enable-gcc-warnigs.
3413
3414 2006-11-10  Jim Meyering  <jim@meyering.net>
3415
3416         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
3417         relevant options in CFLAGS (like -O, -fno-inline) are taken into
3418         account.
3419
3420 2006-11-10  Jim Meyering  <jim@meyering.net>
3421
3422         * modules/inline: New file/module.
3423         * modules/xalloc (Files): Remove m4/inline.m4.
3424         (Depends-on): Add inline, instead.
3425         * modules/oset: Likewise.
3426         * modules/list: Likewise.
3427
3428 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
3429
3430         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
3431         Problem reported by Matthew Woehlke.
3432
3433 2006-11-09  Bruno Haible  <bruno@clisp.org>
3434
3435         * lib/tempname.c (gen_tempname): Remove variant that invokes
3436         __gen_tempname.
3437         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
3438         __gen_tempname.
3439
3440 2006-11-08  Bruno Haible  <bruno@clisp.org>
3441
3442         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
3443         to 'yes' instead of 'cross-compiling'.
3444
3445 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
3446
3447         * lib/quotearg.h (quotearg_free): New decl.
3448         * lib/quotearg.c (quotearg_free): New function.
3449         (slot0, nslots, slotvec0, slotvec):
3450         Now file-scope so that quotearg_free can get at them.
3451
3452 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3453
3454         Sync from Automake.
3455         * build-aux/gnupload: Add missing 'gnu' to example URL.
3456         Report by Karl Berry.
3457
3458 2006-11-08  Bruno Haible  <bruno@clisp.org>
3459
3460         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
3461         Suggested by Paul Eggert.
3462
3463 2006-11-08  Jim Meyering  <jim@meyering.net>
3464
3465         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
3466         It's already included if !_LIBC.
3467         (fts_safe_changedir): Add a comment.
3468
3469 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
3470
3471         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
3472         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
3473         Matthew Woehlke.
3474
3475         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
3476         definitions up, to avoid colliding with change below.
3477         (static_inline) [HAVE_INLINE]: New macro.
3478         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
3479         Provide extern decls when !HAVE_INLINE.  Do not define unless
3480         static_inline is defined, either by us or by xmalloc.c.  Use
3481         static_inline rather than static inline.
3482         (XCALLOC): Optimize sizeof(T) = 1 case.
3483         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
3484
3485 2006-11-07  Bruno Haible  <bruno@clisp.org>
3486
3487         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
3488         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
3489         AC_C_INLINE.
3490         * modules/xalloc (Files): Add m4/inline.m4.
3491
3492 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3493
3494         * README: Fix typo.
3495         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
3496         (Miscellanous Notes): ...from this.
3497
3498 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
3499
3500         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
3501         Mention that offsetof should be used instead of sizeof.
3502         From Bruno Haible.
3503
3504 2006-11-07  Bruno Haible  <bruno@clisp.org>
3505
3506         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
3507
3508 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
3509
3510         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
3511         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
3512         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
3513         (gl_tree_add_before, gl_tree_add_after):
3514         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
3515         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
3516         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
3517         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
3518         (gl_linked_add_after, gl_linked_add_at): Likewise.
3519         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
3520         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
3521         (gl_tree_add_before, gl_tree_add_after): Likewise.
3522         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
3523         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
3524         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
3525
3526 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3527
3528         * lib/gl_oset.h: Use C comment style, not C++ comment style.
3529
3530 2006-11-06  Bruno Haible  <bruno@clisp.org>
3531
3532         * m4/inline.m4: New file.
3533         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
3534         * modules/list (Files): Add m4/inline.m4.
3535         * modules/oset (Files): Likewise.
3536
3537 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
3538
3539         * lib/idcache.c: Include <stddef.h>, for offsetof.
3540         (struct userid.name): Change from char * to a flexible array member.
3541         All uses changed.
3542         * modules/idcache (Depends-on): Add flexmember.
3543
3544         * MODULES.html.sh (Core language properties): New module flexmember.
3545         * modules/flexmember, m4/flexmember.m4: New files.
3546
3547         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
3548         inline functions that are identical with the old xnmalloc_inline,
3549         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
3550         that we can avoid some unnecessary integer multiplications and
3551         divisions in the common case where the element size is known at
3552         compile time.
3553         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
3554         needed.
3555         (xnboundedmalloc): Remove.
3556         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
3557         arguments, for consistency with rest of this header.
3558         (xcharalloc): Rewrite using XNMALLOC.
3559         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
3560         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
3561         versions have been moved to lib/xalloc.h and renamed to be the
3562         non-*_inline versions.
3563         (xmalloc, xrealloc): Implement without reference to the xnmalloc
3564         and xnrealloc functions, since those functions are now inline and
3565         now call us.
3566         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
3567         renaming described above.
3568         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
3569         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
3570         captures the dependency in AC_C_INLINE.
3571
3572         New module canonicalize-lgpl, proposed by Charles Wilson in
3573         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
3574         with a few small changes afterwards.
3575         * MODULES.html.sh (File system functions): New module
3576         canonicalize-lgpl.
3577         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
3578         and canonicalize_file_name.
3579         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
3580         * modules/canonicalize-lgpl: New files.
3581
3582 2006-11-05  Bruno Haible  <bruno@clisp.org>
3583
3584         * gnulib-tool (func_import, func_create_testdir): Create directories
3585         also for files in subdirectories of lib/.
3586
3587 2006-11-05  Bruno Haible  <bruno@clisp.org>
3588
3589         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
3590         ANSI C compliant.
3591
3592 2006-11-03  Bruno Haible  <bruno@clisp.org>
3593
3594         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
3595         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
3596         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
3597         (xnboundedmalloc): New inline function.
3598         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
3599         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
3600         xmalloc.
3601         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
3602         xmalloc.
3603         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
3604         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
3605         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
3606         xmalloc.
3607         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
3608         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
3609         xmalloc.
3610         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
3611         gl_tree_add_after): Use XMALLOC instead of xmalloc.
3612         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
3613         xmalloc.
3614         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
3615         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
3616         gl_tree_add_after): Use XMALLOC instead of xmalloc.
3617         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
3618         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
3619         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
3620         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
3621
3622 2006-11-03  Bruno Haible  <bruno@clisp.org>
3623
3624         * lib/c-ctype.h [C++]: Define functions without name mangling.
3625         * lib/fwriteerror.h [C++]: Likewise.
3626         * lib/gcd.h [C++]: Likewise.
3627         * lib/linebreak.h [C++]: Likewise.
3628
3629 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
3630
3631         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
3632         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
3633         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
3634         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
3635         Check for functions and headers just once.
3636         Check for declaration of canonicalize_file_name.
3637         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
3638
3639 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
3640
3641         * gnulib-tool (func_import): Fix typo in actioncmd.
3642
3643 2006-11-02  Bruno Haible  <bruno@clisp.org>
3644
3645         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
3646         newline sequence in the Makefile.am snippet as a space, like "make"
3647         does.
3648         Reported by Roger Persson <perrog@gmail.com>.
3649
3650 2006-11-01  Bruno Haible  <bruno@clisp.org>
3651
3652         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
3653         already declared in <string.h>.
3654         * lib/strcase.h (strncasecmp): Don't declare it if yes.
3655
3656 2006-11-01  Bruno Haible  <bruno@clisp.org>
3657
3658         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
3659         * lib/strcase.h: Include <string.h>.
3660         (strcasecmp): Define to rpl_strcasecmp here.
3661
3662 2006-11-01  Bruno Haible  <bruno@clisp.org>
3663
3664         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
3665
3666 2006-11-01  Eric Blake  <ebb9@byu.net>
3667
3668         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
3669
3670         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
3671
3672 2006-10-29  Bruno Haible  <bruno@clisp.org>
3673
3674         Make it compile in C++ mode.
3675         * lib/full-write.c (full_rw): Add a cast.
3676
3677 2006-11-01  Bruno Haible  <bruno@clisp.org>
3678
3679         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
3680         be POSIX compliant.
3681         Reported by Roger Persson <perrog@gmail.com>.
3682
3683 2006-11-01  Eric Blake  <ebb9@byu.net>
3684
3685         * lib/getopt_.h: Fix comments.
3686
3687 2006-10-31  Eric Blake  <ebb9@byu.net>
3688
3689         * modules/tmpdir (Depends-on): Add sys_stat.
3690         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
3691         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
3692         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
3693         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
3694         tempname.
3695
3696 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
3697
3698         Avoid some C++ diagnostics reported by Bruno Haible.
3699         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
3700         xmalloc.
3701         (quotearg_alloc): Use xcharalloc rather than xmalloc.
3702         (struct slotvec): Move to top level.
3703         (quotearg_n_options): Rewrite to avoid xmalloc.
3704         * lib/xalloc.h (xcharalloc): New function.
3705         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
3706         [defined __cplusplus]: Add function template that provides result
3707         type propagation.  This part of the change is from Bruno Haible.
3708
3709 2006-10-29  Bruno Haible  <bruno@clisp.org>
3710
3711         Make it compile in C++ mode.
3712         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
3713         * lib/strnlen1.c (strnlen1): Cast memchr result.
3714         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
3715         * lib/clean-temp.c (string_equals, string_hash): Add casts.
3716         (create_temp_dir): Rename local variable 'template'.
3717         (compile_csharp_using_sscli): Add cast.
3718         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
3719         * lib/findprog.c (find_in_path): Likewise.
3720         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
3721         * lib/wait-process.c (register_slave_subprocess): Likewise.
3722
3723 2006-10-22  Bruno Haible  <bruno@clisp.org>
3724
3725         * modules/tsearch: New file.
3726         * lib/tsearch.h: New file.
3727         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
3728         * m4/tsearch.m4: New file.
3729         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
3730
3731 2006-10-29  Eric Blake  <ebb9@byu.net>
3732
3733         * lib/arcfour.c: Assume config.h.
3734         * lib/arctwo.c: Likewise.
3735         * lib/base64.c: Likewise.
3736         * lib/check-version.c: Likewise.
3737         * lib/crc.c: Likewise.
3738         * lib/des.c: Likewise.
3739         * lib/gc-gnulib.c: Likewise.
3740         * lib/gc-libgcrypt.c: Likewise.
3741         * lib/gc-pbkdf2-sha1.c: Likewise.
3742         * lib/getaddrinfo.c: Likewise.
3743         * lib/getdelim.c: Likewise.
3744         * lib/getline.c: Likewise.
3745         * lib/hmac-md5.c: Likewise.
3746         * lib/hmac-sha1.c: Likewise.
3747         * lib/iconvme.c: Likewise.
3748         * lib/md2.c: Likewise.
3749         * lib/md4.c: Likewise.
3750         * lib/memxor.c: Likewise.
3751         * lib/read-file.c: Likewise.
3752         * lib/readline.c: Likewise.
3753         * lib/rijndael-alg-fst.c: Likewise.
3754         * lib/rijndael-api-fst.c: Likewise.
3755         * lib/xgetdomainname.c: Likewise.
3756
3757 2006-10-28  Eric Blake  <ebb9@byu.net>
3758
3759         * lib/xstrndup.c: Assume config.h.
3760
3761 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
3762
3763         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
3764         stat-macros.h is now for our own macros, whereas stat_h is for
3765         macros in the <sys/stat.h> name space.
3766         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
3767         (STAT_MACROS_H): Remove.
3768         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
3769         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
3770         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
3771         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
3772         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
3773         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
3774         Move these macros to ...
3775         * lib/stat_.h: here.  Don't include stat-macros.h.
3776         * lib/canonicalize.c: Don't include stat-macros.h.
3777         * lib/chown.c: Likewise.
3778         * lib/euidaccess.c: Likewise.
3779         * lib/file-type.c: Likewise.
3780         * lib/filemode.c: Likewise.
3781         * lib/glob.c: Likewise.
3782         * lib/isapipe.c: Likewise.
3783         * lib/lchown.c: Likewise.
3784         * lib/lstat.c: Likewise.
3785         * lib/mkdir-p.c: Likewise.
3786         * lib/rmdir.c: Likewise.
3787         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
3788         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
3789         unless mkdir isn't declared, to speed up 'configure'.
3790         Always create sys/stat.h, since it's unlikely any real sys/stat.h
3791         would define all the S_* symbols.
3792         * modules/canonicalize (Depends-on):
3793         Depend on sys_stat, not stat-macros.
3794         * modules/chown: Likewise.
3795         * modules/euidaccess: Likewise.
3796         * modules/filemode: Likewise.
3797         * modules/file-type: Likewise.
3798         * modules/glob: Likewise.
3799         * modules/isapipe: Likewise.
3800         * modules/lchown: Likewise.
3801         * modules/lstat: Likewise.
3802         * modules/mkancesdirs: Likewise.
3803         * modules/rmdir: Likewise.
3804         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
3805         * modules/modechange: Likewise.
3806         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
3807         (configure.ac): Remove gl_STAT_MACROS.
3808         * modules/sys_stat (Depends-on): Remove stat-macros.
3809
3810 2006-10-27  Bruno Haible  <bruno@clisp.org>
3811
3812         * m4/signed.m4: Remove file.
3813         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
3814         invocation.
3815         * modules/vasnprintf (Files): Remove m4/signed.m4.
3816
3817 2006-10-27  Bruno Haible  <bruno@clisp.org>
3818
3819         Update to GNU gettext 0.16.
3820         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
3821         m4/inttypes-h.m4, m4/signed.m4.
3822         * m4/gettext.m4: Update to GNU gettext 0.16.
3823         * m4/intl.m4: New file, from GNU gettext.
3824         * m4/intldir.m4: New file, from GNU gettext.
3825         * config/srclist.txt: Update
3826
3827 2006-10-27  Eric Blake  <ebb9@byu.net>
3828
3829         * MODULES.html.sh: Document tempname.
3830         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
3831         dependencies.
3832         (Files): Move lib/tempname.c...
3833         * modules/tempname: ...to this new module.
3834         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
3835         (gl_PREREQ_TEMPNAME): Move...
3836         * m4/tempname.m4: ...to this new file.
3837         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
3838         * modules/sys_stat (Depends-on): Add stat-macros.
3839         * lib/stat_.h (includes): Pick up stat macros.
3840         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
3841         if stat macros are broken.
3842         * lib/tempname.c (includes): No need to include "stat-macros.h".
3843         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
3844         (direxists, __path_search) [!_LIBC]: Don't compile these in
3845         gnulib; the tmpdir module covers that.
3846         * lib/tempname.h: New file.
3847
3848 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
3849
3850         * COPYING: Explain how gnulib-tool converts licence headers.
3851         Almost all wording by Eric Blake.
3852
3853 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
3854
3855         * lib/mbchar.h (is_basic_table): Make read-only.
3856         * lib/mbchar.c (is_basic_table): Likewise.
3857         Reported by John Darrington.
3858
3859 2006-10-25  Bruno Haible  <bruno@clisp.org>
3860
3861         * lib/progname.h (set_program_name): Undefine before defining.
3862
3863 2006-10-25  Bruno Haible  <bruno@clisp.org>
3864
3865         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
3866         false for non-gcc C++ compilers.
3867         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
3868
3869 2006-10-24  Bruno Haible  <bruno@clisp.org>
3870
3871         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
3872         iconv implementations like Irix iconv.
3873
3874 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3875
3876         * modules/vararrays: New file.
3877         * m4/vararrays.m4: New file, taken from diffutils.
3878         * MODULES.html.sh: New module vararrays.
3879
3880 2006-10-24  Karl Berry  <karl@gnu.org>
3881
3882         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
3883         Don't call GNU Unix.
3884
3885 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3886
3887         * users.txt: Add Libtool.
3888
3889         Sync from Libtool:
3890
3891         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3892
3893         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
3894         to gnulib's policy of including config.h unconditionally.
3895
3896 2006-10-24  Bruno Haible  <bruno@clisp.org>
3897
3898         * modules/wcwidth (Files): Add m4/wint_t.m4.
3899         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
3900         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
3901
3902 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3903
3904         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
3905         to pacify GCC with some -W flags enabled.  Problem reported by
3906         Bruno Haible.
3907
3908 2006-10-24  Jim Meyering  <jim@meyering.net>
3909
3910         * MODULES.html.sh: Remove uinttostr.  It's not a module.
3911         Reported by Karl Berry.
3912
3913 2006-10-23  Bruno Haible  <bruno@clisp.org>
3914
3915         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
3916
3917 2006-10-24  Bruno Haible  <bruno@clisp.org>
3918
3919         * lib/gl_list.h: Use C comment style, not C++ comment style.
3920
3921 2006-10-23  Eric Blake  <ebb9@byu.net>
3922
3923         * lib/getaddrinfo.c (includes): Add missing include.
3924
3925 2006-10-23  Bruno Haible  <bruno@clisp.org>
3926             Paul Eggert  <eggert@cs.ucla.edu>
3927
3928         Ability to rename obstack_free.
3929         * lib/obstack.h (__obstack_free): New macro. Declare instead of
3930         obstack_free.
3931         (obstack_free): Invoke the __obstack_free macro.
3932         * lib/obstack.c (obstack_free): Use __obstack_free macro.
3933
3934 2006-10-23  Bruno Haible  <bruno@clisp.org>
3935             Paul Eggert  <eggert@cs.ucla.edu>
3936
3937         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
3938         __argc, __argv from the declaration. (They are defined as macros on
3939         mingw.)
3940
3941 2006-10-22  Bruno Haible  <bruno@clisp.org>
3942
3943         * doc/gnulib-intro.texi: New file.
3944         * doc/gnulib.texi: Include it.
3945
3946 2006-10-21  Bruno Haible  <bruno@clisp.org>
3947
3948         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
3949         "Introduction", "Miscellanous Notes", "Particular Modules".
3950
3951 2006-10-21  Bruno Haible  <bruno@clisp.org>
3952
3953         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3954         Change mostlyclean-local rule to avoid sh syntax error from bash
3955         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
3956
3957 2006-10-23  Jim Meyering  <jim@meyering.net>
3958
3959         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
3960         in place of snprintf.
3961
3962         * modules/inttostr (Files): Add lib/uinttostr.c.
3963         * lib/uinttostr.c (inttostr): New file/function.
3964         * lib/inttostr.h (uinttostr): Declare.
3965         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
3966         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
3967         Add uinttostr.
3968         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
3969
3970 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
3971
3972         * lib/canonicalize.c (ELOOP): Define if not already defined.
3973         Problem reported by Bruno Haible in
3974         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
3975
3976 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
3977
3978         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
3979         Problem reported by Perry Smith and Ville Laurikari.
3980
3981         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
3982         uses.
3983
3984 2006-10-19  Bruno Haible  <bruno@clisp.org>
3985
3986         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
3987         for mingw.
3988
3989 2006-10-19  Bruno Haible  <bruno@clisp.org>
3990
3991         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
3992         Needed for mingw.
3993
3994 2006-10-19  Bruno Haible  <bruno@clisp.org>
3995
3996         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
3997
3998 2006-10-19  Bruno Haible  <bruno@clisp.org>
3999
4000         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
4001         it.
4002
4003 2006-10-19  Bruno Haible  <bruno@clisp.org>
4004
4005         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
4006         invocation.
4007
4008 2006-10-19  Bruno Haible  <bruno@clisp.org>
4009
4010         * gnulib-tool (func_create_testdir): Don't include ftruncate and
4011         mountlist by default.
4012
4013 2006-10-16  Bruno Haible  <bruno@clisp.org>
4014
4015         * lib/c-strstr.c: Include c-strstr.h.
4016
4017 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
4018
4019         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
4020         in a slash.
4021
4022 2006-10-18  Bruno Haible  <bruno@clisp.org>
4023
4024         * lib/lock.h [C++]: Wrap definitions in extern "C".
4025
4026 2006-10-18  Bruno Haible  <bruno@clisp.org>
4027
4028         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
4029         gl_LIBOBJS list.
4030
4031 2006-10-18  Bruno Haible  <bruno@clisp.org>
4032
4033         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
4034
4035 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
4036
4037         * lib/xstrtol.h: Include gettext.h.
4038         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
4039         Problem reported by Eric Blake.
4040         * modules/xstrtol (Depends-on): Add gettext-h.
4041
4042 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
4043
4044         * lib/strftime.c (advance): New macro.
4045         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
4046         incomplete type, so you can't add 0 to it.  Problem and patch
4047         reported by Eelco Dolstra for dietlibc.
4048
4049 2006-10-18  Jim Meyering  <jim@meyering.net>
4050
4051         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
4052         type for a local, and rename it: s/up/user_proc/.
4053
4054 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
4055
4056         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
4057         READ_UTMP_USER_PROCESS.
4058         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
4059
4060 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
4061
4062         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
4063         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
4064
4065 2006-10-17  Eric Blake  <ebb9@byu.net>
4066
4067         * lib/sigprocmask.c (sigprocmask): Fix typo.
4068
4069         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
4070
4071         * modules/clean-temp (Makefile.am): Don't add to make output...
4072         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
4073         config.h.
4074
4075 2006-10-17  Bruno Haible  <bruno@clisp.org>
4076
4077         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
4078         differently if DEFAULT_TEXT_DOMAIN is set.
4079
4080 2006-10-16  Bruno Haible  <bruno@clisp.org>
4081
4082         * lib/clean-temp.c: Include fwriteerror.h.
4083
4084 2006-10-16  Bruno Haible  <bruno@clisp.org>
4085
4086         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
4087
4088 2006-10-16  Bruno Haible  <bruno@clisp.org>
4089
4090         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
4091         * lib/sigprocmask.h: Include <sys/types.h>.
4092         (sigset_t): Use the system's definition if present.
4093
4094 2006-10-17  Eric Blake  <ebb9@byu.net>
4095
4096         * lib/xvasprintf.c (includes): Assume config.h.
4097         * lib/xasprintf.c (includes): Likewise.
4098
4099 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
4100
4101         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
4102         at least as wide as intmax_t.
4103
4104 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
4105
4106         (Imported from Automake.)
4107         * build-aux/gnupload: Update to version 1.1 of directive file.
4108
4109 2006-10-16  Eric Blake  <ebb9@byu.net>
4110
4111         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
4112         match Automake 1.10a.
4113
4114 2006-10-14  Bruno Haible  <bruno@clisp.org>
4115
4116         * modules/sigprocmask: New file.
4117         * lib/sigprocmask.h: New file.
4118         * lib/sigprocmask.c: New file.
4119         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
4120         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
4121         request sigprocmask.o.
4122         (gl_PREREQ_SIGPROCMASK): New macro.
4123         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
4124         (Depends-on): Add sigprocmask.
4125         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
4126         gt_SIGNALBLOCKING. Test for 'raise' only once.
4127         * lib/fatal-signal.c: Include sigprocmask.h.
4128         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
4129         unblock_fatal_signals): Define always.
4130         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
4131         sigprocmask.
4132
4133 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
4134
4135         Sync from Automake.
4136         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
4137         which incorrectly sets the mode of an existing destination
4138         directory.  In some cases the unpatched install-sh could do the
4139         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
4140         system.  We hope this is rare in practice, but it's clearly worth
4141         fixing.  Problem reported by Alex Unleashed in
4142         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
4143         Also, don't bother to check for -m bugs unless we're using -m;
4144         suggested by Stepan Kasal.
4145
4146 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4147
4148         Sync from Automake.
4149         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
4150         `-c' flag, so they appear at the same position as in %FASTDEP%
4151         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
4152         which ignores unknown options only after the first non-option.
4153         Bug report against M4 by Nelson H. F. Beebe.
4154
4155 2006-10-13  Jim Meyering  <jim@meyering.net>
4156
4157         Fix a bug in yesterday's change.
4158         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
4159         p->fts_statp->st_dev would be used uninitialized.
4160         Ensures that we always call fts_stat on the very first entry.
4161         Miklos Szeredi reported that find -xdev stopped working.
4162
4163 2006-10-12  Bruno Haible  <bruno@clisp.org>
4164
4165         * gnulib-tool (func_get_automake_snippet): Append an automatically
4166         computed EXTRA_DIST augmentation.
4167         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
4168         * modules/alloca-opt (Makefile.am): Likewise.
4169         * modules/allocsa (Makefile.am): Likewise.
4170         * modules/arcfour (Makefile.am): Likewise.
4171         * modules/arctwo (Makefile.am): Likewise.
4172         * modules/argmatch (Makefile.am): Likewise.
4173         * modules/argz (Makefile.am): Likewise.
4174         * modules/atexit (Makefile.am): Likewise.
4175         * modules/backupfile (Makefile.am): Likewise.
4176         * modules/byteswap (Makefile.am): Likewise.
4177         * modules/c-strtod (Makefile.am): Likewise.
4178         * modules/c-strtold (Makefile.am): Likewise.
4179         * modules/calloc (Makefile.am): Likewise.
4180         * modules/canon-host (Makefile.am): Likewise.
4181         * modules/canonicalize (Makefile.am): Likewise.
4182         * modules/chdir-long (Makefile.am): Likewise.
4183         * modules/chdir-safer (Makefile.am): Likewise.
4184         * modules/check-version (Makefile.am): Likewise.
4185         * modules/chown (Makefile.am): Likewise.
4186         * modules/cloexec (Makefile.am): Likewise.
4187         * modules/close-stream (Makefile.am): Likewise.
4188         * modules/closeout (Makefile.am): Likewise.
4189         * modules/crc (Makefile.am): Likewise.
4190         * modules/csharpexec (Makefile.am): Likewise.
4191         * modules/cycle-check (Makefile.am): Likewise.
4192         * modules/des (Makefile.am): Likewise.
4193         * modules/dev-ino (Makefile.am): Likewise.
4194         * modules/dirfd (Makefile.am): Likewise.
4195         * modules/dirname (Makefile.am): Likewise.
4196         * modules/dup2 (Makefile.am): Likewise.
4197         * modules/eealloc (Makefile.am): Likewise.
4198         * modules/error (Makefile.am): Likewise.
4199         * modules/euidaccess (Makefile.am): Likewise.
4200         * modules/exclude (Makefile.am): Likewise.
4201         * modules/exitfail (Makefile.am): Likewise.
4202         * modules/fcntl-safer (Makefile.am): Likewise.
4203         * modules/fcntl (Makefile.am): Likewise.
4204         * modules/file-type (Makefile.am): Likewise.
4205         * modules/fileblocks (Makefile.am): Likewise.
4206         * modules/filemode (Makefile.am): Likewise.
4207         * modules/filenamecat (Makefile.am): Likewise.
4208         * modules/fnmatch (Makefile.am): Likewise.
4209         * modules/fopen-safer (Makefile.am): Likewise.
4210         * modules/fpending (Makefile.am): Likewise.
4211         * modules/fprintftime (Makefile.am): Likewise.
4212         * modules/free (Makefile.am): Likewise.
4213         * modules/fsusage (Makefile.am): Likewise.
4214         * modules/ftruncate (Makefile.am): Likewise.
4215         * modules/fts (Makefile.am): Likewise.
4216         * modules/gc-arcfour (Makefile.am): Likewise.
4217         * modules/gc-des (Makefile.am): Likewise.
4218         * modules/gc-hmac-md5 (Makefile.am): Likewise.
4219         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
4220         * modules/gc-md4 (Makefile.am): Likewise.
4221         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
4222         * modules/gc-sha1 (Makefile.am): Likewise.
4223         * modules/gc (Makefile.am): Likewise.
4224         * modules/getaddrinfo (Makefile.am): Likewise.
4225         * modules/getcwd (Makefile.am): Likewise.
4226         * modules/getdelim (Makefile.am): Likewise.
4227         * modules/getdomainname (Makefile.am): Likewise.
4228         * modules/getgroups (Makefile.am): Likewise.
4229         * modules/gethostname (Makefile.am): Likewise.
4230         * modules/gethrxtime (Makefile.am): Likewise.
4231         * modules/getline (Makefile.am): Likewise.
4232         * modules/getloadavg (Makefile.am): Likewise.
4233         * modules/getlogin_r (Makefile.am): Likewise.
4234         * modules/getndelim2 (Makefile.am): Likewise.
4235         * modules/getopt (Makefile.am): Likewise.
4236         * modules/getpagesize (Makefile.am): Likewise.
4237         * modules/getpass-gnu (Makefile.am): Likewise.
4238         * modules/getpass (Makefile.am): Likewise.
4239         * modules/getsubopt (Makefile.am): Likewise.
4240         * modules/gettime (Makefile.am): Likewise.
4241         * modules/gettimeofday (Makefile.am): Likewise.
4242         * modules/getugroups (Makefile.am): Likewise.
4243         * modules/getusershell (Makefile.am): Likewise.
4244         * modules/glob (Makefile.am): Likewise.
4245         * modules/group-member (Makefile.am): Likewise.
4246         * modules/hard-locale (Makefile.am): Likewise.
4247         * modules/hash (Makefile.am): Likewise.
4248         * modules/hmac-md5 (Makefile.am): Likewise.
4249         * modules/hmac-sha1 (Makefile.am): Likewise.
4250         * modules/human (Makefile.am): Likewise.
4251         * modules/idcache (Makefile.am): Likewise.
4252         * modules/imaxabs (Makefile.am): Likewise.
4253         * modules/imaxdiv (Makefile.am): Likewise.
4254         * modules/inet_ntop (Makefile.am): Likewise.
4255         * modules/inet_pton (Makefile.am): Likewise.
4256         * modules/intprops (Makefile.am): Likewise.
4257         * modules/inttostr (Makefile.am): Likewise.
4258         * modules/inttypes (Makefile.am): Likewise.
4259         * modules/isapipe (Makefile.am): Likewise.
4260         * modules/javaversion (Makefile.am): Likewise.
4261         * modules/lchmod (Makefile.am): Likewise.
4262         * modules/lchown (Makefile.am): Likewise.
4263         * modules/localcharset (Makefile.am): Likewise.
4264         * modules/long-options (Makefile.am): Likewise.
4265         * modules/lstat (Makefile.am): Likewise.
4266         * modules/malloc (Makefile.am): Likewise.
4267         * modules/mathl (Makefile.am): Likewise.
4268         * modules/mbchar (Makefile.am): Likewise.
4269         * modules/md2 (Makefile.am): Likewise.
4270         * modules/md4 (Makefile.am): Likewise.
4271         * modules/md5 (Makefile.am): Likewise.
4272         * modules/memcasecmp (Makefile.am): Likewise.
4273         * modules/memchr (Makefile.am): Likewise.
4274         * modules/memcmp (Makefile.am): Likewise.
4275         * modules/memcoll (Makefile.am): Likewise.
4276         * modules/memcpy (Makefile.am): Likewise.
4277         * modules/memmem (Makefile.am): Likewise.
4278         * modules/memmove (Makefile.am): Likewise.
4279         * modules/mempcpy (Makefile.am): Likewise.
4280         * modules/memrchr (Makefile.am): Likewise.
4281         * modules/memset (Makefile.am): Likewise.
4282         * modules/memxor (Makefile.am): Likewise.
4283         * modules/mkancesdirs (Makefile.am): Likewise.
4284         * modules/mkdir-p (Makefile.am): Likewise.
4285         * modules/mkdir (Makefile.am): Likewise.
4286         * modules/mkdtemp (Makefile.am): Likewise.
4287         * modules/mkstemp (Makefile.am): Likewise.
4288         * modules/mktime (Makefile.am): Likewise.
4289         * modules/modechange (Makefile.am): Likewise.
4290         * modules/mountlist (Makefile.am): Likewise.
4291         * modules/nanosleep (Makefile.am): Likewise.
4292         * modules/obstack (Makefile.am): Likewise.
4293         * modules/openat (Makefile.am): Likewise.
4294         * modules/pagealign_alloc (Makefile.am): Likewise.
4295         * modules/pathmax (Makefile.am): Likewise.
4296         * modules/physmem (Makefile.am): Likewise.
4297         * modules/poll (Makefile.am): Likewise.
4298         * modules/posixtm (Makefile.am): Likewise.
4299         * modules/posixver (Makefile.am): Likewise.
4300         * modules/putenv (Makefile.am): Likewise.
4301         * modules/quote (Makefile.am): Likewise.
4302         * modules/quotearg (Makefile.am): Likewise.
4303         * modules/raise (Makefile.am): Likewise.
4304         * modules/read-file (Makefile.am): Likewise.
4305         * modules/readline (Makefile.am): Likewise.
4306         * modules/readlink (Makefile.am): Likewise.
4307         * modules/readtokens (Makefile.am): Likewise.
4308         * modules/readutmp (Makefile.am): Likewise.
4309         * modules/realloc (Makefile.am): Likewise.
4310         * modules/regex (Makefile.am): Likewise.
4311         * modules/rename-dest-slash (Makefile.am): Likewise.
4312         * modules/rename (Makefile.am): Likewise.
4313         * modules/rijndael (Makefile.am): Likewise.
4314         * modules/rmdir (Makefile.am): Likewise.
4315         * modules/rpmatch (Makefile.am): Likewise.
4316         * modules/safe-read (Makefile.am): Likewise.
4317         * modules/safe-write (Makefile.am): Likewise.
4318         * modules/same-inode (Makefile.am): Likewise.
4319         * modules/same (Makefile.am): Likewise.
4320         * modules/save-cwd (Makefile.am): Likewise.
4321         * modules/savedir (Makefile.am): Likewise.
4322         * modules/setenv (Makefile.am): Likewise.
4323         * modules/settime (Makefile.am): Likewise.
4324         * modules/sha1 (Makefile.am): Likewise.
4325         * modules/sig2str (Makefile.am): Likewise.
4326         * modules/snprintf (Makefile.am): Likewise.
4327         * modules/stat-macros (Makefile.am): Likewise.
4328         * modules/stat-time (Makefile.am): Likewise.
4329         * modules/stdbool (Makefile.am): Likewise.
4330         * modules/stdint (Makefile.am): Likewise.
4331         * modules/stdlib-safer (Makefile.am): Likewise.
4332         * modules/stpcpy (Makefile.am): Likewise.
4333         * modules/stpncpy (Makefile.am): Likewise.
4334         * modules/strcase (Makefile.am): Likewise.
4335         * modules/strcasestr (Makefile.am): Likewise.
4336         * modules/strchrnul (Makefile.am): Likewise.
4337         * modules/strcspn (Makefile.am): Likewise.
4338         * modules/strdup (Makefile.am): Likewise.
4339         * modules/strerror (Makefile.am): Likewise.
4340         * modules/strftime (Makefile.am): Likewise.
4341         * modules/strndup (Makefile.am): Likewise.
4342         * modules/strnlen (Makefile.am): Likewise.
4343         * modules/strpbrk (Makefile.am): Likewise.
4344         * modules/strsep (Makefile.am): Likewise.
4345         * modules/strstr (Makefile.am): Likewise.
4346         * modules/strtod (Makefile.am): Likewise.
4347         * modules/strtoimax (Makefile.am): Likewise.
4348         * modules/strtok_r (Makefile.am): Likewise.
4349         * modules/strtol (Makefile.am): Likewise.
4350         * modules/strtoll (Makefile.am): Likewise.
4351         * modules/strtoul (Makefile.am): Likewise.
4352         * modules/strtoull (Makefile.am): Likewise.
4353         * modules/strtoumax (Makefile.am): Likewise.
4354         * modules/strverscmp (Makefile.am): Likewise.
4355         * modules/sys_socket (Makefile.am): Likewise.
4356         * modules/sys_stat (Makefile.am): Likewise.
4357         * modules/sysexits (Makefile.am): Likewise.
4358         * modules/time_r (Makefile.am): Likewise.
4359         * modules/timegm (Makefile.am): Likewise.
4360         * modules/timespec (Makefile.am): Likewise.
4361         * modules/tmpfile-safer (Makefile.am): Likewise.
4362         * modules/trim (Makefile.am): Likewise.
4363         * modules/unistd-safer (Makefile.am): Likewise.
4364         * modules/unlinkdir (Makefile.am): Likewise.
4365         * modules/unlocked-io (Makefile.am): Likewise.
4366         * modules/userspec (Makefile.am): Likewise.
4367         * modules/utime (Makefile.am): Likewise.
4368         * modules/utimecmp (Makefile.am): Likewise.
4369         * modules/utimens (Makefile.am): Likewise.
4370         * modules/vasnprintf (Makefile.am): Likewise.
4371         * modules/vasprintf (Makefile.am): Likewise.
4372         * modules/vsnprintf (Makefile.am): Likewise.
4373         * modules/xalloc (Makefile.am): Likewise.
4374         * modules/xgetcwd (Makefile.am): Likewise.
4375         * modules/xnanosleep (Makefile.am): Likewise.
4376         * modules/xreadlink (Makefile.am): Likewise.
4377         * modules/xstrtod (Makefile.am): Likewise.
4378         * modules/xstrtol (Makefile.am): Likewise.
4379         * modules/xstrtold (Makefile.am): Likewise.
4380         * modules/yesno (Makefile.am): Likewise.
4381         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
4382
4383 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
4384
4385         * modules/error (Makefile.am): Distribute files through
4386         EXTRA_DIST, not lib_SOURCES.
4387
4388 2006-10-12  Eric Blake  <ebb9@byu.net>
4389
4390         * modules/error (Makefile.am): Distribute files in /lib.
4391         * modules/obstack (Makefile.am): Likewise.
4392
4393 2006-10-12  Bruno Haible  <bruno@clisp.org>
4394
4395         * modules/acl (Makefile.am): Distribute all files in lib/ through
4396         EXTRA_DIST.
4397         * modules/arcfour (Makefile.am): Likewise.
4398         * modules/arctwo (Makefile.am): Likewise.
4399         * modules/argmatch (Makefile.am): Likewise.
4400         * modules/argz (Makefile.am): Likewise.
4401         * modules/atexit (Makefile.am): Likewise.
4402         * modules/backupfile (Makefile.am): Likewise.
4403         * modules/c-strtod (Makefile.am): Likewise.
4404         * modules/c-strtold (Makefile.am): Likewise.
4405         * modules/calloc (Makefile.am): Likewise.
4406         * modules/canon-host (Makefile.am): Likewise.
4407         * modules/canonicalize (Makefile.am): Likewise.
4408         * modules/chdir-long (Makefile.am): Likewise.
4409         * modules/chdir-safer (Makefile.am): Likewise.
4410         * modules/check-version (Makefile.am): Likewise.
4411         * modules/chown (Makefile.am): Likewise.
4412         * modules/cloexec (Makefile.am): Likewise.
4413         * modules/close-stream (Makefile.am): Likewise.
4414         * modules/closeout (Makefile.am): Likewise.
4415         * modules/crc (Makefile.am): Likewise.
4416         * modules/cycle-check (Makefile.am): Likewise.
4417         * modules/des (Makefile.am): Likewise.
4418         * modules/dirfd (Makefile.am): Likewise.
4419         * modules/dirname (Makefile.am): Likewise.
4420         * modules/dup2 (Makefile.am): Likewise.
4421         * modules/euidaccess (Makefile.am): Likewise.
4422         * modules/exclude (Makefile.am): Likewise.
4423         * modules/exitfail (Makefile.am): Likewise.
4424         * modules/fcntl-safer (Makefile.am): Likewise.
4425         * modules/file-type (Makefile.am): Likewise.
4426         * modules/fileblocks (Makefile.am): Likewise.
4427         * modules/filemode (Makefile.am): Likewise.
4428         * modules/filenamecat (Makefile.am): Likewise.
4429         * modules/fnmatch (Makefile.am): Likewise.
4430         * modules/fopen-safer (Makefile.am): Likewise.
4431         * modules/fpending (Makefile.am): Likewise.
4432         * modules/fprintftime (Makefile.am): Likewise.
4433         * modules/free (Makefile.am): Likewise.
4434         * modules/fsusage (Makefile.am): Likewise.
4435         * modules/ftruncate (Makefile.am): Likewise.
4436         * modules/fts (Makefile.am): Likewise.
4437         * modules/gc (Makefile.am): Likewise.
4438         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
4439         * modules/getaddrinfo (Makefile.am): Likewise.
4440         * modules/getcwd (Makefile.am): Likewise.
4441         * modules/getdelim (Makefile.am): Likewise.
4442         * modules/getdomainname (Makefile.am): Likewise.
4443         * modules/getgroups (Makefile.am): Likewise.
4444         * modules/gethostname (Makefile.am): Likewise.
4445         * modules/gethrxtime (Makefile.am): Likewise.
4446         * modules/getline (Makefile.am): Likewise.
4447         * modules/getloadavg (Makefile.am): Likewise.
4448         * modules/getlogin_r (Makefile.am): Likewise.
4449         * modules/getopt (Makefile.am): Likewise.
4450         * modules/getpass (Makefile.am): Likewise.
4451         * modules/getpass-gnu (Makefile.am): Likewise.
4452         * modules/getsubopt (Makefile.am): Likewise.
4453         * modules/gettime (Makefile.am): Likewise.
4454         * modules/gettimeofday (Makefile.am): Likewise.
4455         * modules/getugroups (Makefile.am): Likewise.
4456         * modules/getusershell (Makefile.am): Likewise.
4457         * modules/glob (Makefile.am): Likewise.
4458         * modules/group-member (Makefile.am): Likewise.
4459         * modules/hard-locale (Makefile.am): Likewise.
4460         * modules/hash (Makefile.am): Likewise.
4461         * modules/hmac-md5 (Makefile.am): Likewise.
4462         * modules/hmac-sha1 (Makefile.am): Likewise.
4463         * modules/human (Makefile.am): Likewise.
4464         * modules/idcache (Makefile.am): Likewise.
4465         * modules/imaxabs (Makefile.am): Likewise.
4466         * modules/imaxdiv (Makefile.am): Likewise.
4467         * modules/inet_ntop (Makefile.am): Likewise.
4468         * modules/inet_pton (Makefile.am): Likewise.
4469         * modules/inttostr (Makefile.am): Likewise.
4470         * modules/isapipe (Makefile.am): Likewise.
4471         * modules/lchown (Makefile.am): Likewise.
4472         * modules/long-options (Makefile.am): Likewise.
4473         * modules/lstat (Makefile.am): Likewise.
4474         * modules/malloc (Makefile.am): Likewise.
4475         * modules/mathl (Makefile.am): Likewise.
4476         * modules/mbchar (Makefile.am): Likewise.
4477         * modules/md2 (Makefile.am): Likewise.
4478         * modules/md4 (Makefile.am): Likewise.
4479         * modules/md5 (Makefile.am): Likewise.
4480         * modules/memcasecmp (Makefile.am): Likewise.
4481         * modules/memchr (Makefile.am): Likewise.
4482         * modules/memcmp (Makefile.am): Likewise.
4483         * modules/memcoll (Makefile.am): Likewise.
4484         * modules/memcpy (Makefile.am): Likewise.
4485         * modules/memmem (Makefile.am): Likewise.
4486         * modules/memmove (Makefile.am): Likewise.
4487         * modules/mempcpy (Makefile.am): Likewise.
4488         * modules/memrchr (Makefile.am): Likewise.
4489         * modules/memset (Makefile.am): Likewise.
4490         * modules/memxor (Makefile.am): Likewise.
4491         * modules/mkancesdirs (Makefile.am): Likewise.
4492         * modules/mkdir (Makefile.am): Likewise.
4493         * modules/mkdir-p (Makefile.am): Likewise.
4494         * modules/mkdtemp (Makefile.am): Likewise.
4495         * modules/mkstemp (Makefile.am): Likewise.
4496         * modules/mktime (Makefile.am): Likewise.
4497         * modules/modechange (Makefile.am): Likewise.
4498         * modules/mountlist (Makefile.am): Likewise.
4499         * modules/nanosleep (Makefile.am): Likewise.
4500         * modules/openat (Makefile.am): Likewise.
4501         * modules/pagealign_alloc (Makefile.am): Likewise.
4502         * modules/physmem (Makefile.am): Likewise.
4503         * modules/poll (Makefile.am): Likewise.
4504         * modules/posixtm (Makefile.am): Likewise.
4505         * modules/posixver (Makefile.am): Likewise.
4506         * modules/putenv (Makefile.am): Likewise.
4507         * modules/quote (Makefile.am): Likewise.
4508         * modules/quotearg (Makefile.am): Likewise.
4509         * modules/raise (Makefile.am): Likewise.
4510         * modules/read-file (Makefile.am): Likewise.
4511         * modules/readline (Makefile.am): Likewise.
4512         * modules/readlink (Makefile.am): Likewise.
4513         * modules/readtokens (Makefile.am): Likewise.
4514         * modules/readutmp (Makefile.am): Likewise.
4515         * modules/realloc (Makefile.am): Likewise.
4516         * modules/regex (Makefile.am): Likewise.
4517         * modules/rename (Makefile.am): Likewise.
4518         * modules/rename-dest-slash (Makefile.am): Likewise.
4519         * modules/rijndael (Makefile.am): Likewise.
4520         * modules/rmdir (Makefile.am): Likewise.
4521         * modules/rpmatch (Makefile.am): Likewise.
4522         * modules/safe-read (Makefile.am): Likewise.
4523         * modules/safe-write (Makefile.am): Likewise.
4524         * modules/same (Makefile.am): Likewise.
4525         * modules/save-cwd (Makefile.am): Likewise.
4526         * modules/savedir (Makefile.am): Likewise.
4527         * modules/setenv (Makefile.am): Likewise.
4528         * modules/settime (Makefile.am): Likewise.
4529         * modules/sha1 (Makefile.am): Likewise.
4530         * modules/sig2str (Makefile.am): Likewise.
4531         * modules/snprintf (Makefile.am): Likewise.
4532         * modules/stdlib-safer (Makefile.am): Likewise.
4533         * modules/stpcpy (Makefile.am): Likewise.
4534         * modules/stpncpy (Makefile.am): Likewise.
4535         * modules/strcase (Makefile.am): Likewise.
4536         * modules/strcasestr (Makefile.am): Likewise.
4537         * modules/strchrnul (Makefile.am): Likewise.
4538         * modules/strcspn (Makefile.am): Likewise.
4539         * modules/strdup (Makefile.am): Likewise.
4540         * modules/strerror (Makefile.am): Likewise.
4541         * modules/strftime (Makefile.am): Likewise.
4542         * modules/strndup (Makefile.am): Likewise.
4543         * modules/strnlen (Makefile.am): Likewise.
4544         * modules/strpbrk (Makefile.am): Likewise.
4545         * modules/strsep (Makefile.am): Likewise.
4546         * modules/strstr (Makefile.am): Likewise.
4547         * modules/strtod (Makefile.am): Likewise.
4548         * modules/strtoimax (Makefile.am): Likewise.
4549         * modules/strtok_r (Makefile.am): Likewise.
4550         * modules/strtol (Makefile.am): Likewise.
4551         * modules/strtoll (Makefile.am): Likewise.
4552         * modules/strtoul (Makefile.am): Likewise.
4553         * modules/strtoull (Makefile.am): Likewise.
4554         * modules/strtoumax (Makefile.am): Likewise.
4555         * modules/strverscmp (Makefile.am): Likewise.
4556         * modules/time_r (Makefile.am): Likewise.
4557         * modules/timegm (Makefile.am): Likewise.
4558         * modules/tmpfile-safer (Makefile.am): Likewise.
4559         * modules/unistd-safer (Makefile.am): Likewise.
4560         * modules/unlinkdir (Makefile.am): Likewise.
4561         * modules/userspec (Makefile.am): Likewise.
4562         * modules/utime (Makefile.am): Likewise.
4563         * modules/utimecmp (Makefile.am): Likewise.
4564         * modules/utimens (Makefile.am): Likewise.
4565         * modules/vasnprintf (Makefile.am): Likewise.
4566         * modules/vasprintf (Makefile.am): Likewise.
4567         * modules/vsnprintf (Makefile.am): Likewise.
4568         * modules/xalloc (Makefile.am): Likewise.
4569         * modules/xgetcwd (Makefile.am): Likewise.
4570         * modules/xnanosleep (Makefile.am): Likewise.
4571         * modules/xreadlink (Makefile.am): Likewise.
4572         * modules/xstrtod (Makefile.am): Likewise.
4573         * modules/xstrtol (Makefile.am): Likewise.
4574         * modules/xstrtold (Makefile.am): Likewise.
4575         * modules/yesno (Makefile.am): Likewise.
4576
4577 2006-10-12  Jim Meyering  <jim@meyering.net>
4578
4579         * m4/getloadavg.m4: Revert the change below.
4580
4581         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
4582         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
4583         fail with a symlink, which is what coreutils' ./bootstrap now
4584         creates by default.
4585
4586 2006-10-12  Bruno Haible  <bruno@clisp.org>
4587
4588         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
4589         mingw.
4590         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
4591         MSVC and mingw explicitly.
4592
4593 2006-10-11  Simon Josefsson  <jas@extundo.com>
4594             Bruno Haible  <bruno@clisp.org>
4595
4596         Add support for multiple gnulib-tool invocations in the scope of a
4597         single configure.ac file.
4598         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
4599         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
4600         with the same contents as the _LIBADD variable.
4601         (func_emit_initmacro_start, func_emit_initmacro_end,
4602         func_emit_initmacro_done): New functions.
4603         (func_import, func_create_testdir): Invoke them. Allow the identifiers
4604         gl_LIBOBJS and gl_LTLIBOBJS.
4605
4606 2006-10-11  Bruno Haible  <bruno@clisp.org>
4607
4608         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
4609         (func_create_testdir): Don't create po/Makefile.am, don't invoke
4610         autoreconf. Instead, invoke autopoint explicitly but move back the
4611         *.m4 files from gnulib.
4612
4613 2006-10-11  Bruno Haible  <bruno@clisp.org>
4614
4615         * gnulib-tool (func_usage): Make module names after --create-testdir
4616         optional.
4617         (func_create_testdir): If no module was specified, use nearly all
4618         modules.
4619
4620 2006-10-12  Jim Meyering  <jim@meyering.net>
4621
4622         Big performance improvement for fts-based tools that use FTS_NOSTAT.
4623         Avoid spurious inode-mismatch problems on non-POSIX file systems.
4624         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
4625         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
4626         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
4627         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
4628         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
4629         (fts_set_stat_required): New function.
4630         (fts_open): Defer the calls to fts_stat, if possible or requested.
4631         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
4632         into fts_stat itself.
4633         (fts_read): Perform any required (deferred) fts_stat call.
4634         (fts_build): Likewise, for the directory we're about to open and read.
4635         In the readdir loop, carefully decide whether each entry will require
4636         an eventual call to fts_stat, using dirent.d_type info if available.
4637         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
4638         a command line argument into this function.  Update all callers.
4639         Map a return value of FTS_DOT to FTS_D for a command line argument.
4640         * modules/fts (Depends-on): Add d-type.  Alphabetize.
4641         Thanks to Miklos Szeredi for his tenacity and for the initial
4642         bug report about "find" failing on a FUSE-based file system.
4643
4644         * lib/fts.c (fts_open): Use consistent indentation.
4645
4646 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
4647
4648         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
4649         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
4650         reported by Jim Meyering.  All uses of cache variables renamed
4651         to match Autoconf's.
4652         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
4653         the other one.
4654
4655         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
4656         Fix misspelling in diagnostic.
4657
4658 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
4659
4660         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
4661         defined.  Problem reported by Matthew Woehlke.
4662
4663         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
4664         Add support for Tandem NonStop R series.
4665         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
4666         Use new macro.
4667
4668         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
4669         (has_trailing_slash): Omit size arg; all callers changed.
4670         Omit 'inline', since it doesn't help performance and we'd
4671         need to configure it.
4672         Don't count //, ///, etc. as having a trailing slash.
4673         As a side effect, this removes a C99ism reported by Matthew Woehlke.
4674         (rpl_rename_dest_slash): On failure, use rename's errno rather
4675         than (in some cases) an incorrect or junk errno.
4676         Simplify code by removing need to compute length; this does
4677         cause it to make two passes instead of one over the file name,
4678         but it's worth it.
4679
4680         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
4681         change, since Autoconf's version may no longer be appropriate now
4682         that we are using CVS Autoconf's version.  Add support for Tandem.
4683
4684 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
4685             Bruno Haible  <bruno@clisp.org>
4686
4687         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
4688         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
4689         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
4690         gl_AC_TYPE_LONG_LONG.
4691
4692         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
4693         instead of HAVE_LONG_LONG.
4694         * lib/printf-args.c (printf_fetchargs): Likewise.
4695         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
4696         * lib/vasnprintf.c (VASNPRINTF): Likewise.
4697         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
4698         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
4699         gl_AC_TYPE_LONG_LONG.
4700
4701 2006-10-11  Bruno Haible  <bruno@clisp.org>
4702
4703         * m4/longlong.m4: Add comments.
4704         * m4/ulonglong.m4: Likewise.
4705
4706 2006-10-10  Bruno Haible  <bruno@clisp.org>
4707
4708         Make it possible to #define stpcpy, strdup to aliases.
4709         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
4710         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
4711
4712 2006-10-10  Bruno Haible  <bruno@clisp.org>
4713
4714         Make it possible to #define gcd to an alias.
4715         * lib/gcd.c: Include config.h.
4716
4717 2006-10-10  Bruno Haible  <bruno@clisp.org>
4718
4719         Make it possible to #define c_isascii to an alias.
4720         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
4721         defined. Undefine the macros before defining them, to avoid gcc
4722         warnings.
4723         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
4724         define NO_C_CTYPE_MACROS early.
4725
4726 2006-10-10  Bruno Haible  <bruno@clisp.org>
4727
4728         Make it possible to #define set_program_name to an alias.
4729         * lib/progname.c: Don't undefine set_program_name; instead, undefine
4730         ENABLE_RELOCATABLE early.
4731
4732 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
4733
4734         Port to Tandem NSK OSS, which has 64-bit signed int but at most
4735         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
4736         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
4737         More generally, don't assume that 64-bit signed int is available
4738         if unsigned int is, and vice versa.
4739         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
4740         unsigned symbols, not on their signed counterparts.
4741         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
4742         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
4743         (UINT64_C, UINTMAX_C):
4744         Likewise.
4745         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
4746         unsigned counterparts.
4747         (Have_long_long, Unsigned): New macros.
4748         (Int): Renamed from INT.
4749         (strtoimax): Use the new macros.
4750         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
4751         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
4752         * modules/inttypes (inttypes.h): Substitute
4753         HAVE_UNSIGNED_LONG_LONG_INT.
4754         * modules/stdint (stdint.h): Likewise.
4755         (Files): Add m4/ulonglong.m4.
4756
4757 2006-10-10  Bruno Haible  <bruno@clisp.org>
4758
4759         Fix a gcc -Wshadow warning.
4760         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
4761         to 'bucket'.
4762         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
4763         gl_linked_indexof_from_to): Likewise.
4764         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
4765         Likewise.
4766         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
4767         Likewise.
4768         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
4769         Reported by Eric Blake.
4770
4771 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
4772
4773         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
4774         for NetBSD.  Problem reported by Bruno Haible.
4775
4776 2006-10-09  Jim Meyering  <jim@meyering.net>
4777
4778         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
4779         Patch from Bruno Haible.
4780
4781 2006-10-09  Jim Meyering  <jim@meyering.net>
4782
4783         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
4784         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
4785         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
4786
4787 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
4788
4789         Don't include <config.h> twice; this doesn't work in some cases,
4790         e.g., when config.h has "#define intmax_t long long int" and
4791         we include <config.h>, <inttypes.h>, <config.h> in that order.
4792         Problem reported by Matthew Woehlke in:
4793         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
4794         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
4795         * lib/fts-cycle.c: Don't include config.h.
4796         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
4797         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
4798         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
4799         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
4800         inttypes.h.
4801         * lib/xstrtoumax.c: Likewise.
4802         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
4803         __strtol and the like, so that this module is more like its siblings.
4804         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
4805         Remove; no longer needed now that we assume gnulib inttypes.h.
4806
4807 2006-10-08  Bruno Haible  <bruno@clisp.org>
4808
4809         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
4810         option.
4811
4812 2006-10-07  Jim Meyering  <jim@meyering.net>
4813
4814         * modules/inttypes (inttypes.h): Revert what seems to have been
4815         an inadvertent part of today's change: use "|", not "/" in the
4816         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
4817
4818 2006-10-07  Bruno Haible  <bruno@clisp.org>
4819
4820         * modules/sublist: New file.
4821
4822 2006-10-07  Bruno Haible  <bruno@clisp.org>
4823
4824         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
4825         * modules/argz (argz.h): Likewise.
4826         * modules/arpa_inet (arpa/inet.h): Likewise.
4827         * modules/byteswap (byteswap.h): Likewise.
4828         * modules/configmake (configmake.h): Likewise.
4829         * modules/fcntl (fcntl.h): Likewise.
4830         * modules/fnmatch (fnmatch.h): Likewise.
4831         * modules/getopt (getopt.h): Likewise.
4832         * modules/glob (glob.h): Likewise.
4833         * modules/inttypes (inttypes.h): Likewise.
4834         * modules/netinet_in (netinet/in.h): Likewise.
4835         * modules/poll (poll.h): Likewise.
4836         * modules/stdbool (stdbool.h): Likewise.
4837         * modules/stdint (stdint.h): Likewise.
4838         * modules/sys_select (sys/select.h): Likewise.
4839         * modules/sys_socket (sys/socket.h): Likewise.
4840         * modules/sys_stat (sys/stat.h): Likewise.
4841         * modules/sysexits (sysexits.h): Likewise.
4842         * modules/unistd (unistd.h): Likewise.
4843         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4844         Add a "DO NOT EDIT" comment to the generated file.
4845         (func_import): Likewise for gnulib-comp.m4.
4846
4847 2006-10-07  Bruno Haible  <bruno@clisp.org>
4848
4849         * lib/gl_sublist.h: New file.
4850         * lib/gl_sublist.c: New file.
4851
4852 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
4853
4854         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
4855         name (relative to the original working directory) and the file
4856         name component (relative to the temporary working directory).  All
4857         callers changed.
4858         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
4859         * lib/mkdir-p.c (make_dir_parents): Likewise.
4860         * lib/mkdir-p.h (make_dir_parents): Likewise.
4861
4862 2006-10-06  Eric Blake  <ebb9@byu.net>
4863
4864         Define several macros for use by the clean-temp module.
4865         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
4866         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
4867         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
4868
4869         * lib/clean-temp.h (close_stream_temp): New declaration.
4870         * lib/clean-temp.c (includes): Pull in headers according to what
4871         other modules are in use.
4872         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
4873
4874 2006-10-06  Bruno Haible  <bruno@clisp.org>
4875
4876         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
4877         instead of fopen, fwriteerror.
4878
4879 2006-10-06  Bruno Haible  <bruno@clisp.org>
4880
4881         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
4882         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
4883         int.
4884         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
4885         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
4886         Return an error indicator.
4887         Suggested by Eric Blake.
4888
4889 2006-10-06  Bruno Haible  <bruno@clisp.org>
4890
4891         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
4892         Reported by Eric Blake.
4893
4894 2006-10-06  Bruno Haible  <bruno@clisp.org>
4895
4896         * modules/closeout (Description): Mention stderr too.
4897
4898 2006-10-06  Bruno Haible  <bruno@clisp.org>
4899         and Paul Eggert  <eggert@cs.ucla.edu>
4900
4901         * lib/closeout.c (close_stdout): Also close stderr.
4902         * lib/closeout.h: Update comment.
4903
4904 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
4905
4906         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
4907         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
4908         * lib/dirchownmod.c: Include lchown.h.
4909         * lib/lchown.c: Don't include files that lchown.h now includes.
4910         Don't declare chown, since lchown.h now does that.
4911         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
4912         (lchown): Define to rpl_chown if lchown is declared but
4913         does not exist.  Declare using a prototype if lchown is not
4914         declared.  Add a copyright notice.
4915         * lib/mkstemp.h: Include <unistd.h>.
4916         * lib/openat.c: Include lchown.h.
4917
4918         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
4919         we now test for that separately.
4920         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
4921         rather than O_NOFOLLOW, when testing whether it's possible to
4922         avoid a race condition reliably.
4923         * lib/savewd.c (savewd_chdir): Likewise.
4924
4925         Remove macros that are no longer needed now that stdint.h is
4926         reliable.
4927         * lib/fsusage.c (UINTMAX_MAX): Remove.
4928         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
4929         * lib/utimecmp.c (SIZE_MAX): Remove.
4930
4931         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
4932
4933         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
4934         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
4935         O_NOATIME works.
4936
4937 2006-10-05  Bruno Haible  <bruno@clisp.org>
4938
4939         * lib/gl_list.h (gl_sortedlist_search_from_to,
4940         gl_sortedlist_indexof_from_to): New declarations.
4941         (gl_list_implementation): New fields sortedlist_search_from_to,
4942         sortedlist_indexof_from_to.
4943         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
4944         inline functions.
4945         * lib/gl_list.c (gl_sortedlist_search_from_to,
4946         gl_sortedlist_indexof_from_to): New functions.
4947         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
4948         function.
4949         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
4950         (gl_array_sortedlist_search_from_to): New function.
4951         (gl_array_list_implementation): Update.
4952         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
4953         function.
4954         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
4955         (gl_carray_sortedlist_search_from_to): New function.
4956         (gl_carray_list_implementation): Update.
4957         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
4958         gl_linked_sortedlist_indexof_from_to): New functions.
4959         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
4960         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
4961         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
4962         gl_tree_sortedlist_indexof_from_to): New functions.
4963         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
4964         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
4965         Update.
4966         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
4967         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
4968         Update.
4969
4970 2006-10-05  Bruno Haible  <bruno@clisp.org>
4971
4972         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
4973         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
4974         (struct gl_list_implementation): Add fields search_from_to,
4975         indexof_from_to. Remove fields search, indexof.
4976         (gl_list_search): Use the search_from_to method.
4977         (gl_list_search_from, gl_list_search_from_to): New functions.
4978         (gl_list_indexof): Use the indexof_from_to method.
4979         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
4980         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
4981         (gl_list_search_from, gl_list_search_from_to): New functions.
4982         (gl_list_indexof): Use the indexof_from_to method.
4983         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
4984         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
4985         gl_array_indexof. Add start_index, end_index arguments.
4986         (gl_array_search_from_to): Renamed from gl_array_search. Add
4987         start_index, end_index arguments.
4988         (gl_array_remove, gl_array_list_implementation): Update.
4989         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
4990         gl_carray_indexof. Add start_index, end_index arguments.
4991         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
4992         start_index, end_index arguments.
4993         (gl_carray_remove, gl_carray_list_implementation): Update.
4994         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
4995         gl_linked_search. Add start_index, end_index arguments.
4996         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
4997         start_index, end_index arguments.
4998         (gl_linked_remove): Update.
4999         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
5000         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
5001         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
5002         field to 'size_t'.
5003         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
5004         gl_tree_search. Add start_index, end_index arguments.
5005         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
5006         start_index, end_index arguments.
5007         (gl_tree_remove): Update.
5008         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
5009         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
5010         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
5011         function.
5012         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
5013         gl_tree_search. Add start_index, end_index arguments.
5014         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
5015         start_index, end_index arguments.
5016         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
5017         Update.
5018         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
5019
5020 2006-10-05  Bruno Haible  <bruno@clisp.org>
5021
5022         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
5023
5024         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
5025         fwriteerror_temp): New declarations.
5026         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
5027         (descriptors): New variable.
5028         (cleanup): First, close the descriptors.
5029         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
5030         fclose_temp, fwriteerror_temp): New functions.
5031
5032 2006-10-04  Jim Meyering  <jim@meyering.net>
5033
5034         * lib/fts.c (fts_open): Tiny comment change.
5035
5036 2006-10-04  Bruno Haible  <bruno@clisp.org>
5037
5038         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
5039         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
5040         gl_LOCK_BODY.
5041         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
5042         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
5043         gl_LOCK_EARLY_BODY.
5044         (gl_LOCK): Require gl_LOCK_BODY.
5045
5046 2006-10-04  Bruno Haible  <bruno@clisp.org>
5047
5048         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
5049         (gl_oset_search_atleast): New declaration.
5050         (struct gl_oset_implementation): Add field 'search_atleast'.
5051         (gl_oset_search_atleast): New inline function.
5052         * lib/gl_oset.c (gl_oset_search_atleast): New function.
5053         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
5054         (gl_array_oset_implementation): Update.
5055         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
5056         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
5057         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
5058
5059 2006-10-04  Bruno Haible  <bruno@clisp.org>
5060
5061         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
5062
5063 2006-10-03  Bruno Haible  <bruno@clisp.org>
5064
5065         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
5066         from gl_avltreehash_list_implementation.
5067
5068 2006-10-03  Bruno Haible  <bruno@clisp.org>
5069
5070         * lib/gl_oset.c (gl_oset_add): Fix return type.
5071
5072 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
5073
5074         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
5075
5076 2006-10-02  Eric Blake  <ebb9@byu.net>
5077
5078         * modules/strnlen (Depends-on): Add extensions.
5079
5080 2006-10-02  Eric Blake  <ebb9@byu.net>
5081
5082         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
5083         definition in 2.60+.
5084
5085 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
5086
5087         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
5088         checks.
5089
5090 2006-10-02  Bruno Haible  <bruno@clisp.org>
5091
5092         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
5093         to the AUTOMAKE_OPTIONS.
5094         Reported by Jim Meyering.
5095
5096 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
5097
5098         Work around bug in Solaris 10 /proc file system:
5099         /proc/self/fd/NNN/.. isn't the parent directory of
5100         the directory whose file descriptor is NNN.  This needs to
5101         be worked around at run time, not compile time, since a
5102         program might be built on Solaris 8, where things work, and
5103         run on Solaris 10.
5104         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
5105         to use the following interface instead:
5106         (OPENAT_BUFFER_SIZE): New macro.
5107         (openat_proc_name): New function.
5108         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
5109         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
5110         Likewise.
5111         * lib/openat-proc.c: New file.
5112         * modules/openat (Files): Add lib/openat-proc.c.
5113         (Depends-on): Add same-inode, stdbool.
5114         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
5115
5116 2006-09-29  Bruno Haible  <bruno@clisp.org>
5117
5118         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
5119         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
5120         argument. Set stdout_closed before testing for ferror, not after.
5121         (fwriteerror, fwriteerror_no_ebadf): New functions.
5122
5123 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5124
5125         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
5126
5127 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
5128
5129         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
5130         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
5131
5132 2006-09-28  Jim Meyering  <jim@meyering.net>
5133
5134         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
5135         Include <unistd.h>.
5136
5137 2006-09-28  Bruno Haible  <bruno@clisp.org>
5138
5139         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
5140         * modules/linkedhash-list (Depends-on): Likewise.
5141         * modules/rbtreehash-list (Depends-on): Likewise.
5142
5143 2006-09-28  Bruno Haible  <bruno@clisp.org>
5144
5145         * lib/strndup.h: Simplify the redefinition of strndup.
5146         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
5147         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
5148
5149 2006-09-28  Bruno Haible  <bruno@clisp.org>
5150
5151         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
5152         * lib/gl_linkedhash_list.c: Likewise.
5153         * lib/gl_rbtreehash_list.c: Likewise.
5154
5155 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
5156
5157         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
5158         getaddrinfo.
5159
5160         * lib/__fpending.h: Don't include <stdio_ext.h> unless
5161         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
5162         it causes <stdio_ext.h> to cause a compile-time error.
5163         Problem reported by Nelson H. F. Beebe.
5164         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
5165         of HAVE_DECL___PENDING.
5166
5167         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
5168         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
5169         declaration.
5170
5171 2006-09-27  Jim Meyering  <jim@meyering.net>
5172
5173         This file could end up with a definition for a function
5174         named __strndup, rather than rpl_strndup on a system with
5175         incomplete weak_alias support.
5176         * lib/strndup.c (strndup): Rename from __strndup.
5177         Remove #defines that used to map __strndup to strndup.
5178         Don't use K&R prototypes.
5179         Remove LIBC-related code, since this file is not sync'd with glibc.
5180         * lib/strndup.h: Revamp, accordingly.
5181         * m4/strndup.m4: Modernize.
5182
5183 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
5184
5185         * modules/savewd (Depends-on): Add 'raise'.
5186         * lib/savewd.c: Include <signal.h>, for 'raise'.
5187
5188 2006-09-26  Jim Meyering  <jim@meyering.net>
5189
5190         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
5191         when we detect Darwin 8.7.0's acl_get_file bug.
5192         Rearrange to perform the new (below) run-test while $LIBS
5193         contains any acl-related library.  Set USE_ACL at the end.
5194         (gl_ACL_GET_FILE): New function.
5195
5196 2006-09-26  Eric Blake  <ebb9@byu.net>
5197
5198         * lib/verror.c: Include <config.h> unconditionally.
5199
5200 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
5201
5202         * modules/clock-time (Maintainer): Add self.
5203         * modules/getlogin_r (Depends-on): Add extensions.
5204
5205 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5206
5207         * modules/clock-time: New module.
5208         * modules/nanosleep (Depends-on): Add clock-time.
5209         * modules/gethrxtime (Depends-on): Likewise.
5210         * modules/gettime (Depends-on): Likewise.
5211         * modules/settime (Depends-on): Likewise.
5212
5213         * modules/fts-lgpl: Depend on openat.
5214         * modules/mkancesdirs: Depend on savewd.
5215         * modules/mkdir-p: Likewise.
5216
5217 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5218
5219         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
5220
5221         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
5222         `gl_have_arbitrary_file_name_length_limit' to
5223         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
5224         actually works between configure runs.
5225
5226 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5227             Bruno Haible  <bruno@clisp.org>
5228
5229         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
5230
5231 2006-09-25  Jim Meyering  <jim@meyering.net>
5232
5233         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
5234         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
5235
5236 2006-09-25  Eric Blake  <ebb9@byu.net>
5237
5238         * gnulib-tool (func_import, func_create_testdir): Fix typos in
5239         exec's in 2006-09-18 patch when shuffling fds.
5240
5241 2006-09-25  Bruno Haible  <bruno@clisp.org>
5242
5243         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
5244         Reported by Jim Meyering.
5245
5246 2006-09-24  Jim Meyering  <jim@meyering.net>
5247
5248         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
5249         compare a pointer against a literal "0".  That caused failures with
5250         at least HP-UX's hpcc.
5251
5252 2006-09-22  Simon Josefsson  <jas@extundo.com>
5253
5254         * modules/gc-sha1:
5255         * modules/gc-md4:
5256         * modules/gc-hmac-sha1:
5257         * modules/gc-hmac-md5:
5258         * modules/gc-des:
5259         * modules/gc-arcfour: Distribute more files.
5260
5261 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5262
5263         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
5264         (gl_linked_iterator_from_to): Initialize struct completely.
5265         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
5266         (gl_tree_iterator_from_to): Likewise
5267         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
5268         * lib/gl_array_list.c [lint] (gl_array_iterator)
5269         (gl_array_iterator_from_to): Likewise.
5270         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
5271         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
5272         (gl_carray_iterator_from_to): Likewise.
5273
5274         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
5275         * lib/md4.c (md4_process_block): Remove unused variable.
5276         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
5277         parentheses for clarity.
5278
5279 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5280
5281         * modules/bison-i18n (Depends-on): Add gettext.
5282
5283 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5284
5285         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
5286         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
5287         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
5288         also add missing comma that caused broken test.
5289         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
5290         stdlib.h, for `abort'.
5291         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
5292         variables.
5293         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
5294         include unistd.h if present, for `rmdir'.
5295         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
5296         variables.
5297         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
5298         in the process include standard headers for prototypes.
5299         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
5300         gets declared on GNU/Linux.
5301         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
5302         unistd.h, for `rmdir'.
5303         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
5304
5305         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
5306         always true.
5307         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
5308
5309         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
5310
5311 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5312
5313         * gnulib-tool (func_version): Create output all at once.  This
5314         may help avoid triggering unnecessary SIGPIPEs, and at any
5315         rate it doesn't hurt.
5316
5317 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5318             Bruno Haible  <bruno@clisp.org>
5319
5320         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
5321         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
5322         * m4/signed.m4 (bh_C_SIGNED): Likewise.
5323
5324         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
5325         (gl_FUNC_VASPRINTF): Invoke it.
5326
5327 2006-09-22  Bruno Haible  <bruno@clisp.org>
5328
5329         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
5330         getloadavg.c as first argument.
5331
5332 2006-09-22  Bruno Haible  <bruno@clisp.org>
5333
5334         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
5335         at the beginning of the gl_INIT macro.
5336         * modules/getloadavg (configure.ac): Pass $gl_source_base to
5337         gl_GETLOADAVG.
5338
5339 2006-09-22  Bruno Haible  <bruno@clisp.org>
5340
5341         * gnulib-tool (func_create_megatestdir): Don't include the config-h
5342         module.
5343         Suggested by Ralf Wildenhues.
5344
5345 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
5346
5347         Import this patch from libc:
5348
5349         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
5350
5351         * lib/regex_internal.c (re_string_reconstruct): Handle
5352         offset < pstr->valid_raw_len && pstr->offsets_needed case.
5353         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
5354         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
5355         re_string_context_at.
5356
5357         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
5358         now requires it.
5359         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
5360         gl_REGEX now does it for us.
5361         (gl_REGEX): Add test taken from
5362         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
5363
5364         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
5365         Check that large offsets work.  Modernize Autoconf usages.
5366         Prefer "yes" to mean a good thing rather than a bad.
5367         Don't put "#define mkstemp" in config.h, as this might interfere
5368         with standard system headers that "#define mkstemp mkstemp64".
5369
5370         * modules/mkstemp (Depends-on): Add extensions, so that
5371         mkstemp is visible on some platforms.
5372         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
5373         (Include): Change to "mkstemp.h" from <stdlib.h>.
5374         (Files): Add mkstemp.h.
5375
5376         * lib/mkstemp.h: New file, since some standard headers
5377         #define mkstemp.
5378         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
5379         Include "mkstemp.h".
5380         Make the _LIBC code resemble glibc original more,
5381         e.g., use K&R style.
5382         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
5383         (mkstemp): Remove, since mkstemp.h does this for us.
5384         * lib/stdlib--.h: Include mkstemp.h.
5385
5386         Import this patch from libc:
5387
5388         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
5389
5390         * lib/tempname.c (__gen_tempname): Change attempts_min
5391         into a macro.  Use preprocessor to decide how to initialize
5392         attempts [Coverity CID 67].
5393
5394 2006-09-20  Bruno Haible  <bruno@clisp.org>
5395
5396         * lib/mkdtemp.c: Import from libc.
5397         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
5398                 * sysdeps/posix/tempname.c (__gen_tempname): Change
5399                 attempts_min into a macro.  Use preprocessor to decide how to
5400                 initialize attempts [Coverity CID 67].
5401         2001-11-27  Paul Eggert  <eggert@twinsun.com>
5402                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
5403                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
5404
5405 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5406
5407         * gnulib-tool (func_exit): New function, to allow to pass the
5408         exit status portably through the trap.  Use everywhere.
5409         (--help, --version): Signal a write error.
5410         (trap): catch SIGPIPE, for write errors.
5411         Exit at the end of the trap, with the correct exit status.
5412
5413 2006-09-19  Karl Berry  <karl@gnu.org>
5414
5415         * doc/gnulib.texi: note about the license texinfo files.
5416
5417 2006-09-19  Eric Blake  <ebb9@byu.net>
5418
5419         * gnulib-tool: Avoid space-tab.
5420
5421 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
5422
5423         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
5424         that prevented coreutils 6.1 from building.  Problem reported
5425         by Petter Reinholdtsen.
5426
5427 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
5428
5429         * gnulib-tool (avoidlist): Fix typo that broke options like
5430         --avoid=lock that are used by coreutils bootstrap.
5431
5432 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
5433
5434         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
5435         more systematically.
5436
5437 2006-09-18  Jim Meyering  <jim@meyering.net>
5438
5439         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
5440
5441 2006-09-18  Bruno Haible  <bruno@clisp.org>
5442
5443         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
5444
5445 2006-09-18  Bruno Haible  <bruno@clisp.org>
5446
5447         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
5448         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
5449         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
5450         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
5451         * m4/gettext.m4: Require autoconf >= 2.52.
5452         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
5453         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
5454         of gl_cv_header_inttypes_h.
5455
5456 2006-09-18  Bruno Haible  <bruno@clisp.org>
5457
5458         * lib/javaversion.c: Include configmake.h.
5459
5460 2006-09-18  Bruno Haible  <bruno@clisp.org>
5461
5462         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
5463         avoid that the while loops be executed in a subshell.
5464
5465 2006-09-18  Bruno Haible  <bruno@clisp.org>
5466
5467         * MODULES.html.sh (func_module): Break long lines.
5468         Suggested by Bruce Korb <bkorb@gnu.org>.
5469
5470 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5471
5472         Speed up by a factor of 1.12.
5473         * gnulib-tool (nl): New variable.
5474         (func_import): Rewrite include directive extraction to only read each
5475         directive once.
5476
5477 2006-09-17  Bruno Haible  <bruno@clisp.org>
5478
5479         * modules/javaversion (Makefile.am): Remove DEFS setting.
5480         (Depends-on): Add configmake, for PKGDATADIR definition.
5481
5482 2006-09-17  Bruno Haible  <bruno@clisp.org>
5483
5484         * gnulib-tool (func_create_testdir): Rewrite all files at once.
5485
5486 2006-09-17  Bruno Haible  <bruno@clisp.org>
5487
5488         * gnulib-tool (func_append): New function, stolen from libtool.m4.
5489         (func_modules_transitive_closure, func_modules_add_dummy,
5490         func_modules_to_filelist, func_import, func_create_testdir,
5491         func_create_megatestdir, ...): Use it wherever possible.
5492         Suggested by Ralf Wildenhues.
5493
5494 2006-09-16  Karl Berry  <karl@gnu.org>
5495
5496         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
5497         to avoid sectioning errors.
5498         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
5499         [ifinfo]: blank line after @center-ed titles.
5500         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
5501         Spell FSF address consistently with others.
5502         (These changes approved by rms.)
5503
5504 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5505
5506         Speed up by a factor of 1.61.
5507         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
5508         already checked module names again.
5509
5510 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5511
5512         Speed up by a factor of 1.13.
5513         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
5514         for new_files, and the input to func_add_or_update.
5515
5516 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5517
5518         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
5519         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
5520
5521 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
5522
5523         * modules/mkancesdirs (Depends-on): Add fcntl.
5524         * modules/savewd: New file.
5525         * MODULES.html.sh (File system functions): Add savewd.
5526
5527         * modules/configmake (Makefile.am): Add support for the
5528         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
5529
5530 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
5531
5532         * m4/savewd.m4: New file.
5533
5534 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
5535
5536         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
5537         (dirchownmod): New arg FD.  All callers changed.
5538         Use FD rather than opening the directory ourself, as opening is
5539         now the caller's responsibility.
5540         * lib/dirchownmod.h: Likewise.
5541         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
5542         hosts that require <sys/types.h> before <sys/stat.h>.  Include
5543         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
5544         (test_dir): Remove.
5545         (mkancesdirs): Return length of prefix of FILE that has already
5546         been made, or -2 if there is a child doing the work.  Redo
5547         algorithm so that it is O(N) rather than O(N**2).  Optimize away
5548         ".", and treat ".." specially since it might stray back into
5549         already-created areas.  Use a subprocess if necessary.  New arg
5550         WD; all users changed.  MAKE_DIR function should now return 1
5551         if it creates a directory that is not readable.  Return -2 if
5552         a child process is spun off.
5553         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
5554         Adjust signature to match code.
5555         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
5556         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
5557         all users changed.
5558         * lib/savewd.c, lib/savewd.h: New files.
5559
5560 2006-09-15  Jim Meyering  <jim@meyering.net>
5561
5562         * modules/rename-dest-slash: New module.
5563         * MODULES.html.sh (posix_compat): Add it here.
5564
5565         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
5566
5567 2006-09-15  Jim Meyering  <jim@meyering.net>
5568
5569         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
5570         file.
5571
5572         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
5573
5574 2006-09-15  Jim Meyering  <jim@meyering.net>
5575
5576         * lib/rename-dest-slash.c (has_trailing_slash): Use
5577         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
5578         (rpl_rename_dest_slash): Perform the cheaper trailing slash
5579         test before testing whether SRC is a directory.
5580         Suggestions from Bruno Haible.
5581
5582         Avoid a warning about an unused variable.
5583         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
5584         into the #ifdef block where it's used.
5585
5586         * lib/rename-dest-slash.c: New file.
5587
5588 2006-09-14  Bruno Haible  <bruno@clisp.org>
5589
5590         * lib/allocsa.c: Include <config.h> unconditionally.
5591         * lib/asnprintf.c: Likewise.
5592         * lib/asprintf.c: Likewise.
5593         * lib/c-strcasecmp.c: Likewise.
5594         * lib/c-strcasestr.c: Likewise.
5595         * lib/c-strncasecmp.c: Likewise.
5596         * lib/c-strstr.c: Likewise.
5597         * lib/classpath.c: Likewise.
5598         * lib/clean-temp.c: Likewise.
5599         * lib/concatpath.c: Likewise.
5600         * lib/copy-file.c: Likewise.
5601         * lib/csharpcomp.c: Likewise.
5602         * lib/csharpexec.c: Likewise.
5603         * lib/execute.c: Likewise.
5604         * lib/fatal-signal.c: Likewise.
5605         * lib/findprog.c: Likewise.
5606         * lib/fwriteerror.c: Likewise.
5607         * lib/gl_array_list.c: Likewise.
5608         * lib/gl_array_oset.c: Likewise.
5609         * lib/gl_avltree_list.c: Likewise.
5610         * lib/gl_avltree_oset.c: Likewise.
5611         * lib/gl_avltreehash_list.c: Likewise.
5612         * lib/gl_carray_list.c: Likewise.
5613         * lib/gl_linked_list.c: Likewise.
5614         * lib/gl_linkedhash_list.c: Likewise.
5615         * lib/gl_list.c: Likewise.
5616         * lib/gl_oset.c: Likewise.
5617         * lib/gl_rbtree_list.c: Likewise.
5618         * lib/gl_rbtree_oset.c: Likewise.
5619         * lib/gl_rbtreehash_list.c: Likewise.
5620         * lib/imaxabs.c: Likewise.
5621         * lib/imaxdiv.c: Likewise.
5622         * lib/javacomp.c: Likewise.
5623         * lib/javaexec.c: Likewise.
5624         * lib/javaversion.c: Likewise.
5625         * lib/linebreak.c: Likewise.
5626         * lib/localcharset.c: Likewise.
5627         * lib/lock.c: Likewise.
5628         * lib/mbchar.c: Likewise.
5629         * lib/mbswidth.c: Likewise.
5630         * lib/mkdtemp.c: Likewise.
5631         * lib/pipe.c: Likewise.
5632         * lib/printf-args.c: Likewise.
5633         * lib/printf-parse.c: Likewise.
5634         * lib/progname.c: Likewise.
5635         * lib/progreloc.c: Likewise.
5636         * lib/readlink.c: Likewise.
5637         * lib/sh-quote.c: Likewise.
5638         * lib/stpcpy.c: Likewise.
5639         * lib/stpncpy.c: Likewise.
5640         * lib/strcasecmp.c: Likewise.
5641         * lib/strcasestr.c: Likewise.
5642         * lib/strcspn.c: Likewise.
5643         * lib/striconv.c: Likewise.
5644         * lib/strncasecmp.c: Likewise.
5645         * lib/strnlen1.c: Likewise.
5646         * lib/strstr.c: Likewise.
5647         * lib/strtok_r.c: Likewise.
5648         * lib/tls.c: Likewise.
5649         * lib/tmpdir.c: Likewise.
5650         * lib/unicodeio.c: Likewise.
5651         * lib/unsetenv.c: Likewise.
5652         * lib/vasnprintf.c: Likewise.
5653         * lib/vasprintf.c: Likewise.
5654         * lib/wait-process.c: Likewise.
5655         * lib/xallocsa.c: Likewise.
5656         * lib/xsetenv.c: Likewise.
5657         * lib/xstriconv.c: Likewise.
5658
5659 2006-09-13  Simon Josefsson  <jas@extundo.com>
5660
5661         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
5662         that internally, suggested by Ralf Wildenhues
5663         <Ralf.Wildenhues@gmx.de>.
5664
5665 2006-09-13  Simon Josefsson  <jas@extundo.com>
5666
5667         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
5668         @LIBOBJS@.
5669         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5670
5671 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
5672
5673         * lib/_fpending.c: Include <config.h> unconditionally, since we no
5674         longer worry about uses that don't define HAVE_CONFIG_H.
5675         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
5676         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
5677         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
5678         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
5679         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
5680         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
5681         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
5682         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
5683         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
5684         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
5685         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
5686         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
5687         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
5688         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
5689         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
5690         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
5691         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
5692         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
5693         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
5694         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
5695         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
5696         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
5697         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
5698         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
5699         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
5700         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
5701         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
5702         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
5703         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
5704         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
5705         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
5706         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
5707         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
5708         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
5709         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
5710         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
5711         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
5712         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
5713         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
5714         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
5715         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
5716         Likewise.
5717
5718 2006-09-13  Eric Blake  <ebb9@byu.net>
5719
5720         * lib/getopt.c: Fix typo in last commit.
5721
5722 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
5723
5724         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
5725         dgettext.
5726
5727 2006-09-12  Jim Meyering  <jim@meyering.net>
5728
5729         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
5730         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
5731         Reported by Nelson H. F. Beebe.
5732
5733 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
5734
5735         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
5736         program_invocation_name and program_invocation_short_name are
5737         initialized.
5738         * lib/argp-namefrob.h: Move declarations of program_invocation_name
5739         and program_invocation_short_name to argp.h, so they are visible
5740         to user programs.
5741         * lib/argp.h: Likewise
5742
5743 2006-09-10  Bruno Haible  <bruno@clisp.org>
5744
5745         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
5746         m4/inttypes_h.m4, m4/uintmax_t.m4.
5747
5748 2006-09-10  Bruno Haible  <bruno@clisp.org>
5749
5750         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
5751         gl_AC_TYPE_UINTMAX_T.
5752
5753 2006-09-10  Bruno Haible  <bruno@clisp.org>
5754
5755         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
5756
5757 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
5758
5759         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
5760         convention.  Text proposed by Bruno Haible.
5761         (struct argp_option): Document the use of N_() wrappers.
5762
5763         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
5764         '\v', and translate the two parts separately, instead of feeding
5765         the whole string to gettext.  This allows to exclude
5766         '\v' from the strings visible to the translator by writing doc
5767         strings as N_("..") "\v" N_("..").
5768
5769 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
5770
5771         * config/srclist.txt: Undo latest change; the bug was fixed.
5772
5773 2006-09-09  Bruno Haible  <bruno@clisp.org>
5774
5775         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
5776         assignments if building a library without libtool.
5777         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
5778         in func_emit_lib_Makefile_am.
5779         (func_import): When building a static library libfoo.a, arrange to
5780         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
5781         (func_create_testdir): Likewise.
5782         * modules/gc (configure.ac, Makefile.am): If building statically,
5783         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
5784         * modules/iconvme (configure.ac, Makefile.am): Likewise.
5785         * modules/striconv (configure.ac, Makefile.am): Likewise.
5786         Based on a suggestion by Ralf Wildenhues.
5787
5788 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5789
5790         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
5791         Check for unistd.h too, since Autoconf doesn't assume POSIX.
5792         Also:
5793
5794         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5795         Add year_2050_test to catch glibc bug 2821
5796         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
5797
5798         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5799         Prefer #ifdef to #if.
5800
5801         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
5802         Return from 'main' instead of calling 'exit'.
5803
5804 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5805
5806         * lib/mktime.c (guess_time_tm): Fix bug where mktime
5807         returned the maximum time_t value rather than (time_t) -1.
5808         Problem originally reported by William Bardwell
5809         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
5810
5811         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
5812         Moved to here ...
5813         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
5814         ... from here.
5815
5816 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5817
5818         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
5819         2821 is fixed.
5820
5821 2006-09-08  Jim Meyering  <jim@meyering.net>
5822
5823         Don't make generated files read-only.  That would bother too many
5824         people.  However, do retain the ability to work when targets are
5825         read-only: remove the destination and temporary files before writing
5826         them (when generated via sed or echo), or by using the -f option for
5827         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
5828         * modules/alloca-opt, modules/argz, modules/arpa_inet:
5829         * modules/byteswap, modules/configmake, modules/fcntl:
5830         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
5831         * modules/localcharset, modules/netinet_in, modules/poll:
5832         * modules/stdbool, modules/stdint, modules/sys_select:
5833         * modules/sys_socket, modules/sys_stat, modules/sysexits:
5834
5835 2006-09-08  Jim Meyering  <jim@meyering.net>
5836
5837         Avoid new build failure on FreeBSD 6.0.
5838         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
5839         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
5840         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
5841
5842 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5843
5844         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
5845
5846 2006-09-07  Jim Meyering  <jim@meyering.net>
5847
5848         Fix global typo in last change: use chmod u-w, not chmod u-x.
5849         Spotted by Paul Eggert and Bruce Korb.
5850         * modules/alloca-opt, modules/argz, modules/arpa_inet:
5851         * modules/byteswap, modules/configmake, modules/fcntl:
5852         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
5853         * modules/localcharset, modules/netinet_in, modules/poll:
5854         * modules/stdbool, modules/stdint, modules/sys_select:
5855         * modules/sys_socket, modules/sys_stat, modules/sysexits:
5856
5857 2006-09-06  Jim Meyering  <jim@meyering.net>
5858
5859         Make generated files be read-only.
5860         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
5861         Ensure that each generated file is now read-only.
5862         * modules/argz: Likewise.
5863         * modules/arpa_inet: Likewise.
5864         * modules/byteswap: Likewise.
5865         * modules/configmake: Likewise.
5866         * modules/fcntl: Likewise.
5867         * modules/fnmatch: Likewise.
5868         * modules/getopt: Likewise.
5869         * modules/glob: Likewise.
5870         * modules/inttypes: Likewise.
5871         * modules/netinet_in: Likewise.
5872         * modules/poll: Likewise.
5873         * modules/stdbool: Likewise.
5874         * modules/stdint: Likewise.
5875         * modules/sys_select: Likewise.
5876         * modules/sys_socket: Likewise.
5877         * modules/sys_stat: Likewise.
5878         * modules/sysexits: Likewise.
5879         * modules/localcharset: Same as above, but continue using temporary
5880         file named "t-$@" (why different?) rather than the "$@-t" used
5881         everywhere else.
5882
5883         * modules/sysexits (Makefile.am): Replace literal occurrences
5884         of "sysexit.h" more readable, and more consistent, "$@".
5885
5886 2006-09-06  Bruno Haible  <bruno@clisp.org>
5887
5888         * modules/striconv: New file.
5889         * modules/xstriconv: New file.
5890         * MODULES.html.sh (Internationalization functions): Add striconv,
5891         xstriconv.
5892
5893 2006-09-06  Bruno Haible  <bruno@clisp.org>
5894
5895         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
5896         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
5897         not using libtool correctly.
5898
5899 2006-09-06  Bruno Haible  <bruno@clisp.org>
5900
5901         * lib/striconv.h: New file.
5902         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
5903         iconvstring.c.
5904         * lib/xstriconv.h: New file.
5905         * lib/xstriconv.c: New file.
5906
5907 2006-09-06  Bruno Haible  <bruno@clisp.org>
5908
5909         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
5910         lib_..._LDFLAGS.
5911
5912 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5913
5914         * lib/argz_.h: Sync from Libtool.
5915
5916         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
5917                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5918
5919         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
5920
5921 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
5922
5923         * modules/trim: New file.
5924
5925 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
5926
5927         * lib/trim.h: New file.
5928         * lib/trim.c: New file.
5929
5930 2006-09-05  Bruno Haible  <bruno@clisp.org>
5931
5932         * MODULES.html.sh (String handling): Add trim.
5933
5934 2006-09-04  Karl Berry  <karl@gnu.org>
5935
5936         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
5937         until next release.
5938
5939 2006-09-03  Bruno Haible  <bruno@clisp.org>
5940
5941         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
5942         correctly.
5943
5944 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5945
5946         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
5947         not gl_GETLOADAVG.  Omit unneeded semicolons.
5948         Problems reported by Ralf Wildenhues in
5949         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
5950         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
5951         at the end, which is the usual gnulib style.
5952
5953         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
5954         of doing all the work ourselves.
5955         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
5956         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
5957
5958 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5959
5960         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
5961         Problem reported by Ralf Wildenhues in
5962         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
5963
5964         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
5965         HAVE_STRUCT_STATFS_F_FSTYPENAME.
5966
5967 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5968
5969         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
5970         yesterday's patch by changing test -n to test -z.
5971
5972 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5973
5974         * modules/getloadavg (Files): Add m4/getloadavg.m4.
5975         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
5976         the former is now obsolescent.
5977
5978         * modules/chdir-long (Depends-on): Add fcntl.
5979
5980 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5981
5982         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
5983         obsolescent, and programs should use gnulib instead.
5984         * m4/getloadavg.m4: New file, with contents taken from Autoconf
5985         but with prefixes changed.
5986
5987 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5988
5989         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
5990         or stdbool.h, because they might not exist while configuring.
5991
5992         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
5993         Don't include unistd.h or limits.h; not needed, since chdir-long.h
5994         does that for us.
5995         (O_DIRECTORY): Remove.
5996
5997 2006-08-31  Eric Blake  <ebb9@byu.net>
5998
5999         * gnulib-tool: Don't let emacs change spaces to TAB.
6000
6001 2006-08-31  Bruno Haible  <bruno@clisp.org>
6002
6003         * gnulib-tool: When calling func_import more than once, do it in a
6004         subshell.
6005         Reported by Eric Blake <ebb9@byu.net>.
6006
6007 2006-08-31  Bruno Haible  <bruno@clisp.org>
6008
6009         * gnulib-tool (nl): Remove variable.
6010         (sed_transform_lib_file): Use more robust test for config-h module.
6011         (func_import): Fix typo in 2006-08-25 patch.
6012
6013 2006-08-31  Bruno Haible  <bruno@clisp.org>
6014
6015         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
6016         specified, augment Makefile.am variables instead of assigning them.
6017
6018 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
6019
6020         Work around a bug in both the Linux and SunOS 64-bit kernels:
6021         nanosleep mishandles sleeps for longer than 2**31 seconds.
6022         Problem reported by Frank v Waveren in
6023         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
6024         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
6025         Check for nanosleep bug.
6026         (LIB_NANOSLEEP): Append clock_gettime library if needed.
6027
6028 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
6029
6030         Work around a bug in both the Linux and SunOS 64-bit kernels:
6031         nanosleep mishandles sleeps for longer than 2**31 seconds.
6032         Problem reported by Frank v Waveren in
6033         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
6034         * lib/nanosleep.c (BILLION): New constant.
6035         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
6036         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
6037         implementation.
6038
6039 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
6040
6041         * modules/nanosleep (Depends-on): Add gettime.
6042
6043 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
6044         and Simon Josefsson  <jas@extundo.com>
6045         and Oskar Liljeblad  <oskar@osk.mine.nu>
6046
6047         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
6048         * gnulib-tool (func_import): New license type 'unmodifiable license
6049         text'.
6050         * modules/fdl: Use it.  Longer description.
6051         * module/gpl, module/lgpl: New files.
6052
6053 2006-08-30  Jim Meyering  <jim@meyering.net>
6054
6055         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
6056         shadowing the parameter.
6057
6058 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6059
6060         Sync from Libtool:
6061
6062         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6063
6064         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
6065         sharing with gnulib.  Report by Eric Blake.
6066
6067 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
6068
6069         * modules/isapipe: New file.
6070         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
6071
6072 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
6073
6074         * modules/configmake (Makefile.am): Add a comment, and omit
6075         the CONFIGMAKE_ prefix from generated macro names.  Suggested
6076         by Bruno Haible.
6077
6078 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
6079
6080         * m4/isapipe.m4: New file.
6081
6082 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
6083
6084         * lib/isapipe.c, lib/isapipe.h: New files.
6085
6086 2006-08-29  Jim Meyering  <jim@meyering.net>
6087
6088         * modules/configmake (Makefile.am): Make configmake.h depend on
6089         Makefile.  Otherwise, a stale configmake.h could hang around.
6090
6091 2006-08-29  Eric Blake  <ebb9@byu.net>
6092
6093         * lib/error.c (error_at_line, print_errno_message): Match libc, after
6094         resolution of upstream bug 3044.
6095
6096 2006-08-29  Bruno Haible  <bruno@clisp.org>
6097
6098         * modules/localcharset (Depends-on): Add configmake.
6099         (Makefile.am): Remove setting of LIBDIR through DEFS.
6100
6101 2006-08-29  Bruno Haible  <bruno@clisp.org>
6102
6103         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
6104         defined.
6105
6106 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6107
6108         * modules/fcntl: New file.
6109         * modules/chdir-safer (Depends-on): Add fcntl.
6110         * modules/fts: Likewise.
6111         * modules/mkdir-p: Likewise.
6112
6113         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
6114         This undoes the most recent change, since we're now addressing the
6115         problem in a different way.
6116
6117         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
6118         into output, since the output might be called Makefile.am even
6119         if $makefile_name is something different.
6120         (func_import): Use $makefile_am rather than
6121         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
6122         empty.
6123
6124         * modules/inttypes (Files): Add m4/inttypes-h.m4.
6125
6126 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6127
6128         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
6129         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
6130         recent change to stdint.m4, since we're now addressing the problem in a
6131         different way.
6132
6133 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6134
6135         * m4/fcntl_h.m4: New file.
6136
6137 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6138
6139         * lib/fcntl_.h: New file.
6140         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
6141         the fcntl module.
6142         * lib/dirchownmod.c: Likewise.
6143         * lib/fts.c: Likewise.
6144
6145         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
6146         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
6147         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
6148         just before including <inttypes.h>, to avoid circular inclusion.
6149
6150 2006-08-28  Jim Meyering  <jim@meyering.net>
6151
6152         * doc/visibility.texi: Actually read and correct the grammar of the
6153         sentence affected by yesterday's change.
6154
6155 2006-08-28  Eric Blake  <ebb9@byu.net>
6156
6157         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
6158         needs wrapper.
6159
6160 2006-08-28  Eric Blake  <ebb9@byu.net>
6161
6162         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
6163
6164 2006-08-28  Eric Blake  <ebb9@byu.net>
6165
6166         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
6167
6168 2006-08-28  Bruno Haible  <bruno@clisp.org>
6169
6170         * modules/c-strstr: New file, from GNU gettext.
6171         * MODULES.html.sh (String handling): Add c-strstr.
6172
6173 2006-08-28  Bruno Haible  <bruno@clisp.org>
6174
6175         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
6176         macros.
6177         Reported by Eric Blake.
6178
6179 2006-08-28  Bruno Haible  <bruno@clisp.org>
6180
6181         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
6182         (VASNPRINTF): Return a string of length > INT_MAX without failing.
6183         * lib/vasprintf.c: Include errno.h, limits.h.
6184         (EOVERFLOW): New fallback definition.
6185         (vasprintf): Test here whether the string length is > INT_MAX.
6186         * lib/vsnprintf.c: Include errno.h, limits.h.
6187         (EOVERFLOW): New fallback definition.
6188         (vsnprintf): Fix bug when generated string was too long for the buffer.
6189         Test here whether the string length is > INT_MAX.
6190
6191 2006-08-28  Bruno Haible  <bruno@clisp.org>
6192
6193         * lib/inttypes_.h (SCNX*): Remove definitions.
6194         Reported by Eric Blake.
6195
6196 2006-08-28  Bruno Haible  <bruno@clisp.org>
6197
6198         * lib/c-strstr.h: New file, from GNU gettext.
6199         * lib/c-strstr.c: New file, from GNU gettext.
6200
6201 2006-08-28  Bruno Haible  <bruno@clisp.org>
6202
6203         * gnulib-tool: Reorder some statements.
6204
6205 2006-08-28  Bruno Haible  <bruno@clisp.org>
6206
6207         * gnulib-tool: New option --makefile-name.
6208         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
6209         $makefile_name.
6210         (func_import): Write $makefile_name to the cache file, and read it from
6211         there unless explicitly specified. Use $makefile_name as file name
6212         instead of Makefile.am. Adjust the recommendations accordingly.
6213
6214 2006-08-28  Bruno Haible  <bruno@clisp.org>
6215
6216         * gnulib-tool (func_verify_module): Check against misapplying patch.
6217
6218 2006-08-28  Bruno Haible  <bruno@clisp.org>
6219
6220         * gnulib-tool (func_relativize, func_relconcat): New functions.
6221         Give an error if --local-dir is given with --update.
6222         Remove trailing slashes from $local_gnulib_dir.
6223         (func_import): Store the relativized $local_gnulib_dir in
6224         gnulib-cache.m4, and read it from there if not specified explicitly.
6225
6226 2006-08-28  Bruno Haible  <bruno@clisp.org>
6227
6228         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
6229         is the current directory. Respect also $local_gnulib_dir.
6230
6231 2006-08-28  Bruno Haible  <bruno@clisp.org>
6232             Simon Josefsson  <jas@extundo.com>
6233
6234         BeOS portability.
6235         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
6236
6237 2006-08-27  Jim Meyering  <jim@meyering.net>
6238
6239         * doc/visibility.texi: Remove duplicate word: "pointer".
6240
6241 2006-08-26  Bruno Haible  <bruno@clisp.org>
6242
6243         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
6244         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
6245         (Makefile.am): Create inttypes.h from inttypes_.h.
6246         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
6247
6248         * modules/imaxabs: New file.
6249
6250         * modules/imaxdiv: New file.
6251
6252 2006-08-26  Bruno Haible  <bruno@clisp.org>
6253
6254         * m4/inttypes.m4: New file.
6255         * m4/_inttypes_h.m4: Remove file.
6256         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
6257         PRI_MACROS_BROKEN.
6258         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
6259
6260         * m4/imaxabs.m4: New file.
6261
6262         * m4/imaxdiv.m4: New file.
6263
6264 2006-08-26  Bruno Haible  <bruno@clisp.org>
6265
6266         * lib/inttypes_.h: New file.
6267         * lib/inttypes.h: Remove file.
6268         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
6269
6270         * lib/imaxabs.c: New file.
6271
6272         * lib/imaxdiv.c: New file.
6273
6274 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
6275
6276         New config-h module, so that "make" output needn't be cluttered
6277         by -DHAVE_CONFIG_H.
6278         * MODULES.html.sh (Support for building libraries and executables):
6279         Add config-h.
6280         * modules/config-h: New file.
6281         * gnulib-tool (nl, sed_transform_lib_file): New vars.
6282         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
6283         the config-h module is used.
6284
6285         New configmake module, so that "make" output needn't be cluttered
6286         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
6287         * MODULES.html.sh (Support for building libraries and executables):
6288         Add configmake.
6289         * modules/configmake: New file.
6290
6291 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
6292
6293         * m4/config-h.m4: New file.
6294
6295 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
6296
6297         * config/srclist.txt: Add elisp-comp.
6298
6299 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
6300
6301         * MODULES.html.sh (Support for building libraries and executables):
6302         Add elisp-comp.
6303         * build-aux/elisp-comp: New file.
6304         * modules/elisp-comp: New file.
6305
6306 2006-08-24  Bruno Haible  <bruno@clisp.org>
6307
6308         * gnulib-tool (func_create_testdir): Use non-default values of
6309         sourcebase and m4base.
6310
6311 2006-08-24  Bruno Haible  <bruno@clisp.org>
6312
6313         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
6314         HTML structure.
6315
6316 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
6317
6318         * modules/openat (Depends-on): Add lchown.
6319
6320 2006-08-23  Bruno Haible  <bruno@clisp.org>
6321
6322         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
6323         of gl_LOCK_EARLY instead of gl_LOCK.
6324
6325 2006-08-23  Bruno Haible  <bruno@clisp.org>
6326
6327         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
6328         on OSF/1 to no.
6329         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
6330
6331 2006-08-23  Bruno Haible  <bruno@clisp.org>
6332
6333         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
6334         as unusable.
6335
6336         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
6337         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
6338         (gl_LOCK): New macro.
6339
6340 2006-08-22  Simon Josefsson  <jas@extundo.com>
6341
6342         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
6343         to md5 module.
6344
6345 2006-08-22  Simon Josefsson  <jas@extundo.com>
6346
6347         * MODULES.html.sh: Add "Support for maintaining and release
6348         projects".
6349
6350         * build-aux/gnupload: New file, from coreutils.
6351
6352 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6353
6354         Avoid the need for AC_LIBSOURCES in m4 macros.
6355         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
6356         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
6357         * modules/check-version (EXTRA_DIST): Add check-version.h.
6358         * modules/crc (EXTRA_DIST): Add crc.h.
6359         * modules/des (EXTRA_DIST): Add des.h.
6360         * modules/gc (EXTRA_DIST): Add gc.h.
6361         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
6362         * modules/getline (EXTRA_DIST): Add getline.h.
6363         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
6364         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
6365         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
6366         * modules/md2 (EXTRA_DIST): Add md2.h.
6367         * modules/md4 (EXTRA_DIST): Add md4.h.
6368         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
6369         * modules/read-file (EXTRA_DIST): Add read-file.h.
6370         * modules/readline (EXTRA_DIST): Add readline.h.
6371         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
6372         rijndael-api-fst.h.
6373
6374 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6375
6376         * m4/rijndael.m4 (gl_ARCFOUR):
6377         * m4/arctwo.m4 (gl_ARCTWO):
6378         * m4/check-version.m4 (gl_CHECK_VERSION):
6379         * m4/crc.m4 (gl_CRC):
6380         * m4/des.m4 (gl_DES):
6381         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
6382         * m4/gc.m4 (gl_GC):
6383         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
6384         * m4/getline.m4 (gl_FUNC_GETLINE):
6385         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
6386         * m4/hmac-md5.m4 (gl_HMAC_MD5):
6387         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
6388         * m4/md2.m4 (gl_MD2):
6389         * m4/md4.m4 (gl_MD4):
6390         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
6391         * m4/read-file.m4 (gl_FUNC_READ_FILE):
6392         * m4/readline.m4 (gl_FUNC_READLINE):
6393         * m4/rijndael.m4 (gl_RIJNDAEL):
6394         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
6395         to get the necessary .h files and whatnot.
6396
6397 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6398
6399         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
6400         gnulib rather than the other way around.
6401         * config/srclistvars.sh (COREUTILS): Remove.
6402
6403 2006-08-22  Jim Meyering  <jim@meyering.net>
6404
6405         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
6406
6407         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
6408
6409 2006-08-22  Eric Blake  <ebb9@byu.net>
6410
6411         * modules/regexprops-generic: New file.
6412         * MODULES.html.sh (Support for building documentation): List it.
6413
6414 2006-08-22  Eric Blake  <ebb9@byu.net>
6415
6416         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
6417         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
6418         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
6419         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
6420
6421 2006-08-22  Bruno Haible  <bruno@clisp.org>
6422
6423         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
6424         and lib_LTLIBRARIES like the other lib_* variables.
6425
6426 2006-08-22  Bruno Haible  <bruno@clisp.org>
6427
6428         * build-aux/x-to-1.in: New file, from GNU gettext.
6429
6430 2006-08-22  Bruno Haible  <bruno@clisp.org>
6431
6432         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
6433         <utmpx.h> exists.
6434
6435 2006-08-22  Bruno Haible  <bruno@clisp.org>
6436
6437         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
6438         <utmpx.h> exists.
6439
6440 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6441
6442         BeOS portability.
6443         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
6444         exist.
6445         Problem reported by Bruno Haible.
6446
6447 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6448
6449         Avoid the need for AC_LIBSOURCES in m4 macros.
6450         * modules/acl (EXTRA_DIST): Add acl.h.
6451         * modules/argmatch (Files): Add m4/argmatch.m4.
6452         (configure.ac): Add gl_ARGMATCH.
6453         (EXTRA_DIST): Renamed from lib_SOURCES, for
6454         consistency with the other modules.  Remove argmatch.c.
6455         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
6456         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
6457         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
6458         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
6459         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
6460         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
6461         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
6462         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
6463         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
6464         * modules/closeout (EXTRA_DIST): Add closeout.h.
6465         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
6466         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
6467         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
6468         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
6469         dirname.h; remove basename.c and stripslash.c.
6470         * modules/exclude (EXTRA_DIST): Add exclude.h.
6471         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
6472         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
6473         * modules/file-type (EXTRA_DIST): Add file-type.h.
6474         * modules/filemode (EXTRA_DIST): Add filemode.h.
6475         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
6476         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
6477         * modules/fpending (EXTRA_DIST): Add __fpending.h.
6478         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
6479         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
6480         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
6481         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
6482         * modules/getdate (EXTRA_DIST): Add getdate.c.
6483         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
6484         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
6485         * modules/getpass (EXTRA_DIST): Add getpass.h.
6486         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
6487         * modules/group-member (EXTRA_DIST): Add group-member.h.
6488         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
6489         * modules/hash (EXTRA_DIST): Add hash.h.
6490         * modules/human (EXTRA_DIST): Add human.h.
6491         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
6492         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
6493         * modules/lchown (EXTRA_DIST): Add lchown.h.
6494         * modules/long-options (EXTRA_DIST): Add long-options.h.
6495         * modules/lstat (EXTRA_DIST): Add lstat.h.
6496         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
6497         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
6498         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
6499         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
6500         * modules/memxor (EXTRA_DIST): Add memxor.h.
6501         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
6502         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
6503         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
6504         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
6505         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
6506         * modules/physmem (EXTRA_DIST): Add physmem.h.
6507         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
6508         * modules/posixver (EXTRA_DIST): Add posixver.h.
6509         * modules/quote (EXTRA_DIST): Add quote.h.
6510         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
6511         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
6512         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
6513         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
6514         regex_internal.h regexec.c.
6515         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
6516         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
6517         * modules/same (EXTRA_DIST): Add same.h.
6518         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
6519         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
6520         * modules/savedir (EXTRA_DIST): Add savedir.h.
6521         * modules/sha1 (EXTRA_DIST): Add sha1.h.
6522         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
6523         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
6524         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
6525         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
6526         * modules/strdup (EXTRA_DIST): Add strdup.h.
6527         * modules/strftime (EXTRA_DIST): Add strftime.h.
6528         * modules/strndup (EXTRA_DIST): Add strndup.h.
6529         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
6530         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
6531         * modules/time_r (EXTRA_DIST): Add time_r.h.
6532         * modules/timespec (EXTRA_DIST): Add timespec.h.
6533         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
6534         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
6535         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
6536         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
6537         * modules/userspec (EXTRA_DIST): Add userspec.h.
6538         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
6539         * modules/utimens (EXTRA_DIST): Add utimens.h.
6540         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
6541         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
6542         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
6543         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
6544         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
6545         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
6546         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
6547         * modules/yesno (EXTRA_DIST): Add yesno.h.
6548
6549 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6550
6551         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
6552
6553         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
6554         * m4/dev-ino.m4, same-inode.m4: Remove.
6555
6556         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
6557         * m4/acl.m4 (AC_FUNC_ACL):
6558         * m4/backupfile.m4 (gl_BACKUPFILE):
6559         * m4/c-strtod.m4 (gl_C99_STRTOLD):
6560         * m4/canon-host.m4 (gl_CANON_HOST):
6561         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
6562         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
6563         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
6564         * m4/cloexec.m4 (gl_CLOEXEC):
6565         * m4/close-stream.m4 (gl_CLOSE_STREAM):
6566         * m4/closeout.m4 (gl_CLOSEOUT):
6567         * m4/dirfd.m4 (gl_FUNC_DIRFD):
6568         * m4/dirname.m4 (gl_DIRNAME):
6569         * m4/exclude.m4 (gl_EXCLUDE):
6570         * m4/exitfail.m4 (gl_EXITFAIL):
6571         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
6572         * m4/file-type.m4 (gl_FILE_TYPE):
6573         * m4/filemode.m4 (gl_FILEMODE):
6574         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
6575         * m4/fpending.m4 (gl_FUNC_FPENDING):
6576         * m4/fprintftime.m4 (gl_FPRINTFTIME):
6577         * m4/fts.m4 (gl_FUNC_FTS):
6578         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
6579         * m4/getdate.m4 (gl_GETDATE):
6580         * m4/gethrxtime.m4 (gl_GETHRXTIME):
6581         * m4/getpagesize.m4 (gl_GETPAGESIZE):
6582         * m4/getpass.m4 (gl_FUNC_GETPASS):
6583         * m4/gettime.m4 (gl_GETTIME):
6584         * m4/getugroups.m4 (gl_GETUGROUPS):
6585         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
6586         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
6587         * m4/hard-locale.m4 (gl_HARD_LOCALE):
6588         * m4/hash.m4 (gl_HASH):
6589         * m4/idcache.m4 (gl_IDCACHE):
6590         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
6591         * m4/lchown.m4 (gl_FUNC_LCHOWN):
6592         * m4/long-options.m4 (gl_LONG_OPTIONS):
6593         * m4/lstat.m4 (gl_FUNC_LSTAT):
6594         * m4/md5.m4 (gl_MD5):
6595         * m4/memcasecmp.m4 (gl_MEMCASECMP):
6596         * m4/memcoll.m4 (gl_MEMCOLL):
6597         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
6598         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
6599         * m4/memxor.m4 (gl_MEMXOR):
6600         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
6601         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
6602         * m4/modechange.m4 (gl_MODECHANGE):
6603         * m4/mountlist.m4 (gl_MOUNTLIST):
6604         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
6605         * m4/openat.m4 (gl_FUNC_OPENAT):
6606         * m4/pathmax.m4 (gl_PATHMAX):
6607         * m4/physmem.m4 (gl_PHYSMEM):
6608         * m4/posixtm.m4 (gl_POSIXTM):
6609         * m4/posixver.m4 (gl_POSIXVER):
6610         * m4/quote.m4 (gl_QUOTE):
6611         * m4/quotearg.m4 (gl_QUOTEARG):
6612         * m4/readtokens.m4 (gl_READTOKENS):
6613         * m4/readutmp.m4 (gl_READUTMP):
6614         * m4/regex.m4 (gl_REGEX):
6615         * m4/safe-read.m4 (gl_SAFE_READ):
6616         * m4/safe-write.m4 (gl_SAFE_WRITE):
6617         * m4/same.m4 (gl_SAME):
6618         * m4/save-cwd.m4 (gl_SAVE_CWD):
6619         * m4/savedir.m4 (gl_SAVEDIR):
6620         * m4/settime.m4 (gl_SETTIME):
6621         * m4/sha1.m4 (gl_SHA1):
6622         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
6623         * m4/stat-macros.m4 (gl_STAT_MACROS):
6624         * m4/stat-time.m4 (gl_STAT_TIME):
6625         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
6626         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
6627         * m4/strdup.m4 (gl_FUNC_STRDUP):
6628         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
6629         * m4/strndup.m4 (gl_FUNC_STRNDUP):
6630         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
6631         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
6632         * m4/time_r.m4 (gl_TIME_R):
6633         * m4/timespec.m4 (gl_TIMESPEC):
6634         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
6635         * m4/unlinkdir.m4 (gl_UNLINKDIR):
6636         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
6637         * m4/userspec.m4 (gl_USERSPEC):
6638         * m4/utimecmp.m4 (gl_UTIMECMP):
6639         * m4/utimens.m4 (gl_UTIMENS):
6640         * m4/xalloc.m4 (gl_XALLOC):
6641         * m4/xgetcwd.m4 (gl_XGETCWD):
6642         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
6643         * m4/xreadlink.m4 (gl_XREADLINK):
6644         * m4/xstrtod.m4 (gl_XSTRTOD):
6645         * m4/yesno.m4 (gl_YESNO):
6646         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
6647         to get the necessary .h files and whatnot.
6648
6649 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
6650             Bruno Haible  <bruno@clisp.org>
6651
6652         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
6653         /bin/sh understanding of '!' conditional negation.
6654
6655 2006-08-21  Jim Meyering  <jim@meyering.net>
6656
6657         * modules/openat (Depends-on): Really alphabetize.
6658
6659         * modules/acl (Depends-on): Add error and quote.
6660
6661         * check-module (find_included_lib_files): Add at-func.c to the
6662         ok-to-include-more-than-once white list.
6663
6664         * modules/openat (Depends-on): Add lstat.  Alphabetize.
6665
6666 2006-08-21  Bruno Haible  <bruno@clisp.org>
6667
6668         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6669         Emit a pkgdata_DATA variable only if some snippets add contents to it.
6670         Reported by Martin Lambers <marlam@marlam.de>.
6671
6672 2006-08-21  Bruno Haible  <bruno@clisp.org>
6673
6674         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
6675         specify an installation location, don't emit a noinst_LIBRARIES or
6676         noinst_LTLIBRARIES assignment.
6677
6678 2006-08-21  Bruno Haible  <bruno@clisp.org>
6679
6680         BeOS portability.
6681         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
6682         BeOS has mbrtowc() but no <wctype.h>.
6683
6684 2006-08-21  Bruno Haible  <bruno@clisp.org>
6685
6686         BeOS portability.
6687         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
6688         exist.
6689
6690 2006-08-21  Bruno Haible  <bruno@clisp.org>
6691
6692         BeOS portability.
6693         * lib/mbchar.h: Include <wctype.h> only if it exists.
6694
6695 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
6696
6697         Remove files that are no longer needed by their respective modules.
6698         * m4/obstack.m4: Remove.
6699         * m4/strerror_r.m4: Remove.
6700         * m4/uint32_t.m4: Remove.
6701         * m4/uintptr_t.m4: Remove.
6702         * m4/ullong_max.m4: Remove.
6703         * m4/xstrtoimax.m4: Remove.
6704         * m4/xstrtoumax.m4: Remove.
6705
6706         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
6707         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
6708         dependencies now capture this.
6709
6710         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
6711         Do not use AC_LIBSOURCES, since gnulib modules now do this.
6712         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
6713         * m4/human.m4 (gl_HUMAN): Likewise.
6714         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
6715         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
6716
6717         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
6718
6719         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
6720         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
6721         stdint.
6722         * m4/human.m4 (gl_HUMAN): Likewise.
6723         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
6724         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
6725         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
6726         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
6727         * m4/xstrtol (gl_XSTRTOL): Likewise.
6728
6729         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
6730         AC_TYPE_LONG_LONG_INT.
6731         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
6732         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
6733         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
6734         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
6735
6736         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
6737         on stdbool.
6738
6739         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
6740         (gl_PREREQ_XSTRTOUL): Remove.
6741
6742         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
6743
6744         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
6745         mode.
6746
6747 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
6748
6749         Add and change modules to make it easier for coreutils to use
6750         gnulib-tool.
6751         * modules/backupfile (Files): Remove m4/d-ino.m4.
6752         (Depends-on): Add d-ino.
6753         * modules/cycle-check (Depends-on): Add stdint.
6754         (lib_SOURCES): Add cycle-check.h.
6755         * modules/d-ino: New module.
6756         * modules/d-type: New module.
6757         * modules/error (Files): Remove m4/strerror_r.m4.
6758         * modules/filemode (Files): Add m4/st_dm_mode.m4.
6759         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
6760         m4/inttypes_h.m4, m4/uintmax_t.m4.
6761         (Depends-on): Add stdint.
6762         (lib_SOURCES): Add fsusage.h.
6763         * modules/getcwd (Files): Remove d-ino.m4.
6764         (Depends-on): Add d-ino.
6765         * modules/getndelim2 (Depends-on): Add stdint.
6766         * modules/glob (Files): Remove m4/d-type.m4.
6767         (Depends-on): Add d-type.
6768         * modules/host-os: New module.
6769         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
6770         m4/inttypes_h.m4, m4/uintmax_t.m4.
6771         * Depends-on: Add stdint.
6772         (lib_SOURCES): Add human.h.
6773         * modules/inttostr (Files): Remove m4/intmax_t.m4,
6774         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
6775         m4/uintmax_t.m4, m4/ulonglong.m4.
6776         (Depends-on): Add stdint.
6777         (EXTRA_DIST): Add inttostr.h.
6778         * modules/lchmod: New module.
6779         * modules/link-follow: New module.
6780         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
6781         (Depends-on): Add lchmod.
6782         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
6783         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
6784         (Depends-on): Add stdint.
6785         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
6786         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
6787         (Depends-on): Add stdint.
6788         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
6789         * modules/perl: New module.
6790         * modules/regex (Depends-on): Add stdint.
6791         * modules/rmdir-errno: New module.
6792         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
6793         m4/intmax_t.m4.
6794         (Depends-on): Add stdint.
6795         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
6796         m4/uintmax_t.m4.
6797         (Depends-on): Add stdint.
6798         * modules/unlink-busy: New module.
6799         * modules/utimecmp (Depends-on): Add stdint.
6800         * modules/uptime: New module.
6801         * modules/winsz-ioctl: New module.
6802         * modules/winsz-termios: New module.
6803         * modules/xnanosleep (Depends-on): Add nanosleep.
6804         * modules/ullong_max: Remove.
6805         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
6806         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
6807         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
6808         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
6809         (Depends-on): Add inttypes.
6810         (lib_SOURCES): Add xstrtol.h.
6811         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
6812         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
6813         * MODULES.html.sh: Move 'assert' into the assert section.
6814         Move 'dummy' into the linking section.
6815         Remove ullong_max.
6816         Add section for compatibility checks for POSIX:2001 functions,
6817         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
6818         winsz-ioctl, and winsz-termios into it.
6819         Add lchmod.
6820         Add top-level Misc section and put host-os, perl, and uptime
6821         into it.
6822
6823 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
6824
6825         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
6826         now assume the stdint module.  Do not include inttypes.h.
6827         * lib/fsusage.h: Likewise.
6828         * lib/getndelim2.c: Likewise.
6829         * lib/human.h: Likewise.
6830         * lib/inttostr.h: Likewise.
6831         * lib/obstack.c: Likewise.
6832         * lib/regex_internal.h: Likewise.
6833         * lib/tempname.c: Likewise.
6834         * lib/utimecmp.c: Likewise.
6835         * lib/xstrtol.h: Likewise.
6836
6837         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
6838
6839         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
6840         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
6841         * lib/xtime.h: Likewise.
6842
6843 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
6844
6845         * modules/openat (Files): Add lib/fchmodat.c.
6846         Fixes problem reported by Jay Youngman.
6847
6848 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
6849
6850         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
6851         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
6852
6853 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
6854             Bruno Haible  <bruno@clisp.org>
6855
6856         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
6857         and is a script that invokes bison. Tighten the code. Add comments.
6858
6859 2006-08-18  Jim Meyering  <jim@meyering.net>
6860
6861         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
6862         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
6863         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
6864         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
6865
6866 2006-08-18  Bruno Haible  <bruno@clisp.org>
6867
6868         * modules/bison-i18n: New file.
6869         * MODULES.html.sh (Internationalization functions): Add it.
6870
6871 2006-08-18  Bruno Haible  <bruno@clisp.org>
6872
6873         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
6874         sys/statvfs.h. When getmntinfo was found, check its declaration and
6875         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
6876
6877 2006-08-18  Bruno Haible  <bruno@clisp.org>
6878
6879         * m4/bison-i18n.m4: New file, from bison.
6880
6881 2006-08-18  Bruno Haible  <bruno@clisp.org>
6882
6883         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
6884         (ME_DUMMY): Treat "kernfs" as a dummy.
6885         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
6886
6887 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
6888
6889         Update from coreutils.
6890
6891         2006-08-15  Jim Meyering  <jim@meyering.net>
6892
6893         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
6894
6895         2006-01-17  Jim Meyering  <jim@meyering.net>
6896
6897         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
6898
6899         2006-01-11  Jim Meyering  <jim@meyering.net>
6900
6901         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
6902         Check for the lchmod function.
6903
6904 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
6905
6906         Update from coreutils.
6907
6908         * lib/__fpending.h: Add copyright notice.
6909         * lib/fprintftime.h: Likewise.
6910         * lib/savedir.c: Use (C) in copyright notice.
6911         * lib/savedir.h: Likewise.
6912
6913         2006-08-15  Jim Meyering  <jim@meyering.net>
6914
6915         * lib/at-func.c: New file, with the logic of all emulated at-functions.
6916         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
6917         in support of the EXPECTED_ERRNO macro.
6918         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
6919         definitions.  Instead, define the appropriate symbols and include
6920         "at-func.c".
6921         * lib/mkdirat.c (mkdirat): Likewise.
6922         * lib/fchmodat.c (fchmodat): Likewise.
6923         (ENOSYS): Remove definition.
6924         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
6925         it.  Don't include "unistd--.h" -- it wasn't ever used.
6926
6927         2006-01-17  Jim Meyering  <jim@meyering.net>
6928
6929         Rewrite fts.c not to change the current working directory,
6930         by using openat, fstatat, fdopendir, etc..
6931
6932         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
6933         (HAVE_OPENAT_SUPPORT): Define.
6934         [_LIBC] (fchdir): Don't undef or define; no longer used.
6935         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
6936         Now, this `function' always succeeds, and consumes its file descriptor
6937         parameter -- so callers must not close such FDs.  Update callers.
6938         (diropen_fd, opendirat, cwd_advance_fd): New functions.
6939         (diropen): Add parameter, SP.  Adjust all callers.
6940         Implement using diropen_fd, rather than open.
6941         (fts_open): Initialize new member, fts_cwd_fd.
6942         Remove fts_rft-setting code.
6943         (fts_close): Close fts_cwd_fd, if necessary.
6944         (__opendir2): Define in terms of opendir or opendirat,
6945         depending on whether the FST_NOCHDIR flag is set.
6946         (fts_build): Since fts_safe_changedir consumes its FD, and since
6947         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
6948         and close the dup'd file descriptor upon failure.
6949         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
6950         (fts_safe_changedir): Tweak semantics to reflect that this function
6951         now calls cwd_advance_fd and hence consumes its FD argument.
6952         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
6953         [struct FTS] (fts_rft): Remove now-unused member.
6954         [struct FTS] (fts_cycle.state): Improve comment.
6955
6956         * lib/openat.c (openat_needs_fchdir): New function.
6957         * lib/openat.h (openat_needs_fchdir): Declare it.
6958
6959 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
6960
6961         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
6962         Problem and fix reported by Pádraig Brady in
6963         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
6964
6965 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6966
6967         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
6968
6969 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6970
6971         * lib/memcoll.c (memcoll): Optimize for the common case where the
6972         arguments are bytewise equal.
6973
6974 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6975
6976         * doc/regexprops-generic.texi: Add a copyright notice.
6977
6978 2006-08-15  Bruno Haible  <bruno@clisp.org>
6979
6980         * modules/tmpdir (License): Change to LGPL.
6981
6982 2006-08-15  Bruno Haible  <bruno@clisp.org>
6983
6984         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
6985         module.
6986
6987 2006-08-14  Simon Josefsson  <jas@extundo.com>
6988
6989         * config/srclist.txt: Add gnupload.
6990
6991 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6992
6993         Change copyright notice from LGPL 2 to GPL 2, since that's the
6994         standard form used in the gnulib repository.
6995         * tests/test-lock.c: Likewise.
6996         * tests/test-stdint.c: Likewise.
6997         * tests/test-tls.c: Likewise.
6998
6999         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
7000         prelude-manager.  User shorter URLs for GNU projects, without '?'.
7001         Add copyright notice.
7002
7003         * check-module: Add copyright notice.  Output a copyright
7004         notice if "--version" is specified.
7005         * modules/COPYING: New file.
7006         * tests/test-getaddrinfo.c: Add copyright notice.
7007         * tests/test-verify.c: Likewise.
7008
7009 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
7010
7011         Change copyright notice from LGPL 2 to GPL 2, since that's the
7012         standard form used in the gnulib repository.
7013         * lib/lock.c: LGPL -> GPL.
7014         * lib/lock.h: Likewise.
7015         * lib/strnlen1.c: Likewise.
7016         * lib/strnlen1.h: Likewise.
7017         * lib/tls.c: Likewise.
7018         * lib/tls.h: Likewise.
7019         * lib/tmpdir.c: Likewise.
7020
7021         * lib/TODO: Remove; this belongs only in coreutils.
7022
7023 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
7024
7025         Add copyright notices to long-enough files that lack them, since
7026         otherwise the files aren't clearly free.  Use the same notice that
7027         getdate.texi already uses.
7028         * doc/alloca-opt.texi: Add copyright notice.
7029         * doc/alloca.texi: Likewise.
7030         * doc/ctime.texi: Likewise.
7031         * doc/functions.texi: Likewise.
7032         * doc/gcd.texi: Likewise.
7033         * doc/gnulib-tool.texi: Likewise.
7034         * doc/inet_ntoa.texi: Likewise.
7035         * doc/visibility.texi: Likewise.
7036
7037         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
7038         * doc/quote.texi: Add copyright notice.
7039
7040         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
7041         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
7042         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
7043         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
7044         is now obsolete, and give a pointer to the Sun list.
7045         Add copyright notice.
7046
7047 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
7048
7049         * config/srclistvars.sh: Add copyright notice.
7050
7051 2006-08-14  Eric Blake  <ebb9@byu.net>
7052
7053         Import the following change from libc:
7054
7055         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
7056
7057         Upstream bug 2997.
7058         * lib/misc/error.c: Add space between program name and message if file
7059         name is missing.
7060
7061 2006-08-12  Karl Berry  <karl@gnu.org>
7062
7063         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
7064         remove, these originate in gnulib now.
7065
7066 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7067
7068         * doc/Makefile (standards.info standards.html standards.dvi):
7069         Also depend on make-stds.texi.
7070
7071 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
7072
7073         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
7074         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
7075
7076         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
7077         in wchar_t.  Problem reported by Eric Blake.
7078
7079         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
7080         LEN is smaller than SIZE.  Suggested by Bruno Haible.
7081         Also, help the compiler to keep LEN in a register.
7082
7083 2006-08-11  Eric Blake  <ebb9@byu.net>
7084
7085         * users.txt: Sort.  Add tar.
7086
7087 2006-08-11  Bruno Haible  <bruno@clisp.org>
7088
7089         * users.txt: New file.
7090
7091 2006-08-11  Bruno Haible  <bruno@clisp.org>
7092
7093         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
7094         before <wchar.h>. Needed for OSF/1 and BSD/OS.
7095
7096 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
7097
7098         * modules/snprintf (Depends-on): Remove minmax.
7099         (Maintainer): Add self and Bruno.
7100
7101 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
7102
7103         * lib/.cppi-disable: Add snprintf.h, socket_.h.
7104         * lib/snprintf.c: Include <errno.h> and <limits.h>.
7105         (EOVERFLOW): Define if the system does not.
7106         Do not include "minmax.h"; it wasn't used.
7107         (snprintf): Don't assume size_t promotes to an unsigned type.
7108         Fix bug when generated string was too long for the buffer: the
7109         buffer's contents are supposed to be the initial prefix of the
7110         output.  Don't assume vasnprintf returns EOVERFLOW if the size
7111         exceeds INT_MAX; do the check ourselves.
7112
7113         Import the following changes from libc:
7114
7115         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
7116
7117         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
7118         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
7119         set wc to the byte which couldn't be converted.
7120         (re_string_reconstruct): Don't clear valid_raw_len before calling
7121         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
7122         tip_context using re_string_context_at.
7123
7124         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
7125
7126         * lib/posix/regex.h: g++ still cannot handled [restrict].
7127
7128         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
7129
7130         * lib/posix/regex.h: Remove special handling for VMS.
7131
7132 2006-08-10  Jim Meyering  <jim@meyering.net>
7133
7134         * modules/same-inode: New module.
7135         * modules/dev-ino: New module.
7136         * modules/cycle-check: Depend on these modules, rather than simply
7137         including their .h files.
7138         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
7139         required via m4/cycle-check.m4.
7140         * modules/same: Depend on new same-inode module, rather than
7141         including same-inode.h.
7142         * modules/chdir-safer: New file.
7143
7144         * modules/chown (Depends-on): Add stat-macros.
7145
7146 2006-08-10  Jim Meyering  <jim@meyering.net>
7147
7148         * m4/cycle-check.m4: New file.
7149         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
7150         * m4/dev-ino.m4, m4/same-inode.m4: New files.
7151
7152 2006-08-10  Eric Blake  <ebb9@byu.net>
7153
7154         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
7155         in from original proposal.
7156
7157 2006-08-10  Eric Blake  <ebb9@byu.net>
7158         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7159
7160         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
7161         namespace.
7162
7163 2006-08-10  Bruno Haible  <bruno@clisp.org>
7164
7165         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
7166         as well.
7167
7168 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
7169
7170         Sync from coreutils.
7171
7172         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
7173
7174         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
7175         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
7176
7177 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
7178
7179         * modules/restrict: Remove; no longer needed now that we assume
7180         Autoconf 2.59 or later.
7181         * MODULES.html.sh: Remove 'restrict'.
7182         * modules/argp (Depends-on): Remove 'restrict'.
7183         * modules/base64 (Depends-on): Likewise.
7184         * modules/gc (Depends-on): Likewise.
7185         * modules/getaddrinfo (Depends-on): Likewise.
7186         * modules/glob (Depends-on): Likewise.
7187         * modules/inet_ntop (Depends-on): Likewise.
7188         * modules/inet_pton (Depends-on): Likewise.
7189         * modules/memxor (Depends-on): Likewise.
7190         * modules/regex (Depends-on): Likewise.
7191         * modules/strtok_r (Depends-on): Likewise.
7192         * modules/time_r (Depends-on): Likewise.
7193
7194 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
7195
7196         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
7197         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
7198         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
7199         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
7200         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
7201         * m4/memxor.m4 (gl_MEMXOR): Likewise.
7202         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
7203         gl_C_RESTRICT replaced by AC_C_RESTRICT.
7204
7205         Merge from coreutils.
7206         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
7207         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
7208         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
7209         * m4/time_r.m4 (gl_TIME_R): Likewise.
7210
7211 2006-08-09  Karl Berry  <karl@gnu.org>
7212
7213         * config/srclist.txt: no more gettext-tools, per Bruno.
7214
7215 2006-08-08  Eric Blake  <ebb9@byu.net>
7216
7217         * modules/verror: New module.
7218         * MODULES.html.sh: Document it.
7219
7220 2006-08-08  Eric Blake  <ebb9@byu.net>
7221
7222         * lib/verror.h, lib/verror.c: New files.
7223
7224 2006-08-08  Eric Blake  <ebb9@byu.net>
7225
7226         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
7227         verror_at_line output complies with GNU Coding Standards even when
7228         file is NULL.
7229
7230 2006-08-07  Bruno Haible  <bruno@clisp.org>
7231
7232         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
7233         versions of AIX.
7234         Reported by Ralf Wildenhues.
7235
7236 2006-08-07  Bruno Haible  <bruno@clisp.org>
7237
7238         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
7239         in an AC_DEFUN. Needed so that the autoconf snippets can use
7240         AC_REQUIRE.
7241
7242 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7243
7244         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7245         Initialize pkgdata_DATA.
7246         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
7247         overriding it.
7248
7249 2006-08-06  Eric Blake  <ebb9@byu.net>
7250
7251         * lib/error.h: Fold in some upstream changes from glibc.
7252         * lib/error.c: Likewise.
7253
7254 2006-08-04  Bruno Haible  <bruno@clisp.org>
7255
7256         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7257         Make the mostlyclean-local rule depend on mostlyclean-generic.
7258         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
7259
7260 2006-07-31  Bruno Haible  <bruno@clisp.org>
7261
7262         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
7263         <stdlib.h>, <string.h>.
7264
7265 2006-07-30  Bruno Haible  <bruno@clisp.org>
7266
7267         * modules/readlink (License): Change to LGPL.
7268
7269 2006-07-30  Bruno Haible  <bruno@clisp.org>
7270
7271         * modules/javaversion (Makefile.am): Distribute javaversion.java and
7272         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
7273         set PKGDATADIR to point to it.
7274
7275 2006-07-30  Bruno Haible  <bruno@clisp.org>
7276
7277         * modules/csharpexec (configure.ac): Comment out macro invocation.
7278         * modules/javaexec (configure.ac): Likewise.
7279         * modules/javacomp-script (configure.ac): Likewise.
7280
7281         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
7282
7283 2006-07-30  Bruno Haible  <bruno@clisp.org>
7284
7285         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
7286         linked-list.
7287
7288 2006-07-30  Bruno Haible  <bruno@clisp.org>
7289
7290         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
7291
7292 2006-07-30  Bruno Haible  <bruno@clisp.org>
7293
7294         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7295         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
7296         get removed.
7297
7298 2006-07-29  Bruno Haible  <bruno@clisp.org>
7299
7300         Make it possible for gnulib-tool to work with locally modified or
7301         augmented gnulib repositories.
7302         * gnulib-tool (func_usage): Document --local-dir option.
7303         (local_gnulib_dir): New variable.
7304         Handle --local-dir option.
7305         (func_lookup_file): New function.
7306         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
7307         (func_get_description, func_get_filelist, func_get_description,
7308         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
7309         func_get_automake_snippet, func_get_include_directive,
7310         func_get_license, func_get_maintainer): Use func_lookup_file.
7311         (func_import, func_create_testdir): Use func_lookup_file.
7312
7313 2006-07-29  Bruno Haible  <bruno@clisp.org>
7314
7315         * modules/setenv (Depends-on): Add unistd.
7316
7317 2006-07-29  Bruno Haible  <bruno@clisp.org>
7318
7319         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
7320
7321 2006-07-29  Bruno Haible  <bruno@clisp.org>
7322
7323         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
7324
7325 2006-07-29  Bruno Haible  <bruno@clisp.org>
7326
7327         * gnulib-tool (import, update): If there is no Makefile.am, look at
7328         aclocal.m4, instead of bailing out.
7329
7330 2006-07-29  Bruno Haible  <bruno@clisp.org>
7331
7332         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
7333         Categorize the options by when they are useful.
7334
7335 2006-07-29  Bruno Haible  <bruno@clisp.org>
7336
7337         * gnulib-tool (func_usage): Document option --no-libtool.
7338         Handle option --no-libtool.
7339         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
7340         for changed semantics of $libtool variable.
7341         (func_import): Likewise. If libtool is not used, show this through
7342         an option --no-libtool.
7343         (func_create_testdir): Update.
7344
7345 2006-07-29  Bruno Haible  <bruno@clisp.org>
7346
7347         * gnulib-tool (func_import): Extend error message about missing
7348         --doc-base.
7349
7350 2006-07-29  Bruno Haible  <bruno@clisp.org>
7351
7352         * gnulib-tool (func_import): Don't create the $docbase directory if
7353         there is no file to store there.
7354
7355 2006-07-29  Bruno Haible  <bruno@clisp.org>
7356
7357         * gnulib-tool (autoconf_minversion): If a --dir option is given and
7358         relevant, look for configure.ac there, not in the current directory.
7359         Also use a simple search for AC_PREREQ, not "autoconf --trace".
7360
7361 2006-07-29  Bruno Haible  <bruno@clisp.org>
7362
7363         * gnulib-tool (SORT): New variable.
7364         (func_usage): Undocument --assume-autoconf option.
7365         Remove --assume-autoconf option handling.
7366         (autoconf_minversion): Determine from the contents of configure.ac.
7367         (func_import): Remove autoconf_minversion handling.
7368         Suggested by Eric Blake.
7369
7370 2006-07-29  Bruno Haible  <bruno@clisp.org>
7371
7372         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
7373
7374 2006-07-29  Bruno Haible  <bruno@clisp.org>
7375
7376         * config/srclist.txt (*setenv.[ch]): Remove rules.
7377
7378 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7379
7380         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
7381
7382 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7383
7384         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
7385         arpa/inet.h.
7386
7387 2006-07-28  Simon Josefsson  <jas@extundo.com>
7388
7389         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
7390         * modules/inet_pton (Depends-on): Likewise.
7391
7392 2006-07-28  Simon Josefsson  <jas@extundo.com>
7393
7394         * m4/netinet_in_h.m4: New file.
7395
7396 2006-07-28  Simon Josefsson  <jas@extundo.com>
7397
7398         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
7399         #include's.
7400
7401 2006-07-28  Simon Josefsson  <jas@extundo.com>
7402
7403         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
7404         #include's.
7405
7406 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
7407
7408         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
7409         setgid on directories only if they set these bits.
7410         * lib/modechange.h: Remove obsolete comment about masks.
7411
7412 2006-07-28  Eric Blake  <ebb9@byu.net>
7413
7414         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
7415         macro expansion.
7416
7417 2006-07-28  Bruno Haible  <bruno@clisp.org>
7418
7419         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
7420
7421 2006-07-28  Bruno Haible  <bruno@clisp.org>
7422
7423         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
7424
7425 2006-07-28  Bruno Haible  <bruno@clisp.org>
7426
7427         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
7428         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
7429         Define fallbacks.
7430         Avoids link error on FreeBSD 4.x.
7431         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
7432
7433         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
7434         encoding.
7435         * lib/mbswidth.c (iswcntrl): Likewise.
7436
7437 2006-07-27  Bruno Haible  <bruno@clisp.org>
7438
7439         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
7440         test.
7441
7442 2006-07-27  Bruno Haible  <bruno@clisp.org>
7443
7444         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
7445         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
7446         defined.
7447
7448 2006-07-26  Eric Blake  <ebb9@byu.net>
7449
7450         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
7451
7452 2006-07-26  Eric Blake  <ebb9@byu.net>
7453
7454         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
7455         like mingw that lack mkstemp.
7456         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
7457         avoid compilation warning on mingw.
7458
7459 2006-07-26  Bruno Haible  <bruno@clisp.org>
7460
7461         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
7462         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
7463         INT_FAST*_MIN, INTPTR_MIN.
7464
7465 2006-07-25  Bruno Haible  <bruno@clisp.org>
7466
7467         * modules/version-etc (Depends-on): Add stdarg.
7468
7469 2006-07-25  Bruno Haible  <bruno@clisp.org>
7470
7471         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
7472         complex commands.
7473
7474 2006-07-25  Bruno Haible  <bruno@clisp.org>
7475
7476         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
7477         defined in <stdarg.h> or config.h.
7478
7479 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
7480
7481         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
7482         (gl_STDIO_SAFER): Remove.
7483
7484 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
7485
7486         * MODULES.html.sh (File stream based Input/Output):
7487         Add fopen-safer, tmpfile-safer; remove stdio-safer.
7488         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
7489         * modules/fopen-safer, modules/tmpfile-safer: New files.
7490         * modules/stdio-safer: Remove.
7491
7492 2006-07-24  Bruno Haible  <bruno@clisp.org>
7493
7494         * modules/tmpdir: New file.
7495         * MODULES.html.sh (File system functions): Add it.
7496
7497 2006-07-24  Bruno Haible  <bruno@clisp.org>
7498
7499         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
7500         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
7501
7502 2006-07-24  Bruno Haible  <bruno@clisp.org>
7503
7504         * modules/clean-temp: New file.
7505
7506 2006-07-24  Bruno Haible  <bruno@clisp.org>
7507
7508         * m4/tmpdir.m4: New file, from GNU gettext.
7509
7510 2006-07-24  Bruno Haible  <bruno@clisp.org>
7511
7512         * lib/tmpdir.h: New file, from GNU gettext.
7513         * lib/tmpdir.c: New file, from GNU gettext.
7514
7515 2006-07-24  Bruno Haible  <bruno@clisp.org>
7516
7517         * lib/clean-temp.h: New file, from GNU gettext.
7518         * lib/clean-temp.c: New file, from GNU gettext.
7519
7520 2006-07-23  Eric Blake  <ebb9@byu.net>
7521
7522         * modules/stdio-safer (Files): Add tmpfile-safer.c.
7523         (Depends-on): Add binary-io.
7524
7525 2006-07-23  Eric Blake  <ebb9@byu.net>
7526
7527         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
7528
7529 2006-07-23  Eric Blake  <ebb9@byu.net>
7530
7531         * lib/tmpfile-safer.c: New file.
7532         * lib/stdio-safer.h (fopen_safer): Add prototype.
7533         * lib/stdio--.h (tmpfile): Make safer.
7534
7535 2006-07-23  Bruno Haible  <bruno@clisp.org>
7536
7537         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
7538         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
7539         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
7540         gl_linked_remove_at): Use it.
7541
7542 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7543         and Simon Josefsson <jas@extundo.com>
7544
7545         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
7546
7547         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
7548
7549 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
7550
7551         * modules/close-stream: New file.
7552         * modules/closeout (Description): Make it clear that it exits
7553         with a diagnostic on error.
7554         (Depends-on): Add close-stream.  Remove fpending, stdbool.
7555         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
7556
7557 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
7558
7559         * m4/close-stream.m4: New file.
7560
7561 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
7562
7563         * lib/close-stream.c, lib/close-stream.h: New files.
7564
7565 2006-07-22  Bruno Haible  <bruno@clisp.org>
7566
7567         Merge from GNU gettext 0.15.
7568
7569         2006-05-01  Bruno Haible  <bruno@clisp.org>
7570
7571                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
7572
7573         2006-07-22  Bruno Haible  <bruno@clisp.org>
7574
7575                 * modules/javaversion: New file.
7576                 * MODULES.html.sh (Java): Add javaversion.
7577
7578         2006-03-12  Bruno Haible  <bruno@clisp.org>
7579
7580                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
7581
7582         2005-12-04  Bruno Haible  <bruno@clisp.org>
7583
7584                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
7585                 (untested).
7586
7587         2006-06-21  Bruno Haible  <bruno@clisp.org>
7588
7589                 Avoid warnings from recent versions of mcs.
7590                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
7591                 -o, -L, -r any more. Use options documented since mcs-1.0
7592                 instead. Similarly for -g.
7593
7594         2005-12-04  Bruno Haible  <bruno@clisp.org>
7595
7596                 * build-aux/csharpcomp.sh.in: Suffix for resources is
7597                 .resources, not .resource.
7598
7599         2005-07-09  Bruno Haible  <bruno@clisp.org>
7600
7601                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
7602                 add a .dll suffix.
7603                 Reported by Mark Junker <mjscod@gmx.de>.
7604
7605         2006-07-22  Bruno Haible  <bruno@clisp.org>
7606
7607                 * modules/gettext: Upgrade to gettext-0.15.
7608                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
7609                 m4/visibility.m4.
7610                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
7611
7612 2006-07-22  Bruno Haible  <bruno@clisp.org>
7613
7614         Merge from GNU gettext 0.15.
7615
7616         2006-03-25  Bruno Haible  <bruno@clisp.org>
7617
7618                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
7619
7620         2006-07-21  Bruno Haible  <bruno@clisp.org>
7621
7622                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
7623                 "1.1".
7624
7625         2006-05-09  Bruno Haible  <bruno@clisp.org>
7626
7627                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
7628                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
7629                 for the conftestver execution.
7630
7631         2006-05-01  Bruno Haible  <bruno@clisp.org>
7632
7633                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
7634                 optional target-version argument. Verify that the compiler
7635                 groks source of the specified source-version, or add -source
7636                 option as necessary. Verify that the compiler produces
7637                 bytecode in the specified target-version, or add -target and
7638                 -source options as necessary. Make the result of the test
7639                 available as variable CONF_JAVAC. Also log error output in
7640                 config.log.
7641
7642         2006-03-11  Bruno Haible  <bruno@clisp.org>
7643
7644                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
7645
7646         2006-05-09  Bruno Haible  <bruno@clisp.org>
7647
7648                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
7649                 CLASSPATH_SEPARATOR to a semicolon.
7650
7651         2006-03-12  Bruno Haible  <bruno@clisp.org>
7652
7653                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
7654                 available as variable CONF_JAVA, for subsequent autoconf
7655                 tests. Also log error output in config.log.
7656
7657         2006-07-19  Bruno Haible  <bruno@clisp.org>
7658
7659                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
7660                 that getline works on glibc2 systems. Needed to avoid trouble
7661                 in relocatable.c.
7662                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
7663
7664         2005-12-04  Bruno Haible  <bruno@clisp.org>
7665
7666                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
7667                 launcher (untested).
7668
7669         2005-12-04  Bruno Haible  <bruno@clisp.org>
7670
7671                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
7672
7673         2006-07-22  Bruno Haible  <bruno@clisp.org>
7674
7675                 * gettext.m4: Update from GNU gettext-0.15.
7676                 * nls.m4: Likewise.
7677                 * po.m4: Likewise.
7678                 * inttypes-pri.m4: Likewise.
7679                 * inttypes-h.m4: Renamed from inttypes.m4.
7680                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
7681
7682 2006-07-22  Bruno Haible  <bruno@clisp.org>
7683
7684         Merge from GNU gettext 0.15.
7685
7686         2005-07-05  Bruno Haible  <bruno@clisp.org>
7687
7688                 * printf-args.c (printf_fetchargs): Work around broken
7689                 definition of wint_t on mingw.
7690
7691         2005-02-12  Bruno Haible  <bruno@clisp.org>
7692
7693                 * xallocsa.h: Add extern "C" for C++.
7694
7695         2006-05-17  Bruno Haible  <bruno@clisp.org>
7696
7697                 Cygwin portability.
7698                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
7699
7700         2006-04-30  Bruno Haible  <bruno@clisp.org>
7701
7702                 * progreloc.c: Include <mach-o/dyld.h> if available.
7703                 (find_executable): Use _NSGetExecutablePath when possible.
7704
7705         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
7706
7707                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
7708                 function.
7709
7710         2005-12-29  Bruno Haible  <bruno@clisp.org>
7711
7712                 * progreloc.c (set_program_name_and_installdir): Fix
7713                 compilation error.
7714
7715         2005-12-04  Bruno Haible  <bruno@clisp.org>
7716
7717                 Cygwin portability.
7718                 * progreloc.c: Include <windows.h> also on Cygwin.
7719                 (find_executable): Add support for Cygwin.
7720                 (set_program_name_and_installdir): Handle also platforms with
7721                 nonempty EXEEXT.
7722
7723         2006-07-11  Bruno Haible  <bruno@clisp.org>
7724
7725                 * javacomp.c: Fix a comment.
7726                 Reported by Jim Meyering.
7727
7728         2006-04-30  Bruno Haible  <bruno@clisp.org>
7729
7730                 * javacomp.h (compile_java_class): Add source_version,
7731                 target_version arguments.
7732                 * javacomp.c: Rewritten to choose only a compiler that
7733                 respects the specified source_version and target_version.
7734
7735         2006-06-27  Bruno Haible  <bruno@clisp.org>
7736
7737                 Assume correct S_ISDIR macro.
7738                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
7739
7740         2006-07-22  Bruno Haible  <bruno@clisp.org>
7741
7742                 * javaversion.h: New file, from GNU gettext.
7743                 * javaversion.c: New file, from GNU gettext.
7744                 * javaversion.java: New file, from GNU gettext.
7745                 * javaversion.class: New file, from GNU gettext.
7746
7747         2006-05-17  Bruno Haible  <bruno@clisp.org>
7748
7749                 Cygwin portability.
7750                 * javaexec.c (execute_java_class): Test for jview program
7751                 also on Cygwin.
7752
7753         2006-04-09  Bruno Haible  <bruno@clisp.org>
7754
7755                 * fatal-signal.c: Don't include string.h.
7756                 (at_fatal_signal): Use a copying loop instead of memcpy.
7757
7758         2005-12-04  Bruno Haible  <bruno@clisp.org>
7759
7760                 * csharpexec.c: Add support for 'clix' launcher (untested).
7761                 (execute_csharp_using_sscli): New function.
7762                 (execute_csharp_program): Call it.
7763
7764         2006-06-21  Bruno Haible  <bruno@clisp.org>
7765
7766                 Avoid warnings from recent versions of mcs.
7767                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
7768                 -o, -L, -r any more. Use options documented since mcs-1.0
7769                 instead. Similarly for -g.
7770
7771         2005-07-09  Bruno Haible  <bruno@clisp.org>
7772
7773                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
7774                 add a .dll suffix.
7775                 Reported by Mark Junker <mjscod@gmx.de>.
7776
7777         2006-06-17  Bruno Haible  <bruno@clisp.org>
7778
7779                 * config.charset: Update for NetBSD 3.0.
7780
7781         2006-05-17  Bruno Haible  <bruno@clisp.org>
7782
7783                 Cygwin portability.
7784                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
7785
7786         2006-05-16  Bruno Haible  <bruno@clisp.org>
7787
7788                 * localcharset.c [CYGWIN]: Include <windows.h>.
7789                 (get_charset_aliases): For Cygwin, return the same CPxxx
7790                 aliases list as under WIN32.
7791                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
7792                 the environment variables. Fall back to GetACP().
7793
7794         2006-04-05  Bruno Haible  <bruno@clisp.org>
7795
7796                 * config.charset: Update Juan Manuel Guerrero's address.
7797
7798         2005-02-12  Bruno Haible  <bruno@clisp.org>
7799
7800                 * allocsa.h: Add extern "C" for C++.
7801
7802         2005-02-10  Bruno Haible  <bruno@clisp.org>
7803
7804                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
7805                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
7806
7807         2006-07-22  Bruno Haible  <bruno@clisp.org>
7808
7809                 * gettext.h: Update to GNU gettext-0.15.
7810
7811 2006-07-22  Bruno Haible  <bruno@clisp.org>
7812
7813         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
7814         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
7815         lib-prefix.m4, longdouble.m4, ssize_t.m4.
7816
7817 2006-07-21  Eric Blake  <ebb9@byu.net>
7818
7819         * modules/stdlib-safer: New file.
7820         * MODULES.html.sh (File stream based Input/Output): Add
7821         stdlib-safer.
7822
7823 2006-07-21  Eric Blake  <ebb9@byu.net>
7824
7825         * lib/stdlib-safer.h: New file from coreutils, required by
7826         stdlib--.h.
7827
7828 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
7829
7830         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
7831
7832 2006-07-20  Bruno Haible  <bruno@clisp.org>
7833
7834         * gnulib-tool: Recognize new option --assume-autoconf.
7835         (autoconf_minversion): New variable.
7836         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
7837
7838 2006-07-20  Bruno Haible  <bruno@clisp.org>
7839
7840         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
7841
7842 2006-07-19  Derek R. Price  <derek@ximbiot.com>
7843
7844         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
7845         Reindent and repaginate.
7846
7847 2006-07-19  Derek Price  <derek@ximbiot.com>
7848
7849         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
7850         Correct grammar.
7851
7852 2006-07-17  Bruno Haible  <bruno@clisp.org>
7853
7854         * modules/list: New file.
7855         * modules/array-list: New file.
7856         * modules/carray-list, modules/carray-list-tests: New files.
7857         * modules/linked-list, modules/linked-list-tests: New files.
7858         * modules/avltree-list, modules/avltree-list-tests: New files.
7859         * modules/rbtree-list, modules/rbtree-list-tests: New files.
7860         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
7861         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
7862         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
7863         * modules/oset: New file.
7864         * modules/array-oset: New file.
7865         * modules/avltree-oset, modules/avltree-oset-tests: New files.
7866         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
7867         * tests/test-carray_list.c: New file.
7868         * tests/test-linked_list.c: New file.
7869         * tests/test-avltree_list.c: New file.
7870         * tests/test-rbtree_list.c: New file.
7871         * tests/test-linkedhash_list.c: New file.
7872         * tests/test-avltreehash_list.c: New file.
7873         * tests/test-rbtreehash_list.c: New file.
7874         * tests/test-avltree_oset.c: New file.
7875         * tests/test-rbtree_oset.c: New file.
7876         * MODULES.html.sh (Container data structures): New section.
7877
7878 2006-07-17  Bruno Haible  <bruno@clisp.org>
7879
7880         * m4/gl_list.m4: New file.
7881
7882 2006-07-17  Bruno Haible  <bruno@clisp.org>
7883
7884         * lib/gl_list.h: New file.
7885         * lib/gl_list.c: New file.
7886         * lib/gl_array_list.h: New file.
7887         * lib/gl_array_list.c: New file.
7888         * lib/gl_carray_list.h: New file.
7889         * lib/gl_carray_list.c: New file.
7890         * lib/gl_linked_list.h: New file.
7891         * lib/gl_linked_list.c: New file.
7892         * lib/gl_anylinked_list1.h: New file.
7893         * lib/gl_anylinked_list2.h: New file.
7894         * lib/gl_avltree_list.h: New file.
7895         * lib/gl_avltree_list.c: New file.
7896         * lib/gl_anyavltree_list1.h: New file.
7897         * lib/gl_anyavltree_list2.h: New file.
7898         * lib/gl_rbtree_list.h: New file.
7899         * lib/gl_rbtree_list.c: New file.
7900         * lib/gl_anyrbtree_list1.h: New file.
7901         * lib/gl_anyrbtree_list2.h: New file.
7902         * lib/gl_anytree_list1.h: New file.
7903         * lib/gl_anytree_list2.h: New file.
7904         * lib/gl_linkedhash_list.h: New file.
7905         * lib/gl_linkedhash_list.c: New file.
7906         * lib/gl_anyhash_list1.h: New file.
7907         * lib/gl_anyhash_list2.h: New file.
7908         * lib/gl_avltreehash_list.h: New file.
7909         * lib/gl_avltreehash_list.c: New file.
7910         * lib/gl_rbtreehash_list.h: New file.
7911         * lib/gl_rbtreehash_list.c: New file.
7912         * lib/gl_anytreehash_list1.h: New file.
7913         * lib/gl_anytreehash_list2.h: New file.
7914
7915         * lib/gl_oset.h: New file.
7916         * lib/gl_oset.c: New file.
7917         * lib/gl_array_oset.h: New file.
7918         * lib/gl_array_oset.c: New file.
7919         * lib/gl_avltree_oset.h: New file.
7920         * lib/gl_avltree_oset.c: New file.
7921         * lib/gl_rbtree_oset.h: New file.
7922         * lib/gl_rbtree_oset.c: New file.
7923         * lib/gl_anytree_oset.h: New file.
7924
7925 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7926
7927         * m4/mkancesdirs.m4: New file.
7928         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
7929         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
7930         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
7931         it.
7932
7933 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7934
7935         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
7936         * lib/mkancesdirs.h: New files.
7937         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
7938         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
7939         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
7940         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
7941         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
7942         callers changed.  Revamp internals significantly, by not
7943         attempting to create directories that are temporarily more
7944         permissive than the final results.  Do not attempt to use
7945         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
7946         This removes some race conditions, fixes some bugs, and simplifies
7947         things.  Use new dirchownmod function to do owner and mode changes.
7948         * lib/mkdir-p.h: Likewise.
7949         * lib/modechange.c (octal_to_mode): New function.
7950         (struct mode_change): New member mentioned.
7951         (make_node_op_equals): New arg mentioned.  All callers changed.
7952         (mode_compile): Keep track of which mode bits the user has explicitly
7953         mentioned.
7954         (mode_adjust): New arg DIR, so that we implement the X op correctly.
7955         New arg PMODE_BITS, to keep track of which mode bits the user
7956         mentioned; it treats S_ISUID and S_ISGID speciall.
7957         All callers changed.
7958         * lib/modechange.h: Likewise.
7959
7960 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7961
7962         * MODULES.html.sh: Add mkancestors.
7963         * modules/mkancesdirs: New module.
7964         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
7965         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
7966         The chdir-safer and afs files are now orphans; I'll remove them
7967         unless someone speaks up.
7968         Add lib/dirchownmod.c, lib/dirchownmod.h.
7969         (Depends-on): Remove alloca, chown, save-cwd, dirname.
7970         Add lchown, mkancesdirs.
7971         (Maintainer): Add self.
7972
7973 2006-07-15  Karl Berry  <karl@gnu.org>
7974
7975         * gnulib-tool: help message wording/arrangement.
7976
7977 2006-07-14  Simon Josefsson  <jas@extundo.com>
7978
7979         * doc/gnulib.texi (Libtool and Windows): New section.
7980
7981 2006-07-12  Simon Josefsson  <jas@extundo.com>
7982
7983         * modules/gendocs (License): Fix license, approved by Karl.
7984
7985 2006-07-12  Eric Blake  <ebb9@byu.net>
7986
7987         * MODULES.html.sh: Add gendocs.
7988
7989 2006-07-11  Eric Blake  <ebb9@byu.net>
7990
7991         * modules/fdl: New module, to install doc/fdl.texi.
7992         * MODULES.html.sh: Add new section for documentation modules.
7993         * gnulib-tool: Avoid space-tab.
7994         (--doc-base): New option, to manage files from doc.
7995
7996 2006-07-11  Eric Blake  <ebb9@byu.net>
7997
7998         * m4/absolute-header.m4: Fix comments to match recent change.
7999
8000 2006-07-11  Eric Blake  <ebb9@byu.net>
8001
8002         * gnulib-tool: List --doc-base before --tests-base.
8003
8004 2006-07-11  Derek R. Price  <derek@ximbiot.com>
8005
8006         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
8007
8008 2006-07-11  Bruno Haible  <bruno@clisp.org>
8009
8010         * README: Mention where to put documentation.
8011
8012 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8013
8014         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
8015
8016 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
8017
8018         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
8019         to stdint.m4.
8020
8021 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
8022
8023         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
8024         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
8025         "no/such/file/stdint.h" when there is no such file, so that
8026         the resulting C code can be parsed by dodgy compilers.
8027         Problems reported by Bob Proulx.
8028
8029 2006-07-10  Derek R. Price  <derek@ximbiot.com>
8030
8031         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
8032         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
8033         macros into the GNU _D_EXACT_NAMLEN.
8034         * lib/savedir.c:  Likewise.
8035         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
8036
8037 2006-07-10  Derek R. Price  <derek@ximbiot.com>
8038         and Paul Eggert  <eggert@cs.ucla.edu>
8039
8040         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
8041         * m4/savedir.m4:
8042         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
8043         macros into the GNU _D_EXACT_NAMLEN.
8044
8045 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
8046
8047         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
8048         around the absolute name, to work around a problem with the HP-UX
8049         11.23 native C compiler, reported by Bob Proulx.
8050
8051 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
8052
8053         * doc/maintain.texi, make-stds.texi: Sync from
8054         <http://savannah.gnu.org/projects/gnustandards>.
8055
8056 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
8057
8058         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
8059
8060 2006-07-09  Jim Meyering  <jim@meyering.net>
8061
8062         * m4/glob.m4: Remove a doubled word in a comment.
8063
8064 2006-07-09  Jim Meyering  <jim@meyering.net>
8065
8066         * lib/argp-pv.c: Remove a doubled word in a comment.
8067         * lib/check-version.c (check_version): Likewise.
8068         * lib/javacomp.c (compile_java_class): Likewise.
8069
8070 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
8071
8072         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
8073         for the benefit of people using Autoconf 2.60.  If you want to
8074         support older Autoconf versions you can copy m4/onceonly_2_57.m4
8075         (or m4/onceonly.m4, if pre-2.57) manually.
8076
8077 2006-07-08  Jim Meyering  <jim@meyering.net>
8078
8079         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
8080         comment.
8081         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
8082         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
8083         comment.
8084
8085 2006-07-08  Jim Meyering  <jim@meyering.net>
8086
8087         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
8088
8089 2006-07-07  Simon Josefsson  <jas@extundo.com>
8090
8091         * tests/test-crc.c: Change expected crc value, the test vector
8092         were probably computed using the old broken crc.c?
8093
8094 2006-07-06  Simon Josefsson  <jas@extundo.com>
8095
8096         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
8097         now the canonical place for the M4 file).
8098
8099         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
8100         from the sys_socket dependency now.
8101
8102         * modules/inet_pton (Files): Ditto.
8103
8104         * modules/inet_ntop (Files): Ditto.
8105
8106 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
8107
8108         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
8109         not gl_PREREQ_GETUSERSHELL.
8110
8111 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8112
8113         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
8114         with only one argument, for Autoconf 2.60.
8115         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
8116         expand to nothing, so add a shell command to avoid syntax error.
8117         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
8118
8119 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8120
8121         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
8122
8123 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
8124
8125         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
8126         no longer needed.  Check for isblank decl.
8127         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
8128         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
8129         of existence.
8130
8131 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
8132
8133         * lib/getloadavg.c: Use __VMS, not VMS.
8134         * lib/getopt.c: Likewise.
8135         * lib/getpagesize.h: Likewise.
8136         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
8137         and probably does not work.
8138
8139 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
8140
8141         * lib/.cppi-disable: Add wcwidth.
8142         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
8143         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
8144         (ISGRAPH): Remove.  All uses changed to isgraph.
8145         (FOLD) [!defined _LIBC]: Remove special case.
8146         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
8147         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
8148         HAVE_ISBLANK.
8149         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
8150         case.
8151
8152 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
8153
8154         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
8155         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
8156         brackets.  Other minor changes to suppress some compiler
8157         warnings.
8158
8159 2006-07-06  Derek R. Price  <derek@ximbiot.com>
8160         and Paul Eggert  <eggert@cs.ucla.edu>
8161
8162         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
8163         of invoking obsolescent AC_HEADER_DIRENT macro.
8164         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
8165         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
8166         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
8167         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
8168         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
8169         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
8170         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
8171         * m4/readdir.m4: Remove; no longer needed.
8172
8173 2006-07-06  Derek R. Price  <derek@ximbiot.com>
8174         and Paul Eggert  <eggert@cs.ucla.edu>
8175
8176         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
8177         Don't worry about this obsolete case any more.
8178         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
8179         directories.
8180         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
8181         worry about this obsolete case any more.
8182         * lib/fts.c: Likewise.
8183         * lib/getcwd.c: Likewise.
8184         * lib/glob.h: Likewise.
8185         * lib/savedir.c: Likewise.
8186
8187 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
8188
8189         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
8190         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
8191         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
8192         needed.
8193         All uses removed.
8194         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
8195         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
8196         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
8197         needed.
8198         * m4/getdate.m4 (gl_GETDATE): Likewise.
8199         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
8200         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
8201         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
8202         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
8203         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
8204         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
8205         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
8206         needed.
8207
8208 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
8209
8210         * lib/memcasecmp.c: Include <limits.h>.
8211         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
8212         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
8213         Don't assume isdigit succeeds only on '0' through '9'.
8214
8215 2006-07-05  Eric Blake  <ebb9@byu.net>
8216
8217         * modules/getaddrinfo (Depends-on): Add snprintf.
8218
8219 2006-07-05  Eric Blake  <ebb9@byu.net>
8220
8221         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
8222         to avoid 'header present but could not be compiled' on cygwin.
8223
8224 2006-07-05  Eric Blake  <ebb9@byu.net>
8225
8226         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
8227         missing from netdb.h.
8228         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
8229
8230 2006-07-05  Derek R. Price  <derek@ximbiot.com>
8231
8232         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
8233         no longer needed.
8234         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
8235         * m4/getdate.m4 (gl_GETDATE): Likewise.
8236         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
8237         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
8238         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
8239         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
8240         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
8241
8242 2006-07-05  Derek R. Price  <derek@ximbiot.com>
8243
8244         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
8245         All uses of is_space replaced by isspace.
8246         * lib/exit.h: Don't talk about STDC_HEADERS.
8247         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
8248         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
8249         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
8250         replaced by isprint etc.
8251         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
8252         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
8253         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
8254         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
8255         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
8256         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
8257
8258 2006-07-05  Bruno Haible  <bruno@clisp.org>
8259
8260         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
8261         the function exists, before testing against AIX.
8262         Reported by Martin Lambers <marlam@marlam.de>.
8263
8264 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
8265
8266         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
8267         From Mark D. Baushke.
8268
8269 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
8270
8271         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
8272         to the absolute name, not just one, to bypass Sun C 5.8's
8273         "warning: #include of /usr/include/... may be non-portable".
8274
8275 2006-07-04  Eric Blake  <ebb9@byu.net>
8276
8277         * modules/dirname-tests: New test module.
8278         * tests/test-dirname.c: New file, replacing dirname.c
8279         TEST_DIRNAME section that was recently deleted.
8280
8281 2006-07-04  Bruno Haible  <bruno@clisp.org>
8282
8283         Assume ANSI C header files and <ctype.h> functions.
8284         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
8285         (mbsnwidth): Use isprint, iscntrl instead.
8286
8287 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8288
8289         Merge from coreutils.
8290         * MODULES.html.sh: Add xstrtold.
8291         * modules/xstrtold: New file.
8292         * modules/cycle-check (Files): Add lib/same-inode.h.
8293         * modules/dirname (Files): Add m4/double-slash-root.m4.
8294         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
8295         * modules/mkdir-p (Files): Add lib/same-inode.h.
8296         * modules/same (Files): Add lib/same-inode.h.
8297
8298 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8299
8300         * m4/absolute-header.m4: Renamed from full-header-path.m4.
8301         This is to keep the terminology clean; POSIX talks about
8302         "absolute pathnames", not "full pathnames", but the GNU
8303         Coding Standards say to use "path" for something else;
8304         so use "absolute" to keep both sides happy.
8305         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
8306         Set gl_absolute_header, not gl_full_header_path.
8307         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
8308         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
8309         All uses changed.
8310
8311         Merge from coreutils.
8312
8313         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
8314
8315         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
8316         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
8317         want to require the building of c-strtod.o.
8318         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
8319         needs -lm directly.
8320         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
8321
8322         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
8323
8324         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
8325         --as-needed option if available.  Problem reported by Albert Chin in
8326         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
8327         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
8328         cc merely issues a bunch of annoying warnings for --as-needed
8329         (this problem was reported by Bob Proulx).  Also, try linking with
8330         -lm to detect a bug in binutils 2.16 (this problem was reported
8331         by Ralf Wildenhues).
8332
8333         2006-06-18  Jim Meyering  <jim@meyering.net>
8334
8335         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
8336         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
8337         macro.
8338         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
8339         also check for glibc-2.4's abort-inducing bug.
8340
8341         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
8342         Low-probability clean-up should be to use rmdir to get rid of
8343         the just-created directory, not unlink.
8344
8345         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
8346         configure fail, and request a bug report to inform us about it.
8347         Add a comment that, barring reports to the contrary, in 2007 we'll
8348         assume ftruncate is universally available.
8349
8350         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
8351
8352         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
8353
8354         2006-03-12  Jim Meyering  <jim@meyering.net>
8355
8356         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
8357         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
8358         * m4/same.m4 (gl_SAME): Likewise.
8359         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
8360
8361         2006-03-11  Eric Blake  <ebb9@byu.net>
8362
8363         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
8364         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
8365         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
8366         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
8367
8368 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8369
8370         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
8371         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
8372         reported by Mark D. Baushke, one in
8373         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
8374
8375         Merge from coreutils.
8376
8377         * lib/.cppi-disable: Add stdint_.h.
8378         * lib/.cvsignore: Add stdint.h.
8379
8380         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
8381
8382         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
8383         both double and long double versions.
8384         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
8385         * lib/xstrtold.c: New file.
8386         * lib/xstrtod.h (xstrtold): New decl.
8387
8388         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
8389
8390         * lib/filemode.c (setst): Remove.
8391         (strmode): Rewrite to avoid setst.  This makes the code shorter,
8392         (arguably) clearer, and the generated code is a bit smaller on my
8393         Debian GNU/Linux stable x86 host.
8394
8395         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
8396
8397         * lib/filemode.c: Include "filemode.h" first, to test the interface.
8398         Assume that filemode.h includes sys/types.h and sys/stat.h.
8399         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
8400         (ftypelet): Reorder to put common cases first, for efficiency.
8401         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
8402         to do 'M'.
8403         (strmode): Renamed from mode_string, and now stores 12 bytes instead
8404         of 10, for compatibility with FreeBSD.  All callers changed.
8405         (filemodestring): Now stores 12 bytes instead of 10, and sets file
8406         types that can't be deduced solely from st_mode.  First arg is now a
8407         const pointer.
8408         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
8409         (strmode): Renamed from mode_string.
8410         (filemodestring): New decl.
8411         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
8412         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
8413         needed.
8414         (S_ISPORT, S_ISWHT): New macros, if not already defined.
8415
8416         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
8417
8418         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
8419         fsusage.h now does that.  Include fsusage.h first, to test interface.
8420         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
8421         at most one method (the old code could have generated decls that
8422         didn't conform to C89, not that this was ever exercised).
8423         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
8424
8425         2006-03-19  Jim Meyering  <jim@meyering.net>
8426
8427         Work even in a chroot where d_ino values for entries in "/"
8428         don't match the stat.st_ino values for the same names.
8429         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
8430         number, iterate through all entries again, using lstat instead.
8431         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
8432         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
8433
8434         * lib/getcwd.c (__getcwd): Clarify a comment.
8435         Use memcpy in place of a call to strcpy.
8436
8437         2006-03-12  Jim Meyering  <jim@meyering.net>
8438
8439         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
8440         matches that of the current directory (which we're about to chdir ".."
8441         out of), then save the dev-ino of the parent, instead.
8442
8443         * lib/same-inode.h (SAME_INODE): New file/macro.
8444         * lib/chdir-safer.c (SAME_INODE): Remove definition.
8445         Include "same-inode.h", instead.
8446         * lib/same.c: Likewise.
8447         * lib/cycle-check.h: Include "same-inode.h".
8448         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
8449         * lib/cycle-check.c (SAME_INODE): Remove definition.
8450         * lib/root-dev-ino.h: Include "same-inode.h".
8451
8452         2006-03-11  Eric Blake  <ebb9@byu.net>
8453
8454         * lib/same.c (same_name): s/base_name/last_component/
8455         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
8456         * lib/filenamecat.c (file_name_concat): Likewise.
8457
8458         2006-03-11  Eric Blake  <ebb9@byu.net>,
8459                     Paul Eggert  <eggert@cs.ucla.edu>
8460
8461         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
8462         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
8463         drive prefix.
8464         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
8465         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
8466         (last_component): New method.
8467         * lib/dirname.c (dir_len): Determine when drive letters need a
8468         subsequent slash.  Preserve // when it is special.
8469         (dir_name): Don't append dot when drive letter is absolute.
8470         [TEST_DIRNAME]: Move into a full-blown gnulib test.
8471         * lib/basename.c (base_name): New semantics - malloc the result.
8472         Preserve // when it is special.  Preserve relative files that look
8473         like drive letters.
8474         (base_len): Preserve // when it is special.
8475         (last_component): New method, similar to old base_name semantics.
8476         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
8477         base_name.  Strip redundant slashes from ///.
8478
8479 2006-07-03  Jim Meyering  <jim@meyering.net>
8480
8481         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
8482         macro is used before the first cycle_check call.
8483
8484 2006-07-03  Eric Blake  <ebb9@byu.net>
8485
8486         * modules/dirname (Depends-on): Add xstrndup.
8487
8488 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
8489
8490         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
8491         test cases, so that config.log is a bit easier to follow.
8492
8493 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
8494
8495         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
8496         both are 64 bits, since this seems to be the tradition, and this
8497         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
8498         we ever run into a host that prefers long long to long in this
8499         case, we'll need another configure-time test.  Problem reported by
8500         Jim Meyering.
8501
8502 2006-07-02  Eric Blake  <ebb9@byu.net>
8503
8504         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
8505
8506 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
8507
8508         * modules/inttypes (Depends-on): No longer depends on stdint.
8509         * modules/stdint (Description): Say more about assumptions.
8510         Say that the fast types might differ.  Say macros are used.
8511         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
8512         (Makefile.am): Revise list of substituted symbols to match
8513         new stdint.m4.
8514         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
8515         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
8516         * tests/test-stdint.c (verify_same_types)
8517         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
8518         the code conforms to C99/C89.
8519         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
8520         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
8521
8522 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
8523
8524         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
8525         but fix a bug, by requiring at least 64 bits.
8526         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
8527         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
8528         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
8529         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
8530
8531         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
8532         changes.  Make 2.59 a prerequisite.  Check and substitute for
8533         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
8534         inttypes.h.  Do not use special include files; just use the
8535         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
8536         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
8537         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
8538         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
8539         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
8540         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
8541         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
8542         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
8543         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
8544         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
8545         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
8546         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
8547         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
8548         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
8549         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
8550         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
8551         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
8552         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
8553         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
8554         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
8555         WINT_MAX.  Check for C99 conformance more strictly, by detecting
8556         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
8557         not check for things that C99 does not require, e.g., int8_t.  If
8558         a test isn't needed unless <stdint.h> isn't working, and is
8559         unlikely to be needed for any other reason, then don't do it
8560         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
8561         size_t, since we assume C89 freestanding at least.  Do not check
8562         for sig_atomic_t, wchar_t, or wint_t, since the code now does
8563         the right thing even if the types are not defined.  Instead use:
8564         (gl_STDINT_TYPE_PROPERTIES): New macro.
8565         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
8566         testing whether <sys/types.h> clashes, as Autoconf does this for
8567         us now.  All uses removed.
8568         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
8569         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
8570         (gl_CHECK_TYPE_SAME):
8571         Remove; no longer needed.
8572         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
8573         exists, since we'll return 0 anyway in that case.
8574         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
8575
8576 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
8577
8578         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
8579         possible collision with system files.
8580         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
8581         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
8582         WCHAR_MIN and WCHAR_MAX in this case.
8583         (<stddef.h>): Do not include; no longer needed.
8584         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
8585         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
8586         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
8587         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
8588         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
8589         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
8590         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
8591         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
8592         !defined(__c99))]: Include in this case too, since it's harmless
8593         now.
8594         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
8595         dangerous to do so.
8596         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
8597         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
8598         (_STDINT_MIN, _STDINT_MAX): New macros.
8599         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
8600         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
8601         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
8602         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
8603         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
8604         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
8605         macros, not typedefs; this simplifies things quite a bit.
8606         Use long int for all types narrower than int64_t.
8607         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
8608         Define in terms of long long int or int64_t or long int,
8609         not int64_t or int32_t.  This saves some compile-time testing.
8610         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
8611         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
8612         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
8613         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
8614         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
8615         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
8616         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
8617         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
8618         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
8619         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
8620         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
8621         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
8622         undef any previous version and define our own version, for
8623         simplicity and consistency with the new macros for types.
8624         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
8625         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
8626         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
8627         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
8628         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
8629         @WINT_T_SUFFIX@ to keep things simple here.
8630         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
8631         Simplify by assuming typical 8/16/32/64 host, since we're
8632         already doing that elsewhere anyway.
8633         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
8634         and assume long long int is 64 bits if available.  This
8635         speeds up 'configure'.
8636
8637 2006-07-01  Eric Blake  <ebb9@byu.net>
8638
8639         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
8640         Reported by Andreas Buening.
8641
8642 2006-07-01  Eric Blake  <ebb9@byu.net>
8643
8644         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
8645
8646 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
8647
8648         * lib/getaddrinfo.c: fixed typo
8649
8650 2006-06-29  Jim Meyering  <jim@meyering.net>
8651
8652         * modules/strftime (Maintainer): Add my name, since with the
8653         FPRINTFTIME changes strftime.c has forked from glibc.
8654
8655 2006-06-29  Eric Blake  <ebb9@byu.net>
8656
8657         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
8658
8659 2006-06-29  Eric Blake  <ebb9@byu.net>
8660
8661         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
8662
8663 2006-06-29  Eric Blake  <ebb9@byu.net>
8664
8665         * lib/stat_.h: New file.
8666
8667 2006-06-29  Eric Blake  <ebb9@byu.net>
8668
8669         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
8670         unused static function.
8671
8672 2006-06-29  Eric Blake  <ebb9@byu.net>
8673
8674         * doc/functions.texi (Function Portability): Document missing lstat
8675         on mingw.
8676
8677 2006-06-29  Eric Blake  <ebb9@byu.net>
8678
8679         * MODULES.html.sh: Add sys_stat.
8680         * modules/sys_stat: New module.
8681         * modules/mkstemp (Depends-on): Add sys_stat.
8682
8683 2006-06-29  Derek R. Price  <derek@ximbiot.com>
8684
8685         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
8686
8687 2006-06-29  Derek R. Price  <derek@ximbiot.com>
8688
8689         * m4/c-bs-a.m4: Removed.
8690
8691 2006-06-29  Derek R. Price  <derek@ximbiot.com>
8692
8693         * lib/strftime.c: Assume strftime() exists.
8694
8695 2006-06-29  Derek Price  <derek@ximbiot.com>
8696
8697         * modules/c-bs-a: Removed - \a is C89.
8698         * MODULES.html.sh: Remove c-bs-a.
8699
8700 2006-06-29  Bruno Haible  <bruno@clisp.org>
8701
8702         * modules/wcwidth (License): Change to LGPL.
8703
8704 2006-06-28  Simon Josefsson  <jas@extundo.com>
8705
8706         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
8707         on _WIN32.
8708
8709         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
8710         getnameinfo.
8711
8712 2006-06-28  Simon Josefsson  <jas@extundo.com>
8713
8714         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
8715
8716 2006-06-28  Simon Josefsson  <jas@extundo.com>
8717
8718         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
8719         functions there.  It will succeed on Windows XP, but on Windows
8720         2000 and (presumably) earlier, it will fail, and use the internal
8721         re-implementation.
8722         (use_win32_p): New function.
8723         (getaddrinfo): Use strtoul on servname, to support numeric ports.
8724         Support AI_NUMERICSERV to disable getservbyname.
8725         (getnameinfo): New function, only supports
8726         NI_NUMERICHOST|NI_NUMERICSERV for now.
8727
8728         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
8729         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
8730         getnameinfo.
8731
8732 2006-06-28  Eric Blake  <ebb9@byu.net>
8733
8734         * modules/wcwidth: New file.
8735         * modules/mbchar (Depends-on): Add wcwidth.
8736         * modules/mbswidth (Depends-on): Add wcwidth.
8737         * MODULES.html.sh: Add wcwidth.
8738
8739 2006-06-28  Eric Blake  <ebb9@byu.net>
8740
8741         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
8742         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
8743
8744 2006-06-28  Eric Blake  <ebb9@byu.net>
8745
8746         * lib/xvasprintf.h: Fix comments.
8747
8748 2006-06-28  Eric Blake  <ebb9@byu.net>
8749
8750         * lib/mbchar.h (wcwidth): Include wcwidth.h.
8751         * lib/mbswidth.c (wcwidth): Move from here...
8752         * lib/wcwidth.h: ...to this new file.
8753
8754 2006-06-28  Derek R. Price  <derek@ximbiot.com>
8755
8756         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
8757
8758         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
8759         it's obsolete.
8760         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
8761
8762 2006-06-28  Derek R. Price  <derek@ximbiot.com>
8763
8764         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
8765         Autoconf 2.60 says this stuff was obsolete.
8766
8767 2006-06-28  Bruno Haible  <bruno@clisp.org>
8768
8769         * modules/wcwidth (Files): Add m4/wchar_t.m4.
8770
8771 2006-06-28  Bruno Haible  <bruno@clisp.org>
8772
8773         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
8774         gt_TYPE_WCHAR_T.
8775
8776 2006-06-28  Bruno Haible  <bruno@clisp.org>
8777
8778         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
8779         declaration for wcwidth.
8780         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
8781
8782 2006-06-28  Bruno Haible  <bruno@clisp.org>
8783
8784         * lib/mkdtemp.c [MINGW]: Include <io.h>.
8785         (mkdir): Define using _mkdir.
8786
8787 2006-06-28  Bruno Haible  <bruno@clisp.org>
8788
8789         * lib/getaddrinfo.h: Fix POSIX URL.
8790         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
8791         _WIN32.
8792         (use_win32_p): Make static.
8793         (getaddrinfo): Reject service name if it is empty or does not consist
8794         solely of decimal digits, or if its value is > 65535.
8795         (getnameinfo): Remove useless casts.
8796
8797 2006-06-27  Simon Josefsson  <jas@extundo.com>
8798
8799         * modules/sys_select: New file, suggested by Bruno Haible, Paul
8800         Eggert and Martin Lambers.
8801
8802 2006-06-27  Simon Josefsson  <jas@extundo.com>
8803
8804         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
8805         Eggert and Martin Lambers.
8806
8807 2006-06-27  Bruno Haible  <bruno@clisp.org>
8808
8809         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
8810         result to 0, not to empty.
8811         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
8812
8813 2006-06-27  Bruno Haible  <bruno@clisp.org>
8814
8815         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
8816
8817 2006-06-26  Simon Josefsson  <jas@extundo.com>
8818
8819         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
8820         present.
8821
8822 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
8823
8824         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
8825         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
8826         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
8827
8828 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
8829
8830         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
8831
8832 2006-06-26  Bruno Haible  <bruno@clisp.org>
8833
8834         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
8835
8836 2006-06-26  Bruno Haible  <bruno@clisp.org>
8837
8838         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
8839
8840 2006-06-26  Bruno Haible  <bruno@clisp.org>
8841
8842         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
8843         SGI C compiler in pre-C99 mode.
8844         Suggested by Mark D. Baushke and Larry Jones.
8845
8846 2006-06-26  Bruno Haible  <bruno@clisp.org>
8847
8848         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
8849         WCHAR_MAX.
8850         Reported by Mark D. Baushke and Larry Jones.
8851
8852 2006-06-26  Bruno Haible  <bruno@clisp.org>
8853
8854         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
8855         in pre-C99 mode.
8856         Suggested by Mark D. Baushke and Larry Jones.
8857
8858 2006-06-23  Simon Josefsson  <jas@extundo.com>
8859             Bruno Haible  <bruno@clisp.org>
8860
8861         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
8862         Emit mostlyclean-local rule.
8863         (func_emit_tests_Makefile_am): Likewise.
8864         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
8865
8866 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
8867
8868         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
8869
8870 2006-06-23  Bruno Haible  <bruno@clisp.org>
8871
8872         * tests/test-stdint.c: Update to match ISO C 99 Technical
8873         Corrigendum 1.
8874
8875 2006-06-23  Bruno Haible  <bruno@clisp.org>
8876
8877         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
8878
8879 2006-06-23  Bruno Haible  <bruno@clisp.org>
8880
8881         * lib/stdint_.h: Treat IRIX like OpenBSD.
8882
8883 2006-06-23  Bruno Haible  <bruno@clisp.org>
8884
8885         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
8886         ISO C 99 Technical Corrigendum 1.
8887
8888 2006-06-22  Simon Josefsson  <jas@extundo.com>
8889
8890         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
8891         MinGW.
8892
8893 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
8894
8895         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
8896         needed.  Some compiler complained about some of them.  Problem reported
8897         by Larry Jones in
8898         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
8899
8900 2006-06-21  Simon Josefsson  <jas@extundo.com>
8901
8902         * tests/test-getaddrinfo.c: New file.
8903
8904         * modules/getaddrinfo-tests: New file.
8905
8906         * MODULES.html.sh: Add inet_pton.
8907
8908         * modules/inet_pton: New file.
8909
8910 2006-06-21  Simon Josefsson  <jas@extundo.com>
8911
8912         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
8913         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
8914         of using the (limited) gnulib implementation on Windows XP.
8915
8916         * m4/inet_pton.m4: New file.
8917
8918 2006-06-21  Simon Josefsson  <jas@extundo.com>
8919
8920         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
8921         variable.
8922
8923         * lib/socket_.h: Don't define WINVER.
8924
8925         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
8926         slightly modified to work in gnulib.
8927
8928 2006-06-21  Simon Josefsson  <jas@extundo.com>
8929
8930         * doc/gnulib.texi (Windows sockets): Add.
8931
8932 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
8933
8934         * lib/read-file.c (fread_file): Start with buffer allocation of
8935         0 bytes rather than 1 byte; this simplifies the code.
8936         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
8937         code to free buffer and save/restore errno.
8938         (internal_read_file): Remove unused local.
8939
8940 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
8941
8942         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
8943         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
8944         Problem reported by Denis Excoffier in
8945         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
8946
8947 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8948
8949         * modules/sys_socket, modules/socklen: Include sys/types since
8950         FreeBSD 4.x's sys/socket.h needs it.
8951
8952 2006-06-19  Simon Josefsson  <jas@extundo.com>
8953
8954         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
8955
8956 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
8957
8958         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
8959
8960 2006-06-19  Bruno Haible  <bruno@clisp.org>
8961
8962         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
8963         and FULL_PATH_INTTYPES_H in angle brackets.
8964         Reported by Mark D. Baushke <mdb@gnu.org>.
8965
8966 2006-06-17  Eric Blake  <ebb9@byu.net>
8967
8968         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
8969         errno.
8970
8971 2006-06-17  Bruno Haible  <bruno@clisp.org>
8972
8973         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
8974         <sys/inttypes.h>.
8975
8976 2006-06-17  Bruno Haible  <bruno@clisp.org>
8977
8978         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
8979         whether errno is declared. Assume <errno.h> declares errno.
8980
8981 2006-06-17  Bruno Haible  <bruno@clisp.org>
8982
8983         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
8984
8985 2006-06-17  Bruno Haible  <bruno@clisp.org>
8986
8987         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
8988         problem on Solaris 2.5.1.
8989
8990 2006-06-16  Eric Blake  <ebb9@byu.net>
8991
8992         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
8993         * lib/unicodeio.c [!defined errno]: Likewise.
8994         * lib/strtol.c [!defined errno]: Likewise.
8995         * lib/strtod.c [!defined errno]: Likewise.
8996
8997 2006-06-15  Eric Blake  <ebb9@byu.net>
8998
8999         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
9000
9001 2006-06-15  Eric Blake  <ebb9@byu.net>
9002
9003         * config/srclist.txt (ssize_t.m4): Lose sync.
9004
9005 2006-06-15  Bruno Haible  <bruno@clisp.org>
9006
9007         * modules/stdint (Files): Include m4/full-header-path.m4,
9008         m4/size_max.m4, m4/wchar_t.m4.
9009         (Makefile.am): Many more substitutions.
9010         * modules/stdint-tests: New file.
9011         * tests/test-stdint.c: New file.
9012
9013 2006-06-15  Bruno Haible  <bruno@clisp.org>
9014
9015         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
9016         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
9017         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
9018         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
9019         gl_CHECK_TYPE_SAME): New macros.
9020
9021 2006-06-15  Bruno Haible  <bruno@clisp.org>
9022
9023         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
9024
9025 2006-06-15  Bruno Haible  <bruno@clisp.org>
9026
9027         * lib/stdint_.h: Rewritten to be fully auto-configured.
9028         Fixes bug on HP-UX/IA64.
9029
9030 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
9031
9032         * lib/getdate.y (__attribute__): Don't define if already defined.
9033         Problem reported by Larry Jones.
9034         * lib/utimens.c (__attribute__): Likewise.
9035
9036 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
9037
9038         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
9039         reported by Andreas Schwab.
9040
9041 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9042             Bruno Haible  <bruno@clisp.org>
9043
9044         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
9045         check for the declaration of strnlen and a run test that exposes the
9046         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
9047         rpl_strndup.
9048
9049 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9050             Bruno Haible  <bruno@clisp.org>
9051
9052         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
9053
9054 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9055
9056         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
9057         compile test, for Tru64 4.0D.
9058
9059 2006-05-28  Karl Berry  <karl@gnu.org>
9060
9061         * config/srclist.txt (printf-args.c): lose sync.
9062
9063 2006-05-26  Martin Lambers  <marlam@marlam.de>
9064
9065         * lib/getpass.c: Updates the test for the native W32 API, and adds
9066         missing includes, thus fixing compilation warnings.
9067
9068 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
9069
9070         * lib/exclude.c (exclude_fnmatch): New function.
9071         (excluded_file_name): Call exclude_fnmatch.
9072         * lib/exclude.h (excluded_file_name): New prototype
9073
9074 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
9075
9076         * lib/tempname.c (small_open, large_open): New macros.
9077         (__open, __open64) [!_LIBC]: Remove.
9078         (__gen_tempname): Use small_open and large_open instead of __open
9079         and __open64.  This fixes a portability bug on HP-UX 11.11i
9080         reported by Simon Wing-Tang in
9081         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
9082
9083 2006-05-24  Bruno Haible  <bruno@clisp.org>
9084
9085         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
9086         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
9087         Reported by Thorsten Maerz <torte@netztorte.de> via
9088         Aaron Stone <aaron@serendipity.cx>.
9089
9090 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
9091
9092         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
9093         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
9094         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
9095         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
9096         not really conditional on the cache.
9097         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
9098
9099 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
9100
9101         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
9102         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
9103         (my_usleep): Don't mishandle maximum value.
9104
9105 2006-05-19  Jim Meyering  <jim@meyering.net>
9106
9107         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
9108
9109 2006-05-17  Bruno Haible  <bruno@clisp.org>
9110
9111         Cygwin portability.
9112         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
9113
9114 2006-05-17  Bruno Haible  <bruno@clisp.org>
9115
9116         * lib/stdint_.h: Fix recognition of Cygwin.
9117
9118 2006-05-15  Bruno Haible  <bruno@clisp.org>
9119
9120         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
9121         on libtool patch by Ralf Wildenhues.
9122
9123 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
9124
9125         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
9126         test for C99 conformance; (bool) 0.5 is an integer constant
9127         expression, but (bool) -0.5 is not.  Problem reported by Fedor
9128         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
9129
9130 2006-05-11  Simon Josefsson  <jas@extundo.com>
9131
9132         * m4/xvasprintf.m4: Fix obvious typo.
9133
9134 2006-05-11  Jim Meyering  <jim@meyering.net>
9135
9136         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
9137         James Lemley.
9138
9139 2006-05-10  Simon Josefsson  <jas@extundo.com>
9140
9141         * lib/md4.c: Typo fix, update copyright years.
9142         (K1, K2): Don't use L because it turn computations into 64-bit on
9143         64-bit platforms.
9144
9145 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
9146
9147         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
9148         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
9149         unwanted sign propagation, e.g., on hosts with 64-bit int.
9150         There still are some problems with reeelly weird theoretical hosts
9151         (e.g., 33-bit int) but it's not worth worrying about now.
9152         * lib/sha1.c (rol): Likewise.
9153         (K1, K2, K3, K4): Remove unnecessary L suffix.
9154
9155 2006-05-10  Bruno Haible  <bruno@clisp.org>
9156
9157         * lib/des.c: Cast to avoid warnings.
9158
9159 2006-05-09  Bruno Haible  <bruno@clisp.org>
9160
9161         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
9162         (Depends-on): Depend also on xsize, stdarg.
9163         (configure.ac): Add gl_XVASPRINTF.
9164
9165 2006-05-09  Bruno Haible  <bruno@clisp.org>
9166
9167         * m4/xvasprintf.m4: New file.
9168
9169 2006-05-09  Bruno Haible  <bruno@clisp.org>
9170
9171         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
9172         (EOVERFLOW): Define fallback value.
9173         (xstrcat): New function.
9174         (xvasprintf): Recognize the special case of a string concatenation.
9175
9176 2006-05-08  Eric Blake  <ebb9@byu.net>
9177
9178         * gnulib-tool (func_version): Base copyright year on CVS date.
9179         (func_emit_copyright_notice): New function.
9180         (func_emit_lib_Makefile_am): Use it.
9181         (func_emit_tests_Makefile_am): Likewise.
9182         (func_import): Likewise.
9183
9184 2006-05-08  Bruno Haible  <bruno@clisp.org>
9185
9186         * modules/stdarg: New file.
9187         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
9188
9189 2006-05-08  Bruno Haible  <bruno@clisp.org>
9190
9191         * m4/stdarg.m4: New file, from GNU gettext.
9192
9193 2006-05-08  Bruno Haible  <bruno@clisp.org>
9194
9195         * config/srclist.txt (build-aux/config.rpath): different from latest
9196         release.
9197
9198 2006-05-08  Bruno Haible  <bruno@clisp.org>
9199
9200         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
9201
9202 2006-05-05  Jim Meyering  <jim@meyering.net>
9203
9204         * m4/warning.m4: New file, derived from bison's file by the same name.
9205
9206 2006-05-03  Bruno Haible  <bruno@clisp.org>
9207
9208         * lib/stdint_.h: Shorter URL.
9209         * lib/inttypes.h: Likewise.
9210
9211 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
9212
9213         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
9214
9215 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
9216
9217         * lib/verify.h: Document the internals better.  Most of this change
9218         was written by Bruno Haible.
9219
9220 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
9221
9222         * doc/verify.texi: New file, partly based on a proposal by
9223         Bruno Haible.
9224
9225 2006-05-02  Bruno Haible  <bruno@clisp.org>
9226
9227         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
9228         test from here...
9229         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
9230
9231 2006-04-29  Bruno Haible  <bruno@clisp.org>
9232
9233         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
9234         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
9235
9236 2006-04-29  Bruno Haible  <bruno@clisp.org>
9237
9238         * gnulib-tool: Make --update option actually work.
9239
9240 2006-04-29  Bruno Haible  <bruno@clisp.org>
9241
9242         * doc/gcd.texi: New file.
9243         * doc/gnulib.texi: Include it.
9244
9245 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
9246
9247         * lib/getdate.y (get_date): When adding relative date, start with the
9248         initial time, not with the result of the first mktime call.
9249
9250 2006-04-25  Bruno Haible  <bruno@clisp.org>
9251
9252         * gnulib-tool (func_import): Output the include directives in three
9253         blocks, sorted separately.
9254         Reported by Ben Pfaff <blp@cs.stanford.edu>.
9255
9256 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
9257
9258         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
9259         to define main with arguments, for C++.  Reported by Eric Blake.
9260         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
9261         Prefer 'int main ()' to 'int main (void)', for C++.
9262         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
9263         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
9264         for 'main', for C99 and C++.
9265
9266 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
9267
9268         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
9269         Don't assume that exit status -1 is valid.
9270         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
9271         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
9272         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
9273         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
9274         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
9275         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
9276         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
9277         functions can be used without declaring them, or that you can
9278         exit with status -1.
9279         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
9280
9281 2006-04-24  Karl Berry  <karl@gnu.org>
9282
9283         * config/srclist.txt (longdouble.m4): sync lost.
9284
9285 2006-04-24  Eric Blake  <ebb9@byu.net>
9286
9287         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
9288
9289 2006-04-24  Bruno Haible  <bruno@clisp.org>
9290
9291         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
9292         poll() implementation in AIX.
9293         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9294
9295 2006-04-24  Bruno Haible  <bruno@clisp.org>
9296
9297         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
9298         assigned exactly once.
9299
9300 2006-04-23  Claudio Fontana  <claudio@gnu.org>
9301             Bruno Haible  <bruno@clisp.org>
9302
9303         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
9304         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
9305         for AM_CPPFLAGS.
9306
9307 2006-04-23  Bruno Haible  <bruno@clisp.org>
9308
9309         * modules/copy-file: Depend on unistd.
9310         * modules/execute: Likewise.
9311         * modules/fatal-signal: Likewise.
9312         * modules/findprog: Likewise.
9313         * modules/mkdtemp : Likewise.
9314         * modules/pipe: Likewise.
9315         * modules/wait-process: Likewise.
9316
9317 2006-04-23  Bruno Haible  <bruno@clisp.org>
9318
9319         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
9320         condition was already detected.
9321         Reported by Ben Pfaff <blp@cs.stanford.edu>.
9322
9323 2006-04-23  Bruno Haible  <bruno@clisp.org>
9324
9325         * lib/copy-file.c: Include <unistd.h> unconditionally.
9326         * lib/execute.c: Likewise.
9327         * lib/fatal-signal.c: Likewise.
9328         * lib/findprog.c: Likewise.
9329         * lib/mkdtemp.c: Likewise.
9330         * lib/pipe.h: Likewise.
9331         * lib/pipe.c: Likewise.
9332         * lib/wait-process.h: Likewise.
9333
9334 2006-04-23  Bruno Haible  <bruno@clisp.org>
9335
9336         * gnulib-tool (func_usage): Fix --import description. Document
9337         --update.
9338         (func_import): Create temporary file in a temporary directory, if
9339         --dry-run is specified. Silence errors from 'grep' when there are no
9340         m4 files in $m4dir.
9341         (func_create_testdir): Silence errors from 'grep' when there are no
9342         m4 files in $m4dir.
9343         Reported by Karl Berry <karl@freefriends.org>.
9344
9345 2006-04-20  Bruno Haible  <bruno@clisp.org>
9346
9347         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
9348         one argument, so that the code will be portable to Autoconf 2.60.
9349         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
9350         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
9351         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
9352
9353 2006-04-19  Derek Price  <derek@ximbiot.com>
9354             Eric Blake  <ebb9@byu.net>
9355
9356         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
9357         rather than "/full/path.h".  Update comment to match.  Shorten &
9358         generalize m4_translit call via AS_TR_CPP.
9359
9360 2006-04-19  Derek Price  <derek@ximbiot.com>
9361             Eric Blake  <ebb9@byu.net>
9362
9363         * lib/inttypes.h: Correct grammar in comment.
9364
9365 2006-04-18  Derek Price  <derek@ximbiot.com>
9366             Paul Eggert  <eggert@cs.ucla.edu>
9367
9368         * modules/inttypes: New file.
9369         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
9370
9371 2006-04-18  Derek Price  <derek@ximbiot.com>
9372             Paul Eggert  <eggert@cs.ucla.edu>
9373
9374         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
9375         New files.
9376
9377 2006-04-18  Derek Price  <derek@ximbiot.com>
9378             Paul Eggert  <eggert@cs.ucla.edu>
9379
9380         * lib/inttypes.h: New file.
9381         * lib/strtoimax.c: Assume <inttypes.h>.
9382
9383 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
9384
9385         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
9386         isn't mounted.  Problem reported by Kir Kolyshkin.
9387
9388 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
9389
9390         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
9391         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
9392         Derek R. Price.
9393         * lib/regex.h (RE_DUP_MAX): Update comment to match current
9394         implementation.
9395
9396 2006-04-12  Eric Blake  <ebb9@byu.net>
9397
9398         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
9399         is now done automatically by the corresponding Autoconf macro.
9400
9401 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
9402
9403         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
9404         time_r.h.
9405
9406 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9407
9408         Merge regex changes from libc, removing some of our
9409         POSIX-conformance changes that were rejected and redoing them in a
9410         less-intrusive way.
9411
9412         * lib/regcomp.c (re_compile_internal, init_dfa):
9413         Length arg is now size_t, not Idx.  All uses changed.
9414         (peek_token): Forward decl now says internal_function.
9415         (__re_error_msgid, __re_error_msgid_idx):
9416         Now static rather than extern with attribute_hidden.
9417         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
9418         For some reason libc prefers K&R style defns for external functions.
9419         (regerror) [!defined _LIBC]: Likewise.
9420         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
9421         (seek_collating_symbol_entry, lookup_collation_sequence_value):
9422         (build_range_exp, build_collating_symbol):
9423         Use K&R-style defn.
9424         (re_compile_fastmap): Use '\0' to memset, not 0.
9425         (utf8_sb_map): Make the calculations more obvious.
9426         (init_dfa, parse_bracket_exp, build_charclass_op):
9427         Call calloc and cast result, as glibc does.
9428         (init_word_char, fetch_token, peek_token, peek_token_bracket):
9429         (build_range_exp, build_collating_symbol):
9430         Now internal functions.
9431
9432         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
9433
9434         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
9435         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
9436         Don't depend on VMS; depend on __VMS instead, for POSIX
9437         namespace cleanness.
9438         (regoff_t): Define to ssize_t, not long int.
9439
9440         Remove the REG_ macros named below.  Instead, make the old names
9441         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
9442         __USE_GNU_REGEX.
9443         (REG_BACKSLASH_ESCAPE_IN_LISTS):
9444         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
9445         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
9446         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
9447         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
9448         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
9449         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
9450         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
9451         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
9452         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
9453         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
9454         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
9455         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
9456         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
9457         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
9458         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
9459         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
9460         (REG_NREGS):
9461         Remove.  All uses replaced by the old RE_* names.
9462         (RE_BACKSLASH_ESCAPE_IN_LISTS):
9463         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
9464         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
9465         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
9466         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
9467         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
9468         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
9469         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
9470         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
9471         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
9472         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
9473         Don't bother having these macros be independent of each others'
9474         values, since they no longer exist in the POSIX name space.
9475
9476         Rename the following member names back to their old names,
9477         unless !__USE_GNU_REGEX.  All uses changed back.
9478         (buffer): Renamed from re_buffer.
9479         (allocated): Renamed from re_allocated.
9480         (used): Renamed from re_used.
9481         (syntax): Renamed from re_syntax.
9482         (fastmap): Renamed from re_fastmap.
9483         (translate): Renamed from re_translate.
9484         (can_be_null): Renamed from re_can_be_null.
9485         (regs_allocated): Renamed from re_regs_allocated.
9486         (fastmap_accurate): Renamed from re_fastmap_accurate.
9487         (no_sub): Renamed from re_no_sub.
9488         (not_bol): Renamed from re_not_bol.
9489         (not_eol): Renamed from re_not_eol.
9490         (newline_anchor): Renamed from re_newline_anchor.
9491         (num_regs): Renamed from rm_num_regs.
9492         (start): Renamed from rm_start.
9493         (end): Renamed from rm_end.
9494
9495         (free_state): Move up a bit.
9496
9497         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
9498         #define to be empty.
9499         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
9500         when that is what is intended.
9501         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
9502         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
9503         (MAX): New macro.
9504         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
9505         All uses changed back to re_malloc, etc.  It's now the caller's
9506         responsibility to check for overflow; all callers changed.
9507         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
9508         (re_x2nrealloc): Remove.
9509         (free_state): Remove decl.
9510
9511         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
9512         (re_set_registers, re_exec):
9513         Use K&R-style defn.
9514
9515         2006-01-31  Roland McGrath  <roland@redhat.com>
9516
9517         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
9518         Reported by Mike Frysinger <vapier@gentoo.org>.
9519
9520         2006-01-15  Andreas Jaeger  <aj@suse.de>
9521
9522         [BZ #1950]
9523         * lib/regex_internal.c (re_string_reconstruct): Adjust for
9524         build_wcs_upper_buffer change.
9525         (build_wcs_upper_buffer): Change return type.
9526
9527         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
9528
9529         * lib/regex_internal.h: Include <stdint.h> if available.
9530
9531         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
9532
9533         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
9534
9535         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
9536
9537         * lib/regcomp.c: Adjust for changed secondary hash function.
9538
9539         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
9540
9541         * lib/regex.h: Pretty printing.
9542         Clean up namespace a bit.
9543
9544         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
9545
9546         * lib/regexec.c (update_cur_sifted_state, check_arrival,
9547         check_arrival_add_next_nodes): Avoid using uninitialized variable.
9548
9549         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
9550                     Ulrich Drepper  <drepper@redhat.com>
9551
9552         [BZ #1302]
9553         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
9554         changed.
9555         (bitset_word_t): Renamed from bitset_word.  All uses changed.
9556
9557         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
9558
9559         [BZ #281]
9560         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
9561         * lib/regcomp.c: Remove unnecessary uses of
9562         unsigned RE_TRANSLATE_TYPE.
9563         * lib/regex_internal.h: Likewise.
9564         * lib/regex_internal.c: Likewise.
9565         * lib/regexec.c: Likewise.
9566         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
9567
9568         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
9569
9570         * lib/regexec.c (find_recover_state): Remove unnecessary
9571         initialization.
9572         (transit_state_bkref): Make DFA a const pointer.
9573         (get_subexp): Likewise.
9574         (check_arrival): Likewise.
9575         (update_cur_sifted_state): Likewise.
9576         (re_search_internal): Likewise.
9577         (prune_impossible_nodes): Likewise.
9578         (acquire_init_state_context): Likewise.
9579         (proceed_next_node): Likewise.
9580         (set_regs): Likewise.
9581         (free_fail_stack_return): Likewise.
9582         (check_arrival_expand_ecl): Mark DFA parameter as const.
9583         (check_arrival_expand_ecl_sub): Likewise.
9584         (check_subexp_limits): Likewise.
9585         (sub_epsilon_src_nodes):  Likewise.
9586         (add_epsilon_src_nodes):  Likewise.
9587         (merge_state_array): Likewise.
9588         (update_regs): Likewise.
9589         (build_trtable): Likewise.
9590         (sift_states_backward): Mark MCTX parameter as const.
9591         (build_sifted_states): Likewise.
9592         (update_cur_sifted_state): Likewise.
9593         (sift_states_mkref): Likewise.
9594         (check_arrival_expand_ecl): Mark eclosure as const.
9595         (check_dst_limits_calc_pos_1): Likewise.
9596         * lib/regex_internal.h (re_match_context_t): Make dfa a const
9597         pointer.
9598
9599         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
9600
9601         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
9602         (transit_state_sb): Likewise.
9603         (transit_state_mb): Likewise.
9604         (sift_states_iter_mb): Likewise.
9605         (check_arrival_add_next_nodes): Likewise.
9606         (check_node_accept_bytes): Change first parameter to pointer-to-const.
9607         [_LIBC] (re_search_2_stub): Use mempcpy.
9608
9609         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
9610         mbrtowc for very simple UTF-8 case.
9611
9612         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
9613         a pointer-to-const.
9614         (re_acquire_state_context): Likewise.
9615         * lib/regex_internal.h: Adjust prototypes.
9616
9617         * lib/regex.c: Prevent using C++ compilers.
9618
9619         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
9620         (re_acquire_state_context): Likewise.
9621
9622 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9623
9624         * modules/regex (Depends-on): Add ssize_t.
9625
9626 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9627
9628         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
9629         translation table.
9630
9631 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9632
9633         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
9634
9635 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
9636             Bruno Haible  <bruno@clisp.org>
9637
9638         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
9639         <sys/types.h> and <inttypes.h>.
9640
9641 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9642
9643         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
9644         `__error_t_defined', so argp.h will not typedef the former.
9645
9646 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
9647
9648         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
9649         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
9650         glibc names.  Even if glibc is changed to conform to POSIX, the
9651         traditional names will be available anyway, since regex depends on
9652         the extensions module.  Also, fix a longstanding typo in the
9653         implementation of Spencer ERE test #75 from grep 2.3.  Problems
9654         reported by Emanuele Giaquinta.  Also, change sense of cached
9655         variable, so that the message makes sense.
9656
9657 2006-03-24  Simon Josefsson  <jas@extundo.com>
9658
9659         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
9660         including some doc fixes.
9661         (base64_encode_alloc): Fix +1 bug on allocation failures.
9662
9663 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9664
9665         * lib/base64.c (base64_encode): Do not read past end of array with
9666         unsanitized input on systems with CHAR_BIT > 8.
9667
9668 2006-03-24  Eric Blake  <ebb9@byu.net>
9669
9670         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
9671
9672 2006-03-22  Karl Berry  <karl@gnu.org>
9673
9674         * config/srclist.txt (*setenv.[ch]): get from coreutils.
9675         * config/srclistvars.sh (COREUTILS): new var.
9676
9677 2006-03-17  Jim Meyering  <jim@meyering.net>
9678
9679         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
9680         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
9681
9682 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
9683
9684         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
9685         no longer needs it.  Instead, check that regoff_t is as least
9686         as wide as ptrdiff_t.
9687
9688         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
9689         so that our regex.h stays compatible with the installed regex.
9690         This is helpful for installers who configure --without-included-regex.
9691         Problem reported by Emanuele Giaquinta.
9692
9693 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
9694
9695         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
9696         Typedef to long int, not to off_, as POSIX will likely change
9697         in that direction.
9698
9699 2006-03-15  Eric Blake  <ebb9@byu.net>
9700
9701         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
9702
9703 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
9704
9705         * lib/argp-help.c (validate_uparams): Fix typo
9706         * lib/argp-parse.c (argp_default_options): Consistently begin help
9707         messages with a lowercase letter.
9708
9709 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
9710
9711         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
9712         overrun buffers and shouldn't be used (much as gets shouldn't be
9713         used).
9714         * lib/time_r.c (asctime_r, ctime_r): Likewise.
9715
9716 2006-03-08  Simon Josefsson  <jas@extundo.com>
9717
9718         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
9719         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9720
9721 2006-03-08  Simon Josefsson  <jas@extundo.com>
9722
9723         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
9724         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9725
9726 2006-03-08  Simon Josefsson  <jas@extundo.com>
9727
9728         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
9729         signal that configure disabled the device.
9730
9731 2006-03-08  Simon Josefsson  <jas@extundo.com>
9732
9733         * build-aux/maint.mk: Fix refresh-po, to handle no translated
9734         languages.
9735
9736 2006-03-07  Simon Josefsson  <jas@extundo.com>
9737
9738         * modules/getopt (Depends-on): Add unistd.
9739
9740         * modules/unistd: New file.
9741
9742 2006-03-07  Simon Josefsson  <jas@extundo.com>
9743
9744         * modules/gc-random: New file.
9745
9746 2006-03-07  Simon Josefsson  <jas@extundo.com>
9747
9748         * m4/unistd_h.m4: New file.
9749
9750 2006-03-07  Simon Josefsson  <jas@extundo.com>
9751
9752         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
9753         test to be side-effect free by storing the result in the cache
9754         variable gl_cv_lib_readline, and moving the assignment of
9755         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
9756         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9757
9758 2006-03-07  Simon Josefsson  <jas@extundo.com>
9759
9760         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
9761         error on missing devices (the functions will return an error).
9762
9763         * m4/gc.m4: Move random stuff to gc-random.m4
9764
9765 2006-03-07  Simon Josefsson  <jas@extundo.com>
9766
9767         * lib/unistd_.h: New file.
9768
9769 2006-03-07  Simon Josefsson  <jas@extundo.com>
9770
9771         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
9772
9773 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9774
9775         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
9776         Problem reported by Juan Manuel Guerrero.
9777
9778 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9779
9780         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
9781         the unistd module.
9782         * lib/getlogin_r.c: Likewise.
9783         * lib/getlogin_r.h: Likewise.
9784         * lib/glob.c: Likewise.
9785         * lib/pagealign_alloc.c: Likewise.
9786         * lib/unistd_.h: Remove; no longer needed.
9787
9788 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9789
9790         * MODULES.html.sh (Support for systems lacking POSIX:2001):
9791         Add unistd.
9792         * modules/c-stack (Depends-on): Add unistd.
9793         * modules/getlogin_r: Likewise.
9794         * modules/glob: Likewise.
9795         * modules/pagealign_alloc: Likewise.
9796         * modules/unistd (Files): Remove lib/unistd_.h.
9797         (EXTRA_DIST): Remove.
9798         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
9799         need unistd_.h.
9800         (MOSTLYCLEANFILES): Remove unistd.h-t.
9801
9802 2006-03-03  Simon Josefsson  <jas@extundo.com>
9803
9804         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
9805
9806 2006-03-03  Simon Josefsson  <jas@extundo.com>
9807
9808         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
9809         libidn and bison.
9810
9811 2006-03-03  Simon Josefsson  <jas@extundo.com>
9812
9813         * build-aux/maint.mk: Add indent target.
9814
9815 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
9816
9817         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
9818         our replacement poll.h in any case, to avoid a differing
9819         declaration from a system header.  Seen on AIX.
9820
9821 2006-03-01  Simon Josefsson  <jas@extundo.com>
9822
9823         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
9824         <kasal@ucw.cz>.
9825
9826 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
9827
9828         * modules/gettime (Depends-on): Add extensions module.
9829         * modules/nanosleep (Depends-on): Likewise.
9830         * modules/settime (Depends-on): Likewise.
9831
9832 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
9833
9834         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
9835         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
9836         pedantically.
9837         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
9838         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
9839
9840         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
9841         not "==".  Reported by Ralf Wildenhues.
9842
9843 2006-03-01  Karl Berry  <karl@gnu.org>
9844
9845         * doc/Copyright/request-*: new files, synced from gnuorg.
9846
9847 2006-03-01  Karl Berry  <karl@gnu.org>
9848
9849         * config/srclist.txt (Copyright/*): new entries.
9850
9851 2006-02-28  Simon Josefsson  <jas@extundo.com>
9852
9853         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
9854
9855 2006-02-27  Simon Josefsson  <jas@extundo.com>
9856
9857         * lib/base64.h: Indent #define's.  From Jim Meyering
9858         <jim@meyering.net>.
9859
9860 2006-02-27  Jim Meyering  <jim@meyering.net>
9861
9862         Revert the change of 2006-02-24, so these files can continue
9863         to be sync'd from gettext.
9864         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
9865         of `config.h'.
9866
9867 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
9868
9869         * modules/intprops: New file.
9870         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
9871         Add intprops.
9872         * modules/getloadavg (Files): Remove lib/intprops.h.
9873         (Depends-on): Add intprops.
9874         * modules/human: Likewise.
9875         * modules/inttostr: Likewise.
9876         * modules/openat: Likewise.
9877         * modules/sig2str: Likewise.
9878         * modules/userspec: Likewise.
9879         * modules/utimecmp: Likewise.
9880         * modules/xnanosleep: Likewise.
9881         * modules/xstrtol: Likewise.
9882
9883 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
9884
9885         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
9886         * modules/lock-tests (TESTS): Use $(EXEEXT).
9887         * modules/tls-tests: Likewise.
9888         * modules/argp-tests: Likewise.
9889         (check_PROGRAMS): New var, replacing...
9890         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
9891
9892 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9893
9894         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
9895         `config.h'.
9896
9897 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
9898
9899         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
9900
9901 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9902
9903         Sync from coreutils.
9904         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
9905         gl_CHDIR_SAFER.
9906
9907 2006-02-22  Jim Meyering  <jim@meyering.net>
9908
9909         Sync from coreutils.
9910         * m4/chdir-safer.m4: New file.
9911
9912 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
9913
9914         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
9915         AT_FDCWD exceeds INT_MAX.
9916         * lib/openat.h (AT_FDCWD): Likewise.
9917
9918 2006-02-17  Eric Blake  <address@hidden>
9919
9920         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
9921
9922 2006-02-16  Simon Josefsson  <jas@extundo.com>
9923
9924         * modules/getaddrinfo (Depends-on): Add sys_socket.
9925
9926 2006-02-15  Simon Josefsson  <jas@extundo.com>
9927
9928         * build-aux/maint.mk: Add dsyntax-check rule.
9929
9930 2006-02-15  Eric Blake  <ebb9@byu.net>
9931
9932         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
9933         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
9934         'present but cannot compile' warnings on cygwin.
9935         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
9936         use ws2tcpip.h if sys/socket.h works.
9937         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
9938         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
9939
9940 2006-02-14  Simon Josefsson  <jas@extundo.com>
9941
9942         * modules/maintainer-makefile (Files): Rename.
9943
9944         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
9945         and (the local) Makefile.cfg to maint-cfg.mk.
9946
9947         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
9948         to the latter.
9949
9950         * modules/maintainer-makefile: New module.
9951
9952         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
9953         severaly stripped to make it possible to build it up from scratch
9954         with reliable tests.
9955
9956         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
9957         fixes to permit overriding the default actions when configure and
9958         makefile are not available.
9959
9960 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
9961
9962         Sync from coreutils.
9963         * modules/lstat (Depends-on): Don't depend on xalloc.
9964         (License): Change from GPL to LGPL, since this is now simply a
9965         replacement for a libc function.
9966
9967 2006-02-14  Jim Meyering  <jim@meyering.net>
9968
9969         Sync from coreutils.
9970
9971         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
9972         failure on deficient systems, and simplify gnulib lgpl dependencies.
9973         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
9974         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
9975
9976         * lib/xalloc-die.c: Remove unused definition of N_.
9977
9978 2006-02-14  Jim Meyering  <jim@meyering.net>
9979
9980         Sync from coreutils.
9981         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
9982         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
9983         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
9984         double-quote uses of that variable, to accommodate the rare case in
9985         which getmntent is available in none of the libraries checked.  This
9986         happens at least on FreeBSD 5.0.
9987
9988 2006-02-13  Simon Josefsson  <jas@extundo.com>
9989
9990         * gnulib-tool (Usage): Fix --import, from
9991         karl@freefriends.org (Karl Berry).
9992
9993 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
9994
9995         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
9996
9997 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
9998
9999         * lib/argp-namefrob.h: Restore changes accidentally lost during the
10000         "autoupdate" on 2005-12-12.
10001
10002 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
10003
10004         * modules/closeout (Depends-on): Remove atexit.
10005
10006 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
10007
10008         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
10009         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
10010
10011 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
10012
10013         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
10014         __EXTENSIONS__ if this causes compilation to fail.  Problem
10015         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
10016         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
10017
10018 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
10019
10020         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
10021         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
10022         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
10023         All uses changed.
10024
10025 2006-01-26  Simon Josefsson  <jas@extundo.com>
10026
10027         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
10028         prototype is visible on mingw32.
10029
10030         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
10031         for mingw32.
10032
10033         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
10034         mingw32).
10035
10036 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
10037
10038         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
10039         attempt to open for write; this always fails, at least on POSIX
10040         hosts.  This reinstates the 2006-01-09 change, which was
10041         inadvertently removed.
10042
10043 2006-01-26  Bruno Haible  <bruno@clisp.org>
10044
10045         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
10046         Reported by Paul Eggert.
10047
10048 2006-01-26  Bruno Haible  <bruno@clisp.org>
10049             Paul Eggert  <eggert@cs.ucla.edu>
10050
10051         * lib/stdbool_.h (_Bool)
10052         [(! (defined __cplusplus || defined __BEOS__)
10053           && !defined __GNUC__
10054           && !(defined __HP_cc || defined __xlc__
10055                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
10056                || defined __sgi))]:
10057         #define to signed char in these cases too; this simplifies
10058         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
10059         etc., separately) and makes it more conservative.
10060
10061 2006-01-25  Simon Josefsson  <jas@extundo.com>
10062
10063         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
10064         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
10065         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
10066
10067 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
10068
10069         * lib/argp-namefrob.h: Bugfix. Remove stray #
10070
10071 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
10072
10073         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
10074         so that we test the test.
10075         Check for yet another HP-UX cc bug involving *bool |= bool.
10076
10077 2006-01-25  Karl Berry  <karl@gnu.org>
10078
10079         * config/srclist.txt (vasnprintf.c): sync lost.
10080
10081 2006-01-25  Jim Meyering  <jim@meyering.net>
10082
10083         Sync from the stable (b5) branch of coreutils:
10084
10085         * lib/fts.c (fts_children): Don't let close() clobber errno from
10086         failed fchdir().
10087
10088         * lib/fts.c (fts_stat): When following a symlink-to-directory,
10089         don't necessarily interpret stat-fails+lstat-succeeds as indicating
10090         a dangling symlink.  That can also happen at least for ELOOP.
10091         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
10092         FYI, this bug predates the inclusion of fts.c in coreutils.
10093
10094         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
10095         in their own block, so pre-c99 compilers don't object.
10096
10097         Avoid the double-free (first in fts_read, second in fts_close) that
10098         would occur when an `active' directory is made inaccessible (e.g.,
10099         via chmod a-x) during a traversal.
10100         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
10101         before returning.  Reproduce this failure by
10102         mkdir -p a/b; cd a; chmod a-x . b
10103         Reported by Stavros Passas.
10104
10105 2006-01-25  Jim Meyering  <jim@meyering.net>
10106
10107         * lib/fileblocks.c: Remove more useless parentheses.
10108         * lib/readutmp.h: Likewise.
10109
10110 2006-01-25  Bruno Haible  <bruno@clisp.org>
10111
10112         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
10113         warnings.
10114         Reported by Paul Eggert.
10115
10116 2006-01-25  Bruno Haible  <bruno@clisp.org>
10117
10118         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
10119         rid of a trap command. For Solaris sh.
10120         Reported by Mark D. Baushke <mdb@gnu.org>.
10121
10122 2006-01-24  Simon Josefsson  <jas@extundo.com>
10123
10124         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
10125         Bruno.
10126
10127 2006-01-24  Karl Berry  <karl@gnu.org>
10128
10129         * config/srclist.txt (argp-namefrob.h): sync lost.
10130
10131 2006-01-24  Jim Meyering  <jim@meyering.net>
10132
10133         * modules/openat (Files): Add lib/intprops.h.
10134         From Mark D. Baushke.
10135
10136 2006-01-24  Jim Meyering  <jim@meyering.net>
10137
10138         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
10139         Reported by Mark D. Baushke.
10140
10141 2006-01-24  Jim Meyering  <jim@meyering.net>
10142
10143         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
10144
10145 2006-01-24  Bruno Haible  <bruno@clisp.org>
10146
10147         * modules/strnlen (Maintainer): Change from glibc to all.
10148
10149 2006-01-24  Bruno Haible  <bruno@clisp.org>
10150
10151         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
10152         Patch by Paul Eggert.
10153
10154 2006-01-24  Bruno Haible  <bruno@clisp.org>
10155
10156         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
10157         already has it.
10158         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
10159         2005-11-26.
10160
10161         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
10162         'signed char' to avoid problems with the built-in _Bool type.
10163         Reported by Paul Eggert on 2005-11-26.
10164
10165 2006-01-24  Bruno Haible  <bruno@clisp.org>
10166
10167         * gnulib-tool (func_import): Avoid constructing complicated sed
10168         expressions inside backquote.
10169         Report and solution by Mark D. Baushke <mdb@gnu.org>.
10170
10171 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
10172
10173         These changes imported from libc.
10174         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
10175         test and two separate function calls.
10176         * lib/strndup.c (__strndup): Add libc_hidden_def.
10177
10178 2006-01-23  Simon Josefsson  <jas@extundo.com>
10179
10180         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
10181         Remove the test_*_SOURCES variable: automake infers it by default.
10182         * modules/tls-tests: Likewise.
10183
10184 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10185
10186         Work around porting bugs reported by Dieter in
10187         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
10188         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
10189         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
10190         Include "getopt.h" first, to check interface.
10191         (getenv): Declare only if defined HAVE_DECL_GETENV &&
10192         !HAVE_DECL_GETENV.
10193         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
10194         (__strndup): Revert to K&R-style function dfns, the glibc style.
10195         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
10196         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
10197         Include strnlen.h first, to get prototype properly.
10198         (strnlen): Renamed from __strnlen.
10199         Remove weak alias.
10200
10201 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10202
10203         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
10204
10205 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10206
10207         * config/srclist.txt: Adjust to reflect glibc reorganization.
10208         This affects only comments.
10209
10210 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
10211
10212          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
10213          Reported by Bruce Korb <bkorb@gnu.org>.
10214
10215 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
10216
10217         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
10218         to pacify gcc -Wswitch-default.
10219
10220 2006-01-22  Bruno Haible  <bruno@clisp.org>
10221
10222         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
10223         temporary buffer for sprintf, take into account the precision also
10224         for 'd', 'i', 'u', 'o', 'x', 'X'.
10225
10226 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
10227
10228         * modules/argp-tests: New module
10229         * tests/test-argp.c: New file
10230         * tests/test-argp-2.sh: New file
10231
10232 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
10233
10234         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
10235         (__argp_base_name): Removed
10236         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
10237         typo.
10238         (__argp_base_name): Provide macro definition or extern declaration
10239         depending on the configuration
10240
10241 2006-01-20  Simon Josefsson  <jas@extundo.com>
10242
10243         * modules/inet_ntop (Depends-on): Depend on sys_socket.
10244
10245 2006-01-20  Simon Josefsson  <jas@extundo.com>
10246
10247         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
10248
10249 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
10250
10251         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
10252         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
10253         Suggested by Bruno Haible.
10254
10255 2006-01-20  Karl Berry  <karl@gnu.org>
10256
10257         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
10258         until changes propagate, I guess.
10259
10260 2006-01-19  Simon Josefsson  <jas@extundo.com>
10261
10262         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
10263
10264 2006-01-19  Simon Josefsson  <jas@extundo.com>
10265
10266         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
10267
10268 2006-01-19  Simon Josefsson  <jas@extundo.com>
10269
10270         * gnulib-tool: Set check_PROGRAMS.
10271
10272         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
10273         modules/des-tests, modules/gc-arcfour-tests,
10274         modules/gc-arctwo-tests, modules/gc-des-tests,
10275         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
10276         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
10277         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
10278         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
10279         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
10280         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
10281         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
10282         test_*_SOURCES.
10283
10284 2006-01-18  Simon Josefsson  <jas@extundo.com>
10285
10286         * modules/socklen (Depends-on): Depend on sys_socket.
10287
10288 2006-01-18  Simon Josefsson  <jas@extundo.com>
10289
10290         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
10291         modules/des-tests, modules/gc-arcfour-tests,
10292         modules/gc-arctwo-tests, modules/gc-des-tests,
10293         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
10294         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
10295         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
10296         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
10297         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
10298         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
10299         $(EXEEXT) to automake TESTS variable, for mingw32.
10300
10301 2006-01-17  Simon Josefsson  <jas@extundo.com>
10302
10303         * modules/socklen (Include): Need sys/socket.h.
10304
10305 2006-01-17  Bruno Haible  <bruno@clisp.org>
10306
10307         * modules/ssize_t (Include): Add <sys/types.h>.
10308
10309 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
10310
10311         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
10312         it's not portable and it doesn't work with cross-compiles.
10313         Problem reported by Bruno Haible.  Fix missing-$ typo in
10314         'test "gl_cv_ignore_unused_libraries" ...' that prevented
10315         -zignore from being used with Sun's C compiler.
10316
10317 2006-01-12  Simon Josefsson  <jas@extundo.com>
10318
10319         * lib/base64.c: Fix warning, reported by Bruno Haible
10320         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
10321
10322 2006-01-12  Bruno Haible  <bruno@clisp.org>
10323
10324         * modules/ldd: New file.
10325         * build-aux/ldd.sh.in: New file.
10326         * MODULES.html.sh (Support for building libraries and executables): Add
10327         ldd.
10328
10329 2006-01-12  Bruno Haible  <bruno@clisp.org>
10330
10331         * m4/ldd.m4: New file.
10332
10333 2006-01-12  Bruno Haible  <bruno@clisp.org>
10334
10335         * gnulib-tool (func_import, func_create_testdir): Don't go into an
10336         endless loop while replacing $auxdir with build-aux.
10337
10338 2006-01-11  Simon Josefsson  <jas@extundo.com>
10339
10340         * lib/stdint_.h (SIZE_MAX): Add missing (.
10341
10342 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
10343
10344         Sync from coreutils.
10345         * lib/md5.c: Fix commentary typos.
10346         (alignof, UNALIGNED_P): No need for a GCC-specific version.
10347         * lib/md5.h (__attribute__): Remove; unused.
10348         * lib/sha1.c: Fix commentary to match md5 better.
10349         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
10350         so that we don't need to worry about alignment.  All uses changed.
10351         This merges the 2005-10-28 md5 change into sha1.
10352
10353 2006-01-11  Jim Meyering  <jim@meyering.net>
10354
10355         Sync from coreutils.
10356         * lib/md5.c (OP): Fix spacing.
10357
10358 2006-01-11  Bruno Haible  <bruno@clisp.org>
10359
10360         Ensure automatic ordering between gl_LOCK and gl_ARGP.
10361         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
10362         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
10363
10364 2006-01-11  Bruno Haible  <bruno@clisp.org>
10365
10366         Ensure automatic ordering between gl_LOCK and gl_ARGP.
10367         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
10368         the "early" section as well.
10369
10370 2006-01-11  Bruno Haible  <bruno@clisp.org>
10371
10372         Avoid "ar: no archive members specified" error on MacOS X.
10373         * gnulib-tool (func_modules_add_dummy): New function.
10374         (func_import, func_create_testdir): Invoke it.
10375
10376 2006-01-11  Bruno Haible  <bruno@clisp.org>
10377
10378         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
10379         with $auxdir in AC_CONFIG_FILES statements.
10380
10381 2006-01-11  Bruno Haible  <bruno@clisp.org>
10382
10383         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
10384         Initialize also noinst_HEADERS to empty.
10385
10386 2006-01-11  Bruno Haible  <bruno@clisp.org>
10387
10388         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
10389         variables.
10390         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
10391         autoreconf.
10392
10393 2006-01-11  Bruno Haible  <bruno@clisp.org>
10394
10395         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
10396         overridable by the user.
10397         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10398
10399 2006-01-10  Simon Josefsson  <jas@extundo.com>
10400
10401         * modules/sys_socket: New file.
10402
10403 2006-01-10  Simon Josefsson  <jas@extundo.com>
10404
10405         * m4/sys_socket_h.m4: New file.
10406
10407 2006-01-10  Simon Josefsson  <jas@extundo.com>
10408
10409         * lib/socket_.h: New file.
10410
10411 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10412
10413         * modules/readutmp (Maintainer): Add myself.
10414
10415 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10416
10417         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
10418         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
10419         People who are still concerned with buggy memcmp implementations
10420         can invoke gl_FUNC_MEMCMP themselves.
10421
10422 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10423
10424         * lib/regex_internal.h (BITSET_WORD_BITS):
10425         Work around a bug in 64-bit PGC (before version 6.1-2), where the
10426         preprocessor mishandles large unsigned values as if they were signed.
10427         Problem reported by Claudio Fontana in
10428         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
10429
10430 2006-01-10  Jim Meyering  <jim@meyering.net>
10431
10432         Avoid the double-free (first in fts_read, second in fts_close) that
10433         would occur when an `active' directory is made inaccessible (e.g.,
10434         via chmod a-x) during a traversal.
10435         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
10436         before returning.  Reproduce this failure by
10437         mkdir -p a/b; cd a; chmod a-x . b
10438         Reported by Stavros Passas.
10439
10440         Sync from coreutils.
10441         * lib/sha1.c: Tweak grammar in a comment.
10442
10443 2006-01-10  Jim Meyering  <jim@meyering.net>
10444
10445         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
10446         Patch by Joerg Sonnenberger.
10447
10448 2006-01-10  Bruno Haible  <bruno@clisp.org>
10449
10450         * modules/readutmp: Depend on module free.
10451         * modules/strtok_r: Depend on module restrict.
10452
10453 2006-01-10  Bruno Haible  <bruno@clisp.org>
10454
10455         * modules/gettext (configure.ac): Add an invocation of
10456         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
10457
10458 2006-01-10  Bruno Haible  <bruno@clisp.org>
10459
10460         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
10461         Reported by Werner Lemberg <wl@gnu.org>.
10462
10463 2006-01-10  Bruno Haible  <bruno@clisp.org>
10464
10465         * lib/localcharset.c: Update from GNU gettext.
10466
10467 2006-01-10  Bruno Haible  <bruno@clisp.org>
10468
10469         * lib/argp.h (__const): Remove macro. Use const instead.
10470         * lib/argp-fmtstream.h (__const): Likewise.
10471         * lib/glob_.h (__const): Remove macro.
10472         * lib/glob-libc.h: Use const instead of __const.
10473
10474 2006-01-10  Bruno Haible  <bruno@clisp.org>
10475
10476         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
10477         variable.
10478         Needed to avoid an automake error regarding the 'gettext' module.
10479
10480 2006-01-09  Simon Josefsson  <jas@extundo.com>
10481
10482         * modules/inet_ntop (Depends-on): Add restrict.
10483
10484 2006-01-09  Simon Josefsson  <jas@extundo.com>
10485
10486         * modules/gc-rijndael-tests (License): Put under LGPL.
10487
10488         * modules/gc-des-tests (License): Likewise.
10489
10490         * modules/gc-arcfour-tests (License): Likewise.
10491
10492         * modules/gc-arctwo-tests (License): Likewise.
10493
10494         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
10495
10496         * modules/gc-hmac-sha1-tests (Files): Likewise.
10497
10498         * modules/gc-hmac-md5-tests (License): Likewise.
10499
10500         * modules/gc-sha1-tests (License): Likewise.
10501
10502         * modules/gc-md5-tests (License): Likewise.
10503
10504         * modules/gc-md4-tests (License): Likewise.
10505
10506         * modules/gc-md2-tests (License): Likewise.
10507
10508         * modules/gc-tests (License): Likewise.
10509
10510         * modules/des-tests (License): Likewise.
10511
10512         * modules/md4-tests (License): Likewise.
10513
10514         * modules/md2-tests (License): Likewise.
10515
10516 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10517
10518         Sync from coreutils:
10519
10520         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
10521         * modules/lib-ignore: New file.
10522         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
10523         chdir-safer.m4, lchmod.m4.
10524         * modules/openat: Add mkdirat.c, openat-priv.h.
10525
10526 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10527
10528         Sync from coreutils.
10529         * m4/lib-ignore.m4: New file.
10530         * m4/lchmod.m4: New file.
10531
10532 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10533
10534         Sync from coreutils.
10535         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
10536         for write access: POSIX says that must fail.
10537         * lib/fts.c (diropen): Likewise.
10538         * lib/save-cwd.c (save_cwd): Likewise.
10539         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
10540         well, for minor improvements on hosts that lack O_DIRECTORY.
10541         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
10542         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
10543         Fall back on chown if open failed with EACCES.
10544
10545         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
10546         Report an error at compile-time if only a 1-second nominal clock
10547         resolution is found.
10548
10549         * lib/lchmod.h: New file.
10550         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
10551         (make_dir_parents): Use lchown rather than chown, and
10552         lchmod rather than chmod.
10553
10554         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
10555         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
10556         "proc" reported by n0dalus.
10557
10558         * lib/mountlist.c: Include <limits.h>.
10559         (dev_from_mount_options)
10560         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
10561         New function.  It no longer assumes "dev=" has the System V meaning
10562         on Linux (since it doesn't).  It also parses "dev=" more carefully.
10563         (read_file_system_list)
10564         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
10565         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
10566         dev= in that case.
10567
10568         * lib/posixtm.h (PDS_PRE_2000): New macro.
10569         * lib/posixtm.c (year): Arg is now syntax_bits rather than
10570         allow_century.  All usages changed.  Reject dates outside the range
10571         1969-1999 if PDS_PRE_2000 is used.
10572
10573 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10574
10575         Sync from coreutils.
10576         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
10577         (Time of day items): Mention the possibility of leap seconds.
10578         Problem reported by Dr. David Alan Gilbert.
10579
10580 2006-01-09  Jim Meyering  <jim@meyering.net>
10581
10582         Sync from coreutils.
10583
10584         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
10585
10586         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
10587
10588         * lib/modechange.c (mode_compile): Reject an invalid mode string
10589         that starts with an octal digit.  From Andreas Gruenbacher.
10590
10591         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
10592         and dup to open_safer and dup_safer, respectively.
10593         (openat_permissive): Fix typo in comment.
10594
10595         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
10596         "gettext.h"; either no longer needed or are guaranteed by openat.h.
10597         (_): Remove; no longer needed.
10598         (openat): Renamed from rpl_openat; no need for rpl_openat
10599         since openat.h renames openat for us.
10600         Replace most of the body with a call to openat_permissive,
10601         to avoid duplicate code.
10602         Port to (probably hypothetical) environments were mode_t is
10603         wider than int.
10604         (openat_permissive): Require mode arg, so that we can check
10605         types better.  Put it just after flags.  Change cwd failure
10606         indicator from pointer-to-bool to pointer-to-errno-value.
10607         All callers changed.
10608         Invoke openat_save_fail and/or openat_restore_fail if
10609         cwd_errno is null, so that openat can call us.
10610         (openat_permissive, fdopendir, fstatat, unlinkat):
10611         Simplify errno handling to avoid some duplicate code,
10612         as it's OK to set errno on success.
10613         * lib/openat.h: Revamp code so that function macros depend on
10614         __OPENAT_PREFIX only, not also on AT_FDCWD.
10615         (openat_ro): Remove.  Caller changed to use openat_permissive.
10616         (openat_permissive): Now a macro, if not a function.
10617         (openat_restore_fail, openat_save_fail): Now always functions,
10618         since mkdirat needs them even if __OPENAT_PREFIX is defined.
10619
10620         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
10621         and openat.c.
10622         * lib/mkdirat.c: Include openat-priv.h.
10623         Remove definitions of macros defined therein.
10624         * lib/openat.c: Likewise.
10625
10626         * lib/mkdirat.c (mkdirat): New file and function.
10627         * lib/openat.h (mkdirat): Declare.
10628
10629         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
10630
10631         * lib/openat.h (openat_permissive): Declare.
10632         (openat_ro): Define.
10633
10634         * lib/openat.c (EXPECTED_ERRNO): New macro.
10635         (openat_permissive): New function -- used in remove.c rewrite.
10636         (all functions): Set errno just before returning, only if there
10637         was an actual failure.
10638         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
10639
10640         Emulate openat-family functions using Linux's procfs, if possible.
10641         Idea and some code based on Ulrich Drepper's glibc changes.
10642
10643         * lib/openat.c: (BUILD_PROC_NAME): New macro.
10644         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
10645         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
10646         before falling back on save_cwd and restore_cwd.
10647         (fdopendir, fstatat, unlinkat): Likewise.
10648
10649         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
10650         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
10651
10652         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
10653         as second argument to va_arg.  Otherwise, some versions of gcc
10654         warn that `if this code is reached, the program will abort'.
10655
10656 2006-01-09  Jim Meyering  <jim@meyering.net>
10657
10658         Sync from coreutils.
10659         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
10660         Require openat-priv.h.
10661
10662 2006-01-09  Bruno Haible  <bruno@clisp.org>
10663
10664         * modules/strnlen (Include): Use strnlen.h.
10665
10666 2006-01-09  Bruno Haible  <bruno@clisp.org>
10667
10668         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
10669
10670 2006-01-09  Bruno Haible  <bruno@clisp.org>
10671
10672         * lib/sysexit_.h (EX_OK): New macro.
10673         Suggested by Martin Lambers <marlam@marlam.de>.
10674
10675 2006-01-09  Bruno Haible  <bruno@clisp.org>
10676
10677         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
10678         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
10679
10680 2006-01-09  Bruno Haible  <bruno@clisp.org>
10681
10682         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
10683         numbers.
10684
10685 2006-01-09  Bruno Haible  <bruno@clisp.org>
10686
10687         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
10688         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
10689         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
10690         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
10691
10692 2006-01-09  Bruno Haible  <bruno@clisp.org>
10693
10694         * build-aux/javacomp.sh.in: New file, moved from lib/.
10695         * modules/javacomp-script (Files): Update.
10696         (configure.ac): Add AC_CONFIG_FILES invocation.
10697         (EXTRA_DIST): Remove variable.
10698
10699         * build-aux/javaexec.sh.in: New file, moved from lib/.
10700         * modules/javaexec (Files): Update.
10701         (configure.ac): Add AC_CONFIG_FILES invocation.
10702         (EXTRA_DIST): Remove javaexec.sh.in.
10703
10704         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
10705         * modules/csharpcomp-script (Files): Update.
10706         (configure.ac): Add AC_CONFIG_FILES invocation.
10707         (EXTRA_DIST): Remove variable.
10708
10709         * build-aux/csharpexec.sh.in: New file, moved from lib/.
10710         * modules/csharpexec (Files): Update.
10711         (configure.ac): Add AC_CONFIG_FILES invocation.
10712         (EXTRA_DIST): Remove csharpexec.sh.in.
10713
10714 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
10715
10716         Sync from coreutils.
10717
10718         Add POSIX ACL support
10719         * lib/acl.h (copy_acl, set_acl): Add declarations.
10720         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
10721         systems other than Linux.
10722         (chmod_or_fchmod): New function: use fchmod when possible,
10723         and chmod otherwise.
10724         (file_has_acl): Add a POSIX ACL implementation, with a
10725         Linux-specific subcase.
10726         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
10727         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
10728         acls are unsupported.
10729         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
10730         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
10731         are unsupported.
10732
10733 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
10734
10735         Sync from coreutils.
10736         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
10737
10738 2006-01-07  Bruno Haible  <bruno@clisp.org>
10739
10740         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
10741         gl_EARLY.
10742
10743 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
10744
10745         * lib/strftime.c (tzname): Don't declare if it is already #defined.
10746         Problem reported for Mingw by Mark Junker.
10747
10748 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
10749
10750         * README: Gnulib normally doesn't generate a tarball.
10751
10752 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
10753
10754         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
10755         long int, not int, for nanosecond counts, so that people who are
10756         used to POSIX struct timespec won't be surprised.  Reported by Jim
10757         Meyering.
10758
10759 2005-12-28  Bruno Haible  <bruno@clisp.org>
10760
10761         * build-aux/config.rpath: Update from GNU gettext.
10762
10763 2005-12-16  Jim Meyering  <jim@meyering.net>
10764
10765         * modules/fprintftime: New module.
10766         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
10767
10768 2005-12-16  Jim Meyering  <jim@meyering.net>
10769
10770         * m4/fprintftime.m4: New file.
10771
10772 2005-12-16  Jim Meyering  <jim@meyering.net>
10773
10774         * lib/fprintftime.c, lib/fprintftime.h: New files.
10775
10776 2005-12-15  Simon Josefsson  <jas@extundo.com>
10777
10778         * modules/socklen (configure.ac): Fix M4 macro name, to align with
10779         new m4/socklen.m4.
10780
10781 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
10782
10783         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
10784         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
10785
10786 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
10787
10788         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
10789         * lib/argp-help.c (fill_in_uparams): Check if the constructed
10790         struct uparams is valid. Fall back to the default values if it is
10791         not.
10792
10793 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10794
10795         * modules/argp (Files): Add argp-pin.c
10796         (Depends-on): dirname
10797         (lib_SOURCES): Add argp-pin.c
10798
10799 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10800
10801         * m4/argp.m4:  Check if program_invocation_name and
10802         program_invocation_short_name are declared and define appropriate
10803         macros if they are not.
10804
10805 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10806
10807         * lib/argp-help.c (__argp_base_name): New function
10808         (__argp_short_program_name): Rewrite using __argp_base_name
10809         * lib/argp-namefrob.h: Define program_invocation_name and
10810         program_invocation_short_name if requested
10811         (__argp_base_name): Add prototype
10812         * lib/argp-parse.c (argp_def): Use gettext wrappers
10813         (argp_default_parser): Use __argp_base_name
10814         * lib/argp-pin.c: New file. Defines program_invocation_name and
10815         program_invocation_short_name on systems that lack them.
10816
10817 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
10818
10819         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
10820         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
10821         porting problem reported by Georg Schwarz in
10822         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
10823
10824 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
10825
10826         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
10827         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
10828         porting problem reported by Georg Schwarz in
10829         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
10830
10831 2005-12-05  Bruno Haible  <bruno@clisp.org>
10832
10833         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
10834         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
10835         Reported by Mark Junker <mjscod@gmx.de>.
10836
10837 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
10838
10839         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
10840         Use implementation from Albert Chin, with some
10841         comments/corrections by Stepan Kasal and myself.
10842
10843 2005-12-02  Bruno Haible  <bruno@clisp.org>
10844
10845         * gnulib-tool (func_import): Accept GPLed build tool modules when
10846         --lgpl is given.
10847         * modules/csharpcomp-script: New file.
10848         * modules/csharpcomp: Depend on it.
10849         * modules/javacomp-script: New file.
10850         * modules/javacomp: Depend on it.
10851         Suggested by Simon Josefsson.
10852
10853 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
10854
10855         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
10856         statement, to work around an HP-UX 10.20 compiler bug reported by
10857         Peter O'Gorman.
10858
10859 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
10860
10861         * modules/savedir (Depends-on): Add openat.
10862
10863 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
10864
10865         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
10866         (uintmax_t) [defined uintmax_t]: Do not declare.
10867         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
10868         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
10869         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
10870         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
10871         sake of portability to weird hosts that C allows (though we don't
10872         know of any practical examples).
10873
10874         * lib/savedir.h (fdsavedir): New decl.
10875         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
10876         contains most of the former guts of savedir.
10877         (savedir): Use savedirstream.
10878         Include "openat.h".
10879
10880 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
10881
10882         * modules/obstack (Files): Add m4/ulonglong.m4.
10883         Problem reported by Davide Angelocola.
10884
10885 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
10886
10887         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
10888         coreutils no longer futzes with rounding modes.
10889
10890 2005-11-14  Jim Meyering  <jim@meyering.net>
10891
10892         * lib/mkstemp-safer.c: Include <config.h>, required for possible
10893         replacement of mkstemp.
10894
10895 2005-11-10  Simon Josefsson  <jas@extundo.com>
10896
10897         * lib/readline.c: Remove EOL.
10898
10899 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10900
10901         * modules/gethrxtime (Depends-on): Add gettime.
10902
10903 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10904
10905         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
10906         or gettimeofday; no longer needed.
10907
10908 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10909
10910         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
10911         time business.
10912         (gethrxtime) [! (HAVE_NANOUPTIME
10913         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
10914         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
10915         our own approximation.
10916
10917 2005-11-08  Eric Blake  <ebb9@byu.net>
10918
10919         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
10920
10921 2005-11-08  Eric Blake  <ebb9@byu.net>
10922
10923         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
10924
10925 2005-11-04  Bruno Haible  <bruno@clisp.org>
10926
10927         * gnulib-tool: Implement --update mode.
10928
10929 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
10930
10931         Fix porting problem reported by Theodoros V. Kalamatianos.
10932         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
10933         Don't assume that futimes failing means we must fail.
10934
10935 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
10936
10937         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
10938         variables to suggest the intended function of the PATH_MAX check.
10939
10940 2005-10-30  Kean Johnston  <jkj@sco.com>
10941
10942         Trivial changes to support SCO systems.
10943         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
10944         as PATH_MAX.
10945         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
10946         where __ptr is null when no I/O is pending.
10947
10948 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
10949
10950         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
10951         leave errno alone.  Problem reported by Dmitry V. Levin.
10952
10953 2005-10-28  Simon Josefsson  <jas@extundo.com>
10954
10955         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
10956         Test more.
10957
10958         * tests/test-gc-md2.c, tests/test-md2.c: New files.
10959
10960         * modules/md2, modules/md2-tests: New files.
10961
10962 2005-10-28  Simon Josefsson  <jas@extundo.com>
10963
10964         * m4/inet_ntop.m4: More tests.
10965
10966         * m4/gc-md2.m4, md2.m4: New file.
10967
10968 2005-10-28  Simon Josefsson  <jas@extundo.com>
10969
10970         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
10971         "restrict" keywords, as per POSIX.  Protect the function
10972         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
10973         Don't use K&R prototypes.  Check the sprintf return values.
10974         Re-define EAFNOSUPPORT if not present.  Indent.
10975
10976         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
10977         suggested by Bruno Haible <bruno@clisp.org>.
10978
10979         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
10980
10981         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
10982
10983         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
10984         libgcrypt).
10985
10986         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
10987
10988         * lib/md2.h, lib/md2.c: New files.
10989
10990 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
10991
10992         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
10993         errno alone.  Problem reported by Frederic Jolliton.
10994
10995 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
10996
10997         * modules/verify (License): Change from GPL to LGPL.  This is a
10998         tiny module and there are apparently near-equivalents that are
10999         under the BSD license.
11000
11001 2005-10-24  Simon Josefsson  <jas@extundo.com>
11002
11003         * modules/sha1: Relicense to LGPL.
11004
11005 2005-10-24  Simon Josefsson  <jas@extundo.com>
11006
11007         * lib/md4.h: Shrink buffer size, now that we changed the type.
11008
11009 2005-10-23  Simon Josefsson  <jas@extundo.com>
11010
11011         * gnulib-tool (func_import): Fix --tests-base.
11012
11013 2005-10-22  Simon Josefsson  <jas@extundo.com>
11014
11015         * modules/arcfour (Depends-on): Need stdint.
11016
11017 2005-10-22  Simon Josefsson  <jas@extundo.com>
11018
11019         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
11020         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
11021
11022 2005-10-22  Simon Josefsson  <jas@extundo.com>
11023
11024         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
11025         suggested by Bruno Haible <bruno@clisp.org>.
11026
11027 2005-10-22  Simon Josefsson  <jas@extundo.com>
11028
11029         * lib/crc.h: Include stddef.h, for size_t.
11030
11031 2005-10-22  Simon Josefsson  <jas@extundo.com>
11032
11033         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
11034         arcfour_context struct (simplify test vector testing in GNU
11035         Shishi).
11036
11037 2005-10-21  Simon Josefsson  <jas@extundo.com>
11038
11039         * modules/des, modules/des-tests: New files.
11040
11041         * modules/gc-des, modules/gc-des-tests: New files.
11042
11043         * tests/test-des.c, tests/test-gc-des.c: New file.
11044
11045 2005-10-21  Simon Josefsson  <jas@extundo.com>
11046
11047         * modules/arctwo, modules/arctwo-tests: New files.
11048
11049         * tests/test-arctwo.c: New file.
11050
11051         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
11052
11053         * tests/test-gc-arctwo.c: New file.
11054
11055 2005-10-21  Simon Josefsson  <jas@extundo.com>
11056
11057         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
11058         Bruno Haible <bruno@clisp.org>.
11059
11060         * m4/gc-des.m4: New file.
11061
11062 2005-10-21  Simon Josefsson  <jas@extundo.com>
11063
11064         * m4/arctwo.m4: New file.
11065
11066         * m4/gc-arctwo.m4: New file.
11067
11068 2005-10-21  Simon Josefsson  <jas@extundo.com>
11069
11070         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
11071         block.
11072
11073 2005-10-21  Simon Josefsson  <jas@extundo.com>
11074
11075         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
11076         <bruno@clisp.org>.
11077
11078         * lib/hmac-sha1.c (hmac_sha1): Likewise.
11079
11080         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
11081         Bruno Haible <bruno@clisp.org>.
11082
11083         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
11084         <bruno@clisp.org>.
11085
11086 2005-10-21  Simon Josefsson  <jas@extundo.com>
11087
11088         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
11089
11090 2005-10-21  Simon Josefsson  <jas@extundo.com>
11091
11092         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
11093
11094 2005-10-21  Simon Josefsson  <jas@extundo.com>
11095
11096         * lib/des.h, lib/des.c: New files.
11097
11098         * lib/gc-gnulib.c: Support DES.c
11099
11100 2005-10-21  Simon Josefsson  <jas@extundo.com>
11101
11102         * lib/arctwo.h, lib/arctwo.c: New files.
11103
11104         * lib/gc-gnulib.c: Support ARCTWO.
11105
11106 2005-10-21  Simon Josefsson  <jas@extundo.com>
11107
11108         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
11109         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11110
11111 2005-10-21  Simon Josefsson  <jas@extundo.com>
11112
11113         * gnulib-tool (func_import, func_create_testdir): Define automake
11114         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
11115         Makefile.am snippet),
11116         suggested by Bruno Haible <bruno@clisp.org>.
11117
11118         * modules/gc (Makefile.am): Use it.
11119
11120 2005-10-21  Bruno Haible  <bruno@clisp.org>
11121
11122         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
11123         patch.
11124
11125 2005-10-19  Simon Josefsson  <jas@extundo.com>
11126
11127         * tests/test-gc-rijndael.c: New file.
11128
11129         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
11130
11131 2005-10-19  Simon Josefsson  <jas@extundo.com>
11132
11133         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
11134         interface too.
11135
11136 2005-10-19  Simon Josefsson  <jas@extundo.com>
11137
11138         * tests/test-gc-arcfour.c: New file.
11139
11140         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
11141
11142 2005-10-19  Simon Josefsson  <jas@extundo.com>
11143
11144         * modules/gc-md4, modules/gc-md4-tests: New file.
11145
11146         * tests/test-gc-md4.c: New file.
11147
11148 2005-10-19  Simon Josefsson  <jas@extundo.com>
11149
11150         * m4/gc-md4.m4: New file.
11151
11152 2005-10-19  Simon Josefsson  <jas@extundo.com>
11153
11154         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
11155         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
11156         <kasal@ucw.cz>.
11157
11158 2005-10-19  Simon Josefsson  <jas@extundo.com>
11159
11160         * m4/gc-arcfour.m4: New file.
11161
11162         * m4/gc-rijndael.m4: New file.
11163
11164 2005-10-19  Simon Josefsson  <jas@extundo.com>
11165
11166         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
11167
11168 2005-10-19  Simon Josefsson  <jas@extundo.com>
11169
11170         * lib/gc-gnulib.c: Support ARCFOUR.
11171
11172 2005-10-19  Simon Josefsson  <jas@extundo.com>
11173
11174         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
11175         support.
11176
11177         * lib/gc.h: Add ECB enum type.
11178
11179         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
11180
11181 2005-10-18  Simon Josefsson  <jas@extundo.com>
11182
11183         * tests/test-md5.c: New file.
11184
11185         * modules/md5-tests: New file.
11186
11187 2005-10-18  Simon Josefsson  <jas@extundo.com>
11188
11189         * tests/test-md4.c: New file.
11190
11191         * modules/md4, modules/md4-tests: New files.
11192
11193 2005-10-18  Simon Josefsson  <jas@extundo.com>
11194
11195         * m4/md4.m4: New file.
11196
11197 2005-10-18  Simon Josefsson  <jas@extundo.com>
11198
11199         * lib/md4.h, lib/md4.c: New files, based on md5.?.
11200
11201 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
11202
11203         * gnulib-tool (func_create_testdir): Omit the second check whether
11204         BUILT_SOURCES in nonempty.
11205
11206 2005-10-17  Simon Josefsson  <jas@extundo.com>
11207
11208         * tests/test-rijndael.c: New file.
11209
11210 2005-10-17  Simon Josefsson  <jas@extundo.com>
11211
11212         * modules/sha1: Depend on stdint instead of md5.
11213
11214         * modules/md5: Depend on stdint, remove uint32_t.
11215
11216 2005-10-17  Simon Josefsson  <jas@extundo.com>
11217
11218         * modules/gc-sha1-tests: New file.
11219
11220         * tests/test-gc-sha1.c: New file.
11221
11222 2005-10-17  Simon Josefsson  <jas@extundo.com>
11223
11224         * m4/md5.m4: Remove call to uint32_t.m4.
11225
11226 2005-10-17  Simon Josefsson  <jas@extundo.com>
11227
11228         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
11229
11230         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
11231         md5.h.
11232
11233         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
11234
11235         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
11236
11237 2005-10-17  Simon Josefsson  <jas@extundo.com>
11238
11239         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
11240
11241 2005-10-17  Simon Josefsson  <jas@extundo.com>
11242
11243         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
11244
11245 2005-10-17  Simon Josefsson  <jas@extundo.com>
11246
11247         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
11248
11249         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
11250
11251 2005-10-17  Bruno Haible  <bruno@clisp.org>
11252
11253         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
11254         that it can also be used in a test.
11255
11256 2005-10-16  Bruno Haible  <bruno@clisp.org>
11257
11258         * gnulib-tool (func_emit_tests_Makefile_am): Also define
11259         TESTS_ENVIRONMENT, so that individual tests can augment it.
11260
11261         * gnulib-tool (func_create_testdir): Use an intermediate target for
11262         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
11263         macros, like $(ALLOCA_H), which cannot be passed through the command
11264         line.
11265
11266 2005-10-15  Simon Josefsson  <jas@extundo.com>
11267
11268         * modules/rijndael-tests: New file.
11269
11270         * modules/rijndael: New file.
11271
11272 2005-10-15  Simon Josefsson  <jas@extundo.com>
11273
11274         * m4/rijndael.m4: New file.
11275
11276 2005-10-15  Simon Josefsson  <jas@extundo.com>
11277
11278         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
11279
11280         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
11281
11282 2005-10-14  Simon Josefsson  <jas@extundo.com>
11283
11284         * tests/test-arcfour.c: New file.
11285
11286         * modules/arcfour, modules/arcfour-tests: New files.
11287
11288 2005-10-14  Simon Josefsson  <jas@extundo.com>
11289
11290         * m4/arcfour.m4: New file.
11291
11292 2005-10-14  Simon Josefsson  <jas@extundo.com>
11293
11294         * lib/arcfour.h, lib/arcfour.c: New files.
11295
11296 2005-10-14  Roland McGrath  <roland@redhat.com>
11297
11298         Import from libc.  [BZ #1331]
11299         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
11300         macro argument.
11301         Reported by Matej Vela <vela@debian.org>.
11302
11303 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
11304
11305         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
11306         include <wchar.h>; no longer needed.
11307
11308 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
11309
11310         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
11311
11312 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
11313         and  Ulrich Drepper  <drepper@redhat.com>
11314
11315         Import from libc.
11316         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
11317         instead of inline stream orientation test and two separate
11318         function calls.  Pay no attention to USE_IN_LIBIO.
11319
11320 2005-10-13  Simon Josefsson  <jas@extundo.com>
11321
11322         * modules/gc-hmac-md5-tests: New file.
11323
11324         * tests/test-gc-hmac-sha1.c: New file.
11325
11326         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
11327
11328         * modules/gc-hmac-md5-tests: New file.
11329
11330         * tests/test-gc-md5.c: New file.
11331
11332         * modules/gc-md5-tests: New file.
11333
11334 2005-10-13  Simon Josefsson  <jas@extundo.com>
11335
11336         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
11337         Move memory allocation outside of loop.
11338
11339 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
11340
11341         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
11342         intermediate directory is in a read-only file system.  Problem
11343         reported by Eric Blake.
11344
11345 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
11346
11347         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
11348
11349 2005-10-12  Simon Josefsson  <jas@extundo.com>
11350
11351         * tests/test-hmac-sha1.c: New file.
11352
11353         * modules/hmac-sha1-tests: New file.
11354
11355         * modules/hmac-sha1: New file.
11356
11357 2005-10-12  Simon Josefsson  <jas@extundo.com>
11358
11359         * modules/gc-sha1: New file.
11360
11361 2005-10-12  Simon Josefsson  <jas@extundo.com>
11362
11363         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
11364
11365         * tests/test-gc-pbkdf2-sha1.c: New file.
11366
11367 2005-10-12  Simon Josefsson  <jas@extundo.com>
11368
11369         * modules/gc-md5, modules/gc-hmac-md5: New files.
11370
11371         * modules/gc (Files): Remove md5, memxor and hmac files.
11372
11373 2005-10-12  Simon Josefsson  <jas@extundo.com>
11374
11375         * m4/gc-pbkdf2-sha1.m4: New file.
11376
11377         * m4/gc-hmac-sha1.m4: New file.
11378
11379         * m4/gc-sha1: New file.
11380
11381         * m4/hmac-sha1.m4: New file.
11382
11383 2005-10-12  Simon Josefsson  <jas@extundo.com>
11384
11385         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
11386
11387         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
11388
11389 2005-10-12  Simon Josefsson  <jas@extundo.com>
11390
11391         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
11392         suggested by Bruno Haible <bruno@clisp.org>.
11393
11394 2005-10-12  Simon Josefsson  <jas@extundo.com>
11395
11396         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
11397
11398 2005-10-12  Simon Josefsson  <jas@extundo.com>
11399
11400         * lib/gc-pbkdf2-sha1.c: New file.
11401
11402         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
11403
11404 2005-10-12  Simon Josefsson  <jas@extundo.com>
11405
11406         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
11407
11408         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
11409
11410 2005-10-12  Simon Josefsson  <jas@extundo.com>
11411
11412         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
11413         GC_USE_HMAC_MD5, respectively.
11414
11415         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
11416         (gc_md5): Fix typo.
11417
11418         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
11419
11420         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
11421
11422         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
11423
11424 2005-10-12  Bruno Haible  <bruno@clisp.org>
11425
11426         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
11427         Reported by Stepan Kasal <kasal@ucw.cz>.
11428
11429 2005-10-11  Simon Josefsson  <jas@extundo.com>
11430
11431         * tests/test-crc.c: New file.
11432
11433         * modules/crc, modules/crc-tests: New files.
11434
11435 2005-10-11  Simon Josefsson  <jas@extundo.com>
11436
11437         * m4/crc.m4: New file.
11438
11439 2005-10-11  Simon Josefsson  <jas@extundo.com>
11440
11441         * lib/gc.h: Add gc_hash and gc_hash_buffer.
11442
11443         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
11444
11445         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
11446
11447 2005-10-11  Simon Josefsson  <jas@extundo.com>
11448
11449         * lib/crc.h, lib/crc.c: New files.
11450
11451         * lib/gc.h (gc_hash_buffer): Add doc.
11452
11453 2005-10-11  Bruno Haible  <bruno@clisp.org>
11454
11455         * modules/c-strcasestr: New file.
11456         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
11457
11458 2005-10-11  Bruno Haible  <bruno@clisp.org>
11459
11460         * modules/c-strcase: New file.
11461         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
11462
11463 2005-10-11  Bruno Haible  <bruno@clisp.org>
11464
11465         * lib/strcasecmp.c: Include limits.h.
11466         (strcasecmp): Avoid integer overflow on exotic platforms.
11467         * lib/strncasecmp.c: Include limits.h.
11468         (strncasecmp): Avoid integer overflow on exotic platforms.
11469         Reported by Paul Eggert.
11470
11471 2005-10-11  Bruno Haible  <bruno@clisp.org>
11472
11473         * lib/c-strcasestr.h: New file, from GNU gettext.
11474         * lib/c-strcasestr.c: New file, from GNU gettext.
11475
11476 2005-10-11  Bruno Haible  <bruno@clisp.org>
11477
11478         * lib/c-strcase.h: New file, from GNU gettext.
11479         * lib/c-strcasecmp.c: New file, from GNU gettext.
11480         * lib/c-strncasecmp.c: New file, from GNU gettext.
11481
11482 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
11483
11484         * modules/mempcpy (License): GPL -> LGPL.
11485         * modules/strchrnul (License): Likewise.
11486         * modules/sysexits (License): Likewise.
11487
11488 2005-10-08  Simon Josefsson  <jas@extundo.com>
11489
11490         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
11491
11492 2005-10-07  Simon Josefsson  <jas@extundo.com>
11493
11494         * m4/memxor.m4: Remove gl_C_RESTRICT call.
11495
11496 2005-10-06  Simon Josefsson  <jas@extundo.com>
11497
11498         * tests/test-hmac-md5.c: New file.
11499
11500         * modules/hmac-md5-tests: New file.
11501
11502         * modules/hmac-md5: New file.
11503
11504 2005-10-06  Simon Josefsson  <jas@extundo.com>
11505
11506         * m4/hmac-md5.m4: New file.
11507
11508         * m4/memxor.m4: Require gl_C_RESTRICT.
11509
11510 2005-10-06  Simon Josefsson  <jas@extundo.com>
11511
11512         * lib/memxor.c (memxor): Avoid casts and warnings.
11513
11514 2005-10-06  Simon Josefsson  <jas@extundo.com>
11515
11516         * lib/hmac-md5.c: New file.
11517
11518         * lib/hmac.h: New file.
11519
11520 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
11521
11522         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
11523         promotes to int, not unsigned int, to catch the AIX 5.3
11524         compiler bug.
11525
11526 2005-10-05  Simon Josefsson  <jas@extundo.com>
11527
11528         * modules/memxor: New file.
11529
11530         * modules/iconv (Files): Move config.rpath to havelib, it is used
11531         there.
11532
11533         * modules/havelib (Files): Add config.rpath.
11534
11535 2005-10-05  Simon Josefsson  <jas@extundo.com>
11536
11537         * m4/memxor.m4: New file.
11538
11539 2005-10-05  Simon Josefsson  <jas@extundo.com>
11540
11541         * lib/memxor.c (memxor): Fix compiler error.
11542
11543         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
11544         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
11545
11546         * lib/memxor.h, lib/memxor.c: New files.
11547
11548         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
11549         we assume all systems have it, suggested by Jim Meyering
11550         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
11551         any systems lack sys/socket.h; mingw32 is known to lack it, but we
11552         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
11553         same reasons.
11554
11555 2005-10-05  Simon Josefsson  <jas@extundo.com>
11556
11557         * config/srclist.txt: Add glibc bug 1423 for md5.h.
11558
11559 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
11560
11561         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
11562         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
11563         needed, since the source code now assumes these .h files.
11564
11565 2005-10-05  Derek Price  <derek@ximbiot.com>
11566
11567         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
11568
11569 2005-10-05  Bruno Haible  <bruno@clisp.org>
11570
11571         * modules/stdint (License): Change to LGPL.
11572
11573 2005-10-04  Simon Josefsson  <jas@extundo.com>
11574
11575         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
11576         D. Baushke" <mdb@gnu.org>.
11577
11578 2005-10-04  Bruno Haible  <bruno@clisp.org>
11579
11580         * lib/verify.h (verify_true): Provide alternative definition for C++.
11581
11582 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
11583
11584         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
11585         (SSIZE_MAX): New macro, if not already defined.
11586         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
11587         than 2 GiB.
11588
11589 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
11590
11591         Sync from coreutils.
11592         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
11593         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
11594         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
11595         ULLONG_MAX doesn't work with 2.7.2.1.
11596
11597 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
11598
11599         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
11600         From Ben Pfaff.
11601
11602         * modules/exclude (Depends-on): Depend on verify.
11603         * modules/strtoimax (Depends-on): Likewise.
11604         * modules/utimecmp (Depends-on): Likewise.
11605
11606 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
11607
11608         * lib/exclude.c: Include verify.h.
11609         (verify): Remove.  All callers changed to use verify.h's version.
11610         * lib/strtoimax.c: Likewise.
11611         * lib/utimecmp.c: Likewis.e
11612
11613         Sync from coreutils.
11614         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
11615         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
11616         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
11617         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
11618         bother returning ENOSYS if settimeofday or stime fails; just let
11619         them return whatever errno they want to return.
11620         * lib/utimens.c: Include unistd.h, for dup2.
11621         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
11622         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
11623
11624 2005-10-02  Jim Meyering  <jim@meyering.net>
11625
11626         Sync from coreutils.
11627         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
11628         from glibc-2.2.5 that fails for read-only files.
11629
11630 2005-10-02  Jim Meyering  <jim@meyering.net>
11631
11632         Sync from coreutils.
11633         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
11634         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
11635         `#if HAVE_CONFIG_H'.
11636         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
11637         Remove AT_FDCWD test.
11638         Do not consume the fd unless successful.
11639         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
11640         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
11641         block, so that we don't even try to compile it if settimeofday is
11642         available.  This works around a compilation failure on OSF1 V5.1,
11643         due to stime requiring a `long int*' while tv_sec is `int'.
11644
11645 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
11646
11647         Sync from coreutils.
11648         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
11649         against `yes', rather than just testing for nonempty.
11650
11651 2005-10-01  Simon Josefsson  <jas@extundo.com>
11652
11653         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
11654         and Darwin.
11655
11656         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
11657         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
11658         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
11659         freeaddrinfo and gai_strerror are declared by the POSIX headers.
11660         Check if struct addrinfo is declared.
11661
11662 2005-10-01  Simon Josefsson  <jas@extundo.com>
11663
11664         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
11665         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
11666         AI_* and EAI_* definitions.  Protect function declarations.
11667
11668 2005-10-01  Jim Meyering  <jim@meyering.net>
11669
11670         Sync from coreutils.
11671
11672         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
11673         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
11674         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
11675         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
11676         in the inet and nsl libraries.  Required on Solaris 5.7.
11677
11678 2005-10-01  Jim Meyering  <jim@meyering.net>
11679
11680         Sync from coreutils.
11681         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
11682         in the inet and nsl libraries.  Required on Solaris 5.7.
11683
11684 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
11685
11686         * lib/getdelim.c (getdelim): Remove unused variables.
11687
11688 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
11689
11690         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
11691         so that the code works even with ancient cpp.  Portability problem
11692         with GCC 2.7.2.1 reported by Thomas M.Ott.
11693
11694 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
11695
11696         * modules/regex (Depends-on): Add strcase.
11697
11698         * modules/gethostname (Licence): Change from GPL to LGPL, since
11699         gethostname.c is a trivial implementation of a standard library
11700         function.
11701         * modules/poll (License): Change from GPL to LGPL, since it's
11702         derived from LGPL code.
11703
11704 2005-09-27  Jim Meyering  <jim@meyering.net>
11705
11706         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
11707         HAVE_CONFIG_H.
11708
11709         * lib/intprops.h (signed_type_or_expr__): Define.
11710         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
11711         for unsigned types.
11712
11713 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
11714
11715         * lib/verify.h (verify_expr): Remove, replacing with:
11716         (verify_true): New macro that returns true instead of void.
11717         (verify_type__): Remove.
11718         (verify): Use verify_true rather than verify_type__.
11719
11720 2005-09-26  Bruno Haible  <bruno@clisp.org>
11721
11722         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
11723         is necessary.
11724         (lib_SOURCES): Remove mbchar.c.
11725         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
11726         (Files): Add m4/mbrtowc.m4.
11727         * modules/mbiter: Likewise.
11728         * modules/mbuiter: Likewise.
11729
11730 2005-09-26  Bruno Haible  <bruno@clisp.org>
11731
11732         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
11733         compile mbchar.c if they are not both present.
11734         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
11735         * m4/mbiter.m4 (gl_MBITER): Likewise.
11736         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
11737         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
11738         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
11739
11740 2005-09-25  Jim Meyering  <jim@meyering.net>
11741
11742         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
11743         also uses socklen_t.
11744
11745 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
11746
11747         * lib/utimens.c (ENOSYS): Define if not already defined.
11748         (futimens): Support having a null PATH if the file descriptor
11749         is nonnegative.
11750
11751         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
11752         Remove.
11753         (__attribute): Define to empty unless GCC 3.1 or later.
11754         This works around a core dump on OpenBSD 3.4, which has GCC
11755         2.95.3, which dumps core when given __attribute__(()).  It also
11756         simplifies other tests, since we really don't want to bother with
11757         worrying about which ancient version of GCC supported what.
11758         Original problem reported by Yoann Vandoorselaere, with part of
11759         the fix suggested by Derek Price.
11760
11761 2005-09-24  Jim Meyering  <jim@meyering.net>
11762
11763         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
11764         so we can once again use a positive bitfield width of 1 -- now we
11765         don't have to explain why we were using a bitfield width of 2.
11766
11767 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
11768
11769         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
11770         and similarly for the other external symbols.  Problem reported
11771         by James Gallager.
11772
11773         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
11774         bug reported by Jim Meyering.
11775
11776         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
11777         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
11778         not needed, since socklen is a prerequisite module.
11779
11780 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
11781
11782         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
11783         Problem reported by Eric Blake.
11784         (getaddrinfo): Initialize se so that it's not garbage.
11785         Redo internal storage allocation so that it doesn't make unportable
11786         assumptions about alignment.
11787         Fix a memory leak.
11788
11789         * lib/utimens.c (futimens): Use futimesat if available.
11790         Prefer it to futimes since it doesn't have the futimes bug.
11791
11792         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
11793         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
11794         Instead, declare a function that returns a pointer to an array,
11795         and use verify_type__ to declare the size of the array.
11796         Problem and germ of a solution reported by Bruno Haible.
11797         (verify_type__): Use 2, not 1, for bitfield size, to avoid
11798         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
11799
11800 2005-09-23  Jim Meyering  <jim@meyering.net>
11801
11802         Sync from coreutils.
11803         Correct build failure (socklen_t not defined) on at least
11804         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
11805         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
11806
11807 2005-09-23  Jim Meyering  <jim@meyering.net>
11808
11809         * modules/getaddrinfo (Depends-on): Add socklen.
11810
11811 2005-09-23  Bruno Haible  <bruno@clisp.org>
11812
11813         * tests/test-verify.c: New file.
11814
11815 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11816
11817         Sync from coreutils.
11818
11819         * modules/argmatch (Depends-on): Add verify.
11820         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
11821         unistd-safer.
11822         * modules/save-cwd (Depends-on): Likewise.
11823
11824         * modules/openat (Files): Add lib/openat-die.c.
11825         (Depends-on): Remove error, exitfail.
11826         Add dirname.
11827
11828         * modules/verify: New file.
11829         * MODULES.html.sh (Diagnostics <assert.h>): New section,
11830         with "verify" module.
11831
11832 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11833
11834         Sync from coreutils.
11835
11836         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
11837         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
11838         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
11839         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
11840         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
11841         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
11842         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
11843         Don't bother checking for string.h, stdlib.h, unistd.h.
11844         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
11845         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
11846         module's job.
11847         * m4/jm-macros.m4 (gl_MACROS): Likewise.
11848         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
11849
11850         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
11851         (gl_GETDATE): Use it.
11852
11853         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
11854
11855 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11856
11857         Sync from coreutils.
11858
11859         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
11860         stat-time.h.
11861         * lib/argmatch.h: Include verify.h
11862         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
11863         (ARGMATCH_ASSERT): Remove; unused.
11864         * lib/canonicalize.c: Assume STDC_HEADERS.
11865         * lib/exclude.c: Include "strcase.h".
11866         * lib/regex_internal.h [!defined _LIBC]: Likewise.
11867         * lib/getusershell.c: Include stdio--.h rather than stdio.h
11868         and stdio-safer.h.
11869         (getusershell): Call fopen, not fopen_safer.
11870         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
11871         Do not include unistd-safer.h.
11872         (save_cwd): Don't call fd_safer; no longer needed
11873         now that we include fcntl--.h.
11874
11875         * lib/getdate.y (relative_time): New type.
11876         (RELATIVE_TIME_0): New constant.
11877         (parser_control): Use relative_time instead of doing it ourselves.
11878         (%union): Add new relative_time rel member.
11879         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
11880         Now typeless.
11881         (relunit, relunit_snumber): Now of type rel.
11882         (zone, rel, relunit, get_date): Adjust to above changes.
11883
11884         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
11885         Do not include unistd-safer.h.
11886         (getloadavg): Don't call fd_safer; no longer needed
11887         now that we include fcntl--.h.
11888
11889         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
11890         (make_dir_parents): Treat ENOSYS like EEXIST.
11891
11892         Improve quality of diagnostics on restore_cwd failure.
11893         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
11894         (make_dir_parents): Last arg is now int * (for errno), not bool *.
11895         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
11896         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
11897         each time through the loop.  Do not diagnose restore_cwd failure;
11898         that is the caller's job (and perhaps the caller does not care).
11899
11900         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
11901         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
11902         If the file already exists but is not a directory, don't bother
11903         to try to make its parents.
11904         Close potential file descriptor leak if we can't chdir("/") (!).
11905         Don't always return true if chdir($PWD) fails; return true only
11906         if the requested action was done successfully (except for the
11907         chdir($PWD)).
11908         Don't log final directory unless we actually made it.
11909         Refactor to avoid duplicate code to fix up permissions.
11910         Don't attempt to fix up parent permissions if chdir($PWD) fails.
11911
11912         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
11913         to make it a bit faster and (I hope) clearer.
11914         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
11915         Fix bug in formats like %2N.
11916
11917         * lib/verify.h: New file.
11918
11919 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11920
11921         Sync from coreutils.
11922         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
11923
11924 2005-09-22  Jim Meyering  <jim@meyering.net>
11925
11926         Sync from coreutils.
11927
11928         * m4/lstat.m4 (gl_FUNC_LSTAT):
11929         Use AC_LIBSOURCES to require lstat.c and lstat.h.
11930         Remove obsolete comment.
11931         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
11932         * m4/xstrtod.m4: Likewise.
11933
11934         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
11935
11936 2005-09-22  Jim Meyering  <jim@meyering.net>
11937
11938         Sync from coreutils.
11939
11940         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
11941
11942         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
11943         the .tm_year member, since otherwise gcc-4.0 would now warn about
11944         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
11945
11946         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
11947         order to avoid an unsuppressible warning from gcc on 64-bit systems.
11948
11949         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
11950         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
11951         when run in a time zone for which daylight savings time is in effect
11952         for the starting date.
11953
11954         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
11955         stop us from restricting permissions of just-created absolute-named
11956         directories.
11957         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
11958         to restore initial working directory.
11959         * lib/mkdir-p.c (make_dir_parents): New parameter:
11960         different_working_dir, to tell caller if/when we change the working
11961         directory and are unable to return to the initial one.
11962         * lib/mkdir-p.h (make_dir_parents): Update prototype.
11963         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
11964         `return false'.  This fixes a bug introduced on 2004-07-30.
11965
11966         * lib/openat.c (fdopendir): Be sure to close the supplied
11967         file descriptor before returning.  This makes our replacement
11968         implementation a little closer to Solaris's, where fdopendir
11969         ties the file descriptor to the returned DIR* pointer.
11970         * lib/openat.c (unlinkat): New function.
11971         * lib/openat.h (unlinkat): Add prototype.
11972         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
11973         (openat_restore_fail): Rename from openat_restore_die.
11974         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
11975
11976         Provide an alternative to exiting immediately upon save_cwd or
11977         restore_cwd failure.  Now, an application can arrange e.g.,
11978         to perform a longjump in that case.
11979         * lib/openat.c: Include dirname.h.
11980         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
11981         (rpl_openat, fdopendir, fstatat): Call openat_save_die
11982         and openat_restore_die rather than calling error directly.
11983         Don't include "error.h" or "exitfail.h"; they're no longer needed.
11984
11985         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
11986         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
11987         define.
11988
11989         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
11990         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
11991                             int utc, int nanoseconds);
11992         Background:
11993         date should not have to allocate a megabyte of virtual memory to
11994         handle a format argument like +%1048575T.  When implemented with
11995         strftime, it must allocate such a buffer, use strftime to fill it
11996         in, print it, then free it.
11997         With fprintftime, it simply prints everything and exits.
11998         With no need for memory allocation, that's one fewer way to fail.
11999         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
12000         optional field width, not before, so we accept %9:z, not %:9z.
12001         (my_strftime): Be sure to use L_('x') for literals.
12002
12003         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
12004         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
12005         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
12006         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
12007         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
12008         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
12009         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
12010         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
12011         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
12012         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
12013         * lib/xgethostname.c, lib/xreadlink.c:
12014         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
12015
12016         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
12017         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
12018         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
12019         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
12020         and don't include <sys/file.h>).
12021
12022 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
12023
12024         Sync from coreutils.
12025
12026         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
12027         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
12028         [!LDAV_DONE]: Avoid unused variable warning.
12029
12030 2005-09-21  Bruno Haible  <bruno@clisp.org>
12031
12032         * lib/unicodeio.h (unicode_to_mb): New declaration.
12033
12034 2005-09-20  Derek Price  <derek@ximbiot.com>
12035
12036         * lib/getaddrinfo.c: Don't include <netdb.h> included from
12037         getaddrinfo.h.
12038
12039 2005-09-20  Bruno Haible  <bruno@clisp.org>
12040
12041         * gnulib-tool: Remove trailing slashes from the values specified for
12042         --source-base, --m4-base, --tests-base, --aux-dir.
12043         Suggested by Simon Josefsson <jas@extundo.com>.
12044
12045 2005-09-20  Bruno Haible  <bruno@clisp.org>
12046
12047         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
12048         func_modules_to_filelist, func_import, func_create_testdir): Make all
12049         sorting results locale-independent, so that gnulib-cache.m4 doesn't
12050         change when gnulib-tool is invoked in a different locale.
12051
12052 2005-09-19  Simon Josefsson  <jas@extundo.com>
12053
12054         * m4/socklen.m4: Fix typo.
12055
12056 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12057
12058         Use a consistent style for including <config.h>.
12059         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
12060         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
12061         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
12062         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
12063         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
12064         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
12065         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
12066         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
12067         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
12068         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
12069         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
12070         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
12071         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
12072         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
12073         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
12074         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
12075         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
12076         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
12077         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
12078         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
12079         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
12080         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
12081         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
12082         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
12083         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
12084         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
12085         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
12086         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
12087         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
12088         lib/xstrtoumax.c, lib/yesno.c:
12089         Standardize inclusion of config.h.
12090         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
12091         lib/inttostr.h:  Removed inclusion of config.h from header files.
12092         * lib/inttostr.c:  Adjusted in-tree users.
12093         * lib/timespec.h: Remove superfluous warning to include config.h.
12094         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
12095         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
12096         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
12097         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
12098         config.h with HAVE_CONFIG_H.
12099
12100 2005-09-19  Jim Meyering  <jim@meyering.net>
12101
12102         * modules/pathmax (License): Change to LGPL.
12103
12104 2005-09-19  Derek Price  <derek@ximbiot.com>
12105
12106         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
12107
12108 2005-09-19  Bruno Haible  <bruno@clisp.org>
12109
12110         * gnulib-tool (import): Provide default for --tests-base.
12111
12112 2005-09-19  Bruno Haible  <bruno@clisp.org>
12113
12114         * doc/quote.texi: New file, extracted from gnulib.texi.
12115         * doc/ctime.texi: New file, extracted from gnulib.texi.
12116         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
12117         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
12118         * doc/gnulib.texi: Include them.
12119
12120 2005-09-18  Bruno Haible  <bruno@clisp.org>
12121
12122         Portability fix.
12123         * gnulib-tool (func_readlink): New function.
12124         (func_ln_if_changed): Use it.
12125
12126 2005-09-18  Bruno Haible  <bruno@clisp.org>
12127
12128         * gnulib-tool: Support --with-tests also with --import.
12129         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
12130         (func_import): Use variables $testsbase and $inctests. Emit a
12131         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
12132         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
12133         SUBDIRS += $testsdir.
12134         (func_create_testdir): Update.
12135
12136 2005-09-18  Bruno Haible  <bruno@clisp.org>
12137
12138         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
12139         instead of $dry_run.
12140         (func_cp_if_changed, func_mv_if_changed): Remove functions.
12141         (func_ln_if_changed): Don't handle dry-run here.
12142         (func_import): In dry-run mode, detect more precisely which actions
12143         would be performed, and don't use "...ing" verbs.
12144
12145 2005-09-18  Bruno Haible  <bruno@clisp.org>
12146
12147         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
12148         (func_import): Use join on two temporary files instead of three nested
12149         loops, in order to determine which files are new or old.
12150
12151 2005-09-18  Bruno Haible  <bruno@clisp.org>
12152
12153         * gnulib-tool (func_import): Comment out code that spits out the
12154         new files with --dry-run.
12155
12156 2005-09-18  Bruno Haible  <bruno@clisp.org>
12157
12158         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
12159
12160 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
12161
12162         * lib/stat-time.h: New file.
12163         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
12164         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
12165         in a different way.
12166         (timespec_cmp): New function.
12167         * lib/utimecmp.c: Include stat-time.h.
12168         (SYSCALL_RESOLUTION): Depend on whether various struct stat
12169         members exist, not on the obsolescent ST_MTIM_NSEC.
12170         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
12171
12172 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
12173
12174         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
12175
12176 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
12177
12178         * MODULES.html.sh (File system functions): Add stat-time.
12179         * modules/stat-time: New file.
12180         * modules/timespec (Files): Remove m4/st_mtim.m4; this
12181         is now done in a different way, by the stat-time module.
12182         * modules/utimecmp (Depends-on): Add stat-time.
12183
12184 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
12185
12186         * m4/st_mtim.m4: Remove.  Superseded by...
12187         * m4/stat-time.m4: New file.
12188         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
12189         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
12190
12191 2005-09-15  Derek Price  <derek@ximbiot.com>
12192
12193         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
12194
12195 2005-09-15  Derek Price  <derek@ximbiot.com>
12196
12197         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
12198         * lib/regex_internal.c: Ditto, using this...
12199         (__GNUC_PREREQ): ...new macro.
12200         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
12201         using...
12202         (__GNUC_PREREQ): ...this new macro.
12203
12204         * lib/strstr.h: Include string.h. Define strstr as a macro here.
12205
12206 2005-09-15  Derek Price  <derek@ximbiot.com>
12207             Paul Eggert  <eggert@cs.ucla.edu>
12208
12209         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
12210         changes, consolidating in...
12211         * lib/regex_internal.h: ...this file.
12212
12213 2005-09-13  Jim Meyering  <jim@meyering.net>
12214
12215         * lib/canon-host.c: Filter through gnu indent and reword comments
12216         slightly.
12217         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
12218
12219 2005-09-13  Derek Price  <derek@ximbiot.com>
12220
12221         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
12222         failure.
12223         Reported by Jim Meyering  <jim@meyering.net>.
12224
12225 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
12226
12227         * lib/base64.c: Typo.
12228         (base64_encode): Put b64str in initialized data section.
12229
12230 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
12231
12232         Merge glibc and coreutils changes into gnulib, plus a few
12233         extra fixes.
12234         * lib/md5.c: Use #error rather than a string.
12235         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
12236         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
12237         (__attribute__): Define to empty for non recent-GCC.
12238         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
12239         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
12240         Renamed from their non-__ counterparts, with new macros replacing
12241         them if not _LIBC.  Add __THROW attribute.
12242         (rol): Remove.
12243         (struct md5_ctx): Align buffer if using GCC.
12244         * lib/sha1.h (struct sha1_ctx): Likewise.
12245         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
12246         The old name was backwards.
12247         (NOTSWAP): Remove; not used.
12248         (rol): New macro, moved here from md5.h.
12249         (sha1_process_block): Remove a FIXME that doesn't make sense.
12250
12251 2005-09-12  Derek Price  <derek@ximbiot.com>
12252
12253         Return usable errors from canon-host.
12254         * lib/canon-host.h: New file.
12255         * lib/canon-host.c (canon_host): Wrap...
12256         (canon_host_r): ...this new function, which now relies exclusively on
12257         getaddrinfo.
12258         (ch_strerror): New function.
12259         (last_cherror): New global.
12260         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
12261         interface.
12262         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
12263         void *.
12264         (freeaddrinfo): Free ai->ai_canonname when set.
12265
12266 2005-09-12  Derek Price  <derek@ximbiot.com>
12267
12268         Make canon-host require getaddrinfo.
12269         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
12270         AC_LIBSOURCE canon-host.h.  Call...
12271         (gl_PREREQ_CANON_HOST): ...this new function, which requires
12272         gl_GETADDRINFO.
12273         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
12274
12275 2005-09-12  Derek Price  <derek@ximbiot.com>
12276
12277         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
12278         LGPL.
12279         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
12280
12281 2005-09-12  Derek Price  <derek@ximbiot.com>
12282
12283         * lib/gai_strerror.c: Include config.h when available.  Include
12284         getaddrinfo.h before other headers to test interface.
12285         Reported by Larry Jones <lawrence.jones@ugs.com>.
12286
12287 2005-09-12  Derek Price  <derek@ximbiot.com>
12288             Paul Eggert  <eggert@cs.ucla.edu>
12289
12290         * modules/glob (Files): Add glob-libc.h.
12291
12292 2005-09-12  Derek Price  <derek@ximbiot.com>
12293             Paul Eggert  <eggert@cs.ucla.edu>
12294
12295         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
12296         glob_.h, glob-libc.h.
12297         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
12298
12299 2005-09-12  Derek Price  <derek@ximbiot.com>
12300             Paul Eggert  <eggert@cs.ucla.edu>
12301
12302         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
12303         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
12304         protecting things that should be done only in gnulib contexts.
12305         * lib/glob_.h: New file, containing only the glob things needed for
12306         gnulib.
12307         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
12308         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
12309         (glob, globfree, glob_pattern_p): Now defined simply in terms of
12310         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
12311         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
12312         and to respect the namespace rules better.
12313
12314 2005-09-08  Simon Josefsson  <jas@extundo.com>
12315
12316         * modules/socklen: New file.
12317
12318 2005-09-08  Simon Josefsson  <jas@extundo.com>
12319
12320         * m4/socklen.m4: New file.
12321
12322 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12323
12324         * modules/utimens (Files): Add m4/utimbuf.m4, since
12325         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
12326         Reported by Sergey Poznyakoff.
12327
12328 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12329
12330         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
12331         definitions, since that's the preferred style in glibc.
12332         Fix a minor spacing issue, and update copyright notice to match
12333         glibc's.
12334
12335 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12336
12337         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
12338
12339 2005-09-06  Simon Josefsson  <jas@extundo.com>
12340
12341         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
12342         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
12343
12344 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
12345
12346         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
12347         warning.
12348
12349 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
12350
12351         * config/srclist.txt: Add glibc bug 1302.
12352
12353 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
12354
12355         Change bitset word type from unsigned int to unsigned long int,
12356         as this has better performance on typical 64-bit hosts.
12357         Port bitset code to hosts with unusual word sizes.
12358         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
12359         (build_collating_symbol):
12360         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
12361         argument is a bitset.  This is merely a style issue, but it makes
12362         it clearer that an entire array is expected.
12363         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
12364         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
12365         Port to the case where bitset_word is not the same as unsigned int.
12366         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
12367         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
12368         Likewise.
12369         * lib/regexec.c (check_dst_limits_calc_pos_1,
12370         check_subexp_matching_top):
12371         (build_trtable, group_nodes_into_DFAstates):
12372         Likewise.
12373         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
12374         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
12375         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
12376         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
12377         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
12378         * lib/regcomp.c (optimize_subexps, lower_subexp):
12379         Work even if bitset_word has holes in its bitwise representation.
12380         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
12381         * lib/regexec.c (check_dst_limits_calc_pos_1,
12382         check_subexp_matching_top):
12383         Likewise.
12384         * lib/regex_internal.c (re_string_reconstruct):
12385         Don't assume UCHAR_MAX == 255.
12386         * lib/regex_internal.h (bitset_set_all): Likewise.
12387         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
12388         All uses changed.
12389         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
12390         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
12391         All uses changed.
12392         (BITSET_WORD_MAX): New macro.
12393         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
12394         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
12395         (bitset_empty, bitset_copy):
12396         Prefer sizeof (bitset) to multiplying it out ourselves.
12397         (bitset_not_merge): Remove; unused.
12398         (bitset_contain): Return bool, not unsigned int with one bit on.
12399         All callers changed.
12400         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
12401         alignment than re_node_set; do this by defining a new internal
12402         type struct dests_alloc and using it to allocate memory.
12403
12404 2005-09-05  Bruno Haible  <bruno@clisp.org>
12405
12406         * gnulib-tool (func_import): Fix comparison in handling of symbolic
12407         links.
12408
12409 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
12410
12411         * modules/size_max (Makefile.am): Add size_max.h
12412
12413 2005-09-04  Derek Price  <derek@ximbiot.com>
12414
12415         * gnulib-tool (func_import): Fix reversed $symbolic logic.
12416
12417 2005-09-03  Simon Josefsson  <jas@extundo.com>
12418
12419         * gnulib-tool: Fix typo.
12420
12421 2005-09-03  Simon Josefsson  <jas@extundo.com>
12422
12423         * config/srclist.txt: Add glibc bug 1293.
12424
12425 2005-09-03  Derek Price  <derek@ximbiot.com>
12426
12427         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
12428         From Larry Jones <lawrence.jones@ugs.com>.
12429
12430 2005-09-02  Simon Josefsson  <jas@extundo.com>
12431
12432         * modules/socklen: New file.
12433
12434 2005-09-02  Simon Josefsson  <jas@extundo.com>
12435
12436         * modules/havelib: New module.
12437
12438         * modules/gettext, modules/iconv, modules/lock, modules/readline:
12439         Use havelib.
12440
12441 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
12442
12443         Check for arithmetic overflow when calculating sizes, to prevent
12444         some buffer-overflow issues.  These patches are conservative, in the
12445         sense that when I couldn't determine whether an overflow was possible,
12446         I inserted a run-time check.
12447         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
12448         macros.
12449         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
12450         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
12451         (re_xnrealloc, re_x2nrealloc): New inline functions.
12452         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
12453         parse_bracket_exp):
12454         (build_equiv_class, build_charclass): Check for arithmetic overflow
12455         in size expression calculations.
12456         * lib/regex_internal.c (re_string_realloc_buffers):
12457         (build_wcs_upper_buffer, re_node_set_add_intersect):
12458         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
12459         (re_dfa_add_node, register_state): Likewise.
12460         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
12461         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
12462         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
12463         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
12464
12465 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
12466
12467         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
12468         m4/ulonglong.m4.  Problem reported by Martin Lambers.
12469
12470 2005-09-02  Bruno Haible  <bruno@clisp.org>
12471
12472         Support for lib vs. lib64 distinction on biarch platforms.
12473         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
12474         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
12475         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
12476
12477 2005-09-02  Bruno Haible  <bruno@clisp.org>
12478
12479         * gnulib-tool (import): In the other first-use case, provide defaults
12480         as well.
12481
12482 2005-09-02  Bruno Haible  <bruno@clisp.org>
12483
12484         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
12485         patches not yet found in the latest gettext release.
12486
12487 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
12488
12489         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
12490         to avoid a collision with bits/local_lim.h in glibc.
12491         All uses changed.  Problem reported by Dmitry V. Levin in
12492         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
12493
12494         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
12495         bugs in int versus size_t comparisons.
12496         (re_string_context_at): Fix bug where the code assumed that
12497         Idx is signed.
12498
12499         Use bool where appropriate.
12500         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
12501         All callers changed.
12502         (calc_eclosure_iter): Likewise, for ROOT arg.
12503         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
12504         (build_charclass_op): Likewise, for NON_MATCH arg.
12505         * lib/regex_internal.c (re_string_allocate, re_string_construct):
12506         (re_string_construct_common): Likewise, for ICASE arg.
12507         * lib/regexec.c (re_search_2_stub, re_search_stub):
12508         Likewise, for RET_LEN arg.
12509         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
12510         (set_regs): Likewise, for FL_BACKTRACK arg.
12511         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
12512         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
12513         (calc_eclosure_iter, parse_bracket_exp):
12514         Use bool for internal variables that are booleans.
12515         * lib/regexec.c (re_search_internal, check_matching,
12516         proceed_next_node):
12517         (set_regs, build_sifted_states, sift_states_bkref):
12518         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
12519         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
12520         (find_collation_sequence_value):
12521         Likewise.
12522         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
12523         (re_node_set_compare):
12524         Return bool, not int. All callers changed.
12525         * lib/regexec.c (check_halt_node_context, check_dst_limits):
12526         (build_trtable, check_node_accept): Likewise.
12527         * lib/regex_internal.h: Include stdbool.h.
12528
12529         Fix bugs uncovered when converting to bool.
12530         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
12531         failure instead of charging ahead blindly.
12532         * lib/regex_internal.c (register_state): Likewise.
12533         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
12534         for freeing internal storage.
12535         (group_nodes_into_DFA_states): Use unsigned int, not int, for
12536         bitset pieces used as boolean, to avoid undefined behavior
12537         on hosts that do int overflow checking.
12538
12539 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
12540
12541         * config/srclist.txt: Add glibc bugs 1285-1287.
12542
12543 2005-09-01  Jim Meyering  <jim@meyering.net>
12544
12545         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
12546         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
12547         Require gl_STAT_MACROS, too.
12548
12549 2005-09-01  Bruno Haible  <bruno@clisp.org>
12550
12551         * gnulib-tool (import): In the first-use case, provide defaults.
12552
12553 2005-09-01  Bruno Haible  <bruno@clisp.org>
12554
12555         * gnulib-tool (func_import): Remove the .tmp files.
12556
12557 2005-09-01  Bruno Haible  <bruno@clisp.org>
12558
12559         * gnulib-tool (func_import): Fix handling of symbolic links.
12560
12561 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12562
12563         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
12564         old glibc regex code mishandles strings longer than 2**31 bytes.
12565         This patch fixes this when the regex code is used in gnulib
12566         (i.e., outside glibc).
12567
12568         This patch should not affect the use of the regex code inside
12569         glibc.  No doubt this problem also needs to be handled for glibc
12570         as well, but the result will be an incompatible change to the
12571         glibc ABI, and the old ABI will have to be supported too.  That
12572         can be the the subject for another patch.
12573
12574         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
12575         governing whether the rest of this patch is active.  By default,
12576         the macro is disabled and the patch has no effect.
12577         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
12578         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
12579         (struct re_pattern_buffer, re_search, re_search_2, re_match):
12580         (re_match_2, re_set_registers): Use the new types.
12581         * lib/regex_internal.h (Idx, re_hashval_t): New types.
12582         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
12583         New macros.
12584         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
12585         (re_string_context_at, bin_tree_t, re_dfastate_t):
12586         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
12587         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
12588         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
12589         (re_string_char_size_at, re_string_wchar_at):
12590         (re_string_elem_size_at):
12591         Use the new types and macros to port to 64-bit hosts.
12592         Use unsigned types for internal values, so that the code
12593         mostly works even for arrays larger than SSIZE_MAX.
12594         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
12595         (search_duplicated_node, calc_eclosure_iter, fetch_number):
12596         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
12597         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
12598         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
12599         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
12600         (calc_inveclosure, parse_dup_op, build_range_exp):
12601         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
12602         (fetch_number, create_token_tree, mark_opt_subexp):
12603         Likewise.
12604         * lib/regex_internal.c (re_string_construct_common,
12605         create_ci_newstate):
12606         (create_cd_newstate, re_string_allocate, re_string_construct):
12607         (re_string_realloc_buffers, build_wcs_upper_buffer):
12608         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
12609         (re_string_reconstruct, re_string_peek_byte_case):
12610         (re_string_fetch_byte_case, re_string_context_at):
12611         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
12612         (re_node_set_init_copy, re_node_set_add_intersect):
12613         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
12614         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
12615         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
12616         (re_acquire_state, re_acquire_state_context, register_state):
12617         Likewise.
12618         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
12619         search_cur_bkref_entry):
12620         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
12621         (re_search_internal, re_search_2_stub, re_search_stub)
12622         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
12623         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
12624         (update_cur_sifted_state, check_dst_limits):
12625         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
12626         (check_subexp_limits, sift_states_bkref, merge_state_array):
12627         (check_subexp_matching_top, get_subexp, get_subexp_sub):
12628         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
12629         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
12630         (expand_bkref_cache, check_node_accept_bytes):
12631         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
12632         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
12633         (acquire_init_state_context, check_halt_node_context):
12634         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
12635         (sift_states_backward, clean_state_log_if_needed):
12636         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
12637         (find_recover_state, transit_state_sb, transit_state_mb):
12638         (transit_state_bkref, build_trtable, match_ctx_clean):
12639         Likewise.
12640         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
12641         to work around an assumption that REG_MISSING is negative.
12642
12643         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
12644         (seek_collating_symbol_entry) [defined _LIBC]:
12645         (lookup_collation_sequence_value) [defined _LIBC]:
12646         (build_range_exp, build_collating_symbol) [defined _LIBC]:
12647         Use prototypes rather than old-style function definitions.
12648         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
12649         (transit_state_sb) [0]:
12650         (find_collation_sequence_value) [defined _LIBC]: Likewise.
12651
12652         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
12653         rm_eo.
12654
12655         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
12656         (optimize_subexps, lower_subexp):
12657         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
12658         since the signed shift might overflow.  Use 1u<<31 instead.
12659         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
12660         Likewise.
12661         * lib/regexec.c (check_dst_limits_calc_pos_1,
12662         check_subexp_matching_top): Likewise.
12663
12664         * lib/regcomp.c (optimize_subexps, lower_subexp):
12665         Use CHAR_BIT rather than 8, for clarity.
12666         * lib/regexec.c (check_dst_limits_calc_pos_1):
12667         (check_subexp_matching_top): Likewise.
12668         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
12669         have to worry about portability issues when shifting it left.
12670         Remove no-longer-needed test for table_size > 0.
12671         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
12672         in a word, as the resulting behavior is undefined.
12673         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
12674         in one case, a <= should have been an <, and in another case the
12675         whole test was missing.
12676         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
12677         the standard name CHAR_BIT.
12678         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
12679         this is not true on one's complement and signed-magnitude hosts.
12680
12681         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
12682         next_last_offset.
12683         (struct re_dfa_t): Remove unused member states_alloc.
12684         * lib/regcomp.c (init_dfa): Don't initialize unused members.
12685
12686 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12687
12688         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
12689         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
12690         and large-file glibc and in 32-bit large-file Solaris.
12691
12692 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12693
12694         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
12695         lengths fit in regoff_t; this isn't true if regoff_t is the same
12696         width as size_t.
12697         * lib/regex.c (re_search_internal): 5th arg is LAST_START
12698         (= START + RANGE) instead of RANGE.  This avoids overflow
12699         problems when regoff_t is the same width as size_t.
12700         All callers changed.
12701         (re_search_2_stub): Check for overflow when adding the
12702         sizes of the two strings.
12703         (re_search_stub): Check for overflow when adding START
12704         to RANGE; if it occurs, substitute the extreme value.
12705
12706 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12707
12708         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
12709
12710 2005-08-31  Jim Meyering  <jim@meyering.net>
12711
12712         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
12713         a pointer-to-const.
12714         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
12715         (register_state): Likewise.
12716         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
12717         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
12718         (group_nodes_into_DFAstates): Likewise.
12719
12720 2005-08-31  Jim Meyering  <jim@meyering.net>
12721
12722         * check-module: Add a FIXME comment.
12723
12724 2005-08-31  Eric Blake  <ebb9@byu.net>
12725
12726         * modules/unistd-safer (Files): Add unistd--.h.
12727         * modules/stdio-safer (Files): Add stdio--.h.
12728
12729 2005-08-31  Derek Price  <derek@ximbiot.com>
12730
12731         * lib/getdelim.c (getdelim): Return EOF on EOF.
12732         Reported by Larry Jones <lawrence.jones@ugs.com>.
12733
12734 2005-08-31  Bruno Haible  <bruno@clisp.org>
12735
12736         Avoid unnecessary diffs in the generated lib/Makefile.am.
12737         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
12738         the generated files.
12739         (func_import): Don't set cmd.
12740
12741 2005-08-31  Bruno Haible  <bruno@clisp.org>
12742
12743         * lib/strstr.c: Include <stddef.h>, for NULL.
12744         * lib/strcasestr.c: Likewise.
12745         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
12746
12747 2005-08-31  Bruno Haible  <bruno@clisp.org>
12748
12749         * gnulib-tool: New option --macro-prefix.
12750         (func_import): Use macro_prefix.
12751         (import): Handle option --macro-prefix.
12752
12753 2005-08-31  Bruno Haible  <bruno@clisp.org>
12754
12755         * gnulib-tool (import): Rename most ac_* variables to cached_*.
12756         Also use new variables cached_lgpl, cached_libtool.
12757
12758 2005-08-31  Bruno Haible  <bruno@clisp.org>
12759
12760         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
12761         always instantiating them.
12762
12763 2005-08-31  Bruno Haible  <bruno@clisp.org>
12764
12765         * gnulib-tool (func_import): Read the previous cached settings
12766         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
12767         earlier added by gnulib but are now dropped. Warn when a gnulib file
12768         overwrites a non-gnulib file.
12769
12770 2005-08-31  Bruno Haible  <bruno@clisp.org>
12771
12772         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
12773         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
12774         projects that don't keep autogenerated files in CVS. Put into
12775         actioncmd only the specified modules, not the transitive closure.
12776
12777 2005-08-31  Bruno Haible  <bruno@clisp.org>
12778
12779         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
12780         Create directories that shall be filled.
12781         (import): Don't look for gl_* macros in configure.ac. Recurse across
12782         all directories containing a gnulib-cache.m4 files, if meaningful.
12783
12784 2005-08-31  Bruno Haible  <bruno@clisp.org>
12785
12786         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
12787         (import): Set seen_libtool when we see gl_LIBTOOL.
12788
12789 2005-08-31  Bruno Haible  <bruno@clisp.org>
12790
12791         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
12792         declaration macro definitions from generated gnulib.m4.
12793
12794 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
12795
12796         * lib/iconvme.h: Add prototype for iconv_alloc.
12797
12798 2005-08-29  Simon Josefsson  <jas@extundo.com>
12799
12800         * lib/iconvme.c: Fix errno.
12801
12802 2005-08-29  Bruno Haible  <bruno@clisp.org>
12803
12804         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
12805         that it works when the directory contains spaces.
12806
12807 2005-08-29  Bruno Haible  <bruno@clisp.org>
12808
12809         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
12810
12811 2005-08-29  Bruno Haible  <bruno@clisp.org>
12812
12813         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
12814         Emit more advice.
12815
12816 2005-08-29  Bruno Haible  <bruno@clisp.org>
12817         and Stepan Kasal  <kasal@ucw.cz>
12818
12819         * check-module: If more parameters are given, check each of them
12820         separately; add more exceptions, as noted by Jim Meyering.
12821         (check_module): New procedure.
12822         (%exempt_header): Now contains all exceptions.
12823
12824 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
12825
12826         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
12827
12828 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
12829
12830         * lib/iconvme.c: Split iconv_string into iconv_alloc.
12831
12832 2005-08-28  Bruno Haible  <bruno@clisp.org>
12833
12834         * m4/gnulib-tool.m4: New file.
12835
12836 2005-08-27  Jim Meyering  <jim@meyering.net>
12837
12838         * modules/unistd-safer (Files): Add pipe-safer.c.
12839         * modules/fcntl-safer (Files): Add creat-safer.c.
12840
12841 2005-08-27  Jim Meyering  <jim@meyering.net>
12842
12843         * m4/stdlib-safer.m4: New file.  From coreutils.
12844         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
12845         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
12846         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
12847         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
12848         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
12849
12850 2005-08-27  Jim Meyering  <jim@meyering.net>
12851
12852         * lib/fopen-safer.c: Merge minor changes from coreutils.
12853         * lib/dup-safer.c: Likewise.
12854         * lib/fd-safer.c: Likewise.
12855
12856         Merge from coreutils.
12857         * lib/stdio--.h: New file.
12858         * lib/stdlib--.h: New file.
12859         * lib/mkstemp-safer.c: New file.
12860
12861         GNU tar needs these.
12862         * lib/pipe-safer.c: New file.
12863         * lib/creat-safer.c: New file.
12864         * lib/fcntl--.h (creat): Define to creat_safer.
12865         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
12866         * lib/unistd--.h (pipe): Define to pipe_safer.
12867         * lib/unistd-safer.h: Declare pipe_safer.
12868
12869 2005-08-26  Simon Josefsson  <jas@extundo.com>
12870
12871         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
12872         Haible <bruno@clisp.org>.
12873
12874 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
12875
12876         * lib/regex_internal.h: Remove all references to
12877         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
12878         or better.
12879         (bitset_not, bitset_merge, bitset_not_merge):
12880         (bitset_mask, re_string_allocate, re_string_construct):
12881         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
12882         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
12883         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
12884         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
12885         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
12886         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
12887         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
12888         (re_acquire_state_context):
12889         Remove unnecessary forward decls.
12890         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
12891         Put __attribute at function definition,
12892         now that the function decl has been removed.
12893         * lib/regex_internal.c (re_string_peek_byte_case):
12894         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
12895         Likewise.
12896
12897 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
12898
12899         * m4/regex.m4: Add AC_PREREQ(2.50).
12900         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
12901
12902 2005-08-25  Simon Josefsson  <jas@extundo.com>
12903
12904         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
12905         __fsetlocking.
12906
12907 2005-08-25  Simon Josefsson  <jas@extundo.com>
12908
12909         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
12910         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
12911         GLIBC specific code.
12912
12913 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12914
12915         Make regex safe for g++.  This fixes one real bug (an "err"
12916         that should have been "*err").  g++ problem reported by
12917         Sam Steingold.
12918         * lib/regex_internal.h (re_calloc): New macro, consistent with
12919         re_malloc etc.  All callers of calloc changed to use re_calloc.
12920         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
12921         not int.  All callers changed.
12922         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
12923         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
12924         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
12925         (find_recover_state): Change "err" to "*err"; this fixes what
12926         appears to be a real bug.
12927         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
12928         versus int.
12929
12930 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12931
12932         * modules/regex (Depends-on): Add malloc, since the code
12933         assumes that !malloc(0) means failure.
12934
12935 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12936
12937         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
12938
12939         alloca modernization/simplification for regex.
12940         * lib/regex.c: Remove portability cruft for alloca.  This no longer
12941         needs to be at the start of the file, and can be moved into
12942         regex_internal.h and simplified.
12943         * lib/regex_internal.h: Include <alloca.h>.
12944         (__libc_use_alloca) [!defined _LIBC]: New macro.
12945         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
12946         now works outside glibc.
12947
12948 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12949
12950         * config/srclist.txt: Add glibc bugs 1241, 1245.
12951
12952 2005-08-25  Jim Meyering  <jim@meyering.net>
12953
12954         * lib/open-safer.c: Include <config.h>.
12955         Otherwise, we'd lose LARGEFILE support in any file using
12956         e.g. "fcntl--.h"
12957
12958 2005-08-25  Bruno Haible  <bruno@clisp.org>
12959
12960         * m4/minmax.m4: Require autoconf 2.52.
12961         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
12962         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
12963         alternatives of translit over the alphabet.
12964         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
12965
12966 2005-08-24  Simon Josefsson  <jas@extundo.com>
12967
12968         * tests/test-getpass.c: New file.
12969
12970 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12971
12972         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
12973         for GNU regex features.
12974
12975 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12976
12977         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
12978         * lib/regex.h (regerror): Likewise.
12979
12980         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
12981         requires this.  (The code never needed it.)
12982
12983         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
12984         All uses of recently-renamed identifiers changed to use the new,
12985         POSIX-compliant names.  The code will build and run just fine
12986         without these changes, but it's better to eat our own dog food
12987         and use the standard-conforming names.
12988
12989         * lib/regex.h: Fix a multitude of POSIX name space violations.
12990         These changes have an effect only for programs that define
12991         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
12992         do not change anything for programs compiled in the normal way.
12993         Also, there is no effect on the ABI.
12994
12995         (_REGEX_SOURCE): New macro.
12996         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
12997         defined and _GNU_SOURCE is not; this fixes a name space violation.
12998
12999         Rename the following macros to obey POSIX requirements.
13000         The old names are still visible as macros if _REGEX_SOURCE is defined.
13001         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
13002         RE_BACKSLASH_ESCAPE_IN_LISTS.
13003         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
13004         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
13005         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
13006         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
13007         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
13008         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
13009         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
13010         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
13011         (REG_INTERVALS): renamed from RE_INTERVALS.
13012         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
13013         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
13014         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
13015         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
13016         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
13017         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
13018         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
13019         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
13020         RE_UNMATCHED_RIGHT_PAREN_ORD.
13021         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
13022         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
13023         (REG_DEBUG): renamed from RE_DEBUG.
13024         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
13025         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
13026         unusual, since we can't clash with the POSIX REG_ICASE.
13027         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
13028         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
13029         (REG_NO_SUB): renamed from RE_NO_SUB.
13030         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
13031         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
13032         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
13033         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
13034         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
13035         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
13036         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
13037         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
13038         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
13039         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
13040         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
13041         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
13042         RE_SYNTAX_POSIX_MINIMAL_BASIC.
13043         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
13044         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
13045         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
13046         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
13047         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
13048         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
13049         (REG_FIXED): Renamed from REGS_FIXED.
13050         (REG_NREGS): Renamed from RE_NREGS.
13051
13052         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
13053         of other REG_* macros, since POSIX says the user is allowed to
13054         #undef these macros selectively.
13055
13056         (reg_errcode_t): Update comment stating what other tables need
13057         to be consistent.
13058
13059         Rename the following enum values to obey POSIX requirements.
13060         The old names are still visible as macros.
13061         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
13062         is not defined, since GNU is supposed to be a superset of POSIX as
13063         much as possible, and since we want reg_errcode_t to be a signed
13064         type for implementation consistency.
13065         (_REG_NOERROR): Renamed from REG_NOERROR.
13066         (_REG_NOMATCH): Renamed from REG_NOMATCH.
13067         (_REG_BADPAT): Renamed from REG_BADPAT.
13068         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
13069         (_REG_ECTYPE): Renamed from REG_ECTYPE.
13070         (_REG_EESCAPE): Renamed from REG_EESCAPE.
13071         (_REG_ESUBREG): Renamed from REG_ESUBREG.
13072         (_REG_EBRACK): Renamed from REG_EBRACK.
13073         (_REG_EPAREN): Renamed from REG_EPAREN.
13074         (_REG_EBRACE): Renamed from REG_EBRACE.
13075         (_REG_BADBR): Renamed from REG_BADBR.
13076         (_REG_ERANGE): Renamed from REG_ERANGE.
13077         (_REG_ESPACE): Renamed from REG_ESPACE.
13078         (_REG_BADRPT): Renamed from REG_BADRPT.
13079         (_REG_EEND): Renamed from REG_EEND.
13080         (_REG_ESIZE): Renamed from REG_ESIZE.
13081         (_REG_ERPAREN): Renamed from REG_ERPAREN.
13082         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
13083         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
13084         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
13085         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
13086
13087         (_REG_RE_NAME, _REG_RM_NAME): New macros.
13088         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
13089         changed.  But support the old name if the new one is not defined
13090         and if _REGEX_SOURCE.
13091
13092         Change the following member names in struct re_pattern_buffer.
13093         The old names are still supported if !_REGEX_SOURCE.
13094         The new names are always supported, regardless of _REGEX_SOURCE.
13095         (re_buffer): Renamed from buffer.
13096         (re_allocated): Renamed from allocated.
13097         (re_used): Renamed from used.
13098         (re_syntax): Renamed from syntax.
13099         (re_fastmap): Renamed from fastmap.
13100         (re_translate): Renamed from translate.
13101         (re_can_be_null): Renamed from can_be_null.
13102         (re_regs_allocated): Renamed from regs_allocated.
13103         (re_fastmap_accurate): Renamed from fastmap_accurate.
13104         (re_no_sub): Renamed from no_sub.
13105         (re_not_bol): Renamed from not_bol.
13106         (re_not_eol): Renamed from not_eol.
13107         (re_newline_anchor): Renamed from newline_anchor.
13108
13109         Change the following member names in struct re_registers.
13110         The old names are still supported if !_REGEX_SOURCE.
13111         The new names are always supported, regardless of _REGEX_SOURCE.
13112         (rm_num_regs): Renamed from num_regs.
13113         (rm_start): Renamed from start.
13114         (rm_end): Renamed from end.
13115
13116         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
13117         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
13118         Prepend __ to parameter names.
13119
13120         Undo yesterday's changes.
13121
13122 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
13123
13124         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
13125         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
13126         lib/regex.c.
13127
13128 2005-08-24  Jim Meyering  <jim@meyering.net>
13129
13130         Sync from coreutils.
13131         * m4/fcntl-safer.m4: New file.
13132
13133         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
13134         and object files for this module.
13135
13136 2005-08-24  Jim Meyering  <jim@meyering.net>
13137
13138         Sync from coreutils.
13139         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
13140
13141 2005-08-24  Jim Meyering  <jim@meyering.net>
13142
13143         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
13144         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
13145
13146 2005-08-24  Jim Meyering  <jim@meyering.net>
13147
13148         * modules/fcntl-safer: New module.
13149         * modules/fts (Depends-on): Add fcntl-safer.
13150         * MODULES.html.sh (File descriptor based Input/Output):
13151         Add fcntl-safer.
13152
13153 2005-08-24  Bruno Haible  <bruno@clisp.org>
13154
13155         Support for unit test modules.
13156         * modules/README: Mention tests modules.
13157         * modules/TEMPLATE-TESTS: New file.
13158         * gnulib-tool: New options --extract-tests-module, --with-tests and
13159         --tests-base (unused for the moment).
13160         (testsbase, inctests): New variables.
13161         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
13162         (func_verify_module): Exclude TEMPLATE-TESTS.
13163         (func_verify_nontests_module, func_verify_tests_module): New functions.
13164         (func_get_dependencies): Add implicit dependency for tests modules.
13165         (func_get_tests_module): New function.
13166         (func_modules_transitive_closure): When --with-tests was specified,
13167         include the unit tests as well, unless explicitly avoided.
13168         (func_emit_lib_Makefile_am): Ignore the tests modules here.
13169         (func_emit_tests_Makefile_am): New function.
13170         (func_create_testdir): When --with-tests was specified, emit a
13171         tests/ directory.
13172         * MODULES.html.sh (Future developments): Update.
13173
13174 2005-08-24  Bruno Haible  <bruno@clisp.org>
13175
13176         * modules/tls-tests: New file.
13177         * tests/test-tls.c: New file, from GNU gettext.
13178
13179 2005-08-24  Bruno Haible  <bruno@clisp.org>
13180
13181         * modules/lock-tests: New file.
13182         * tests/test-lock.c: New file, from GNU gettext.
13183
13184 2005-08-24  Bruno Haible  <bruno@clisp.org>
13185
13186         * lib/lock.h: Add multiple inclusion guard.
13187         * lib/tls.h: Add multiple inclusion guard.
13188
13189 2005-08-24  Bruno Haible  <bruno@clisp.org>
13190
13191         * gnulib-tool: Add support for the --aux-dir option to
13192         --create-testdir, --create-megatestdir, --test, --megatest.
13193         (func_create_testdir, func_create_megatestdir): Optionally emit a
13194         AC_CONFIG_AUX_DIR directive.
13195         (create-testdir, create-megatestdir, test, megatest): Provide a
13196         default value for $auxdir.
13197
13198 2005-08-24  Bruno Haible  <bruno@clisp.org>
13199
13200         * gnulib-tool (import): Use compound statement instead of subshell
13201         where possible.
13202
13203 2005-08-24  Bruno Haible  <bruno@clisp.org>
13204
13205         * gnulib-tool (import): Change --aux-dir default to "build-aux".
13206
13207 2005-08-24  Bruno Haible  <bruno@clisp.org>
13208
13209         * gnulib-tool (func_version): Update.
13210
13211 2005-08-24  Bruno Haible  <bruno@clisp.org>
13212
13213         * gnulib-tool (func_import, func_create_testdir,
13214         func_create_megatestdir): Quote all autoconf macro arguments.
13215
13216 2005-08-24  Bruno Haible  <bruno@clisp.org>
13217
13218         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
13219         option --force, because --force causes the aclocal.m4 of each
13220         subdirectory to be newer than the corresponding config.h.in.
13221
13222 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
13223
13224         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
13225         All contents moved to gl_REGEX.
13226         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
13227         assume that it does.
13228
13229 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
13230
13231         * lib/regex.h (REG_NOSYS)
13232         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
13233         Define, since POSIX requires it as of 2001.
13234         (_REG_ENOSYS)
13235         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
13236         New private symbol, used to keep the enum signed in all cases.
13237         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
13238         Youngman in
13239         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
13240
13241         * lib/regex_internal.c (re_string_skip_chars, register_state):
13242         (calc_state_hash):
13243         Remove forward decls; no longer needed now that we use prototypes.
13244         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
13245         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
13246         (clean_state_log_if_needed): Likewise.
13247
13248 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
13249
13250         * config/srclist.txt: Add glibc bugs 1231-1233.
13251
13252 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13253
13254         Fix problems reported by Sam Steingold in
13255         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
13256         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
13257         assumed that reg_errcode_t is a signed type, which is not
13258         necessarily true if _XOPEN_SOURCE is not defined.
13259         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
13260         since some compilers warn about it otherwise.
13261
13262 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13263
13264         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
13265         (init_word_char, create_initial_state, duplicate_node_closure):
13266         (fetch_token, peek_token_bracket, build_range_exp):
13267         (build_collating_symbol): Remove forward decls; no longer needed
13268         now that we use prototypes.
13269
13270         * lib/regcomp.c:
13271         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
13272         (re_compile_fastmap_iter, regcomp, regerror, regfree):
13273         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
13274         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
13275         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
13276         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
13277         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
13278         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
13279         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
13280         (build_range_exp, build_collating_symbol, parse_bracket_exp):
13281         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
13282         (build_charclass, build_charclass_op, fetch_number, create_tree):
13283         (create_token_tree, mark_opt_subexp, duplicate_tree):
13284         Use prototypes rather than old-style definitions.
13285
13286         * lib/regex_internal.c:
13287         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
13288         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
13289         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
13290         (re_string_reconstruct, re_string_peek_byte_case):
13291         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
13292         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
13293         (re_node_set_init_copy, re_node_set_add_intersect):
13294         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
13295         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
13296         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
13297         (re_acquire_state, re_acquire_state_context, register_state):
13298         (create_ci_newstate, create_cd_newstate, free_state):
13299         Likewise.
13300         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
13301         re_search_2):
13302         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
13303         (re_search_internal, prune_impossible_nodes):
13304         (acquire_init_state_context, check_matching, static):
13305         (check_halt_node_context, check_halt_state_context, proceed_next_node):
13306         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
13307         (update_regs, sift_states_backward, build_sifted_states):
13308         (clean_state_log_if_needed, merge_state_array):
13309         (update_cur_sifted_state, add_epsilon_src_nodes):
13310         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
13311         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
13312         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
13313         (find_recover_state, check_subexp_matching_top, transit_state_mb):
13314         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
13315         (check_arrival, check_arrival_add_next_nodes):
13316         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
13317         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
13318         (check_node_accept_bytes, check_node_accept, extend_buffers):
13319         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
13320         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
13321         (sift_ctx_init):
13322         Likewise.
13323
13324         * lib/regex_internal.h:
13325         (re_string_allocate, re_string_construct, re_string_reconstruct):
13326         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
13327         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
13328         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
13329         (re_string_context_at, re_string_peek_byte_case):
13330         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
13331         is defined, since we now use prototypes always.
13332
13333         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
13334         C89 or better.  All uses removed.
13335
13336 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13337
13338         * config/srclist.txt: Add glibc bugs 1220-1227.
13339
13340 2005-08-20  Jim Meyering  <jim@meyering.net>
13341
13342         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
13343         of unused local, dfa.
13344
13345 2005-08-20  Bruno Haible  <bruno@clisp.org>
13346
13347         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
13348
13349 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13350
13351         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
13352         (re_node_set_insert_last, re_dfa_add_node):
13353         Rename local variables to avoid GCC shadowing warnings.
13354
13355 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13356
13357         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
13358         [defined lint]: Suppress bogus uninitialized-variable warnings.
13359
13360         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
13361         and let the caller return REG_ESPACE if out of space.  This
13362         removes an uninitialied-variable warning with GCC 4.0.1, and also
13363         avoids taking the address of a local variable.  All callers
13364         changed.
13365
13366 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13367
13368         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
13369         $LIBCSRC/posix/regexec.c.
13370         Add glibc bug 1217 for regcomp.c.
13371
13372 2005-08-19  Jim Meyering  <jim@meyering.net>
13373
13374         * lib/regexec.c (proceed_next_node): Redo local variables to
13375         avoid GCC shadowing warnings.
13376
13377 2005-08-18  Bruno Haible  <bruno@clisp.org>
13378
13379         * lib/strstr.c (strstr): Fix return value in multibyte case.
13380         * lib/strcasestr.c (strcasestr): Likewise.
13381
13382 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
13383
13384         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
13385
13386 2005-08-17  Jim Meyering  <jim@meyering.net>
13387
13388         Make the %s format (seconds since the epoch) work for a negative
13389         number and when used with a zero-padded field width, e.g. %015s.
13390
13391         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
13392         label so that it precedes the code to set `digits'.  Otherwise,
13393         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
13394         print `00-22'.  Now, it prints `-0022', as it should.
13395
13396 2005-08-17  Bruno Haible  <bruno@clisp.org>
13397
13398         * modules/strstr (Files): Add m4/mbrtowc.m4.
13399         (Depends-on): Add mbuiter.
13400
13401 2005-08-17  Bruno Haible  <bruno@clisp.org>
13402
13403         * modules/strcasestr: New file.
13404         * MODULES.html.sh (String handling, based on ANSI C 89): Add
13405         strcasestr.
13406
13407 2005-08-17  Bruno Haible  <bruno@clisp.org>
13408
13409         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
13410
13411 2005-08-17  Bruno Haible  <bruno@clisp.org>
13412
13413         * modules/mbuiter: New file.
13414         * MODULES.html.sh (Extended multibyte and wide character utilities):
13415         Add mbuiter.
13416
13417 2005-08-17  Bruno Haible  <bruno@clisp.org>
13418
13419         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
13420         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
13421
13422 2005-08-17  Bruno Haible  <bruno@clisp.org>
13423
13424         * m4/strcasestr.m4: New file.
13425
13426 2005-08-17  Bruno Haible  <bruno@clisp.org>
13427
13428         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
13429         * lib/strstr.c: Completely rewritten, with multibyte locale support.
13430
13431 2005-08-17  Bruno Haible  <bruno@clisp.org>
13432
13433         * lib/strcasestr.h: New file.
13434         * lib/strcasestr.c: New file.
13435
13436 2005-08-17  Bruno Haible  <bruno@clisp.org>
13437
13438         * lib/strcasecmp.c: Use mbuiter.h.
13439
13440 2005-08-17  Bruno Haible  <bruno@clisp.org>
13441
13442         * lib/mbuiter.h: New file.
13443
13444 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
13445
13446         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
13447         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
13448         and gl_GETOPT are both invoked via different paths (as happens
13449         with GNU tar CVS because it uses both argp and getopt), the former
13450         wins.
13451
13452 2005-08-16  Bruno Haible  <bruno@clisp.org>
13453
13454         * modules/tls: New file.
13455         * MODULES.html.sh (Multithreading): Add tls.
13456
13457 2005-08-16  Bruno Haible  <bruno@clisp.org>
13458
13459         * modules/strnlen1: New file.
13460         * MODULES.html.sh (String handling): Add strnlen1.
13461
13462 2005-08-16  Bruno Haible  <bruno@clisp.org>
13463
13464         * modules/strcase (Files): Add m4/mbrtowc.m4.
13465         (Depends-on): Add strnlen1, mbchar.
13466
13467 2005-08-16  Bruno Haible  <bruno@clisp.org>
13468
13469         * modules/mbiter: New file.
13470         * MODULES.html.sh (Extended multibyte and wide character utilities):
13471         Add mbiter.
13472
13473 2005-08-16  Bruno Haible  <bruno@clisp.org>
13474
13475         * modules/mbfile: New file.
13476         * MODULES.html.sh (Extended multibyte and wide character utilities):
13477         Add mbfile.
13478
13479 2005-08-16  Bruno Haible  <bruno@clisp.org>
13480
13481         * modules/mbchar: New file.
13482         * MODULES.html.sh (Extended multibyte and wide character utilities):
13483         New section.
13484
13485 2005-08-16  Bruno Haible  <bruno@clisp.org>
13486
13487         * m4/tls.m4: New file, from GNU gettext.
13488
13489 2005-08-16  Bruno Haible  <bruno@clisp.org>
13490
13491         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
13492         always.
13493         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
13494
13495 2005-08-16  Bruno Haible  <bruno@clisp.org>
13496
13497         * m4/mbiter.m4: New file.
13498
13499 2005-08-16  Bruno Haible  <bruno@clisp.org>
13500
13501         * m4/mbfile.m4: New file.
13502
13503 2005-08-16  Bruno Haible  <bruno@clisp.org>
13504
13505         * m4/mbchar.m4: New file.
13506
13507 2005-08-16  Bruno Haible  <bruno@clisp.org>
13508
13509         * lib/tls.h: New file, from GNU gettext.
13510         * lib/tls.c: New file, from GNU gettext.
13511
13512 2005-08-16  Bruno Haible  <bruno@clisp.org>
13513
13514         * lib/strnlen1.h: New file.
13515         * lib/strnlen1.c: New file.
13516
13517 2005-08-16  Bruno Haible  <bruno@clisp.org>
13518
13519         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
13520         (mbi_init): Update.
13521         (mbi_avail, mbi_advance): Let the iteration end before the terminating
13522         NUL byte, not after it.
13523
13524 2005-08-16  Bruno Haible  <bruno@clisp.org>
13525
13526         * lib/strcase.h (strcasecmp): Add note in comments.
13527         * lib/strncasecmp.c: Use code from strcasecmp.c.
13528         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
13529         (strcasecmp): Work correctly in multibyte locales.
13530
13531 2005-08-16  Bruno Haible  <bruno@clisp.org>
13532
13533         * lib/mbiter.h: New file.
13534
13535 2005-08-16  Bruno Haible  <bruno@clisp.org>
13536
13537         * lib/mbfile.h: New file.
13538
13539 2005-08-16  Bruno Haible  <bruno@clisp.org>
13540
13541         * lib/mbchar.h: New file.
13542         * lib/mbchar.c: New file.
13543
13544 2005-08-16  Bruno Haible  <bruno@clisp.org>
13545
13546         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
13547         the valid ones. Makes the comparison operations transitive:
13548         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
13549         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
13550
13551 2005-08-15  Simon Josefsson  <jas@extundo.com>
13552
13553         * modules/ssize_t (License): Change to 'unlimited'.
13554
13555         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
13556
13557 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
13558
13559         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
13560         Add comments for each pending glibc patch.
13561
13562 2005-08-15  Bruno Haible  <bruno@clisp.org>
13563
13564         * lib/regex.h (__restrict_arr): Don't define to __restrict if
13565         __cplusplus is defined.
13566
13567 2005-08-14  Jim Meyering  <jim@meyering.net>
13568
13569         Sync from coreutils.
13570
13571         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
13572         Use the hash-table-based cycle-detection code not just when
13573         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
13574         Reported by James Youngman in
13575         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
13576         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
13577         FTS_TIGHT_CYCLE_CHECK.
13578         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
13579         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
13580         once again.
13581         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
13582         * lib/fts.c (fd_safer): Remove decl.
13583         Include fcntl--.h rather than unistd-safer.h
13584         (fts_safe_changedir): Don't call fd_safer; no longer needed
13585         now that we include fcntl--.h.
13586
13587 2005-08-12  Simon Josefsson  <jas@extundo.com>
13588
13589         * modules/getndelim2: Use ssize_t module.
13590         * modules/getnline: Likewise.
13591         * modules/safe-read: Likewise.
13592         * modules/xreadlink: Likewise.
13593
13594         * modules/ssize_t: New file.
13595
13596 2005-08-12  Simon Josefsson  <jas@extundo.com>
13597
13598         * m4/readline.m4: Look for termcap, curses or ncurses if required.
13599
13600 2005-08-12  Simon Josefsson  <jas@extundo.com>
13601
13602         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13603         ssize_t.
13604
13605 2005-08-12  Simon Josefsson  <jas@extundo.com>
13606
13607         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
13608         readline, getdelim and check_version.
13609         (Support for systems lacking ISO C 99: Sizes of integer types):
13610         Add size_max.
13611
13612 2005-08-12  Bruno Haible  <bruno@clisp.org>
13613
13614         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
13615
13616 2005-08-11  Simon Josefsson  <jas@extundo.com>
13617
13618         * modules/readline: New file.
13619
13620         * modules/strnlen (Files): Add strnlen.h.
13621
13622 2005-08-11  Simon Josefsson  <jas@extundo.com>
13623
13624         * m4/readline.m4: New file.
13625
13626 2005-08-11  Simon Josefsson  <jas@extundo.com>
13627
13628         * lib/readline.h, readline.c: New file.
13629
13630 2005-08-11  Simon Josefsson  <jas@extundo.com>
13631
13632         * doc/gnulib.texi (Initial import, Finishing touches): Mention
13633         gl_AVOID.
13634
13635 2005-08-11  Bruno Haible  <bruno@clisp.org>
13636
13637         * lib/strnlen.h (strnlen): Change parameter name to match comment.
13638
13639 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
13640
13641         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
13642
13643 2005-08-10  Simon Josefsson  <jas@extundo.com>
13644
13645         * tests/test-iconvme.c: New file.
13646
13647 2005-08-10  Simon Josefsson  <jas@extundo.com>
13648
13649         * m4/strnlen.m4: New file.
13650
13651         * m4/strndup.m4: Don't check for strnlen declaration, done in
13652         strnlen.m4.
13653
13654 2005-08-10  Simon Josefsson  <jas@extundo.com>
13655
13656         * lib/strndup.c: Use strnlen.h.
13657
13658         * lib/strnlen.h: New file.
13659
13660 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
13661
13662         * README: Typos.
13663
13664 2005-08-02  Simon Josefsson  <jas@extundo.com>
13665
13666         * modules/readline: New file.
13667
13668 2005-08-02  Simon Josefsson  <jas@extundo.com>
13669
13670         * modules/getdelim: New file.
13671
13672         * modules/getline: Rewrite, don't use getndelim2.
13673
13674 2005-08-02  Simon Josefsson  <jas@extundo.com>
13675
13676         * m4/getline.m4: Separate out getdelim stuff into separate module.
13677
13678         * m4/getdelim.m4: New file.
13679
13680 2005-08-02  Simon Josefsson  <jas@extundo.com>
13681
13682         * lib/getline.h, getline.c: Rewrite.
13683
13684         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
13685
13686 2005-07-31  Bruno Haible  <bruno@clisp.org>
13687
13688         * lib/lock.h (gl_lock_initializer): New macro.
13689         (gl_lock_define_initialized): Use it.
13690         (gl_rwlock_initializer): New macro.
13691         (gl_rwlock_define_initialized): Use it.
13692         (gl_recursive_lock_initializer): New macro.
13693         (gl_recursive_lock_define_initialized): Use it.
13694
13695 2005-07-30  Karl Berry  <karl@gnu.org>
13696
13697         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
13698         Report from Ben Pfaff, regarding getopt.
13699
13700 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
13701
13702         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
13703         normal way.
13704         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
13705         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
13706         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
13707         (gl_GETOPT): Use the new macros.  Most of the implementation
13708         is moved to the new macros.  This is for programs like Emacs
13709         that don't want all the functionality of gl_GETOPT.
13710
13711 2005-07-26  Bruno Haible  <bruno@clisp.org>
13712
13713         * m4/lock.m4: Update from GNU gettext.
13714
13715 2005-07-26  Bruno Haible  <bruno@clisp.org>
13716
13717         * lib/lock.h: Update from GNU gettext.
13718         * lib/lock.c: Update from GNU gettext.
13719
13720 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
13721
13722         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
13723         obsolescent AC_TRY_RUN.  Include the default includes files, for
13724         'exit'.
13725
13726 2005-07-24  Bruno Haible  <bruno@clisp.org>
13727
13728         * modules/visibility: New file.
13729         * MODULES.html.sh (Misc): Add visibility.
13730
13731 2005-07-24  Bruno Haible  <bruno@clisp.org>
13732
13733         * m4/visibility.m4: New file.
13734
13735 2005-07-24  Bruno Haible  <bruno@clisp.org>
13736
13737         * doc/visibility.texi: New file.
13738
13739 2005-07-22  Bruno Haible  <bruno@clisp.org>
13740
13741         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
13742         $(ALLOCA_H), redundant through BUILT_SOURCES.
13743         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
13744         redundant through BUILT_SOURCES.
13745         * modules/byteswap (Makefile.am): Remove explicit dependency on
13746         $(BYTESWAP_H), redundant through BUILT_SOURCES.
13747         * modules/fnmatch (Makefile.am): Remove explicit dependency on
13748         $(FNMATCH_H), redundant through BUILT_SOURCES.
13749         * modules/getopt (Makefile.am): Remove explicit dependency on
13750         $(GETOPT_H), redundant through BUILT_SOURCES.
13751         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
13752         redundant through BUILT_SOURCES.
13753         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
13754         redundant through BUILT_SOURCES.
13755         * modules/stdbool (Makefile.am): Remove explicit dependency on
13756         $(STDBOOL_H), redundant through BUILT_SOURCES.
13757         * modules/stdint (Makefile.am): Remove explicit dependency on
13758         $(STDINT_H), redundant through BUILT_SOURCES.
13759         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
13760         Remove explicit dependency on $(SYSEXITS_H).
13761         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
13762
13763 2005-07-18  Simon Josefsson  <jas@extundo.com>
13764
13765         * lib/check-version.c (check_version): Accept identical versions too.
13766
13767 2005-07-18  Bruno Haible  <bruno@clisp.org>
13768
13769         * modules/lock: New file.
13770         * MODULES.html.sh (Multithreading): New section.
13771
13772 2005-07-18  Bruno Haible  <bruno@clisp.org>
13773
13774         * m4/lock.m4: New file, from GNU gettext.
13775
13776 2005-07-18  Bruno Haible  <bruno@clisp.org>
13777
13778         * lib/lock.h: New file, from GNU gettext.
13779         * lib/lock.c: New file, from GNU gettext.
13780
13781 2005-07-18  Bruno Haible  <bruno@clisp.org>
13782
13783         * lib/lock.h (gl_once_t): New type.
13784         (gl_once_define, gl_once): New macros.
13785         * lib/lock.c (fresh_once): New variable.
13786         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
13787         functions.
13788
13789 2005-07-16  Simon Josefsson  <jas@extundo.com>
13790
13791         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
13792         workaround, suggested by Bruno.
13793
13794 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
13795
13796         * modules/xalloc (Depends-on): Add xalloc-die.
13797         * modules/xvasprintf (Depends-on): Add xalloc-die.
13798
13799 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
13800
13801         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
13802         with a minor change.
13803
13804 2005-07-15  Bruno Haible  <bruno@clisp.org>
13805
13806         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
13807         When using lib/poll.c, define poll as rpl_poll.
13808
13809 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
13810
13811         * modules/argp (Depends-on): Remove unlocked-io.
13812
13813 2005-07-14  Derek Price  <derek@ximbiot.com>
13814
13815         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
13816         for glob symlink bug.
13817
13818 2005-07-14  Bruno Haible  <bruno@clisp.org>
13819
13820         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
13821         Instead, test for *_unlocked function declarations directly.
13822
13823 2005-07-11  Simon Josefsson  <jas@extundo.com>
13824
13825         * modules/size_max: New file.
13826
13827         * modules/xsize: Depend on size_max module for size_max.m4.
13828
13829 2005-07-11  Simon Josefsson  <jas@extundo.com>
13830
13831         * lib/size_max.h: New file.
13832
13833 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
13834
13835         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
13836         copyright symbol and the year.
13837         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
13838         (version_etc_va): Use parameterized copyright notice.
13839         Reword to conform to the current GNU coding standards.
13840
13841 2005-07-11  Karl Berry  <karl@gnu.org>
13842
13843         * doc/gnulib.texi (Quoting): new node.
13844         (Initial import): more info, from Patrice.
13845
13846 2005-07-11  Bruno Haible  <bruno@clisp.org>
13847
13848         * gnulib-tool (func_usage): Document option --avoid.
13849         (Command line options): Handle --avoid.
13850         (func_acceptable): New function.
13851         (func_modules_transitive_closure): Use it.
13852
13853 2005-07-11  Bruno Haible  <bruno@clisp.org>
13854
13855         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
13856         Reported by Jim Meyering.
13857
13858 2005-07-10  Bruno Haible  <bruno@clisp.org>
13859
13860         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
13861         Needed when size_t is smaller than 'unsigned int'.
13862         Reported by Paul Eggert.
13863
13864 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13865
13866         * modules/argp (Depends-on): Add unlocked-io
13867
13868 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13869
13870         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
13871         block of defines.
13872
13873 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
13874
13875         * config/srclist.txt: Comment out regcomp.c, since we have a porting
13876         fix now.
13877
13878 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
13879         and Paul Eggert  <eggert@cs.ucla.edu>
13880
13881         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
13882         in wint_t, not wchar_t.  Remove now-unnecessary cast.
13883
13884 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13885
13886         * modules/regex (Files): Add lib/regex_internal.c,
13887         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
13888         (Depends-on): Add extensions.
13889         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
13890
13891 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13892
13893         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
13894         pathconf.
13895         * m4/same.m4 (gl_SAME): Likewise.
13896         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
13897
13898         * m4/regex.m4: Adjust to new libc regex implementation.
13899         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
13900         all the .c and .h parts of (the new) regex.
13901         Quote the m4 stuff better.
13902         Check for RE_ICASE bug of old gnulib.
13903         Check for REG_STARTEND of recent libc.
13904         Rename local variables from jm_* to gl_*.
13905         Quote operand of "test -f".
13906         Say "recent enough" version of libc, not "version 2".
13907         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
13908         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
13909         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
13910         Remove check for btowc, isascii.
13911         Require AM_LANGINFO_CODESET.
13912
13913 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13914
13915         * lib/regex.c, regex.h: Sync from libc.
13916         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
13917         * lib/regexec.c:
13918         New files, synced from libc, except that regex_internal.h
13919         currently has a small porting fix.
13920
13921 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13922
13923         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
13924         regex_internal.c, regexec.c.
13925         Add regex_internal.h too, but as a comment, since the libc version
13926         is currently broken in gnulib mode.
13927
13928 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
13929
13930         Support programs like Emacs that use gnulib but not gettext.
13931         * MODULES.html.sh (Internationalization functions): Add gettext-h.
13932         * modules/gettext-h: New file.
13933         * modules/gettext (Files): Remove lib/gettext.h.
13934         (Depends-on): Add gettext-h.
13935         (Makefile.am): Remove lib_SOURCES.
13936         * modules/argmatch, modules/c-stack, modules/closeout:
13937         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
13938         * modules/execute, modules/file-type, modules/getaddrinfo:
13939         * modules/getopt, modules/human, modules/javacomp:
13940         * modules/javaexec, modules/mkdir-p, modules/obstack:
13941         * modules/openat, modules/pagealign_alloc, modules/pipe:
13942         * modules/quotearg, modules/regex, modules/rpmatch:
13943         * modules/unicodeio, modules/userspec, modules/version-etc:
13944         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
13945         * modules/xsetenv:
13946         Depend on gettext-h, not gettext.
13947
13948 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
13949
13950         * gnulib-tool (func_import): Add support for 'public domain' license.
13951         * modules/alloca, modules/atexit, modules/memmove:
13952         Now public domain, not GPL.
13953         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
13954         * modules/realloc, modules/strerror, modules/strtod:
13955         Now LGPL, not GPL.
13956
13957 2005-07-05  Bruno Haible  <bruno@clisp.org>
13958
13959         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
13960         autoconf CVS. Needed for mingw.
13961
13962 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13963
13964         Remove the dependency of the strftime module on the tzset module.
13965         * modules/strftime (Depends-on): Remove dependency on tzset.
13966
13967 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13968
13969         Remove the dependency of the strftime module on the tzset module.
13970         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
13971         gl_FUNC_TZSET_CLOBBER.
13972
13973 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13974
13975         Remove the dependency of the strftime module on the tzset module.
13976         * lib/strftime.c (my_strftime)
13977         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
13978         Copy the input structure, to work around some of the bug with
13979         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
13980         Solaris releases, you should also use the tzset module, but we won't
13981         require it as a dependency any more since we don't want LGPLed code
13982         to depend on GPLed code.
13983
13984 2005-07-02  Jim Meyering  <jim@meyering.net>
13985
13986         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
13987         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
13988         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
13989         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
13990
13991 2005-07-02  Jim Meyering  <jim@meyering.net>
13992
13993         * lib/backupfile.c (backup_args): Change a `0' to NULL.
13994
13995 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13996
13997         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
13998         declares only 'struct timespec;' (!).
13999
14000 2005-07-01  Jim Meyering  <jim@meyering.net>
14001
14002         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
14003         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
14004         * lib/save-cwd.c, tempname.c:
14005         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
14006         and don't include <sys/file.h>).
14007
14008 2005-06-29  Jim Meyering  <jim@meyering.net>
14009
14010         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
14011         type name.  Use the variable name instead.
14012         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
14013         Likewise.
14014
14015 2005-06-28  Simon Josefsson  <jas@extundo.com>
14016
14017         * modules/check-version (Files): Add check-version.m4.
14018
14019 2005-06-28  Simon Josefsson  <jas@extundo.com>
14020
14021         * m4/check-version.m4: New file, suggested by Jim Meyering
14022         <jim@meyering.net>.
14023
14024 2005-06-28  Simon Josefsson  <jas@extundo.com>
14025
14026         * lib/check-version.h, lib/check-version.c: New files.
14027
14028 2005-06-28  Simon Josefsson  <jas@extundo.com>
14029
14030         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
14031         collision with global variable.  Better indentation.  Don't
14032         increment buffer pointer beyond buffer end.  Based on comments
14033         from Paul Eggert <eggert@cs.ucla.edu>.
14034
14035         * lib/base64.h: Indent.
14036
14037 2005-06-28  Simon Josefsson  <jas@extundo.com>
14038
14039         * doc/gnulib.texi (Library version handling): New section.
14040
14041 2005-06-28  Jim Meyering  <jim@meyering.net>
14042
14043         * check-module (find_included_lib_files): Hard-code another
14044         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
14045         but modules/fts-lgpl (correctly) does not list those files.
14046
14047         * modules/canonicalize (Files): Add lib/pathmax.h.
14048
14049 2005-06-25  Simon Josefsson  <jas@extundo.com>
14050
14051         * modules/check-version: New file.
14052
14053 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
14054
14055         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
14056         initializer of struct addrinfo, as an indication that we don't
14057         care how many members the structure has.
14058
14059 2005-06-24  Derek Price  <derek@ximbiot.com>
14060         and Bruno Haible  <bruno@clisp.org>
14061
14062         Remove stat module & update lstat.
14063         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
14064         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
14065         * m4/stat.m4: Remove this file.
14066
14067 2005-06-24  Derek Price  <derek@ximbiot.com>
14068         and Bruno Haible  <bruno@clisp.org>
14069
14070         Remove stat module & update lstat.
14071         * lib/stat.c: Remove this file...
14072         (slash_aware_lstat): ...moving this content and its support...
14073         * lib/lstat.c (rpl_lstat): ...into here.
14074         * lib/lstat.h: New file.
14075
14076 2005-06-24  Derek Price  <derek@ximbiot.com>
14077         and Bruno Haible  <bruno@clisp.org>
14078
14079         Remove stat module & update lstat.
14080         * config/srclist.txt (libc sources): Remove stat.
14081
14082 2005-06-24  Derek Price  <derek@ximbiot.com>
14083         and Bruno Haible  <bruno@clisp.org>
14084
14085         Remove stat module & update lstat.
14086         * MODULES.html.sh (stat): Remove.
14087         * MODULES.html: Regenerated.
14088         * modules/lstat (Description): Correct function name.
14089         (Files): Add "lstat.h".
14090         (Depends-on): Remove stat, add xalloc, stat-macros.
14091         * modules/stat: Remove this file.
14092         (Include): Add "lstat.h", remove <sys/stat.h>.
14093
14094 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
14095
14096         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
14097         (ranged_convert): Don't save conversion in a temporary struct.
14098         This causes a warning with GCC 4.0.0, and anyway in the typical
14099         case it's not worth the extra 100 bytes or so of code.
14100         (ranged_convert, __mktime_internal): When calling a function via a
14101         pointer P, use P () rather than (*P) (), as we now assume C89 or
14102         better.
14103
14104 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14105
14106         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
14107         "who -r" failed to give output.  Problem reported by Tim Waugh.
14108
14109         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
14110         (xcalloc): Use it to avoid needless tests.
14111         Problem reported by Jim Meyering.
14112
14113 2005-06-20  Derek Price  <derek@ximbiot.com>
14114
14115         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
14116         unnecessary for Autoconfs > 2.59c.
14117
14118 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14119
14120         * lib/argp.h (__option_is_short): Check upper limit of
14121         __key. Isprint() requires its argument to have the value
14122         of an unsigned char or EOF.
14123
14124 2005-06-16  Jim Meyering  <jim@meyering.net>
14125
14126         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
14127         when either N or S is zero.
14128
14129 2005-06-16  Derek Price  <derek@ximbiot.com>
14130
14131         * m4/bison.m4: Declare YACC & YFLAGS precious.
14132
14133 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
14134
14135         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
14136         multibyte string or pattern, fall back on unibyte matching.
14137         Problem reported by James Youngman.
14138
14139 2005-06-08  Bruno Haible  <bruno@clisp.org>
14140
14141         * modules/csharpcomp: New file.
14142         * MODULES.html.sh (C#): Add csharpcomp.
14143
14144 2005-06-08  Bruno Haible  <bruno@clisp.org>
14145
14146         * m4/csharpcomp.m4: New file, from GNU gettext.
14147
14148 2005-06-08  Bruno Haible  <bruno@clisp.org>
14149
14150         * lib/csharpcomp.h: New file, from GNU gettext.
14151         * lib/csharpcomp.c: New file, from GNU gettext.
14152         * lib/csharpcomp.sh.in: New file, from GNU gettext.
14153
14154 2005-06-08  Bruno Haible  <bruno@clisp.org>
14155
14156         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
14157         warning on mingw.
14158
14159 2005-06-07  Derek Price  <derek@ximbiot.com>
14160
14161         Sync from CVS.
14162         * lib/glob_.h: Indent nested #ifdef.
14163
14164 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
14165
14166         Sync from coreutils.
14167         Use "file name" when talking about file names, instead of "filename"
14168         or "path", as per the GNU coding standards.
14169         * lib/mkdir-p.c: Renamed from makepath.c.
14170         (make_dir_parents): Renamed from make_path.  All callers changed.
14171         * lib/mkdir-p.h: Likewise.  All includers changed.
14172         * lib/filenamecat.c: Renamed from path-concat.c.
14173         (file_name_concat): Renamed from path_concat.  All callers changed.
14174         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
14175         * lib/filenamecat.h: Likewise.  All includers changed.
14176         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
14177         in comments or local variable names.
14178         * lib/basename.c: Likewise.
14179         * lib/canonicalize.c, canonicalize.h: Likewise.
14180         * lib/dirname.c, dirname.h: Likewise.
14181         * lib/euidaccess.c: Likewise.
14182         * lib/exclude.c: Likewise
14183         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
14184         * lib/fsusage.c, fsuage.h: Likewise.
14185         * lib/fts.c, fts_.h: Likewise.
14186         * lib/getcwd.c: Likewise.
14187         * lib/getloadavg.c: Likewise.
14188         * lib/mkstemp.c: Likewise.
14189         * lib/mountlist.c, mountlist.h: Likewise.
14190         * lib/openat.c, openat.h: Likewise.
14191         * lib/readlink-stub.c: Likewise.
14192         * lib/readutmp.c, readutmp.h: Likewise.
14193         * lib/rename.c: Likewise.
14194         * lib/rmdir.c: Likewise.
14195         * lib/same.c: Likewise.
14196         * lib/savedir.c: Likewise.
14197         * lib/stripslash.c: Likewise.
14198         * lib/tempname.c: Likewise.
14199         * lib/xreadlink.c: Likewise.
14200         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
14201         All uses changed.
14202         * lib/exclude.h: Likewise.
14203
14204         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
14205         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
14206         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
14207         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
14208         * lib/pathmax.h: Include <limits.h> unconditionally, since other
14209         files have been getting away with it for years (MORE/BSD 4.3
14210         is extinct now).
14211         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
14212         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
14213
14214         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
14215         Define to 256, not 255, as per modern POSIX.
14216
14217 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
14218
14219         Sync from coreutils.
14220         Use "file name" when talking about file names, instead of "filename"
14221         or "path", as per the GNU coding standards.
14222         * MODULES.html.sh: mkdir-p renamed from makepath.
14223         filenamecat renamed from path-concat.
14224         * modules/filenamecat: Renamed from modules/path-concat.
14225         (Files): filenamecat.h and filenamecat.c renamed from
14226         path-concat.h and path-concat.c.
14227         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
14228         (Include): filenamecat.h, not path-concat.h.
14229         * modules/mkdir-p: Renamed from modules/makepath.
14230         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
14231         makepath.c.
14232         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
14233         (Include): mkdir-p.h, not makepath.h.
14234
14235 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
14236
14237         Sync from coreutils.
14238         * m4/mkdir-p.m4: Renamed from makepath.m4.
14239         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
14240         Rename files from makepath.c to mkdir-p.c, and from
14241         makepath.h to mkdir-p.h.
14242         * m4/filenamecat.m4: Renamed from path-concat.m4.
14243         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
14244         Rename files from path-concat.c to filenamecat.c,
14245         and from path-concat.h to filenamecat.h.
14246         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
14247         "file name" in local variables or comments.
14248         * m4/rename.m4: Likewise.
14249
14250 2005-06-01  Bruno Haible  <bruno@clisp.org>
14251
14252         * modules/csharpexec: New file.
14253         * MODULES.html.sh (C#): New section.
14254
14255 2005-06-01  Bruno Haible  <bruno@clisp.org>
14256
14257         * m4/csharp.m4: New file, from GNU gettext.
14258         * m4/csharpexec.m4: New file, from GNU gettext.
14259
14260 2005-06-01  Bruno Haible  <bruno@clisp.org>
14261
14262         * lib/csharpexec.h: New file, from GNU gettext.
14263         * lib/csharpexec.c: New file, from GNU gettext.
14264         * lib/csharpexec.sh.in: New file, from GNU gettext.
14265
14266 2005-05-31  Derek Price  <derek@ximbiot.com>
14267             Paul Eggert  <eggert@cs.ucla.edu>
14268
14269         Sync from cvs.
14270         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
14271
14272 2005-05-31  Derek Price  <derek@ximbiot.com>
14273             Paul Eggert  <eggert@cs.ucla.edu>
14274
14275         Sync from cvs.
14276         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
14277
14278 2005-05-29  Derek Price  <derek@ximbiot.com>
14279
14280         * config/srclist.txt (glob_.h, glob.c): Add these files.
14281
14282 2005-05-29  Derek Price  <derek@ximbiot.com>
14283
14284         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
14285         * modules/glob: New file.
14286         * modules/getlogin_r: Add link to POSIX spec in description.
14287
14288 2005-05-29  Derek Price  <derek@ximbiot.com>
14289             Paul Eggert  <eggert@cs.ucla.edu>
14290
14291         * m4/glob.m4: New file.
14292
14293 2005-05-29  Derek Price  <derek@ximbiot.com>
14294             Paul Eggert  <eggert@cs.ucla.edu>
14295
14296         * lib/glob_.h, lib/glob.c: New files.
14297
14298 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14299
14300         * modules/fts (Files): Remove m4/inttypes-pri.m4.
14301         * modules/fts-lgpl (Depends-on): Remove gettext.
14302
14303 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14304
14305         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
14306         and don't require gt_INTTYPES_PRI.
14307
14308 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14309
14310         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
14311
14312         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
14313         the configuration hassle isn't worth it.
14314         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
14315         (LONGEST_MODIFIER, PRIuMAX): Remove.
14316
14317 2005-05-27  Bruno Haible  <bruno@clisp.org>
14318
14319         * lib/getlogin_r.h: Remove second include of <stddef.h>.
14320
14321 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
14322
14323         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
14324         _POSIX_PTHREAD_SEMANTICS for Solaris.
14325
14326 2005-05-25  Derek Price  <derek@ximbiot.com>
14327
14328         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
14329
14330 2005-05-25  Derek Price  <derek@ximbiot.com>
14331             Paul Eggert  <eggert@cs.ucla.edu>
14332
14333         * modules/getlogin_r, m4/getlogin_r.m4: New files.
14334         * lib/getlogin_r.c, getlogin_r.h: New files.
14335
14336 2005-05-25  Bruno Haible  <bruno@clisp.org>
14337             Derek Price  <derek@ximbiot.com>
14338
14339         * lib/getlogin_r.h: Simplify API documentation.
14340
14341 2005-05-23  Derek Price  <derek@ximbiot.com>
14342
14343         * modules/minmax (Files): Add m4/minmax.m4.
14344         (configure.ac): Add gl_MINMAX.
14345
14346 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
14347
14348         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
14349         so that unistd-safer.h (GPL'ed code) need not be included.
14350
14351 2005-05-22  Bruno Haible  <bruno@clisp.org>
14352
14353         * m4/minmax.m4: New file.
14354         Based on a patch by Derek Price <derek@ximbiot.com>.
14355
14356 2005-05-22  Bruno Haible  <bruno@clisp.org>
14357
14358         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
14359         (INT64_MIN): Fix definition.
14360         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
14361
14362         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
14363         NEED_SIGNED_INT_TYPES.
14364
14365         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
14366         HAVE_SYSTEM_INTTYPES.
14367
14368 2005-05-22  Bruno Haible  <bruno@clisp.org>
14369
14370         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
14371         Also include <sys/param.h> if it defines MIN, MAX.
14372         Based on a patch by Derek Price <derek@ximbiot.com>.
14373
14374 2005-05-21  Jim Meyering  <jim@meyering.net>
14375
14376         * modules/fts (Files): Add m4/inttypes-pri.m4.
14377         (Depends-on): Add lstat and remove gettext.  Alphabetize.
14378
14379 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14380
14381         New fts module.
14382         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
14383         (setup_dir, free_dir): New functions.
14384         (enter_dir, leave_dir): Define trivial
14385         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
14386         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
14387         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
14388         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
14389         Move to fts-cycle.c.
14390         (fts_open): Use setup_dir.
14391         (fts_close): Use free_dir.
14392         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
14393         This adds a label and some gotos, but the alternatives were messier.
14394         Check for memory allocation failure when entering a dir.
14395         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
14396         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
14397         (FTS): New member fts_cycle, that is a union that contains the
14398         old active_dir_ht and cycle_state.  All uses changed to mention
14399         fts_cycle.ht and fts_cycle.state.
14400         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
14401         fts.c, with the following changes:
14402         (setup_dir, free_dir): New functions.
14403         (enter_dir): Now returns bool.  Return true if successful, false
14404         if memory exhausted.  All callers changed.
14405         Do not bother partly cleaning up on
14406         memory allocation failure; that is free_dir's job.
14407         However, free ad if hash_insert fails, to avoid memory leak.
14408         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
14409         fts->fts_options to see which union member to use.
14410
14411 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14412
14413         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
14414         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
14415
14416 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14417
14418         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
14419
14420 2005-05-20  Jim Meyering  <jim@meyering.net>
14421
14422         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
14423         Now a macro, to pacify GCC.
14424
14425 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
14426
14427         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
14428         of -1.
14429
14430 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
14431
14432         * lib/chown.c (rpl_chown): Return -1 on failure.
14433
14434 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
14435
14436         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
14437         Don't check for stddef.h.
14438         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
14439         don't use its results.
14440         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
14441         since we include them unconditionally.  Don't require
14442         AM_STDBOOL_H, since stdbool is a prerequisite.
14443         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
14444         since we assume C89 or better.
14445         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
14446         as we don't use their results.
14447         Don't check for fchdir, memmove, memset, strrchr, as we use
14448         them unconditionally.
14449         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
14450         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
14451
14452 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
14453
14454         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
14455         Include <stddef.h> unconditionally, since we assume C89 now.
14456         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
14457         * lib/fts.c: Include fts_.h first, to check interface.
14458         Do not include intprops.h; no longer needed.
14459         Include cycle-check.h and hash.h, since fts_.h no longer does.
14460         Remove unnecessary casts of closedir to void.
14461         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
14462         decide whether to decrement nlinks.
14463         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
14464         (FTS): Use struct hash_table * instead of Hash_table, so that
14465         we no longer need to include hash.h here.
14466
14467 2005-05-18  Jim Meyering  <jim@meyering.net>
14468
14469         * modules/dirfd (License): Change to LGPL.  Most of the code
14470         is already in the public domain.
14471
14472 2005-05-18  Jim Meyering  <jim@meyering.net>
14473
14474         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
14475         Reported by Yoann Vandoorselaere.
14476
14477 2005-05-17  Jim Meyering  <jim@meyering.net>
14478
14479         * m4/fts.m4: New file, from coreutils.
14480
14481 2005-05-17  Jim Meyering  <jim@meyering.net>
14482
14483         * lib/fts.c, lib/fts_.h: New files, from coreutils.
14484
14485 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14486
14487         Sync from coreutils.
14488         * m4/unlinkdir.m4: New file.
14489
14490 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14491
14492         Sync from coreutils.
14493         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
14494         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
14495         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
14496         White space changes only.
14497         * lib/makepath.c (make_path): Port to hosts where leading "//" is
14498         special.
14499         * lib/yesno.c: Include getline.h, not ctype.h.
14500         (yesno): Don't remove leading white space; POSIX doesn't allow it.
14501         Use getline to remove arbitrary restriction on response length.
14502
14503 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14504
14505         * config/srclist-update: Spell out "Street" in FSF postal
14506         mail address; this is the style the FSF seems to prefer.
14507
14508         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
14509         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
14510         this updates FSF postal mail address.
14511
14512         Sync from coreutils.
14513         * modules/unlinkdir: New file.
14514         * modules/yesno (Depends-on): Add getline.
14515         * MODULES.html.sh (File system functions): Add unlinkdir.
14516
14517 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14518
14519         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
14520         lib/strsep.h:
14521         Change the initial comment to refer to GPL, not LGPL.
14522         gnulib-tool will change it to LGPL as needed.
14523
14524         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
14525         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
14526         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
14527         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
14528         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
14529         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
14530         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
14531         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
14532         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
14533         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
14534         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
14535         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
14536         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
14537         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
14538         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
14539         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
14540         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
14541         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
14542         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
14543         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
14544         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
14545         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
14546         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
14547         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
14548         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
14549         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
14550         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
14551         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
14552         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
14553         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
14554         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
14555         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
14556         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
14557         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
14558         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
14559         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
14560         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
14561         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
14562         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
14563         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
14564         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
14565         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
14566         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
14567         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
14568         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
14569         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
14570         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
14571         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
14572         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
14573         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
14574         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
14575         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
14576         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
14577         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
14578         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
14579         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
14580         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
14581         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
14582         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
14583         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
14584         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
14585         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
14586         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
14587         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
14588         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
14589         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
14590         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
14591         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
14592         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
14593         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
14594         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
14595         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
14596         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
14597         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
14598         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
14599         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
14600         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
14601         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
14602         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
14603         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
14604         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
14605         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
14606         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
14607         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
14608         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
14609         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
14610         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
14611         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
14612         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
14613         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
14614         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
14615         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
14616         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
14617         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
14618         lib/yesno.c, lib/yesno.h:
14619         Update FSF postal mail address.
14620
14621 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14622
14623         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
14624         tests/test-memmem.c, tests/test-stpncpy.c:
14625         Update FSF postal mail address.
14626
14627 2005-05-13  Bruno Haible  <bruno@clisp.org>
14628
14629         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
14630         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
14631         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
14632         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
14633         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
14634         Add support for 64-bit integers in the MSVC compiler.
14635
14636 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14637
14638         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
14639
14640 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
14641
14642         * gnulib-tool (func_import): Sort and uniquify recommended includes.
14643
14644 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
14645
14646         * doc/getdate.texi (General date syntax): Don't say that date
14647         date --iso-8601=ns generates acceptable dates; it doesn't yet.
14648         Problem reported by Nic Ferrier.
14649
14650 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14651
14652         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
14653         specified in ai_socktype. Fix invalid ai_protocol
14654         check. ai_protocol is usually set to 0 or depending on
14655         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
14656         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
14657         ai_socktype / ai_protocol in the returned addrinfo structure.
14658
14659 2005-05-10  Simon Josefsson  <jas@extundo.com>
14660
14661         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
14662         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
14663
14664 2005-05-10  Karl Berry  <karl@gnu.org>
14665
14666         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
14667         (from http://www.gnu.org/licenses).
14668         * doc/COPYING.LIB: also rename to COPYING.LESSER.
14669         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
14670         fdl.texi suffices.
14671
14672 2005-05-10  Karl Berry  <karl@gnu.org>
14673
14674         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
14675         (COPYING.DOC): remove.
14676
14677         * config/srclist-update: new FSF address.
14678
14679 2005-05-10  Derek Price  <derek@ximbiot.com>
14680
14681         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
14682         possible.
14683
14684 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14685             Bruno Haible  <bruno@clisp.org>
14686
14687         * modules/inet_ntop: New file.
14688         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14689         inet_ntop.
14690
14691 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14692             Bruno Haible  <bruno@clisp.org>
14693
14694         * m4/inet_ntop.m4: New file.
14695
14696 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14697             Bruno Haible  <bruno@clisp.org>
14698
14699         * lib/inet_ntop.h: New file.
14700         * lib/inet_ntop.c: New file, from glibc with modifications.
14701
14702 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
14703
14704         * modules/time_r (License): Change to LGPL.
14705         * modules/extensions (License): Change to LGPL.  Actually,
14706         the license is more permissive than that, but currently gnulib-tool
14707         doesn't know how to handle more-permissive licenses.
14708
14709         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
14710         Problem reported by Dave Love.
14711
14712 2005-05-08  Jim Meyering  <jim@meyering.net>
14713
14714         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
14715         blank.
14716
14717 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
14718
14719         * modules/argmatch (Depends-on): Add stdbool.
14720         * modules/backupfile (Depends-on): Likewise.
14721         * modules/chdir-long (Depends-on): Likewise.
14722         * modules/closeout (Depends-on): Likewise.
14723         * modules/cycle-check (Depends-on): Likewise.
14724         * modules/dirname (Depends-on): Likewise.
14725         * modules/fnmatch (Depends-on): Likewise.
14726         * modules/fsusage (Depends-on): Likewise.
14727         * modules/fwriteerror (Depends-on): Likewise.
14728         * modules/getcwd (Depends-on): Likewise.
14729         * modules/getloadavg (Depends-on): Likewise.
14730         * modules/hard-locale (Depends-on): Likewise.
14731         * modules/makepath (Depends-on): Likewise.
14732         * modules/mountlist (Depends-on): Likewise.
14733         * modules/nanosleep (Depends-on): Likewise.
14734         * modules/posixtm (Depends-on): Likewise.
14735         * modules/quotearg (Depends-on): Likewise.
14736         * modules/readtokens (Depends-on): Likewise.
14737         * modules/readtokens0 (Depends-on): Likewise.
14738         * modules/readutmp (Depends-on): Likewise.
14739         * modules/save-cwd (Depends-on): Likewise.
14740         * modules/strftime (Depends-on): Likewise.
14741         * modules/userspec (Depends-on): Likewise.
14742         * modules/utimecmp (Depends-on): Likewise.
14743         * modules/xgetcwd (Depends-on): Likewise.
14744         * modules/xnanosleep (Depends-on): Likewise.
14745         * modules/xstrtod (Depends-on): Likewise.
14746         * modules/yesno (Depends-on): Likewise.
14747
14748 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
14749
14750         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
14751         needless checks.
14752
14753 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14754
14755         Merge from coreutils.  Among other things,
14756         add bulletproofing for cases where stdin, stdout, or stderr are closed.
14757         * lib/fd-safer.c: New file.
14758         * lib/fcntl-safer.h, open-safer.c: Remove.
14759         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
14760         * lib/dup-safer.c: Include unistd-safer.h first.
14761         Don't include errno.h.
14762         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
14763         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
14764         * lib/file-type.c: Rely on file-type.h change.
14765         * lib/getloadavg.c: Include unistd-safer.h.
14766         (getloadavg): Use safer open.
14767         * lib/getusershell.c: Include "stdio-safer.h".
14768         (getusershell): Use safer fopen.
14769         * lib/long-options.c (long_options): Use NULL rather than 0.
14770         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
14771         'free'.
14772         * lib/modechange.c: Likewise.
14773         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
14774         (MODE_DONE): New constant.
14775         (struct mode_change): Remove 'next' member.
14776         (make_node_op_equals): New function; like the old one of the
14777         same name, except it allocates an array.
14778         (mode_compile, mode_create_from_ref): Use it.
14779         (mode_compile): Allocate result as an array, not a linked list.
14780         Parse octal string ourself, so that we catch mistakes like "+0".
14781         (mode_adjust): Arg is an array, not a linked list.
14782         * lib/modechange.c: Include stat-macros.h, xalloc.h.
14783         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
14784         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
14785         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
14786         Remove.  This is now stat-macros.h's job.
14787         (talloc): Remove.  All callers replaced by xalloc, so that
14788         our invokers don't have to worry about reporting memory failures.
14789         (make_node_op_equals): Remove.
14790         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
14791         New constants.
14792         (struct mode_change): Moved here from modechange.h.
14793         (mode_append_entry): Remove.
14794         (mode_compile): Remove MASKED_OPS arg, since it encouraged
14795         apps to have incorrect behavior.  Use simpler algorithm for head
14796         and tail.  Don't futz with umask; that's now the job of mode_adjust.
14797         Detect more invalid usages rather than having somewhat-random behavior.
14798         Don't insert an "a=" action, as that leads to incorrect behavior.
14799         (mode_compile, mode_create_from_ref): Return NULL on error instead
14800         of an enum, since now there's only one way to have an error.  All
14801         callers changed.
14802         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
14803         at the correct time.  Simplify calculation of "+u" and its ilk.
14804         Don't mishandle "+X".
14805         (mode_free): Remove "register" and localize decls.
14806         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
14807         (struct mode_change): Move to modechange.c; callers don't
14808         need to see this stuff.
14809         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
14810         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
14811         (mode_change, mode_adjust): Reflect the new signatures noted above.
14812         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
14813         that might redefine system include files.
14814         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
14815         (my_usleep): Use NULL rather than (void *) 0.
14816         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
14817         Use siginterrupt to specify that system calls should be interrupted.
14818         (rpl_nanosleep): Move initialization of suspended closer to call of
14819         my_usleep.
14820         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
14821         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
14822         (desirable_utmp_entry): New function.
14823         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
14824         using x2nrealloc, to simplify logic.
14825         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
14826         size calculation.  Do not assume utmp file is a regular file.
14827         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
14828         (READ_UTMP_CHECK_PIDS): New constant.
14829         * lib/save-cwd.c: Include unistd-safer.h.
14830         (save_cwd): Use fd_safer.
14831         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
14832         [!_LIBC] Include "stat-macros.h" instead.
14833         * lib/unistd-safer.h (fd_safer): New decl.
14834
14835 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14836
14837         * modules/getloadavg (Depends-on): Add unistd-safer.
14838         * modules/getusershell (Depends-on): Add stdio-safer.
14839         * modules/lstat (Depends-on): Remove xalloc.
14840         * modules/mkstemp (Depends-on): Add stat-macros.
14841         * modules/modechange (Depends-on): Remove xstrtol.
14842         Add stat-macros, xalloc.
14843         * modules/save-cwd (Depends-on): Add unistd-safer.
14844         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
14845         * modules/unistd-safer (Files): Add lib/fd-safer.c
14846         (Makefile.am): Remove lib_SOURCES.
14847
14848         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
14849         Remove fcntl-safer; unistd-safer supersedes it.
14850
14851 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14852
14853         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
14854         AC_HEADER_STAT.
14855         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
14856         (gl_PREREQ_CHOWN): Remove.
14857         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
14858         it.  Don't require AC_HEADER_STAT.
14859         (gl_PREREQ_LSTAT): Remove.
14860         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
14861         Don't require AC_HEADER_STAT.
14862         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
14863         (gl_PREREQ_RMDIR): Remove.
14864         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
14865         mention stat-macros.h or AC_HEADER_STAT, since we'll make
14866         the stat-macros module a prerequisite.
14867         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
14868         * m4/filemode.m4 (gl_FILEMODE): Likewise.
14869         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
14870         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
14871         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
14872         variable names.
14873         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
14874         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
14875         variable prefixes.
14876         * m4/fcntl-safer.m4: Remove.
14877         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
14878         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
14879         Invoke gl_PREREQ_FD_SAFER.
14880         (gl_PREREQ_FD_SAFER): New macro.
14881         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
14882         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
14883         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
14884         Remove duplicate call to AC_LIBOBJ(readutmp).
14885         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
14886
14887         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
14888         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
14889
14890 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14891
14892         * MODULES.html.sh (Misc): Add byteswap.
14893
14894 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14895
14896         * modules/getcwd (Depends-on): Add extensions.
14897         * modules/openat (Depends-on): Likewise.
14898
14899 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14900
14901         * modules/byteswap: New file.
14902
14903 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14904
14905         * m4/byteswap.m4: New file.
14906
14907 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14908
14909         * lib/byteswap_.h: New file.
14910
14911 2005-04-25  Karl Berry  <karl@gnu.org>
14912
14913         * m4/gettext.m4: Update from GNU gettext 0.14.4.
14914
14915 2005-04-25  Albert Chin  <china@thewrittenword.com>
14916
14917         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
14918         Toolkit C bug.
14919
14920 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
14921
14922         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
14923         (func_ln_if_changed) Remove forcibly for no error message
14924         in case file does not exist.
14925
14926 2005-04-19  Simon Josefsson  <jas@extundo.com>
14927
14928         * gnulib-tool (Options): Make --symlink mean --symbolic.
14929
14930 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
14931
14932         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
14933
14934 2005-04-16  Simon Josefsson  <jas@extundo.com>
14935
14936         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
14937
14938 2005-04-15  Simon Josefsson  <jas@extundo.com>
14939
14940         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
14941
14942 2005-04-15  Simon Josefsson  <jas@extundo.com>
14943
14944         * gnulib-tool: Rename --symlink to --symbolic.
14945
14946 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
14947
14948         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
14949         symbolic links to files instead of copying/moving.  Add --aux-dir,
14950         specifying directory relative --dir where auxiliary build tools
14951         are placed.
14952
14953 2005-04-14  Bruno Haible  <bruno@clisp.org>
14954
14955         * modules/allocsa (License): Change to LGPL.
14956         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
14957
14958 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
14959
14960         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
14961         that "UTC +1 second" continues to work.  Problem reported
14962         by Dmitry V. Levin.
14963         (relunit_snumber): New rule.
14964         (relunit): Use it.
14965
14966 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
14967
14968         * lib/getdate.y (universal_time_zone_table): New constant.
14969         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
14970         universal_time_zone_table.
14971         (lookup_zone): Prefer universal_time_zone_table to
14972         local_time_zone_table, so that "GMT" time stamps are allowed in
14973         London during the summer.  Problem reported by Ian Abbott.
14974
14975 2005-04-12  Jim Meyering  <jim@meyering.net>
14976
14977         * lib/human.c (humblock): Set *options even when returning due to
14978         xstrtoumax conversion failure.  Thanks to a used-uninitialized
14979         warning from gcc-4.
14980
14981 2005-04-09  Jim Meyering  <jim@meyering.net>
14982
14983         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
14984         -Wuninitialized: initialize tm0.tm_year.
14985
14986 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
14987
14988         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
14989         count, since there's no maximum.  All uses changed.
14990         Add member dsts_seen.
14991         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
14992         not being INT_MAX.
14993         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
14994         Use pc_rels_seen to decide whther a date is absolute.
14995
14996         * lib/getdate.y (number): Don't overwrite year.
14997         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
14998         check.
14999
15000 2005-04-02  Simon Josefsson  <jas@extundo.com>
15001
15002         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
15003         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
15004
15005 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
15006
15007         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
15008         where no absolute path name can be longer than PATH_MAX.
15009
15010 2005-03-27  Jim Meyering  <jim@meyering.net>
15011
15012         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
15013
15014 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
15015
15016         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
15017         "one's complement" -> "ones' complement" in comment, as per Knuth.
15018         "value of type" -> "type or expression" in comment.
15019         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
15020
15021 2005-03-26  Jim Meyering  <jim@meyering.net>
15022
15023         Comment nits.
15024         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
15025         Correct typos: s/or/of/.
15026
15027 2005-03-26  Jim Meyering  <jim@meyering.net>
15028
15029         * modules/check-include-files: Move to ../ and rename to...
15030         * check-module: ...this.
15031
15032 2005-03-25  Jim Meyering  <jim@meyering.net>
15033
15034         * modules/xvasprintf (Files): Add xalloc.h.
15035
15036 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
15037
15038         * modules/gettext (Files): config/config.rpath ->
15039         build-aux/config.rpath
15040         * modules/iconv (Files): Likewise.
15041         Problem reported by Oskar Liljeblad.
15042
15043 2005-03-23  Jim Meyering  <jim@meyering.net>
15044
15045         * modules/check-include-files: New script to check for
15046         missing dependencies, multiple includes, etc.
15047
15048         * modules/c-strtold (Depends-on): Add xalloc.
15049         * modules/c-strtod (Depends-on): Add xalloc.
15050         * modules/hash (Depends-on): Add xalloc.
15051         (Files): Remove lib/xalloc.h.
15052
15053         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
15054         * modules/userspec (Files): Add lib/inttostr.h.
15055
15056 2005-03-23  Jim Meyering  <jim@meyering.net>
15057
15058         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
15059
15060 2005-03-22  Jim Meyering  <jim@meyering.net>
15061
15062         * modules/stat-macros: New module.
15063         * modules/canonicalize, modules/euidaccess, modules/file-type,
15064         * modules/filemode, modules/lchown, modules/makepath,
15065         * modules/rmdir, modules/stat: Depend on new stat-macros module
15066         rather than listing lib/stat-macros.h manually.
15067         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
15068
15069 2005-03-22  Jim Meyering  <jim@meyering.net>
15070
15071         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
15072
15073 2005-03-22  Bruno Haible  <bruno@clisp.org>
15074
15075         * config/srclist.txt: Replace target directory 'config' with
15076         'build-aux'.
15077         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
15078         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
15079         ../build-aux/.
15080
15081 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
15082
15083         * modules/chdir-long (Depends-on): Add mempcpy.
15084
15085         * modules/acl, modules/backupfile, modules/c-strtod,
15086         modules/c-strtold, modules/canon-host, modules/canonicalize,
15087         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
15088         modules/exclude, modules/exitfail, modules/file-type,
15089         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
15090         modules/getdate, modules/getline, modules/getpagesize,
15091         modules/getpass, modules/getugroups, modules/group-member,
15092         modules/hard-locale, modules/hash, modules/human, modules/idcache,
15093         modules/inttostr, modules/long-options, modules/makepath,
15094         modules/md5, modules/memcasecmp, modules/memcoll,
15095         modules/modechange, modules/mountlist, modules/path-concat,
15096         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
15097         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
15098         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
15099         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
15100         modules/strftime, modules/strndup, modules/strverscmp,
15101         modules/timespec, modules/unlocked-io, modules/userspec,
15102         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
15103         modules/yesno:
15104         Remove lib_SOURCES line from Makefile.am section, as this is now
15105         done automatically by the corresponding Autoconf macro.
15106
15107 2005-03-21  Jim Meyering  <jim@meyering.net>
15108
15109         Changes imported from coreutils.
15110
15111         * lib/cycle-check.c: Don't include xalloc.h.
15112
15113         * lib/path-concat.c: Don't include assert.h.
15114         (path_concat): Remove assertion that would have triggered
15115         for ABASE starting with more than one slash.
15116         Reported by Andreas Schwab.
15117
15118         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
15119         properly when ABASE is an absolute file name.
15120         Correct the description of this function.
15121         Include <assert.h>.
15122         Add an assertion and a test driver.
15123         This fixes a bug introduced on 2004-07-02.
15124         Andreas Schwab reported the resulting failure of cp --parents:
15125         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
15126
15127 2005-03-21  Jim Meyering  <jim@meyering.net>
15128
15129         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
15130         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
15131
15132 2005-03-21  Jim Meyering  <jim@meyering.net>
15133         and  Paul Eggert  <eggert@cs.ucla.edu>
15134
15135         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
15136         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
15137         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
15138         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
15139         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
15140         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
15141         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
15142         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
15143         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
15144         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
15145         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
15146         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
15147         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
15148         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
15149         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
15150         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
15151         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
15152         for these modules.
15153
15154 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
15155
15156         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
15157         (which shouldn't happen), generate nothing instead of returning 0
15158         immediately, so that nstrftime (NULL, ...) doesn't return 0.
15159
15160 2005-03-16  Bruno Haible  <bruno@clisp.org>
15161
15162         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
15163         HAVE_LONGLONG_64BIT.
15164
15165 2005-03-16  Bruno Haible  <bruno@clisp.org>
15166
15167         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
15168         HAVE_LONGLONG_64BIT.
15169
15170 2005-03-16  Bruno Haible  <bruno@clisp.org>
15171
15172         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
15173         HAVE_LONGLONG_64BIT.
15174
15175 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
15176
15177         * lib/strftime.c (my_strftime): Prepend space to format so that we can
15178         reliably distinguish strftime failure from empty output on POSIX
15179         hosts.
15180
15181 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
15182
15183         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
15184         (iconv_string): Don't guess a size-zero buffer, as that might cause
15185         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
15186         result would be 'too large', where 'too large' is (heuristically)
15187         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
15188         overflow concerns.  This will prevent some unwanted malloc failures
15189         when the inputs are very large.
15190
15191 2005-03-15  Karl Berry  <karl@gnu.org>
15192
15193         * config/srclist.txt (config.rpath): from gettext.
15194         * config/config.rpath: update.
15195
15196 2005-03-15  Bruno Haible  <bruno@clisp.org>
15197
15198         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
15199         to 'negate'.
15200
15201         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
15202         variable.
15203
15204         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
15205         results.
15206
15207 2005-03-14  Simon Josefsson  <jas@extundo.com>
15208
15209         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
15210         <fx@gnu.org>.
15211
15212 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
15213
15214         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
15215         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
15216         intprops.h.
15217         * lib/strtol.c: Likewise.
15218
15219 2005-03-14  Jim Meyering  <jim@meyering.net>
15220
15221         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
15222         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
15223         to be nonzero so that we (and caller) can detect the difference
15224         between a valid zero-length expansion and an error return, even
15225         when the underlying strftime fails before writing anything into
15226         that location.
15227
15228 2005-03-14  Bruno Haible  <bruno@clisp.org>
15229
15230         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
15231         Update from GNU gettext 0.14.3.
15232
15233 2005-03-10  Jim Meyering  <jim@meyering.net>
15234
15235         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
15236
15237 2005-03-10  Jim Meyering  <jim@meyering.net>
15238
15239         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
15240         so that this module works on systems without fchdir.
15241
15242 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
15243
15244         Factor int-properties macros into a single file, except for
15245         glibc-related files.
15246         * lib/intprops.h: New file.
15247         * lib/getloadavg.c: Include it instead of limits.h.
15248         (INT_STRLEN_BOUND): Remove.
15249         * lib/human.c: Include intprops.h.
15250         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
15251         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
15252         302/1000.
15253         * lib/inttostr.h: Include intprops.h instead of limits.h.
15254         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
15255         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
15256         for consistency with intprops.h.
15257         (time_t_is_integer, twos_complement_arithmetic): Use them.
15258         * lib/sig2str.h: Include <signal.h>, intprops.h.
15259         (INT_STRLEN_BOUND): Remove.
15260         * lib/strftime.c (TYPE_SIGNED): Remove.
15261         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
15262         * lib/strtol.c: Adjust comments to match intprops.h.
15263         * lib/userspec.c: Include intprops.h.
15264         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
15265         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
15266         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
15267         instead of rolling our own expressions.
15268         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
15269
15270         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
15271         instead of int.
15272         (my_strftime): Do not mishandle years close to INT_MAX, by doing
15273         the right thing even if adding 1900 would overflow.  Similarly
15274         for tm_mon + 1 and tm_yday + 1.
15275         Make %Y always equivalent to %C%y, and similarly for %G and %g.
15276         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
15277         (DO_SIGNED_NUMBER): New macro.
15278         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
15279
15280 2005-03-07  Bruno Haible  <bruno@clisp.org>
15281
15282         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
15283
15284 2005-03-07  Bruno Haible  <bruno@clisp.org>
15285
15286         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
15287
15288 2005-03-04  Derek R. Price  <derek@ximbiot.com>
15289
15290         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
15291         (func_import): Only replace files via --import when they have actually
15292         changed.
15293
15294 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15295
15296         * m4/mmap-anon.m4: New file.
15297         * m4/pagealign_alloc.m4: New file.
15298
15299 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15300             Bruno Haible  <bruno@clisp.org>
15301
15302         * modules/pagealign_alloc: New file.
15303         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
15304
15305 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15306             Bruno Haible  <bruno@clisp.org>
15307
15308         * lib/pagealign_alloc.h: New file.
15309         * lib/pagealign_alloc.c: New file.
15310
15311 2005-03-03  Bruno Haible  <bruno@clisp.org>
15312
15313         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
15314         Use an all-permissive copyright notice, recommended by RMS.
15315
15316 2005-03-02  Bruno Haible  <bruno@clisp.org>
15317
15318         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
15319         of AIX, the replacement has to be done only after <string.h> is
15320         included, therefore not in config.h. stpncpy.h does the replacement,
15321         and stpncpy.c uses it.
15322
15323 2005-03-02  Bruno Haible  <bruno@clisp.org>
15324
15325         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
15326         stpncpy.c uses it.
15327
15328 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15329
15330         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
15331         The workaround isn't strictly needed for POSIX conformance, and
15332         it's too much of a pain to configure and maintain.  We'll ask
15333         people to fix their kernels instead.
15334         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
15335         (NANOSLEEP_BUG_WORKAROUND): Remove.
15336         (xnanosleep): Remove the workaround.
15337
15338 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15339
15340         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
15341         Reported by Derek Price.
15342         (Include): Add "timespec.h".
15343
15344         * modules/xnanosleep (Depends-on): Remove gethrxtime.
15345
15346 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15347
15348         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
15349         to detect nanosleep bug.
15350
15351 2005-03-01  Bruno Haible  <bruno@clisp.org>
15352
15353         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
15354
15355 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
15356
15357         * modules/gethrxtime: New file.
15358         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
15359         (Depends-on): Add gethrxtime.
15360         (configure.ac): Add gl_XNANOSLEEP.
15361         (Makefile.am): Remove lib_SOURCES line.
15362
15363 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
15364
15365         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
15366         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
15367
15368 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
15369
15370         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
15371         * lib/timespec.h (gettime): Return void, since it always
15372         succeeds now.  All uses changed.
15373         * lib/gettime.c (gettime) Likewise.
15374         [HAVE_NANOTIME]: Prefer nanotime.
15375         Assume gettimeofday succeeds, as POSIX requires.
15376         Assime time () succeeds, since other code already does.
15377         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
15378         (timespec_subtract): Remove.
15379         (NANOSLEEP_BUG_WORKAROUND): New constant.
15380         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
15381         things considerably.  Use it only on GNU/Linux hosts, since the
15382         workaround shouldn't be needed elsewhere.
15383
15384 2005-02-24  Bruno Haible  <bruno@clisp.org>
15385
15386         * modules/gettext (Files): Add m4/glibc2.m4.
15387
15388 2005-02-24  Bruno Haible  <bruno@clisp.org>
15389
15390         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
15391         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
15392         * m4/progtest.m4:
15393         Update from GNU gettext 0.14.2.
15394         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
15395
15396 2005-02-24  Bruno Haible  <bruno@clisp.org>
15397
15398         * lib/localcharset.c: Update from GNU gettext 0.14.2.
15399         * lib/config.charset: Update from GNU gettext 0.14.2.
15400
15401 2005-02-24  Bruno Haible  <bruno@clisp.org>
15402
15403         * lib/gettext.h: Update from GNU gettext 0.14.2.
15404
15405 2005-02-23  Simon Josefsson  <jas@extundo.com>
15406
15407         * m4/iconvme.m4: New file.
15408
15409 2005-02-23  Jim Meyering  <jim@meyering.net>
15410
15411         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
15412         change.
15413         Thanks to Bruno Haible for catching it.
15414
15415 2005-02-22  Simon Josefsson  <jas@extundo.com>
15416
15417         * modules/iconvme: New file.
15418
15419         * MODULES.html.sh: Add iconvme.
15420
15421 2005-02-22  Simon Josefsson  <jas@extundo.com>
15422
15423         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
15424
15425 2005-02-22  Simon Josefsson  <jas@extundo.com>
15426
15427         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
15428
15429 2005-02-22  Jim Meyering  <jim@meyering.net>
15430
15431         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
15432         s/ifndef/ifdef/.
15433
15434 2005-02-20  Neil Conway  <neilc@samurai.com>
15435
15436         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
15437         returned by OSX/Darwin if the specified buffer is not large
15438         enough for the hostname.
15439
15440 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15441
15442         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
15443         pass it to _help, otherwise the latter coredumps trying to
15444         dereference state.root_argp.
15445
15446 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15447
15448         * modules/chdir-long (Depends-on): Add memrchr.
15449         * modules/memrchr (Files): Add lib/memrchr.h.
15450         (Include): "memrchr.h".
15451
15452 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15453
15454         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
15455
15456 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15457
15458         * lib/memrchr.h: New file.
15459         * lib/chdir-long.c: Include it.
15460         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
15461         Don't bother including stddef.h.
15462
15463 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
15464
15465         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
15466         inclusion.
15467         Include <sys/types.h>, for dev_t.
15468         (ME_DUMMY, ME_REMOTE): Move from here....
15469         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
15470         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
15471         Dmitry V. Levin.
15472         Include mountlist.h first, to test the interface.
15473
15474 2005-01-29  Bruno Haible  <bruno@clisp.org>
15475
15476         * lib/progname.c (program_name): Initialize.
15477         Needed when linking statically on MacOS X.
15478
15479 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
15480
15481         Sync from coreutils.
15482         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
15483         (Depends-on): Add c-strtod.
15484         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
15485
15486 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
15487
15488         Sync from coreutils.
15489         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
15490
15491         Remove files that are specific to coreutils.
15492         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
15493
15494 2005-01-28  Bruno Haible  <bruno@clisp.org>
15495
15496         * modules/javacomp: New file.
15497         * MODULES.html.sh (Java): Add javacomp.
15498
15499 2005-01-28  Bruno Haible  <bruno@clisp.org>
15500
15501         * m4/javacomp.m4: New file, from GNU gettext.
15502
15503 2005-01-28  Bruno Haible  <bruno@clisp.org>
15504
15505         * lib/javacomp.sh.in: New file, from GNU gettext.
15506         * lib/javacomp.h: New file, from GNU gettext.
15507         * lib/javacomp.c: New file, from GNU gettext.
15508
15509 2005-01-26  Simon Josefsson  <jas@extundo.com>
15510
15511         * lib/gai_strerror.c: Use GPL in header.
15512
15513 2005-01-26  Bruno Haible  <bruno@clisp.org>
15514
15515         * modules/javaexec: New file.
15516         * MODULES.html.sh (Java): Add javaexec.
15517
15518 2005-01-26  Bruno Haible  <bruno@clisp.org>
15519
15520         * m4/javaexec.m4: New file, from GNU gettext.
15521
15522 2005-01-26  Bruno Haible  <bruno@clisp.org>
15523
15524         * lib/javaexec.sh.in: New file, from GNU gettext.
15525         * lib/javaexec.h: New file, from GNU gettext.
15526         * lib/javaexec.c: New file, from GNU gettext.
15527
15528 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15529
15530         * modules/lchown (Depends-on): Remove lchown.h
15531
15532 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15533
15534         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
15535         must be defined if the header file was not found, in order
15536         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
15537
15538 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15539
15540         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
15541         initializers for struct pentry_state.
15542         (__argp_error): Check return value of __asprintf
15543         (__argp_failure): Translate error message
15544
15545         * lib/argp-parse.c: Removed braces around the expansion of N_()
15546
15547 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
15548
15549         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
15550         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
15551         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
15552         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
15553         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
15554         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
15555         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
15556         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
15557         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
15558         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
15559         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
15560         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
15561         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
15562         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
15563         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
15564         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
15565         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
15566         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
15567         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
15568         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
15569         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
15570         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
15571         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
15572         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
15573         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
15574         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
15575         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
15576         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
15577         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
15578         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
15579         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
15580         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
15581         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
15582         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
15583         xstrtol.m4, xstrtoumax.m4, yesno.m4:
15584         Use an all-permissive copyright notice, recommended by RMS.
15585
15586 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
15587
15588         * modules/chdir-long (Depends-on): Remove mempcpy.
15589
15590 2005-01-21  Jim Meyering  <jim@meyering.net>
15591
15592         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
15593         same value as for Solaris 9.
15594
15595         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
15596         component length.  This included changing the parameter to be
15597         of type `char *' rather than `char const *'.
15598         * lib/chdir-long.h (chdir_long): Update prototype.
15599
15600         * lib/openat.c (fdopendir, fstatat): New functions.
15601         * lib/openat.h: Include headers required for use of DIR and struct
15602         stat.
15603         [AT_SYMLINK_NOFOLLOW]: Define.
15604         (fdopendir, fstatat): Add prototypes.
15605
15606 2005-01-21  Bruno Haible  <bruno@clisp.org>
15607
15608         * modules/classpath: New file.
15609         * MODULES.html.sh (Java): Add classpath.
15610
15611 2005-01-21  Bruno Haible  <bruno@clisp.org>
15612
15613         * lib/classpath.h: New file, from GNU gettext.
15614         * lib/classpath.c: New file, from GNU gettext.
15615
15616 2005-01-20  Simon Josefsson  <jas@extundo.com>
15617
15618         * modules/version-etc-fsf: New file.
15619
15620 2005-01-20  Simon Josefsson  <jas@extundo.com>
15621
15622         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
15623         * lib/version-etc.c: Remove version_etc_copyright.
15624         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
15625         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
15626
15627 2005-01-20  Simon Josefsson  <jas@extundo.com>
15628
15629         * lib/base64.h (isbase64): Add.
15630
15631         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
15632         using a unsigned prototype, don't inline.
15633         (base64_decode): Use it.
15634
15635 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15636
15637         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
15638         it.
15639
15640 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15641
15642         * lib/save-cwd.c (save_cwd): Remove code to support the case
15643         where fchdir is missing or flaky.
15644
15645 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15646
15647         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
15648
15649 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
15650
15651         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
15652         AC_LIBSOURCES now does this.
15653         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
15654         with new ullong_max module.
15655
15656 2005-01-19  Bruno Haible  <bruno@clisp.org>
15657
15658         * modules/sh-quote: New file.
15659         * MODULES.html.sh (Executing programs): Add sh-quote.
15660
15661 2005-01-19  Bruno Haible  <bruno@clisp.org>
15662
15663         * lib/sh-quote.h: New file, from GNU gettext.
15664         * lib/sh-quote.c: New file, from GNU gettext.
15665
15666 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
15667
15668         Merge from coreutils.
15669         * m4/ullong_max.m4: New file.
15670         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
15671         (gl_MACROS): Assume localeconv exists.
15672
15673 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
15674
15675         Merge changes from coreutils, as described below in several
15676         changelogs dated today.
15677
15678         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
15679         (O_DIRECTORY): Remove; not needed here, since "." must be
15680         a directory.  All uses removed.
15681         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
15682         universal on Suns, and we also need to test for IRIX.
15683         Revamp code to use 'if' rather than '#if'.
15684         Avoid unnecessary comparison of cwd->desc to 0.
15685
15686         * lib/utimens.c (futimens): Robustify the previous patch, by checking
15687         for known valid error numbers rather than observed invalid ones.
15688
15689 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
15690
15691         * modules/ullong_max: New file.
15692
15693         * modules/chdir-long, modules/openat: New files.
15694         * modules/save-cwd (Depends-on): Depend on chdir-long.
15695         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
15696
15697 2005-01-18  Jim Meyering  <jim@meyering.net>
15698
15699         Merge from coreutils.
15700         * m4/chdir-long.m4, m4/openat.m4: New files.
15701         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
15702         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
15703         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
15704         is sane and DOES follow symlinks.  Besides, testing 20 different
15705         systems found no broken chown implementations.
15706         Prompted by a change in rsync's copy of this macro.
15707         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
15708
15709         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
15710
15711         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
15712         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
15713         NULL-means-set-to-current-time semantics.
15714         Remove temporary file immediately, rather than waiting
15715         for configure's at-exit trap code to do it.
15716
15717 2005-01-18  Jim Meyering  <jim@meyering.net>
15718
15719         * lib/version-etc.c (version_etc_copyright): Update copyright date.
15720
15721         * lib/utimens.c (futimens): Account for the fact that futimes
15722         can also fail with errno == ENOSYS or errno == ENOENT.
15723         Patch from Dmitry V. Levin.
15724
15725         Change the name of the robust chdir function from chdir to chdir_long.
15726         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
15727         (restore_cwd): Use chdir_long, not chdir.
15728         * lib/chdir-long.c: Renamed from chdir.c.
15729         * lib/chdir-long.h: Renamed from chdir.h.
15730         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
15731         Hurd.
15732
15733 2005-01-18  Bruno Haible  <bruno@clisp.org>
15734
15735         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
15736         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
15737         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
15738         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
15739         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
15740         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
15741         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
15742         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
15743         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
15744         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
15745         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
15746         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
15747         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
15748         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
15749         Use an all-permissive copyright notice, recommended by RMS.
15750
15751 2005-01-18  Bob Proulx  <bob@proulx.com>
15752
15753         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
15754         simplify offsetof() macro construct to avoid compile failure with
15755         native HP-UX 11.0 ANSI C compiler.
15756
15757 2005-01-17  Bruno Haible  <bruno@clisp.org>
15758
15759         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
15760         redundant because stpncpy.m4 takes care of it.
15761
15762 2005-01-17  Bruno Haible  <bruno@clisp.org>
15763
15764         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
15765
15766 2005-01-17  Bruno Haible  <bruno@clisp.org>
15767
15768         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
15769         used.
15770
15771 2005-01-17  Bruno Haible  <bruno@clisp.org>
15772
15773         * lib/fwriteerror.h (fwriteerror): Change specification to include
15774         fclose.
15775         * lib/fwriteerror.c: Include <stdbool.h>.
15776         (fwriteerror): At the end, close the file stream. Record whether
15777         stdout was already closed.
15778
15779 2005-01-17  Bruno Haible  <bruno@clisp.org>
15780
15781         * lib/execute.c (environ): Declare if needed.
15782         * lib/pipe.c (environ): Likewise.
15783         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
15784
15785 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15786
15787         * modules/argp: Depend on vsnprintf
15788
15789 2005-01-10  Jim Meyering  <jim@meyering.net>
15790
15791         * modules/closeout (Depends-on): Add atexit.
15792
15793 2005-01-06  Bruno Haible  <bruno@clisp.org>
15794
15795         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
15796
15797 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
15798
15799         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
15800         definitions to be after all include files, to avoid collisions.
15801         Problem reported by Bob Proulx.
15802
15803 2005-01-04  Jim Meyering  <jim@meyering.net>
15804
15805         Changes imported from coreutils.
15806         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
15807         as the mkstemp template, use a temporary directory and an
15808         8.3-friendly template to avoid trouble on systems like DJGPP.
15809         Reported by Juan M. Guerrero via Stepan Kasal.
15810         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
15811         close. Remove the temporary directory right away, rather than waiting
15812         for configure's at-exit trap code to do it.
15813         Suggestion from Stepan Kasal.
15814
15815 2005-01-01  Simon Josefsson  <jas@extundo.com>
15816
15817         * gnulib-tool: Print #include directives when --import'ing.
15818
15819 2004-12-28  Simon Josefsson  <jas@extundo.com>
15820
15821         * tests/test-base64.c: Include required header files.  Remove
15822         unused variables.
15823
15824 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
15825
15826         * modules/error (Depends-on): Remove gettext.
15827
15828 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
15829
15830         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
15831         not needed.  This removes a dependency on the gettext module.
15832         [defined _LIBC]: Do not include <libintl.h>; not needed.
15833
15834 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
15835
15836         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
15837         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
15838
15839 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
15840
15841         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
15842         HAVE_DECL_STRTOLD.
15843
15844 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15845
15846         * modules/getdate (Depends-on): Remove alloca-opt.
15847
15848 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15849
15850         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
15851
15852 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15853
15854         * lib/argp-parse.c: Include <stddef.h>.
15855         (alignof, alignto): New macros.
15856         (parser_init): Don't assume that void * is aligned sufficiently
15857         for struct option.
15858
15859         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
15860         need to extend the stack.
15861         (YYINITDEPTH): New macro, so that the initial stack isn't overly
15862         large.
15863
15864 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15865
15866         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
15867
15868 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
15869
15870         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
15871         (2004-10-24) change.  Apparently this was a false alarm.
15872
15873         * modules/getdate: Depend on alloca-opt, not alloca.
15874
15875 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
15876
15877         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
15878         Remove now-obsolete comment about AIX.
15879         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
15880         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
15881         (YYMAXDEPTH): New macro.
15882
15883 2004-12-18  Simon Josefsson  <jas@extundo.com>
15884
15885         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
15886
15887 2004-12-18  Bruno Haible  <bruno@clisp.org>
15888
15889         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
15890
15891 2004-12-18  Bruno Haible  <bruno@clisp.org>
15892
15893         * lib/fatal-signal.c (fatal_signals): Make non-const.
15894         (init_fatal_signals): New function.
15895         (uninstall_handlers, install_handlers): Ignore signals that were set to
15896         SIG_IGN.
15897         (at_fatal_signal): Call init_fatal_signals.
15898         (init_fatal_signal_set): Likewise. Ignore signals that were set to
15899         SIG_IGN.
15900         Reported by Paul Eggert.
15901
15902 2004-12-18  Bruno Haible  <bruno@clisp.org>
15903
15904         * doc/alloca.texi: New file.
15905         * doc/alloca-opt.texi: New file.
15906
15907 2004-12-17  Jim Meyering  <jim@meyering.net>
15908
15909         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
15910         Otherwise, install-sh could exit with improper exit status when
15911         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
15912
15913 2004-12-16  Simon Josefsson  <jas@extundo.com>
15914
15915         * tests/test-base64.c: Add license.
15916
15917 2004-12-15  Stepan Kasal  <address@hidden>
15918
15919         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
15920
15921 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
15922
15923         * modules/getcwd (Files): Add m4/d-ino.m4.
15924         Suggested by Mark D. Baushke.
15925
15926 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
15927
15928         * lib/getdate.y (textint): New member "negative".
15929         (time_zone_hhmm): New function.
15930         Expect 14 shift-reduce conflicts, not 13.
15931         (o_colon_minutes): New rule.
15932         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
15933         (yylex): Set the "negative" member of signed numbers.
15934
15935 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
15936
15937         * doc/getdate.texi (Time of day items, Time zone items):
15938         Describe new formats +00:00, UTC+00:00.
15939
15940 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
15941
15942         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
15943         spurious "-l"s.  Problem reported by Stepan Kasal.
15944
15945 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
15946
15947         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
15948         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
15949
15950 2004-12-04  Simon Josefsson  <jas@extundo.com>
15951
15952         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
15953         Vandoorselaere <yoann@prelude-ids.org>.
15954
15955 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15956
15957         Changes imported from coreutils.
15958         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
15959         exist.
15960         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
15961
15962 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15963
15964         Changes imported from coreutils.
15965         * lib/hard-locale.c: Assume <locale.h> exists.
15966         Include "strdup.h".
15967         (GLIBC_VERSION): New macro.
15968         (hard_locale): Assume setlocale exists.
15969         Rewrite to avoid #ifdef.
15970         Use strdup rather than malloc + strcpy.
15971         * lib/human.c: Assume <locale.h> exists.
15972         (human_readable): Assume localeconv exists.
15973
15974 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15975
15976         * modules/hard-locale (Depends-on): Add strdup.
15977
15978 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
15979
15980         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
15981         convert T2, not T.  (Imported from libc.)
15982
15983 2004-11-30  Simon Josefsson  <jas@extundo.com>
15984
15985         * modules/restrict (License): Change to LGPL.
15986
15987 2004-11-30  Simon Josefsson  <jas@extundo.com>
15988
15989         * m4/restrict.m4: Add copyright and copying conditions.
15990
15991 2004-11-30  Simon Josefsson  <jas@extundo.com>
15992
15993         * m4/base64.m4: New file.
15994
15995 2004-11-30  Simon Josefsson  <jas@extundo.com>
15996
15997         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
15998         base64.
15999
16000         * tests/test-base64.c: New file.
16001
16002         * modules/base64: New file.
16003
16004 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
16005
16006         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
16007         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
16008
16009         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
16010
16011 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
16012
16013         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
16014         (__getcwd.c): Don't restore errno; glibc doesn't.
16015         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
16016         first, falling back to our code only if its results look suspicious.
16017         Ensure that the resulting buffer is only as large as necessary.
16018
16019         * lib/readutmp.c: Include readutmp.h first.
16020         Include <errno.h>, since readutmp.h no longer does that.
16021         * lib/readutmp.h: Don't include <errno.h>,
16022         <sys/param.h>, <time.h>; not needed to establish interface.
16023         (errno): Remove decl.
16024         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
16025         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
16026         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
16027
16028 2004-11-28  Simon Josefsson  <jas@extundo.com>
16029
16030         * lib/base64.h, base64.c: New file.
16031
16032 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
16033
16034         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
16035
16036 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
16037
16038         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
16039         (Depends-on): Remove pathmax, same.  Add mempcpy.
16040         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
16041         (Makefile.am): Append getcwd.h to lib_SOURCES.
16042         (Include): Add getcwd.h.
16043         (Maintainer): Change from Jim Meyering to "all, glibc",
16044         since getdate now uses intended-for-glibc code.
16045         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
16046         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
16047
16048 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
16049
16050         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
16051         HP's ANSI C compiler.
16052         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
16053         Declaring int functions causes warnings on some modern systems and
16054         shouldn't be needed to compile on ancient ones.
16055         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
16056         defined.
16057
16058         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
16059         with the following changes.
16060         (__set_errno): Parenthesize properly.
16061         Include <stdbool.h>.
16062         (MIN, MAX, MATCHING_INO): New macros.
16063         (__getcwd): Define with prototype, not K&R form.
16064         Use heuristics to allocate default buffer on stack if possible.
16065         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
16066         behavior, and to avoid the PATH_MAX limit when computing
16067         ../../../../...
16068         Use MATCHING_INO to compare inode number to file.
16069         Check for arithmetic overflow in size calculations.
16070         Fix bug in reallocation of dot array that caused getcwd to fail
16071         on directories nested deeper than 75.
16072         Be more careful about saving errno on error.
16073         Do not use realloc; use only free+malloc, as this is a bit
16074         more flexible and avoids a needless copy operation.
16075         Do not inspect st_dev and st_ino for symbolic links; POSIX
16076         doesn't specify the latter.
16077         Check for closedir errors.
16078         Avoid needless casts.
16079         Use "#ifdef weak_alias" around weak_alias, to be like other
16080         glibc code.
16081         The following changes to getcwd.c have effect only when used in
16082         gnulib; they have no effect inside glibc proper.
16083         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
16084         as alloca isn't used.
16085         (alloca, __alloca): Likewise.
16086         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
16087         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
16088         unconditionally, as gnulib assumes C89 or better.
16089         Do not include <sys/param.h>.
16090         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
16091         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
16092         better.
16093         (NULL) [!defined NULL]: Remove; we assume C89 or better.
16094         Include <dirent.h> in a way that is compatible with modern Autoconf.
16095         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
16096         New macros, if not already defined.
16097         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
16098         Use "_LIBC", not "defined _LIBC", for consistency.
16099         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
16100         a mempcpy module.
16101         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
16102         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
16103         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
16104         credit only to Jim Meyering and adjust the copyright dates.
16105         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
16106         <stdlib.h>, <unistd.h>, "pathmax.h".
16107         Instead, include "xgetcwd.h" (first) and "getcwd.h".
16108         (INITIAL_BUFFER_SIZE): Remove.
16109         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
16110
16111 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
16112
16113         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
16114         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
16115         Use the _ONCE methods, for efficiency.
16116         Check for fcntl.h.  In test program, include <errno.h>
16117         and <fcntl.h> if available.  Remove old K&R cruft from
16118         test program.  Check for common errors in GNU/Linux,
16119         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
16120         don't do AC_LIBOBJ, as that's getcwd.m4's job.
16121         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
16122         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
16123         name accordingly.
16124         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
16125         accommodate new getcwd.c.
16126         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
16127         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
16128         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
16129         that's all we need now.
16130
16131 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16132
16133         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
16134         argp-parse.c depends on getopt internals, that means we should
16135         always use our getopt, to be on the safe side.
16136         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
16137         order not to spoil the result of an eventual previous invocation
16138         of gl_GETOPT_SUBSTITUTE.
16139
16140 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16141
16142         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
16143         redefinition warnings. To avoid them, include the defines
16144         in `#if !defined __need_getopt ... #endif'. The only place
16145         where __getopt_argv_const is used is in definitions
16146         of getopt_long and getopt_long_only below, which are as well
16147         protected by `#ifndef __need_getopt'.
16148         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
16149         __need_getopt after including <stdio.h> and <unistd.h> These
16150         headers might have defined it.
16151
16152 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
16153
16154         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
16155
16156 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
16157
16158         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
16159         (futimens): New function, which uses futimes if available.
16160         (futimens, utimens): Support timespec==NULL, with same semantics
16161         as utime and utimens.
16162         * lib/utimens.h (futimens): New decl.
16163
16164 2004-11-23  Jim Meyering  <jim@meyering.net>
16165
16166         * lib/getopt_.h: Remove trailing blanks.
16167
16168 2004-11-23  Jim Meyering  <jim@meyering.net>
16169
16170         * lib/__fpending.c: Add comment.
16171
16172 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
16173
16174         * modules/canonicalize (Depends-on): Add xreadlink.
16175         Problem reported by James Youngman.
16176
16177 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
16178
16179         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
16180         New macros.
16181         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
16182         optopt): Use them instead of invoking ## directly; otherwise, the
16183         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
16184
16185 2004-11-19  Bruno Haible  <bruno@clisp.org>
16186
16187         * lib/strtok_r.c: Move comments from here...
16188         * lib/strtok_r.h: ... to here.
16189
16190 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
16191
16192         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
16193         implementations that mishandle size_t overflow.
16194
16195 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
16196
16197         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
16198         might fail.  Problem reported by Yoann Vandoorselaere.
16199         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
16200         implementations that mishandle size_t overflow.
16201
16202 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16203
16204         * modules/canon-host (Depends-on): Add strdup.
16205
16206 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16207
16208         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
16209
16210 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16211
16212         * lib/canon-host.c: Include "strdup.h".
16213         (canon_host): Use getaddrinfo if available, so that IPv6 works.
16214         Use strdup instead of malloc/strcpy to duplicate strings.
16215
16216         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
16217         (human_space_before_unit): New constant.
16218         * lib/human.c (human_readable): Support it.
16219
16220         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
16221         (xgetcwd): Set errno correctly when failing.
16222         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
16223         the failure is actually due to a PATH_MAX problem.
16224
16225         Further getopt changes to make it more likely that glibc will
16226         buy the changes back.
16227         * lib/getopt.c (POSIXLY_CORRECT): New constant.
16228         (getopt): Use it, so to preserve glibc semantic
16229         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
16230         when compiling for libc.
16231         * lib/getopt_.h (__getopt_argv_const): Bring it back.
16232         (getopt_long, getopt_long_only): Use it.
16233
16234         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
16235         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
16236         (getopt): Argv is now char * const *, as per standard.
16237         (_getopt_internal_r, _getopt_internal): Argv is now char **,
16238         not char *__getopt_argv_const *.
16239         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
16240         _getopt_long_only_r): Likewise.
16241         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
16242         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
16243         _getopt_long_r, _getopt_long_only_r): Likewise.
16244         * lib/getopt_.h (__getopt_argv_const): Remove.
16245         (getopt): Argv is now char * const *, as per standard.
16246
16247         * lib/getdate.y (tORDINAL): New token.
16248         (day, relunit): Allow it for relative times.
16249         (relative_time_table): Use tORDINAL for ordinals.
16250
16251 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16252
16253         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
16254         Document that "second" isn't allowed as an ordinal number.
16255
16256 2004-11-16  Jim Meyering  <jim@meyering.net>
16257
16258         * modules/closeout (Depends-on): Add fpending.
16259
16260 2004-11-15  Jim Meyering  <jim@meyering.net>
16261
16262         * lib/closeout.c: Include "__fpending.h" once again.
16263         Include <stdbool.h>.
16264         (close_stdout): Don't fail just because stdout was closed initially,
16265         since some programs don't write to stdout in the normal course of
16266         operation (other than --version and --help), and we don't want this
16267         function to make e.g. `touch file >&-' fail.
16268         But do fail if it was closed and someone has tried to write to it.
16269         E.g., `printf foo >&-' must fail.
16270
16271 2004-11-13  Jim Meyering  <jim@meyering.net>
16272
16273         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
16274
16275 2004-11-12  Simon Josefsson  <jas@extundo.com>
16276
16277         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
16278         small doc fix is still pending.
16279
16280 2004-11-11  Simon Josefsson  <jas@extundo.com>
16281
16282         * modules/strtok_r: New file.
16283
16284         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16285         strtok_r.
16286
16287 2004-11-11  Simon Josefsson  <jas@extundo.com>
16288
16289         * m4/strtok_r.m4: New file.
16290
16291         * m4/getopt.m4: Replace opterr.
16292
16293 2004-11-11  Simon Josefsson  <jas@extundo.com>
16294
16295         * lib/strtok_r.h, strtok_r.c: New file.
16296
16297 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
16298
16299         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
16300         of replacing opterr, getopt, etc.  This should handle the
16301         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
16302
16303 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
16304
16305         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
16306         we can stop lying to compilers about the constness of argv when we
16307         are compiled outside glibc.
16308         (getopt, getopt_long, getopt_long_only): Use it.
16309         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
16310         _getopt_internal, getopt): Likewise.
16311         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
16312         _getopt_long_only_r): Likewise.
16313         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
16314         _getopt_long_r, _getopt_long_only_r): Likewise.
16315
16316         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
16317         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
16318         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
16319         the other external symbols.
16320         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
16321         declaration, since the above renaming now works around collisions.
16322
16323 2004-11-11  Jim Meyering  <jim@meyering.net>
16324
16325         * lib/linebreak.c: Remove trailing blanks.
16326         * lib/alloca_.h: Likewise.
16327         * lib/acosl.c: Likewise.
16328         * lib/euidaccess.c: Likewise.
16329         * lib/allocsa.h: Likewise.
16330
16331 2004-11-10  Simon Josefsson  <jas@extundo.com>
16332
16333         * m4/getaddrinfo.m4: New file.
16334
16335 2004-11-10  Simon Josefsson  <jas@extundo.com>
16336
16337         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
16338
16339 2004-11-10  Simon Josefsson  <jas@extundo.com>
16340
16341         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16342         getaddrinfo.
16343
16344         * modules/getaddrinfo: New file.
16345
16346 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16347
16348         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
16349
16350 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16351
16352         * lib/mktime.c (SHR): New macro, which is a portable
16353         substitute for >> that should work even on Crays.
16354         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
16355         Problem reported by Mark D. Baushke in
16356         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
16357         * lib/getdate.y (SHR): Likewise.
16358         (tm_diff): Use it.
16359         * lib/strftime.c (SHR): Likewise.
16360         (tm_diff): Use it.
16361         * lib/quotearg.c (struct quoting_options): Use unsigned int for
16362         quote_these_too, so that right shifts are well defined.  All uses
16363         changed.
16364
16365 2004-11-10  Jim Meyering  <jim@meyering.net>
16366
16367         Ensure that no close failure goes unreported.
16368         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
16369         return early when it seems there's nothing to flush.
16370         Don't include __fpending.h.
16371
16372 2004-11-10  Jim Meyering  <jim@meyering.net>
16373
16374         * modules/closeout (Depends-on): Remove fpending.
16375
16376 2004-11-10  Jim Meyering  <jim@meyering.net>
16377
16378         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
16379
16380 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
16381
16382         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
16383         gl_FUNC_STRFTIME.
16384         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
16385         and AC_REQUIRE when possible, to avoid duplicate checks.
16386         Check for <wchar.h>.
16387
16388 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
16389
16390         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
16391
16392 2004-11-09  Bruno Haible  <bruno@clisp.org>
16393
16394         * m4/sockpfaf.m4: New file.
16395
16396 2004-11-05  Bruno Haible  <bruno@clisp.org>
16397
16398         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
16399         Reported by Mark D. Baushke <mdb@cvshome.org>.
16400
16401 2004-11-04  Bruno Haible  <bruno@clisp.org>
16402
16403         2004-09-11  Bruno Haible  <bruno@clisp.org>
16404                 * allocsa.valgrind: New file.
16405         2004-02-06  Bruno Haible  <bruno@clisp.org>
16406                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
16407                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
16408                 Reported by Christopher Seip <chris.seip@hp.com>.
16409
16410 2004-11-04  Bruno Haible  <bruno@clisp.org>
16411
16412         * modules/allocsa (Files): Add lib/allocsa.valgrind.
16413         (Makefile.am): Distribute it.
16414
16415 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
16416
16417         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
16418         with errno == ERANGE if the buffer is too small.
16419         Problem reported by Mark D. Baushke.
16420
16421 2004-11-03  Albert Chin  <china@thewrittenword.com>
16422             Paul Eggert  <eggert@cs.ucla.edu>
16423
16424         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
16425         equivalent, substitute $ac_type for equivalent type rather than
16426         blindly using uint32_t *always* which won't work if uint32_t is not
16427         available.  Define _UINT32_T to work around typedef of uint32_t if
16428         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
16429         2.5.1.
16430
16431 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16432
16433         * m4/jm-macros.m4: Sync from coreutils.
16434         (gl_MACROS): Check for mbrlen, for pathchk.
16435         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
16436
16437 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16438
16439         * lib/xreadlink.c (MAXSIZE): New macro.
16440         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
16441         size does not exceed MAXSIZE.  Avoid cast.
16442         As suggested by Mark D. Baushke in
16443         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
16444         if readlink fails with buffer size just under MAXSIZE, try again
16445         with MAXSIZE.
16446
16447 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16448
16449         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
16450
16451 2004-11-02  Derek R. Price  <derek@ximbiot.com>
16452         and  Paul Eggert  <eggert@cs.ucla.edu>
16453
16454         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
16455         (get_date): Overparenthesize to avoid GCC warning.
16456
16457 2004-11-02  Bruno Haible  <bruno@clisp.org>
16458
16459         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
16460         returns void.
16461
16462 2004-11-02  Bruno Haible  <bruno@clisp.org>
16463
16464         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
16465         function returns void.
16466
16467 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
16468
16469         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
16470         fflush_unlocked, flockfile, funlockfile, funlockfile,
16471         fputs_unlocked, putc_unlocked.
16472
16473 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
16474
16475         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
16476         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
16477         already declared.
16478
16479 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16480
16481         * modules/getdate (Files): Add doc/getdate.texi.
16482         (Depends-on): Add setenv, xalloc.
16483
16484 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16485
16486         * lib/getdate.y: Add support for TZ="foo" within a date string.
16487         Fix some bugs near time_t boundaries.  Reject dates with
16488         out-of-range components, e.g., "Sept 31".
16489         Include <stdlib.h>, "setenv.h", "xalloc.h".
16490         (ISDIGIT_LOCALE): Remove; unused.
16491         Note that the TZ and time functions used here are not reentrant.
16492         (mktime_ok, get_tz): New functions.
16493         (TZBUFSIZE): New constant.
16494         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
16495         This requires that we sometimes generate our own TZ="XXX..." setting.
16496
16497 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16498
16499         * doc/getdate.texi: New file, from coreutils with modifications for
16500         the new TZ parsing.
16501
16502 2004-10-27  Derek R. Price  <derek@ximbiot.com>
16503
16504         * lib/mktime.c (not_equal_tm): Remove redundant check.
16505
16506 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
16507
16508         * modules/regex (lib_SOURCES): Add regex.c.
16509         Reported by James Youngman in
16510         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
16511
16512 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
16513
16514         * lib/getdate.y: Use Bison 1.875 features, and some minor
16515         code cleanups.  This change does not affect semantics.
16516         Don't include <stdlib.h>; no longer needed.
16517         Don't include unlocked-io.h; only the "#if TEST" code uses
16518         stdio, and performance isn't crucial there.
16519         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
16520         Bison 1.875 features as described below.
16521         All uses of "PC." replaced by "pc->".
16522         (YYSTYPE): Add a forward declaration.
16523         (yylex, yyerror): Use full prototypes in forward decls.
16524         Use "%pure-parser" rather than obsolescent "%pure_parser".
16525         Use %parse-param and %lex-param instead of obsolescent
16526         YYPARSE_PARAM and YYLEX_PARAM.
16527         (meridian_table, month_and_day_table, time_units_table,
16528         relative_time_table, time_zone_table, military_table,
16529         lookup_zone, lookup_word, get_date):
16530         Use NULL instead of 0 where appropriate.
16531         (to_hour): Avoid abort (), to avoid a dependency on
16532         stdlib.h.
16533         (yyerror, yylex): Now accepts parser_control * arg.
16534         (main) [TEST]: Use '\0' rather than 0 for char.
16535
16536 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
16537
16538         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
16539
16540 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
16541
16542         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
16543         It's now the caller's responsibility to handle the case where
16544         !HAVE_GETPAGESIZE && !defined getpagesize.
16545
16546         * lib/mktime.c (leapyear): Arg is long int, not int.
16547
16548 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
16549
16550         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
16551
16552 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
16553
16554         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
16555         missing.  Problem reported by James Youngman.
16556
16557 2004-10-16  Simon Josefsson  <jas@extundo.com>
16558
16559         * gnulib-tool: Fix comments.  Fix parse problem.
16560         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
16561
16562 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
16563
16564         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
16565         implementation of getopt_long.  Problem reported by Alexander Taler in:
16566         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
16567
16568 2004-10-15  Bruno Haible  <bruno@clisp.org>
16569
16570         * gnulib-tool: Untabify. Initialize supplied_libname.
16571         (func_usage): More homogenous output.
16572         (func_modules_transitive_closure, func_modules_to_filelist,
16573         func_emit_lib_Makefile_am): New functions.
16574         (func_import): New function, extracted from big case statement. Use
16575         func_get_license, func_modules_transitive_closure,
16576         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
16577         opt_lgpl. Don't use test -a, as it's not portable.
16578         (func_create_testdir): Use func_modules_transitive_closure,
16579         func_modules_to_filelist, func_emit_lib_Makefile_am.
16580
16581 2004-10-15  Bruno Haible  <bruno@clisp.org>
16582
16583         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
16584
16585 2004-10-15  Bruno Haible  <bruno@clisp.org>
16586
16587         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
16588         the portions belonging to each module.
16589         Suggested by Derek Robert Price <derek@ximbiot.com>.
16590
16591 2004-10-12  Simon Josefsson  <jas@extundo.com>
16592
16593         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
16594         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
16595         to real functions.
16596
16597 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16598
16599         * modules/vsnprintf: New file.
16600
16601 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16602
16603         * m4/vsnprintf.m4: New file.
16604
16605 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16606
16607         * lib/vsnprintf.h: New file.
16608         * lib/vsnprintf.c: New file.
16609
16610 2004-10-11  Bruno Haible  <bruno@clisp.org>
16611
16612         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
16613         vsnprintf.
16614
16615 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
16616
16617         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
16618
16619 2004-10-07  Bruno Haible  <bruno@clisp.org>
16620
16621         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
16622         fits into the provided buffer.
16623
16624 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
16625
16626         * lib/diacrit.c, diacrit.h: Add GPL notice.
16627
16628         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
16629         notice.
16630         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
16631         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
16632         This avoids a potential constant-folding bug.
16633
16634 2004-10-05  Bruno Haible  <bruno@clisp.org>
16635
16636         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
16637         for the declaration of strsep.
16638
16639 2004-10-05  Bruno Haible  <bruno@clisp.org>
16640
16641         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
16642
16643 2004-10-04  Simon Josefsson  <jas@extundo.com>
16644
16645         * modules/memmem: New file.
16646         * tests/test-memmem.c: New file.
16647         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
16648
16649 2004-10-04  Simon Josefsson  <jas@extundo.com>
16650
16651         * m4/memmem.m4: New file.
16652
16653 2004-10-04  Simon Josefsson  <jas@extundo.com>
16654
16655         * lib/memmem.h: New file.
16656         * lib/memmem.c: New file, taken from glibc.
16657
16658 2004-10-04  Simon Josefsson  <jas@extundo.com>
16659
16660         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
16661         '#ifdef USE_UNLOCKED_IO'.
16662
16663 2004-10-04  Simon Josefsson  <jas@extundo.com>
16664
16665         * config/srclist.txt: Add memmem from glibc.
16666
16667 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16668
16669         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
16670
16671         * modules/argmatch, modules/argp, modules/closeout, modules/error,
16672         modules/exclude, modules/getdate, modules/getline,
16673         modules/getndelim2, modules/getpass, modules/getpass-gnu,
16674         modules/getusershell, modules/linebuffer, modules/md5,
16675         modules/mountlist, modules/posixtm, modules/readtokens,
16676         modules/readutmp, modules/regex, modules/sha1,
16677         modules/version-etc, modules/yesno:
16678         Remove dependency on unlocked-io.
16679
16680 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16681
16682         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
16683
16684         * m4/unlocked-io.m4: Add copyright notice.
16685         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
16686
16687 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16688
16689         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
16690         * lib/xmalloc.c (xmemdup): Likewise.
16691         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
16692         XFREE): Remove these long-obsolescent macros.
16693         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
16694         * lib/xstrdup.c: Remove.
16695
16696         * lib/regex.c (re_comp): Cast gettext return value to char *,
16697         Problem reported by Martin Neitzel via Mark D. Baushke.
16698
16699 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16700
16701         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
16702         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
16703         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
16704         regex.c, sha1.c, version-etc.c, yesno.c:
16705         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
16706         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
16707         the includer's responsibility.
16708
16709         Sync from coreutils.
16710
16711         * lib/modechange.c (mode_compile): Don't decrement a pointer that
16712         points to the start of a string, as the C Standard says the
16713         resulting behavior is undefined.
16714
16715         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
16716         simple -> simple_backups, numbered_existing ->
16717         numbered_existing_backups, numbered -> numbered_backups
16718         to avoid shadowing problems.  All uses changed.
16719         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
16720         * lib/backupfile.c (check_extension, numbered_backup):
16721         Rename locals to avoid shadowing 'basename'.
16722         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
16723         once.
16724
16725         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
16726         * lib/.cvsignore: Add getopt.h.
16727
16728 2004-10-04  Bruno Haible  <bruno@clisp.org>
16729
16730         * modules/README: New file.
16731         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
16732         not a module.
16733
16734 2004-10-02  Jim Meyering  <jim@meyering.net>
16735
16736         * lib/dirfd.h, getpagesize.h: Add copyright notice.
16737
16738 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16739
16740         * modules/strsep: New file.
16741
16742 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16743
16744         * m4/strsep.m4: New file.
16745
16746 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16747
16748         * lib/strsep.h: New file.
16749         * lib/strsep.c: New file.
16750
16751 2004-10-01  Simon Josefsson  <jas@extundo.com>
16752
16753         * lib/snprintf.c (snprintf): Handle size==0.
16754
16755 2004-10-01  Simon Josefsson  <jas@extundo.com>
16756             Bruno Haible  <bruno@clisp.org>
16757
16758         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
16759         (snprintf): Declare 'args'.
16760
16761 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
16762
16763         * lib/snprintf.c: Remove comments as to why each header is needed.
16764
16765 2004-10-01  Bruno Haible  <bruno@clisp.org>
16766
16767         * MODULES.html.sh: Add strsep.
16768
16769 2004-09-30  Simon Josefsson  <jas@extundo.com>
16770
16771         * modules/snprintf: New file.
16772
16773 2004-09-30  Simon Josefsson  <jas@extundo.com>
16774
16775         * m4/snprintf.m4: New file.
16776
16777 2004-09-30  Simon Josefsson  <jas@extundo.com>
16778
16779         * lib/snprintf.h, lib/snprintf.c: New files.
16780
16781 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16782
16783         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
16784         (hol_entry_help): Never translate an empty string.
16785         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
16786         * lib/argp.h (OPTION_NO_TRANS): New option.
16787
16788 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16789
16790         * modules/argp (Maintainer): Replace Simon Josefsson
16791         by Sergey Poznyakoff.
16792
16793 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16794
16795         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
16796         changes merged back into glibc.
16797
16798 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16799
16800         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
16801
16802 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
16803
16804         * lib/xvasprintf.c: Include xalloc.h.
16805         (xvasprintf): Use xalloc_die, not xmalloc_die.
16806
16807 2004-09-29  Bruno Haible  <bruno@clisp.org>
16808
16809         * modules/alloca-opt: New file, derived from modules/alloca.
16810         * modules/allocsa: Depend on alloca-opt instead of alloca.
16811         * modules/setenv: Likewise.
16812         * modules/vasnprintf: Likewise.
16813         * MODULES.html.sh: Add alloca-opt.
16814
16815 2004-09-28  Simon Josefsson  <jas@extundo.com>
16816
16817         * gnulib-tool: New parameter --lgpl, to asseert that modules are
16818         LGPL, and to replace license template from GPL to LGPL.
16819
16820 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
16821
16822         * modules/dummy: Change license to LGPL.
16823
16824 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
16825
16826         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
16827
16828 2004-09-24  Simon Josefsson  <jas@extundo.com>
16829
16830         * modules/minmax (License): Change from GPL to LGPL.
16831
16832 2004-09-23  Simon Josefsson  <jas@extundo.com>
16833
16834         * gnulib-tool (--import): Typo.
16835
16836 2004-09-23  Simon Josefsson  <jas@extundo.com>
16837
16838         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
16839
16840 2004-09-22  Bruno Haible  <bruno@clisp.org>
16841
16842         * modules/*: Add 'License' field.
16843         * gnulib-tool: Accept --extract-license option.
16844         (func_get_license): New function.
16845
16846 2004-09-21  Bruno Haible  <bruno@clisp.org>
16847
16848         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
16849         Reported by Simon Josefsson.
16850
16851 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
16852
16853         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
16854         gl_AC_TYPE_LONG_LONG.
16855
16856 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
16857
16858         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
16859
16860 2004-09-18  Simon Josefsson  <jas@extundo.com>
16861         and  Paul Eggert  <eggert@cs.ucla.edu>
16862
16863         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
16864         calls with autoreconf.  Define GL_LIB.
16865
16866 2004-09-14  Karl Berry  <karl@gnu.org>
16867
16868         * config/srclist.txt: unsync setenv.c, sigh.
16869
16870 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
16871
16872         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
16873         Problem reported by Bruno Haible in:
16874         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
16875
16876 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
16877
16878         * config/srclist.txt: Comment out argp-pvh.c.
16879
16880 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
16881
16882         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
16883         in case some system header has #define'd it.  Problem reported by
16884         Soeren D. Schulze in
16885         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
16886
16887 2004-09-09  Karl Berry  <karl@gnu.org>
16888
16889         * regex.[ch]: delete from the root.  These were supposed to be
16890                 synced with emacs cvs, but this has not happened for about
16891                 a year, and anyway nothing else uses emacs regex.[ch].
16892                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
16893                 lib/regex[.ch] is untouched.
16894
16895 2004-09-09  Bruno Haible  <bruno@clisp.org>
16896
16897         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
16898
16899 2004-09-09  Bruno Haible  <bruno@clisp.org>
16900
16901         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
16902         modifications.
16903         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
16904
16905 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
16906
16907         * modules/xvasprintf: New file.
16908         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
16909
16910 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
16911
16912         * lib/xvasprintf.h: New file.
16913         * lib/xvasprintf.c: New file.
16914         * lib/xasprintf.c: New file.
16915
16916 2004-09-08  Bruno Haible  <bruno@clisp.org>
16917
16918         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
16919
16920 2004-09-08  Bruno Haible  <bruno@clisp.org>
16921
16922         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
16923         length is > INT_MAX.
16924         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
16925         more.
16926
16927 2004-09-08  Bruno Haible  <bruno@clisp.org>
16928
16929         * lib/stdint_.h: New file, taken from GNU clisp.
16930
16931 2004-09-08  Bruno Haible  <bruno@clisp.org>
16932             Oskar Liljeblad  <oskar@osk.mine.nu>
16933
16934         * modules/stdint: New file.
16935         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
16936
16937 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16938
16939         Import from coreutils.
16940         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
16941         strings on unbounded length.  alloca's performance benefits aren't
16942         that important here.
16943         (V_STRDUP): Remove.
16944         (parse_with_separator): New function, with most of the internals
16945         of the old parse_user_spec.  Allow user to omit both user and group,
16946         for compatibility with FreeBSD.
16947         Clone only the user name, not the entire spec.
16948         Do not set *uid, *gid unless entirely successful.
16949         Avoid memory leak in some failing cases.
16950         Fix regression for USER.GROUP reported by Dmitry V. Levin in
16951         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
16952         (parse_user_spec): Rewrite to use parse_with_separator.
16953
16954 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16955
16956         * modules/userspec: Don't depend on alloca.
16957
16958 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16959
16960         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
16961
16962 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
16963
16964         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
16965         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
16966         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
16967
16968 2004-08-16  Simon Josefsson  <jas@extundo.com>
16969
16970         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
16971         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
16972         Add --dry-run for --import.
16973         Let user provided command line parameters override configure.ac
16974         settings.
16975
16976 2004-08-12  Simon Josefsson  <jas@extundo.com>
16977
16978         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
16979         as discussed with Paul Eggert in threads rooted at
16980         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
16981         and
16982         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
16983         Before, the test was empty, and relied on ELIDE_CODE in source
16984         code.)
16985         (gl_PREREQ_GETOPT): New macro.
16986         (gl_GETOPT): Use them.
16987
16988 2004-08-12  Simon Josefsson  <jas@extundo.com>
16989
16990         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
16991         * lib/getopt_.h: Renamed from getopt.h.
16992
16993 2004-08-12  Simon Josefsson  <jas@extundo.com>
16994
16995         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
16996         Change default library name from libfoo to libgnu.
16997         Now, if you have a configure.ac that says:
16998                 gl_SOURCE_BASE(gl)
16999                 gl_M4_BASE(gl/m4)
17000                 gl_MODULES(error getopt etcetera)
17001                 gl_INIT
17002         you can import all you need by running:
17003                 ../gnulib/gnulib-tool --import
17004
17005         * modules/getopt (Files): Rename getopt.h to getopt_.h.
17006         (Makefile.am): Rewrite, use logic from argz.
17007         (Include): Use <getopt.h> instead of "getopt.h".
17008
17009 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
17010
17011         * modules/argp (Files): Add m4/unlocked-io.m4.
17012         (Depends-on): Add extensions.
17013
17014 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
17015
17016         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
17017         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
17018         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
17019         Check for program_invocation_name, program_invocation_short_name,
17020         flockfile, funlockfile, features.h, _getopt_long_only_r.
17021
17022 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
17023
17024         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
17025         its complicated substitute.
17026         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
17027         and program_invocation_name.
17028         (__argp_basename) [!_LIBC]: Remove; the only use was
17029         replaced by its body.
17030         (__argp_short_program_name): Change condition from
17031         !defined __argp_short_program_name to
17032         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
17033         to match argp-namefrob.h.
17034         (__argp_failure): Don't assume strerror_r returns char *.
17035         * lib/argp-parse.c (N_): Define unconditionally.
17036         (argp_default_options): Fill out initializers with 0 to avoid
17037         gcc warnings.
17038
17039 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
17040
17041         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
17042         getopt1.c.
17043
17044 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
17045
17046         Merge from coreutils.
17047
17048         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
17049
17050         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
17051         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
17052
17053 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
17054
17055         Merge from coreutils.
17056
17057         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
17058         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
17059         for Reliant Unix 5.43.
17060
17061         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
17062         (union fooround): Use uintmax_t, not long int.
17063         The rest is a merge from libc:
17064         [defined _LIBC]: Include <shlib-compat.h>.
17065         (_obstack) [defined _LIBC]: Remove after 2.3.4.
17066
17067         * lib/settime.c (settime): Recode to avoid warning with
17068         Sun Forte C 6U2.
17069
17070         * lib/strverscmp.c: Convert to UTF-8.
17071
17072 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
17073
17074         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
17075         m4/uintmax_t.m4.
17076
17077 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
17078
17079         * modules/xalloc-die: New file.
17080         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
17081
17082         * modules/md5 (Files): Add m4/uint32_t.m4.
17083         * modules/sha1: Renamed from modules/sha.
17084         (Files):
17085         Rename lib/sha.h to lib/sha1.h.
17086         Rename lib/sha.c to lib/sha1.c.
17087         Rename m4/sha.m4 to m4/sha1.m4.
17088         (lib_SOURCES): Likewise.
17089         (configure.ac): Rename gl_SHA to gl_SHA1.
17090         (Include): sha.h -> sha1.h.
17091
17092 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
17093
17094         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
17095         * m4/sha1.m4: Renamed from sha.m4.
17096         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
17097
17098 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
17099
17100         * lib/obstack.h (obstack_empty_p):
17101         Don't assume that chunk->contents is suitably aligned.
17102         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
17103         Likewise. Problem reported by Benno in
17104         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
17105
17106         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
17107         readable.  This could be improved further but it'd take some work.
17108
17109 2004-08-08  Simon Josefsson  <jas@extundo.com>
17110
17111         * modules/xgethostname (Depends-on): Remove exit and error (not
17112         used).
17113
17114         * modules/getpass-gnu: Add getpass.h.
17115         (Depends-on): Add stdbool.
17116         * modules/getpass: Add getpass.h.
17117
17118 2004-08-08  Simon Josefsson  <jas@extundo.com>
17119
17120         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
17121         Check getpass declaration.
17122
17123 2004-08-08  Simon Josefsson  <jas@extundo.com>
17124
17125         * lib/xgethostname.c: Don't include error.h (not used).
17126
17127         * lib/getpass.h: Add.
17128         * lib/getpass.c: Include getpass.h first.
17129
17130 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
17131
17132         * lib/xalloc-die.c: New file.
17133         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
17134         All uses removed.
17135         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
17136         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
17137         xalloc-die.c.
17138         (_, N_, xalloc_die): Move to xalloc-die.c.
17139         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
17140         so that we needn't mess with xalloc_msg_memory_exhausted.
17141
17142         * lib/sha1.h: Renamed from sha.h.
17143         (SHA1_H): Renamed from _SHA_H.
17144         (sha1_ctx): Renamed from sha_ctx.
17145         (sha1_init_ctx): Renamed from sha_init_ctx.
17146         (sha1_process_block): Renamed from sha_process_block.
17147         (sha1_process_bytes): Renamed from sha_process_bytes.
17148         (sha1_finish_ctx): Renamed from sha_finish_ctx.
17149         (sha1_read_ctx): Renamed from sha_read_ctx.
17150         (sha1_stream): Renamed from sha_stream.
17151         (sha1_buffer): Renamed from sha_buffer.
17152         * lib/sha1.c: Likewise; renamed from sha.c.
17153         Do not include <sys/types.h>.
17154         Include <stddef.h> rather than <stdlib.h>.
17155
17156 2004-08-08  Bruno Haible  <bruno@clisp.org>
17157
17158         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
17159         FILESYSTEM_PREFIX_LEN.
17160         * lib/progreloc.c: Likewise.
17161         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
17162
17163 2004-08-06  Simon Josefsson  <jas@extundo.com>
17164
17165         * modules/progname (Depends-on): Don't depend on stdbool.
17166
17167 2004-08-06  Simon Josefsson  <jas@extundo.com>
17168
17169         * modules/getsubopt: New file.
17170         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
17171         getsubopt.
17172
17173 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
17174
17175         More merge from coreutils.
17176
17177         * m4/utimens.m4, m4/utimecmp.m4: New files.
17178         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
17179         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
17180         prereq.m4, sha.m4: Import changes from coreutils.
17181
17182 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
17183
17184         More merge from coreutils.
17185         * modules/raise, modules/readtokens0, modules/utimens:
17186         * modules/utimecmp, module/xnanosleep: New files.
17187         * modules/strftime: Add lib/strftime.h.
17188         Change include from <time.h> to "strftime.h".
17189         * modules/yesno: Add lib/yesno.h.
17190         * modules/backupfile: Remove lib/addext.c.
17191         * modules/euidaccess: Add stat-macros.h.
17192         * modules/canonicalize, modules/euidaccess,
17193         modules/filemode, modules/lchown, modules/makepath,
17194         modules/rmdir, modules/stat: Likewise.
17195
17196 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
17197
17198         Merge from tar.
17199         * lib/argp-help.c (make_hol, hol_append): Don't assume that
17200         SIZE_MAX is a valid preprocessor constant.
17201         (__argp_basename): Change from "#ifndef _LIBC"
17202         to "#ifndef __argp_short_program_name", so that
17203         we don't compile these functions for tar.
17204
17205         More merges from coreutils.
17206         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
17207         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
17208         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
17209         * lib/addext.c: Remove; no longer needed.
17210         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
17211         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
17212         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
17213         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
17214         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
17215         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
17216         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
17217         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
17218         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
17219         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
17220         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
17221         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
17222         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
17223         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
17224         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
17225         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
17226         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
17227         Import changes from coreutils.
17228
17229 2004-08-05  Simon Josefsson  <jas@extundo.com>
17230
17231         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
17232
17233 2004-08-05  Simon Josefsson  <jas@extundo.com>
17234
17235         * m4/getsubopt.m4: New file.
17236
17237 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17238
17239         Merge from coreutils.
17240
17241         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
17242         * m4/getcwd-path-max.m4: New files.
17243
17244         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
17245         FILESYSTEM_PREFIX_LEN ->
17246         FILE_SYSTEM_PREFIX_LEN.
17247         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
17248         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
17249         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
17250         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
17251
17252         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
17253         prerequisite modules now handle the DOS stuff.
17254         Don't check for unistd.h.
17255
17256 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17257
17258         Merge from coreutils.
17259
17260         * lib/.gdb-history: Remove; this doesn't belong here.
17261
17262         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
17263         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
17264         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
17265         * lib/getcwd.c: New files.
17266
17267         * lib/dirname.h: Include <stdbool.h>.
17268         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
17269         for consistency with POSIX terminology.  All uses changed.
17270         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
17271         (strip_trailing_slashes): Use bool for booleans.
17272         * lib/stripslash.c (strip_trailing_slashes): Likewise.
17273
17274         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
17275         sometimes returns a positive errno value even when it succeeds.
17276         (print_errno_message) [!LIBC]: Fall back on strerror if
17277         __strerror_r fails.
17278
17279         * lib/path-concat.c (mempcpy): Don't define if a system header defines
17280         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
17281         (longest_relative_suffix): New function.
17282         (path_concat): Use it.  Assume first argument is not NULL.
17283         Port to DOS.  Omit redundant separators.
17284         Report an error instead of returning NULL.
17285         Use mempcpy instead of memcpy.
17286         (xpath_concat): Remove: not declared or used.
17287
17288         * lib/same.h: Include <stdbool.h>
17289         (same_name): Return bool, not int.
17290         * lib/same.c (same_name): Likewise.
17291         (errno): Don't declare; we assume C89 or better now.
17292
17293         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
17294         if not already defined.
17295
17296         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
17297         * lib/dup-safer.c (errno): Likewise.
17298
17299 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17300
17301         Merge from coreutils.
17302         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
17303         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
17304         * modules/path-concat: Don't depend on strdup.
17305
17306 2004-08-03  Simon Josefsson  <jas@extundo.com>
17307
17308         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
17309         * lib/progname.h: Don't include stdbool.h.
17310
17311 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17312
17313         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
17314         * MODULES.html.sh (func_all_modules): Remove fatal.
17315
17316 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17317
17318         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
17319
17320 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17321
17322         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
17323         working.
17324
17325 2004-08-02  Simon Josefsson  <jas@extundo.com>
17326
17327         * lib/getsubopt.h: New file, with comments from Bruno Haible.
17328         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
17329         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
17330
17331 2004-08-01  Simon Josefsson  <jas@extundo.com>
17332
17333         * lib/xgetdomainname.c: Include stdlib.h, for free().
17334
17335 2004-07-19  Bruno Haible  <bruno@clisp.org>
17336
17337         * MODULES.html.sh (func_all_modules): Add dummy.
17338
17339 2004-07-16  Simon Josefsson  <jas@extundo.com>
17340
17341         * modules/dummy: New file.
17342
17343 2004-07-16  Simon Josefsson  <jas@extundo.com>
17344
17345         * lib/dummy.c: New file.
17346
17347 2004-07-16  Bruno Haible  <bruno@clisp.org>
17348
17349         * lib/backupfile.h: Add extern "C" for C++.
17350         * lib/closeout.h: Likewise.
17351         * lib/copy-file.h: Likewise.
17352         * lib/findprog.h: Likewise.
17353         * lib/full-write.h: Likewise.
17354         * lib/pathname.h: Likewise.
17355         * lib/progname.h: Likewise.
17356         * lib/stpcpy.h: Likewise.
17357         * lib/stpncpy.h: Likewise.
17358         * lib/strcase.h: Likewise.
17359         * lib/strstr.h: Likewise.
17360         * lib/xalloc.h: Likewise.
17361
17362         * lib/mbswidth.h: Add extern "C" for C++.
17363         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
17364
17365 2004-07-13  Robert Millan  <robertmh@gnu.org>
17366
17367         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
17368
17369 2004-07-09  Simon Josefsson  <jas@extundo.com>
17370
17371         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
17372         failed without this.)
17373
17374 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
17375
17376         * modules/chown (Files): Add lib/fchown-stub.c, since
17377         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
17378
17379 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
17380
17381         * lib/fchown-stub.c: New file.
17382
17383 2004-06-24  Jim Meyering  <jim@meyering.net>
17384
17385         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
17386
17387 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17388
17389         * modules/argz: Omit "#include".
17390
17391         * MODULES.html.sh (func_all_modules): Add calloc, to match
17392         2004-06-01 addition of calloc module.
17393
17394 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17395
17396         * m4/argz.m4: New file, which is autoupdated from libtool.
17397
17398 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17399
17400         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
17401         libtool.
17402
17403 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17404
17405         * config/srclist-update: Don't insist on "USA." before the
17406         close-comment, as libtool omits the period and puts the */ on a
17407         separate line.
17408         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
17409         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
17410
17411 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
17412
17413         * modules/argz: New file.
17414         * MODULES.html.sh (func_all_modules): Add argz.
17415
17416 2004-06-12  Jim Meyering  <jim@meyering.net>
17417         and  Paul Eggert  <eggert@cs.ucla.edu>
17418
17419         * modules/hash (Files): Add lib/xalloc.h.
17420         * modules/pipe (Depends-on): Add wait-process.
17421         * modules/stat (Depends-on): Add xalloc.
17422         * modules/userspec (Files): Add lib/userspec.h.
17423         * modules/xstrto
17424
17425         Upgrade from gettext-0.13.
17426         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
17427         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
17428         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
17429
17430 2004-06-10  Jim Meyering  <jim@meyering.net>
17431
17432         * lib/calloc.c: New file.
17433
17434 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
17435
17436         * lib/getdate.y (yylex): Allow space between sign and number.
17437         Problem reported by Dan Jacobson.
17438
17439 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
17440
17441         Merge from coreutils CVS.
17442
17443         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
17444         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
17445         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
17446         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
17447         xstrtol.m4: Fix copyright date and/or serial number.
17448
17449         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
17450         See if we need an fchown replacement.
17451         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
17452         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
17453         and use the replacement function if we detect either defect.
17454
17455         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
17456         gl_UTIMECMP.
17457
17458 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
17459         and  Jim Meyering  <jim@meyering.net>
17460
17461         Merge from coreutils CVS.
17462
17463         * lib/stat-macros.h: New file, with contents from file-type.h
17464         and coreutils' system.h.
17465         * lib/file-type.c: Include "stat-macros.h".
17466         * lib/file-type.h (file_type): Move all macro definitions to new file,
17467         stat-macros.h.
17468
17469         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
17470         Wrap old code with this conditional.
17471         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
17472         function that does not dereference symlinks.
17473         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
17474
17475         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
17476         dependency problems.
17477         (xreadlink): Accept new arg SIZE, for efficiency.
17478         All decls and uses changed.
17479         * lib/xreadlink.h: Include <stddef.h>, for size_t.
17480
17481         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
17482         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
17483
17484         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
17485         sysexits.h.
17486
17487 2004-06-01  Jim Meyering  <jim@meyering.net>
17488
17489         * m4/calloc.m4: New file.
17490
17491 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
17492
17493         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
17494         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
17495         Also, fix a typo in a diagnostic.
17496
17497 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
17498
17499         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
17500         or AC_FUNC_REALLOC.
17501
17502 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
17503
17504         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
17505         macros to be defined.
17506         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
17507         the allocator returns NULL because the requested size is zero.
17508
17509 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
17510
17511         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
17512         var.  Add comment explaining why libc still defines it.  This
17513         merges the following patch from glibc:
17514         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
17515
17516 2004-05-20  Andreas Schwab  <schwab@suse.de>
17517
17518         * m4/free.m4: Replace free if it not known to work, not the other
17519         way round.
17520
17521 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
17522
17523         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
17524         present in glibc since revision 1.1 of this file.
17525         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
17526         obstack_alignment_mask, obstack_alloc, obstack_base,
17527         obstack_blank, obstack_blank_fast, obstack_chunk_size,
17528         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
17529         obstack_grow0, obstack_init, obstack_int_grow,
17530         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
17531         obstack_next_free, obstack_object_size, obstack_ptr_grow,
17532         obstack_ptr_grow_fast, obstack_room): Remove declarations of
17533         nonexistent functions.
17534
17535 2004-05-18  Karl Berry  <karl@gnu.org>
17536
17537         * config/srclist.txt: break link for vasnprintf.c.
17538
17539 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
17540
17541         Port obstack to the AS/400, where pointers are 16 bytes wide and
17542         you cannot cast an integer to a valid pointer.  This patch is
17543         currently waiting to be integrated into glibc; see
17544         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
17545
17546         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
17547         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
17548         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
17549         (struct obstack): temp member is now a union of a pointer and
17550         an integer, instead of an integer.  All integer uses changed.
17551         This does not affect the physical layout of struct obstack,
17552         except on hosts (like the AS/400) where the size or alignment of
17553         void * is greater than that of ptrdiff_t.
17554         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
17555         __STDC__)]: Store temporary in pointer member of union, not
17556         integer member.
17557         * lib/obstack.c: Include <stddef.h>, for offsetof.
17558         (struct fooalign): Remove; it doesn't need a name.
17559         (union fooround): Change double to long double, and add void *.
17560         (DEFAULT_ALIGNMENT): Use offsetof to compute.
17561         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
17562         not a macro.  Hence the values are always int; so remove all
17563         casts-to-int in uses.
17564
17565 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
17566
17567         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
17568         we can get this patch merged into glibc.
17569
17570 2004-05-17  Derek R. Price  <derek@ximbiot.com>
17571             Paul Eggert  <eggert@cs.ucla.edu>
17572
17573         * m4/argp: Depend on alloca.
17574
17575 2004-05-17  Derek R. Price  <derek@ximbiot.com>
17576             Paul Eggert  <eggert@cs.ucla.edu>
17577
17578         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
17579         freecoding.
17580
17581 2004-05-17  Bruno Haible  <bruno@clisp.org>
17582
17583         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
17584         precision that consists of a '.' followed by an empty digit string.
17585         Patch by Tor Lillqvist <tml@iki.fi>.
17586
17587 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
17588
17589         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
17590         for backward compatibility with older code.  We need our own
17591         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
17592         it under some other name, and our alloca.h will define it.
17593
17594 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
17595             Derek Price  <derek@ximbiot.com>
17596
17597         * lib/alloca.c: Include <alloca.h>, to get our interface.
17598         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
17599         include <alloca.h> first.  Use C89 prototype for alloca; this
17600         requires including <stddef.h> for size_t.  Use extern "C" if C++.
17601         Use #elif for simplicity, since we can assume C89 now.
17602         Don't try to source the system alloca.h since it will not be found
17603         and to prevent recursively including its replacement.
17604         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
17605         * lib/regex.c: Likewise.
17606
17607 2004-05-16  Derek Price  <derek@ximbiot.com>
17608             Paul Eggert  <eggert@cs.ucla.edu>
17609
17610         getline cleanup.  This changes the getndelim2 API: both order of
17611         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
17612         no delimiter).
17613
17614         * lib/getline.c: Don't include stddef.h or stdio.h, since our
17615         interface does that.
17616         (getline): Always use getdelim, so that we don't have two
17617         copies of this code.
17618         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
17619         if available.
17620         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
17621         (GETNDELIM2_MAXIMUM): New macro.
17622         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
17623         instead of the old practice of delim2==0.  All callers changed.
17624         Return -1 on overflow, instead of returning junk.
17625         Do not set *linesize unless allocation succeeds.
17626         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
17627         that we include sys/types.h.
17628         * lib/getnline.h: Likewise.
17629         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
17630         (getndelim2): Reorder arguments.
17631         * lib/getnline.c (getnline, getndelim):
17632         Don't discard the NMAX argument.
17633         (getnline): Invoke getndelim, to avoid code duplication.
17634         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
17635         of (size_t) -1 by callers of the getnline family.
17636
17637 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
17638
17639         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
17640         Check for gettimeofday.
17641         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
17642         Check for settimeofday, stime.
17643
17644 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
17645
17646         * lib/nanosleep.c (suspended): Change its type from int to
17647         sig_atomic_t volatile.
17648         (first_call): Make it private to rpl_nanosleep, and have it
17649         be zero initially as that's a bit faster.
17650         (my_usleep): Round up fractional times instead of truncating them,
17651         as this is the usual meaning for 'sleep'.
17652
17653         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
17654         doesn't work.
17655         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
17656         (ENOSYS): Define if not defined.
17657         (settime): Fall back on stime if it exists and settimeofday fails.
17658         But don't bother with fallbacks if a method fails with errno == EPERM.
17659
17660 2004-05-11  Jim Meyering  <jim@meyering.net>
17661
17662         Prior to this change, the save_cwd caller required read access to the
17663         current directory on most systems (ones with the fchdir function).
17664
17665         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
17666         fails, try write-only, and finally, resort to using xgetcwd.
17667
17668 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
17669
17670         * lib/obstack.c, obstack.h: Import changes from libc.
17671
17672 2004-04-28  Bruno Haible  <bruno@clisp.org>
17673
17674         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
17675         also implicitly appends .exe to executables.
17676         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
17677         accepts Windows pathnames.
17678         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
17679         Treat Cygwin like Windows, since it now accepts Windows pathnames.
17680         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
17681         Treat Cygwin like Windows, since it now accepts Windows pathnames.
17682         Reported by Derek Robert Price <derek@ximbiot.com>.
17683
17684 2004-04-21  Karl Berry  <karl@gnu.org>
17685
17686         * config/srclist.txt (localcharset.c): break sync.
17687
17688 2004-04-20  Paul Eggert  <eggert@twinsun.com>
17689
17690         * m4/host-os.m4: Add a copyright notice.
17691
17692 2004-04-20  Jim Meyering  <jim@meyering.net>
17693
17694         Change UTILS_ to gl_ in AC_DEFINE'd names.
17695         Change utils_- and jm_-prefixed variables, too.
17696         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
17697         UTILS_FUNC_MKDIR_TRAILING_SLASH.
17698         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
17699
17700         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
17701         Don't emit trailing blanks.
17702         Also rename jm_-prefixed variables to have gl_ prefix.
17703
17704         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
17705         Also rename jm_-prefixed variables to have gl_ prefix.
17706
17707         * m4/jm-macros.m4: Reflect the renamings.
17708         * m4/prereq.m4: Likewise.
17709
17710 2004-04-20  Jim Meyering  <jim@meyering.net>
17711
17712         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
17713         memory.
17714
17715 2004-04-20  Jim Meyering  <jim@meyering.net>
17716             Bruno Haible  <bruno@clisp.org>
17717
17718         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
17719         memory when realloc fails.
17720
17721 2004-04-19  Jim Meyering  <jim@meyering.net>
17722
17723         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
17724         now that readutmp.c may call `free (0)'.
17725
17726 2004-04-19  Bruno Haible  <bruno@clisp.org>
17727
17728         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
17729         * m4/inttypes_h.m4: Likewise.
17730         * m4/stdint_h.m4: Likewise.
17731         * m4/intmax_t.m4: Likewise.
17732         * m4/uintmax_t.m4: Likewise.
17733
17734 2004-04-18  Jim Meyering  <jim@meyering.net>
17735
17736         * m4/prereq.m4: Don't forbid jm_ prefix.
17737
17738         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
17739         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
17740         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
17741         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
17742         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
17743         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
17744         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
17745         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
17746         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
17747         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
17748         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
17749         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
17750         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
17751         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
17752         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
17753         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
17754         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
17755         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
17756         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
17757
17758 2004-04-18  Jim Meyering  <jim@meyering.net>
17759
17760         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
17761         failure, don't leak memory and do call END_UTMP_ENT.
17762
17763 2004-04-16  Jim Meyering  <jim@meyering.net>
17764
17765         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
17766         coreutils' stat program.
17767         (gl_PREREQ): Don't require jm_PREREQ_STAT.
17768
17769 2004-04-11  Paul Eggert  <eggert@twinsun.com>
17770
17771         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
17772         C89.
17773         (CHAR_BIT): Remove, since we assume C89.
17774         Include <stdint.h> if available, as per current Autoconf CVS advice.
17775
17776 2004-03-31  Jim Meyering  <jim@meyering.net>
17777
17778         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
17779         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
17780         * m4/xalloc.m4: Likewise.
17781
17782 2004-03-30  Paul Eggert  <eggert@twinsun.com>
17783
17784         Merge from coreutils.
17785
17786         * m4/inttostr.m4: New file.
17787         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
17788         Require AM_STDBOOL_H and gl_TIMESPEC instead.
17789         Require gl_CLOCK_TIME.
17790         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
17791
17792 2004-03-30  Paul Eggert  <eggert@twinsun.com>
17793
17794         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
17795         not bool, to be more consistent with Unix conventions.
17796         Suggested by Bruno Haible.
17797
17798         Merge from coreutils.
17799
17800         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
17801         * lib/umaxtostr.c: New files.
17802
17803         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
17804         the usual <time.h> dance.
17805         (get_date): Change signature to support fractional time stamps.
17806         All callers changed.
17807         * lib/getdate.y: Include "getdate.h" first, as we can now
17808         assume C89 and don't need to worry about 'const'.
17809         Similarly, include "unlocked-io.h" near start, not in middle.
17810         Include <limits.h>.
17811         (textint.value): Use long int rather than int.
17812         (textint.digits): Use size_t rather than int.
17813         (BILLION, LOG10_BILLION): New constants.
17814         (parser_control): New member rel_ns.  Members day_ordinal,
17815         time_zone, month, day, hour, minutes, rel_year, rel_month,
17816         rel_day, rel_hour, rel_minutes, rel_seconds
17817         are now long int, not int.  Member seconds is now struct timespec,
17818         not int.  New member timespec_seen.  Members dates_seen, days_seen,
17819         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
17820         not int.
17821         (%union.intval): Now long int, not int.
17822         New member timespec.
17823         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
17824         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
17825         (spec): Now is a timespec or an item list.
17826         (timespec, items): New nonterminals.
17827         (time, rel, relunit, number, get_date):
17828         Add support for fractional seconds.
17829         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
17830         (gmtime, localtime, mktime): Remove decls; not needed with C89.
17831         (to_hour): First arg is now long int, not int.
17832         (to_year): Returns long int, not int.
17833         Don't treat year -70 like 70.
17834         (tm_diff): Returns long int, not int.
17835         (lookup_word): Use bool instead of int when appropriate.
17836         (yylex): Use size_t for count, not int.
17837         Detect overflow when parsing large integer constants.
17838         Add support for fractions.
17839         (get_date): Make pointers 'const' if possible.
17840         Use more-portable code to detect integer overflow.
17841         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
17842         Don't use ctime; it's not reliable if the year has >4 digits.
17843
17844         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
17845         This is for compatibility with BSD.
17846
17847         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
17848         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
17849         From coreutils' system.h.
17850
17851         * lib/userspec.c: Don't include "posixver.h".
17852         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
17853         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
17854         compatible extension.  Simplify code by removing a boolean int
17855         that was always nonzero if a string was nonnull.
17856
17857 2004-03-30  Jim Meyering  <jim@meyering.net>
17858
17859         Merge from coreutils.
17860
17861         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
17862         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
17863         on some systems one must include <grp.h> before it.
17864         Reported by Christian Krackowizer.
17865
17866 2004-03-30  Jim Meyering  <jim@meyering.net>
17867
17868         Merge from coreutils.
17869
17870         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
17871
17872         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
17873         an empty input stream.
17874
17875         * lib/readtokens.c: Include <stdbool.h>.
17876         (readtoken): Use `size_t' rather than int/long.
17877         All callers adjusted.
17878         Use `bool' rather than `int' where appropriate.
17879         Use memset rather than an explicit loop.
17880         Use x2nrealloc rather than xrealloc.
17881         Allow the use of `\0' as a delimiter.
17882         (readtokens): Likewise.
17883         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
17884
17885 2004-03-30  Jim Meyering  <jim@meyering.net>
17886
17887         * m4/realloc.m4: Remove file, since now it does no more than
17888         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
17889         the `configure.ac' section of module/realloc.
17890         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
17891
17892 2004-03-30  Bruno Haible  <bruno@clisp.org>
17893
17894         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
17895         nonnull.
17896
17897 2004-03-29  Paul Eggert  <eggert@twinsun.com>
17898
17899         Merge changes to getloadavg.c from coreutils and Emacs.
17900
17901         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
17902         Define to an expression, not to the empty string.
17903         Include cloexec.h and xalloc.h.
17904         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
17905         Use set_cloexec_flag rather than rolling our own.
17906         * lib/cloexec.c, lib/cloexec.h: New files.
17907
17908 2004-03-29  Paul Eggert  <eggert@twinsun.com>
17909
17910         * m4/cloexec.m4: New file.
17911
17912 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17913
17914         * lib/getopt.h: Sync with libc CVS.
17915
17916 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17917             Bruno Haible  <bruno@clisp.org>
17918
17919         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
17920         mbswidth.
17921
17922 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17923             Bruno Haible  <bruno@clisp.org>
17924
17925         * lib/mbswidth.h: Include <wchar.h> only if
17926         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
17927         <wchar.h>.
17928         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
17929
17930 2004-03-09  Paul Eggert  <eggert@twinsun.com>
17931
17932         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
17933         Sync with libc CVS.
17934         * lib/getopt_int.h: New file, also synced from libc.
17935
17936 2004-03-09  Paul Eggert  <eggert@twinsun.com>
17937
17938         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
17939         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
17940         Bring back getopt.c, getopt.h, getopt1.c.
17941
17942 2004-03-07  Paul Eggert  <eggert@twinsun.com>
17943
17944         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
17945         All uses changed.  Check for sa_sigaction member; this fixes
17946         a bug first reported by Jason Andrade in
17947         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
17948
17949 2004-03-07  Paul Eggert  <eggert@twinsun.com>
17950
17951         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
17952         '#if' expressions.  Unlike the code it replaces, it does not
17953         depend on (defined _SC_PAGESIZE).  However, it does depend on
17954         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
17955         first reported by Jason Andrade in
17956         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
17957
17958 2004-02-25  Simon Josefsson  <jas@extundo.com>
17959
17960         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
17961
17962 2004-02-25  Simon Josefsson  <jas@extundo.com>
17963
17964         * lib/strdup.h: New file.
17965         * lib/strdup.c: Include it.
17966         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
17967         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
17968
17969 2004-02-23  Karl Berry  <karl@gnu.org>
17970
17971         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
17972         (from fencepost.gnu.org:/gd/gnuorg).
17973
17974 2004-02-23  Karl Berry  <karl@gnu.org>
17975
17976         * config/srclistvars.sh (GNUORG) [karl]: redefine.
17977         * config/srclist.txt: add maintain/standards documents.
17978
17979 2004-02-18  Bruno Haible  <bruno@clisp.org>
17980
17981         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
17982         Reported by Derek Robert Price <derek@ximbiot.com>.
17983
17984 2004-02-16  Karl Berry  <karl@gnu.org>
17985
17986         * config/mkinstalldirs, install-sh: update from automake.
17987
17988 2004-02-06  Karl Berry  <karl@gnu.org>
17989
17990         * m4/po.m4: update from gettext 0.14.1.
17991
17992 2004-02-06  Karl Berry  <karl@gnu.org>
17993
17994         * lib/config.charset: update from gettext 0.14.1.
17995
17996 2004-02-05  Paul Eggert  <eggert@twinsun.com>
17997
17998         Add comments and code, prompted by suggestions from Bruno Haible
17999         for sh-quote.
18000         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
18001         describing the enum quoting_style values.
18002         * lib/quotearg.c (quotearg_alloc): New function.
18003         (quotearg_buffer_restyled): Treat lone { and } as special.
18004         Treat = as special.  Work around bug with older shells
18005         that "see" a '\' that is really the 2nd byte of a multibyte char.
18006         Quote empty string with shell_quoting_style.
18007
18008 2004-02-03  Bruno Haible  <bruno@clisp.org>
18009
18010         * m4/pipe.m4: New file, from GNU gettext.
18011
18012 2004-02-03  Bruno Haible  <bruno@clisp.org>
18013
18014         * lib/pipe.h: New file, from GNU gettext.
18015         * lib/pipe.c: New file, from GNU gettext.
18016
18017 2004-01-27  Bruno Haible  <bruno@clisp.org>
18018
18019         * m4/execute.m4: New file, from GNU gettext.
18020
18021 2004-01-27  Bruno Haible  <bruno@clisp.org>
18022
18023         * lib/execute.h: New file, from GNU gettext.
18024         * lib/execute.c: New file, from GNU gettext.
18025         * lib/w32spawn.h: New file, from GNU gettext.
18026
18027 2004-01-24  Paul Eggert  <eggert@twinsun.com>
18028
18029         Merge from diffutils.
18030
18031         * lib/file-type.c (file_type): Add typed memory objects.
18032         * lib/file-type.h (S_TYPEISTMO): New macro.
18033
18034         * lib/c-stack.h (c_stack_action): Remove argv argument.
18035         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
18036         (die): Don't calculate message unless segv_action returns.
18037         (get_stack_location, min_address_from_argv, max_address_from_argv,
18038         volatile stack_base, volatile_stack_size): Remove.
18039         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
18040         that every segmentation violation is a stack overflow.  (Ouch!)
18041         See Debian bug 136249 (still outstanding) for more info about why
18042         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
18043
18044 2004-01-24  Paul Eggert  <eggert@twinsun.com>
18045
18046         Exit-status fix from coreutils.
18047
18048         Use exit_failure consistently in place of EXIT_FAILURE,
18049         so that program exit statuses are consistent on failure.
18050
18051         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
18052         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
18053         * lib/argmatch.h: Comment fix to match the above.
18054         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
18055         Now a macro referring to exit_failure, instead of a separate
18056         variable.  Include "exitfail.h" to get it.
18057         * lib/xstrtol.h: Include "exitfail.h".
18058         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
18059
18060         * lib/long-options.c (parse_long_options): Use prototype
18061         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
18062         for clarity.
18063
18064 2004-01-21  Jim Meyering  <jim@meyering.net>
18065
18066         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
18067         so as not to conflict with a different-sized __mktime_internal
18068         function in GNU libc.
18069         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
18070         Problem building statically-linked `ls' reported by Michael Brunnbauer.
18071
18072 2004-01-20  Karl Berry  <karl@gnu.org>
18073
18074         * config/config.guess: update from config.
18075
18076         * config/srclistvars.sh: GNUWWWLICENSES for karl.
18077
18078 2004-01-20  Bruno Haible  <bruno@clisp.org>
18079
18080         Safer stack allocation.
18081         * lib/setenv.c: Include allocsa.h.
18082         (alloca): Remove fallback definition.
18083         (freea): Remove macro.
18084         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
18085         instead of freea.
18086
18087 2004-01-20  Bruno Haible  <bruno@clisp.org>
18088
18089         * m4/eealloc.m4: New file, from GNU gettext.
18090
18091 2004-01-20  Bruno Haible  <bruno@clisp.org>
18092
18093         * m4/allocsa.m4: New file, from GNU gettext.
18094
18095 2004-01-20  Bruno Haible  <bruno@clisp.org>
18096
18097         * lib/xallocsa.h: New file, from GNU gettext.
18098         * lib/xallocsa.c: New file, from GNU gettext.
18099
18100 2004-01-20  Bruno Haible  <bruno@clisp.org>
18101
18102         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
18103
18104 2004-01-20  Bruno Haible  <bruno@clisp.org>
18105
18106         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
18107         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
18108         specially.
18109
18110 2004-01-20  Bruno Haible  <bruno@clisp.org>
18111
18112         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
18113         patch.
18114
18115 2004-01-20  Bruno Haible  <bruno@clisp.org>
18116
18117         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
18118
18119 2004-01-20  Bruno Haible  <bruno@clisp.org>
18120
18121         * lib/eealloc.h: New file.
18122
18123 2004-01-20  Bruno Haible  <bruno@clisp.org>
18124
18125         * lib/binary-io.h: Avoid warnings on Cygwin.
18126
18127 2004-01-20  Bruno Haible  <bruno@clisp.org>
18128
18129         * lib/allocsa.h: New file, from GNU gettext.
18130         * lib/allocsa.c: New file, from GNU gettext.
18131
18132 2004-01-18  Karl Berry  <karl@gnu.org>
18133
18134         * doc/gpl.texi, doc/lgpl.texi: new files.
18135
18136 2004-01-18  Karl Berry  <karl@gnu.org>
18137
18138         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
18139         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
18140
18141 2004-01-15  Paul Eggert  <eggert@twinsun.com>
18142
18143         Merge from coreutils.
18144
18145         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
18146         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
18147         (gl_DEFAULT_POSIX2_VERSION): Move
18148         the documentation from 'configure' into 'config.hin',
18149         so that 'configure --help' isn't burdened by it and
18150         we don't have to worry about its formatting there.
18151         Reword the documentation so that it's more succinct
18152         and can be run together into a single paragraph.
18153         * m4/same.m4 (gl_SAME): Check for pathconf.
18154
18155 2004-01-15  Paul Eggert  <eggert@twinsun.com>
18156
18157         Merge from coreutils.
18158
18159         * lib/posixver.c: Include posixver.h.
18160
18161         * lib/same.c: Include <stdbool.h>, <limits.h>.
18162         (_POSIX_NAME_MAX): Define if not defined.
18163         (MIN): New macro.
18164         (same_name): If file names are silently truncated, report
18165         that the file names are the same if they are the same after
18166         the silent truncation.
18167
18168         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
18169         conversion function.
18170         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
18171         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
18172         longer needed.
18173
18174 2004-01-15  Jim Meyering  <jim@meyering.net>
18175
18176         Merge from coreutils.
18177
18178         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
18179         if no library is required.
18180         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
18181         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
18182         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
18183         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
18184         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
18185         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
18186         value, $ac_cv_search_crypt, if it's "none required".
18187         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
18188         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
18189         not gl_FUNC_GETLOADAVG.
18190         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
18191         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
18192
18193 2004-01-15  Jim Meyering  <jim@meyering.net>
18194
18195         Merge from coreutils.
18196
18197         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
18198         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
18199         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
18200
18201         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
18202         optional configure-time default.
18203
18204         * lib/version-etc.c (version_etc_copyright): Update copyright date.
18205
18206         * lib/xreadlink.c (xreadlink): Correct outdated comment.
18207
18208 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
18209
18210         Merge from coreutils.
18211
18212         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
18213         value, $ac_cv_search_nanosleep, if it's "none required".
18214
18215 2004-01-14  Paul Eggert  <eggert@twinsun.com>
18216
18217         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
18218         with like-named macro in fnmatch.c.
18219         (EXT): Use an internal constant instead.
18220
18221         Merge fnmatch patches from glibc.
18222         * lib/fnmatch.c (mbsinit): Remove define.
18223         Add libc_hidden_ver (__fnmatch, fnmatch).
18224         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
18225         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
18226
18227 2004-01-14  Karl Berry  <karl@gnu.org>
18228
18229         * config/install-sh: update from automake.
18230
18231 2004-01-13  Karl Berry  <karl@gnu.org>
18232
18233         * config/install-sh: update from automake.
18234
18235 2004-01-09  Karl Berry  <karl@gnu.org>
18236
18237         * config/install-sh: update from automake.
18238
18239 2004-01-05  Karl Berry  <karl@gnu.org>
18240
18241         * config/config.{sub,guess}: update from config.
18242
18243 2003-12-31  Karl Berry  <karl@gnu.org>
18244
18245         * config/depcomp: update from automake.
18246
18247 2003-12-14  Karl Berry  <karl@gnu.org>
18248
18249         * lib/config.charset: update from gettext-runtime.
18250
18251 2003-12-03  Paul Eggert  <eggert@twinsun.com>
18252
18253         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
18254         Bug reported by Alfred M. Szmidt.
18255
18256 2003-12-03  Bruno Haible  <bruno@clisp.org>
18257
18258         * m4/gettext.m4: Upgrade from gettext-0.13.
18259         * m4/po.m4: Upgrade from gettext-0.13.
18260         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
18261         * m4/intmax.m4: New file, from gettext-0.13.
18262         * m4/printf-posix.m4: New file, from gettext-0.13.
18263
18264 2003-11-29  Karl Berry  <karl@gnu.org>
18265
18266         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
18267
18268 2003-11-25  Paul Eggert  <eggert@twinsun.com>
18269             Bruno Haible  <bruno@clisp.org>
18270
18271         * lib/printf-parse.h: Don't include sys/types.h.
18272         (ARG_NONE): New macro.
18273         (char_directive): Change type of *arg_index fields to size_t.
18274         * lib/printf-parse.c: Don't include sys/types.h.
18275         (SSIZE_MAX): Remove macro.
18276         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
18277         Remove unnecessary overflow check.
18278         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
18279         fields.
18280
18281 2003-11-25  Bruno Haible  <bruno@clisp.org>
18282
18283         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
18284
18285 2003-11-25  Bruno Haible  <bruno@clisp.org>
18286
18287         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
18288         gt_TYPE_SSIZE_T.
18289
18290 2003-11-24  Paul Eggert  <eggert@twinsun.com>
18291
18292         * modules/alloca: Remove dependency on xalloc.
18293
18294 2003-11-24  Paul Eggert  <eggert@twinsun.com>
18295
18296         * lib/alloca.c: Remove dependency on xalloc module.
18297         (xalloc_die): Remove.
18298         (memory_full) [!defined emacs]: New macro.
18299         [!defined emacs]: Don't include xalloc.h.
18300         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
18301         address arithmetic overflows.  Change datatypes a bit to avoid
18302         unnecessary casts.
18303
18304 2003-11-22  Jim Meyering  <jim@meyering.net>
18305
18306         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
18307         s/size/size_t/.
18308
18309 2003-11-21  Karl Berry  <karl@gnu.org>
18310
18311         * config/config.{sub,guess}: update from config.
18312
18313 2003-11-18  Karl Berry  <karl@gnu.org>
18314
18315         * config/config.{sub,guess}: update from config.
18316
18317         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
18318
18319 2003-11-17  Paul Eggert  <eggert@twinsun.com>
18320
18321         * README: Mention that S+T cannot overflow if S is the size of
18322         an existing object and T is sufficiently small.
18323
18324 2003-11-17  Jim Meyering  <jim@meyering.net>
18325
18326         On systems without utime and without a utimes function capable of
18327         dealing with a NULL struct utimbuf* argument, this utime replacement
18328         could -- in unusual circumstances -- leak a file descriptor.
18329         * lib/utime.c: Include <unistd.h> and <errno.h>.
18330         (utime_null): Be sure to close `fd' and to preserve errno.
18331         Reported by Geoff Collyer via Arnold Robbins.
18332
18333 2003-11-17  Bruno Haible  <bruno@clisp.org>
18334
18335         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
18336         (Depends-on): Add xsize.
18337
18338 2003-11-17  Bruno Haible  <bruno@clisp.org>
18339
18340         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
18341
18342 2003-11-17  Bruno Haible  <bruno@clisp.org>
18343
18344         * lib/vasnprintf.c (alloca): Remove fallback definition.
18345         (freea): Remove definition.
18346         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
18347         Reported by Paul Eggert.
18348
18349 2003-11-16  Paul Eggert  <eggert@twinsun.com>
18350             Bruno Haible  <bruno@clisp.org>
18351
18352         Protect against address arithmetic overflow.
18353         * lib/printf-args.h: Include stddef.h.
18354         (arguments): Change type of field 'count' to size_t.
18355         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
18356         'unsigned int' where appropriate.
18357         * lib/printf-parse.h: Include sys/types.h.
18358         (char_directive): Change type of *arg_index fields to ssize_t.
18359         (char_directives): Change type of fields 'count', max_*_length to
18360         size_t.
18361         * lib/printf-parse.c: Include sys/types.h and xsize.h.
18362         (SSIZE_MAX): Define fallback value.
18363         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
18364         instead of 'int' where appropriate. Check a_allocated, d_allocated
18365         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
18366         * lib/vasnprintf.c: Include xsize.h.
18367         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
18368         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
18369         overflow. Avoid wraparound when converting a width or precision from
18370         decimal to binary.
18371
18372 2003-11-16  Bruno Haible  <bruno@clisp.org>
18373
18374         Update from GNU gettext.
18375         * lib/printf-parse.c: Generalize to it can be compiled for wide
18376         strings.
18377         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
18378         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
18379         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
18380         SNPRINTF): New macros.
18381         Don't include <alloca.h> if the file is used inside libintl.
18382         (local_wcslen): New function, for Solaris 2.5.1.
18383         (VASNPRINTF): Use it instead of wcslen.
18384
18385 2003-11-16  Bruno Haible  <bruno@clisp.org>
18386
18387         * lib/xsize.h (xmax): New function.
18388         (xsum, xsum3, xsum4): Declare as "pure" functions.
18389
18390 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18391
18392         * modules/xalloc (Files): Undo latest change, since xalloc.h
18393         no longer needs SIZE_MAX or PTRDIFF_MAX.
18394
18395 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18396
18397         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
18398         gl_PTRDIFF_MAX.
18399
18400 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18401
18402         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
18403         "return", to pacify some unknown compiler.  Problem reported
18404         by Joerg Schilling.
18405
18406 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18407
18408         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
18409         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
18410         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
18411         heuristic is just as accurate as far as we know, and it removes a
18412         dependency on size_max.m4 and ptrdiff_max.m4.
18413
18414 2003-11-11  Bruno Haible  <bruno@clisp.org>
18415
18416         * modules/xsize (Files): Add m4/size_max.m4.
18417         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
18418
18419 2003-11-11  Bruno Haible  <bruno@clisp.org>
18420
18421         * m4/size_max.m4: New file.
18422         * m4/ptrdiff_max.m4: New file.
18423         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
18424         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
18425         (gl_XALLOC): Invoke it.
18426
18427 2003-11-11  Bruno Haible  <bruno@clisp.org>
18428
18429         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
18430         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
18431         defined.
18432
18433 2003-11-10  Paul Eggert  <eggert@twinsun.com>
18434
18435         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
18436         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
18437         rejected some allocations of exactly SIZE_MAX - 2 bytes.
18438         From Bruno Haible.
18439         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
18440         not (size_t) -1, since it's defined here.
18441
18442 2003-11-09  Karl Berry  <karl@gnu.org>
18443
18444         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
18445
18446 2003-11-06  Paul Eggert  <eggert@twinsun.com>
18447
18448         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
18449         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
18450         Reject sizes of exactly SIZE_MAX bytes.
18451         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
18452         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
18453
18454 2003-11-05  Bruno Haible  <bruno@clisp.org>
18455
18456         * lib/xsize.h: Include limits.h, to avoid a possible collision with
18457         SIZE_MAX defined in <limits.h> on Solaris.
18458
18459 2003-11-04  Jim Meyering  <jim@meyering.net>
18460
18461         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
18462         variable names, rather than @VAR@.
18463         * modules/poll: Likewise.
18464
18465 2003-11-04  Bruno Haible  <bruno@clisp.org>
18466
18467         * modules/xsize: New file.
18468         * modules/linebreak: Depend on xsize.
18469         * MODULES.html.sh (func_all_modules): Add xsize.
18470
18471 2003-11-04  Bruno Haible  <bruno@clisp.org>
18472
18473         * m4/xsize.m4: New file.
18474
18475 2003-11-04  Bruno Haible  <bruno@clisp.org>
18476
18477         * lib/xsize.h: New file.
18478         * lib/linebreak.c: Include xsize.h.
18479         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
18480         argument for overflow.
18481         Suggested by Paul Eggert.
18482
18483 2003-11-03  Karl Berry  <karl@gnu.org>
18484
18485         * config/config.{guess,sub}: update from config.
18486
18487 2003-11-03  Jim Meyering  <jim@meyering.net>
18488
18489         * modules/userspec (lib_SOURCES): Add userspec.h.
18490         (Include): Add "userspec.h".
18491         Improve description.
18492
18493 2003-11-03  Jim Meyering  <jim@meyering.net>
18494
18495         * lib/userspec.c: Include "userspec.h".
18496         * lib/userspec.h: New file.
18497
18498 2003-11-03  Bruno Haible  <bruno@clisp.org>
18499
18500         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
18501
18502 2003-11-03  Bruno Haible  <bruno@clisp.org>
18503
18504         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
18505         available, to avoid (extremely rare) race condition.
18506         Suggested by Paul Eggert.
18507
18508 2003-11-02  Karl Berry  <karl@gnu.org>
18509
18510         * config/srclist.txt (vasprintf.c): sync broken, sigh.
18511
18512 2003-10-31  Paul Eggert  <eggert@twinsun.com>
18513
18514         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
18515         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
18516         (read_filesystem_list): Set and use me_type_malloced.
18517         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
18518         whatever the type happens to be), for brevity and consistency.
18519         Check for size calculation overflow on Alphas running OSF/1.
18520
18521 2003-10-31  Jim Meyering  <jim@meyering.net>
18522
18523         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
18524
18525         * lib/linebuffer.c: Include <string.h> for declaration of memset.
18526
18527 2003-10-30  Paul Eggert  <eggert@twinsun.com>
18528             Bruno Haible  <bruno@clisp.org>
18529
18530         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
18531         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
18532
18533 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
18534
18535         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
18536         netbsd*-gnu*.  Suggested by Robert Millan.
18537
18538 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18539
18540         * modules/group-member: Depend on stdbool.
18541
18542 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18543
18544         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
18545
18546 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18547
18548         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
18549         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
18550         after the 'gnu' in these cases.  This fixes some bugs in the
18551         previous change, and is based on suggestions by Robert Millan.
18552
18553 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18554
18555         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
18556         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
18557         no longer needed.
18558         * lib/quotearg.c (quotearg_n_options): Use it.
18559         * lib/group-member.c: Include <stdbool.h>.
18560         (free_group_info): Arg is now const *; don't free arg.
18561         (get_group_info): Now returns bool and accepts struct group_info *,
18562         rather than returning a malloc'ed struct group_info *.
18563         All uses changed.  Check for overflow in internal size calculation.
18564
18565         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
18566         rather than xmalloc/xrealloc.
18567         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
18568         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
18569         conformance bug: the old code used a pointer after freeing the
18570         storage that it addressed.
18571         * lib/hash.c (hash_initialize): Simplify the code by using
18572         xalloc_oversized rather than doing it by hand.
18573         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
18574         the buffer preserved.  Use free and xmalloc instead.
18575         * lib/quotearg.c (quotearg_n_options): Likewise.
18576         Use a simpler test for size overflow.  Don't use xalloc_oversized
18577         because unsigned int might be wider than size_t (!); this suggests
18578         that we should switch from unsigned int to size_t for slot numbers.
18579
18580 2003-10-28  Paul Eggert  <eggert@twinsun.com>
18581
18582         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
18583         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
18584         NetBSD kernels.  Requested by Richard Stallman.
18585
18586 2003-10-27  Paul Eggert  <eggert@twinsun.com>
18587
18588         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
18589         to allocate the returned structure.  Do not allocate a subarray,
18590         as x2nrealloc will do that.
18591         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
18592         instead of xnrealloc.
18593         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
18594
18595 2003-10-27  Bruno Haible  <bruno@clisp.org>
18596
18597         * lib/stdbool_.h: Better support for BeOS.
18598
18599 2003-10-26  Paul Eggert  <eggert@twinsun.com>
18600
18601         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
18602         now uses inline.
18603
18604 2003-10-26  Paul Eggert  <eggert@twinsun.com>
18605
18606         * lib/xalloc.h (xalloc_oversized): New static inline function, for
18607         callers that want to do their own size-overflow checking.  Include
18608         <stdbool.h>, since xalloc_oversized returns bool.
18609         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
18610         to use xalloc_oversized.
18611
18612         Add two functions x2realloc, x2nrealloc, for programs that grow
18613         arrays dynamically by doubling their sizes.
18614         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
18615         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
18616         New functions.
18617
18618         Port to C99 semantics for 'inline' of external functions.
18619         Bug reported by Bruno Haible.
18620         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
18621         with the old contents of xnmalloc.
18622         (xnmalloc, xmalloc): Use it.
18623         (xnrealloc_inline): New static inline function,
18624         with the old contents of xnrealloc.
18625         (xnrealloc, xrealloc): Use it.
18626
18627         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
18628         that.
18629
18630 2003-10-26  Karl Berry  <karl@gnu.org>
18631
18632         * config/srclist.txt (COPYING.DOC): no longer available from
18633         /gd/gnuorg; don't know where the ultimate source is.
18634
18635 2003-10-25  Paul Eggert  <eggert@twinsun.com>
18636
18637         Fix several address-calculation bugs in the hash modules,
18638         plus some minor code cleanup.
18639
18640         * lib/hash.h: Include <stdbool.h>, for bool.
18641         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
18642         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
18643         hash_get_n_entries, hash_get_max_bucket_length,
18644         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
18645         hash_rehash): Use size_t rather than unsigned.
18646         * lib/hash.c (struct hash_table, hash_get_n_buckets,
18647         hash_get_n_buckets_used, hash_get_n_entries,
18648         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
18649         hash_get_entries, hash_do_for_each, hash_string, is_prime,
18650         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
18651         Likewise.
18652         (SIZE_MAX): Define if not defined.
18653         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
18654         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
18655         hash_print):
18656         Use const * when possible.
18657         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
18658         (check_tuning): Fix bug: if tuning parameters were very close to
18659         0 or 1, rounding errors could have caused subscript violations.
18660         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
18661         (hash_initialize): Add 'fail:' label
18662         to free table and return NULL, and use it to simplify code.
18663         Use calloc rather than clearing the storage ourself.
18664         (hash_initialize, hash_rehash): Check for arithmetic overflow in
18665         buffer size calculations.
18666         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
18667         Include <stddef.h>, for size_t.
18668         * lib/hash-pjw.c (hash_pjw): Likewise.
18669         Switch to method described by Bruno Haible.
18670         Include <limits.h>, for CHAR_BIT.
18671         (SIZE_BITS): New macro.
18672
18673 2003-10-23  Paul Eggert  <eggert@twinsun.com>
18674
18675         * m4/getline.m4 (AM_FUNC_GETLINE):
18676         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
18677         hosts.  Problem reported by Derek Robert Price in
18678         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
18679         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
18680         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
18681
18682 2003-10-21  Paul Eggert  <eggert@twinsun.com>
18683
18684         * lib/getndelim2.c (getndelim2): When size calculation overflows,
18685         ceiling the allocation at NMAX bytes rather than silently
18686         discarding input bytes before NMAX is reached.  This makes
18687         a difference only if NMAX exceeds SIZE_MAX / 2.
18688
18689         * lib/obstack.c: Merge from glibc.
18690         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
18691         Add libc_hidden_def (_obstack_newchunk).
18692         (_obstack_free) [! defined _LIBC]: Remove.
18693         [defined _LIBC]: Make a strong alias from obstack_free, rather than
18694         a clone of the function body.
18695         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
18696         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
18697
18698         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
18699         glibc.
18700         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
18701         arg to memcpy.
18702
18703         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
18704         (obstack_ptr_grow_fast, obstack_int_grow_fast):
18705         Don't use lvalue casts, as GCC plans to remove support for them
18706         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
18707         was also present in the non-GCC version, indicating that this
18708         code had always been buggy and had never been widely used.
18709         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
18710         Use the fast variant of each macro, rather than copying the
18711         definiens of the fast variant; that way, we'll be more likely to
18712         catch future bugs in the fast variants.
18713
18714 2003-10-20  Bruno Haible  <bruno@clisp.org>
18715
18716         * modules/wait-process: New file.
18717         * MODULES.html.sh (func_all_modules): Add wait-process.
18718
18719 2003-10-20  Bruno Haible  <bruno@clisp.org>
18720
18721         * m4/wait-process.m4: New file.
18722
18723 2003-10-20  Bruno Haible  <bruno@clisp.org>
18724
18725         * lib/wait-process.h: New file, from GNU gettext.
18726         * lib/wait-process.c: New file, from GNU gettext.
18727
18728 2003-10-19  Jim Meyering  <jim@meyering.net>
18729
18730         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
18731         HPUX 10.20.
18732
18733 2003-10-18  Karl Berry  <karl@gnu.org>
18734
18735         * config/config.guess: update from config.
18736
18737 2003-10-16  Paul Eggert  <eggert@twinsun.com>
18738
18739         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
18740         (getgroups): First arg is int, not size_t.
18741         Don't let 'free' mangle errno.
18742
18743 2003-10-16  Paul Eggert  <eggert@twinsun.com>
18744
18745         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
18746
18747 2003-10-16  Karl Berry  <karl@gnu.org>
18748
18749         * config/config.{guess,sub}: update from config.
18750
18751 2003-10-16  Jim Meyering  <jim@meyering.net>
18752
18753         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
18754         memcpy.
18755
18756 2003-10-15  Paul Eggert  <eggert@twinsun.com>
18757
18758         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
18759         (SIZE_MAX): Remove.
18760         (new_exclude, add_exclude_file): Initial size no longer needs to
18761         be a power of 2.
18762         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
18763         our own address arithmetic overflow checking.
18764
18765         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
18766         (fnmatch): Do not alloca more than 2000 wide characters;
18767         instead, use malloc for large buffers.
18768         Check for address arithmetic overflow, and return -1
18769         with errno set to ENOMEM in that case.
18770         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
18771         (NEW_PATTERN): Do not alloca more than 8000 bytes;
18772         instead, return -1.  Check for address arithmetic overflow.
18773
18774 2003-10-14  Paul Eggert  <eggert@twinsun.com>
18775
18776         Handle invalid suffixes and overflow independently, so that
18777         callers can treat them independently as needed.  Fix some bugs in
18778         suffix handling, e.g., "100k@" was not diagnosed as an invalid
18779         suffix for a human-readable blocksize.  The major caller-visible
18780         change is the addition of a new
18781         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
18782         that both overflow and suffix chars were found.
18783
18784         * lib/human.c (humblock): Don't check separately for invalid suffix
18785         char; that is xstrtoumax's job (now that its bug is fixed).
18786         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
18787         INTMAX_MAX]: New macros.
18788         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
18789         TYPE_MAXIMUM): New macros.
18790         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
18791         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
18792         if overflow occurs, as it's what __strtol does and it's more useful
18793         in practice.
18794         (__xstrtol): If __strtol reports some error other than ERANGE,
18795         reflect it to the caller as LONGINT_INVALID.  If it reports
18796         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
18797         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
18798         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
18799         value.
18800         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
18801         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
18802         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
18803         [defined UINTMAX_MAX]: New macros.
18804
18805 2003-10-14  Bruno Haible  <bruno@clisp.org>
18806
18807         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
18808
18809 2003-10-14  Bruno Haible  <bruno@clisp.org>
18810
18811         * m4/sig_atomic_t: New file, from GNU gettext.
18812         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
18813
18814 2003-10-14  Bruno Haible  <bruno@clisp.org>
18815
18816         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
18817         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
18818         Also use volatile where needed.
18819
18820 2003-10-12  Paul Eggert  <eggert@twinsun.com>
18821
18822         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
18823         Change maintainer from Bruno Haible to 'all'.
18824
18825 2003-10-12  Paul Eggert  <eggert@twinsun.com>
18826
18827         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
18828
18829 2003-10-12  Paul Eggert  <eggert@twinsun.com>
18830
18831         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
18832         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
18833         and define in terms of the other primitives.
18834         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
18835         (SIZE_MAX): Define if not already defined.
18836         (array_size_overflow): New function.
18837         (xalloc_die): Abort instead of exiting if 'error' returns.
18838         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
18839         (xmalloc, xrealloc): Use them.
18840         (xcalloc): Check for address arithmetic overflow.
18841         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
18842         a bit faster than strcpy.
18843
18844 2003-10-10  Simon Josefsson  <jas@extundo.com>
18845
18846         * modules/argp (Depends-on): Add restrict and strcase.
18847
18848 2003-10-10  Simon Josefsson  <jas@extundo.com>
18849
18850         * m4/argp.m4: Add AC_C_INLINE.
18851
18852 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18853
18854         Merge getpass from libc, plus a few fixes.
18855
18856         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
18857         Include <stdbool.h>.
18858         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
18859         __fsetlocking to empty.
18860         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
18861         do include <bits/libc-lock.h>.
18862         Do not include <fcntl.h>; not needed.
18863         [_LIBC]: Include <wchar.h>.
18864         (NOTCANCEL_MODE): New macro.
18865         (flockfile, funlockfile) [_LIBC]: New macros.
18866         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
18867         [!_LIBC]: New macros.
18868         (call_fclose): New function.
18869         (getpass): Use it.  Save tty stream separately; this simplifies the
18870         code and makes it more reliable if stdin happens to equal stdout.
18871         Invoke __fsetlocking on tty.
18872         Handle thread cancellation if needed.
18873         Namespace cleanup (use __tcgetattr, __getline).
18874         Use bool for Booleans.
18875         [USE_IN_LIBIO]: Handle wide streams.
18876         [!_LIBC]: Unconditionally do the fseek, since we don't know what
18877         stream might go where.
18878
18879         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
18880         doesn't have to include <stdio.h> before us.
18881         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
18882         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
18883         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
18884         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
18885         if not declared, so that we can use getpass.c code from libc without
18886         rewriting it.
18887         (flockfile, ftrylockfile, funlockfile): New macros.
18888
18889 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18890
18891         * modules/getpass: Depend on stdbool.
18892
18893 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18894
18895         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
18896
18897 2003-10-07  Karl Berry  <karl@gnu.org>
18898
18899         * config/config.{guess,sub}: update from config.
18900
18901 2003-10-06  Jim Meyering  <jim@meyering.net>
18902             Bruno Haible  <bruno@clisp.org>
18903
18904         This lets translators provide better translations for the
18905         "Written by ..." part of --version output.
18906         * lib/version-etc.h: Include stdarg.h.
18907         (version_etc_copyright): Declare as readonly.
18908         (version_etc): Make this function variadic with a NULL-terminated list
18909         of author name strings.
18910         (version_etc_va): New declaration.
18911         * lib/version-etc.c: Include stdarg.h, stdlib.h.
18912         (version_etc_copyright): Declare as readonly.
18913         (version_etc_va): New function. Provide a different translatable string
18914         for each possible number of authors < 10. Abbreviate when there are 10
18915         authors or more.
18916         (version_etc): Make this function variadic. Call version_etc_va.
18917         Suggestion from Gary V. Vaughan.
18918
18919         * lib/long-options.h (parse_long_options): Change prototype: the
18920         authors string is moved to the end and becomes variadic.
18921         * lib/long-options.c: Include stdarg.h.
18922         (parse_long_options): Make this function variadic, too.
18923         Call version_etc_va, not version_etc.
18924
18925 2003-10-06  Bruno Haible  <bruno@clisp.org>
18926
18927         * modules/version-etc-2: Remove file.
18928         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
18929
18930 2003-10-06  Bruno Haible  <bruno@clisp.org>
18931
18932         * modules/fatal-signal: New file.
18933         * MODULES.html.sh (func_all_modules): Add fatal-signal.
18934
18935 2003-10-06  Bruno Haible  <bruno@clisp.org>
18936
18937         * m4/fatal-signal.m4: New file.
18938         * m4/signalblocking.m4: New file, from GNU gettext.
18939
18940 2003-10-06  Bruno Haible  <bruno@clisp.org>
18941
18942         * lib/version-etc-2.h: Remove file.
18943         * lib/version-etc-2.c: Remove file.
18944
18945 2003-10-06  Bruno Haible  <bruno@clisp.org>
18946
18947         * lib/fatal-signal.h: New file, from GNU gettext.
18948         * lib/fatal-signal.c: New file, from GNU gettext.
18949
18950 2003-10-05  Paul Eggert  <eggert@twinsun.com>
18951
18952         * README: Rework advice for preventing empty .o files.
18953         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
18954         not <sys/types.h>.
18955
18956 2003-10-04  Karl Berry  <karl@gnu.org>
18957
18958         * lib/argp*: update from libc.
18959
18960 2003-10-04  Karl Berry  <karl@gnu.org>
18961
18962         * config/config.{guess,sub}: update from config.
18963
18964 2003-10-02  Bruno Haible  <bruno@clisp.org>
18965
18966         * modules/lchown (Include): Add lchown.h.
18967         * modules/time_r (Include): Use "..." syntax.
18968         * modules/xgetdomainname (Include): Add xgetdomainname.h.
18969
18970 2003-10-01  Simon Josefsson  <jas@extundo.com>
18971
18972         * MODULES.html.sh (func_all_modules): Move gethostname from section
18973         'based on' to section 'lacking' POSIX:2001.
18974
18975 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
18976
18977         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
18978         to output mode on the same stream.
18979
18980 2003-09-29  Paul Eggert  <eggert@twinsun.com>
18981
18982         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
18983         Fix arg typo in previous patch.
18984
18985 2003-09-28  Jim Meyering  <jim@meyering.net>
18986
18987         * lib/error.c: Correct cpp indentation.
18988
18989 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18990
18991         * modules/free: New file.
18992
18993 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18994
18995         * m4/free.m4: New file.
18996
18997 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18998
18999         * lib/minmax.h (MIN, MAX)
19000         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
19001         Omit the special code that used __typeof__, since we worry that
19002         it could be more trouble than it's worth.  See:
19003         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
19004         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
19005
19006         * lib/free.c: New file.
19007
19008 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
19009
19010         Trivial fixes to Makefile.am parts of module listings.
19011         * modules/strstr: Append strstr.h to lib_SOURCES.
19012         * modules/strcase: Likewise, for strcase.h.
19013
19014 2003-09-27  Karl Berry  <karl@gnu.org>
19015
19016         * config/mkinstalldirs: update from automake.
19017
19018 2003-09-26  Paul Eggert  <eggert@twinsun.com>
19019
19020         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
19021         (error_tail): Do not loop, reallocating temporary buffer, since
19022         the output cannot contain more wide characters than the input
19023         contains bytes, the size must be big enough already.  This avoids
19024         one potential size overflow calculation.  Check for size overflow
19025         when calculating temporary buffer size.  Free temporary buffer
19026         when done, if it was allocated with malloc; this plugs a memory
19027         leak.  Remove casts from void * to pointers, that are no longer
19028         needed now that we're assuming C89 or better.
19029
19030         Merge error changes from glibc.
19031
19032         * lib/error.c, error.h: Update copyright notice header to match glibc.
19033         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
19034         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
19035         Disable cancellation while printing error.
19036         * lib/error.h: Prepend __ to parameter names.
19037
19038 2003-09-26  Jim Meyering  <jim@meyering.net>
19039
19040         * lib/error.c (error_tail): Move some declarations
19041         into inner scope where the local variables are used.
19042
19043 2003-09-26  Bruno Haible  <bruno@clisp.org>
19044
19045         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
19046         stpncpy().
19047         Don't define stpncpy through config.h; it's now done through stpncpy.h.
19048
19049 2003-09-26  Bruno Haible  <bruno@clisp.org>
19050
19051         * lib/stpncpy.h (gnu_stpncpy): New declaration.
19052         (stpncpy): Define as alias for gnu_stpncpy.
19053         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
19054
19055 2003-09-25  Simon Josefsson  <jas@extundo.com>
19056
19057         * lib/xgetdomainname.h: New file.
19058         * lib/xgetdomainname.c: New file.
19059
19060 2003-09-25  Simon Josefsson  <jas@extundo.com>
19061             Bruno Haible  <bruno@clisp.org>
19062
19063         * modules/getdomainname: New file.
19064         * modules/xgetdomainname: New file.
19065         * MODULES.html.sh (func_all_modules): Add getdomainname,
19066         xgetdomainname.
19067
19068 2003-09-25  Simon Josefsson  <jas@extundo.com>
19069             Bruno Haible  <bruno@clisp.org>
19070
19071         * m4/getdomainname.m4: New file.
19072
19073 2003-09-25  Simon Josefsson  <jas@extundo.com>
19074             Bruno Haible  <bruno@clisp.org>
19075
19076         * lib/getdomainname.h: New file.
19077         * lib/getdomainname.c: New file.
19078
19079 2003-09-25  Karl Berry  <karl@gnu.org>
19080
19081         * lib/argp-fmtstream.c, argp-help.c: update from libc.
19082
19083 2003-09-25  Karl Berry  <karl@gnu.org>
19084
19085         * config/install-sh: update from automake.
19086
19087 2003-09-25  Bruno Haible  <bruno@clisp.org>
19088
19089         * modules/version-etc-2: New file, from modules/version-etc with
19090         modifications.
19091         * MODULES.html.sh (func_all_modules): Add version-etc-2.
19092
19093 2003-09-25  Bruno Haible  <bruno@clisp.org>
19094
19095         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
19096         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
19097
19098 2003-09-24  Simon Josefsson  <jas@extundo.com>
19099
19100         * modules/xgethostname: Add xgethostname.h.
19101
19102 2003-09-24  Paul Eggert  <eggert@twinsun.com>
19103
19104         * lib/linebuffer.c (freebuffer): Don't free the argument, just
19105         the buffer associated with the argument.  Bug reported by
19106         Simon Josefsson.
19107
19108 2003-09-24  Paul Eggert  <eggert@twinsun.com>
19109
19110         * README: Document assumptions that 'int' is at least 32 bits
19111         wide, that integer arithmetic is 2's complement without overflow,
19112         that there are no holes in integer values, that adding sizes of
19113         two nonoverlapping objects can't overflow, and that all-bits-zero
19114         yields scalar zero.  Fix spelling and capitalization typos.
19115
19116 2003-09-19  Karl Berry  <karl@gnu.org>
19117
19118         * lib/argp.h: update from libc.
19119
19120 2003-09-17  Paul Eggert  <eggert@twinsun.com>
19121
19122         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
19123         to avoid spurious warnings like "AC_RUN_IFELSE was called before
19124         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
19125
19126 2003-09-17  Paul Eggert  <eggert@twinsun.com>
19127
19128         * gnulib-tool: Use "test -h", not "test -L", for portability
19129         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
19130         (tags_regexp): Remove, since \| doesn't conform to POSIX.
19131         (sed_extract_prog): Issue s commands one-by-one, rather than
19132         using \| in one s command.
19133
19134 2003-09-16  Paul Eggert  <eggert@twinsun.com>
19135
19136         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
19137         input error, instead of returning NULL the next time we are called
19138         (and therefore losing track of errno).
19139
19140 2003-09-16  Bruno Haible  <bruno@clisp.org>
19141
19142         * gnulib-tool (func_create_testdir): Warn about duplicated
19143         dependencies.
19144
19145 2003-09-15  Paul Eggert  <eggert@twinsun.com>
19146
19147         * modules/argmatch, modules/fatal, modules/obstack,
19148         modules/xalloc, modules/xgethostname: Sort dependencies by
19149         importance, not alphabetically.
19150
19151 2003-09-15  Paul Eggert  <eggert@twinsun.com>
19152
19153         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
19154         fails, so that the caller gets the proper errno.
19155
19156         * lib/readutmp.c (read_utmp): Likewise.
19157         Check for fstat error.  Close stream and free storage
19158         when failing.
19159
19160 2003-09-14  Karl Berry  <karl@gnu.org>
19161
19162         * config/srclist.txt (strdup.c): disable for c89 changes.
19163
19164 2003-09-14  Jim Meyering  <jim@meyering.net>
19165
19166         * lib/getloadavg.c: Correct cpp indentation.
19167         * lib/strdup.c: Likewise.
19168         * lib/vasnprintf.c: Likewise.
19169
19170 2003-09-14  Bruno Haible  <bruno@clisp.org>
19171
19172         * modules/fwriteerror: New file.
19173         * MODULES.html.sh (func_all_modules): Add fwriteerror.
19174
19175 2003-09-14  Bruno Haible  <bruno@clisp.org>
19176
19177         * lib/fwriteerror.h: New file.
19178         * lib/fwriteerror.c: New file.
19179
19180 2003-09-12  Paul Eggert  <eggert@twinsun.com>
19181
19182         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
19183         modules/xgethostname, modules/xalloc: Depend on exit.
19184
19185 2003-09-12  Paul Eggert  <eggert@twinsun.com>
19186
19187         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
19188
19189         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
19190         and AC_MINIX, too, so that their extensions are available.
19191
19192         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
19193         This macro has been superseded by gl_BACKUPFILE.
19194
19195         More patches to assume C89 or better.
19196
19197         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
19198
19199         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
19200         unconditionally.
19201         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
19202         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
19203         Include <string.h>, <stdlib.h> unconditionally.
19204         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
19205         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
19206         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
19207         headers or for string.h.
19208         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
19209         or strtoul.
19210
19211         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
19212         headers.
19213         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
19214         * m4/userspec.m4 (gl_USERSPEC): Likewise.
19215         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
19216         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
19217         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
19218         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
19219         memcpy, memset.
19220         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
19221         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
19222         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
19223         strtol.
19224         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
19225         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
19226         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
19227         strtoul.
19228
19229 2003-09-12  Paul Eggert  <eggert@twinsun.com>
19230
19231         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
19232         * lib/obstack.c [!defined _LIBC]: Likewise.
19233         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
19234         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
19235         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
19236
19237         More changes to assume C89 or better.
19238
19239         * lib/error.c (error_tail): Assume vprintf.
19240
19241         * lib/argmatch.c (getenv): Remove decl.
19242         * lib/progreloc.c (get_full_program_name): Define via prototype.
19243         * lib/setenv.c (clearenv): Likewise.
19244         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
19245         needed.
19246         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
19247         (malloc, memcpy): Remove decls.
19248         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
19249         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
19250         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
19251         (memcpy): Remove macro.
19252         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
19253         (__P): Remove.  All uses removed.
19254         (PTR): Remove.  All uses changed to void *.
19255         (CHAR_BIT, NULL): Remove.
19256         (spaces, zeros, memset_space, memset_zero)
19257         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
19258         Remove.
19259         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
19260         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
19261         Define with prototype.
19262         Remove now-unnecessary prototype decl.
19263         (extra_args_spec): Assume ANSI C.  All uses changed.
19264         (extra_args_spec_iso): Remove.
19265         (my_strftime, emacs_strftimeu): Define via prototype.
19266         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
19267         unconditionally.
19268         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
19269         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
19270         (strtoul, strtol): Remove decls.
19271         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
19272         LONG_MAX): Remove.
19273         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
19274         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
19275         (LOCALE_PARAM_PROTO): New macro.
19276         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
19277         (INTERNAL (strtol), strtol): Define with a prototype.
19278         (PARAMS): Remove.  All uses removed.
19279         * lib/tempname.c: Include <string.h> unconditionally.
19280         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
19281         * lib/xgethostname.c (main): Define with a prototype.
19282         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
19283         Include <stdlib.h> unconditionally.
19284         (calloc, malloc, realloc, free): Remove decls.
19285         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
19286         Include <stdlib.h> unconditionally.  Sort include file names.
19287         (strtod): Remove.
19288         (xstrtod): Define with a prototype.
19289         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
19290         (strtol, strtoul): Remove decls.
19291
19292 2003-09-11  Paul Eggert  <eggert@twinsun.com>
19293
19294         More patches to assume C89 or better.
19295         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
19296         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
19297         string.h, memchr, STDC_HEADERS.
19298
19299 2003-09-11  Paul Eggert  <eggert@twinsun.com>
19300
19301         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
19302         Include <stdlib.h>, <string.h> unconditionally.
19303         Remove now-unnecessary cast to char *.
19304         * lib/strnlen.c: Include <string.h> unconditionally.
19305         * lib/yesno.c (yesno): Define with a prototype.
19306
19307 2003-09-11  Bruno Haible  <bruno@clisp.org>
19308
19309         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
19310
19311 2003-09-10  Jim Meyering  <jim@meyering.net>
19312
19313         * lib/error.c: Correct indentation of cpp directives.
19314
19315 2003-09-10  Bruno Haible  <bruno@clisp.org>
19316
19317         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
19318         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
19319         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
19320         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
19321         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
19322         <stdlib.h> and <string.h> checks.
19323         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
19324         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
19325
19326 2003-09-10  Bruno Haible  <bruno@clisp.org>
19327
19328         * lib/strcspn.c: Include <string.h> unconditionally.
19329         * lib/strpbrk.c: Include <string.h> unconditionally.
19330         * lib/strstr.c: Include <string.h> unconditionally.
19331         * lib/unicodeio.c: Include <string.h> unconditionally.
19332         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
19333         * lib/unsetenv.c: Likewise.
19334         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
19335         * lib/yesno.c: Include <stdlib.h> unconditionally.
19336         (rpmatch): Add prototype.
19337
19338 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19339
19340         More patches to assume C89 or better.
19341         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
19342         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
19343         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
19344         or for string.h.
19345         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
19346         stdlib.h.
19347         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
19348         C headers.
19349         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
19350         string.h.
19351         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
19352         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
19353         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
19354         or for string.h.
19355         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
19356         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
19357         C headers.
19358         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
19359         memcpy.
19360         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
19361         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
19362         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
19363         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
19364         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
19365         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
19366         string.h, free.
19367         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
19368         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
19369         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
19370         C headers, or for string.h.
19371         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
19372         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
19373         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
19374         headers, memory.h, stdlib.h, string.h, strings.h.
19375         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
19376         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
19377         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
19378         strchr.
19379         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
19380         headers, memory.h, string.h.
19381         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
19382         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
19383         free.
19384         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
19385         headers.
19386         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
19387         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
19388         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
19389         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
19390         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
19391
19392 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19393
19394         More K&R removal.
19395
19396         * lib/acosl.c (main): Use a prototype.
19397         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
19398         tanl.c: Likewise.
19399
19400         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
19401
19402         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
19403         (getopt, etopt_long, getopt_long_only, _getopt_internal)
19404         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
19405         with a prototype.
19406         * lib/getopt.c (const): Remove macro.
19407         Include <string.h> unconditionally.
19408         (my_index): Remove; all uses changed to strchr.
19409         (strlen): Remove decl.
19410         (exchange): Remove forward decl; no longer needed.
19411         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
19412         Define with prototype.
19413         * lib/getopt1.c (const): Remove macro.
19414         (getopt_long, getopt_long_only, main): Define with prototype.
19415
19416         * lib/getugroups.c: Include <string.h> unconditionally.
19417
19418         * lib/getusershell.c: Include <stdlib.h> unconditionally.
19419         (getusershell, setusershell, endusershell, readname, main):
19420         Define with prototypes.
19421
19422         * lib/group-member.c: Include group-member.h first.
19423         Include <stdlib.h> unconditionally.
19424
19425         * lib/hard-locale.c: Include hard-locale.h first.
19426         Include <stdlib.h>, <string.h> unconditionally.
19427
19428         * lib/hash.c (free, malloc): Remove decls.
19429         Include <stdlib.h> unconditionally.
19430
19431         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
19432         (getenv): Do not declare.
19433
19434         * lib/idcache.c: Include <string.h> unconditionally.
19435
19436         * lib/long-options.c: Include long-options.h first, to test interface.
19437         Include <stdlib.h> unconditionally.
19438
19439         * lib/makepath.c: Include makepath.h first, to test interface.
19440         Include <stdlib.h> and <string.h> unconditionally.
19441
19442         * lib/linebuffer.c: Include <stdlib.h>.
19443         (free): Remove decl.
19444
19445         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
19446         stddef.h. rpl_malloc returns void *, not char *.
19447         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
19448         prototype.
19449
19450         * lib/md5.h: Include <limits.h> unconditionally.
19451         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
19452         (__P): Remove; all uses removed.
19453         * lib/md5.c: Include "md5.h" first.
19454         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
19455         md5_buffer, md5_process_bytes, md5_process_block):
19456         Define with prototypes.
19457         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
19458         * lib/sha.c: Include "sha.h" first.
19459         Include <stdlib.h>, <string.h> unconditionally.
19460
19461         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
19462         * lib/memcmp.c (__ptr_t): Likewise.
19463         * lib/memrchr.c (__ptr_t): Likewise.
19464         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
19465         Include <string.h> unconditionally.
19466         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
19467         * lib/memchr.c: Include <stdlib.h> unconditionally.
19468         * lib/memchr.c (LONG_MAX): Remove.
19469         * lib/memrchr.c (LONG_MAX): Likewise.
19470         * lib/memchr.c (__memchr): Define via a prototype.
19471         * lib/memrchr.c (__memrchr): Likewise.
19472         * lib/memcmp.c (__P): Remove, and remove all uses.
19473         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
19474         Remove forward decls; no longer needed.
19475         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
19476         Use types required by C89 in prototype.
19477
19478         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
19479         * lib/savedir.c: Likewise.
19480         * lib/mkdir.c (free): Remove decl.
19481         * lib/rmdir.c (rmdir): Define with a prototype.
19482         * lib/savedir.c: Include savedir.h first, to test interface.
19483
19484         * lib/mktime.c (STDC_HEADERS): Remove.
19485         Include <stdlib.h>, <string.h> unconditionally.
19486
19487         * lib/modechange.c: Include <stdlib.h> unconditionally.
19488         (malloc): Remove decl.
19489
19490         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
19491         (free): Remove decl.
19492
19493         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
19494         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
19495         (This type really should be intptr_t, but that's a C99ism.)
19496         (_obstack_memcpy): Remove: all uses changed to memcpy.
19497         Include <string.h> unconditionally.
19498         (struct obstack): Assume __STDC__ for types of members
19499         chunkfun, freefun, extra_arg.
19500         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
19501         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
19502         obstack_begin, obstack_specify_allocation,
19503         obstack_specify_allocation_with_arg, obstack_chunkfun,
19504         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
19505         Remove unprototyped decls and the macros that use them.
19506         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
19507         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
19508         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
19509         (defined __STDC__ && __STDC__)]:
19510         Remove nonprototyped code.
19511         Include <stdlib.h> unconditionally.
19512         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
19513         _obstack_allocated_p, _obstack_free, obstack_free,
19514         _obstack_memory_used, print_and_abort):
19515         Define using prototypes.
19516         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
19517         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
19518         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
19519         obstack_next_free, obstack_object_size, obstack_room) [0]:
19520         Remove unused, unprototyped code.
19521
19522         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
19523
19524         * lib/physmem.c (physmem_total, physmem_available, main): Define
19525         with prototypes.
19526
19527         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
19528         (main): Define with a prototype.
19529
19530         * lib/posixver.c (getenv): Remove decl.
19531
19532         * lib/putenv.c (malloc): Returns void *, not char *.
19533         Include <string.h> unconditionally.
19534         (strchr, memcpy, NULL): Do not define.
19535
19536         * lib/readtokens.c: Include readtokens.h first, to test interface.
19537         Include <stdlib.h>, <string.h> unconditionally.
19538         (init_tokenbuffer): Define with a prototype.
19539
19540         * lib/regex.c (PARAMS): Remove.  All uses removed.
19541         All uses of _RE_ARGS removed, too.
19542         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
19543         unconditionally.
19544         (bzero): Assume memset exists.
19545         (memcmp, memcpy, NULL): Remove.
19546         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
19547         char, or assignments to local vars of type signed char.
19548         (init_syntax_once, PREFIX(extract_number_and_incr),
19549         PREFIX(print_partial_compiled_pattern),
19550         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
19551         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
19552         PREFIX(regex_grow_registers), PREFIX(regex_compile),
19553         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
19554         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
19555         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
19556         wcs_compile_range, byte_compile_range, truncate_wchar,
19557         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
19558         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
19559         count_mbs_length, wcs_re_match_2_internal,
19560         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
19561         PREFIX(alt_match_null_string_p),
19562         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
19563         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
19564         regfree, PREFIX(extract_number)): Define with prototype.  Remove
19565         now-unnecessary declaration, if any.
19566         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
19567         regcomp, regexec):
19568         Remove now-unnecessary casts among pointer types.
19569         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
19570
19571         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
19572         (free): Remove decl.
19573
19574         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
19575
19576         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
19577         (free): Remove decl.
19578
19579         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
19580         * lib/xgetcwd.c: Likewise.
19581
19582         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
19583         (free): Remove decl.
19584
19585         * lib/strchrnul.c (strchrnul): Define with a prototype.
19586         Fix bug: c_in was not converted to char before searching.
19587
19588         The following changes are not K&R related:
19589
19590         * lib/group-member.h: Include <sys/types.h>, so that this file is
19591         self-contained.
19592         * lib/makepath.h: Likewise.
19593
19594         * lib/getusershell.c (readname, default_index, line_size, readname):
19595         Use size_t, not int, for sizes.
19596         (readname): If the size overflows, report an error instead of
19597         looping forever.
19598
19599 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19600
19601         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
19602         libc.
19603
19604 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19605
19606         * README: New section: portability guidelines.
19607
19608 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
19609
19610         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
19611         C89 spec.
19612
19613 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
19614
19615         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
19616
19617 2003-09-08  Paul Eggert  <eggert@twinsun.com>
19618
19619         Assume C89 or better; remove K&R cruft.
19620         A few of these changes were first proposed by Derek Robert Price
19621         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
19622
19623         * lib/addext.c: Include <string.h> unconditionally.
19624         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
19625         Don't declare getenv or malloc.
19626
19627         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
19628         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
19629         (NULL): Remove.
19630         (find_stack_direction, alloca): Use prototypes.
19631
19632         * lib/atexit.c (atexit): Define using a prototype.
19633
19634         * lib/basename.c, dirname.c, stripslash.c:
19635         Include <string.h> unconditionally.
19636
19637         * lib/bcopy.c: Include <stddef.h>.
19638         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
19639
19640         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
19641
19642         * lib/error.h (error, error_at_line, error_print_progname)
19643         [! (defined (__STDC__) && __STDC__)]: Remove decls.
19644         * lib/error.c: Include error.h first, to check interface.
19645         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
19646         (VA_START): Remove; all uses changeed to va_start.
19647         (exit, strerror): Remove decls.
19648         (error_print_progname): Prototype uncondionally.
19649         Don't include <errno.h>; no longer needed.
19650         (private_strerror): Remove.
19651         (error_tail): Always define.
19652         (error, error_at_line): Assume C89 or better; always use prototypes.
19653         * lib/fatal.c: Include "fatal.h" first, to test interface.
19654         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
19655         (VA_START): Remove; all uses changed to va_start.
19656         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
19657         this case.
19658         (exit): Remove decl.
19659         (fatal): Prototype unconditionally.  Assume va_start works.
19660         Abort at end, to pacify gcc.
19661
19662         * lib/euidaccess.c (main): Define with a prototype.
19663
19664         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
19665
19666         * lib/exitfail.c: Include <stdlib.h> unconditionally.
19667
19668         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
19669         prototypes.
19670         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
19671         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
19672         (getenv): Remove decl.
19673         (fnmatch): Define using a prototype.
19674         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
19675         (FCT): Define using a prototype.
19676
19677         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
19678
19679         * lib/gethostname.c: Include <stddef.h>.
19680         (gethostname): Define with prototype.  Length is size_t, not int.
19681
19682 2003-09-08  Paul Eggert  <eggert@twinsun.com>
19683
19684         Assume C89 or better; remove K&R cruft.
19685         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
19686         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
19687         string.h, getenv, malloc.
19688         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
19689         headers.
19690         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
19691         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
19692         do not check for strerror.
19693         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
19694         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
19695         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
19696         do not check for doprnt or vprintf.
19697         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
19698         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
19699
19700 2003-09-08  Paul Eggert  <eggert@twinsun.com>
19701
19702         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
19703         getversion.c should have been removed then, but was accidentally
19704         preserved.
19705
19706         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
19707         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
19708
19709 2003-09-08  Karl Berry  <karl@gnu.org>
19710
19711         * config/config.sub, config.guess, srclistvars.sh: update from savannah
19712                 config, forget about prep.
19713
19714         * config/depcomp, missing: update from automake.
19715
19716 2003-09-07  Paul Eggert  <eggert@twinsun.com>
19717
19718         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
19719         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
19720
19721 2003-09-07  Paul Eggert  <eggert@twinsun.com>
19722
19723         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
19724         copy_tm_result.  Bug reported by Simon Josefsson in
19725         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
19726
19727 2003-09-06  Paul Eggert  <eggert@twinsun.com>
19728
19729         * m4/time_r.m4: New file.
19730         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
19731         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
19732         is. Check for timegm declaration.
19733         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
19734         Do not check for gmtime_r.
19735         Replace mktime if __mktime_internal does not exist and if mktime
19736         hasn't been replaced already.
19737
19738 2003-09-06  Paul Eggert  <eggert@twinsun.com>
19739
19740         * lib/time_r.c, lib/time_r.h: New files.
19741
19742         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
19743         __localtime_r.
19744         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
19745         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
19746
19747         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
19748         __gmtime_r.
19749         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
19750         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
19751         Include <time_r.h>.
19752
19753         * lib/timegm.c: Switch to glibc implementation, with the following
19754         changes:
19755         [defined HAVE_CONFIG_H]: Include <config.h>.
19756         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
19757         (__mktime_internal) [!defined _LIBC]: New decl.
19758         (__gmtime_r) [!defined _LIBC]: New macro and function.
19759         (timegm): Use a prototype, since gnulib assumes C89.
19760         Do not bother declaring tmp to be const, as it's not really usefu.
19761         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
19762         (timegm): Declare only if HAVE_DECL_TIMEGM.
19763
19764 2003-09-06  Paul Eggert  <eggert@twinsun.com>
19765
19766         * MODULES.html.sh (func_all_modules): Add time_r.
19767         * modules/time_r: New file.
19768         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
19769         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
19770
19771 2003-09-03  Paul Eggert  <eggert@twinsun.com>
19772
19773         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
19774         Bug reported by Lute Kamstra in
19775         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
19776
19777         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
19778         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
19779         course with correspondingly smaller numbers for tomorrow and
19780         yesterday.  From Tadayoshi Funaba.  Originally installed into
19781         sh-utils on 1999-08-07, but the patch got lost (I guess during the
19782         coreutils merge?).
19783
19784 2003-08-31  Simon Josefsson  <jas@extundo.com>
19785
19786         * modules/timegm: New file.
19787         * MODULES.html.sh (func_all_modules): Add timegm.
19788
19789 2003-08-31  Simon Josefsson  <jas@extundo.com>
19790
19791         * m4/timegm.m4: New file.
19792
19793 2003-08-31  Simon Josefsson  <jas@extundo.com>
19794
19795         * lib/timegm.h: New file.
19796         * lib/timegm.c: New file.  Based on
19797         wget-1.8.2/src/http.c:mktime_from_utc.
19798
19799 2003-08-31  Karl Berry  <karl@gnu.org>
19800
19801         * lib/argp.h: update from libc.
19802
19803 2003-08-28  Bruno Haible  <bruno@clisp.org>
19804
19805         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
19806         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
19807         followed by '#define fnmatch fnmatch_posix' gives an error.
19808
19809 2003-08-28  Bruno Haible  <bruno@clisp.org>
19810
19811         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
19812         warning on QNX, which defines O_BINARY to 000000.
19813
19814 2003-08-27  Jim Meyering  <jim@meyering.net>
19815
19816         * m4/mkstemp.m4: Require that the system mkstemp be able to create
19817         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
19818         would fail after 32.  Reported by Danny Levinson.  Details here:
19819         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
19820
19821 2003-08-24  Bruno Haible  <bruno@clisp.org>
19822
19823         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
19824         MSVC7 <stdio.h> is included later.
19825
19826 2003-08-22  Simon Josefsson  <jas@extundo.com>
19827
19828         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
19829
19830 2003-08-20  Karl Berry  <karl@gnu.org>
19831
19832         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
19833
19834 2003-08-20  Bruno Haible  <bruno@clisp.org>
19835
19836         * modules/progname: New file.
19837         * MODULES.html.sh (func_all_modules): Add progname.
19838
19839 2003-08-20  Bruno Haible  <bruno@clisp.org>
19840
19841         * lib/progname.h: New file, from GNU gettext.
19842         * lib/progname.c: New file, from GNU gettext.
19843         * lib/progreloc.c: New file, from GNU gettext.
19844
19845 2003-08-19  Jim Meyering  <jim@meyering.net>
19846
19847         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
19848         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
19849
19850 2003-08-19  Bruno Haible  <bruno@clisp.org>
19851
19852         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
19853         more.
19854
19855 2003-08-19  Bruno Haible  <bruno@clisp.org>
19856
19857         * lib/xstrdup.c: Assume <string.h> exists.
19858
19859 2003-08-18  Paul Eggert  <eggert@twinsun.com>
19860
19861         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
19862         in makefile rules.
19863
19864 2003-08-18  Jim Meyering  <jim@meyering.net>
19865
19866         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
19867         * m4/lib-ld.m4: Likewise.
19868
19869 2003-08-18  Jim Meyering  <jim@meyering.net>
19870
19871         * lib/setenv.h: Indent nested cpp directive.
19872         * lib/vasnprintf.c: Remove trailing blanks.
19873
19874 2003-08-17  Simon Josefsson  <jas@extundo.com>
19875
19876         * modules/xstrndup: New file.
19877         * MODULES.html.sh (func_all_modules): Add xstrndup.
19878
19879 2003-08-17  Simon Josefsson  <jas@extundo.com>
19880
19881         * modules/argp: Fix autoconf macro name. Add more dependencies.
19882
19883 2003-08-17  Simon Josefsson  <jas@extundo.com>
19884
19885         * m4/xstrndup.m4: New file.
19886
19887 2003-08-17  Simon Josefsson  <jas@extundo.com>
19888
19889         * m4/argp.m4: New file.
19890
19891 2003-08-17  Simon Josefsson  <jas@extundo.com>
19892             Bruno Haible  <bruno@clisp.org>
19893
19894         * lib/xstrndup.h: New file.
19895         * lib/xstrndup.c: New file.
19896
19897 2003-08-17  Bruno Haible  <bruno@clisp.org>
19898
19899         * modules/strndup (Files, Include): Add lib/strndup.h.
19900
19901 2003-08-17  Bruno Haible  <bruno@clisp.org>
19902
19903         * modules/euidaccess (Files): Add lib/euidaccess.h.
19904
19905 2003-08-17  Bruno Haible  <bruno@clisp.org>
19906
19907         * lib/strndup.h: New file.
19908
19909 2003-08-17  Bruno Haible  <bruno@clisp.org>
19910
19911         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
19912         like AC_GNU_SOURCE.
19913         * modules/extensions (configure.ac): Comment out the invocation of
19914         gl_USE_SYSTEM_EXTENSIONS.
19915
19916 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19917
19918         Merges from coreutils, etc.
19919         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
19920         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
19921         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
19922         fixing a typo.
19923         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
19924         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
19925
19926 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19927
19928         Document merge from coreutils.
19929         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
19930         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
19931         * modules/utime: Add m4/utimes-null.m4.
19932
19933 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19934
19935         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
19936         space, undoing this 2003-08-12 change:
19937         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
19938
19939 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19940
19941         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
19942         strtoul.c from libc, undoing this 2003-08-12 change:
19943         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
19944
19945 2003-08-16  Jim Meyering  <jim@meyering.net>
19946
19947         Merges from coreutils.
19948         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
19949         prefix.  Adjust cache variables similarly.  Create 500 rather than
19950         just 300 files, to exercise bug on Darwin6.5, too.
19951         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
19952         $missing_dir.
19953         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
19954         AM_SYS_POSIX_TERMIOS.
19955         Reported by mkc@mathdogs.com.
19956         Also change use of $am_cv_sys_posix_termios
19957         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
19958         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
19959         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
19960         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
19961         in /proc/mounts until it finds one with matching device number.  This
19962         is unnecessary when the FILE argument *is* a mount point.  No stat call
19963         is necessary in that case.  So, disable the statvfs-testing code on
19964         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
19965         as RedHat bug# 84846.
19966         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
19967         to 1MB, so as not to render systems with no stack size limit (e.g.,
19968         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
19969         Include <unistd.h>.  On some systems,
19970         it is required for the definition of _SC_PAGESIZE.
19971
19972 2003-08-16  Jim Meyering  <jim@meyering.net>
19973
19974         Merge from coreutils.
19975         * lib/xstrtoimax.c: #else #if -> #elif.
19976         * lib/xstrtoumax.c: Likewise.
19977
19978 2003-08-16  Jim Meyering  <jim@meyering.net>
19979
19980         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
19981         * m4/utimes.m4: Removed.
19982         * m4/utimes-null.m4: Renamed from utimes.m4.
19983
19984         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
19985         to 1MB, so as not to render systems with no stack size limit (e.g.,
19986         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
19987         Include <unistd.h>.  On some systems,
19988         it is required for the definition of _SC_PAGESIZE.
19989
19990 2003-08-16  Jim Meyering  <jim@meyering.net>
19991         and Paul Eggert  <eggert@cs.ucla.edu>
19992
19993         Merges from coreutils, etc.
19994
19995         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
19996         using the latest version from cvs.  This avoids problems with #line
19997         directives using a vendor (Sun) compiler.
19998         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
19999         Don't set GETGROUPS_LIB here; now it's
20000         done via getgroups.m4's wrapper function.
20001         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
20002         rather than just in sh-util/configure.in, so that the
20003         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
20004         same.
20005         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
20006         AC_FUNC_GETLOADAVG where to find getloadavg.c.
20007         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
20008         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
20009         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
20010         Remove code that is now done by the newly-required macros.
20011         Append $(EXEEXT) to DF_PROG.
20012         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
20013         Do not invoke or require the following here,
20014         since prereq.m4 or some gnulib .m4 now does this for us:
20015         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
20016         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
20017         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
20018         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
20019         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
20020         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
20021         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
20022         AC_FUNC_OBSTACK.
20023         Do not replace the following functions, as this is now the job
20024         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
20025         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
20026         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
20027         atexit getpass, strdup, getpagesize.
20028         Replace 'raise'.
20029         Do not check for the following functions, as this is now the job
20030         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
20031         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
20032         setregid.
20033         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
20034         Check for sys/sysctl.h.
20035         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
20036         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
20037         of checking for ssize_t ourselves.
20038
20039         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
20040         Require every macro that gnulib/modules/* suggests for us.
20041         (jm_PREREQ_ADDEXT): New macro.
20042         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
20043         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
20044
20045         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
20046         (gl_PHYSMEM): Use it.
20047         Also check for `table' function.
20048         Check for new headers and functions.
20049         Add check for sys/sysmp.h.
20050         With suggestions from Kaveh Ghazi.
20051         Ignore headers that are present but cannot be compiled.  This
20052         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
20053         C 5.4.
20054
20055 2003-08-15  Paul Eggert  <eggert@twinsun.com>
20056
20057         Document merge from coreutils.
20058         * modules/userspec: Depend on posixver.
20059         * modules/strftime: Depend on tzset.
20060
20061 2003-08-15  Paul Eggert  <eggert@twinsun.com>
20062
20063         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
20064         rather than tab, after '#' in shell-script copyright notices.
20065         Suggested by Bruno Haible.
20066
20067 2003-08-15  Paul Eggert  <eggert@twinsun.com>
20068
20069         * config/srclist-update: Use three spaces, rather than tab, after '#'
20070         in shell-script copyright notices.  Suggested by Bruno Haible.
20071         Remove unnecessary parenthesization in regular expression.
20072
20073 2003-08-15  Jim Meyering  <jim@meyering.net>
20074
20075         Merge from coreutils.
20076         * lib/xgethostname.c: Include <stdlib.h>.
20077         (xghostname): Don't exit for anything other than memory-related
20078         failure; just return NULL.
20079         * lib/userspec.c: Include "posixver.h".
20080         (parse_user_spec): Accept `.' as a separator only
20081         in pre-POSIX-200112 mode.
20082         * lib/strtoimax.c: Use #elif rather than #else #if.
20083         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
20084         Remove function, now that we can rely on a working tzset function.
20085         [!_LIBC]: Ensure that the required autoconf test has been run.
20086         [!defined _NL_CURRENT && HAVE_STRFTIME]:
20087         Use underlying_strftime for %r.
20088         * lib/sha.c: Merge in some clean-up and optimization changes from
20089         glibc.
20090         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
20091         Ensure that it is a multiple of 64.
20092         Rearrange loop exit tests so as to avoid performing an
20093         additional fread after encountering an error or EOF.
20094         * lib/realloc.c: Update copyright date.
20095
20096 2003-08-15  Jim Meyering  <jim@meyering.net>
20097         and Paul Eggert  <eggert@twinsun.com>
20098
20099         Merge from coreutils.
20100         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
20101         member but strut utmpx does not.  Needed for AIX 4.3.3.
20102         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
20103
20104 2003-08-15  Jim Meyering  <jim@meyering.net>
20105         and Paul Eggert  <eggert@cs.ucla.edu>
20106
20107         Merges from coreutils, etc.
20108         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
20109         Require gl_FUNC_TZSET_CLOBBER.
20110         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
20111         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
20112         members.
20113
20114 2003-08-14  Paul Eggert  <eggert@twinsun.com>
20115
20116         Help the merge from coreutils.
20117         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
20118         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
20119         * m4/tzset.m4: Use it too.
20120
20121 2003-08-14  Paul Eggert  <eggert@twinsun.com>
20122
20123         * modules/tzset: New file.
20124
20125 2003-08-14  Jim Meyering  <jim@meyering.net>
20126
20127         Merges from coreutils.
20128         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
20129         variable names, rather than @FNMATCH_H@.
20130         * modules/alloca: Likewise for $(ALLOCA_H).
20131
20132         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
20133         the three copies of the literal target, `fnmatch.h'.
20134         * modules/alloca (alloca.h): Likewise.
20135
20136 2003-08-14  Jim Meyering  <jim@meyering.net>
20137
20138         Merge from coreutils.
20139         * m4/tzset.m4: New file.
20140         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
20141         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
20142         otherwise, AIX 5.1 systems would end up using the latter.
20143         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
20144         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
20145         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
20146         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
20147
20148 2003-08-14  Jim Meyering  <jim@meyering.net>
20149
20150         Merge from coreutils.
20151         * lib/obstack.h: Whitespace changes.
20152         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
20153         and xcalloc return values.
20154         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
20155         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
20156         hang on OSF/1 5.1 for DIR on both local and remote file systems.
20157         Reported by (and fix confirmed by) Nelson H. F. Beebe.
20158         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
20159         error from mntctl.
20160         Use mntctl's return value to drive the entry-processing loop, since
20161         we can't rely on the value of the vmt_length member in the last
20162         entry.  On some systems doing so could result in exhausting
20163         virtual memory.  Based in part on a patch from Mike Jetzer.
20164
20165 2003-08-14  Jim Meyering  <jim@meyering.net>
20166         and Paul Eggert  <eggert@twinsun.com>
20167
20168         Merges from coreutils, plus other fixes.
20169         * lib/physmem.c: Merge in portability changes from gcc/libiberty
20170         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
20171         for credits and details.  Thanks to Kaveh Ghazi for helping
20172         to keep these files in sync.
20173         (ARRAY_SIZE): Define it.
20174         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
20175         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
20176         (memcasecmp): Don't assume size_t fits in unsigned int.
20177         Remove casts and duplicate code.
20178         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
20179         (memcpy): Remove definition.
20180         Merge in some clean-up and optimization changes from glibc.
20181         [BLOCKSIZE]: Move definition to top of file.
20182         Ensure that it is a multiple of 64.
20183         Rearrange loop exit tests so as to avoid performing an
20184         additional fread after encountering an error or EOF.
20185         * lib/md5.h (md5_uintptr): Define.
20186         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
20187         return to the initial working directory.  Preserve errno
20188         for caller.
20189         * lib/idcache.c: Include "xalloc.h".
20190         (xmalloc, xrealloc): Remove decls.
20191         (getuser): Remove casts no longer required in C89.
20192         * lib/human.c: Include stdio.h, for sprintf.
20193         * lib/group-member.c: Include "xalloc.h".
20194         (xmalloc, xrealloc): Remove decls.
20195         (get_group_info): Remove casts no longer required in C89.
20196         * lib/getusershell.c (readname): Remove casts no longer required in
20197         C89.
20198         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
20199         * lib/getline.c: Whitespace fix, from coreutils.
20200
20201 2003-08-13  Paul Eggert  <eggert@twinsun.com>
20202
20203         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
20204         Check for isascii.
20205
20206         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
20207         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
20208         Undo previous (whitespace-only) change.
20209
20210 2003-08-13  Paul Eggert  <eggert@twinsun.com>
20211
20212         * lib/exclude.c: Include <ctype.h>
20213         (IN_CTYPE_DOMAIN): New macro.
20214         (is_space): New fn.
20215         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
20216         and empty lines.
20217
20218         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
20219         Undo previous (whitespace-only) change.
20220
20221 2003-08-13  Paul Eggert  <eggert@twinsun.com>
20222
20223         * config/srclist-update: Change update back to the old behavior,
20224         leaving whitespace alone.  Use one 'sed' command rather than a
20225         pipeline.
20226         (fixlicense): Now a variable, not a function.
20227         (remove_trailing_blanks): Remove.
20228         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
20229         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
20230         Undo previous (whitespace-only) change.
20231
20232 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20233
20234         Merge from coreutils.
20235         * modules/euidaccess: Add lib_SOURCES, include for new
20236         file euidaccess.h
20237
20238 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20239
20240         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
20241         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
20242         Normalize leading white space and remove trailing white space.
20243
20244         Merge from coreutils
20245         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
20246
20247         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
20248         0.12.1.  These files are now being upgraded automatically by
20249         ../config/srclist-update.
20250
20251 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20252
20253         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
20254         Normalize leading white space and remove trailing white space.
20255         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
20256         notice, as per ../config/srclist-update.
20257
20258         Merge from coreutils.
20259         * lib/euidaccess.h: New file.
20260         * lib/euidaccess.c: Include it.
20261         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
20262         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
20263         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
20264
20265 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20266
20267         * config/srclist-update: Add copyright notice.
20268         (remove_id_lines, remove_trailing_blanks): New constants.
20269         (fixfile): Use them to normalize spacing a bit in copied files.
20270         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
20271         Normalize leading white space and remove trailing white space.
20272
20273         * config/texinfo.tex: Sync with texinfo.
20274
20275         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
20276         strtoul.c from libc, to merge coreutils whitespace changes.
20277
20278         * config/srclist.txt: Get the following m4 files from gettext:
20279         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
20280         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
20281         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
20282         wint_t.m4.
20283
20284 2003-08-12  Karl Berry  <karl@gnu.org>
20285
20286         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
20287         been made.
20288
20289 2003-08-11  Paul Eggert  <eggert@twinsun.com>
20290
20291         * modules/gnu-source, m4/gnu-source.m4:
20292         Remove; we're assuming Autoconf 2.54 or later now.
20293         Suggested by Bruno Haible.
20294         * MODULES.html.sh (func_all_modules): Remove gnu-source.
20295
20296 2003-08-11  Bruno Haible  <bruno@clisp.org>
20297
20298         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
20299
20300 2003-08-11  Bruno Haible  <bruno@clisp.org>
20301
20302         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
20303         (vasnprintf): Use it instead of wcslen.
20304
20305 2003-08-11  Bruno Haible  <bruno@clisp.org>
20306
20307         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
20308         value to ensure that _Bool promotes to int. Use #define for _Bool when
20309         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
20310
20311 2003-08-10  Karl Berry  <karl@gnu.org>
20312
20313         * lib/regex.h: update from libc (whitespace fix).
20314
20315 2003-08-09  Paul Eggert  <eggert@twinsun.com>
20316
20317         Merge some files from coreutils.  These changes were
20318         originally made by Jim Meyering.
20319         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
20320         many older Unixes require this.
20321         * lib/alloca.c (alloca): Remove cast to argument of free;
20322         no longer needed in C89.
20323         * lib/alloca_.h, regex.h: Fix white space to match
20324         what GNU indent does.
20325
20326 2003-08-09  Paul Eggert  <eggert@twinsun.com>
20327
20328         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
20329         apparently Emacs's Unicode mode got confused before my 2003-08-05
20330         checkin.
20331
20332 2003-08-08  Paul Eggert  <eggert@twinsun.com>
20333
20334         * m4/extensions.m4: New file.
20335         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
20336         Require gl_USE_SYSTEM_EXTENSIONS.
20337         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
20338         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
20339
20340 2003-08-08  Paul Eggert  <eggert@twinsun.com>
20341
20342         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
20343         * modules/extensions, modules/gnu-source: New files.
20344         * modules/timespec, modules/unlocked-io: Depend on extensions.
20345
20346 2003-08-07  Paul Eggert  <eggert@twinsun.com>
20347
20348         * modules/restrict: New file.
20349         * MODULES.html.sh (func_all_modules): Add restrict.
20350         * modules/regex: Depend on restrict.
20351
20352 2003-08-07  Paul Eggert  <eggert@twinsun.com>
20353
20354         * m4/restrict.m4: New file.
20355         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
20356
20357 2003-08-07  Bruno Haible  <bruno@clisp.org>
20358
20359         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
20360         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
20361
20362 2003-08-07  Bruno Haible  <bruno@clisp.org>
20363
20364         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
20365         makes the module 'getndelim2' compatible with the module 'getline'.
20366
20367 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20368
20369         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
20370         byte with "\201" to avoid glitches when editing that source file
20371         with multi-gnome-terminal.
20372
20373 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20374
20375         * lib/bumpalloc.h: Remove.
20376
20377 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20378
20379         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
20380         * modules/bumpalloc: Remove.
20381
20382 2003-08-04  Paul Eggert  <eggert@twinsun.com>
20383
20384         * lib/getloadavg.c: Change copyright notice and spacing to conform to
20385         GNU coding style.
20386
20387         Merge from coreutils.
20388         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
20389         1. From glibc.
20390         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
20391         from Karl Berry, implemented by Jim Meyering.
20392         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
20393         from Dmitry V. Levin.
20394         Remove anachronistic cast of xrealloc.
20395         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
20396         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
20397         type. Otherwise, it wouldn't compile with at least /bin/cc on
20398         ymp-cray-unicos9.0.2.X.
20399         Combine two mostly-identical uses of alloca into one.
20400         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
20401
20402 2003-08-04  Dave Love  <d.love@dl.ac.uk>
20403
20404         [From Emacs.]
20405
20406         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
20407         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
20408         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
20409         obsolete NLIST_NAME_UNION.
20410         [__GNU__]: Undef BSD and FSCALE.
20411         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
20412
20413 2003-08-03  Paul Eggert  <eggert@twinsun.com>
20414
20415         * lib/stdbool_.h (_Bool): Make it signed char, instead of
20416         an enum type, so that it's guaranteed to promote to int.  See:
20417         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
20418
20419 2003-08-03  Karl Berry  <karl@gnu.org>
20420
20421         * config/depcomp: update from automake.
20422
20423 2003-07-31  Paul Eggert  <eggert@twinsun.com>
20424
20425         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
20426         (strerror): Don't assume that a printable int fits in 14 bytes.
20427
20428 2003-07-31  Bruno Haible  <bruno@clisp.org>
20429
20430         * modules/getpass-gnu: New file.
20431         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
20432
20433 2003-07-31  Bruno Haible  <bruno@clisp.org>
20434
20435         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
20436
20437 2003-07-24  Karl Berry  <karl@gnu.org>
20438
20439         * config/missing: update from automake.
20440
20441 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
20442             Bruno Haible  <bruno@clisp.org>
20443
20444         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
20445         * lib/getline.c (getline, getdelim): Likewise.
20446         Remove _GNU_SOURCE define; now it's defined in config.h through
20447         m4/getline.m4.
20448
20449 2003-07-23  Karl Berry  <karl@gnu.org>
20450
20451         * config/config.sub: update from prep.
20452
20453 2003-07-22  Paul Eggert  <eggert@twinsun.com>
20454
20455         * modules/xalloc (Depends-on): Add exitfail.
20456         * modules/xmemcoll: Likewise.
20457
20458 2003-07-22  Paul Eggert  <eggert@twinsun.com>
20459
20460         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
20461         over-parenthesization in macros.
20462
20463         Sync with coreutils.
20464
20465         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
20466         required by C99.
20467
20468         Use `exit_failure' for xalloc and xmemcoll instead of their own
20469         private exit-failure variables.
20470         * lib/xalloc.h (xalloc_exit_failure): Remove.
20471         * lib/xmalloc.c: Likewise.  Include exitfail.h.
20472         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
20473         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
20474         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
20475         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
20476
20477 2003-07-20  Jim Meyering  <jim@meyering.net>
20478
20479         * modules/closeout (Depends-on): Add exitfail.
20480         Suggestion from Bruno Haible.
20481
20482 2003-07-19  Karl Berry  <karl@gnu.org>
20483
20484         * config/config.sub: update from prep.
20485
20486 2003-07-18  Paul Eggert  <eggert@twinsun.com>
20487
20488         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
20489         Remove.
20490         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
20491         to test that it can stand by itself.  Include "exitfail.h".
20492         Clients should set exit_failure instead.
20493         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
20494
20495 2003-07-18  Bruno Haible  <bruno@clisp.org>
20496
20497         * modules/getndelim2: New file.
20498         * modules/getline: Share files with module getndelim2.
20499         * modules/getnline: Depend on getndelim2 instead of sharing files with
20500         it. Add getnline.c to lib_SOURCES.
20501         * MODULES.html.sh (func_all_modules): Add getndelim2.
20502
20503 2003-07-18  Bruno Haible  <bruno@clisp.org>
20504
20505         * m4/getndelim2.m4: New file.
20506         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
20507         invoke gl_PREREQ_GETNDELIM2.
20508         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
20509         gl_PREREQ_GETNDELIM2.
20510         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
20511         gl_GETNDELIM2.
20512
20513 2003-07-18  Bruno Haible  <bruno@clisp.org>
20514
20515         * lib/getndelim2.h: New file.
20516         * lib/getndelim2.c: Make into a module of its own. Include config.h,
20517         getndelim2.h.
20518         (getndelim2): Make non-static. Change return type to ssize_t.
20519         * lib/getline.h: Change argument names.
20520         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
20521         * lib/getnline.c: Include getndelim2.h.
20522
20523 2003-07-18  Andreas Schwab  <schwab@suse.de>
20524
20525         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
20526
20527 2003-07-17  Karl Berry  <karl@gnu.org>
20528
20529         * config/config.sub: update from prep.
20530
20531 2003-07-17  Bruno Haible  <bruno@clisp.org>
20532
20533         * modules/getnline: New file.
20534         * modules/getline: Add lib/getndelim2.c to source file list.
20535         * MODULES.html.sh (func_all_modules): Add getnline.
20536
20537 2003-07-17  Bruno Haible  <bruno@clisp.org>
20538
20539         * m4/getnline.m4: New file.
20540
20541 2003-07-17  Bruno Haible  <bruno@clisp.org>
20542
20543         * m4/Makefile.am.in: Remove file.
20544         * m4/Makefile.am: Remove file.
20545         * m4/Makefile.in: Remove file.
20546
20547 2003-07-17  Bruno Haible  <bruno@clisp.org>
20548
20549         * lib/getnline.h: New file.
20550         * lib/getnline.c: New file.
20551         * lib/getndelim2.c: New file, extracted from getline.c.
20552         (getndelim2): Renamed from getdelim2, with added nmax argument.
20553         * lib/getline.c: Include getndelim2.c.
20554         (getdelim2): Moved out to getndelim2.c.
20555         (getline, getdelim): Update.
20556
20557 2003-07-17  Bruno Haible  <bruno@clisp.org>
20558
20559         * lib/Makefile.am: Remove file.
20560         * lib/Makefile.in: Remove file.
20561
20562 2003-07-17  Bruno Haible  <bruno@clisp.org>
20563
20564         * configure.in: Remove file.
20565         * Makefile.in: Remove file.
20566
20567 2003-07-17  Bruno Haible  <bruno@clisp.org>
20568
20569         * MODULES.html.sh: Put the </BODY> right before </HTML>.
20570
20571 2003-07-16  Karl Berry  <karl@gnu.org>
20572
20573         * config/srclist-update: was running fixlicense twice, which caused
20574                 texinfo.tex to be nullified for some reason.  Simplify,
20575                 $gplsrc is no longer needed as far as I can see?
20576
20577 2003-07-16  Jim Meyering  <jim@meyering.net>
20578
20579         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
20580
20581 2003-07-15  Paul Eggert  <eggert@twinsun.com>
20582
20583         * config/srclist.txt: Get the following files from gettext-runtime/intl
20584         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
20585         ref-del.sin.  From Bruno Haible.
20586         * config/srclist-update (fixfile): Change grep pattern again, since the
20587         previous fix didn't work (there was another trailing $).  Use
20588         '[$]' to escape the $s.
20589
20590 2003-07-15  Karl Berry  <karl@gnu.org>
20591
20592         * lib/vasnprintf.c: update from gettext.
20593
20594 2003-07-15  Karl Berry  <karl@gnu.org>
20595
20596         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
20597         gets expanded when surrounded by '$'.
20598
20599 2003-07-15  Jim Meyering  <jim@meyering.net>
20600
20601         * modules/save-cwd: Don't depend on error.  From Derek Price.
20602
20603 2003-07-15  Jim Meyering  <jim@meyering.net>
20604
20605         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
20606
20607 2003-07-14  Simon Josefsson  <jas@extundo.com>
20608
20609         * modules/mempcpy: New file.
20610         * MODULES.html.sh (func_all_modules): Add mempcpy.
20611
20612 2003-07-14  Simon Josefsson  <jas@extundo.com>
20613
20614         * m4/mempcpy.m4: New file.
20615
20616 2003-07-14  Simon Josefsson  <jas@extundo.com>
20617
20618         * lib/mempcpy.h: New file.
20619         * lib/mempcpy.c: New file.
20620
20621 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20622
20623         * modules/getdate, modules/posixtm: Depend on mktime.
20624
20625 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20626
20627         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
20628         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
20629         unicodeio.c, unicodeio.h, unlocked-io.h:
20630         Switch from LGPL to GPL.
20631
20632 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20633
20634         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
20635         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
20636         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
20637         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
20638         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
20639         updated automatically by ../config/srclist-update.  This changes
20640         their license from LPGL to GPL.
20641
20642 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20643
20644         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
20645         assumed to refer to the root of the most recent stable gettext version.
20646         * config/srclistvars.sh: Add defaults for eggert.
20647         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
20648         Match "This program" as well as "The program".  This is needed
20649         for gettext.
20650
20651 2003-07-14  Jim Meyering  <jim@meyering.net>
20652
20653         Don't emit diagnostics.  Let callers do that.
20654         * lib/save-cwd.c: Don't include "error.h".
20655         (save_cwd): Don't call error.  Ensure that errno is valid
20656         when returning nonzero.
20657
20658         * lib/save-cwd.h (restore_cwd): Update prototype.
20659         * lib/save-cwd.c (restore_cwd): Remove two parameters.
20660         Simplify.  Don't call error upon failure.  Let callers do that.
20661         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
20662         when auditing is enabled.  But don't bother updating the #if.
20663
20664 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
20665
20666         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
20667         it breaks C++ compilation.
20668         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
20669
20670 2003-07-10  Simon Josefsson  <jas@extundo.com>
20671
20672         * modules/strchrnul (Makefile.am): Add strchrnul.h.
20673
20674 2003-07-10  Jim Meyering  <jim@meyering.net>
20675
20676         * m4/clock_time.m4: Remove trailing blank.
20677         * m4/intmax_t.m4: Likewise.
20678
20679 2003-07-10  Jim Meyering  <jim@meyering.net>
20680
20681         * lib/vasnprintf.c: Remove trailing blanks.
20682         Make cpp indentation consistent.
20683
20684 2003-07-09  Paul Eggert  <eggert@twinsun.com>
20685
20686         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
20687         posixver.c, strftime.c, strnlen.c, strverscmp.c:
20688         Switch from LGPL to GPL.
20689
20690 2003-07-09  Paul Eggert  <eggert@twinsun.com>
20691
20692         * config/srclist.txt: Sort sublists.  Add
20693         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
20694         that differ from gnulib for one reason or another; we'd like this list
20695         to be smaller but for now let's document what we have.
20696
20697 2003-07-08  Paul Eggert  <eggert@twinsun.com>
20698
20699         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
20700         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
20701         and sweeter "eval x=$x".
20702         * config/srclist.txt: Get lib/argp* from glibc.
20703
20704 2003-07-07  Paul Eggert  <eggert@twinsun.com>
20705
20706         * lib/mktime.c: Fix some boundary cases and remove need for floating
20707         point.
20708
20709         Issue a compile-time diagnostic if time_t is floating point, or if
20710         two's complement arithmetic is not in effect, or if arithmetic
20711         right shift does not propagate the sign.  These assumptions were
20712         all in the original code but they weren't checked.
20713
20714         (TIME_T_MIDPOINT, verify): New macros.
20715         (__isleap): Remove; it has integer overflow problems.
20716         (leapyear): New function, without those problems.
20717         (ydhms_tm_diff): Remove; splitting into two parts.
20718         (ydhms_diff): New function, containing the arithmetic part of
20719         the old ydhms_tm_diff function.  Issue a compile-time
20720         diagnostic if we are not using C99 integer division.
20721         Avoid casts when possible.
20722         (guess_time_tm): New function, containing the checking part of
20723         the old ydhms_tm_diff function.  Return the new value, rather than
20724         the difference between it and the old.  Accept a new argument T
20725         so that *T specifies the old value.  Check for overflow in the result.
20726
20727         (__mktime_internal): Use a time_t offset, not a long int offset.
20728         This undoes the 2003-06-04 change, which is no longer needed now
20729         that we have better overflow checking.
20730         (localtime_offset): Likewise.
20731
20732         (__mktime_internal): Avoid harmful overflow on hosts where time_t
20733         and long are 64-bit but int is only 32-bit.
20734         (ydhms_diff): Use long int to store year1 and yday1.
20735         Issue a compile-time diagnostic if long int is not wide enough.
20736
20737         (__mktime_internal): Use long int to store adjusted year and yday.
20738         Use plain C rather than preprocessor commands, if that doesn't
20739         affect efficiency.
20740         Check for overflow (and try to repair) after each probe
20741         rather than checking only at the very end.  This avoids some bugs
20742         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
20743         does not equal GMT offset at maximum time).
20744         Use integer to check for overflow rather than floating point; this
20745         is more portable to non-IEEE hosts, and is a tad faster.
20746         When we detect that we are oscillating between two values,
20747         don't check whether tm_isdst has the requested value, since
20748         we already know the answer.  When tm_isdst has the wrong value,
20749         use a different heuristic to find the right one, based on the
20750         extreme values actually observed in practice in tz2003a,
20751         rather than the (overly optimistic) "previous 3 calendar quarters".
20752
20753         (not_equal_tm, print_tm, check_result): Use "const T" rather than
20754         "T const" to accommodate glibc style.
20755         (check_result): Use less-confusing report format.  "long" -> "long int.
20756         (main): Likewise.
20757         Don't loop if the iteration overflows time_t.
20758         Allow a negative step in the iteration.
20759
20760 2003-07-06  Karl Berry  <karl@gnu.org>
20761
20762         * config/depcomp: update from automake.
20763         * config/config.sub: update from prep.
20764
20765 2003-07-03  Karl Berry  <karl@gnu.org>
20766
20767         * config/config.guess: update from prep.
20768
20769 2003-07-01  Paul Eggert  <eggert@twinsun.com>
20770
20771         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
20772         xreadlink.c now includes it unconditionally.
20773
20774 2003-07-01  Paul Eggert  <eggert@twinsun.com>
20775
20776         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
20777         having it depend on HAVE_SYS_TYPES_H.
20778
20779 2003-07-01  Bruno Haible  <bruno@clisp.org>
20780
20781         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
20782         <sys/types.h> should be sufficient.
20783         Reported by Paul Eggert.
20784
20785 2003-06-26  Karl Berry  <karl@gnu.org>
20786
20787         * config/depcomp: update from automake.
20788
20789 2003-06-26  Bruno Haible  <bruno@clisp.org>
20790
20791         * modules/human: Depend on module stdbool.
20792
20793 2003-06-25  Bruno Haible  <bruno@clisp.org>
20794
20795         * modules/readlink: New file.
20796         * modules/xreadlink: Depend on it.
20797         * MODULES.html.sh (func_all_modules): Add readlink.
20798
20799 2003-06-25  Bruno Haible  <bruno@clisp.org>
20800
20801         * m4/readlink.m4: New file.
20802
20803 2003-06-25  Bruno Haible  <bruno@clisp.org>
20804
20805         * lib/readlink.c: New file.
20806
20807 2003-06-22  Karl Berry  <karl@gnu.org>
20808
20809         * config/srclist.txt: update mkinstalldirs from automake.
20810         * config/mkinstalldirs: update.
20811
20812 2003-06-22  Bruno Haible  <bruno@clisp.org>
20813
20814         Portability to mingw32.
20815         * m4/ssize_t.m4: New file, from GNU gettext.
20816         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
20817         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
20818
20819 2003-06-22  Bruno Haible  <bruno@clisp.org>
20820
20821         * modules/safe-read: Add m4/ssize_t.m4.
20822         * modules/xreadlink: Add m4/ssize_t.m4.
20823
20824 2003-06-20  Bruno Haible  <bruno@clisp.org>
20825
20826         Assume C89, so PARAMS isn't needed.
20827         * lib/unicodeio.h (PARAMS): Remove.
20828         * lib/unicodeio.c: Don't use PARAMS.
20829
20830 2003-06-18  Karl Berry  <karl@gnu.org>
20831
20832         * config/config.{guess,sub}: update from prep.
20833
20834 2003-06-18  Jim Meyering  <jim@meyering.net>
20835
20836         Merge changes from coreutils.
20837         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
20838         Remove explicit declarations of xmalloc and realloc.
20839         Include xalloc.h.
20840         (read_utmp): Remove anachronistic cast of xmalloc.
20841
20842 2003-06-17  Paul Eggert  <eggert@twinsun.com>
20843
20844         Assume C89, so PARAMS isn't needed.
20845         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
20846         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
20847         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
20848         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
20849         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
20850         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
20851         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
20852         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
20853         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
20854         lib/xstrtod.h, lib/xstrtol.h: Likewise.
20855         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
20856         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
20857         no longer needed. Anyway, config.h should always be included before any
20858         other file.
20859
20860 2003-06-11  Simon Josefsson  <jas@extundo.com>
20861
20862         * modules/sysexits: New file.
20863         * MODULES.html.sh (func_all_modules): Add sysexits.
20864
20865 2003-06-11  Simon Josefsson  <jas@extundo.com>
20866
20867         * lib/sysexit_.h: New file.
20868
20869 2003-06-11  Derek Price  <derek@ximbiot.com>
20870
20871         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
20872         necessary.
20873
20874 2003-06-11  Bruno Haible  <bruno@clisp.org>
20875
20876         * m4/sysexits.m4: New file.
20877
20878 2003-06-10  Simon Josefsson  <jas@extundo.com>
20879
20880         * lib/argp.h: New file, from glibc.
20881         * lib/argp-ba.c: New file, from glibc.
20882         * lib/argp-eexst.c: New file, from glibc.
20883         * lib/argp-fmtstream.c: New file, from glibc.
20884         * lib/argp-fmtstream.h: New file, from glibc.
20885         * lib/argp-fs-xinl.c: New file, from glibc.
20886         * lib/argp-help.c: New file, from glibc.
20887         * lib/argp-namefrob.h: New file, from glibc.
20888         * lib/argp-parse.c: New file, from glibc.
20889         * lib/argp-pv.c: New file, from glibc.
20890         * lib/argp-pvh.c: New file, from glibc.
20891         * lib/argp-xinl.c: New file, from glibc.
20892
20893 2003-06-10  Simon Josefsson  <jas@extundo.com>
20894
20895         * modules/strchrnul: New file.
20896
20897 2003-06-10  Simon Josefsson  <jas@extundo.com>
20898
20899         * modules/argp: New file.
20900
20901 2003-06-10  Simon Josefsson  <jas@extundo.com>
20902
20903         * m4/strchrnul.m4: New file.
20904
20905 2003-06-10  Simon Josefsson  <jas@extundo.com>
20906
20907         * lib/strchrnul.h: New file.
20908         * lib/strchrnul.c: New file.
20909
20910 2003-06-10  Bruno Haible  <bruno@clisp.org>
20911
20912         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
20913
20914 2003-06-07  Karl Berry  <karl@gnu.org>
20915
20916         * config/config.{guess,sub}: update from prep.
20917
20918 2003-06-07  Jim Meyering  <jim@meyering.net>
20919
20920         * modules/strtod: Use $(...) notation, not @...@ for
20921         AC_REPLACE'd variables.
20922         * modules/localcharset: Likewise.
20923
20924 2003-06-07  Jim Meyering  <jim@meyering.net>
20925
20926         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
20927         in place of my name in the copyright comment.
20928         Remove definition and uses of __P.
20929
20930         From coreutils.
20931         * lib/stat.c: Don't declare xmalloc explicitly.
20932         Instead, include "xalloc.h".
20933         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
20934         xrealloc, and xcalloc return values.
20935         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
20936         Improve comment.
20937         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
20938
20939 2003-06-07  Bruno Haible  <bruno@clisp.org>
20940
20941         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
20942         avoid AC_CONFIG_LINKS.
20943         * modules/fnmatch (Makefile.am): Use explicit creation rule for
20944         fnmatch.h, to avoid AC_CONFIG_LINKS.
20945         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
20946
20947 2003-06-07  Bruno Haible  <bruno@clisp.org>
20948
20949         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
20950         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
20951         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
20952         directory.
20953         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
20954         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
20955         directory.
20956
20957 2003-06-06  Jim Meyering  <jim@meyering.net>
20958
20959         Merge from coreutils.
20960         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
20961         Consolidate declarations and initializations of *_base* locals.
20962
20963         Merge from coreutils.
20964         This avoids a core dump on systems without GNU putenv,
20965         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
20966         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
20967         (unsetenv): New static function, from GNU libc.
20968         (rpl_putenv): Use it.
20969
20970         * lib/modechange.c: Remove trailing blanks.
20971
20972         Merge from coreutils.
20973         * lib/fsusage.c: Remove declaration of statfs.
20974         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
20975
20976         * lib/posixtm.c: Include <stdbool.h> unconditionally.
20977
20978 2003-06-06  Jim Meyering  <jim@meyering.net>
20979
20980         * lib/stdbool_.h: Renamed from stdbool.h.in.
20981
20982 2003-06-06  Jim Meyering  <jim@meyering.net>
20983             Bruno Haible  <bruno@clisp.org>
20984
20985         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
20986         Adjust Makefile.am snippet not to redirect directly to target.
20987         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
20988
20989 2003-06-05  Paul Eggert  <eggert@twinsun.com>
20990
20991         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
20992         mismatch, look in future quarters as well as past.  This fixes a
20993         bug when processing fall-backwards gaps immediately after a long
20994         period of daylight-saving time.
20995
20996         * lib/mktime.c: Assume freestanding C89 or better.
20997         (HAVE_LIMITS_H): Remove.  Assume it's 1.
20998         (__P): Remove; not used.
20999         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
21000         (mktime, not_equal_tm, print_tm, check_result,
21001         main): Use prototypes.  Use const * where appropriate.
21002         (main): Fix typo in testing code that uncovered by above changes.
21003         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
21004
21005 2003-06-04  Paul Eggert  <eggert@twinsun.com>
21006
21007         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
21008         locale.h, localeconv.  This merges changes from coreutils.
21009
21010         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
21011         It can be removed after the next Autoconf is released.
21012         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
21013         needed.
21014
21015 2003-06-04  Paul Eggert  <eggert@twinsun.com>
21016
21017         * lib/mktime.c: Fix Debian bug 177940
21018         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
21019         (localtime_offset): Now long int, not time_t, because we want it
21020         to be guaranteed to be signed.  All uses changed.
21021         (__mktime_internal): If overflow would occur when adding offset,
21022         don't add it.
21023
21024         Merge 'human' changes from coreutils.  Rewrite to support
21025         locale-specific notations like thousands separators.
21026         * lib/human.c: Simplify authorship notice.
21027         Include human.h immediately after config.h.
21028         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
21029         <limits.h>: Do not include, since human.h does.
21030         (SIZE_MAX, UINTMAX_MAX): New macros.
21031         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
21032         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
21033         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
21034         (power_letter): Renamed from suffixes.
21035         (generate_suffix_backwards): Remove.
21036         (adjust_value): Now takes int style (because of human.h changes)
21037         and long double value (for greater precision on some platforms).
21038         (group_number): New function.
21039         (human_readable): Use it.  Use integer options, not enum.
21040         Put the options before the sizes in the arg list.
21041         Support all the new options.
21042         The old human_readable function has been removed;
21043         use inttostr.h instead.
21044         (human_readable, default_block_size, humblock):
21045         Use uintmax_t, not int, for block sizes.
21046         (human_readable_inexact, block_size_types): Remove.
21047         (block_size_opts): New constant.
21048         (human_options): Renamed from human_block_size, with new signature
21049         that allows block sizes up to UINTMAX_MAX.  All callers changed.
21050         * lib/human.h: Add copyright and authorship notice.
21051         Include <limits.h> and <stdbool.h> unconditionally.
21052         (PARAMS): Remove.  All uses removed.
21053         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
21054         (enum human_inexact_style): Remove tag; now a nameless enum.
21055         (human_floor, human_ceiling, human_round_to_even): Now have
21056         values 2, 0, 1 rather than -1, 1, 0.
21057         (human_group_digits, human_suppress_point_zero, human_autoscale,
21058         human_base_1024, human_SI, human_B): New constants.
21059         (human_readable_inexact, human_block_size): Remove.
21060         (human_readable): Size args are now uintmax_t, not int.
21061         (human_options): New decl.
21062
21063         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
21064         unnecessary now that we assume C89 or better.  This change
21065         imported from coreutils.
21066
21067         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
21068         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
21069         in the 2003-05-30 sync from glibc.
21070
21071         .h files should stand alone, but we shouldn't include <sys/types.h>
21072         if we can get away with just <stddef.h>.
21073
21074         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
21075         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
21076         rather than <sys/types.h>, as we merely need size_t.
21077         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
21078         to get size_t.
21079         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
21080         Include <stdio.h>, to get FILE.
21081         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
21082         memcasecmp.h has included <stddef.h> and all we need is size_t.
21083         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
21084         our interface, instead of including <sys/types.h>
21085
21086 2003-06-04  Paul Eggert  <eggert@twinsun.com>
21087
21088         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
21089         now, as glibc mktime is buggy on non-glibc systems.
21090
21091 2003-06-03  Karl Berry  <karl@gnu.org>
21092
21093         * config/config.sub: update from prep.
21094
21095 2003-06-02  Paul Eggert  <eggert@twinsun.com>
21096
21097         [from coreutils]
21098         Fix some minor time-related bugs with POSIX time arguments.
21099         Some valid time stamps were being rejected (notably -1, and
21100         time stamps before 1900 on 64-bit hosts).  And some invalid
21101         time stamps were being accepted, e.g. September 31.
21102
21103         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
21104         that we can return (time_t) -1 successfully.
21105         * lib/posixtm.c: Likewise.
21106         [HAVE_STDBOOL_H]: Include <stdbool.h>.
21107         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
21108         (t): Remove static var.
21109         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
21110         of static var.  All uses changed.
21111         (year): Do not reject years before 1900; they can occur with
21112         64-bit time_t.
21113         (posix_time_parse): Do not check for out-of-range components;
21114         that is now the caller's responsibility, since our checks were
21115         only approximations.
21116         (posixtime): Use mktime to check for out-of-range components,
21117         since it knows them exactly.
21118         If mktime returns (time_t) -1, check whether an error actually occurred
21119         by invoking localtime on -1.
21120         (main) [TEST_POSIXTIME]: Check for input data errors, and report
21121         posixtime failures better.
21122         Improve the test data (in comments only).
21123
21124 2003-06-02  Karl Berry  <karl@gnu.org>
21125
21126         * config/mkinstalldirs (version): new variable.
21127         (--version): new option.
21128         (usage): improve message.
21129
21130 2003-05-30  Karl Berry  <karl@gnu.org>
21131
21132         * lib/mktime.c: update from libc.
21133
21134 2003-05-30  Bruno Haible  <bruno@clisp.org>
21135
21136         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
21137         * config/config.rpath: Upgrade to gettext-0.12.1.
21138
21139 2003-05-30  Bruno Haible  <bruno@clisp.org>
21140
21141         * m4/gettext.m4: Upgrade to gettext-0.12.1.
21142         * m4/nls.m4: New file, from gettext-0.12.1.
21143         * m4/po.m4: New file, from gettext-0.12.1.
21144         * m4/progtest.m4: Upgrade to gettext-0.12.1.
21145
21146 2003-05-30  Bruno Haible  <bruno@clisp.org>
21147
21148         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
21149         * lib/localcharset.h: Likewise.
21150         * lib/localcharset.c: Likewise.
21151
21152 2003-05-29  Karl Berry  <karl@gnu.org>
21153
21154         * config/config.rpath: update from gettext.
21155
21156 2003-05-28  Paul Eggert  <eggert@twinsun.com>
21157
21158         Assume the headers required for C89 freestanding compilers.
21159         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
21160         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
21161         * m4/human.m4 (gl_HUMAN): Likewise.
21162         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
21163         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
21164         * m4/userspec.m4 (gl_USERSPEC): Likewise.
21165         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
21166         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
21167         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
21168
21169 2003-05-28  Paul Eggert  <eggert@twinsun.com>
21170
21171         Assume the headers required for C89 freestanding compilers.
21172         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
21173         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
21174         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
21175         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
21176         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
21177         define, since <limits.h> is guaranteed to do that.
21178         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
21179         * lib/exclude.c: Include <stdbool.h> unconditionally.
21180         * lib/tempname.c: Include <stddef.h> unconditionally.
21181         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
21182         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
21183         <stddef.h> does that.
21184         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
21185         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
21186         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
21187         needed.
21188         * lib/xstrtol.c: Likewise.
21189         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
21190         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
21191
21192         * lib/addext.c (addext): Use assignment rather than cast, to avoid
21193         warnings on some platforms.
21194
21195         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
21196         arbitrarily.
21197
21198 2003-05-26  Jim Meyering  <jim@meyering.net>
21199
21200         Merge in a change from coreutils:
21201         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
21202         that is guaranteed to be `no'.  Use `no_such_member' to indicate
21203         that condition, rather than `-1' which is slightly misleading.
21204         Change the name of the cache variable to have the gl_ prefix.
21205         Prompted by a patch from Richard Dawe for DJGPP.
21206
21207 2003-05-24  Karl Berry  <karl@gnu.org>
21208
21209         * config/config.guess: update from prep.
21210
21211 2003-05-22  Karl Berry  <karl@gnu.org>
21212
21213         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
21214
21215 2003-05-20  Karl Berry  <karl@gnu.org>
21216
21217         * config/config.guess: update from prep.
21218
21219 2003-05-18  Karl Berry  <karl@gnu.org>
21220
21221         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
21222         might actually be set by the user.
21223
21224         * config/depcomp, install-sh, mdate-sh: update from automake.
21225
21226 2003-05-17  Bruno Haible  <bruno@clisp.org>
21227
21228         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
21229         invalid expansion for AC_EGREP_CPP.
21230         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
21231         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
21232         Suggested by Akim Demaille <akim@epita.fr> in
21233         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
21234
21235 2003-05-12  Jim Meyering  <jim@meyering.net>
21236
21237         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
21238         the space-padded-by-default conversion specifiers, %e, %k, %l.
21239
21240 2003-05-12  Bruno Haible  <bruno@clisp.org>
21241
21242         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
21243         the string is longer than 4 KB.
21244
21245 2003-05-11  Karl Berry  <karl@gnu.org>
21246
21247         * config/config.{guess,sub}: update from prep.
21248
21249 2003-05-09  Bruno Haible  <bruno@clisp.org>
21250
21251         * modules/error: Add m4/strerror_r.m4 to file list.
21252
21253 2003-05-03  Bruno Haible  <bruno@clisp.org>
21254
21255         Upgrade to Unicode-4.0.
21256         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
21257         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
21258         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
21259         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
21260         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
21261         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
21262         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
21263         Change width of U+E0100..U+E01EF from 1 to 0.
21264
21265 2003-04-25  Jim Meyering  <jim@meyering.net>
21266
21267         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
21268         of type size_t, not int.
21269
21270 2003-04-25  Bruno Haible  <bruno@clisp.org>
21271
21272         * lib/copy-file.c: Include <stddef.h>, for size_t.
21273
21274 2003-04-21  Paul Eggert  <eggert@twinsun.com>
21275
21276         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
21277         code which expansion is under static control.  Patch imported from
21278         Akim Demaille's patch to Bison; see
21279         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
21280
21281 2003-04-14  Bruno Haible  <bruno@clisp.org>
21282
21283         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
21284
21285 2003-04-11  Jim Meyering  <jim@meyering.net>
21286
21287         Merge changes from Coreutils.
21288
21289         2003-03-22  Jim Meyering  <jim@meyering.net>
21290
21291         * lib/strftime.c (widen): Cast alloca return value to proper type.
21292
21293         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
21294
21295         From GNU libc.
21296         * lib/strftime.c (my_strftime): Handle very large width
21297         specifications for numeric values correctly.  Improve checks for
21298         overflow.
21299
21300         2003-01-19  Jim Meyering  <jim@meyering.net>
21301
21302         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
21303         definitions.
21304         (nl_get_alt_digit) [! defined my_strftime]: Define.
21305         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
21306         _nl_get_alt_digit and _nl_get_walt_digit.
21307
21308         * lib/strftime.c (my_strftime): Merge in locale-related changes from
21309         libc. These changes have no effect outside of _LIBC.
21310
21311 2003-04-10  Bruno Haible  <bruno@clisp.org>
21312
21313         * modules/findprog: New file.
21314         * MODULES.html.sh (func_all_modules): Add it.
21315
21316 2003-04-10  Bruno Haible  <bruno@clisp.org>
21317
21318         * m4/findprog.m4: New file.
21319         * m4/eaccess.m4: New file.
21320
21321 2003-04-10  Bruno Haible  <bruno@clisp.org>
21322
21323         * lib/findprog.h: New file, from GNU gettext.
21324         * lib/findprog.c: New file, from GNU gettext.
21325
21326 2003-04-05  Jim Meyering  <jim@meyering.net>
21327
21328         Merge changes from Coreutils.
21329
21330         * lib/exclude.h (PARAMS): Remove definition and uses.
21331         * lib/exclude.c: Remove uses of `PARAMS'.
21332
21333         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
21334         Add test-cases for DOS filenames. Declare program_name.
21335         (main): Set up program_name.  Patch by Rich Dawe.
21336
21337         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
21338         error from mntctl.
21339         Use mntctl's return value to drive the entry-processing loop, since
21340         we can't rely on the value of the vmt_length member in the last
21341         entry.  On some systems doing so could result in exhausting
21342         virtual memory.  Based in part on a patch from Mike Jetzer.
21343
21344 2003-04-04  Bruno Haible  <bruno@clisp.org>
21345
21346         * modules/linebreak: New file.
21347         * MODULES.html.sh (func_all_modules): Add it.
21348
21349 2003-04-04  Bruno Haible  <bruno@clisp.org>
21350
21351         * m4/linebreak.m4: New file.
21352
21353 2003-04-04  Bruno Haible  <bruno@clisp.org>
21354
21355         * lib/linebreak.h: New file, from GNU gettext.
21356         * lib/linebreak.c: New file, from GNU gettext with slight
21357         modifications.
21358         * lib/lbrkprop.h: New file, from GNU gettext.
21359
21360 2003-04-03  Bruno Haible  <bruno@clisp.org>
21361
21362         * modules/utf8-ucs4: New file.
21363         * modules/utf16-ucs4: New file.
21364         * modules/ucs4-utf8: New file.
21365         * modules/ucs4-utf16: New file.
21366         * MODULES.html.sh (func_all_modules): Add them.
21367
21368 2003-04-03  Bruno Haible  <bruno@clisp.org>
21369
21370         * m4/utf-ucs4.m4: New file.
21371         * m4/ucs4-utf.m4: New file.
21372
21373 2003-04-03  Bruno Haible  <bruno@clisp.org>
21374
21375         * lib/utf8-ucs4.h: New file, from GNU gettext.
21376         * lib/utf16-ucs4.h: New file, from GNU gettext.
21377         * lib/ucs4-utf8.h: New file, from GNU gettext.
21378         * lib/ucs4-utf16.h: New file, from GNU gettext.
21379
21380 2003-04-02  Bruno Haible  <bruno@clisp.org>
21381
21382         * modules/binary-io: New file.
21383         * MODULES.html.sh (func_all_modules): Add it.
21384
21385 2003-04-02  Bruno Haible  <bruno@clisp.org>
21386
21387         * lib/binary-io.h: New file, from GNU gettext.
21388
21389 2003-04-01  Bruno Haible  <bruno@clisp.org>
21390
21391         * modules/pathname: New file.
21392         * MODULES.html.sh (func_all_modules): Add it.
21393
21394 2003-04-01  Bruno Haible  <bruno@clisp.org>
21395
21396         * lib/pathname.h: New file, from GNU gettext.
21397         * lib/concatpath.c: New file, from GNU gettext.
21398
21399 2003-03-30  Bruno Haible  <bruno@clisp.org>
21400
21401         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
21402
21403 2003-03-30  Bruno Haible  <bruno@clisp.org>
21404
21405         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
21406         function chown() doesn't exist.
21407
21408 2003-03-28  Bruno Haible  <bruno@clisp.org>
21409
21410         * modules/copy-file: New file.
21411         * MODULES.html.sh (func_all_modules): Add it.
21412
21413 2003-03-28  Bruno Haible  <bruno@clisp.org>
21414
21415         * m4/copy-file.m4: New file.
21416
21417 2003-03-28  Bruno Haible  <bruno@clisp.org>
21418
21419         * lib/copy-file.h: New file, from GNU gettext.
21420         * lib/copy-file.c: New file, from GNU gettext.
21421
21422 2003-03-18  Jim Meyering  <jim@meyering.net>
21423
21424         * lib/quote.c (quote_n): Fix typo in comment.
21425
21426 2003-03-18  Bruno Haible  <bruno@clisp.org>
21427
21428         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
21429         checking.
21430         * m4/onceonly_2_57.m4: Likewise.
21431
21432 2003-03-17  Bruno Haible  <bruno@clisp.org>
21433
21434         * m4/onceonly.m4: Require autoconf 2.54 or newer.
21435         (m4_quote): Remove macro.
21436         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
21437
21438 2003-03-14  Jim Meyering  <jim@meyering.net>
21439
21440         Merge changes from Coreutils.
21441         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
21442         to be const, in order to avoid warnings.
21443         (obstack_room): Likewise.
21444         (obstack_empty_p): Likewise.
21445
21446 2003-03-14  Bruno Haible  <bruno@clisp.org>
21447
21448         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
21449         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
21450
21451 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21452
21453         Merge changes from Bison.
21454         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
21455         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
21456         when compiling Bison 1.875's `bitset bset = obstack_alloc
21457         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
21458         * lib/hash.c: Include <stdbool.h> unconditionally.
21459
21460 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21461
21462         * m4/onceonly.m4 (m4_quote): New macro.
21463         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
21464         Quote AC_FOREACH variable-expansions properly.
21465
21466 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21467
21468         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
21469
21470 2003-03-09  Paul Eggert  <eggert@twinsun.com>
21471
21472         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
21473         Reported by Bruce Becker; see:
21474         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
21475
21476 2003-03-03  Paul Eggert  <eggert@twinsun.com>
21477             Bruno Haible  <bruno@clisp.org>
21478
21479         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
21480         Reported by John Hughes, see
21481         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
21482
21483 2003-02-20  Bruno Haible  <bruno@clisp.org>
21484
21485         * MODULES.html.sh (func_all_modules): Add poll.
21486
21487 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
21488
21489         * modules/poll: New file.
21490
21491 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
21492
21493         * lib/poll_.h: New file.
21494         * lib/poll.c: New file.
21495
21496 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
21497
21498         * m4/poll.m4: New file.
21499
21500 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
21501
21502         * modules/mathl: New file.
21503
21504 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
21505
21506         * lib/mathl.h: New file.
21507         * lib/acosl.c: New file.
21508         * lib/asinl.c: New file.
21509         * lib/atanl.c: New file.
21510         * lib/ceill.c: New file.
21511         * lib/cosl.c: New file.
21512         * lib/expl.c: New file.
21513         * lib/floorl.c: New file.
21514         * lib/frexpl.c: New file.
21515         * lib/ldexpl.c: New file.
21516         * lib/logl.c: New file.
21517         * lib/sincosl.c: New file.
21518         * lib/sinl.c: New file.
21519         * lib/sqrtl.c: New file.
21520         * lib/tanl.c: New file.
21521         * lib/trigl.c: New file.
21522         * lib/trigl.h: New file.
21523
21524 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
21525
21526         * m4/mathl.m4: New file.
21527
21528 2003-02-18  Bruno Haible  <bruno@clisp.org>
21529
21530         * MODULES.html.sh (func_all_modules): Add mathl.
21531
21532 2003-02-17  Bruno Haible  <bruno@clisp.org>
21533
21534         * modules/mkdtemp: New module.
21535         * MODULES.html.sh (func_all_modules): Add it.
21536
21537 2003-02-17  Bruno Haible  <bruno@clisp.org>
21538
21539         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
21540
21541 2003-02-17  Bruno Haible  <bruno@clisp.org>
21542
21543         * lib/mkdtemp.h: New file, from GNU gettext.
21544         * lib/mkdtemp.c: New file, from GNU gettext.
21545
21546 2003-02-02  Jim Meyering  <jim@meyering.net>
21547
21548         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
21549         e.g. glibc-2.2.93.
21550
21551 2003-01-31  Bruno Haible  <bruno@clisp.org>
21552
21553         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
21554         'rpl_rename'.
21555         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
21556         'rpl_strnlen'.
21557         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
21558         'rpl_strtod'.
21559         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
21560         'rpl_utime'.
21561
21562 2003-01-31  Bruno Haible  <bruno@clisp.org>
21563
21564         * lib/rename.c: #undef rename before defining rpl_rename.
21565         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
21566
21567 2003-01-30  Bruno Haible  <bruno@clisp.org>
21568
21569         * modules/vasnprintf, modules/vasprintf: New modules.
21570         * MODULES.html.sh (func_all_modules): Add them.
21571
21572 2003-01-30  Bruno Haible  <bruno@clisp.org>
21573
21574         * m4/signed.m4: New file, from GNU gettext.
21575         * m4/longdouble.m4: New file, from GNU gettext.
21576         * m4/wchar_t.m4: New file, from GNU gettext.
21577         * m4/wint_t.m4: New file, from GNU gettext.
21578         * m4/vasnprintf.m4: New file.
21579         * m4/vasprintf.m4: New file.
21580
21581 2003-01-30  Bruno Haible  <bruno@clisp.org>
21582
21583         * lib/printf-args.h: New file, from GNU gettext.
21584         * lib/printf-args.c: New file, from GNU gettext.
21585         * lib/printf-parse.h: New file, from GNU gettext.
21586         * lib/printf-parse.c: New file, from GNU gettext.
21587         * lib/vasnprintf.h: New file, from GNU gettext.
21588         * lib/vasnprintf.c: New file, from GNU gettext.
21589         * lib/asnprintf.c: New file, from GNU gettext.
21590         * lib/vasprintf.h: New file, from GNU gettext with modifications.
21591         * lib/vasprintf.c: New file, from GNU gettext.
21592         * lib/asprintf.c: New file, from GNU gettext.
21593
21594 2003-01-29  Bruno Haible  <bruno@clisp.org>
21595
21596         * modules/stpncpy: New module.
21597         * MODULES.html.sh (func_all_modules): Add it.
21598
21599 2003-01-29  Bruno Haible  <bruno@clisp.org>
21600
21601         * m4/stpncpy.m4: New file.
21602
21603 2003-01-29  Bruno Haible  <bruno@clisp.org>
21604
21605         * lib/stpncpy.h: New file, from GNU gettext with modifications.
21606         * lib/stpncpy.c: New file, from GNU gettext with modifications.
21607
21608 2003-01-28  Bruno Haible  <bruno@clisp.org>
21609
21610         * modules/c-ctype: New module.
21611         * MODULES.html.sh (func_all_modules): Add it.
21612
21613 2003-01-28  Bruno Haible  <bruno@clisp.org>
21614
21615         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
21616         Paul Eggert.
21617         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
21618         Paul Eggert.
21619
21620 2003-01-27  Bruno Haible  <bruno@clisp.org>
21621
21622         * modules/xsetenv: New module.
21623         * MODULES.html.sh (func_all_modules): Add it.
21624
21625 2003-01-27  Bruno Haible  <bruno@clisp.org>
21626
21627         * lib/xsetenv.h: New file, from GNU gettext.
21628         * lib/xsetenv.c: New file, from GNU gettext.
21629
21630 2003-01-23  Jim Meyering  <jim@meyering.net>
21631
21632         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
21633         from working on systems without dirfd (at least Irix and OSF1/Tru64).
21634
21635 2003-01-23  Bruno Haible  <bruno@clisp.org>
21636
21637         * modules/minmax: New module.
21638         * MODULES.html.sh (func_all_modules): Add it.
21639
21640 2003-01-23  Bruno Haible  <bruno@clisp.org>
21641
21642         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
21643         Eggert.
21644
21645 2003-01-22  Bruno Haible  <bruno@clisp.org>
21646
21647         * modules/exit: New module.
21648         * MODULES.html.sh (func_all_modules): Add it.
21649
21650 2003-01-22  Bruno Haible  <bruno@clisp.org>
21651
21652         * lib/exit.h: New file, from GNU gettext.
21653
21654 2003-01-19  Bruno Haible  <bruno@clisp.org>
21655
21656         * gnulib-tool: Recognize option --extract-maintainer.
21657         (func_get_maintainer): New function.
21658         * modules/*: Add Maintainer entry.
21659
21660 2003-01-16  Jim Meyering  <jim@meyering.net>
21661
21662         * m4/regex.m4: The `regex' struct is both input and output.
21663         Initialize it before each use.  Patch by Tim Waugh.
21664
21665 2003-01-16  Bruno Haible  <bruno@clisp.org>
21666
21667         * MODULES.html.sh: Add a table of contents. Add the module name as
21668         leftmost column. Add hyperlinks.
21669
21670 2003-01-15  Bruno Haible  <bruno@clisp.org>
21671
21672         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
21673
21674 2003-01-15  Bruno Haible  <bruno@clisp.org>
21675
21676         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
21677         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
21678         suffix.
21679
21680 2003-01-15  Bruno Haible  <bruno@clisp.org>
21681
21682         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
21683
21684 2003-01-15  Bruno Haible  <bruno@clisp.org>
21685
21686         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
21687         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
21688
21689 2003-01-14  Jim Meyering  <jim@meyering.net>
21690
21691         * lib/same.c (same_name): Tweak a comment.
21692
21693 2003-01-14  Bruno Haible  <bruno@clisp.org>
21694
21695         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
21696         when a string comparison is sufficient.
21697
21698 2003-01-14  Bruno Haible  <bruno@clisp.org>
21699
21700         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
21701         'unsigned int'.
21702
21703 2003-01-14  Bruno Haible  <bruno@clisp.org>
21704
21705         * lib/hash-pjw.c: Add comment about low quality of this function.
21706
21707 2003-01-13  Bruno Haible  <bruno@clisp.org>
21708
21709         * modules/stpcpy: Distribute lib/stpcpy.h.
21710         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
21711
21712 2003-01-13  Bruno Haible  <bruno@clisp.org>
21713
21714         * modules/*: Add a description.
21715         * modules/strpbrk: Fix Makefile.am snippet.
21716         * modules/strtoimax: Fix dependencies.
21717         * modules/strtoumax: Likewise.
21718
21719 2003-01-13  Bruno Haible  <bruno@clisp.org>
21720
21721         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
21722         * modules/alloca (Makefile.am): All object files depend on alloca.h.
21723         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
21724
21725 2003-01-13  Bruno Haible  <bruno@clisp.org>
21726
21727         * gnulib-tool (func_create_testdir): Store config/* files in the main
21728         directory.
21729         * config.rpath: Move to ...
21730         * config/config.rpath: ... here.
21731         * modules/gettext: Contains config/config.rpath, not config.rpath.
21732         * modules/iconv: Likewise.
21733
21734 2003-01-12  Paul Eggert  <eggert@twinsun.com>
21735
21736         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
21737         to avoid collisions with libcurses and libreadline.
21738
21739         * m4/getstr.m4: Remove.
21740         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
21741
21742 2003-01-12  Paul Eggert  <eggert@twinsun.com>
21743
21744         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
21745         to avoid collisions with libcurses and libreadline.
21746
21747         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
21748         * lib/getstr.h, getstr.c: Remove.
21749         * lib/getline.c: Include "getline.h", to check interface.
21750         Move body of old getstr.c here: this defines MIN_CHUNK and
21751         declares getdelim2, which is renamed from getstr.
21752         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
21753
21754         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
21755         All uses changed.
21756         * lib/linebuffer.h: Likewise.
21757         (readline): Remove backward-compatibility macro.
21758
21759 2003-01-12  Paul Eggert  <eggert@twinsun.com>
21760
21761         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
21762         to avoid collisions with libcurses and libreadline.
21763         * getstr: Remove.
21764         * MODULES.html.sh: Remove getstr.
21765         * modules/getline: Depend on unlocked-io, not getstr.
21766
21767 2003-01-12  Jim Meyering  <jim@meyering.net>
21768
21769         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
21770
21771 2003-01-10  Bruno Haible  <bruno@clisp.org>
21772
21773         * modules/alloca: Change Makefile.am requirements. Simplify Include
21774         requirements. Add lib/alloca_.h to file list.
21775
21776 2003-01-10  Bruno Haible  <bruno@clisp.org>
21777
21778         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
21779
21780 2003-01-10  Bruno Haible  <bruno@clisp.org>
21781
21782         * lib/alloca_.h: New file.
21783         * lib/getdate.y: Unconditionally include alloca.h.
21784         * lib/makepath.c: Likewise.
21785         * lib/setenv.c: Likewise.
21786         * lib/userspec.c: Likewise.
21787
21788 2003-01-09  Karl Berry  <karl@gnu.org>
21789
21790         * MODULES.html.sh: include `dirname $0` in PATH, to find
21791         gnulib-tool.
21792
21793 2003-01-09  Bruno Haible  <bruno@clisp.org>
21794
21795         * modules/stdbool: Change configure.ac, Makefile.am requirements.
21796         Simplify Include requirements. Add lib/stdbool.h.in to file list.
21797
21798 2003-01-09  Bruno Haible  <bruno@clisp.org>
21799
21800         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
21801
21802 2003-01-09  Bruno Haible  <bruno@clisp.org>
21803
21804         * lib/stdbool.h.in: New file.
21805
21806 2003-01-09  Bruno Haible  <bruno@clisp.org>
21807
21808         * gnulib-tool (func_all_modules): Ignore files ending in ~.
21809         * MODULES.html.sh: Likewise.
21810
21811 2003-01-08  Jim Meyering  <jim@meyering.net>
21812
21813         * lib/full-write.c: Undefine and define-away `const' after inclusion
21814         of errno.h, not before.  Suggestion from Bruno Haible.
21815
21816 2003-01-08  Bruno Haible  <bruno@clisp.org>
21817
21818         * modules/full-read: Depend on full-write.
21819
21820 2003-01-08  Bruno Haible  <bruno@clisp.org>
21821
21822         * lib/safe-read.c: Include specification header first, to ensure its
21823         selfcontainedness.
21824         * lib/full-write.c: Likewise.
21825
21826 2003-01-07  Jim Meyering  <jim@meyering.net>
21827
21828         * lib/full-write.c: Rework so that it may serve to define full_read,
21829         too.
21830         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
21831
21832 2003-01-07  Bruno Haible  <bruno@clisp.org>
21833
21834         * lib/strtoimax.c: Include <stdint.h> as an alternative to
21835         <inttypes.h>.
21836         * lib/xstrtol.h: Likewise.
21837         * lib/xstrtoimax.c: Likewise.
21838         * lib/xstrtoumax.c: Likewise.
21839         * lib/human.h: Likewise.
21840
21841         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
21842         on systems that have <inttypes.h> but not <stdint.h>.
21843
21844 2003-01-07  Bruno Haible  <bruno@clisp.org>
21845
21846         * MODULES.html.sh: Add copyright notice.
21847         (missed_files): Omit CVS directory entries.
21848         (func_module): Make it work with sed-3.02.
21849         * MODULES.txt: Remove file.
21850
21851 2003-01-06  Jim Meyering  <jim@meyering.net>
21852
21853         * lib/version-etc.c: Update year in translatable copyright string.
21854
21855 2003-01-03  Karl Berry  <karl@gnu.org>
21856
21857         * config/config.{guess,sub}: update from prep.
21858
21859 2003-01-02  Karl Berry  <karl@gnu.org>
21860
21861         * doc/COPYING.DOC: belatedly updated to 1.2.
21862
21863 2003-01-01  Karl Berry  <karl@gnu.org>
21864
21865         * gnulib-tool (func_verify_module): report module name $module in
21866         error message, not $1.
21867         * gnulib-tool (create-testdir): don't complain if destdir couldn't
21868         be created, only if it doesn't exist.
21869         * gnulib-tool (last_checkin_date): don't expand the $Date here.
21870
21871 2002-12-31  Paul Eggert  <eggert@twinsun.com>
21872
21873         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
21874
21875 2002-12-31  Paul Eggert  <eggert@twinsun.com>
21876
21877         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
21878         memcmp if strcoll doesn't work.
21879
21880 2002-12-31  Bruno Haible  <bruno@clisp.org>
21881
21882         * lib/utime.c (utime_null): No need to call ftruncate if the file was
21883         nonempty.
21884
21885 2002-12-31  Bruno Haible  <bruno@clisp.org>
21886
21887         * lib/memcoll.c (STRCOLL): New macro.
21888         (memcoll): Use it.
21889
21890 2002-12-31  Bruno Haible  <bruno@clisp.org>
21891
21892         * lib/localcharset.h: New file.
21893         * lib/localcharset.c: Include it.
21894         * lib/unicodeio.c: Likewise.
21895
21896 2002-12-31  Bruno Haible  <bruno@clisp.org>
21897
21898         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
21899         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
21900
21901 2002-12-31  Bruno Haible  <bruno@clisp.org>
21902
21903         * lib/getline.h: Include <stddef.h>, for size_t.
21904
21905         * lib/unicodeio.h: Include <stddef.h>, for size_t.
21906         * lib/unicodeio.c: Don't include <stddef.h>.
21907
21908 2002-12-31  Bruno Haible  <bruno@clisp.org>
21909
21910         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
21911         HAVE_TM_ZONE.
21912
21913 2002-12-24  Karl Berry  <karl@gnu.org>
21914
21915         * config/config.guess: update from prep.
21916
21917 2002-12-24  Bruno Haible  <bruno@clisp.org>
21918
21919         General infrasructure.
21920         * m4/README: Rewritten.
21921         * m4/onceonly.m4: New file.
21922         * m4/onceonly_2_57.m4: New file.
21923
21924         Module atexit.
21925         * m4/atexit.m4: New file.
21926
21927         Module strtod.
21928         * m4/strtod.m4: New file.
21929
21930         Module strtol.
21931         * m4/strtol.m4: New file.
21932
21933         Module strtoul.
21934         * m4/strtoul.m4: New file.
21935
21936         Module memchr.
21937         * m4/memchr.m4: New file.
21938
21939         Module memcmp.
21940         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
21941         (jm_FUNC_MEMCMP): Invoke it.
21942
21943         Module memcpy.
21944         * m4/memcpy.m4: New file.
21945
21946         Module memmove.
21947         * m4/memmove.m4: New file.
21948
21949         Module memset.
21950         * m4/memset.m4: New file.
21951
21952         Module strcspn.
21953         * m4/strcspn.m4: New file.
21954
21955         Module strpbrk.
21956         * m4/strpbrk.m4: New file.
21957
21958         Module strstr.
21959         * m4/strstr.m4: New file.
21960
21961         Module strerror.
21962         * m4/strerror.m4: New file.
21963
21964         Module mktime.
21965         * m4/mktime.m4: Renamed from jm-mktime.m4.
21966         (gl_PREREQ_MKTIME): New macro.
21967         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
21968
21969         Module malloc.
21970         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
21971         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
21972         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
21973
21974         Module realloc.
21975         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
21976         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
21977         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
21978
21979         Module strftime.
21980         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
21981         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
21982         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
21983         gl_TM_GMTOFF.
21984         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
21985
21986         Module xalloc.
21987         * m4/xalloc.m4: New file.
21988
21989         Module alloca.
21990         * m4/alloca.m4: New file.
21991
21992         Module putenv.
21993         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
21994         (jm_FUNC_PUTENV): Invoke it.
21995
21996         Module setenv.
21997         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
21998         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
21999         when invoked twice.
22000         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
22001         gt_FUNC_SETENV.
22002
22003         Module memrchr.
22004         * m4/memrchr.m4: New file.
22005
22006         Module stpcpy.
22007         * m4/stpcpy.m4: New file.
22008
22009         Module strcase.
22010         * m4/strcase.m4: New file.
22011
22012         Module strdup.
22013         * m4/strdup.m4: New file.
22014
22015         Module strnlen.
22016         * m4/strnlen.m4: New file.
22017
22018         Module strndup.
22019         * m4/strndup.m4: New file.
22020
22021         Module xstrtod.
22022         * m4/xstrtod.m4: New file.
22023
22024         Module xstrtol.
22025         * m4/xstrtol.m4: New file.
22026
22027         Module getdate.
22028         * m4/getdate.m4: New file.
22029
22030         Module unlocked-io.
22031         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
22032         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
22033         * m4/jm-glibc-io.m4n: Remove file.
22034
22035         Module long-options.
22036         * m4/long-options.m4: New file.
22037
22038         Module md5.
22039         * m4/md5.m4: New file.
22040
22041         Module sha.
22042         * m4/sha.m4: New file.
22043
22044         Module getstr.
22045         * m4/getstr.m4: New file.
22046
22047         Module getline.
22048         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
22049         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
22050         <sys/types.h>, for size_t. Use the function name gnu_getline, not
22051         simply getline. Infoke gl_PREREQ_GETLINE.
22052
22053         Module obstack.
22054         * m4/obstack.m4: New file.
22055
22056         Module hash.
22057         * m4/hash.m4: New file.
22058
22059         Module readtokens.
22060         * m4/readtokens.m4: New file.
22061
22062         Module strverscmp.
22063         * m4/strverscmp.m4: New file.
22064
22065         Module stdbool.
22066         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
22067         OSF/1.
22068
22069         Module strtoll.
22070         * m4/strtoll.m4: New file.
22071
22072         Module strtoull.
22073         * m4/strtoull.m4: New file.
22074
22075         Module strtoimax.
22076         * m4/strtoimax.m4: New file.
22077
22078         Module strtoumax.
22079         * m4/strtoumax.m4: New file.
22080
22081         Module xstrtoimax.
22082         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
22083         jm_AC_PREREQ_XSTRTOIMAX.
22084         Moved the strtol prerequisites to strtol.m4.
22085         Moved the strtoll prerequisites to strtoll.m4.
22086         Moved the strtoimax prerequisites to strtoimax.m4.
22087
22088         Module xstrtoumax.
22089         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
22090         jm_AC_PREREQ_XSTRTOUMAX.
22091         Moved the strtoul prerequisites to strtoul.m4.
22092         Moved the strtoull prerequisites to strtoull.m4.
22093         Moved the strtoumax prerequisites to strtoumax.m4.
22094
22095         Module chown.
22096         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
22097         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
22098
22099         Module dup2.
22100         * m4/dup2.m4: New file.
22101
22102         Module ftruncate.
22103         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
22104         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
22105
22106         Module getgroups.
22107         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
22108         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
22109
22110         Module gettimeofday.
22111         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
22112         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
22113         gl_PREREQ_GETTIMEOFDAY.
22114
22115         Module mkdir.
22116         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
22117         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
22118
22119         Module mkstemp.
22120         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
22121         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
22122         jm_AC_TYPE_UINTMAX_T.
22123         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
22124
22125         Module stat.
22126         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
22127         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
22128
22129         Module lstat.
22130         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
22131         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
22132
22133         Module timespec.
22134         * m4/timespec.m4 (gl_TIMESPEC): New macro.
22135         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
22136         * m4/st_mtim.m4: Indentation.
22137
22138         Module nanosleep.
22139         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
22140         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
22141         gl_PREREQ_NANOSLEEP.
22142
22143         Module regex.
22144         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
22145         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
22146         (gl_REGEX): New macro.
22147
22148         Module rename.
22149         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
22150         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
22151
22152         Module rmdir.
22153         * m4/rmdir.m4: New file.
22154
22155         Module utime.
22156         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
22157         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
22158         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
22159
22160         Module dirname.
22161         * m4/dirname.m4: New file.
22162
22163         Module getopt.
22164         * m4/getopt.m4: New file.
22165
22166         Module unistd-safer.
22167         * m4/unistd-safer.m4: New file.
22168
22169         Module fnmatch.
22170         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
22171         declaration.
22172         (gl_PREREQ_FNMATCH_EXTRA): New macro.
22173         (gl_FUNC_FNMATCH_POSIX): New macro.
22174         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
22175         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
22176         simply fnmatch.
22177
22178         Module exclude.
22179         * m4/exclude.m4: New file.
22180
22181         Module human.
22182         * m4/human.m4: New file.
22183
22184         Module acl.
22185         * m4/acl.m4: Nop.
22186
22187         Module backupfile.
22188         * m4/backupfile.m4: New file.
22189         * m4/d-ino.m4: Indentation.
22190
22191         Module fsusage.
22192         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
22193         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
22194         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
22195
22196         Module dirfd.
22197         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
22198         requirements.
22199
22200         Module euidaccess.
22201         * m4/euidaccess.m4: New file.
22202
22203         Module file-type.
22204         * m4/file-type.m4: New file.
22205
22206         Module fileblocks.
22207         * m4/fileblocks.m4: New file.
22208
22209         Module filemode.
22210         * m4/filemode.m4: New file.
22211
22212         Module isdir.
22213         * m4/isdir.m4: New file.
22214
22215         Module lchown.
22216         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
22217         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
22218
22219         Module makepath.
22220         * m4/makepath.m4: New file.
22221
22222         Module modechange.
22223         * m4/modechange.m4: New file.
22224
22225         Module mountlist.
22226         * m4/mountlist.m4: New file.
22227         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
22228         Indentation.
22229
22230         Module path-concat.
22231         * m4/path-concat.m4: New file.
22232
22233         Module pathmax.
22234         * m4/pathmax.m4: New file.
22235
22236         Module same.
22237         * m4/same.m4: New file.
22238
22239         Module save-cwd.
22240         * m4/save-cwd.m4: New file.
22241
22242         Module savedir.
22243         * m4/savedir.m4: New file.
22244
22245         Module xgetcwd.
22246         * m4/xgetcwd.m4: New file.
22247         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
22248
22249         Module xreadlink.
22250         * m4/xreadlink.m4: New file.
22251
22252         Module safe-read.
22253         * m4/safe-read.m4: New file.
22254
22255         Module safe-write.
22256         * m4/safe-write.m4: New file.
22257
22258         Module closeout.
22259         * m4/closeout.m4: New file.
22260
22261         Module stdio-safer.
22262         * m4/stdio-safer.m4: New file.
22263
22264         Module getpass.
22265         * m4/getpass.m4: New file.
22266
22267         Module getugroups.
22268         * m4/getugroups.m4: New file.
22269
22270         Module group-member.
22271         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
22272         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
22273
22274         Module idcache.
22275         * m4/idcache.m4: New file.
22276
22277         Module userspec.
22278         * m4/userspec.m4: New file.
22279
22280         Module gettime.
22281         * m4/clock_time.m4: New file.
22282         * m4/gettime.m4: New file.
22283
22284         Module settime.
22285         * m4/settime.m4: New file.
22286
22287         Module posixtm.
22288         * m4/posixtm.m4: New file.
22289
22290         Module gethostname.
22291         * m4/gethostname.m4: New file.
22292
22293         Module canon-host.
22294         * m4/canon-host.m4: New file.
22295
22296         Module gettext.
22297         * m4/codeset.m4: New file, from gettext-0.11.5.
22298         * m4/gettext.m4: New file, from gettext-0.11.5.
22299         * m4/glibc21.m4: New file, from gettext-0.11.5.
22300         * m4/iconv.m4: New file, from gettext-0.11.5.
22301         * m4/intdiv0.m4: New file, from gettext-0.11.5.
22302         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
22303         * m4/inttypes.m4: New file, from gettext-0.11.5.
22304         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
22305         * m4/isc-posix.m4: New file, from gettext-0.11.5.
22306         * m4/lcmessage.m4: New file, from gettext-0.11.5.
22307         * m4/lib-ld.m4: New file, from gettext-0.11.5.
22308         * m4/lib-link.m4: New file, from gettext-0.11.5.
22309         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
22310         * m4/progtest.m4: New file, from gettext-0.11.5.
22311         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
22312         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
22313         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
22314
22315         Module localcharset.
22316         * m4/localcharset.m4: New file.
22317
22318         Module hard-locale.
22319         * m4/hard-locale.m4: New file.
22320
22321         Module mbswidth.
22322         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
22323         onceonly macros.
22324         * m4/mbrtowc.m4: Add comment.
22325
22326         Module memcasecmp.
22327         * m4/memcasecmp.m4: New file.
22328
22329         Module memcoll.
22330         * m4/memcoll.m4: New file.
22331
22332         Module unicodeio.
22333         * m4/unicodeio.m4: New file.
22334
22335         Module rpmatch.
22336         * m4/rpmatch.m4: New file.
22337
22338         Module yesno.
22339         * m4/yesno.m4: New file.
22340
22341         Module exitfail.
22342         * m4/exitfail.m4: New file.
22343
22344         Module c-stack.
22345         * m4/c-stack.m4 (gl_C_STACK): New macro.
22346         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
22347
22348         Module error.
22349         * m4/error.m4 (gl_ERROR): New macro.
22350         (jm_PREREQ_ERROR): Use onceonly macros.
22351
22352         Module fatal.
22353         * m4/fatal.m4: New file.
22354
22355         Module getloadavg.
22356         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
22357         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
22358
22359         Module getpagesize.
22360         * m4/getpagesize.m4: New file.
22361
22362         Module getusershell.
22363         * m4/getusershell.m4: New file.
22364
22365         Module physmem.
22366         * m4/physmem.m4: New file.
22367
22368         Module posixver.
22369         * m4/posixver.m4: New file.
22370
22371         Module quotearg.
22372         * m4/quotearg.m4: New file.
22373
22374         Module quote.
22375         * m4/quote.m4: New file.
22376
22377         Module readutmp.
22378         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
22379
22380         Module sig2str.
22381         * m4/sig2str.m4: New file.
22382
22383         Other.
22384         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
22385         ulonglong.m4.
22386         * m4/intmax_t.m4: New file.
22387         * m4/d-type.m4: Indentation.
22388         * m4/jm-macros.m4: Update.
22389         * m4/prereq.m4 (jm_PREREQ): Update.
22390         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
22391         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
22392         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
22393         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
22394         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
22395         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
22396         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
22397         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
22398         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
22399         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
22400         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
22401         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
22402         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
22403         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
22404         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
22405         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
22406         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
22407         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
22408         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
22409
22410 2002-12-24  Bruno Haible  <bruno@clisp.org>
22411
22412         * MODULES.txt: Update according to m4/ changes.
22413
22414         Module gettext.
22415         * config.rpath: New file, from gettext-0.11.5.
22416
22417         * modules/*: New module descriptions.
22418         * gnulib-tool: New file.
22419         * MODULES.html.sh: New file.
22420
22421 2002-12-21  Karl Berry  <karl@gnu.org>
22422
22423         * doc/fdl.texi: update to version 1.2.
22424
22425 2002-12-19  Karl Berry  <karl@gnu.org>
22426
22427         * config/config.guess: update from prep.
22428
22429 2002-12-18  Bruno Haible  <bruno@clisp.org>
22430
22431         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
22432         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
22433
22434 2002-12-17  Bruno Haible  <bruno@clisp.org>
22435
22436         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
22437         stdlib.h, string.h.
22438
22439 2002-12-17  Bruno Haible  <bruno@clisp.org>
22440
22441         * lib/canon-host.c (strdup): Remove unused declaration.
22442
22443         * lib/fsusage.c: Include full_read.h.
22444         (get_fs_usage): Use full_read instead of safe_read.
22445
22446         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
22447
22448 2002-12-12  Karl Berry  <karl@gnu.org>
22449
22450         * config/config.guess: update from prep.
22451
22452 2002-12-11  Bruno Haible  <bruno@clisp.org>
22453
22454         * m4/setenv.m4: New file, from gettext-0.11.5.
22455
22456 2002-12-11  Bruno Haible  <bruno@clisp.org>
22457
22458         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
22459         not unsetenv().
22460         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
22461         modifications:
22462
22463         2002-12-11  Bruno Haible  <bruno@clisp.org>
22464
22465                 * setenv.c (alloca): Fall back to malloc.
22466                 (freea): New macro.
22467                 (setenv): Use freea() to free memory allocated with alloca().
22468
22469         2002-11-13  Bruno Haible  <bruno@clisp.org>
22470
22471                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
22472                 function declarations.
22473                 * unsetenv.c (unsetenv): Likewise.
22474
22475         2002-03-04  Bruno Haible  <bruno@clisp.org>
22476
22477                 Portability to AIX 4.3.3.
22478                 * unsetenv.c: New file, extracted from setenv.c.
22479                 * setenv.c: Move the unsetenv() function to unsetenv.c.
22480
22481         2001-12-20  Bruno Haible  <bruno@clisp.org>
22482
22483                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
22484                 use malloc instead. For SunOS 4.
22485
22486         2001-12-11  Bruno Haible  <bruno@clisp.org>
22487
22488                 * setenv.c: Declare alloca.
22489                 (compar_fn_t): New typedef.
22490                 (KNOWN_VALUE, STORE_VALUE): Use it.
22491
22492         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
22493         setenv.h.
22494
22495 2002-12-10  Paul Eggert  <eggert@twinsun.com>
22496
22497         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
22498         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
22499         Choose values that are less likely to collide with system fnmatch
22500         options.
22501         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
22502         defined (e.g., a pure POSIX system).
22503         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
22504         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
22505
22506 2002-12-06  Paul Eggert  <eggert@twinsun.com>
22507
22508         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
22509         a pain in practice to deal with generated m4 files.  This change
22510         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
22511
22512         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
22513         and jm-glibc-io.m4, as they are no longer a special case.
22514         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
22515         kludge and the auto-generation stuff.  Check only whether the
22516         functions are declared, not whether they exist, since older hosts
22517         that don't declare the functions can't use the optimization anyway.
22518
22519 2002-12-06  Jim Meyering  <jim@meyering.net>
22520
22521         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
22522
22523         Merge in changes from libc's misc/error.c, in preparation
22524         for the merge of gnulib's changes back into libc.
22525
22526         * lib/error.c (_): Define only if not already defined.
22527         Move definition to follow all #include directives.
22528         Include unlocked-io.h only if !_LIBC.
22529         [_LIBC]: Include <libio/libioP.h>.
22530         [USE_IN_LIBIO]: Include <libio/iolibio.h>
22531         (fflush): Tweak definition to use INTUSE.
22532         (putc): Define.
22533
22534 2002-12-05  Paul Eggert  <eggert@twinsun.com>
22535
22536         * lib/alloca.c [defined emacs]: Include "lisp.h".
22537         (xalloc_die) [defined emacs]: New macro.
22538         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
22539         [! defined emacs]: Include <xalloc.h>.
22540         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
22541         (pointer): Typedef to POINTER_TYPE *.
22542         (malloc): Remove decl; we now always use xmalloc.
22543         (alloca): Use old-style definition, since Emacs needs this.
22544         Check for arithmetic overflow when computing combined size.
22545
22546 2002-12-04  Paul Eggert  <eggert@twinsun.com>
22547
22548         Do not generate unlocked-io.h automatically, since it's easier to
22549         maintain it by hand.
22550
22551         * lib/unlocked-io.h: New file, from GNU diffutils,
22552         but with proper copyright notice and attribution.
22553         * lib/gen-uio: Remove.
22554         * lib/Makefile.am: Add copyright notice.
22555         (libfetish_a_SOURCES): Add unlocked-io.h.
22556         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
22557         (DISTCLEANFILES, io_functions): Remove macros.
22558         (EXTRA_DIST): Remove gen_uio.
22559         (unlocked-io.h): Remove rule.
22560
22561 2002-12-04  Jim Meyering  <jim@meyering.net>
22562
22563         Reflect the fact that stat.c and lstat.c are no longer generated.
22564         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
22565         (DISTCLEANFILES): Likewise.
22566         (EXTRA_DIST): Likewise.
22567         (all_local): Don't depend on stat.c or lstat.c.
22568         (stat.c, lstat.c): Remove rules.
22569         (EXTRA_DIST): Remove xstat.in.
22570
22571         * lib/xstat.in: Remove file.  Contents moved into stat.c.
22572         * lib/stat.c: New file.  Contents mostly from xstat.in.
22573         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
22574         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
22575
22576         * lib/safe-read.c: Rework so that it may serve to define safe_write,
22577         too.
22578         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
22579
22580 2002-12-03  Jim Meyering  <jim@meyering.net>
22581
22582         * lib/safe-read.c, safe-write.c: Change variable names and comments,
22583         but not semantics, to minimize the differences between these two files.
22584         (safe_read): Change comment to mention SAFE_READ_ERROR.
22585
22586         * lib/safe-read.c (IS_EINTR): Define.
22587         (safe_read): Use IS_EINTR in place of in-function cpp directives.
22588
22589 2002-12-02  Jim Meyering  <jim@meyering.net>
22590
22591         * lib/safe-read.c (EINTR): Define.
22592         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
22593         (INT_MAX): Provide fallback.
22594         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
22595
22596         * lib/safe-read.h (SAFE_READ_ERROR): Define.
22597
22598 2002-12-02  Bruno Haible  <bruno@clisp.org>
22599
22600         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
22601         Define, taken from safe-read.c.
22602         (INT_MAX): Provide fallback.
22603         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
22604         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
22605
22606         * lib/safe-read.c (EINTR): Remove definition.
22607         (safe_read): Don't use EINTR if it is absent.
22608
22609 2002-12-01  Jim Meyering  <jim@meyering.net>
22610
22611         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
22612         zero.
22613         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
22614
22615 2002-11-27  Paul Eggert  <eggert@twinsun.com>
22616
22617         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
22618         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
22619         with `if (! (value < limit)) abort ();', for readability.
22620
22621 2002-11-26  Karl Berry  <karl@gnu.org>
22622
22623         * lib/strdup.c: copy from libc again, with jim's ok.
22624         * lib/.cppi-disable: re-add strdup.c
22625
22626 2002-11-25  Karl Berry  <karl@gnu.org>
22627
22628         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
22629         instead of "strtol.c".
22630
22631 2002-11-25  Karl Berry  <karl@gnu.org>
22632
22633         * config/install-sh: update from automake for variable quoting, $0 in
22634         error msgs, etc.
22635
22636         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
22637         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
22638         entry.
22639
22640 2002-11-25  Jim Meyering  <jim@meyering.net>
22641
22642         * lib/mktime.c: Sync from libc, now that it has the latest fix.
22643
22644 2002-11-24  Karl Berry  <karl@gnu.org>
22645
22646         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
22647         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
22648
22649 2002-11-24  Jim Meyering  <jim@meyering.net>
22650
22651         Update from coreutils:
22652
22653         * lib/mktime.c: Merge in changes from libc.
22654
22655         Avoid a link-time failure on some Linux systems.
22656         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
22657         (otherwise).
22658         (__mon_yday): Declare with the STATIC attribute.
22659         (__mktime_internal): Likewise.
22660         Based on a report from Greg Schafer.
22661
22662 2002-11-23  Jim Meyering  <jim@meyering.net>
22663
22664         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
22665         Use `unsigned', not `int', as type of index.
22666
22667         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
22668
22669         * lib/fsusage.c: Remove unneeded parentheses around operands of
22670         `defined'.
22671
22672 2002-11-22  Paul Eggert  <eggert@twinsun.com>
22673
22674         * lib/quotearg.h: Allow multiple inclusion by surrounding with
22675         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
22676         so that we can be included first.
22677         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
22678         * lib/quotearg.c: Include quotearg.h immediately after config.h.
22679         No need to include stddef.h or sys/types.h any more.
22680         Surround local include files with "", not "<>".
22681         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
22682         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
22683         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
22684         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
22685         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
22686         (ISPRINT): Remove; no longer needed now that we assume C89.
22687
22688         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
22689         Preserve errno.
22690
22691         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
22692         quotearg_char): Use SIZE_MAX rather than
22693         (size_t) -1 when we are talking about "infinity".
22694
22695         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
22696
22697 2002-11-22  Paul Eggert  <eggert@twinsun.com>
22698
22699         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
22700         hint that one should use `if (! x) abort ();' rather than `assert
22701         (x);', and anyway it's one less thing to worry about configuring.
22702         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
22703         hash_rehash, hash_insert): Use abort rather than assert.
22704
22705 2002-11-22  Bruno Haible  <bruno@clisp.org>
22706
22707         * lib/safe-read.h: Assume C89. Add comments.
22708         (safe_read): Change return type to size_t.
22709         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
22710         byte counts > SSIZE_MAX correctly.
22711         * lib/safe-write.h: New file.
22712         * lib/safe-write.c: New file.
22713         * lib/full-read.h: New file.
22714         * lib/full-read.c: New file.
22715         * lib/full-write.h: Assume C89. Add comments.
22716         * lib/full-write.c: Include safe-write.h.
22717         (full_write): Rewritten to use safe_write.
22718         Suggested by Jim Meyering and Paul Eggert.
22719
22720 2002-11-21  Jim Meyering  <jim@meyering.net>
22721
22722         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
22723
22724         Merge in changes from the coreutils.
22725
22726         2002-09-25  Paul Eggert  <eggert@twinsun.com>
22727         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
22728         <stdint.h>.
22729         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
22730         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
22731         int.  Work more efficiently if X is the same width as uintmax_t.
22732         Do not compare X to -1, to avoid bogus compiler warning.
22733         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
22734         Don't assume that f_frsize and f_bsize are the same type.
22735
22736         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
22737         warning on FreeBSD.
22738
22739         * lib/makepath.c (make_path): Restore umask *before* creating the final
22740         component.
22741         (make_path): Minor reformatting.
22742
22743         * lib/xmalloc.c: Adjust to work with new autoconf macros,
22744         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
22745         HAVE_MALLOC/HAVE_REALLOC.
22746
22747         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
22748         dummy ones.  At least on GNU/Linux systems, `auto' means something
22749         else.
22750         From Michael Stone.
22751
22752 2002-11-21  Bruno Haible  <bruno@clisp.org>
22753
22754         Remove case insensitive option matching.
22755         * lib/argmatch.h (argcasematch): Remove declaration.
22756         (ARGCASEMATCH): Remove macro.
22757         (__xargmatch_internal): Remove case_sensitive argument.
22758         (XARGMATCH): Update.
22759         (XARGCASEMATCH): Remove macro.
22760         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
22761         case_sensitive argument.
22762         (argcasematch): Remove function.
22763         (__xargmatch_internal): Remove case_sensitive argument.
22764         (main): Use XARGMATCH instead of XARGCASEMATCH.
22765
22766         * lib/xmalloc.c: Change compile-time error message. Add comment about
22767         required autoconf version.
22768
22769 2002-11-20  Paul Eggert  <eggert@twinsun.com>
22770
22771         Merge argmatch cleanups from Bison.  Assume C89.
22772
22773         * lib/argmatch.c: Include config.h here, not in argmatch.h.
22774         Include stdlib.h, for EXIT_FAILURE.
22775         Always include <string.h>, since we assume C89.
22776         (EXIT_FAILURE): Remove pre-C89 bug workaround.
22777         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
22778         Include <stddef.h> instead, since it's all we need for size_t.
22779         (PARAMS): Remove.  All uses removed.
22780         (ARRAY_CARDINALITY): Do not bother to #undef.
22781         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
22782         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
22783         Remove unnecessary parentheses.
22784         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
22785         Insert necessary parentheses.
22786         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
22787         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
22788
22789 2002-11-19  Bruno Haible  <bruno@clisp.org>
22790
22791         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
22792         * lib/mbswidth.h: Include <stddef.h>, for size_t.
22793
22794         * lib/mbswidth.h (PARAMS): Remove macro.
22795         (mbswidth, mbsnwidth): Use ANSI C function declarations.
22796         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
22797
22798         * lib/gcd.h (PARAMS): Remove macro.
22799         (gcd): Use ANSI C function declarations.
22800         * lib/gcd.c (gcd): Likewise.
22801
22802 2002-11-15  Bruno Haible  <bruno@clisp.org>
22803
22804         * lib/strcspn.c: Include <stddef.h>.
22805         (strcspn): Use ANSI C function declaration. Change return type to
22806         size_t. Use NULL.
22807         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
22808         (strpbrk): Use NULL.
22809         * lib/strpbrk.h (PARAMS): Remove macro.
22810         (strpbrk): Use ANSI C function declaration.
22811         * lib/strstr.c: Don't include <sys/types.h>.
22812         * lib/strstr.h (PARAMS): Remove macro.
22813         (strstr): Use ANSI C function declarations.
22814
22815 2002-11-14  Karl Berry  <karl@gnu.org>
22816
22817         * config/mkinstalldirs: `do' on separate line, instead of
22818         `for var; do'.
22819
22820 2002-11-06  Bruno Haible  <bruno@clisp.org>
22821
22822         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
22823         * lib/gcd.c (gcd): Likewise.
22824
22825 2002-11-05  Bruno Haible  <bruno@clisp.org>
22826
22827         * lib/gcd.h: New file, from gettext-0.11.5.
22828         * lib/gcd.c: New file, from gettext-0.11.5.
22829
22830 2002-11-05  Bruno Haible  <bruno@clisp.org>
22831
22832         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22833         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22834         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22835         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22836
22837         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
22838         <libintl.h>.
22839         * lib/makepath.c: Include gettext.h instead of <locale.h> and
22840         <libintl.h>.
22841
22842         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
22843         * lib/human.c: Include gettext.h instead of <libintl.h>.
22844         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
22845         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
22846         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
22847         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
22848         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
22849         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
22850         (textdomain): Remove definition.
22851         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
22852
22853         * lib/long-options.c: Remove include of <libintl.h> and definition of
22854         _.
22855         * lib/same.c: Remove include of <libintl.h> and definition of _.
22856
22857 2002-11-04  Owen Taylor  <otaylor@redhat.com>
22858
22859         * lib/config.charset: A few additions for Solaris.
22860
22861 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
22862
22863         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
22864         * lib/localcharset.c (locale_charset): Declare as extern "C".
22865
22866 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
22867
22868         * lib/config.charset: msdos in uk_UA uses CP1125.
22869
22870 2002-11-04  Bruno Haible  <bruno@clisp.org>
22871
22872         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
22873         * lib/strcase.h: New file, from GNU gettext-0.11.5.
22874         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
22875         * lib/strstr.h: New file, from GNU gettext-0.11.5.
22876         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
22877
22878 2002-11-04  Bruno Haible  <bruno@clisp.org>
22879
22880         * lib/localcharset.c (locale_charset): Don't return an empty string.
22881
22882 2002-11-04  Bruno Haible  <bruno@clisp.org>
22883
22884         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
22885         aliases.
22886
22887 2002-11-04  Bruno Haible  <bruno@clisp.org>
22888
22889         * lib/config.charset: Update for newest glibc. Add canonical names
22890         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
22891
22892 2002-11-04  Bruno Haible  <bruno@clisp.org>
22893
22894         * lib/config.charset: Add support for NetBSD.
22895
22896 2002-11-04  Bruno Haible  <bruno@clisp.org>
22897
22898         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
22899
22900 2002-11-01  Bruno Haible  <bruno@clisp.org>
22901
22902         * configure.in: Add AC_CONFIG_AUX_DIR call.
22903         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
22904         test/Makefile.
22905         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
22906
22907 2002-09-28  Karl Berry  <karl@gnu.org>
22908
22909         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
22910         installed automake until the next release, since changes have been
22911         made.
22912
22913 2002-09-25  Karl Berry  <karl@gnu.org>
22914
22915         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
22916         * lib/getopt*: copy from libc/posix.
22917         * lib/gettext.h: copy from gettext.
22918         * lib/.cppi-disable: add strdup.c, gettext.h.
22919
22920 2002-09-25  Karl Berry  <karl@gnu.org>
22921
22922         * config/srclist.txt: enable gettext.h check.
22923         * config/config.{guess,sub}: update from prep.
22924         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
22925                 from automake 1.6.3.
22926         See srclist*.
22927
22928 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
22929
22930         * regex.c (PATFETCH): Remove the translating fetch.
22931         (PATFETCH_RAW): Rename to PATFETCH.
22932         (set_image_of_range): New fun.
22933         (SET_RANGE_TABLE_WORK_AREA): Use it.
22934         (regex_compile): Don't translate the pattern chars so eagerly.
22935         Only do it when inserting an `exactn' bytecode or when handling
22936         a char-range.
22937         (mutually_exclusive_p): Avoid empty statement.
22938
22939 2002-07-06  Jim Meyering  <meyering@lucent.com>
22940
22941         * m4/README: Don't mention Makefile.am.in.
22942         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
22943
22944 2002-07-01  Jim Meyering  <meyering@lucent.com>
22945
22946         * lib/c-stack.c: Include sys/time.h.
22947         From Volker Borchert.
22948
22949 2002-06-26  Paul Eggert  <eggert@twinsun.com>
22950
22951         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
22952
22953 2002-06-26  Paul Eggert  <eggert@twinsun.com>
22954
22955         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
22956         New macro.  Use it uniformly instead of
22957         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
22958         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
22959         reported by Vin Shelton.
22960
22961 2002-06-22  Paul Eggert  <eggert@twinsun.com>
22962
22963         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
22964         Do not assume SA_SIGINFO behavior.
22965         Bug reported by Jim Meyering on NetBSD 1.5.2.
22966
22967 2002-06-22  Jim Meyering  <meyering@lucent.com>
22968
22969         * m4/c-stack.m4: New file, from diffutils-2.8.2.
22970         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
22971
22972         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
22973         now that configure.ac uses AC_GNU_SOURCE.
22974         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
22975         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
22976
22977         Update to latest tools.  Suggestions from Paul Eggert.
22978         * m4/stdbool.m4: New file, from diffutils-2.8.2.
22979         * m4/gnu-source.m4: Update from diffutils-2.8.2.
22980         * m4/fnmatch.m4: Likewise.
22981         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
22982         to AC_HEADER_STDBOOL
22983
22984 2002-06-22  Jim Meyering  <meyering@lucent.com>
22985
22986         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
22987         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
22988
22989 2002-06-22  Jim Meyering  <meyering@lucent.com>
22990
22991         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
22992
22993         * lib/exitfail.c, exitfail.h: Likewise.
22994         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
22995
22996         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
22997         of fnmatch.h.
22998         (EXTRA_DIST): Add fnmatch_loop.c.
22999         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
23000
23001         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
23002         * lib/fnmatch.c: Update from diffutils-2.8.2.
23003         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
23004         * lib/fnmatch.h: Remove file.
23005
23006 2002-06-21  Jim Meyering  <meyering@lucent.com>
23007
23008         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
23009         * m4/mbrtowc.m4: Likewise.
23010
23011         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
23012         * m4/mbswidth.m4: Reflect name change:
23013         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
23014         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
23015
23016         * m4/lib-link.m4: Update from gettext-0.11.2.
23017         * m4/gettext.m4: Likewise.
23018
23019         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
23020         From Alfred M. Szmidt.
23021
23022 2002-06-18  Paul Eggert  <eggert@twinsun.com>
23023
23024         * lib/file-type.h: Report an error if neither S_ISREG nor
23025         S_IFREG is defined, instead of using a test specific to glibc
23026         2.2.  This should be safe, since POSIX requires S_ISREG and
23027         Unix Version 7 had S_IFREG.  We don't need to check for
23028         <sys/types.h> since we don't use any symbols that it defines.
23029
23030 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
23031
23032         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
23033         $@-t, so that each temporary file name is unique and valid in the first
23034         8 characters, for operation under DOS.
23035
23036 2002-06-15  Paul Eggert  <eggert@twinsun.com>
23037
23038         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
23039
23040 2002-06-15  Jim Meyering  <meyering@lucent.com>
23041
23042         Work even with DJGPP 2.03, which lacks support for symlinks.
23043         From Richard Dawe.
23044         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
23045         is defined.
23046         * lib/lchown.c (S_ISLNK): Likewise.
23047
23048 2002-06-15  Jim Meyering  <meyering@lucent.com>
23049
23050         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
23051         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
23052         have been included before this file.
23053
23054 2002-06-14  Jim Meyering  <meyering@lucent.com>
23055
23056         * lib/file-type.h: Use the version from diffutils-2.8.2.
23057         * lib/file-type.c: Likewise.
23058
23059 2002-06-07  Jim Meyering  <meyering@lucent.com>
23060
23061         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
23062         They're needed at least for NetBSD 1.5.2.
23063         ($statxfs_includes): Include those same headers.
23064         ($statxfs_includes): Include sys/vfs.h if available.
23065         ($statxfs_includes): Likewise for sys/statvfs.h.
23066         Check for the following members in both structs statfs and statvfs:
23067         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
23068
23069 2002-06-01  Jim Meyering  <meyering@lucent.com>
23070
23071         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
23072         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
23073
23074 2002-05-28  Jim Meyering  <meyering@lucent.com>
23075
23076         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
23077         Reported by Volker Borchert.
23078
23079 2002-05-27  Jim Meyering  <meyering@lucent.com>
23080
23081         Fix a problem seen only on nonconforming systems whereby ls.c's
23082         use of localtime, and then of gettimeofday would cause trouble:
23083         the localtime call used to initialize rpl_gettimeofday's save
23084         mechanism would clobber ls's current local time information so
23085         that in any long listing the first file would always be listed
23086         with date 1970-01-01.  Analysis by Volker Borchert.
23087
23088         * lib/gettimeofday.c (localtime): Undefine.
23089         (rpl_localtime): New function.
23090
23091 2002-05-27  Jim Meyering  <meyering@lucent.com>
23092
23093         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
23094         localtime.
23095
23096         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
23097         use the replacement function; it wouldn't resolve at link time.
23098         Reported by Volker Borchert.
23099
23100 2002-05-22  Jim Meyering  <meyering@lucent.com>
23101
23102         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
23103         file-type.h.
23104         * lib/file-type.h: New file.
23105         * lib/file-type.c (file_type): New file/function.  Extracted from
23106         diffutils.
23107
23108 2002-04-30  Jim Meyering  <meyering@lucent.com>
23109
23110         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
23111
23112 2002-04-29  Paul Eggert  <eggert@twinsun.com>
23113
23114         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
23115
23116 2002-04-29  Paul Eggert  <eggert@twinsun.com>
23117
23118         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
23119         Do not check for alloca.h (no longer used) or stdbool.h (was never
23120         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
23121
23122 2002-04-29  Paul Eggert  <eggert@twinsun.com>
23123
23124         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
23125
23126 2002-04-29  Jim Meyering  <meyering@lucent.com>
23127
23128         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
23129         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
23130         Use AC_FUNC_STRNLEN here instead.
23131
23132         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
23133         With autoconf-2.53a, it's part of AC_PROG_CC.
23134
23135 2002-04-28  Paul Eggert  <eggert@twinsun.com>
23136
23137         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
23138         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
23139
23140 2002-04-28  Paul Eggert  <eggert@twinsun.com>
23141
23142         * lib/sig2str.h, lib/sig2str.c: New files.
23143         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
23144
23145 2002-04-28  Paul Eggert  <eggert@twinsun.com>
23146
23147         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
23148         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
23149         of 127, since 64 is the largest conceivable number for ancient
23150         nonstandard hosts.
23151         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
23152
23153 2002-04-28  Jim Meyering  <meyering@lucent.com>
23154
23155         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
23156
23157 2002-04-24  Jim Meyering  <meyering@lucent.com>
23158
23159         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
23160         (jm_PREREQ): Use it.
23161
23162         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
23163         mach/mach.h fcntl.h.
23164         Check for this function: setlocale.
23165
23166 2002-04-24  Jim Meyering  <meyering@lucent.com>
23167
23168         * lib/gettext.h: New file, from Gettext.
23169         * lib/Makefile.am (INCLUDES): Remove -I../intl.
23170         (libfetish_a_SOURCES): Add gettext.h.
23171
23172 2002-04-16  Jim Meyering  <meyering@lucent.com>
23173
23174         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
23175         ut_pid, ut_id, ut_exit.
23176
23177 2002-04-16  Jim Meyering  <meyering@lucent.com>
23178
23179         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
23180         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
23181         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
23182
23183 2002-04-12  Jim Meyering  <meyering@lucent.com>
23184
23185         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
23186         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
23187         existence of the getmntinfo function.  Needed for Darwin 5.3.
23188
23189         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
23190         This is necessary at least on Darwin 5.3.
23191
23192         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
23193         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
23194         strnlen.o in the library, and that makes some versions of ranlib
23195         object.
23196
23197 2002-04-12  Jim Meyering  <meyering@lucent.com>
23198
23199         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
23200
23201 2002-04-09  Jim Meyering  <meyering@lucent.com>
23202
23203         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
23204         to be more precise.  Rather than saying we're checking whether the
23205         function `works', say what we're testing.
23206         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
23207         Reported by Bruno Haible.
23208
23209 2002-03-10  Jim Meyering  <meyering@lucent.com>
23210
23211         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
23212         Suggestion from Santiago Vila.
23213
23214 2002-03-08  Jim Meyering  <meyering@lucent.com>
23215
23216         * lib/rename.c: Mention that this wrapper is needed also on
23217         mips-dec-ultrix4.4 systems.
23218
23219 2002-03-02  Jim Meyering  <meyering@lucent.com>
23220
23221         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
23222         not HAVE_CLOCK_SETTIME.
23223
23224 2002-02-27  Paul Eggert  <eggert@twinsun.com>
23225
23226         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
23227         Check for clock_settime.
23228
23229 2002-02-27  Paul Eggert  <eggert@twinsun.com>
23230
23231         * lib/nanosleep.h: Rename to....
23232         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
23233
23234         * lib/gettime.c: New file.
23235         * lib/settime.c: New file.
23236         * lib/stime.c: Remove.
23237
23238         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
23239         timespec.h.  Remove nanosleep.h.
23240
23241 2002-02-25  Paul Eggert  <eggert@twinsun.com>
23242
23243         * m4/acl.m4: New file.
23244         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
23245         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
23246
23247 2002-02-25  Paul Eggert  <eggert@twinsun.com>
23248
23249         * lib/acl.c, lib/acl.h: New files.
23250         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
23251
23252 2002-02-24  Jim Meyering  <meyering@lucent.com>
23253
23254         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
23255         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
23256         cause trouble.  Reported by Nelson Beebe.
23257
23258 2002-02-23  Paul Eggert  <eggert@twinsun.com>
23259
23260         * lib/path-concat.c (xpath_concat): Reorder code to pacify
23261         compilers that don't know that xalloc_die never returns.
23262
23263 2002-02-20  Jim Meyering  <meyering@lucent.com>
23264
23265         * lib/getdate.c: Regenerate using bison-1.33.
23266
23267 2002-02-17  Jim Meyering  <meyering@lucent.com>
23268
23269         * config/config.guess (main): Don't use `head -1'; it's no longer
23270         portable. Use `sed 1q' instead.
23271
23272 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
23273
23274         * m4/codeset.m4: Upgrade to gettext-0.11.
23275         * m4/gettext.m4: Upgrade to gettext-0.11.
23276         * m4/glibc21.m4: Upgrade to gettext-0.11.
23277         * m4/iconv.m4: Upgrade to gettext-0.11.
23278         * m4/isc-posix.m4: Upgrade to gettext-0.11.
23279         * m4/lcmessage.m4: Upgrade to gettext-0.11.
23280         * m4/lib-ld.m4: New file, from gettext-0.11.
23281         * m4/lib-link.m4: New file, from gettext-0.11.
23282         * m4/lib-prefix.m4: New file, from gettext-0.11.
23283         * m4/progtest.m4: Upgrade to gettext-0.11.
23284
23285 2002-02-15  Paul Eggert  <eggert@twinsun.com>
23286
23287         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
23288         (jm_PREREQ): Use it.
23289
23290 2002-02-15  Paul Eggert  <eggert@twinsun.com>
23291
23292         * lib/posixver.c, lib/posixver.h: New files.
23293         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
23294
23295 2002-02-02  Paul Eggert  <eggert@twinsun.com>
23296             Bruno Haible  <bruno@clisp.org>
23297
23298         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
23299         (fwrite_success_callback): New declaration.
23300         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
23301         print_unicode_char. Call failure callback instead of error.
23302         (fwrite_success_callback): New function.
23303         (exit_failure_callback): New function.
23304         (fallback_failure_callback): New function.
23305         (print_unicode_char): Call unicode_to_mb.
23306
23307 2002-01-26  Jim Meyering  <meyering@lucent.com>
23308
23309         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
23310         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
23311
23312 2002-01-26  Jim Meyering  <meyering@lucent.com>
23313
23314         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
23315
23316 2002-01-22  Paul Eggert  <eggert@twinsun.com>
23317
23318         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
23319
23320 2002-01-22  Jim Meyering  <meyering@lucent.com>
23321
23322         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
23323         Otherwise, some versions of automake would omit the rule that makes
23324         Makefile from Makefile.in.
23325
23326 2002-01-21  Paul Eggert  <eggert@twinsun.com>
23327
23328         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
23329         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
23330         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
23331         (memcoll): Set errno to zero if there is no error.
23332
23333         * lib/quotearg.c (quotearg_buffer_restyled):
23334         Fix bug with quoting buffers containing NUL when backslashing escapes.
23335         This bug was exposed by the other changes in this patch.
23336         (quotearg_n_options): New arg ARGSIZE.
23337         All callers changed.
23338         (quoting_options_from_style): New function.
23339         (quotearg_n_style): Use it.
23340         (quotearg_n_style_mem): New function.
23341
23342         * lib/quotearg.h (quotearg_n_style_mem): New function.
23343
23344 2002-01-19  Jim Meyering  <meyering@lucent.com>
23345
23346         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
23347         Remove useless quotes: DF_PROG="df".
23348         * m4/strnlen.m4: New file.
23349
23350 2002-01-16  Paul Eggert  <eggert@twinsun.com>
23351
23352         * lib/backupfile.c (ISDIGIT): Comment fix.
23353         * lib/getdate.y (ISDIGIT): Likewise.
23354         * lib/posixtm.c (ISDIGIT, year): Likewise.
23355         * lib/strverscmp.c (ISDIGIT): Likewise.
23356         * lib/userspec.c (ISDIGIT): Likewise.
23357
23358 2002-01-16  Jim Meyering  <meyering@lucent.com>
23359
23360         * lib/getdate.y: Add three semicolons, each just before a closing
23361         brace. Bison (as of version 1.31) no longer papers over that mistake.
23362
23363 2002-01-05  Jim Meyering  <meyering@lucent.com>
23364
23365         * lib/version-etc.c (version_etc_copyright): Update copyright year.
23366
23367 2001-12-19  Paul Eggert  <eggert@twinsun.com>
23368
23369         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
23370         not silently exit merely because the output buffer happens to
23371         have nothing pending.
23372
23373 2001-12-18  Paul Eggert  <eggert@twinsun.com>
23374
23375         See the big note in ../ChangeLog.
23376         * lib/human.c (suffixes): Prefer K to k for 1024.
23377         (generate_suffix_backwards): New function.
23378         (human_readable_inexact): Use it.
23379         * lib/xstrtol.c (__xstrtol): If there is no number but there
23380         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
23381         Accept 'K' as well as 'k'.
23382
23383 2001-12-15  Jim Meyering  <meyering@lucent.com>
23384
23385         * lib/regex.h (__restrict_arr): Update from libc.
23386
23387         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
23388         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
23389         (STREQ): Define.
23390
23391 2001-12-14  Jim Meyering  <meyering@lucent.com>
23392
23393         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
23394         Suggestion from Bruno Haible.
23395
23396 2001-12-10  Jim Meyering  <meyering@lucent.com>
23397
23398         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
23399         xrealloc, Instead, include "xalloc.h".
23400         (initbuffer): Don't cast xmalloc return value to char*.
23401         (readline): Reword comment.
23402         Don't cast xrealloc return value to char*
23403         Return NULL, not 0.
23404
23405 2001-12-09  Jim Meyering  <meyering@lucent.com>
23406
23407         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
23408         about `signed and unsigned type in conditional expression'.
23409         * lib/posixtm.c (posix_time_parse): Likewise.
23410
23411         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
23412
23413         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
23414         to avoid a pedantic warning.
23415
23416         * lib/getstr.c: Don't include assert.h.
23417         (getstr): Remove warning-evoking assertions.
23418         Return -1 if offset parameter is out of bounds.
23419         Change the type of a local from int to size_t.
23420
23421         * lib/strftime.c (my_strftime_localtime_r): Include this function
23422         definition in the `#if ! HAVE_TM_GMTOFF' block.
23423
23424         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
23425         Include xalloc.h instead.
23426
23427 2001-12-02  Jim Meyering  <meyering@lucent.com>
23428
23429         * lib/tempname.c: Don't declare getenv, thus reverting the change of
23430         2001-11-18.  It's no longer necessary, now that stdlib.h is always
23431         included.
23432
23433         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
23434         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
23435
23436 2001-11-30  Akim Demaille  <akim@epita.fr>
23437
23438         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
23439         before being defined.
23440
23441 2001-11-27  Paul Eggert  <eggert@twinsun.com>
23442
23443         * lib/quotearg.h (quotearg_n, quotearg_n_style):
23444         First arg is int, not unsigned.
23445         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
23446         (SIZE_MAX, UINT_MAX): New macros.
23447         (quotearg_n_options): Abort if N is negative.
23448         Avoid overflow check on hosts where size_t is 64 bits and int
23449         is 32 bits, as overflow is impossible there.
23450         Fix off-by-one typo that caused unnecessary reallocation.
23451
23452 2001-11-27  Jim Meyering  <meyering@lucent.com>
23453
23454         * lib/tempname.c: Merge with version from libc.
23455         * lib/regex.c: Likewise.
23456
23457         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
23458         systems for which STDC_HEADERS is 0, it was not included, resulting in
23459         a warning about an integer-to-pointer conversion problem with getenv.
23460         Reported by Volker Borchert.
23461
23462 2001-11-26  Jim Meyering  <meyering@lucent.com>
23463
23464         * lib/gtod.h: Remove file.
23465         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
23466         * lib/gettimeofday.c: Don't include gtod.h.
23467         (GTOD_init): Remove function.
23468         (rpl_gettimeofday): Do its job here instead, rather than aborting.
23469         Suggestion from Volker Borchert.
23470
23471 2001-11-23  Jim Meyering  <meyering@lucent.com>
23472
23473         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
23474         it.
23475         * lib/hash.c (struct hash_table): Define it here instead.
23476
23477 2001-11-22  Jim Meyering  <meyering@lucent.com>
23478
23479         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
23480
23481 2001-11-20  Jim Meyering  <meyering@lucent.com>
23482
23483         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
23484         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
23485
23486 2001-11-19  Jim Meyering  <meyering@lucent.com>
23487
23488         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
23489         directory.  Use "conftestXXXXXX" as the template.
23490         Suggestion from Paul Eggert.
23491
23492         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
23493         immediately, so the test doesn't mistakenly hit the max-open-files
23494         limit.
23495
23496 2001-11-18  Paul Eggert  <eggert@twinsun.com>
23497
23498         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
23499         (TEMPORARIES): New macro.
23500         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
23501         removes an artificial limitation (e.g. HP-UX 10.20, where
23502         TMP_MAX is 17576).
23503
23504 2001-11-18  Jim Meyering  <meyering@lucent.com>
23505
23506         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
23507
23508 2001-11-18  Jim Meyering  <meyering@lucent.com>
23509
23510         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
23511         on SunOS 4.
23512
23513         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
23514         files will be created before anything else.
23515
23516 2001-11-17  Paul Eggert  <eggert@twinsun.com>
23517
23518         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
23519         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
23520
23521 2001-11-17  Jim Meyering  <meyering@lucent.com>
23522
23523         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
23524         Prompted by a report from Bob Proulx.
23525
23526         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
23527         Instead, require UTILS_FUNC_MKSTEMP.
23528
23529 2001-11-17  Jim Meyering  <meyering@lucent.com>
23530
23531         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
23532         Now, that's done as part of AC_FUNC_STRTOD.
23533
23534 2001-11-17  Jim Meyering  <meyering@lucent.com>
23535
23536         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
23537         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
23538         rather than group writable.  Patch by Juan F. Codagnone.
23539
23540         * lib/readtokens.c: Remove explicit declarations of xmalloc and
23541         xrealloc, Instead, include "xalloc.h".
23542
23543         * lib/mountlist.c: Include unlocked-io.h after all system headers.
23544         Remove explicit declarations of xmalloc, xrealloc,
23545         and xstrdup.  Instead, include "xalloc.h".
23546
23547         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
23548         unlocked-io.h.
23549         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
23550         Likewise.
23551         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
23552
23553         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
23554         Reported by Padraig Brady.
23555
23556         * lib/mkstemp.c: #undef mkstemp.
23557         Include config.h.
23558         (rpl_mkstemp): Rename from mkstemp.
23559         Protoize.
23560
23561 2001-11-16  Jim Meyering  <meyering@lucent.com>
23562
23563         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
23564         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
23565         determine the amount of total physical memory, use pstat_getstatic.
23566         HPUX-11 doesn't define _SC_PHYS_PAGES.
23567         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
23568         If sysconf couldn't be used to determine the amount of available
23569         physical memory, use both pstat_getstatic and pstat_getdynamic.
23570         Based on a patch from Bob Proulx.
23571
23572 2001-11-10  Jim Meyering  <meyering@lucent.com>
23573
23574         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
23575         (jm_PREREQ): Use it.
23576
23577 2001-11-09  Jim Meyering  <meyering@lucent.com>
23578
23579         * m4/jm-macros.m4: Require autoconf-2.52f.
23580         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
23581         Use these AC_-prefixed names, not the AM_-prefixed ones.
23582
23583         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
23584
23585 2001-11-05  Jim Meyering  <meyering@lucent.com>
23586
23587         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
23588
23589 2001-11-04  Jim Meyering  <meyering@lucent.com>
23590
23591         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
23592         $DEFS.
23593
23594 2001-11-03  Jim Meyering  <meyering@lucent.com>
23595
23596         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
23597         of AC_DEFUN.
23598
23599         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
23600         know the name of the variable in the macro definition.
23601
23602 2001-11-03  Jim Meyering  <meyering@lucent.com>
23603
23604         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
23605         in argmatch_to_argument call.
23606
23607         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
23608         argument.
23609
23610         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
23611         e.g., a fault due to an attempt to free a NULL pointer.
23612
23613 2001-11-01  Jim Meyering  <meyering@lucent.com>
23614
23615         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
23616         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
23617
23618 2001-11-01  Jim Meyering  <meyering@lucent.com>
23619
23620         * lib/dirfd.c, lib/dirfd.h: New files.
23621         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
23622
23623         * lib/hash.c (hash_print) [TESTING]: Clean up.
23624
23625 2001-10-22  Paul Eggert  <eggert@twinsun.com>
23626
23627         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
23628         to avoid a warning if -Wall.
23629
23630 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
23631
23632         * README: New file
23633         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
23634         (per RMS's instructions, this is now the canonical source)
23635         * lgpl/, gpl/: New directories.
23636
23637 2001-10-21  Paul Eggert  <eggert@twinsun.com>
23638
23639         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
23640
23641 2001-10-21  Jim Meyering  <meyering@lucent.com>
23642
23643         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
23644         this code would end up calling gettext even in packages built
23645         with --disable-nls.
23646         * lib/getopt.c (_): Likewise.
23647         * lib/regex.c (_): Likewise.
23648
23649 2001-10-20  Paul Eggert  <eggert@twinsun.com>
23650
23651         * m4/error.m4 (jm_PREREQ_ERROR):
23652         Do not invoke AC_CHECK_FUNCS with strerror_r, as
23653         AC_FUNC_STRERROR_R does that.
23654         Check for strerror declaration.
23655
23656         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
23657         are supposed to have them these days.
23658         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
23659         Merge changes from latest Autoconf CVS.
23660         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
23661         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
23662         POSIX decided to standardize on the int flavor of strerror_r.
23663
23664 2001-10-20  Paul Eggert  <eggert@twinsun.com>
23665
23666         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
23667         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
23668         Use strerror_r that is only a macro, even if it is not a function.
23669         (strerror): Check for HAVE_DECL_STRERROR before declaring.
23670         (private_strerror): Use prototypes, not old-style function definition.
23671         (print_errno_message): New function.
23672         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
23673         char*-flavored one.
23674         (error_tail, error, error_at_line): Use it.
23675
23676 2001-10-11  Jim Meyering  <meyering@lucent.com>
23677
23678         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
23679         and quote_n (1, ... to avoid clobbering a buffer.
23680
23681 2001-10-05  Jim Meyering  <meyering@lucent.com>
23682
23683         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
23684         hash-pjw.h.
23685         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
23686         * lib/hash-pjw.h: New file.
23687
23688 2001-09-30  Jim Meyering  <meyering@lucent.com>
23689
23690         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
23691         `struct fsstat' has the `f_fstypename' member.
23692         Use that to define FS_TYPE, which is now used to make
23693         the getfsstat link test tighter.
23694
23695 2001-09-30  Jim Meyering  <meyering@lucent.com>
23696
23697         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
23698         Include <sys/ucred.h>, for Apple Darwin.
23699         Include sys/mount.h and sys/fs_types.h only if available.
23700         (FS_TYPE): Define.
23701         (read_filesystem_list): Use FS_TYPE.
23702
23703 2001-09-29  Paul Eggert  <eggert@twinsun.com>
23704
23705         * lib/exclude.c (excluded_filename): 0 -> false, since it's
23706         a boolean context.
23707
23708 2001-09-29  Jim Meyering  <meyering@lucent.com>
23709
23710         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
23711         [one-argument getmntent function]): Include stdio.h before mntent.h.
23712         SunOS 4.1.x needs it for the declaration of `FILE'.
23713         Patch by Volker Borchert.
23714
23715         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
23716         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
23717         sys/fs_types.h, and make the link-test for getfsstat guard #include
23718         directives with appropriate #if HAVE_*_H tests so that we can
23719         detect getfsstat on Apple Darwin1.3.7 systems.
23720         Reported by Nelson Beebe.
23721         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
23722
23723 2001-09-28  Paul Eggert  <eggert@twinsun.com>
23724
23725         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
23726         #defines strtoimax.  Also treat the other strto* functions
23727         like strtoimax.
23728
23729         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
23730         Check for strtoul and strtoumax,
23731         as those declarations are made even in the signed case.
23732         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
23733         Likewise, for strtol and strtoimax.
23734
23735 2001-09-28  Paul Eggert  <eggert@twinsun.com>
23736
23737         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
23738         #defines strtoimax.  Also treat the other strto* functions
23739         like strtoimax.
23740
23741         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
23742         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
23743         (strtoimax, strtoumax): Do not declare if already defined as a macro.
23744
23745 2001-09-26  Jim Meyering  <meyering@lucent.com>
23746
23747         Most macros in unlocked-io.h had the wrong number of arguments.
23748         * lib/gen-uio: New script.
23749         (USE_UNLOCKED_IO): Define to 1 if not already defined.
23750         * lib/unlocked-io.hin: Remove file.
23751         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
23752         rather than trying to embed it here.
23753         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
23754         Reported by Padraig Brady.
23755
23756 2001-09-25  Volker Borchert  <bt@teknon.de>
23757
23758         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
23759         `result'.
23760
23761 2001-09-24  Jim Meyering  <meyering@lucent.com>
23762
23763         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
23764
23765 2001-09-23  Jim Meyering  <meyering@lucent.com>
23766
23767         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
23768         instead of the mere test for existence of mntent.h.  The latter
23769         would get a false-positive on AIX 3.4 systems.
23770         In the outer getmntent if-block, don't die if neither of the getmntent
23771         tests succeeds.  Instead, just fall through and continue with the
23772         remaining tests.
23773
23774 2001-09-23  Jim Meyering  <meyering@lucent.com>
23775
23776         * lib/mountlist.c: Remove useless parentheses in #if directives.
23777         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
23778         the deprecated MOUNTED symbol is no longer defined in mntent.h.
23779
23780 2001-09-22  Jim Meyering  <meyering@lucent.com>
23781
23782         * m4/gettext.m4: New file.  From gettext.
23783         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
23784         * m4/progtest.m4: Likewise
23785         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
23786         * m4/glibc21.m4: Likewise.
23787
23788         * m4/libintl.m4: Remove.  No longer used.
23789
23790 2001-09-22  Jim Meyering  <meyering@lucent.com>
23791
23792         * lib/localcharset.c: Update from latest gettext.
23793         * lib/config.charset: Likewise.
23794
23795 2001-09-20  Jim Meyering  <meyering@lucent.com>
23796
23797         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
23798         strtoimax.
23799         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
23800         strtoumax.
23801
23802 2001-09-20  Jim Meyering  <meyering@lucent.com>
23803
23804         * lib/xstrtol.c (strtoimax): Guard declaration with
23805         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
23806         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
23807         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
23808         (strtoumax): Likewise, for completeness (it wasn't necessary).
23809
23810 2001-09-17  Paul Eggert  <eggert@twinsun.com>
23811
23812         * lib/strtoimax.c (HAVE_LONG_LONG):
23813         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
23814         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
23815         to work around bug in IBM C compiler.
23816
23817 2001-09-17  Jim Meyering  <meyering@lucent.com>
23818
23819         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
23820         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
23821         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
23822         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
23823         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
23824         whenever the right hand side need not be expanded by the shell.
23825
23826 2001-09-16  Paul Eggert  <eggert@twinsun.com>
23827
23828         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
23829         library.  It's not correct, as some older glibcs are buggy.
23830         fnmatch wasn't fixed until glibc 2.2.
23831
23832         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
23833         special shell magic here.
23834
23835 2001-09-16  Jim Meyering  <meyering@lucent.com>
23836
23837         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
23838         * m4/jm-macros.m4: Require it.
23839
23840 2001-09-16  Jim Meyering  <meyering@lucent.com>
23841
23842         * lib/mkdir.c: New file.
23843
23844 2001-09-15  Jim Meyering  <meyering@lucent.com>
23845
23846         * m4/jm-macros.m4: Check for help2man.
23847
23848 2001-09-11  Jim Meyering  <meyering@lucent.com>
23849
23850         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
23851         The body, by Paul Eggert, was moved here from configure.in.
23852         * m4/jm-macros.m4: Require UTILS_HOST_OS.
23853
23854 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23855
23856         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
23857         (jm_PREREQ): Use it.
23858
23859 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23860
23861         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
23862         Use ssize_t, not int, to store result of readlink.
23863         Check for ssize_t overflow as well as size_t overflow,
23864         as POSIX says the result of readlink is implementation-defined
23865         when ssize_t overflows.
23866         Remove unnecessary cast to char*.
23867         Use free+malloc instead of realloc, as the storage doesn't need
23868         to be preserved and it's clearer and can be more efficient that way.
23869         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
23870         * lib/xreadlink.h (xreadlink): Update prototype.
23871
23872 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23873
23874         * lib/xgetcwd.c: Revert some of the previous change; intead,
23875         fix the HAVE_GETCWD_NULL code to behave more like the
23876         !HAVE_GETCWD_NULL code used to.
23877
23878         Include "xalloc.h".
23879         (xgetcwd): Do not return NULL when memory is exhausted; instead,
23880         invoke xalloc_die.
23881
23882 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23883
23884         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
23885         sys/param.h, as pathmax.h includes them.
23886
23887 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23888
23889         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
23890         (jm_PREREQ_XGETCWD): New macro.
23891
23892         * m4/getcwd.m4: New file.
23893
23894 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23895
23896         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
23897         like the HAVE_GETCWD_NULL code.
23898         Include pathmax.h if not HAVE_GETCWD.
23899         Do not include xalloc.h.
23900         (INITIAL_BUFFER_SIZE): New symbol.
23901         Do not use xmalloc / xrealloc, since the caller is responsible for
23902         handling errors.  Preserve errno around `free' during failure.
23903         Do not overrun buffer when using getwd.
23904
23905 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23906
23907         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
23908         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
23909         getcwd (NULL, 0).
23910
23911 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23912
23913         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
23914         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
23915         spotted by Jim Meyering.
23916
23917 2001-09-03  Jim Meyering  <meyering@lucent.com>
23918
23919         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
23920         failure.
23921
23922 2001-09-02  Jim Meyering  <meyering@lucent.com>
23923
23924         * lib/error.c: Update from GNU libc.
23925
23926 2001-09-01  Jim Meyering  <meyering@lucent.com>
23927
23928         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
23929         Used by df.
23930
23931 2001-09-01  Jim Meyering  <meyering@lucent.com>
23932
23933         * lib/xreadlink.c: New file.
23934         * lib/xreadlink.h: New file.
23935         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
23936         xreadlink.h.
23937
23938         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
23939         doesn't conflict with sparc Solaris 7's definition in
23940         /usr/include/sys/int_types.h.
23941
23942         * lib/exclude.c: Use `""', not `<>' to #include non-system header
23943         files.
23944         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
23945         and strncasecmp as r-values.  Unixware didn't have declarations.
23946
23947 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23948
23949         * lib/xstrtol.h: Add copyright notice.
23950         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
23951         LONGINT_INVALID_SUFFIX_CHAR.
23952
23953 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23954
23955         * lib/xstrtol.c (strtoimax): New decl.
23956
23957 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23958
23959         * lib/xgetcwd.c: Don't include pathmax.h.
23960         Include stdlib.h and unistd.h if available.
23961         Include xalloc.h.
23962         (xmalloc, xstrdup, free): Remove decls.
23963         (xgetcwd): Don't assume sizes fit in unsigned.
23964         Check for overflow when computing sizes.
23965         Simplify reallocation code.
23966
23967 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23968
23969         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
23970         a directory's st_size can have an arbitrary value, so the old
23971         usage could waste an arbitrary amount of memory.  All uses
23972         changed.
23973         * lib/savedir.h: Update prototype.
23974
23975 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23976
23977         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
23978
23979         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
23980         old strtoimax.c.
23981
23982         Also, make the following further changes to make this file's
23983         configuration more similar to that of strtol.c:
23984         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
23985         (strtoumax, uintmax_t, strtoull, strtol): Remove.
23986         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
23987         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
23988         changed to signed values.
23989
23990         And make the following changes as well:
23991         Fix copyright notice, as 1999 was missing.
23992         (verify): New macro.
23993         (strtoimax): Check sizes at compile-time, not run-time.
23994         Prefer strtol to strtoll if both work.
23995         (main): Remove; it was not that useful and was a pain to maintain.
23996
23997         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
23998
23999 2001-08-31  Jim Meyering  <meyering@lucent.com>
24000
24001         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
24002         Use an initial, malloc'd, buffer of length 128 rather than
24003         a statically allocated one of length 1024.
24004
24005 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24006
24007         Simplify code, partly by assuming autoconf 2.52 semantics.
24008
24009         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
24010
24011         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
24012         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
24013         All uses removed.
24014         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
24015         Move AC_REQUIRE to next-to-top level, to avoid confusion.
24016         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
24017         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
24018         jm_AC_HEADER_INTTYPES_H.
24019         * m4/jm-macros.m4 (jm_MACROS): Likewise.
24020
24021         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
24022
24023         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
24024         Quote first arg of AC_DEFUN.
24025         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
24026         since they are needed to parse the include file even if we need
24027         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
24028         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
24029         but with opposite signedness.
24030
24031 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24032
24033         Merge 'exclude' changes from tar 1.13.22.
24034         This fixes one or two unlikely storage allocation overflow bugs,
24035         but doesn't change user-visible behavior otherwise.
24036
24037 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24038
24039         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
24040         (jm_PREREQ_EXCLUDE): New macro.
24041
24042 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24043
24044         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
24045         tm to be declared.
24046
24047 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24048
24049         * lib/hash.c: Remove '2001' from copyright notice.
24050
24051 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24052
24053         * lib/full-write.h: New file.
24054         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
24055         * lib/full-write.c: Correct credits, as cccp.c no longer
24056         exists and anyway it was so heavily changed from the old cccp
24057         code as to be unrecognizable.  Include full-write.h.
24058         (full_write) Return size_t, with short writes meaning failure.
24059         All callers changed.  This fixes a bug with large buffers
24060         on 64-bit hosts.
24061         * lib/utime.c: Include full-write.h.
24062
24063 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24064
24065         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
24066         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
24067         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
24068         Include if available.
24069         (<xalloc.h>): Include
24070         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
24071         (verify): New macro.  Use it to verify that EXCLUDE macros do not
24072         collide with FNM macros.
24073         (struct patopts): New struct.
24074         (struct exclude): Use it, as exclude patterns now come with options.
24075         (new_exclude): Support above changes.
24076         (new_exclude, add_exclude_file):
24077         Initial size must now be a power of two to simplify overflow checking.
24078         (free_exclude, fnmatch_no_wildcards): New function.
24079         (excluded_filename): No longer requires options arg, as the options
24080         are determined by add_exclude.  Now returns bool, not int.
24081         (excluded_filename, add_exclude):
24082         Add support for the fancy new exclusion options.
24083         (add_exclude, add_exclude_file): Now takes int options arg.
24084         Check for arithmetic overflow when computing sizes.
24085         (add_exclude_file): xrealloc might modify errno, so don't
24086         realloc until after errno might be used.
24087
24088         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
24089         New macros.
24090         (free_exclude): New decl.
24091         (add_exclude, add_exclude_file): Now takes int options arg.
24092         (excluded_filename): No longer requires options arg, as the options
24093         are determined by add_exclude.  Now returns bool, not int.
24094
24095 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24096
24097         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
24098
24099 2001-08-27  Jim Meyering  <meyering@lucent.com>
24100
24101         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
24102
24103         * lib/version-etc.c (N_): Remove definition.
24104         Revert most of last change.
24105         Instead, simply don't mark the `Copyright...' string for translation.
24106         Based on advice from Paul Eggert.
24107
24108         * lib/strtoxmax.c: Tweak comment.
24109
24110 2001-08-26  Jim Meyering  <meyering@lucent.com>
24111
24112         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
24113
24114         * m4/xstrtoimax.m4: New file.
24115         * m4/xstrtoumax.m4: Add comments explaining why we
24116         AC_REPLACE_FUNCS(strtol).
24117
24118 2001-08-26  Jim Meyering  <meyering@lucent.com>
24119
24120         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
24121         of copyright with `%s' so translators don't get an untranslated
24122         message in 2002.
24123         (COPYRIGHT_YEAR): Define.
24124         (version_etc): Use fprintf rather than fputs.
24125         Suggestion from Ulrich Drepper.
24126
24127         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
24128
24129         * lib/strtoll.c: New file, from GNU libc.
24130         * lib/xstrtoimax.c: New file.
24131
24132         * lib/xstrtol.h: Add xstrtoimax.
24133         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
24134         * lib/strtoimax.c: New file.  Likewise, but first define
24135         STRTOUXMAX_SIGNED.
24136
24137         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
24138         ...
24139         * lib/strtoxmax.c: ... then renamed to this.
24140
24141 2001-08-18  Paul Eggert  <eggert@twinsun.com>
24142
24143         * m4/inttypes.m4: Add AC_PREREQ(2.13).
24144         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
24145         (jm_AC_TYPE_INTMAX_T): New macro.
24146         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
24147
24148         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
24149
24150         * m4/longlong.m4: Renamed from ulonglong.m4.
24151         * m4/inttypes.m4: Renamed from inttypes_h.m4.
24152         * m4/uintmax_t.m4: Removed.
24153
24154 2001-08-13  Paul Eggert  <eggert@twinsun.com>
24155
24156         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
24157         Port to Solaris 8, where 'sed' requires a space after the 'r'
24158         command, and where sh dislikes "$/".  Clean up the spacing a bit.
24159         Redirect output to $tmp just once.
24160
24161 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
24162
24163         * lib/addext.c (<errno.h>): Include.
24164         (errno): Declare if not defined.
24165         (addext): Work correctly when pathconf returns -1 and leaves
24166         errno alone because there is no limit.  Also, work even if
24167         pathconf returns a value greater than SIZE_MAX.
24168
24169 2001-08-12  Jim Meyering  <meyering@lucent.com>
24170
24171         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
24172         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
24173         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
24174         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
24175         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
24176         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
24177         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
24178         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
24179         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
24180         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
24181         utime.m4, utimes.m4, xstrtoumax.m4:
24182         Quote the first argument in each use of AC_DEFUN.
24183
24184 2001-08-12  Jim Meyering  <meyering@lucent.com>
24185
24186         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
24187         Simply `return getcwd (NULL, 0);'.
24188         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
24189         Use 1300 as initial value for length, not PATH_MAX.
24190
24191         * lib/pathmax.h: Clean up cpp syntax.
24192
24193 2001-08-12  Jim Meyering  <meyering@lucent.com>
24194
24195         * lib/gettimeofday.c: New file.
24196         * lib/gtod.h: New file.
24197         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
24198
24199 2001-08-05  Jim Meyering  <meyering@lucent.com>
24200
24201         * m4/jm-macros.m4: Require autoconf-2.52.
24202
24203 2001-08-04  Jim Meyering  <meyering@lucent.com>
24204
24205         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
24206         stmt, to get in sync with glibc.
24207
24208 2001-08-03  Paul Eggert  <eggert@twinsun.com>
24209
24210         The following changes are from gettext 0.10.39 as maintained by
24211         Bruno Haible.
24212
24213         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
24214         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
24215         with inverted sense.  All uses changed.
24216
24217         * lib/mbswidth.c: Don't include <limits.h>.
24218         Include <stdlib.h> and <string.h> unconditionally.
24219         (iswcntrl, mbsinit, ISCNTRL): New macros.
24220         (mbsnwidth): Use K&R style function declarations.
24221         Don't bother checking for MB_LEN_MAX == 1, since the compiler
24222         can optimize it when MB_CUR_MAX == 1.
24223         The width of control characters is zero, not 1.
24224
24225 2001-08-03  Paul Eggert  <eggert@twinsun.com>
24226
24227         The following changes are from gettext 0.10.39 as maintained by
24228         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
24229
24230         * m4/codeset.m4: Upgrade to serial AM1.
24231         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
24232         all uses changed.  Quote first arg of AC_DEFUN.
24233         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
24234
24235         * m4/iconv.m4: Upgrade to serial AM2.
24236         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
24237         Add --with-libconv-prefix.
24238         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
24239         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
24240         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
24241         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
24242         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
24243
24244         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
24245         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
24246         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
24247         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
24248         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
24249         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
24250         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
24251         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
24252         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
24253
24254         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
24255         string.h any more.
24256
24257         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
24258         not the default value.
24259
24260         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
24261         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
24262         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
24263         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
24264         Also check for iswcntrl, used for wcwidth fallback.
24265         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
24266         to Autoconf 2.13.
24267
24268 2001-08-03  Jim Meyering  <meyering@lucent.com>
24269
24270         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
24271         as it was in the original.  Reported by Paul Eggert.
24272
24273 2001-07-16  Jim Meyering  <meyering@lucent.com>
24274
24275         * m4/gettimeofday.m4: New file.
24276         Prompted by a report from Bernhard Baehr.
24277
24278 2001-07-15  Jim Meyering  <meyering@lucent.com>
24279
24280         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
24281         stuff. Now it's in ../Makefile.cfg.
24282
24283 2001-07-15  Jim Meyering  <meyering@lucent.com>
24284
24285         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
24286         (BUILT_SOURCES): Add unlocked-io.h.
24287         (io_functions): Define.
24288         (unlocked-io.h): New rule.
24289         (DISTCLEANFILES): Add unlocked-io.h.
24290         (all-local): Depend on unlocked-io.h, to ensure it is created.
24291
24292         * lib/unlocked-io.hin: New file
24293
24294         * lib/regex.c: Update from glibc.
24295
24296 2001-07-05  Jim Meyering  <meyering@lucent.com>
24297
24298         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
24299         recommendation.
24300         (libfetish_a_SOURCES): Put all .h files here instead.
24301         Remove a thus-exposed (better checks in automake) duplicate and
24302         two unnecessary .h files.
24303
24304 2001-07-04  Jim Meyering  <meyering@lucent.com>
24305
24306         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
24307         that generates jm-glibc-io.m4 so that it doesn't trigger any make
24308         distcheck failure.
24309
24310 2001-07-02  Jim Meyering  <meyering@lucent.com>
24311
24312         The following changes were prompted by suggestions from Bruno Haible.
24313
24314         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
24315         is now generated.
24316         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
24317         definition of EXTRA_DIST.
24318         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
24319         ensure that the generated file is created/updated whenever the list
24320         of $(unlocked_functions) is changed.
24321         (jm-glibc-io.m4): New rule.
24322         (unlocked-io.h): New rule -- currently unused.
24323
24324 2001-06-24  Jim Meyering  <meyering@lucent.com>
24325
24326         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
24327         unmatched right bracket, rather than kludging it with an extra,
24328         falsely-matching quote in a comment.  Patch by Akim Demaille.
24329
24330 2001-06-11  Jim Meyering  <meyering@lucent.com>
24331
24332         * lib/regex.c: Update from GNU libc.
24333
24334 2001-05-27  Jim Meyering  <meyering@lucent.com>
24335
24336         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
24337         Check for ut_type in struct utmp.
24338
24339 2001-05-27  Jim Meyering  <meyering@lucent.com>
24340
24341         * lib/readutmp.h (UT_TYPE): Define.
24342
24343 2001-05-24  Jim Meyering  <meyering@lucent.com>
24344
24345         * lib/argmatch.c: Include "quote.h".
24346         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
24347         quote function.  Reported by Göran Uddeborg.
24348
24349 2001-05-22  Jim Meyering  <meyering@lucent.com>
24350
24351         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
24352         now that we use the package-supplied version unconditionally.
24353         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
24354
24355 2001-05-21  Jim Meyering  <meyering@lucent.com>
24356
24357         * m4/regex.m4: Change a couple backticks to single quotes to avoid
24358         shell syntax errors.
24359
24360 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
24361
24362         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
24363
24364 2001-05-20  Paul Eggert  <eggert@twinsun.com>
24365
24366         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
24367         Don't bother to check library strftime, since
24368         we'll be using our own my_strftime function anyway.
24369         Define my_strftime instead of strftime.
24370
24371 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
24372
24373         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
24374         which is not yet declared.
24375
24376 2001-05-15  Jim Meyering  <meyering@lucent.com>
24377
24378         * m4/regex.m4: Use proper quoting so brackets appear in the test
24379         program.
24380         Reported by, and with help from, Bruno Haible.
24381
24382 2001-05-13  Jim Meyering  <meyering@lucent.com>
24383
24384         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
24385         undefined.
24386
24387 2001-05-11  Paul Eggert  <eggert@twinsun.com>
24388
24389         dirname code cleanup.  base_name now behaves more compatibly
24390         with POSIX basename when given file names that have trailing
24391         slashes, and similarly for dir_name.  Add new primitives
24392         base_len and dir_len.  Put the directory-name-related decls
24393         into dirname.h.
24394
24395         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
24396         * lib/backupfile.c (base_name): Likewise.
24397         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
24398         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
24399         * lib/makepath.c (strip_trailing_slashes): Likewise.
24400         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
24401         ISSLASH): Likewise.
24402         * lib/rename.c (strip_trailing_slashes): Likewise.
24403         * lib/same.c (base_name): Likewise.
24404         * lib/stripslash.c (ISSLASH): Likewise.
24405
24406         * lib/addext.c: Include <dirname.h> after size_t is defined.
24407         * lib/backupfile.c: Likewise.
24408
24409         * lib/addext.c (addext): Use base_len to trim redundant
24410         trailing slashes instead of doing it ourselves.
24411         But do not trim the last slash if it is not redundant.
24412
24413         * lib/backupfile.c (find_backup_file_name,
24414         max_backup_version): Use base_len instead of rolling it ourselves.
24415         Handle the case of "" and (on DOS) "C:" correctly.
24416
24417         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
24418         needed. Include <string.h>, <dirname.h>.
24419         (base_name): Allow file names ending in slashes, other than names
24420         that are all slashes.  In this case, return the basename followed
24421         by the slashes.  This is more general, and can be used in places
24422         where the original base_name purposely had an assertion failure.
24423         (base_len): New function.
24424
24425         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
24426         Do not include <assert.h>; no longer needed.
24427         Include xalloc.h.
24428         (memrchr): Remove decl.
24429         (dir_name_r): Remove.
24430         (dir_len): Renamed from dirlen.  All callers changed.
24431         Rewrite in terms of base_name, for simplicity and consistency.
24432         (dir_name): Never return NULL.  All callers changed.
24433         Do not include <stdlib.h> in test program; no longer needed.
24434         return 0; is fine for test program.
24435
24436         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
24437         New macros.
24438         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
24439
24440         * lib/path-concat.c (path_concat): Use base_len to compute
24441         base length, not strlen; this means we cannot rely on memcpy
24442         to null-terminate.
24443
24444         * lib/same.c (STREQ): Remove.
24445         (same_name): Handle the case where the basename ends in trailing '/'.
24446
24447         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
24448         a slash was stripped.  Do not strip the last slash after a
24449         file system prefix.
24450
24451 2001-05-11  Paul Eggert  <eggert@twinsun.com>
24452
24453         * lib/Makefile.am (libfetish_a_SOURCES):
24454         Add strftime.c, since we now compile it on all hosts.
24455
24456         * lib/strftime.c (my_strftime):
24457         Define to nstrftime if emacs, but only if my_strftime is not defined.
24458         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
24459         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
24460         Add one more extra argument: a nanoseconds value.
24461         All uses changed.
24462         (ns): New macro.
24463         (my_strftime function): Add %N format.
24464         (emacs_strftimeu): Renamed from emacs_strftime,
24465         with extra ut argument.
24466
24467 2001-05-09  Paul Eggert  <eggert@twinsun.com>
24468
24469         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
24470
24471 2001-04-21  Jim Meyering  <meyering@lucent.com>
24472
24473         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
24474         doesn't interfere.
24475
24476 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
24477
24478         * m4/ftruncate.m4: Check for chsize.
24479         Link with ftruncate.o unconditionally if ftruncate is missing.
24480         This was required when cross-compiling to i586-mingw32msvc.
24481
24482 2001-04-08  Jim Meyering  <meyering@lucent.com>
24483
24484         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
24485         recomputed; that's necessary when the offset spans a DST transition.
24486         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
24487
24488 2001-04-02  Jim Meyering  <meyering@lucent.com>
24489
24490         * lib/regex.h, regex.c: Update from GNU libc.
24491
24492 2001-03-24  Jim Meyering  <meyering@lucent.com>
24493
24494         * m4/jm-macros.m4: Require autoconf-2.49d.
24495
24496 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
24497
24498         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
24499
24500 2001-03-19  Paul Eggert  <eggert@twinsun.com>
24501
24502         * lib/version-etc.c (version_etc_copyright): Update to 2001.
24503
24504 2001-03-17  Jim Meyering  <meyering@lucent.com>
24505
24506         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
24507         now that the version in autoconf is equivalent.
24508         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
24509
24510         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
24511         Suggestion from Akim Demaille.
24512
24513         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
24514         (jm_PREREQ_TEMPNAME): New function.
24515
24516 2001-03-16  Paul Eggert  <eggert@twinsun.com>
24517
24518         * lib/tempname.c (uint64_t): Define to uintmax_t if
24519         not defined, and if UINT64_MAX is not defined.
24520         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
24521         Reported by John David Anglin.
24522
24523 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
24524
24525         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
24526         resolve alias if codeset is empty.
24527         * lib/config.charset (BeOS): Use wildcard syntax.
24528
24529 2001-03-13  Jim Meyering  <meyering@lucent.com>
24530
24531         * lib/path-concat.c (path_concat)
24532         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
24533         concatenating e.g., `C:' and `foo'.
24534         From Bruno Haible.
24535
24536 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
24537
24538         * lib/localcharset.c (locale_charset): Don't use
24539         setlocale(LC_CTYPE,NULL). Don't return NULL.
24540         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
24541
24542 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
24543
24544         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
24545         support for DOS/DJGPP.
24546
24547 2001-03-01  Paul Eggert  <eggert@twinsun.com>
24548
24549         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
24550         lacks mkstemp.  Compile our own tempname.c if we compile our own
24551         mkstemp.c, as mkstemp relies on tempname.
24552
24553 2001-03-01  Jim Meyering  <meyering@lucent.com>
24554
24555         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
24556         AH_VERBATIM really does output its argument verbatim.
24557
24558 2001-02-28  Paul Eggert  <eggert@twinsun.com>
24559
24560         * lib/Makefile.am (libfetish_a_SOURCES):
24561         Add dup-safer.c, fopen-safer.c.
24562         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
24563
24564         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
24565         * lib/unistd-safer.h: New files.
24566
24567 2001-02-25  Paul Eggert  <eggert@twinsun.com>
24568
24569         The mkstemp replacement is taken from glibc 2.2.2, with some
24570         portability fixes for use outside glibc, as follows:
24571
24572         * lib/tempname.c (struct_stat64): New macro.
24573         (direxists, __gen_tempname): Use it.
24574         This avoids a portability problem with Solaris 8.
24575
24576         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
24577         (<stddef.h>, <stdint.h>, <string.h>):
24578         Include only if STDC_HEADERS || _LIBC.
24579         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
24580         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
24581         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
24582         (__set_errno): Define this macro if <errno.h> doesn't.
24583         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
24584         Define these macros if <stdio.h> doesn't.
24585         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
24586         Define these macros if <sys/stat.h>
24587         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
24588         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
24589         __xstat64): Define if not _LIBC.
24590         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
24591         (__gen_tempname): Invoke gettimeofday only if
24592         HAVE_GETTIMEOFDAY || _LIBC;
24593         otherwise, fall back on plain "time".
24594         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
24595
24596         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
24597
24598         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
24599
24600 2001-02-18  Paul Eggert  <eggert@twinsun.com>
24601
24602         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
24603
24604 2001-02-17  Paul Eggert  <eggert@twinsun.com>
24605
24606         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
24607         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
24608         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
24609         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
24610
24611 2001-02-17  Paul Eggert  <eggert@twinsun.com>
24612
24613         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
24614         Remove workaround macros for hosts that have mbrtowc but not
24615         mbstate_t, as we now insist on proper declarations for both
24616         before using mbrtowc.
24617
24618 2001-02-17  Jim Meyering  <meyering@lucent.com>
24619
24620         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
24621         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
24622         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
24623         UnixWare 7.1.1.
24624
24625         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
24626         rather than AC_CACHE_VAL.
24627
24628 2001-02-17  Jim Meyering  <meyering@lucent.com>
24629
24630         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
24631         around included file name.
24632
24633         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
24634
24635         * lib/strftime.c: Update from GNU libc (the only changes were to
24636         comments).
24637
24638 2001-02-17  Jim Meyering  <meyering@lucent.com>
24639
24640         * lib/regex.c: Update from libc.
24641
24642 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
24643
24644         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
24645         clash.
24646
24647 2001-02-16  Paul Eggert  <eggert@twinsun.com>
24648
24649         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
24650         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
24651         Reported by Mark Hounschell via Paul Eggert.
24652
24653 2001-02-07  Jim Meyering  <meyering@lucent.com>
24654
24655         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
24656
24657 2001-02-05  Jim Meyering  <meyering@lucent.com>
24658
24659         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
24660         it includes the patch required for `large file' support with at least
24661         HP-UX's 10.20 /bin/cc.
24662
24663 2001-02-03  Jim Meyering  <meyering@lucent.com>
24664
24665         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
24666         AS_IF, now that it works once again (mysteriously).
24667         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
24668
24669 2001-01-30  Jim Meyering  <meyering@lucent.com>
24670
24671         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
24672         * m4/chown.m4: Rename conftestchown to conftest.chown.
24673         * m4/rename.m4: s/conftestdir/conftest.d1/ and
24674         s/conftestdir2/conftest.d2/.
24675         * m4/utimes.m4: s/conftestdata/conftest.data/
24676         Inspired by Pavel Roskin's change in autoconf.
24677
24678 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
24679
24680         * lib/config.charset: Update for FreeBSD 4.2.
24681
24682 2001-01-27  Jim Meyering  <meyering@lucent.com>
24683
24684         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
24685         a use of AS_IF.
24686         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
24687
24688 2001-01-26  Jim Meyering  <meyering@lucent.com>
24689
24690         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
24691         quotearg.c includes it.
24692
24693 2001-01-26  Jim Meyering  <meyering@lucent.com>
24694
24695         * lib/quotearg.c: Include stddef.h.
24696         * lib/quote.c: Include stddef.h.
24697         Reported by Axel Kittenberger.
24698
24699         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
24700         line in double quotes so that it evokes a better diagnostic.
24701         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
24702         Reported by Axel Kittenberger.
24703
24704 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
24705
24706         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
24707         as if it was a `charset'.
24708
24709 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
24710
24711         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
24712         has const.
24713
24714 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
24715
24716         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
24717         to avoid a warning.  Add back 'const' to inptr.
24718
24719 2001-01-20  Jim Meyering  <meyering@lucent.com>
24720
24721         Be sure that headers are checked before used in code compiled
24722         for the type checks.
24723         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
24724         In place of that, invoke jm_CHECK_ALL_TYPES.
24725         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
24726         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
24727         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
24728         The check for ssize_t was mistakenly run before the test for unistd.h.
24729
24730         The configure-time check for stdbool.h was missing.
24731         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
24732         (jm_PREREQ_HASH): New function.
24733
24734 2001-01-17  Jim Meyering  <meyering@lucent.com>
24735
24736         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
24737         for autoconf-2.49c.
24738         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
24739
24740 2001-01-16  Jim Meyering  <meyering@lucent.com>
24741
24742         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
24743         From Bruno Haible.
24744
24745 2001-01-14  Jim Meyering  <meyering@lucent.com>
24746
24747         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
24748         foo and bar.  Create conftestdir/ in the script, not in the C code.
24749         Remove directories in the script, not in the C code.
24750         Remove conftestdir{,2} before trying to create the directory.
24751         Make the entire configure script fail if the mkdir fails.
24752
24753 2001-01-14  Jim Meyering  <meyering@lucent.com>
24754
24755         * lib/rename.c: New file.  From Volker Borchert.
24756         Include stdlib.h, string.h or strings.h, and xalloc.h.
24757         Use strip_trailing_slashes rather than open-coding it.
24758
24759 2001-01-03  Paul Eggert  <eggert@twinsun.com>
24760
24761         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
24762
24763 2001-01-03  Jim Meyering  <meyering@lucent.com>
24764
24765         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
24766         of local `inptr' to avoid warning with some system declarations of
24767         iconv.
24768
24769 2001-01-02  Volker Borchert  <bt@teknon.de>
24770
24771         * m4/rename.m4: New file.
24772         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
24773
24774 2001-01-01  Jim Meyering  <meyering@lucent.com>
24775
24776         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
24777         even on systems with utmpx.h.  It's necessary for the declaration of
24778         utmp's ut_user member.  Reported by Andreas Jaeger.
24779
24780         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
24781         available. They are required for the declarations of getgrgid and
24782         getpwuid resp.
24783         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
24784         Reported by Andreas Jaeger.
24785
24786 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
24787
24788         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
24789         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
24790         so `make install' also works in VPATH builds.
24791
24792 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
24793
24794         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
24795         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
24796         can be used in subdirectories.
24797
24798 2000-12-29  Paul Eggert  <eggert@twinsun.com>
24799
24800         * lib/modechange.c: Do not assume that mode_t uses the
24801         traditional octal encoding.  E.g. "chmod 1 FOO" should set
24802         the other-execute bit of FOO even if S_IXOTH != 1.
24803
24804         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
24805         WOTH, XOTH, ALLM): New macros.
24806         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
24807          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
24808         Use them.
24809         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
24810         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
24811         (mode_compile):
24812         No need to use uintmax_t; unsigned long is long enough.
24813         Don't bother to get suffix since we don't use it.
24814
24815 2000-12-26  Jim Meyering  <meyering@lucent.com>
24816
24817         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
24818         better with autoheader.
24819
24820 2000-12-24  Jim Meyering  <meyering@lucent.com>
24821
24822         * lib/hash.c (is_prime): Return explicit boolean values.
24823         (hash_get_first): Return NULL to appease Irix5.6's 89.
24824         Reported by Nelson Beebe.
24825
24826 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
24827
24828         * lib/localcharset.c (locale_charset): Add support for Win32.
24829
24830 2000-12-18  Paul Eggert  <eggert@twinsun.com>
24831
24832         * lib/physmem.h, lib/physmem.c: New files.
24833
24834         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
24835         (noinst_HEADERS): Add physmem.h.
24836
24837         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
24838         't' for compatibility with Solaris 8 sort.
24839
24840 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
24841
24842         * lib/config.charset: Add support for BeOS.
24843
24844 2000-12-17  Jim Meyering  <meyering@lucent.com>
24845
24846         * m4/dos.m4 (jm_AC_DOS): New file and macro.
24847         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
24848
24849 2000-12-16  Jim Meyering  <meyering@lucent.com>
24850
24851         This bug had a serious impact on chown: `chown N:M FILE' (for integer
24852         N and M) would have treated it like `chown N:N FILE'.
24853
24854         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
24855
24856 2000-12-16  Jim Meyering  <meyering@lucent.com>
24857
24858         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
24859         SHELLS_FILE to a file name that's useful on djgpp systems.
24860         Include stdlib.h.
24861         (ADDITIONAL_DEFAULT_SHELLS): Define.
24862         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
24863         Based mostly on a patch from Prashant TR.
24864
24865 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
24866
24867         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
24868         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
24869         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
24870
24871 2000-12-08  Andreas Schwab  <schwab@suse.de>
24872
24873         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
24874         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
24875
24876 2000-12-07  Jim Meyering  <meyering@lucent.com>
24877
24878         * lib/stripslash.c (ISSLASH): Define.
24879         (strip_trailing_slashes): Use ISSLASH rather than comparing against
24880         `/'.
24881         From Prashant TR.
24882
24883         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
24884         (dir_name_r): Declare this function as static.
24885         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
24886         manifest itself on a name containing a mix of slashes and
24887         backslashes.
24888         Make this function work with names starting with a DOS-style
24889         drive letter and colon prefix.
24890         (dir_name): Append `.' if necessary.
24891         Based mostly on patches from Prashant TR and Eli Zaretskii.
24892
24893         * lib/dirname.h (dir_name_r): Remove prototype.
24894
24895 2000-12-06  Paul Eggert  <eggert@twinsun.com>
24896
24897         * m4/off_t-format.m4: Remove this file.
24898         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
24899
24900 2000-12-06  Jim Meyering  <meyering@lucent.com>
24901
24902         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
24903         replacement strtoull, we may well need the replacement strtoul, too.
24904         Check for declarations of strtoul and strtoull.
24905         Check for strtol.  Mainly as a cue to cause automake to include
24906         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
24907         Check for limits.h -- strtol.c needs it.
24908
24909 2000-12-05  Jim Meyering  <meyering@lucent.com>
24910
24911         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
24912
24913 2000-12-04  Jim Meyering  <meyering@lucent.com>
24914
24915         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
24916         Also include memory.h, stdlib.h, unistd.h if appropriate.
24917         Reported by Andreas Jaeger (conflicting declaration of malloc).
24918
24919 2000-12-02  Jim Meyering  <meyering@lucent.com>
24920
24921         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
24922         * m4/jm-macros.m4 (jm_MACROS): require it.
24923
24924 2000-12-02  Jim Meyering  <meyering@lucent.com>
24925
24926         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
24927
24928 2000-12-01  Paul Eggert  <eggert@twinsun.com>
24929
24930         * lib/memrchr.c: Include <config.h> before any system include file.
24931
24932 2000-11-30  Jim Meyering  <meyering@lucent.com>
24933
24934         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
24935
24936 2000-11-30  Jim Meyering  <meyering@lucent.com>
24937
24938         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
24939
24940 2000-11-29  Paul Eggert  <eggert@twinsun.com>
24941
24942         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
24943
24944 2000-11-26  Jim Meyering  <meyering@lucent.com>
24945
24946         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
24947
24948 2000-11-22  Paul Eggert  <eggert@twinsun.com>
24949
24950         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
24951         size of (size_t) -1; it's not portable.
24952
24953 2000-11-17  Jim Meyering  <meyering@lucent.com>
24954
24955         * lib/strstr.c: Update from GNU libc.
24956
24957 2000-11-17  Akim Demaille  <akim@epita.fr>
24958
24959         * lib/obstack.h: Formatting changes.
24960         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
24961         prevent type checking.
24962         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
24963         cast the value to (void *): assigning a `foo *' to a `void *'
24964         variable is valid.
24965         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
24966
24967 2000-11-16  Jim Meyering  <meyering@lucent.com>
24968
24969         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
24970
24971 2000-11-11  Jim Meyering  <meyering@lucent.com>
24972
24973         * lib/error.c: Add a couple #includes, merging from GNU libc version.
24974
24975 2000-11-10  Jim Meyering  <meyering@lucent.com>
24976
24977         * lib/obstack.h: Update from GNU libc.
24978         * lib/obstack.c: Likewise.
24979
24980 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
24981
24982         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
24983
24984 2000-11-06  Paul Eggert  <eggert@twinsun.com>
24985
24986         * lib/getusershell.c (setusershell): Use rewind rather than
24987         fseek/fseeko, to avoid configuration hassles with fseeko.
24988         Don't bother opening SHELLS_FILE if shellstream is NULL;
24989         it's not necessary.
24990
24991 2000-11-05  Jim Meyering  <meyering@lucent.com>
24992
24993         * lib/makepath.h (make_dir): Declare.
24994         * lib/makepath.c (make_dir): Remove `static' attribute.
24995         Tweak a comment.
24996
24997 2000-11-04  Jim Meyering  <meyering@lucent.com>
24998
24999         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
25000
25001 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
25002
25003         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
25004         last one in a bucket, advance to the next bucket.
25005
25006 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
25007
25008         * lib/fnmatch.c: Do not comment out all the code if we are using
25009         the GNU C library, because in some cases we are replacing buggy
25010         code in the GNU C library itself.
25011
25012 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
25013
25014         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
25015         (regex_compile): Catch bogus \(\1\).
25016
25017 2000-10-30  Paul Eggert  <eggert@twinsun.com>
25018
25019         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
25020         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
25021         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
25022
25023 2000-10-30  Paul Eggert  <eggert@twinsun.com>
25024
25025         * lib/error.h, getline.h, modechange.h:
25026         Remove "2000" from Copyright line, as the file hasn't been
25027         changed this year other than in the copyright notice.
25028
25029         * lib/xalloc.h: Add "2000" to Copyright line, as this file
25030         was changed this year.
25031
25032 2000-10-29  Jim Meyering  <meyering@lucent.com>
25033
25034         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
25035         renaming.
25036         * m4/ls-mntd-fs.m4: Likewise
25037
25038 2000-10-29  Jim Meyering  <meyering@lucent.com>
25039
25040         * lib/xstat.in: Fix grammar in comment.
25041
25042 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
25043
25044         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
25045         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
25046         doesn't define __restrict_arr.
25047
25048 2000-10-28  Jim Meyering  <meyering@lucent.com>
25049
25050         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
25051         (jm_PREREQ_MEMCHR): New function.
25052
25053 2000-10-28  Jim Meyering  <meyering@lucent.com>
25054
25055         * lib/memchr.c: Update from libc.
25056         Adjust for portability:
25057         [HAVE_STDLIB_H]: Include stdlib.h.
25058         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
25059         Undef __memchr, too.
25060         [!weak_alias]: Define __memchr to memchr.
25061
25062         * lib/regex.c: Update from libc.
25063         * lib/regex.h: Likewise.
25064         * lib/getopt1.c: Likewise.
25065         * lib/memcmp.c: Likewise.
25066
25067         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
25068         Avoid using fseek, when possible -- it's broken by design.
25069         Patch by Ulrich Drepper.
25070
25071 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
25072
25073         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
25074         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
25075         Giving in to popular pressure to shut up the compiler with casts.
25076
25077 2000-10-26  Jim Meyering  <meyering@lucent.com>
25078
25079         * lib/strftime.c: Update from libc.
25080
25081 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
25082
25083         * regex.c: More `unsigned char' -> `re_char' changes.
25084         Also change several `int' into `re_wchar_t'.
25085         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
25086         (PUSH_FAILURE_POINTER): Don't cast any more.
25087         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
25088         We want GCC to complain, since this piece of code makes
25089         re_match non-reentrant, which *should* be fixed.
25090         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
25091         (EXTEND_BUFFER): Use RETALLOC.
25092         (SET_LIST_BIT): Don't cast.
25093         (re_wchar_t): New type.
25094         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
25095         that those two functions will always properly return.
25096         (IMMEDIATE_QUIT_CHECK): Cast to void.
25097         (analyse_first): Use recursion rather than an explicit stack.
25098         (re_compile_fastmap): Can't fail anymore.
25099         (re_search_2): Don't check re_compile_fastmap for failure.
25100         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
25101         Now also sets the new value (passed in a new argument).
25102         (re_match_2_internal): Use it.
25103         Also, use a new var `reg' of type size_t when looping through regs
25104         rather than reuse the inappropriate `mcnt'.
25105
25106 2000-10-25  Jim Meyering  <meyering@lucent.com>
25107
25108         * lib/obstack.c: Update from libc.
25109
25110 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
25111
25112         * regex.c (regex_compile): Change the way of handling a range from
25113         a char less than 256 to a char not less than 256.
25114
25115 2000-10-24  Andrew Innes  <andrewi@gnu.org>
25116
25117         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
25118         NT-Emacs only.
25119         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
25120         so that re_search functions only quit when callers expect them to.
25121
25122 2000-10-23  Jim Meyering  <meyering@lucent.com>
25123
25124         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
25125         wrong.  That set_locale call must not have any side effects.
25126         From Paul Eggert.
25127
25128 2000-10-22  Jim Meyering  <meyering@lucent.com>
25129
25130         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
25131         [CYCLIC]: Remove now-unused definition.
25132
25133         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
25134         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
25135         Suggestion from Ulrich Drepper.
25136
25137 2000-10-21  Jim Meyering  <meyering@lucent.com>
25138
25139         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
25140         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
25141         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
25142
25143 2000-10-21  Jim Meyering  <meyering@lucent.com>
25144
25145         * lib/dirname.c (memrchr): Declare if necessary.
25146         (dir_name): Remove the restriction that there be no
25147         trailing slashes.  Now, this code skips past them, effectively
25148         ignoring them.
25149         [TEST_DIRNAME] (main): New unit tests.
25150
25151         * lib/memrchr.c: New file from GNU libc.
25152         Undef __memrchr, too.
25153         [!weak_alias]: Define __memrchr to memrchr.
25154         Guard weak_alias use with `#ifdef weak_alias'.
25155
25156 2000-10-21  Jim Meyering  <meyering@lucent.com>
25157
25158         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
25159         (dir_name): Use dir_name_r.
25160         * lib/dirname.h (dir_name_r): Declare it.
25161
25162 2000-10-17  Jim Meyering  <meyering@lucent.com>
25163
25164         * lib/quote.h (PARAMS): Define and use.
25165         Reported by Akim Demaille.
25166
25167         * lib/getopt.c: Update from libc.
25168
25169 2000-10-16  Jim Meyering  <meyering@lucent.com>
25170
25171         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
25172         setlocale.
25173         From Jan Fedak.
25174
25175 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
25176
25177         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
25178
25179 2000-09-25  Jim Meyering  <meyering@lucent.com>
25180
25181         * lib/md5.h (rol): Define (from GnuPG).
25182
25183         * lib/sha.c: Give credit (GnuPG) where due.
25184         (M): Use rol rather than open-coding it.
25185         Add a FIXME comment.
25186
25187 2000-09-21  Jim Meyering  <meyering@lucent.com>
25188
25189         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
25190         Reported by Michael Stone.
25191
25192 2000-09-20  Jim Meyering  <meyering@lucent.com>
25193
25194         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
25195         (noinst_HEADERS): Add sha.h.
25196         Based on code from Scott G. Miller and from GnuPG.
25197
25198 2000-09-18  Jim Meyering  <meyering@lucent.com>
25199
25200         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
25201         LIBS. Otherwise, everyone ends up linking with -lelf for some
25202         configurations.
25203         Reported by Mike Stone.
25204
25205 2000-09-15  Jim Meyering  <meyering@lucent.com>
25206
25207         * lib/regex.c: Update from libc.
25208
25209 2000-09-10  Jim Meyering  <meyering@lucent.com>
25210
25211         * lib/getopt.c (_getopt_internal): Update from glibc.
25212
25213 2000-09-09  Jim Meyering  <meyering@lucent.com>
25214
25215         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
25216         think it should be used as a general replacement for isascii.
25217         * lib/fnmatch.c: Likewise.
25218         * lib/mbswidth.c: Likewise
25219         * lib/regex.c: Likewise.
25220
25221         Don't use atoi.
25222         * lib/userspec.c: Include sys/param.h and limits.h.
25223         Include xstrtol.h.
25224         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
25225         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
25226         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
25227         UID, GID.  Check range.
25228
25229 2000-09-06  Jim Meyering  <meyering@lucent.com>
25230
25231         * lib/getopt.c (_getopt_internal): Update from glibc.
25232
25233 2000-08-30  Jim Meyering  <meyering@lucent.com>
25234
25235         * lib/strftime.c: Merge in changes from GNU libc.
25236
25237 2000-08-26  Jim Meyering  <meyering@lucent.com>
25238
25239         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
25240         * m4/fpending.m4: New file.
25241
25242 2000-08-26  Jim Meyering  <meyering@lucent.com>
25243
25244         * lib/closeout.c: Include "__fpending.h".
25245         (close_stdout_status): Return right away if there's nothing to flush.
25246
25247         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
25248         * lib/__fpending.c: New file.
25249         * lib/__fpending.h: New file.
25250
25251 2000-08-20  Jim Meyering  <meyering@lucent.com>
25252
25253         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
25254         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
25255         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
25256
25257 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
25258
25259         Improve fileutils installation on systems where running
25260         programs (like install) can't be unlinked.
25261         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
25262         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
25263
25264 2000-08-07  Paul Eggert  <eggert@twinsun.com>
25265
25266         Standardize on "memory exhausted" instead of "Memory exhausted"
25267         or "virtual memory exhausted".
25268         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
25269         "virtual memory exhausted".
25270         * lib/same.c (same_name): Invoke xalloc_die instead of printing
25271         our own message.
25272         * lib/userspec.c (parse_user_spec): Likewise.
25273         * lib/bumpalloc.h: comment fix
25274         * lib/same.c, userspec.c: Include xalloc.h.
25275
25276         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
25277         not char *const and pointing to a constant array.
25278         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
25279         (xrealloc): Comment fix.
25280
25281         * lib/userspec.c (parse_user_spec):
25282         Don't translate a message until just before returning,
25283         to avoid unnecessary translation.
25284
25285 2000-08-07  Jim Meyering  <meyering@lucent.com>
25286
25287         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
25288         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
25289         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
25290         getgroups.c, gethostname.c, getopt.h, group-member.c,
25291         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
25292         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
25293         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
25294         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
25295         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
25296         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
25297         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
25298         yesno.c: Back out Copyright date changes for each file with no change
25299         this year.  This eases coordination with other programs using the same
25300         source code modules.  From Paul Eggert.
25301
25302 2000-08-06  Paul Eggert  <eggert@twinsun.com>
25303
25304         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
25305         not char, for compatibility with glibc 2.1.3 strftime.c.
25306
25307 2000-08-03  Greg McGary  <greg@mcgary.org>
25308
25309         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
25310         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
25311         (EXTEND_BUFFER): Use them.
25312
25313 2000-08-01  Jim Meyering  <meyering@lucent.com>
25314
25315         * lib/dirname.c (ISSLASH): Define.
25316         (BACKSLASH_IS_PATH_SEPARATOR): Define.
25317         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
25318         both `\' and `/' may be use as path separators.
25319         Based on a patch from Prashant TR.
25320
25321 2000-07-31  Paul Eggert  <eggert@twinsun.com>
25322
25323         * lib/quotearg.c (quotearg_n_options): Don't make the initial
25324         slot vector a constant, since it might get modified.
25325
25326 2000-07-31  Jim Meyering  <meyering@lucent.com>
25327
25328         * lib/xmalloc.c: Use `virtual memory exhausted', not
25329         `Memory exhausted'.
25330         * lib/obstack.c (print_and_abort): Likewise.
25331
25332 2000-07-30  Paul Eggert  <eggert@twinsun.com>
25333
25334         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
25335         buffer, so that the caller can always quote one small
25336         component of a "memory exhausted" message in slot 0.
25337         From a suggestion by Jim Meyering.
25338
25339 2000-07-30  Jim Meyering  <meyering@lucent.com>
25340
25341         * lib/makepath.c (make_path): Quote the other instance, too.
25342
25343         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
25344         (STATIC_BUF_SIZE): Define.
25345         (quotearg_n_options): Use only statically allocated storage when
25346         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
25347         than STATIC_BUF_SIZE.
25348
25349 2000-07-29  Jim Meyering  <meyering@lucent.com>
25350
25351         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
25352         * lib/dirname.c (dir_name): Likewise.
25353
25354         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
25355         `/'.
25356
25357         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
25358         (dir_name): Assert that there are no trailing slashes.
25359
25360 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
25361
25362         * lib/mbswidth.h (mbswidth): Add a flags argument.
25363         (mbswidth): New declaration.
25364         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
25365         * lib/mbswidth.c (mbswidth): Add a flags argument.
25366         (mbsnwidth): New function.
25367
25368 2000-07-24  Jim Meyering  <meyering@lucent.com>
25369
25370         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
25371
25372 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25373
25374         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
25375
25376 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25377
25378         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
25379         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
25380         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
25381         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
25382         invoke multibyte primitives.
25383
25384 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25385
25386         * lib/quotearg.c:
25387         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
25388         so that mbstate_t is always defined.
25389
25390         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
25391         be 1 in at least one GCC installation, and this configuration
25392         error is likely to be common.  Ignoring MB_LEN_MAX hurts
25393         performance on hosts that have mbrtowc but have only unibyte
25394         locales, but I assume these hosts are rare.
25395
25396 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25397
25398         * lib/mbswidth.c (_XOPEN_SOURCE):
25399         Don't define; this causes problems on Solaris 7.
25400         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
25401
25402 2000-07-23  Jim Meyering  <meyering@lucent.com>
25403
25404         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
25405         too: getgrgid, getpwuid, getuid.
25406
25407 2000-07-23  Jim Meyering  <meyering@lucent.com>
25408
25409         * lib/basename.c (base_name): Add an assertion.
25410
25411 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
25412
25413         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
25414         shadow its mbsinit function.
25415
25416 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
25417
25418         * lib/mbswidth.h: New file.
25419         * lib/mbswidth.c: New file.
25420         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
25421         (noinst_HEADERS): Add mbswidth.h.
25422
25423 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
25424
25425         * lib/config.charset: Add support for FreeBSD. Improve support for
25426         HP-UX and IRIX 6.
25427
25428 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
25429
25430         * m4/mbswidth.m4: New file.
25431         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
25432
25433 2000-07-15  Jim Meyering  <meyering@lucent.com>
25434
25435         * lib/makepath.c: Include quote.h.
25436         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
25437         corresponding argument in a `quote (...)' call.
25438         Give better diagnostics.
25439
25440         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
25441         (noinst_HEADERS): Add quote.h.
25442
25443         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
25444         from tar's src/misc.c.
25445         * lib/quote.h: New file.  Prototypes for same.
25446
25447 2000-07-14  Paul Eggert  <eggert@twinsun.com>
25448
25449         From a suggestion by Bruno Haible.
25450         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
25451         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
25452         to decide whether to define the BeOS workaround macro;
25453         this adjusts to the change to AC_MBSTATE_T.
25454
25455 2000-07-14  Jim Meyering  <meyering@lucent.com>
25456
25457         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
25458         jm_AC_TYPE_UINTMAX_T.
25459
25460 2000-07-13  Paul Eggert  <eggert@twinsun.com>
25461
25462         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
25463
25464         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
25465         quotearg_buffer_restyled): Add support for
25466         clocale_quoting_style.  Undo previous change to
25467         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
25468         and "{RIGHT QUOTATION MARK}" msgids.
25469
25470 2000-07-10  Paul Eggert  <eggert@twinsun.com>
25471
25472         From a suggestion by Bruno Haible.
25473         * m4/mbstate_t.m4 (AC_MBSTATE_T):
25474         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
25475         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
25476         and mbstate_t, to a single-part test that simply defines mbstate_t.
25477         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
25478         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
25479
25480 2000-07-10  Jim Meyering  <meyering@lucent.com>
25481
25482         * m4/strerror_r.m4: Mirror the correction made in autoconf.
25483
25484         * m4/gnu-source.m4: Output to confdefs.h directly.
25485         Suggestion from Akim Demaille.
25486
25487 2000-07-09  Paul Eggert  <eggert@twinsun.com>
25488
25489         The old behavior of quoting `like this' doesn't look good with
25490         newer, ISO-style fonts.  See:
25491         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
25492
25493         Instead, quote "like this" by default.  Let the translator
25494         tailor the locale-specific quoting behavior by providing
25495         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
25496
25497         * lib/quotearg.c (N_): New macro.
25498         (gettext_default): New function.
25499         (quotearg_buffer_restyled): Use
25500         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
25501         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
25502
25503 2000-07-09  Jim Meyering  <meyering@lucent.com>
25504
25505         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
25506         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
25507
25508         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
25509         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
25510
25511 2000-07-09  Jim Meyering  <meyering@lucent.com>
25512
25513         * lib/Most files: Update copyright dates to include 2000.
25514
25515 2000-07-08  Jim Meyering  <meyering@lucent.com>
25516
25517         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
25518         if not defined.
25519         (xgethostname): Remove now-unnecessary #ifdef.
25520         Move declaration of `err' into loop where it's used.
25521
25522 2000-07-05  Paul Eggert  <eggert@twinsun.com>
25523         and Bruno Haible  <haible@clisp.cons.org>
25524
25525         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
25526         only if the test for an object-type mbstate_t fails.  This
25527         prevents us from mistakenly reporting that mbstate_t is a
25528         system object type after we "#define mbstate_t int" to work
25529         around its lack.
25530
25531 2000-07-05  Paul Eggert  <eggert@twinsun.com>
25532         and Bruno Haible  <haible@clisp.cons.org>
25533
25534         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
25535
25536 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
25537
25538         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
25539         to strerror_r.
25540         Include <ctype.h> for use of isalpha.
25541
25542 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
25543
25544         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
25545         by allocating a larger buffer. Test the gethostname return value for
25546         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
25547         returns an error and ENAMETOOLONG isn't defined.
25548
25549 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
25550
25551         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
25552         dimension.
25553
25554 2000-07-04  Jim Meyering  <meyering@lucent.com>
25555
25556         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
25557         of the deprecated AC_CHECKING.
25558
25559 2000-07-04  Jim Meyering  <meyering@lucent.com>
25560
25561         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
25562         Reported by Bruno Haible.
25563
25564 2000-07-04  Jim Meyering  <meyering@lucent.com>
25565
25566         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
25567         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
25568         lacks mbrtowc.
25569
25570 2000-07-03  Paul Eggert  <eggert@twinsun.com>
25571
25572         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
25573         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
25574
25575 2000-07-03  Paul Eggert  <eggert@twinsun.com>
25576         and Bruno Haible  <haible@clisp.cons.org>
25577
25578         * lib/quotearg.c (mbrtowc):
25579         Assign to *pwc, and return 1 only if result is nonzero.
25580         (iswprint): Use ISPRINT when substituting our own mbrtowc.
25581
25582 2000-07-03  Jim Meyering  <meyering@lucent.com>
25583
25584         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
25585
25586 2000-07-03  Jim Meyering  <meyering@lucent.com>
25587
25588         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
25589         This is necessary to get a definition of e.g., UTMP_FILE on
25590         HP-UX 10.20.
25591         From Bob Proulx.
25592
25593 2000-07-02  Jim Meyering  <meyering@lucent.com>
25594
25595         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
25596
25597         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
25598         AC_LIBOBJ(function_name).
25599         * m4/chown.m4: Likewise.
25600         * m4/fnmatch.m4: Likewise.
25601         * m4/ftruncate.m4: Likewise.
25602         * m4/getgroups.m4: Likewise.
25603         * m4/getline.m4: Likewise.
25604         * m4/group-member.m4: Likewise.
25605         * m4/jm-macros.m4: Likewise.
25606         * m4/lstat.m4: Likewise.
25607         * m4/malloc.m4: Likewise.
25608         * m4/memcmp.m4: Likewise.
25609         * m4/nanosleep.m4: Likewise.
25610         * m4/putenv.m4: Likewise.
25611         * m4/realloc.m4: Likewise.
25612         * m4/regex.m4: Likewise.
25613         * m4/stat.m4: Likewise.
25614         * m4/strftime.m4: Likewise.
25615
25616 2000-07-02  Jim Meyering  <meyering@lucent.com>
25617
25618         * lib/quotearg.c (mbstate_t): Don't define here.
25619
25620 2000-07-02  Jim Meyering  <meyering@lucent.com>
25621
25622         * lib/nanosleep.c (SIGCONT): Define if not already defined.
25623
25624 2000-07-01  Jim Meyering  <meyering@lucent.com>
25625
25626         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
25627
25628 2000-07-01  Jim Meyering  <meyering@lucent.com>
25629
25630         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
25631         problem.
25632
25633 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
25634
25635         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
25636         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
25637
25638 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
25639
25640         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
25641         per change in ../m4/ls-mntd-fs.m4.
25642         (read_filesystem_list): Ignore symbolic links.
25643
25644 2000-06-29  Jim Meyering  <meyering@lucent.com>
25645
25646         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
25647         for declaration of strcmp.
25648
25649         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
25650
25651         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
25652         Avoid warning by casting result to `char *' to remove `const'.
25653
25654 2000-06-28  Jim Meyering  <meyering@lucent.com>
25655
25656         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
25657         included by quotearg.c, for which we perform this test.  From
25658         Bruno Haible.
25659
25660 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
25661
25662         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
25663         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
25664         <utmpx.h> exists, put readutmp.o into LIBOBJS.
25665
25666 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
25667
25668         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
25669
25670 2000-06-26  Paul Eggert  <eggert@twinsun.com>
25671
25672         savedir now sets errno on failure and invokes xmalloc to get memory.
25673         Fix a couple of other minor bugs while we're at it.
25674
25675         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
25676         (NAMLEN): Remove macro.
25677         (malloc, realloc): Remove decls.
25678         (stpcpy): Likewise.
25679         ("xalloc.h"): Include.
25680         (NAME_SIZE_DEFAULT): New macro.
25681         (savedir): Use xmalloc / xrealloc to allocate memory.
25682         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
25683         Skip "" directory entries.
25684         Use strlen to calculate directory entry length, since the old method
25685         is rarely used these days and isn't worth supporting.
25686         Don't use a pointer after freeing it.
25687         Check for integer overflow when calculating allocation size.
25688         Use memcpy to copy entries, instead of stpcpy.
25689         Set errno properly when returning NULL.
25690         Check for readdir error.
25691
25692 2000-06-26  Jim Meyering  <meyering@lucent.com>
25693
25694         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
25695
25696 2000-06-25  Jim Meyering  <meyering@lucent.com>
25697
25698         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
25699         Linux header bug when _XOPEN_SOURCE is defined to 500.
25700
25701 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
25702
25703         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
25704         deficiency.
25705
25706 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
25707
25708         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
25709         Include xalloc.h.
25710         Don't include <stdlib.h>.  Don't declare malloc, realloc.
25711
25712 2000-06-24  Jim Meyering  <meyering@lucent.com>
25713
25714         * m4/strerror_r.m4: Revive this file -- to try out an experimental
25715         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
25716         for which strerror does return char*, but which lacks a conveniently
25717         accessible declaration of the function.  If the compile-test says
25718         strerror_r doesn't work, then resort to a `run'-test that works on
25719         BeOS and segfaults on DEC Unix.
25720
25721 2000-06-24  Jim Meyering  <meyering@lucent.com>
25722
25723         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
25724
25725 2000-06-23  Paul Eggert  <eggert@twinsun.com>
25726
25727         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
25728         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
25729
25730 2000-06-23  Paul Eggert  <eggert@twinsun.com>
25731
25732         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
25733         (mbrtowc, mbstate_t): Define substitutes if
25734         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
25735         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
25736         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
25737
25738 2000-06-23  Jim Meyering  <meyering@lucent.com>
25739
25740         * m4/afs.m4: Add missing AC_MSG_RESULT.
25741         Reported by Bruno Haible.
25742
25743         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
25744         Suggestion from Bruno Haible.
25745
25746 2000-06-23  Jim Meyering  <meyering@lucent.com>
25747
25748         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
25749
25750 2000-06-21  Jim Meyering  <meyering@lucent.com>
25751
25752         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
25753
25754 2000-06-21  Jim Meyering  <meyering@lucent.com>
25755
25756         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
25757         (noinst_HEADERS): Add getstr.h.
25758
25759         * lib/getline.c (getstr): Move into a separate file.
25760         * lib/getstr.c (getstr): New file, extracted from getline.c, with
25761         the following changes: new parameter, delim2; both delim[12]
25762         parameters have type `int', not `char'.  The latter would lose
25763         with 8-bit delimiters.
25764         * lib/getstr.h: New file.
25765
25766 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
25767
25768         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
25769         than 1024, return a memory chunk of least possible size, instead
25770         of size PATH_MAX + 2. In the loop, increment the size proportionally.
25771         Use free/xmalloc instead of xrealloc to avoid copying for very long
25772         paths.
25773
25774 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
25775
25776         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
25777         the empty string.
25778
25779 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
25780
25781         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
25782         address, not strdup.  Include <stdlib.h> and don't declare free().
25783
25784 2000-06-19  Jim Meyering  <meyering@lucent.com>
25785
25786         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
25787
25788 2000-06-18  Jim Meyering  <meyering@lucent.com>
25789
25790         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
25791
25792         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
25793         `checking whether...' message to be consistent with that of the
25794         lstat test.
25795
25796 2000-06-18  Jim Meyering  <meyering@lucent.com>
25797
25798         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
25799         Besides, these days every porting target provides a mkdir function.
25800
25801         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
25802         needed. (this snippet comes from src/system.h).
25803
25804 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
25805
25806         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
25807
25808 2000-06-15  Paul Eggert  <eggert@twinsun.com>
25809
25810         * lib/human.c (adjust_value): New function.
25811         (human_readable_inexact): Apply rounding style even when
25812         printing approximate values.
25813
25814 2000-06-14  Paul Eggert  <eggert@twinsun.com>
25815
25816         * lib/human.c (human_readable_inexact): Allow an input block
25817         size that is not a multiple of the output block size, and vice versa.
25818         Reported by Piergiorgio Sartor.
25819
25820 2000-06-14  Paul Eggert  <eggert@twinsun.com>
25821
25822         * lib/getdate.y (get_date): Apply relative times after time
25823         zone indicator, not before.  Reported by Todd A. Jacobs.
25824
25825 2000-06-13  Jim Meyering  <meyering@lucent.com>
25826
25827         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
25828
25829         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
25830
25831 2000-06-12  Paul Eggert  <eggert@twinsun.com>
25832
25833         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
25834
25835 2000-06-12  Jim Meyering  <meyering@lucent.com>
25836
25837         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
25838         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
25839         optional argument.
25840         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
25841         the optional argument, `lib'.
25842
25843 2000-06-08  Jim Meyering  <meyering@lucent.com>
25844
25845         * m4/largefile.m4: Remove file (now that it's part of autoconf).
25846
25847 2000-06-04  Paul Eggert  <eggert@twinsun.com>