getlogin_r.h was replaced with <unistd.h>.
[gnulib.git] / ChangeLog
1 2007-02-22  Bruno Haible  <bruno@clisp.org>
2
3         * lib/glob.c: Don't include getlogin_r.h.
4
5 2007-02-22  Jim Meyering  <jim@meyering.net>
6
7         * modules/utimens (Depends-on): Add timespec, required for
8         utimens.h's inclusion of timespec.h.
9
10 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
11
12         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
13         long unreadable paths in GNU/Linux.  Problem reported by Andreas
14         Schwab in
15         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
16         I'll try to think of a better way to fix the Solaris problem.
17
18         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
19         like glibc; on Solaris 10, it fails with errno == EINVAL.
20         POSIX says the behavior is unspecified if the first argument is NULL,
21         so play it safe and never pass NULL to the system getcwd.
22
23 2007-02-21  Jim Meyering  <jim@meyering.net>
24
25         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
26         of gettimeofday.  It would conflict with the one now always
27         provided via sys_time_.h.  Reported by Matthew Woehlke, as
28         an IRIX 6.5 build failure.
29
30 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
31
32         Minor fixups to port to Solaris 10 with Sun C 5.8.
33         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
34         * modules/getcwd (Depends-on): Add dirfd.
35         * lib/putenv.c (putenv): #undef it.
36         (rpl_putenv): New decl.
37         (malloc, free): Include <stdlib.h> rather than prototyping separately.
38
39 2007-02-20  Bruno Haible  <bruno@clisp.org>
40
41         * modules/stdio-tests: New file.
42         * tests/test-stdio.c: New file.
43
44         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
45         (Depends-on): Add stdio.
46         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
47         (Include): Use <stdio.h> instead of vsnprintf.h.
48         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
49         HAVE_DECL_VSNPRINTF.
50         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
51
52         * modules/snprintf (Files): Remove lib/snprintf.h.
53         (Depends-on): Add stdio.
54         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
55         (Include): Use <stdio.h> instead of snprintf.h.
56         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
57         HAVE_DECL_SNPRINTF.
58         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
59         * lib/getaddrinfo.c: Likewise.
60
61         * modules/stdio: New file.
62         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
63         * lib/snprintf.h: Remove file.
64         * lib/vsnprintf.h: Remove file.
65         * lib/.cppi-disable: Remove snprintf.h.
66         * m4/stdio_h.m4: New file.
67         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
68
69 2007-02-20  Jim Meyering  <jim@meyering.net>
70
71         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
72         used by e.g., mingw.  From Bruno Haible.
73
74 2007-02-19  Bruno Haible  <bruno@clisp.org>
75
76         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
77         warnings.
78         Reported by Ben Pfaff <blp@cs.stanford.edu>.
79
80 2007-02-19  Bruno Haible  <bruno@clisp.org>
81
82         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
83         from mingw users.
84
85 2007-02-19  Bruno Haible  <bruno@clisp.org>
86
87         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
88         warnings.
89         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
90
91 2007-02-19  Jim Meyering  <jim@meyering.net>
92
93         Don't use FD after a successful "fdopendir (fd)".
94         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
95         Reset it by calling dirfd on the just-obtained DIR*.
96
97         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
98         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
99
100 2007-02-18  Bruno Haible  <bruno@clisp.org>
101
102         * lib/readlink.c: Include <unistd.h>.
103         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
104         HAVE_READLINK.
105         * modules/readlink (Depends-on): Add unistd.
106         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
107         (Include): Add <unistd.h>.
108
109         * lib/getlogin_r.h: Remove file.
110         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
111         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
112         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
113         HAVE_DECL_GETLOGIN_R.
114         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
115         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
116         (Include): Use <unistd.h> instead of getlogin_r.h.
117
118         * lib/getcwd.h: Remove file.
119         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
120         * lib/xgetcwd.c: Likewise.
121         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
122         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
123         * modules/getcwd (Files): Remove lib/getcwd.h.
124         (Depends-on): Add unistd.
125         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
126         (Include): Use <unistd.h> instad of getcwd.h.
127
128         * lib/ftruncate.c: Include <unistd.h> first.
129         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
130         Set HAVE_FTRUNCATE.
131         * modules/ftruncate (Depends-on): Add unistd.
132         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
133
134         * lib/fchdir.c: Include <unistd.h> first.
135         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
136         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
137         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
138         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
139         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
140
141         * lib/dup2.c: Include <unistd.h> first.
142         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
143         HAVE_DUP2.
144         * modules/dup2 (Depends-on): Add unistd.
145         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
146
147         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
148         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
149         REPLACE_CHOWN. Don't define chown as a macro here.
150         * modules/chown (Depends-on): Add unistd.
151         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
152
153         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
154         Add definition for GL_LINK_WARNING.
155         (chown, dup2): New declarations.
156         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
157         link warning.
158         (ftruncate): New declaration.
159         (getcwd): New declaration, taken from old getcwd.h.
160         (getlogin_r): New declaration, taken from old getlogin_r.h.
161         (readlink): New declaration.
162         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
163         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
164         (gl_PREREQ_UNISTD): Remove macro.
165         (gl_UNISTD_MODULE_INDICATOR): New macro.
166         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
167         many new variables. Don't set UNISTD_H.
168         * modules/unistd (Description): Change.
169         (Depends-on): Add link-warning.
170         (configure.ac): Update.
171         (Makefile.am): Create unistd.h always. Substitute many new variables
172         into it.
173
174 2007-02-18  Bruno Haible  <bruno@clisp.org>
175
176         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
177         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
178         HAVE_GETSUBOPT.
179         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
180         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
181         * lib/getsubopt.h: Remove file.
182         * modules/getsubopt (Files): Remove lib/getsubopt.h.
183         (Depends-on): Add stdlib.
184         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
185         (Includes): Use <stdlib.h> instead of getsubopt.h.
186         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
187         Set HAVE_GETSUBOPT.
188         * lib/getsubopt.c: Don't include getsubopt.h.
189
190 2007-02-18  Bruno Haible  <bruno@clisp.org>
191
192         * modules/fchdir (Depends-on): Add dup2.
193
194 2007-02-18  Bruno Haible  <bruno@clisp.org>
195
196         * lib/stdlib_.h: Handle glibc's special invocation convention
197         specially.
198
199 2007-02-18  Bruno Haible  <bruno@clisp.org>
200
201         * modules/stdlib-tests: New file.
202         * tests/test-stdlib.c: New file.
203
204         * modules/mkstemp (Files): Remove lib/mkstemp.h.
205         (Depends-on): Add stdlib.
206         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
207         (Includes): Use <stdlib.h> instead of mkstemp.h.
208         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
209         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
210         * lib/mkstemp.c: Don't include mkstemp.h.
211         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
212         * lib/stdlib--.h: Don't include mkstemp.h.
213
214         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
215         (Depends-on): Add stdlib.
216         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
217         (Includes): Use <stdlib.h> instead of mkdtemp.h.
218         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
219         HAVE_MKDTEMP.
220         * lib/mkdtemp.c: Don't include mkdtemp.h.
221         * lib/clean-temp.c: Don't include mkdtemp.h.
222
223         * modules/exit (Files): Remove lib/exit.h.
224         (Depends-on): Add stdlib.
225         (Makefile.am): Remove lib_SOURCES.
226         (Include): Use <stdlib.h> instead of exit.h.
227         * lib/argmatch.c: Don't include exit.h.
228         * lib/execute.c: Likewise.
229         * lib/pagealign_alloc.c: Likewise.
230         * lib/pipe.c: Likewise.
231         * lib/wait-process.c: Likewise.
232         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
233         * lib/exitfail.c: Likewise.
234         * lib/savewd.c: Likewise.
235         * lib/xsetenv.c: Likewise.
236
237         * modules/stdlib: New file.
238         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
239         and extra comments about mkstemp().
240         * lib/exit.h: Remove file.
241         * lib/mkdtemp.h: Remove file.
242         * lib/mkstemp.h: Remove file.
243         * m4/stdlib_h.m4: New file.
244         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
245
246 2007-02-18  Bruno Haible  <bruno@clisp.org>
247
248         * modules/math-tests: New file.
249         * tests/test-math.c: New file.
250
251         * modules/math: New file.
252         * modules/mathl (Files): Remove lib/mathl.h.
253         (Depends-on): Add math.
254         (Makefile.am): Don't mention mathl.h.
255         (Include): Use <math.h> instead of mathl.h.
256         * lib/math_.h: New file.
257         * lib/mathl.h: Remove file.
258         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
259         mathl.h.
260         * lib/asinl.c: Likewise.
261         * lib/atanl.c: Likewise.
262         * lib/ceill.c: Likewise.
263         * lib/cosl.c: Likewise.
264         * lib/expl.c: Likewise.
265         * lib/floorl.c: Likewise.
266         * lib/frexpl.c: Likewise.
267         * lib/ldexpl.c: Likewise.
268         * lib/logl.c: Likewise.
269         * lib/sincosl.c: Likewise.
270         * lib/sinl.c: Likewise.
271         * lib/sqrtl.c: Likewise.
272         * lib/tanl.c: Likewise.
273         * lib/trigl.c: Likewise.
274         * m4/math_h.m4: New file.
275         * MODULES.html.sh (Mathematics): Add math.
276
277 2007-02-17  Bruno Haible  <bruno@clisp.org>
278
279         * modules/wctype-tests: New file.
280         * tests/test-wctype.c: New file.
281
282         * modules/wchar-tests: New file.
283         * tests/test-wchar.c: New file.
284
285         * modules/unistd-tests: New file.
286         * tests/test-unistd.c: New file.
287
288         * modules/time-tests: New file.
289         * tests/test-time.c: New file.
290
291         * modules/sysexits-tests: New file.
292         * tests/test-sysexits.c: New file.
293
294         * modules/sys_time-tests: New file.
295         * tests/test-sys_time.c: New file.
296
297         * modules/sys_stat-tests: New file.
298         * tests/test-sys_stat.c: New file.
299
300         * modules/sys_socket-tests: New file.
301         * tests/test-sys_socket.c: New file.
302
303         * modules/sys_select-tests: New file.
304         * tests/test-sys_select.c: New file.
305
306         * modules/string-tests: New file.
307         * tests/test-string.c: New file.
308
309         * modules/stdbool-tests: New file.
310         * tests/test-stdbool.c: New file.
311
312         * modules/netinet_in-tests: New file.
313         * tests/test-netinet_in.c: New file.
314
315         * modules/inttypes-tests: New file.
316         * tests/test-inttypes.c: New file.
317
318         * modules/fcntl-tests: New file.
319         * tests/test-fcntl.c: New file.
320
321         * modules/byteswap-tests: New file.
322         * tests/test-byteswap.c: New file.
323
324         * modules/arpa_inet-tests: New file.
325         * tests/test-arpa_inet.c: New file.
326
327 2007-02-17  Bruno Haible  <bruno@clisp.org>
328
329         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
330         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
331         if the corresponding module is not enabled. Emit link warnings if
332         the function is used nevertheless.
333         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
334         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
335         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
336         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
337         * modules/inttypes (Depends-on): Add link-warning.
338         (Makefile.am): Copy the contents of build-aux/link-warning.h into
339         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
340         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
341         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
342         * modules/imaxdiv (configure.ac): Likewise.
343         * modules/strtoimax (configure.ac): Likewise.
344         * modules/strtoumax (configure.ac): Likewise.
345
346 2007-02-17  Bruno Haible  <bruno@clisp.org>
347
348         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
349         gl_STRING_MODULE_INDICATOR_DEFAULTS.
350         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
351         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
352
353 2007-02-17  Bruno Haible  <bruno@clisp.org>
354
355         * modules/link-warning: New file.
356         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
357         * lib/string_.h (GL_LINK_WARNING): Remove definition.
358         * modules/string (Depends-on): Add link-warning.
359         (Makefile.am): Copy the contents of build-aux/link-warning.h into
360         string.h.
361         * MODULES.html.sh (Support for building libraries and executables): Add
362         link-warning.
363
364 2007-02-17  Bruno Haible  <bruno@clisp.org>
365
366         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
367         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
368         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
369         long lines.
370
371 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
372             Bruno Haible  <bruno@clisp.org>
373
374         * modules/tmpfile: New file.
375         * lib/tmpfile.c: New file.
376         * m4/tmpfile.m4: New file.
377         * MODULES.html.sh (func_all_modules): New section "Input/output".
378
379 2007-02-15  Bruno Haible  <bruno@clisp.org>
380
381         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
382         (supports_delete_on_close): New function.
383         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
384
385 2007-02-14  Bruno Haible  <bruno@clisp.org>
386
387         * modules/mbspcasecmp-tests: New file.
388         * tests/test-mbspcasecmp.sh: New file.
389         * tests/test-mbspcasecmp.c: New file.
390
391         New module mbspcasecmp.
392         * modules/mbspcasecmp: New file.
393         * lib/mbspcasecmp.c: New file.
394         * lib/string_.h (strncasecmp): Change warning message.
395         (mbspcasecmp): New declaration.
396         * m4/mbspcasecmp.m4: New file.
397         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
398         GNULIB_MBSPCASECMP.
399         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
400         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
401
402 2007-02-14  Bruno Haible  <bruno@clisp.org>
403
404         * modules/mbsncasecmp-tests: New file.
405         * tests/test-mbsncasecmp.sh: New file.
406         * tests/test-mbsncasecmp.c: New file.
407
408         New module mbsncasecmp.
409         * modules/mbsncasecmp: New file.
410         * lib/mbsncasecmp.c: New file.
411         * lib/string_.h (mbsncasecmp): New declaration.
412         * m4/mbsncasecmp.m4: New file.
413         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
414         GNULIB_MBSNCASECMP.
415         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
416         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
417
418 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
419
420         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
421         Verify that it doesn't overlap with our flags.
422         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
423         do not have the desired effect in multibyte locales; instead, use
424         mbscasecmp.
425         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
426         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
427         we don't require GNU fnmatch ourselves (if our users require it, they
428         should do so explicitly).
429
430         Fix regex code so it doesn't rely on strcasecmp.
431         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
432         Otherwise, include gnulib's langinfo.h.
433         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
434         undesirable behavior in non-C locales.  Instead, rely on localecharset.
435         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
436         * modules/regex (FILES): Remove m4/codeset.m4.
437         (Depends-on): Add localcharset.  Remove strcase.
438
439 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
440
441         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
442         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
443
444 2007-02-13  Bruno Haible  <bruno@clisp.org>
445
446         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
447         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
448
449 2007-02-12  Bruno Haible  <bruno@clisp.org>
450
451         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
452         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
453         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
454         time warning rather than a link error.
455
456 2007-02-12  Bruno Haible  <bruno@clisp.org>
457
458         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
459         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
460         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
461
462 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
463
464         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
465         args, not 2.
466
467 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
468
469         New module 'time', so that apps can include <time.h> as per
470         POSIX and GNU instead of separate include files like time_r.h
471         and timegm.h.  This implementation tries out a simpler approach
472         for replacing decls in standard include files (as compared to
473         the string module), somewhat as an experiment.
474
475         * config/srclist.txt: Comment out mktime.c for now.
476         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
477         since it doesn't apply any more.  Use generic wording instead.
478         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
479         'time'.
480         * lib/time_.h, m4/time_h.m4, modules/time: New files.
481         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
482         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
483         Don't include <sys/types.h>; no longer needed since we assume C89.
484         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
485         * lib/strftime.c: Likewise.
486         * lib/time_r.c: Likewise.
487         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
488         * lib/nanosleep.c: Include <time.h> first, to check interface.
489         * lib/strptime.c: Likewise.
490         * lib/time_r.c: Likewise.
491         * lib/timegm.c: Likewise.
492         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
493         needed.
494         * lib/timegm.c: Don't include timegm.h; no longer needed.
495         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
496         time.h now handles any problems in that area.
497         (struct timespec, nanosleep): Remove; time.h now arranges for these.
498         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
499         that time.h defines struct timespec.
500         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
501         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
502         handles that.
503         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
504         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
505         needed.  Set REPLACE_LOCALTIME.
506         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
507         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
508         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
509         nanosleep; time_h.m4 now does that.  Don't require
510         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
511         module handles this now.
512         * modules/getdate (Depends-on): Remove timespec.  Add time.
513         * modules/nanosleep (Depends-on): Likewise.
514         * modules/stat-time (Depends-on): Likewise.
515         * modules/nanosleep (Include): Include time.h, not timespec.h.
516         * modules/strptime (Files): Remove lib/strptime.h.
517         (Depends-on): Add extensions, time.
518         (Include): Include time.h, not strptime.h.
519         * modules/time_r (Files): Remove lib/time_r.h.
520         (Depends-on): Add time.
521         (Include): Include time.h, not time_r.h.
522         * modules/timegm: Likewise.
523         * modules/timespec (Description): Now does timespec-related decls
524         of our own, instead of struct timespec itself.
525         (Depends-on): Add time; remove extensions.
526         (Maintainer): Add self.
527         * modules/utimecmp (Depends-on): Add time; remove timespec.
528         * modules/utimens (Depends-on): Likewise.
529         * modules/xnanosleep (Depends-on): Likewise.
530
531 2007-02-11  Bruno Haible  <bruno@clisp.org>
532
533         * lib/c-strstr.c: Include allocsa.h.
534         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
535         * lib/c-strcasestr.c: Include allocsa.h.
536         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
537         * lib/strcasestr.c: Include allocsa.h.
538         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
539         * lib/mbsstr.c: Include allocsa.h.
540         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
541         allocsa/freesa instead of malloc/free.
542         * lib/mbscasestr.c: Include allocsa.h.
543         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
544         allocsa/freesa instead of malloc/free.
545         * modules/c-strstr (Depends-on): Add allocsa.
546         * modules/c-strcasestr (Depends-on): Likewise.
547         * modules/strcasestr (Depends-on): Likewise.
548         * modules/mbsstr (Depends-on): Likewise.
549         * modules/mbscasestr (Depends-on): Likewise.
550
551 2007-02-11  Bruno Haible  <bruno@clisp.org>
552
553         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
554
555         * modules/mbsspn-tests: New file.
556         * tests/test-mbsspn.sh: New file.
557         * tests/test-mbsspn.c: New file.
558
559 2007-02-11  Bruno Haible  <bruno@clisp.org>
560
561         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
562
563         * modules/mbspbrk-tests: New file.
564         * tests/test-mbspbrk.sh: New file.
565         * tests/test-mbspbrk.c: New file.
566
567 2007-02-11  Bruno Haible  <bruno@clisp.org>
568
569         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
570         unneeded cast.
571
572         * modules/mbscspn-tests: New file.
573         * tests/test-mbscspn.sh: New file.
574         * tests/test-mbscspn.c: New file.
575
576 2007-02-11  Bruno Haible  <bruno@clisp.org>
577
578         * modules/mbscasecmp-tests: New file.
579         * tests/test-mbscasecmp.sh: New file.
580         * tests/test-mbscasecmp.c: New file.
581
582 2007-02-11  Bruno Haible  <bruno@clisp.org>
583
584         Ensure O(n) worst-case complexity of mbscasestr.
585         * lib/mbscasestr.c: Include stdbool.h.
586         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
587         functions.
588         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
589         the bookkeeping indicates that it's worth it.
590         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
591
592         * modules/mbscasestr-tests: New file.
593         * tests/test-mbscasestr1.c: New file.
594         * tests/test-mbscasestr2.sh: New file.
595         * tests/test-mbscasestr2.c: New file.
596         * tests/test-mbscasestr3.sh: New file.
597         * tests/test-mbscasestr3.c: New file.
598         * tests/test-mbscasestr4.sh: New file.
599         * tests/test-mbscasestr4.c: New file.
600         * m4/locale-tr.m4: New file.
601
602 2007-02-11  Bruno Haible  <bruno@clisp.org>
603
604         Ensure O(n) worst-case complexity of mbsstr.
605         * lib/mbsstr.c: Include stdbool.h.
606         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
607         functions.
608         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
609         bookkeeping indicates that it's worth it.
610         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
611
612         * modules/mbsstr-tests: New file.
613         * tests/test-mbsstr1.c: New file.
614         * tests/test-mbsstr2.sh: New file.
615         * tests/test-mbsstr2.c: New file.
616         * tests/test-mbsstr3.sh: New file.
617         * tests/test-mbsstr3.c: New file.
618         * m4/locale-fr.m4: New file.
619
620 2007-02-11  Bruno Haible  <bruno@clisp.org>
621
622         * lib/mbsrchr.c (mbsrchr): Fix bug.
623
624         * modules/mbsrchr-tests: New file.
625         * tests/test-mbsrchr.sh: New file.
626         * tests/test-mbsrchr.c: New file.
627
628 2007-02-11  Bruno Haible  <bruno@clisp.org>
629
630         * lib/mbschr.c (mbschr): Fix bug.
631
632         * modules/mbschr-tests: New file.
633         * tests/test-mbschr.sh: New file.
634         * tests/test-mbschr.c: New file.
635         * m4/locale-zh.m4: New file.
636
637 2007-02-11  Bruno Haible  <bruno@clisp.org>
638
639         Support for copying multibyte string iterators.
640         * lib/mbiter.h: Include <string.h>.
641         (mbiter_multi_copy): New function.
642         (mbi_copy): New macro.
643         * lib/mbuiter.h: Include <string.h>.
644         (mbuiter_multi_copy): New function.
645         (mbui_copy): New macro.
646
647 2007-02-11  Bruno Haible  <bruno@clisp.org>
648
649         New module mbslen.
650         * modules/mbslen: New file.
651         * lib/mbslen.c: New file.
652         * lib/string_.h (mbslen): New declaration.
653         * m4/mbslen.m4: New file.
654         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
655         GNULIB_MBSLEN.
656         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
657         * MODULES.html.sh (Internationalization functions): Add mbslen.
658
659 2007-02-11  Bruno Haible  <bruno@clisp.org>
660
661         Ensure O(n) worst-case complexity of strcasestr substitute.
662         * lib/strcasestr.c: Include stdbool.h.
663         (knuth_morris_pratt): New function.
664         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
665         bookkeeping indicates that it's worth it.
666         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
667
668         * modules/strcasestr-tests: New file.
669         * tests/test-strcasestr.c: New file.
670
671 2007-02-11  Bruno Haible  <bruno@clisp.org>
672
673         Ensure O(n) worst-case complexity of c_strcasestr.
674         * lib/c-strcasestr.c: Include stdbool.h, string.h.
675         (knuth_morris_pratt): New function.
676         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
677         the bookkeeping indicates that it's worth it.
678         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
679
680         * modules/c-strcasestr-tests: New file.
681         * tests/test-c-strcasestr.c: New file.
682
683 2007-02-11  Bruno Haible  <bruno@clisp.org>
684
685         Ensure O(n) worst-case complexity of c_strstr.
686         * lib/c-strstr.c: Include stdbool.h, string.h.
687         (knuth_morris_pratt): New function.
688         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
689         bookkeeping indicates that it's worth it.
690         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
691
692         * lib/c-strstr.c: Complete rewrite for maintainability.
693
694         * modules/c-strstr-tests: New file.
695         * tests/test-c-strstr.c: New file.
696
697 2007-02-11  Bruno Haible  <bruno@clisp.org>
698
699         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
700         5.2.1 and earlier, whereby \055 was treated just like the range
701         delimiter '-'.
702         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
703
704 2007-02-08  Bruno Haible  <bruno@clisp.org>
705
706         * modules/regex (Depends-on): Add stdbool.
707         Reported by Dalibor Topic <robilad@kaffe.org>.
708
709 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
710
711         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
712         Prefer returning from main to exiting from it.
713         Remove unnecessary parens after sizeof.
714
715 2007-02-05  Bruno Haible  <bruno@clisp.org>
716
717         New module mbssep.
718         * modules/mbssep: New file.
719         * lib/mbssep.c: New file.
720         * lib/string_.h (strsep): Add a conditional link warning.
721         (mbssep): New declaration.
722         * m4/mbssep.m4: New file.
723         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
724         GNULIB_MBSSEP.
725         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
726         * MODULES.html.sh (Internationalization functions): Add mbssep.
727
728 2007-02-05  Bruno Haible  <bruno@clisp.org>
729
730         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
731         Optimize search in case of 1 delimiter.
732
733 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
734
735         * lib/acl.h: Include sys/types.h before sys/acl.h.
736
737 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
738
739         Merge upstream fix for glibc bugzilla #3957:
740
741         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
742
743         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
744         bit for RE_HAT_LISTS_NOT_NEWLINE.
745         (build_charclass_op): Remove bogus comment.
746
747 2007-02-05  Simon Josefsson  <simon@josefsson.org>
748
749         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
750
751 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
752
753         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
754         * lib/memmem.c [!defined _LIBC]: Include config.h.
755
756 2007-02-04  Bruno Haible  <bruno@clisp.org>
757
758         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
759         warning message.
760
761 2007-02-04  Bruno Haible  <bruno@clisp.org>
762
763         New module mbstok_r.
764         * modules/mbstok_r: New file.
765         * lib/mbstok_r.c: New file.
766         * lib/string_.h (strtok_r): Change argument names to match the
767         comments. Add a conditional link warning.
768         (mbstok_r): New declaration.
769         * m4/mbstok_r.m4: New file.
770         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
771         GNULIB_MBSTOK_R.
772         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
773         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
774
775 2007-02-04  Bruno Haible  <bruno@clisp.org>
776
777         New module mbsspn.
778         * modules/mbsspn: New file.
779         * lib/mbsspn.c: New file.
780         * lib/string_.h (strspn): Add a conditional link warning.
781         (mbsspn): New declaration.
782         * m4/mbsspn.m4: New file.
783         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
784         GNULIB_MBSSPN.
785         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
786         * MODULES.html.sh (Internationalization functions): Add mbsspn.
787
788 2007-02-04  Bruno Haible  <bruno@clisp.org>
789
790         New module mbspbrk.
791         * modules/mbspbrk: New file.
792         * lib/mbspbrk.c: New file.
793         * lib/string_.h (strpbrk): Add a conditional link warning.
794         (mbspbrk): New declaration.
795         * m4/mbspbrk.m4: New file.
796         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
797         GNULIB_MBSPBRK.
798         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
799         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
800
801 2007-02-04  Bruno Haible  <bruno@clisp.org>
802
803         New module mbscspn.
804         * modules/mbscspn: New file.
805         * lib/mbscspn.c: New file.
806         * lib/string_.h (strcspn): Add a conditional link warning.
807         (mbscspn): New declaration.
808         * m4/mbscspn.m4: New file.
809         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
810         GNULIB_MBSCSPN.
811         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
812         * MODULES.html.sh (Internationalization functions): Add mbscspn.
813
814 2007-02-04  Bruno Haible  <bruno@clisp.org>
815
816         New module mbscasestr, reduced goal of strcasestr.
817         * modules/mbscasestr: New file.
818         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
819         (mbscasestr): Renamed from strcasestr.
820         * lib/strcasestr.c: Don't include mbuiter.h.
821         (strcasestr): Remove support for multibyte locales.
822         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
823         Change the conditional link warning.
824         (mbscasestr): New declaration.
825         * m4/mbscasestr.m4: New file.
826         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
827         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
828         REPLACE_STRCASESTR.
829         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
830         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
831         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
832         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
833         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
834         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
835         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
836         (Depends-on): Remove mbuiter.
837         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
838
839 2007-02-04  Bruno Haible  <bruno@clisp.org>
840
841         Simplify handling of strncasecmp.
842         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
843         the conditional link warning.
844         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
845         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
846         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
847         * modules/strcase (configure.ac): Don't invoke
848         gl_STRING_MODULE_INDICATOR.
849         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
850
851 2007-02-04  Bruno Haible  <bruno@clisp.org>
852
853         New module mbscasecmp, reduced goal of strcasecmp.
854         * modules/mbscasecmp: New file.
855         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
856         (mbscasecmp): Renamed from strcasecmp.
857         * lib/strcasecmp.c: Don't include mbuiter.h.
858         (strcasecmp): Remove support for multibyte locales.
859         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
860         Change the conditional link warning.
861         (mbscasecmp): New declaration.
862         * m4/mbscasecmp.m4: New file.
863         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
864         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
865         REPLACE_STRCASECMP.
866         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
867         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
868         GNULIB_MBSCASECMP.
869         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
870         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
871         * modules/strcase (Files): Remove m4/mbrtowc.m4.
872         (Depends-on): Remove mbuiter.
873         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
874
875 2007-02-04  Bruno Haible  <bruno@clisp.org>
876
877         New module mbsstr. Remove module strstr.
878         * modules/mbsstr: New file.
879         * modules/strstr: Remove file.
880         * lib/mbsstr.c: Renamed from lib/strstr.c.
881         (mbsstr): Renamed from strstr.
882         * lib/string_.h (strstr): Remove declaration. Change the conditional
883         link warning.
884         (mbsstr): New declaration.
885         * m4/mbsstr.m4: New file.
886         * m4/strstr.m4: Remove file.
887         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
888         REPLACE_STRSTR.
889         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
890         Don't initialize GNULIB_STRSTR.
891         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
892         substitute GNULIB_STRSTR and REPLACE_STRSTR.
893         * MODULES.html.sh (Internationalization functions): Add mbsstr.
894         (Support for systems lacking ANSI C 89): Remove strstr.
895
896 2007-02-04  Bruno Haible  <bruno@clisp.org>
897
898         New module mbsrchr.
899         * modules/mbsrchr: New file.
900         * lib/mbsrchr.c: New file.
901         * lib/string_.h (strrchr): Add a conditional link warning.
902         (mbsrchr): New declaration.
903         * m4/mbsrchr.m4: New file.
904         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
905         GNULIB_MBSRCHR.
906         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
907         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
908
909 2007-02-04  Bruno Haible  <bruno@clisp.org>
910
911         New module mbschr.
912         * modules/mbschr: New file.
913         * lib/mbschr.c: New file.
914         * lib/string_.h (strchr): Add a conditional link warning.
915         (mbschr): New declaration.
916         * m4/mbschr.m4: New file.
917         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
918         GNULIB_MBSCHR.
919         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
920         * MODULES.html.sh (Internationalization functions): Add mbschr.
921
922 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
923
924         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
925
926         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
927
928 2007-02-04  Bruno Haible  <bruno@clisp.org>
929
930         New module description section 'configure.ac-early'.
931         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
932         (func_get_autoconf_early_snippet): New function.
933         (func_import, func_create_testdir): Use it. Remove special cases for
934         modules 'extensions' and 'lock'.
935         * modules/extensions (configure.ac-early): Require
936         gl_USE_SYSTEM_EXTENSIONS.
937         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
938
939 2007-02-04  Bruno Haible  <bruno@clisp.org>
940
941         Make use of gcj-4.3's -fsource and -ftarget option.
942         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
943         and if so try the options -fsource and -ftarget.
944         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
945         source_version, ftarget_option, target_version arguments.
946         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
947         (is_envjavac_oldgcj_14_14_usable): Renamed from
948         is_envjavac_gcj_14_14_usable.
949         (is_envjavac_oldgcj_14_13_usable): Renamed from
950         is_envjavac_gcj_14_13_usable.
951         (is_gcj_present): Update.
952         (is_gcj_43, is_gcj43_usable): New functions.
953         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
954         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
955         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
956         try the options -fsource and -ftarget.
957
958 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
959
960         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
961         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
962         larger value.
963
964 2007-02-03  Jim Meyering  <jim@meyering.net>
965
966         Give tools a better chance to allocate space for very large buffers.
967         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
968
969         Make pwd and readlink work also when run with an unreadable parent dir
970         on systems with openat support.
971         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
972         provided getcwd function, even when we have openat support.
973         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
974
975 2007-02-02  Bruno Haible  <bruno@clisp.org>
976
977         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
978         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
979         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
980         portability problems if one of these functions is only used on specific
981         platforms.
982         Reported by Paul Eggert.
983
984 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
985
986         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
987         is causing more trouble than it's curing.
988         * lib/regex_internal.h (__mempcpy): Remove.
989         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
990         (and make the code a tad smaller to boot).
991         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
992
993 2007-02-02  Jim Meyering  <jim@meyering.net>
994
995         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
996         section, not in the Makefile.am: one.
997
998 2007-02-02  Eric Blake  <ebb9@byu.net>
999
1000         * lib/strchrnul.c: Always include config.h first.
1001
1002         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
1003         gnulib strstr is not necessary here.
1004
1005 2007-02-02  Simon Josefsson  <simon@josefsson.org>
1006
1007         * m4/socklen.m4: Fix typo.
1008
1009 2007-02-02  Eric Blake  <ebb9@byu.net>
1010
1011         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
1012         * modules/netinet_in (Makefile.am): Likewise.
1013
1014 2007-02-01  Bruno Haible  <bruno@clisp.org>
1015
1016         * lib/string_.h (GL_LINK_WARNING): New macro.
1017         (strcasecmp, strstr, strcasestr): If provided by the system,
1018         conditionally define as a macro that leads to a warning instead of to
1019         an error.
1020         (strncasecmp): Conditionally define as a macro that leads to a warning.
1021
1022 2007-02-01  Jim Meyering  <jim@meyering.net>
1023
1024         Give tools a better chance to allocate space for very large buffers.
1025         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
1026
1027 2007-02-01  Karl Berry  <karl@gnu.org>
1028
1029         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
1030
1031 2007-02-01  Bruno Haible  <bruno@clisp.org>
1032
1033         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
1034         renamings.
1035
1036 2007-02-01  Eric Blake  <ebb9@byu.net>
1037
1038         * modules/regex (Depends-on): Revert dependence on mempcpy.
1039         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
1040         module's definition of mempcpy.
1041         Reported by Paul Eggert.
1042
1043 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
1044
1045         * lib/string_.h: If the gnulib module XYZ is not present, undefine
1046         the symbol XYZ before redefining it.  This fixes a problem with
1047         programs that don't use XYZ, when compiled on systems that define
1048         XYZ to something else.
1049
1050 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
1051
1052         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
1053         occurs when "mkdir -m foo" creates a setgid directory that is (1)
1054         writeable to group or other and (2) is intended to have a special
1055         mode bit that is set or cleared.  In such a case, the directory
1056         should be neither group- nor other-writeable until the special
1057         mode bits are right.
1058
1059 2007-01-31  Eric Blake  <ebb9@byu.net>
1060
1061         * modules/mountlist (Depends-on): Add strstr.
1062
1063         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
1064         bug.
1065         * modules/string (Makefile.am): Remove redundant replacement.
1066         * modules/regex (Depends-on): Add mempcpy.
1067
1068 2007-01-31  Bruno Haible  <bruno@clisp.org>
1069
1070         New module description field 'Link'.
1071         * gnulib-tool (func_usage): Document --extract-link-directive.
1072         (sed_extract_prog): Recognize 'Link' directive.
1073         (func_get_link_directive): New function.
1074         (func_import): Show summary of link directives.
1075         Handle --extract-link-directive option.
1076         * modules/acl (Link): New section.
1077         * modules/clock-time (Link): New section.
1078         * modules/euidaccess (Link): New section.
1079         * modules/gettext (Link): New section.
1080         * modules/iconv (Link): New section.
1081         * modules/lock (Link): New section.
1082         * modules/nanosleep (Link): New section.
1083         * modules/readline (Link): New section.
1084
1085 2007-01-27  Bruno Haible  <bruno@clisp.org>
1086
1087         Enforce the use of gnulib modules for unportable <string.h> functions.
1088         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
1089         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
1090         (gl_HEADER_STRING_H_BODY): Require it.
1091         * lib/string_.h: If the gnulib module XYZ is not present, redefine
1092         the symbol XYZ to one that gives a link error.
1093         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
1094         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
1095         * modules/mempcpy (configure.ac): Likewise.
1096         * modules/memrchr (configure.ac): Likewise.
1097         * modules/stpcpy (configure.ac): Likewise.
1098         * modules/stpncpy (configure.ac): Likewise.
1099         * modules/strcase (configure.ac): Likewise.
1100         * modules/strcasestr (configure.ac): Likewise.
1101         * modules/strchrnul (configure.ac): Likewise.
1102         * modules/strdup (configure.ac): Likewise.
1103         * modules/strndup (configure.ac): Likewise.
1104         * modules/strnlen (configure.ac): Likewise.
1105         * modules/strpbrk (configure.ac): Likewise.
1106         * modules/strsep (configure.ac): Likewise.
1107         * modules/strstr (configure.ac): Likewise.
1108         * modules/strtok_r (configure.ac): Likewise.
1109
1110 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
1111
1112         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
1113
1114 2007-01-30  Jim Meyering  <jim@meyering.net>
1115
1116         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
1117
1118 2007-01-29  Bruno Haible  <bruno@clisp.org>
1119
1120         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
1121         * lib/execute.c: Likewise.
1122         * lib/pipe.c: Likewise.
1123         * lib/printf-args.h: Likewise.
1124         * lib/printf-args.c: Likewise.
1125         * lib/printf-parse.c: Likewise.
1126         * lib/vasnprintf.c: Likewise.
1127
1128 2007-01-29  Eric Blake  <ebb9@byu.net>
1129
1130         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
1131         declaration.
1132
1133 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
1134
1135         * lib/strptime.h (strptime): Use 'restrict' for args where
1136         POSIX requires this.
1137         * lib/strptime.c (strptime): Likewise.
1138         Change license notice from LGPL to GPL, since gnulib-tool will
1139         change this as needed.
1140         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
1141         defined.
1142         Include "strptime.h" first, to check interface.
1143         Do not #undef _LIBC and _NL_CURRENT.
1144         Do not include <stdlib.h>; no longer needed.
1145         Include "time_r.h" and declare ptime_locale_status
1146         only if _LIBC is not defined.
1147         (__P): Remove unused macro.
1148         (match_string): Bring back glibc version, but use it only if _LIBC
1149         is defined.
1150         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
1151         Remove unnecessary assertion and abort() call.
1152         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
1153         * m4/strptime.m4: Fix serial number comment.
1154         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
1155         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
1156         (Depends-on): Add time_r.
1157
1158 2007-01-29  Bruno Haible  <bruno@clisp.org>
1159
1160         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
1161         strptime.
1162         * modules/strptime (Depends-on): Add stdbool.
1163         * lib/strptime.h: Include <time.h> always. Add comments.
1164
1165 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
1166
1167         * modules/strptime: New file.
1168         * lib/strptime.h: New file.
1169         * lib/strptime.c: New file.
1170         * m4/strptime.m4: New file.
1171
1172 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
1173
1174         * MODULES.html.sh: New module mpsort.
1175         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
1176
1177         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
1178         a circularity problem with HP-UX ia64 reported by Bob Proulx in
1179         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
1180         All uses changed.
1181         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
1182         All uses changed.
1183         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
1184         to _Restrict_.
1185         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
1186         the parameter matches the prototype.
1187
1188 2007-01-28  Jim Meyering  <jim@meyering.net>
1189
1190         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
1191         sys/time.h here, reverting that part of the previous patch:
1192         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
1193
1194 2007-01-28  Bruno Haible  <bruno@clisp.org>
1195
1196         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
1197         value of $(SYS_TIME_H).
1198         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
1199         remove it conditionally, too. [added by Jim Meyering]
1200         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
1201         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
1202         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
1203         GETTIMEOFDAY_REPLACEMENT to 1.
1204
1205 2007-01-28  Bruno Haible  <bruno@clisp.org>
1206
1207         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
1208         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
1209         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
1210         Set UNISTD_H instead of UNISTD_H2.
1211         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
1212
1213 2007-01-28  Bruno Haible  <bruno@clisp.org>
1214
1215         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
1216         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
1217
1218 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1219
1220         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
1221         (func_create_testdir): Ensure C locale for `grep' and `tr'
1222         character ranges.
1223         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
1224         ACLOCAL_AMFLAGS parsing state machine.
1225
1226 2007-01-27  Bruno Haible  <bruno@clisp.org>
1227
1228         * modules/unistr/base: Update.
1229
1230 2007-01-27  Bruno Haible  <bruno@clisp.org>
1231
1232         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
1233         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
1234         * modules/unistr/u32-mbtouc-unsafe: Renamed from
1235         modules/unistr/u32-mbtouc.
1236         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
1237         * lib/unistr.h: Update.
1238         * lib/linebreak.c: Update.
1239         * modules/unistr/u32-mbtouc: Renamed from
1240         modules/unistr/u32-mbtouc-safe.
1241         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
1242         * lib/unistr.h: Update.
1243         * lib/unistr/u32-to-u8.c: Update.
1244         * lib/unistr/u32-to-u16.c: Update.
1245
1246 2007-01-27  Bruno Haible  <bruno@clisp.org>
1247
1248         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
1249         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
1250         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
1251         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
1252         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
1253         * modules/unistr/u16-mbtouc-unsafe: Renamed from
1254         modules/unistr/u16-mbtouc.
1255         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
1256         * lib/unistr.h: Update.
1257         * lib/linebreak.c: Update.
1258         * modules/linebreak: Update.
1259         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
1260         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
1261         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
1262         * modules/unistr/u16-mbtouc: Renamed from
1263         modules/unistr/u16-mbtouc-safe.
1264         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
1265         * lib/unistr.h: Update.
1266         * lib/unistr/u16-to-u8.c: Update.
1267         * modules/unistr/u16-to-u8: Update.
1268         * lib/unistr/u16-to-u32.c: Update.
1269         * modules/unistr/u16-to-u32: Update.
1270
1271 2007-01-27  Bruno Haible  <bruno@clisp.org>
1272
1273         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
1274         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
1275         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
1276         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
1277         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
1278         * modules/unistr/u8-mbtouc-unsafe: Renamed from
1279         modules/unistr/u8-mbtouc.
1280         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
1281         * lib/unistr.h: Update.
1282         * lib/striconveh.c: Update.
1283         * modules/striconveh: Update.
1284         * lib/linebreak.c: Update.
1285         * modules/linebreak: Update.
1286         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
1287         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
1288         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
1289         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
1290         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
1291         * lib/unistr.h: Update.
1292         * lib/striconveh.c: Update.
1293         * modules/striconveh: Update.
1294         * lib/unistr/u8-to-u16.c: Update.
1295         * modules/unistr/u8-to-u16: Update.
1296         * lib/unistr/u8-to-u32.c: Update.
1297         * modules/unistr/u8-to-u32: Update.
1298
1299 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1300
1301         Sync from Libtool.
1302         * lib/argz.c: Do not include strings.h nor memory.h, include
1303         string.h unconditionally.  Patch by Simon Josefsson.
1304
1305 2007-01-27  Bruno Haible  <bruno@clisp.org>
1306
1307         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
1308         from gl_HEADER_STRING_H_BODY.
1309         (gl_HEADER_STRING_H_BODY): Require it.
1310         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
1311         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
1312         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
1313         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
1314         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
1315         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
1316         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
1317         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
1318         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
1319         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
1320         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
1321         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
1322         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
1323         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
1324         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
1325
1326 2007-01-27  Bruno Haible  <bruno@clisp.org>
1327
1328         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
1329         check_PROGRAMS into noinst_PROGRAMS.
1330         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
1331         check_PROGRAMS in this case.
1332         (func_import): Set for_test to false.
1333         (func_create_testdir): Set for_test to true.
1334
1335 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
1336             Bruno Haible  <bruno@clisp.org>
1337
1338         * modules/strcasestr (Files): Remove lib/strcasestr.h.
1339         (Depends-on): Add string.
1340         (Includes): Use <string.h> instead of strcasestr.h.
1341         * modules/string (Makefile.am): Also substitute the value of
1342         REPLACE_STRCASESTR.
1343         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
1344         assume strcasestr is declared in <string.h> not <strings.h>. Also
1345         set REPLACE_STRCASESTR.
1346         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
1347         REPLACE_STRCASESTR.
1348         * lib/strcasestr.h: Remove file.
1349         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
1350         * lib/string_.h (strcasestr): New declaration.
1351
1352 2007-01-27  Bruno Haible  <bruno@clisp.org>
1353
1354         * lib/string_.h: Use 'extern'.
1355
1356 2007-01-27  Jim Meyering  <jim@meyering.net>
1357
1358         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
1359         of set-but-not-used local, "q".
1360
1361         * lib/mempcpy.c: Include <config.h> before <string.h>.
1362         This fixes a compilation error on HP-UX, due to the system's
1363         "restrict"-using mempcpy prototype.
1364
1365 2007-01-26  Bruno Haible  <bruno@clisp.org>
1366
1367         Small optimization.
1368         * lib/javacomp.c: Include c-strstr.h.
1369          (is_envjavac_gcj): Use c_strstr instead of strstr.
1370         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
1371
1372 2007-01-26  Bruno Haible  <bruno@clisp.org>
1373
1374         * MODULES.html.sh (Unicode string functions): Add the new modules.
1375
1376         * modules/uniconv/u32-strconv-to-locale: New file.
1377         * lib/uniconv/u32-strconv-to-locale.c: New file.
1378
1379         * modules/uniconv/u16-strconv-to-locale: New file.
1380         * lib/uniconv/u16-strconv-to-locale.c: New file.
1381
1382         * modules/uniconv/u8-strconv-to-locale: New file.
1383         * lib/uniconv/u8-strconv-to-locale.c: New file.
1384
1385         * modules/uniconv/u32-strconv-from-locale: New file.
1386         * lib/uniconv/u32-strconv-from-locale.c: New file.
1387
1388         * modules/uniconv/u16-strconv-from-locale: New file.
1389         * lib/uniconv/u16-strconv-from-locale.c: New file.
1390
1391         * modules/uniconv/u8-strconv-from-locale: New file.
1392         * lib/uniconv/u8-strconv-from-locale.c: New file.
1393
1394         * modules/uniconv/u32-strconv-to-enc: New file.
1395         * lib/uniconv/u32-strconv-to-enc.c: New file.
1396         * modules/uniconv/u32-strconv-to-enc-tests: New file.
1397         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
1398
1399         * modules/uniconv/u16-strconv-to-enc: New file.
1400         * lib/uniconv/u16-strconv-to-enc.c: New file.
1401         * lib/uniconv/u-strconv-to-enc.h: New file.
1402         * modules/uniconv/u16-strconv-to-enc-tests: New file.
1403         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
1404
1405         * modules/uniconv/u8-strconv-to-enc: New file.
1406         * lib/uniconv/u8-strconv-to-enc.c: New file.
1407         * modules/uniconv/u8-strconv-to-enc-tests: New file.
1408         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
1409
1410         * modules/uniconv/u32-strconv-from-enc: New file.
1411         * lib/uniconv/u32-strconv-from-enc.c: New file.
1412         * modules/uniconv/u32-strconv-from-enc-tests: New file.
1413         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
1414
1415         * modules/uniconv/u16-strconv-from-enc: New file.
1416         * lib/uniconv/u16-strconv-from-enc.c: New file.
1417         * modules/uniconv/u16-strconv-from-enc-tests: New file.
1418         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
1419
1420         * modules/uniconv/u8-strconv-from-enc: New file.
1421         * lib/uniconv/u8-strconv-from-enc.c: New file.
1422         * lib/uniconv/u-strconv-from-enc.h: New file.
1423         * modules/uniconv/u8-strconv-from-enc-tests: New file.
1424         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
1425
1426         * modules/uniconv/u32-conv-from-enc: New file.
1427         * lib/uniconv/u32-conv-from-enc.c: New file.
1428         * modules/uniconv/u32-conv-from-enc-tests: New file.
1429         * tests/uniconv/test-u32-conv-from-enc.c: New file.
1430
1431         * modules/uniconv/u16-conv-from-enc: New file.
1432         * lib/uniconv/u16-conv-from-enc.c: New file.
1433         * lib/uniconv/u-conv-from-enc.h: New file.
1434         * modules/uniconv/u16-conv-from-enc-tests: New file.
1435         * tests/uniconv/test-u16-conv-from-enc.c: New file.
1436
1437         * modules/uniconv/u8-conv-from-enc: New file.
1438         * lib/uniconv/u8-conv-from-enc.c: New file.
1439         * modules/uniconv/u8-conv-from-enc-tests: New file.
1440         * tests/uniconv/test-u8-conv-from-enc.c: New file.
1441
1442         * modules/uniconv/base: New file.
1443         * lib/uniconv.h: New file.
1444
1445 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
1446
1447         * doc/gnulib-tool.texi (Initial import): Update to match current
1448         behavior with strdup module.
1449         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
1450         * lib/memmem.h: Remove; all uses removed.  This is now done
1451         by <string.h>.
1452         * lib/mempcpy.h: Likewise.
1453         * lib/memrchr.h: Likewise.
1454         * lib/stpcpy.h: Likewise.
1455         * lib/stpncpy.h: Likewise.
1456         * lib/strcase.h: Likewise.
1457         * lib/strchrnul.h: Likewise.
1458         * lib/strdup.h: Likewise.
1459         * lib/strndup.h: Likewise.
1460         * lib/strnlen.h: Likewise.
1461         * lib/strpbrk.h: Likewise.
1462         * lib/strsep.h: Likewise.
1463         * lib/strstr.h: Likewise.
1464         * lib/strtok_r.h: Likewise.
1465         * lib/string_.h: New file.
1466         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
1467         Rely on <string.h> instead.
1468         * lib/canon-host.c: Likewise.
1469         * lib/chdir-long.c: Likewise.
1470         * lib/concatpath.c: Likewise.
1471         * lib/exclude.c: Likewise.
1472         * lib/fchdir.c: Likewise.
1473         * lib/getaddrinfo.c: Likewise.
1474         * lib/getcwd.c: Likewise.
1475         * lib/getsubopt.c: Likewise.
1476         * lib/glob.c: Likewise.
1477         * lib/hard-locale.c: Likewise.
1478         * lib/iconvme.c: Likewise.
1479         * lib/javacomp.c: Likewise.
1480         * lib/mempcpy.c: Likewise.
1481         * lib/memrchr.c: Likewise.
1482         * lib/regex_internal.h: Likewise.
1483         * lib/stpncpy.c: Likewise.
1484         * lib/strcasecmp.c: Likewise.
1485         * lib/strchrnul.c: Likewise.
1486         * lib/strdup.c: Likewise.
1487         * lib/striconv.c: Likewise.
1488         * lib/striconveh.c: Likewise.
1489         * lib/striconveha.c: Likewise.
1490         * lib/strncasecmp.c: Likewise.
1491         * lib/strndup.c: Likewise.
1492         * lib/strnlen.c: Likewise.
1493         * lib/strsep.c: Likewise.
1494         * lib/strstr.c: Likewise.
1495         * lib/strtok_r.c: Likewise.
1496         * lib/userspec.c: Likewise.
1497         * lib/w32spawn.h: Likewise.
1498         * lib/xstrndup.c: Likewise.
1499         * lib/mountlist.c (strstr): Remove decl.
1500         * m4/string_h.m4: New file.
1501         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
1502         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
1503         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
1504         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
1505         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
1506         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
1507         Set REPLACE_STRCASECMP if necessary.
1508         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
1509         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
1510         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
1511         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
1512         HAVE_DECL_STRDUP if necessary.
1513         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
1514         since gl_FUNC_STRNDUP does that now.
1515         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
1516         Check for decl here...
1517         (gl_PREREQ_STRNLEN): ... not here.
1518         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
1519         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
1520         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
1521         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
1522         necessary.
1523         * modules/string: New file.
1524         * modules/memmem (Files): Remove special-purpose include file.
1525         (Depends-on): Add string.
1526         (Include): Include <string.h>, not the removed file.
1527         * modules/mempcpy: Likewise.
1528         * modules/memrchr: Likewise.
1529         * modules/stpcpy: Likewise.
1530         * modules/stpncpy: Likewise.
1531         * modules/strcase: Likewise.
1532         * modules/strchrnul: Likewise.
1533         * modules/strdup: Likewise.
1534         * modules/strndup: Likewise.
1535         * modules/strnlen: Likewise.
1536         * modules/strpbrk: Likewise.
1537         * modules/strsep: Likewise.
1538         * modules/strstr: Likewise.
1539         * modules/strtok_r: Likewise.
1540         * tests/test-dirname.c: Don't include "strdup.h", since
1541         <string.h> now suffices.
1542         * tests/test-memmem.c: Don't include "memmem.h", since
1543         <string.h> now suffices.
1544
1545 2007-01-25  Bruno Haible  <bruno@clisp.org>
1546
1547         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
1548         *resultp is 0.
1549
1550         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
1551         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
1552         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
1553         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
1554
1555         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
1556         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
1557         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
1558         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
1559         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
1560         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
1561
1562 2007-01-24  Bruno Haible  <bruno@clisp.org>
1563
1564         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
1565         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
1566         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
1567         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
1568         gl_FUNC_FTS_CORE.
1569         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
1570         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
1571         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
1572         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
1573         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
1574         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
1575         gl_FUNC_FCHOWNAT.
1576         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
1577         gl_FUNC_STRFTIME.
1578         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
1579         Reported by Ralf Wildenhues.
1580
1581 2007-01-24  Bruno Haible  <bruno@clisp.org>
1582
1583         Drop AC_REQUIRE calls that are redundant with the module dependencies.
1584         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
1585         gl_GETADDRINFO.
1586         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
1587         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
1588         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
1589
1590 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
1591
1592         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
1593         Don't use 'exit'; just return from 'main'.
1594         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
1595
1596         * lib/fnmatch_.h: Readjust white space and comments to match
1597         glibc, to avoid spurious diffs.
1598
1599 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
1600
1601         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
1602         2004-12-01 change by Jakub Jelinek, since this code won't compile
1603         if !LIBC.  Problem reported by Bob Proulx.
1604
1605 2007-01-23  Bruno Haible  <bruno@clisp.org>
1606
1607         * lib/striconveh.c: Include c-strcaseeq.h.
1608         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
1609         * modules/striconveh (Depends-on): Add c-strcaseeq.
1610
1611 2007-01-23  Bruno Haible  <bruno@clisp.org>
1612
1613         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
1614
1615         * modules/c-strcaseeq: New file.
1616         * lib/c-strcaseeq.h: New file.
1617
1618         * modules/streq: New file.
1619         * lib/streq.h: New file.
1620
1621 2007-01-23  Bruno Haible  <bruno@clisp.org>
1622
1623         * modules/striconveha-tests: New file.
1624         * tests/test-striconveha.c: New file.
1625
1626         * lib/striconveha.h: Include <stdbool.h>.
1627         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
1628         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
1629         (mem_iconveha_notranslit): Renamed from mem_iconveha.
1630         (mem_iconveha): New function.
1631         (str_iconveha_notranslit): Renamed from str_iconveha.
1632         (str_iconveha): New function.
1633         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
1634         c-strcase.
1635
1636 2007-01-23  Bruno Haible  <bruno@clisp.org>
1637
1638         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
1639         encodings without forgiving before trying any encoding with handler.
1640         (str_iconveha): Try all encodings without forgiving before trying any
1641         encoding with handler.
1642
1643 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
1644
1645         Import the following changes from libc.
1646
1647         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
1648
1649         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
1650
1651         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
1652
1653         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
1654         normal_bracket label.
1655
1656         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
1657
1658         [BZ #361]
1659         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
1660         to normal_bracket after fetching the next character.
1661
1662 2007-01-22  Bruno Haible  <bruno@clisp.org>
1663
1664         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
1665         argument.
1666         * lib/striconveh.c (iconv_carefully_1): New function.
1667         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
1668         argument.
1669         (str_cd_iconveh): Update.
1670         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
1671         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
1672         * tests/test-striconveh.c (MAGIC): New macro.
1673         (new_offsets): New function.
1674         (main): Test call with and without offsets.
1675
1676 2007-01-22  Bruno Haible  <bruno@clisp.org>
1677
1678         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
1679         * modules/sys_select (Makefile.am): Likewise.
1680         * modules/sys_socket (Makefile.am): Likewise.
1681         * modules/sys_time (Makefile.am): Likewise.
1682
1683 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
1684
1685         * modules/gettimeofday (License): Change from GPL to LGPL, since
1686         gettimeofday is a library function.
1687
1688 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1689
1690         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
1691
1692 2007-01-21  Bruno Haible  <bruno@clisp.org>
1693
1694         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
1695
1696 2007-01-21  Bruno Haible  <bruno@clisp.org>
1697
1698         * modules/striconveha: New file.
1699         * lib/striconveha.h: New file.
1700         * lib/striconveha.c: New file.
1701         * MODULES.html.sh (Internationalization functions): Add striconveha.
1702         * lib/striconv.c (str_iconv): Optimize the case of an empty input
1703         string.
1704         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
1705
1706 2007-01-21  Bruno Haible  <bruno@clisp.org>
1707
1708         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
1709         * lib/striconveh.c (str_iconveh): Likewise.
1710
1711 2007-01-21  Bruno Haible  <bruno@clisp.org>
1712
1713         * lib/striconveh.h (mem_iconveh): New declaration.
1714         * lib/striconveh.c (mem_iconveh): New function.
1715         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
1716
1717 2007-01-21  Bruno Haible  <bruno@clisp.org>
1718
1719         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
1720
1721         * lib/striconveh.h (mem_cd_iconveh): Change specification.
1722         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
1723         original result buffer.
1724         (str_cd_iconveh): Update.
1725         * tests/test-striconveh.c (main): Update.
1726
1727         * lib/striconv.h (mem_cd_iconv): Change specification.
1728         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
1729         result buffer.
1730         (str_cd_iconv): Update.
1731         * tests/test-striconv.c (main): Update.
1732
1733 2007-01-21  Bruno Haible  <bruno@clisp.org>
1734
1735         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
1736
1737 2007-01-20  Jim Meyering  <jim@meyering.net>
1738
1739         * lib/userspec.c (parse_with_separator): If a user or group string
1740         starts with "+", skip the corresponding name-to-ID look-up, since
1741         such a look-up must fail: user and group names may not include "+".
1742
1743 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
1744
1745         * lib/poll.c: Include sys/time.h and time.h unconditionally,
1746         since we now assume the sys_time module.
1747         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
1748         check for sys/time.h; no longer needed.
1749         * modules/poll (Depends-on): Depend on sys_time.
1750
1751 2007-01-18  Bruno Haible  <bruno@clisp.org>
1752
1753         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
1754         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
1755
1756         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
1757         gettimeofday.
1758
1759         * tests/test-gettimeofday.c: Include <time.h>.
1760         (dummy): Remove variable.
1761
1762         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
1763         gl_HEADER_SYS_TIME_H.
1764         (gl_HEADER_SYS_TIME_H): New macro.
1765
1766         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
1767         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1768         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
1769         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
1770         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1771         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
1772         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
1773         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1774         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
1775         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
1776         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1777
1778         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
1779         last change; it caused a compilation error when cross-compiling to
1780         Cygwin.
1781
1782 2007-01-18  Jim Meyering  <jim@meyering.net>
1783
1784         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
1785         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
1786         than the race-prone "test -d sys || mkdir sys".
1787         (configure.ac): Use AC_PROG_MKDIR_P.
1788         * modules/sys_select: Likewise.
1789         * modules/sys_socket: Likewise.
1790         * modules/sys_time: Likewise.
1791
1792 2007-01-18  Eric Blake  <ebb9@byu.net>
1793
1794         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
1795         replace gettimeofday.
1796         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
1797         name, to avoid infinite recursion.
1798
1799 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
1800
1801         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
1802         module sys_time.
1803         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
1804         assume timespec.h defines struct timeval.
1805         * lib/settime.c: Likewise.
1806         * lib/utimens.c: Likewise.
1807         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
1808         since we now assume the gettimeofday module.
1809         * lib/tempname.c (__gen_tempname): Likewise.
1810         * lib/gettimeofday.h: Remove.
1811         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
1812         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
1813         Include <time.h>, for 'time()'.
1814         (localtime_buffer_addr): Also use this workaround if
1815         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
1816         to simplify the uses.  All uses changed.
1817         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
1818         that #undef is inside {}, and 'const' follows type name consistently.
1819         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
1820         (gettimeofday): Do not use the maximum possible value for
1821         tv->tv_usec, since that might break usages other than ls.c.
1822         Instead, we'll leave ls.c alone.  This undoes today's patch
1823         by Bruno.  Add a compile-time warning for 1s-clock resolution;
1824         we've never observed the problem but might as well keep the
1825         canary.
1826         * lib/nanosleep.c: Include timespec.h first, for interface check.
1827         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
1828         now assume the sys_time module.
1829         * lib/tempname.c: Likewise.
1830         * lib/timespec.h: Likewise.
1831         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
1832         needed.
1833         * lib/strftime.c: Likewise.
1834         * lib/timespec.h: Likewise.
1835         * lib/posixtm.c: Include posixtm.h first, for interface check.
1836         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
1837         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
1838         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
1839         * lib/sys_time_.h: New file.
1840         * lib/timespec.h (struct timespec): Use long int, not long.
1841         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
1842         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
1843         Remove obsolescent call to AC_HEADER_TIME.
1844         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
1845         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
1846         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
1847         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
1848         Likewise.
1849         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
1850         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
1851         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
1852         into the sys_time module.  Check for gettimeofday just once.
1853         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
1854         for gettimeofday signature to just check the signature.  Merely
1855         compile it, since linking doesn't test signature.  Improve test for
1856         whether gettimeofday.o is actually needed.
1857         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
1858         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
1859         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
1860         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1861         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
1862         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
1863         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
1864         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
1865         than worrying about sys/time.h.
1866         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
1867         Don't bother worrying about TIME_WITH_SYS_TIME.
1868         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
1869         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
1870         * m4/sys_time_h.m4: New file.
1871         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
1872         Don't include sys/time.h.  Return from main rather than exiting.
1873         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
1874         all uses changed.
1875         * modules/gethrxtime (Depends-on): Add sys_time.
1876         * modules/gettime (Depends-on): Likewise.
1877         * modules/gettimeofday (Depends-on): Likewise.
1878         * modules/nanosleep (Depends-on): Likewise.
1879         * modules/settime (Depends-on): Likewise.
1880         * modules/tempname (Depends-on): Likewise.
1881         * modules/utimens (Depends-on): Likewise.
1882         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
1883         (Include:) Change back to <sys/time.h>.
1884         (Maintainer:) Add self.
1885         * modules/sys_time: New file.
1886         * modules/tempname (Depends-on): Add gettimeofday.
1887         * tests/test-gettimeofday.c: Include <sys/time.h>
1888         rather than gettimeofday.h.
1889
1890 2007-01-17  Bruno Haible  <bruno@clisp.org>
1891
1892         * gnulib-tool (func_get_license): Revert last patch. Instead, let
1893         the license default to GPL.
1894         (func_create_testdir): Don't complain if a module is LGPL and its
1895         tests module depends on GPLed modules.
1896
1897 2007-01-17  Bruno Haible  <bruno@clisp.org>
1898
1899         * lib/gettimeofday.c (gettimeofday): Add code for the case
1900         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
1901         maximum possible value for tv->tv_usec, rather than the minimum one.
1902
1903 2005-10-08  Martin Lambers  <marlam@marlam.de>
1904 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
1905 2007-01-16  Bruno Haible  <bruno@clisp.org>
1906
1907         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
1908         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
1909         gl_FUNC_GETTIMEOFDAY.
1910         (Include): Add gettimeofday.h.
1911         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
1912         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
1913         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
1914         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
1915         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
1916         * lib/gettimeofday.h: New file.
1917         * lib/gettimeofday.c: Include <sys/timeb.h>.
1918         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
1919         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1920         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
1921         fall back on time().
1922
1923         * tests/test-gettimeofday.c: New file.
1924         * modules/gettimeofday-tests: New file.
1925
1926 2007-01-16  Eric Blake  <ebb9@byu.net>
1927
1928         * modules/fnmatch (Depends-on): Depend on wchar.
1929         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
1930         * m4/fnmatch.m4: Likewise.
1931         * modules/mbchar (Makefile.am): Assume <wchar.h>.
1932         * m4/mbchar.m4: Likewise.
1933         * modules/mbswidth (Depends-on): Depend on wchar.
1934         * lib/mbswidth.c: Assume <wchar.h>.
1935         * m4/mbswidth.m4: Likewise.
1936         * modules/quotearg (Depends-on): Depend on wchar.
1937         * lib/quotearg.c: Assume <wchar.h>.
1938         * m4/quotearg.m4: Likewise.
1939         * modules/regex (Depends-on): Depend on wchar.
1940         * lib/regex_internal.h: Assume <wchar.h>.
1941         * m4/regex.m4: Likewise.
1942         * modules/stdint (Depends-on): Depend on wchar.
1943         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
1944         * m4/stdint.m4: Likewise.
1945         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
1946         * modules/strftime (Depends-on): Depend on wchar.
1947         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
1948         * modules/strtol (Depends-on): Depend on wchar.
1949         * lib/strtol.c: Assume <wchar.h>.
1950         * modules/wcwidth (Depends-on): Depend on wchar.
1951         * lib/wcwidth.h: Assume <wchar.h>.
1952         * m4/wcwidth.m4: Likewise.
1953
1954 2007-01-16  Bruno Haible  <bruno@clisp.org>
1955
1956         * modules/csharpexec-script: New, created from...
1957         * modules/csharpexec: ... this.
1958
1959 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
1960
1961         * modules/javaexec-script: New, created from...
1962         * modules/javaexec: ... this.
1963
1964 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1965
1966         * modules/poll (Dependencies): Add sys_select.
1967
1968 2007-01-15  Jim Meyering  <jim@meyering.net>
1969
1970         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
1971         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
1972         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
1973         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
1974
1975 2007-01-15  Bruno Haible  <bruno@clisp.org>
1976
1977         * modules/striconveh: New file.
1978         * lib/striconveh.h: New file.
1979         * lib/striconveh.c: New file.
1980         * MODULES.html.sh (Internationalization functions): Add striconveh.
1981
1982         * modules/striconveh-tests: New file.
1983         * tests/test-striconveh.c: New file.
1984
1985 2007-01-15  Bruno Haible  <bruno@clisp.org>
1986
1987         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
1988         not from GNU libiconv or GNU libc.
1989
1990 2007-01-15  Bruno Haible  <bruno@clisp.org>
1991
1992         * doc/gnulib-intro.texi (Copyright): Explain the different license
1993         terms for module descriptions, autoconf macros, tests, documentation.
1994
1995 2007-01-14  Bruno Haible  <bruno@clisp.org>
1996
1997         * modules/striconv-tests: New file.
1998         * tests/test-striconv.c: New file.
1999
2000 2007-01-14  Bruno Haible  <bruno@clisp.org>
2001
2002         * modules/iconv-tests: New file.
2003         * tests/test-iconv.c: New file.
2004
2005 2007-01-14  Bruno Haible  <bruno@clisp.org>
2006
2007         * gnulib-tool (func_get_license): For test modules, use the license of
2008         the main module.
2009
2010 2007-01-14  Bruno Haible  <bruno@clisp.org>
2011
2012         * modules/iconv (Include): Clarify that <iconv.h> can only be included
2013         if iconv is found to exist.
2014
2015 2007-01-14  Bruno Haible  <bruno@clisp.org>
2016
2017         * modules/c-ctype-tests: New file.
2018         * tests/test-c-ctype.c: New file.
2019
2020 2007-01-14  Bruno Haible  <bruno@clisp.org>
2021
2022         * modules/binary-io-tests: New file.
2023         * tests/test-binary-io.sh: New file.
2024         * tests/test-binary-io.c: New file.
2025
2026 2007-01-14  Bruno Haible  <bruno@clisp.org>
2027
2028         * modules/array-oset-tests: New file.
2029         * tests/test-array_oset.c: New file.
2030
2031 2007-01-14  Bruno Haible  <bruno@clisp.org>
2032
2033         * modules/array-list-tests: New file.
2034         * tests/test-array_list.c: New file.
2035
2036 2007-01-14  Bruno Haible  <bruno@clisp.org>
2037
2038         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
2039         and make.
2040         Reported by Simon Josefsson in
2041         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
2042
2043 2007-01-14  Bruno Haible  <bruno@clisp.org>
2044
2045         * modules/allocsa-tests: New file.
2046         * tests/test-allocsa.c: New file.
2047
2048 2007-01-14  Bruno Haible  <bruno@clisp.org>
2049
2050         * modules/fchdir (Depends-on): Add absolute-header.
2051         * modules/unistd (Depends-on): Likewise.
2052
2053 2006-12-30  Bruno Haible  <bruno@clisp.org>
2054
2055         * modules/fchdir: New file.
2056         * modules/unistd (Files): Add lib/unistd_.h.
2057         (Makefile.am): Generate unistd.h from unistd_.h.
2058         * lib/fchdir.c: New file.
2059         * lib/dirent_.h: New file.
2060         * lib/unistd_.h: New file.
2061         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
2062         * m4/fchdir.m4: New file.
2063         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
2064         (gl_HEADER_UNISTD): Invoke it.
2065         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
2066         function.
2067         * lib/backupfile.c (opendir, closedir): Undefine.
2068         * lib/chown.c (open, close): Undefine.
2069         * lib/clean-temp.c (open, close): Undefine.
2070         * lib/copy-file.c (open, close): Undefine.
2071         * lib/execute.c (open, close): Undefine.
2072         * lib/fsusage.c (open, close): Undefine.
2073         * lib/gc-gnulib.c (open, close): Undefine.
2074         * lib/getcwd.c (opendir, closedir): Undefine.
2075         * lib/glob.c (opendir, closedir): Undefine.
2076         * lib/javacomp.c (open, close): Undefine.
2077         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
2078         * lib/openat-proc.c (open, close): Undefine.
2079         * lib/pagealign_alloc.c (open, close): Undefine.
2080         * lib/pipe.c (open, close): Undefine.
2081         * lib/progreloc.c (open, close): Undefine.
2082         * lib/savedir.c (opendir, closedir): Undefine.
2083         * lib/utime.c (open, close): Undefine.
2084         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
2085
2086 2007-01-10  Bruno Haible  <bruno@clisp.org>
2087
2088         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
2089
2090 2007-01-12  Eric Blake  <ebb9@byu.net>
2091
2092         Provide a robust <wchar.h>.  Further simplifications are now
2093         possible in other modules, but not included here.
2094         * modules/wchar: New module.
2095         * m4/wchar.m4: New file.
2096         * lib/wchar_.h: Likewise.
2097         * modules/mbchar (Depends-on): Depend on wchar, as the first use
2098         of the new module.
2099         * MODULES.html.sh (Extended multibyte and wide character utilities):
2100         New section.
2101
2102 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
2103
2104         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
2105         to a reasonable default for memory allocation.
2106         (xreadlink): Don't allocate a huge buffer, to work around a buggy
2107         file system that reports garbage st_size values for symlinks.
2108         Problem reported by Liyang Hu.
2109
2110 2007-01-11  Simon Josefsson  <simon@josefsson.org>
2111
2112         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
2113         Emacs .#* auto-save files).
2114
2115 2007-01-11  Bruno Haible  <bruno@clisp.org>
2116
2117         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
2118         directory.
2119
2120 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
2121
2122         Use @...@ consistently in lib/wctype_.h.
2123         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
2124         on it being set to 1 or 0.
2125         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
2126         go back to AC_SUBSTing it.
2127         * modules/wctype (Makefile.am): Undo previous change.
2128
2129 2007-01-10  Eric Blake  <ebb9@byu.net>
2130
2131         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
2132         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
2133         * modules/wctype (Makefile.am): Likewise.
2134         Reported by Chris McGuire.
2135
2136 2007-01-10  Jim Meyering  <jim@meyering.net>
2137
2138         fts.c: a small readability/maintainability improvement
2139         * lib/fts.c (fts_read): Make this code slightly more readable and
2140         maintainable by hoisting the "sp->fts_cur = p" assignments to
2141         immediately follow the statements that set P.  Derived from
2142         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
2143
2144 2007-01-10  Eric Blake  <ebb9@byu.net>
2145
2146         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
2147         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
2148         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
2149         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
2150         Reported by Chris McGuire.
2151
2152 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2153
2154         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
2155         in sed script.
2156
2157 2007-01-09  Bruno Haible  <bruno@clisp.org>
2158
2159         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
2160         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
2161         variables.
2162         (func_module): Use them.
2163
2164 2007-01-09  Bruno Haible  <bruno@clisp.org>
2165
2166         * modules/unistr/base: New file.
2167         * lib/unistr.h: New file.
2168
2169         * modules/unistr/u8-to-u16: New file.
2170         * lib/unistr/u8-to-u16.c: New file.
2171
2172         * modules/unistr/u8-to-u32: New file.
2173         * lib/unistr/u8-to-u32.c: New file.
2174
2175         * modules/unistr/u16-to-u8: New file.
2176         * lib/unistr/u16-to-u8.c: New file.
2177
2178         * modules/unistr/u16-to-u32: New file.
2179         * lib/unistr/u16-to-u32.c: New file.
2180
2181         * modules/unistr/u32-to-u8: New file.
2182         * lib/unistr/u32-to-u8.c: New file.
2183
2184         * modules/unistr/u32-to-u16: New file.
2185         * lib/unistr/u32-to-u16.c: New file.
2186
2187         * modules/unistr/u8-check: New file.
2188         * modules/unistr/u16-check: New file.
2189         * modules/unistr/u32-check: New file.
2190         * lib/unistr/u8-check.c: New file.
2191         * lib/unistr/u16-check.c: New file.
2192         * lib/unistr/u32-check.c: New file.
2193
2194         * modules/unistr/u8-chr: New file.
2195         * modules/unistr/u16-chr: New file.
2196         * modules/unistr/u32-chr: New file.
2197         * lib/unistr/u8-chr.c: New file.
2198         * lib/unistr/u16-chr.c: New file.
2199         * lib/unistr/u32-chr.c: New file.
2200
2201         * modules/unistr/u8-cmp: New file.
2202         * modules/unistr/u16-cmp: New file.
2203         * modules/unistr/u32-cmp: New file.
2204         * lib/unistr/u8-cmp.c: New file.
2205         * lib/unistr/u16-cmp.c: New file.
2206         * lib/unistr/u32-cmp.c: New file.
2207
2208         * modules/unistr/u8-cpy: New file.
2209         * modules/unistr/u16-cpy: New file.
2210         * modules/unistr/u32-cpy: New file.
2211         * lib/unistr/u8-cpy.c: New file.
2212         * lib/unistr/u16-cpy.c: New file.
2213         * lib/unistr/u32-cpy.c: New file.
2214         * lib/unistr/u-cpy.h: New file.
2215
2216         * modules/unistr/u8-cpy-alloc: New file.
2217         * modules/unistr/u16-cpy-alloc: New file.
2218         * modules/unistr/u32-cpy-alloc: New file.
2219         * lib/unistr/u8-cpy-alloc.c: New file.
2220         * lib/unistr/u16-cpy-alloc.c: New file.
2221         * lib/unistr/u32-cpy-alloc.c: New file.
2222         * lib/unistr/u-cpy-alloc.h: New file.
2223
2224         * modules/unistr/u8-endswith: New file.
2225         * modules/unistr/u16-endswith: New file.
2226         * modules/unistr/u32-endswith: New file.
2227         * lib/unistr/u8-endswith.c: New file.
2228         * lib/unistr/u16-endswith.c: New file.
2229         * lib/unistr/u32-endswith.c: New file.
2230         * lib/unistr/u-endswith.h: New file.
2231
2232         * modules/unistr/u8-mblen: New file.
2233         * modules/unistr/u16-mblen: New file.
2234         * modules/unistr/u32-mblen: New file.
2235         * lib/unistr/u8-mblen.c: New file.
2236         * lib/unistr/u16-mblen.c: New file.
2237         * lib/unistr/u32-mblen.c: New file.
2238
2239         * modules/unistr/u8-mbtouc: New file.
2240         * modules/unistr/u16-mbtouc: New file.
2241         * modules/unistr/u32-mbtouc: New file.
2242         * lib/unistr/u8-mbtouc.c: New file.
2243         * lib/unistr/u16-mbtouc.c: New file.
2244         * lib/unistr/u32-mbtouc.c: New file.
2245
2246         * modules/unistr/u8-mbtouc-safe: New file.
2247         * modules/unistr/u16-mbtouc-safe: New file.
2248         * modules/unistr/u32-mbtouc-safe: New file.
2249         * lib/unistr/u8-mbtouc-safe.c: New file.
2250         * lib/unistr/u16-mbtouc-safe.c: New file.
2251         * lib/unistr/u32-mbtouc-safe.c: New file.
2252
2253         * modules/unistr/u8-move: New file.
2254         * modules/unistr/u16-move: New file.
2255         * modules/unistr/u32-move: New file.
2256         * lib/unistr/u8-move.c: New file.
2257         * lib/unistr/u16-move.c: New file.
2258         * lib/unistr/u32-move.c: New file.
2259         * lib/unistr/u-move.h: New file.
2260
2261         * modules/unistr/u8-next: New file.
2262         * modules/unistr/u16-next: New file.
2263         * modules/unistr/u32-next: New file.
2264         * lib/unistr/u8-next.c: New file.
2265         * lib/unistr/u16-next.c: New file.
2266         * lib/unistr/u32-next.c: New file.
2267
2268         * modules/unistr/u8-prev: New file.
2269         * modules/unistr/u16-prev: New file.
2270         * modules/unistr/u32-prev: New file.
2271         * lib/unistr/u8-prev.c: New file.
2272         * lib/unistr/u16-prev.c: New file.
2273         * lib/unistr/u32-prev.c: New file.
2274
2275         * modules/unistr/u8-set: New file.
2276         * modules/unistr/u16-set: New file.
2277         * modules/unistr/u32-set: New file.
2278         * lib/unistr/u8-set.c: New file.
2279         * lib/unistr/u16-set.c: New file.
2280         * lib/unistr/u32-set.c: New file.
2281         * lib/unistr/u-set.h: New file.
2282
2283         * modules/unistr/u8-startswith: New file.
2284         * modules/unistr/u16-startswith: New file.
2285         * modules/unistr/u32-startswith: New file.
2286         * lib/unistr/u8-startswith.c: New file.
2287         * lib/unistr/u16-startswith.c: New file.
2288         * lib/unistr/u32-startswith.c: New file.
2289         * lib/unistr/u-startswith.h: New file.
2290
2291         * modules/unistr/u8-stpcpy: New file.
2292         * modules/unistr/u16-stpcpy: New file.
2293         * modules/unistr/u32-stpcpy: New file.
2294         * lib/unistr/u8-stpcpy.c: New file.
2295         * lib/unistr/u16-stpcpy.c: New file.
2296         * lib/unistr/u32-stpcpy.c: New file.
2297         * lib/unistr/u-stpcpy.h: New file.
2298
2299         * modules/unistr/u8-stpncpy: New file.
2300         * modules/unistr/u16-stpncpy: New file.
2301         * modules/unistr/u32-stpncpy: New file.
2302         * lib/unistr/u8-stpncpy.c: New file.
2303         * lib/unistr/u16-stpncpy.c: New file.
2304         * lib/unistr/u32-stpncpy.c: New file.
2305         * lib/unistr/u-stpncpy.h: New file.
2306
2307         * modules/unistr/u8-strcat: New file.
2308         * modules/unistr/u16-strcat: New file.
2309         * modules/unistr/u32-strcat: New file.
2310         * lib/unistr/u8-strcat.c: New file.
2311         * lib/unistr/u16-strcat.c: New file.
2312         * lib/unistr/u32-strcat.c: New file.
2313         * lib/unistr/u-strcat.h: New file.
2314
2315         * modules/unistr/u8-strchr: New file.
2316         * modules/unistr/u16-strchr: New file.
2317         * modules/unistr/u32-strchr: New file.
2318         * lib/unistr/u8-strchr.c: New file.
2319         * lib/unistr/u16-strchr.c: New file.
2320         * lib/unistr/u32-strchr.c: New file.
2321
2322         * modules/unistr/u8-strcmp: New file.
2323         * modules/unistr/u16-strcmp: New file.
2324         * modules/unistr/u32-strcmp: New file.
2325         * lib/unistr/u8-strcmp.c: New file.
2326         * lib/unistr/u16-strcmp.c: New file.
2327         * lib/unistr/u32-strcmp.c: New file.
2328
2329         * modules/unistr/u8-strcpy: New file.
2330         * modules/unistr/u16-strcpy: New file.
2331         * modules/unistr/u32-strcpy: New file.
2332         * lib/unistr/u8-strcpy.c: New file.
2333         * lib/unistr/u16-strcpy.c: New file.
2334         * lib/unistr/u32-strcpy.c: New file.
2335         * lib/unistr/u-strcpy.h: New file.
2336
2337         * modules/unistr/u8-strcspn: New file.
2338         * modules/unistr/u16-strcspn: New file.
2339         * modules/unistr/u32-strcspn: New file.
2340         * lib/unistr/u8-strcspn.c: New file.
2341         * lib/unistr/u16-strcspn.c: New file.
2342         * lib/unistr/u32-strcspn.c: New file.
2343         * lib/unistr/u-strcspn.h: New file.
2344
2345         * modules/unistr/u8-strdup: New file.
2346         * modules/unistr/u16-strdup: New file.
2347         * modules/unistr/u32-strdup: New file.
2348         * lib/unistr/u8-strdup.c: New file.
2349         * lib/unistr/u16-strdup.c: New file.
2350         * lib/unistr/u32-strdup.c: New file.
2351         * lib/unistr/u-strdup.h: New file.
2352
2353         * modules/unistr/u8-strlen: New file.
2354         * modules/unistr/u16-strlen: New file.
2355         * modules/unistr/u32-strlen: New file.
2356         * lib/unistr/u8-strlen.c: New file.
2357         * lib/unistr/u16-strlen.c: New file.
2358         * lib/unistr/u32-strlen.c: New file.
2359         * lib/unistr/u-strlen.h: New file.
2360
2361         * modules/unistr/u8-strmblen: New file.
2362         * modules/unistr/u16-strmblen: New file.
2363         * modules/unistr/u32-strmblen: New file.
2364         * lib/unistr/u8-strmblen.c: New file.
2365         * lib/unistr/u16-strmblen.c: New file.
2366         * lib/unistr/u32-strmblen.c: New file.
2367
2368         * modules/unistr/u8-strmbtouc: New file.
2369         * modules/unistr/u16-strmbtouc: New file.
2370         * modules/unistr/u32-strmbtouc: New file.
2371         * lib/unistr/u8-strmbtouc.c: New file.
2372         * lib/unistr/u16-strmbtouc.c: New file.
2373         * lib/unistr/u32-strmbtouc.c: New file.
2374
2375         * modules/unistr/u8-strncat: New file.
2376         * modules/unistr/u16-strncat: New file.
2377         * modules/unistr/u32-strncat: New file.
2378         * lib/unistr/u8-strncat.c: New file.
2379         * lib/unistr/u16-strncat.c: New file.
2380         * lib/unistr/u32-strncat.c: New file.
2381         * lib/unistr/u-strncat.h: New file.
2382
2383         * modules/unistr/u8-strncmp: New file.
2384         * modules/unistr/u16-strncmp: New file.
2385         * modules/unistr/u32-strncmp: New file.
2386         * lib/unistr/u8-strncmp.c: New file.
2387         * lib/unistr/u16-strncmp.c: New file.
2388         * lib/unistr/u32-strncmp.c: New file.
2389
2390         * modules/unistr/u8-strncpy: New file.
2391         * modules/unistr/u16-strncpy: New file.
2392         * modules/unistr/u32-strncpy: New file.
2393         * lib/unistr/u8-strncpy.c: New file.
2394         * lib/unistr/u16-strncpy.c: New file.
2395         * lib/unistr/u32-strncpy.c: New file.
2396         * lib/unistr/u-strncpy.h: New file.
2397
2398         * modules/unistr/u8-strnlen: New file.
2399         * modules/unistr/u16-strnlen: New file.
2400         * modules/unistr/u32-strnlen: New file.
2401         * lib/unistr/u8-strnlen.c: New file.
2402         * lib/unistr/u16-strnlen.c: New file.
2403         * lib/unistr/u32-strnlen.c: New file.
2404         * lib/unistr/u-strnlen.h: New file.
2405
2406         * modules/unistr/u8-strpbrk: New file.
2407         * modules/unistr/u16-strpbrk: New file.
2408         * modules/unistr/u32-strpbrk: New file.
2409         * lib/unistr/u8-strpbrk.c: New file.
2410         * lib/unistr/u16-strpbrk.c: New file.
2411         * lib/unistr/u32-strpbrk.c: New file.
2412         * lib/unistr/u-strpbrk.h: New file.
2413
2414         * modules/unistr/u8-strrchr: New file.
2415         * modules/unistr/u16-strrchr: New file.
2416         * modules/unistr/u32-strrchr: New file.
2417         * lib/unistr/u8-strrchr.c: New file.
2418         * lib/unistr/u16-strrchr.c: New file.
2419         * lib/unistr/u32-strrchr.c: New file.
2420
2421         * modules/unistr/u8-strspn: New file.
2422         * modules/unistr/u16-strspn: New file.
2423         * modules/unistr/u32-strspn: New file.
2424         * lib/unistr/u8-strspn.c: New file.
2425         * lib/unistr/u16-strspn.c: New file.
2426         * lib/unistr/u32-strspn.c: New file.
2427         * lib/unistr/u-strspn.h: New file.
2428
2429         * modules/unistr/u8-strstr: New file.
2430         * modules/unistr/u16-strstr: New file.
2431         * modules/unistr/u32-strstr: New file.
2432         * lib/unistr/u8-strstr.c: New file.
2433         * lib/unistr/u16-strstr.c: New file.
2434         * lib/unistr/u32-strstr.c: New file.
2435         * lib/unistr/u-strstr.h: New file.
2436
2437         * modules/unistr/u8-strtok: New file.
2438         * modules/unistr/u16-strtok: New file.
2439         * modules/unistr/u32-strtok: New file.
2440         * lib/unistr/u8-strtok.c: New file.
2441         * lib/unistr/u16-strtok.c: New file.
2442         * lib/unistr/u32-strtok.c: New file.
2443         * lib/unistr/u-strtok.h: New file.
2444
2445         * modules/unistr/u8-uctomb: New file.
2446         * modules/unistr/u16-uctomb: New file.
2447         * modules/unistr/u32-uctomb: New file.
2448         * lib/unistr/u8-uctomb.c: New file.
2449         * lib/unistr/u16-uctomb.c: New file.
2450         * lib/unistr/u32-uctomb.c: New file.
2451
2452         * MODULES.html.sh (Unicode string functions): Add the new modules.
2453
2454 2007-01-08  Bruno Haible  <bruno@clisp.org>
2455
2456         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
2457         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
2458         subdirectories.
2459
2460 2007-01-08  Karl Berry  <karl@gnu.org>
2461
2462         * doc/error.texi: mention that main() fns must set program_name
2463         when progname is used.
2464
2465 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
2466
2467         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
2468         WCTYPE_H is empty, for the benefit of builds from non-distclean
2469         directories.  Problem reported by Eric Blake in
2470         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
2471
2472 2007-01-08  Bruno Haible  <bruno@clisp.org>
2473
2474         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
2475         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
2476         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
2477         PROVIDE_CANONICALIZE_FILENAME_MODE.
2478         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
2479
2480 2007-01-08  Bruno Haible  <bruno@clisp.org>
2481
2482         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
2483         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
2484         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
2485         * lib/fts.c: Likewise.
2486         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
2487
2488 2006-12-25  Bruno Haible  <bruno@clisp.org>
2489
2490         * modules/utf8-ucs4-safe: New file.
2491         * lib/utf8-ucs4-safe.h: New file.
2492         * lib/unistr/utf8-ucs4-safe.c: New file.
2493
2494         * modules/utf16-ucs4-safe: New file.
2495         * lib/utf16-ucs4-safe.h: New file.
2496         * lib/unistr/utf16-ucs4-safe.c: New file.
2497
2498         * MODULES.html.sh (Unicode string functions): Add the new modules.
2499
2500 2007-01-08  Bruno Haible  <bruno@clisp.org>
2501
2502         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
2503         (Depends-on): Add unitypes.
2504         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
2505         (u8_mbtouc_aux): Move out to separate file.
2506         (u8_mbtouc): Use ucs4_t, uint8_t types.
2507         * lib/unistr/utf8-ucs4.c: New file.
2508
2509         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
2510         (Depends-on): Add unitypes.
2511         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
2512         (u16_mbtouc_aux): Move out to separate file.
2513         (u16_mbtouc): Use ucs4_t, uint16_t types.
2514         * lib/unistr/utf16-ucs4.c: New file.
2515
2516         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
2517         (Depends-on): Add unitypes.
2518         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
2519         (u8_uctomb_aux): Move out to separate file.
2520         (u8_uctomb): Use ucs4_t, uint8_t types.
2521         * lib/unistr/ucs4-utf8.c: New file.
2522
2523         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
2524         (Depends-on): Add unitypes.
2525         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
2526         (u16_uctomb_aux): Move out to separate file.
2527         (u16_uctomb): Use ucs4_t, uint16_t types.
2528         * lib/unistr/ucs4-utf16.c: New file.
2529
2530 2006-12-25  Bruno Haible  <bruno@clisp.org>
2531
2532         * modules/unitypes: New file.
2533         * lib/unitypes.h: New file.
2534         * MODULES.html.sh (func_all_modules): New section "Unicode string
2535         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
2536         this section. Add unitypes.
2537
2538 2007-01-08  Bruno Haible  <bruno@clisp.org>
2539
2540         Avoid variable names that conflict with those from libtool.
2541         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
2542         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
2543         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
2544         library_names_spec to acl_library_names_spec, hardcode_* to
2545         acl_hardcode_*.
2546         Reported by Ralf Wildenhues.
2547
2548 2007-01-08  Bruno Haible  <bruno@clisp.org>
2549
2550         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
2551         definition.
2552         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
2553         definition.
2554         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
2555         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
2556         definition.
2557         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
2558         definition.
2559         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
2560         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
2561         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
2562         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
2563         definition.
2564         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
2565         definition.
2566         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
2567         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
2568         GC_USE_<algorithm>.
2569         * lib/gc-libgcrypt.c: Likewise.
2570         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
2571         * modules/gc-arctwo (configure.ac): Likewise.
2572         * modules/gc-des (configure.ac): Likewise.
2573         * modules/gc-hmac-md5 (configure.ac): Likewise.
2574         * modules/gc-hmac-sha1 (configure.ac): Likewise.
2575         * modules/gc-md2 (configure.ac): Likewise.
2576         * modules/gc-md4 (configure.ac): Likewise.
2577         * modules/gc-md5 (configure.ac): Likewise.
2578         * modules/gc-random (configure.ac): Likewise.
2579         * modules/gc-rijndael (configure.ac): Likewise.
2580         * modules/gc-sha1 (configure.ac): Likewise.
2581
2582 2007-01-08  Bruno Haible  <bruno@clisp.org>
2583
2584         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
2585         macro definition.
2586         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
2587         definition.
2588         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
2589         definition.
2590         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
2591         * modules/fcntl-safer (configure.ac): Likewise.
2592         * modules/fopen-safer (configure.ac): Likewise.
2593         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
2594         GNULIB_FWRITEERROR macro definition.
2595
2596 2007-01-08  Bruno Haible  <bruno@clisp.org>
2597
2598         * m4/gnulib-common.m4: New file.
2599         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
2600         (func_get_filelist): Add m4/gnulib-common.m4.
2601
2602 2007-01-08  Bruno Haible  <bruno@clisp.org>
2603
2604         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
2605         command.
2606
2607 2007-01-08  Jim Meyering  <jim@meyering.net>
2608
2609         Use a more robust test for a "can't happen" condition.
2610         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
2611         narrowed the st_size value.  Presuming the "can't happen" condition
2612         is true, that narrowing could conceivably convert an invalid st_size
2613         value into a valid one.  Instead, use a change based on Matthew
2614         Woehlke's original patch.
2615
2616         Slight readability improvement: use an assert-like macro
2617         in place of literal "abort ()" uses.
2618         * lib/fts.c (fts_assert): Define.
2619         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
2620         Use this macro instead of a bare 'abort'.
2621
2622 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
2623
2624         Don't worry about using IRIX 5.3's wctype.h broken definitions;
2625         simply work around them.
2626         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
2627         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
2628         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before declaring.
2629         Don't bother to define as macros, since the standard doesn't require it.
2630         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
2631         longer worry about IRIX 5.3.
2632         (HAVE_WCTYPE_CTMP_BUG): Remove.
2633
2634 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
2635
2636         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
2637         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
2638         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
2639         Problems reported by Georg Schwarz for IRIX 5.3.
2640
2641         * gnulib-tool (autoconf_minversion): Take the maximum version number
2642         found, not the minimum.  Problem reported by James Youngman.
2643
2644 2007-01-03  Karl Berry  <karl@gnu.org>
2645
2646         * doc/error.texi: new file, explaining interaction with progname.
2647         * doc/gnulib.texi: include it.  Update copyright.
2648
2649 2007-01-03  Simon Josefsson  <simon@josefsson.org>
2650
2651         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
2652         AC_CANONICAL_HOST, to improve autobuild outputs.
2653
2654 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
2655             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
2656
2657         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
2658         sockets, server sockets, and other file descriptors.  Count errors
2659         to compute the return value.  Reorder the code a bit to be easier
2660         to follow.  Don't set event bits that were not requested (except
2661         POLLERR and POLLHUP).
2662
2663 2007-01-01  Bruno Haible  <bruno@clisp.org>
2664
2665         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
2666
2667 2007-01-03  Jim Meyering  <jim@meyering.net>
2668
2669         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
2670
2671 2007-01-02  Bruno Haible  <bruno@clisp.org>
2672
2673         * modules/settime (Include): Require timespec.h.
2674         * modules/nanosleep (Include): Likewise.
2675
2676 2007-01-01  Bruno Haible  <bruno@clisp.org>
2677
2678         * gnulib-tool (func_emit_copyright_notice): Bump year.
2679         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
2680
2681 2007-01-01  Bruno Haible  <bruno@clisp.org>
2682
2683         Improve support for OpenBSD.
2684         * build-aux/config.rpath (libname_spec): Export.
2685         (library_names_spec): New variable. Export.
2686         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
2687         library_names_spec from the config.rpath output. Locate shared library
2688         through the name pattern in library_names_spec.
2689
2690 2007-01-01  Eric Blake  <ebb9@byu.net>
2691
2692         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
2693
2694 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
2695
2696         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
2697         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
2698         assume the C locale, and avoid an "eval" that could cause trouble.
2699         Problem with SORT reported by Bob Proulx.
2700
2701         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
2702         Define.  Trivial patch from Henning Nielsen Lund, originally
2703         sent to bug-grep@gnu.org today.
2704
2705 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
2706
2707         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
2708         struct stat.  Problem reported by Henning Nielsen Lund.
2709         * lib/acl.c: Include acl.h first, to check interface.  Don't
2710         bother to include sys/types.h and sys/stat.h again.
2711
2712 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
2713
2714         Import the following change from libc; problem reported by
2715         Sven Verdoolaege.
2716
2717         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
2718
2719         [BZ #1373]
2720         * lib/argp.h: Remove __NTH for __argp_usage inline function.
2721
2722 2006-12-28  Jim Meyering  <jim@meyering.net>
2723
2724         * build-aux/announce-gen: Do not assume that the package
2725         builds any of tar.gz, tar.bz2, and .xdelta files.
2726         Suggestion from Simon Josefsson.
2727
2728 2006-12-28  Simon Josefsson  <simon@josefsson.org>
2729
2730         * modules/announce-gen: New file.
2731
2732 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
2733
2734         * lib/mbchar.h: Just include <wctype.h>; the wctype module
2735         handles its gotchas now.
2736         * lib/mbswidth.c: Likewise.
2737         * lib/wcwidth.h: Likewise.
2738         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
2739         and iswcntrl; the wctype module does this stuff now.
2740         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
2741         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
2742         * modules/mbchar (Depends-on): Add wctype.
2743         * modules/mbswidth (Depends-on): Likewise.
2744         * modules/wcwidth (Depends-on): Likewise.
2745
2746 2006-12-27  Eric Blake  <ebb9@byu.net>
2747
2748         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
2749         module uses more than what <wctype.h> is required to provide.
2750
2751 2006-12-26  Eric Blake  <ebb9@byu.net>
2752
2753         * gnulib-tool (sed_extract_prog): Avoid space-tab.
2754
2755 2006-12-26  Eric Blake  <ebb9@byu.net>
2756
2757         * modules/absolute-header: New module.
2758         * modules/fcntl (Depends-on): Depend on it.
2759         * modules/inttypes (Depends-on): Likewise.
2760         * modules/stdint (Depends-on): Likewise.
2761         * modules/sys_stat (Depends-on): Likewise.
2762         * modules/wctype (Depends-on): Likewise.
2763         * MODULES.html.sh (Support for building libraries and
2764         executables): Document it.
2765
2766 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
2767
2768         * gnulib-tool (SED): Remove, undoing previous change.
2769         The problem was that it broke coreutils on Solaris, because
2770         "sed --posix" leaked into a makefile.
2771         (sed): New alias, if 'alias' and GNU sed.
2772
2773 2006-12-24  Jim Meyering  <jim@meyering.net>
2774
2775         Work around an fchownat bug in glibc-2.4:
2776         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
2777         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
2778         in spite of the -P option.
2779         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
2780         New macros.
2781         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
2782         * modules/openat (Files): Add lib/fchownat.c.
2783         * lib/openat.c (fchownat): Don't define here.  Move to...
2784         * lib/fchownat.c: ...this new file.
2785
2786 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
2787
2788         Fix bug reported by Bruno Haible in
2789         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
2790         where quotearg.c didn't compile on Mac OS X 10.2 because it
2791         lacks <wchar.h> and wint_t.
2792         * lib/wctype_.h (__wctype_wint_t): New type.
2793         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
2794         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
2795         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
2796         Arg is now of type __wctype_wint_t, not wint_t.
2797         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
2798         substitute HAVE_WINT_T.
2799         * modules/wctype (Files): Add m4/wint_t.m4.
2800         (wctype.h): Substitute HAVE_WINT_T.
2801
2802 2006-12-23  Bruno Haible  <bruno@clisp.org>
2803
2804         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
2805
2806 2006-12-23  Bruno Haible  <bruno@clisp.org>
2807
2808         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
2809         S_ISLNK.
2810         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
2811         mingw.
2812
2813 2006-12-22  Bruno Haible  <bruno@clisp.org>
2814
2815         * lib/copy-file.c: Include acl.h.
2816         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
2817         Close the file descriptors only after being done with copy_acl.
2818         * modules/copy-file (Depends-on): Add acl.
2819
2820 2006-12-22  Bruno Haible  <bruno@clisp.org>
2821
2822         * gnulib-tool (SED): New variable.
2823         Use $SED instead of sed everywhere.
2824
2825 2006-12-22  Bruno Haible  <bruno@clisp.org>
2826
2827         * modules/no-c++: New file.
2828         * m4/no-c++.m4: New file.
2829         * MODULES.html.sh (Support for building libraries and executables):
2830         Add no-c++.
2831
2832 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
2833
2834         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
2835         Include <limits.h>, and use its INT_MAX to rewrite the
2836         j loop so that it does not overflow 'int'.  Problem reported by
2837         Ralf Wildenhues in
2838         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
2839         Play it safe by shifting left by 1 rather than multiplying by 2,
2840         as GCC is less likely to optimize this away when the value
2841         is signed (when it assumes overflow leads to undefined behavior).
2842         Also, don't assume time_t uses two's complement.
2843
2844 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
2845
2846         * MODULES.html.sh: New module wctype.
2847         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
2848         * lib/fnmatch.c: Don't bother to include <wchar.h> before
2849         <wctype.h>, since the new wctype module should fix this.
2850         * lib/quotearg.c: Include <wctype.h> unconditionally, since
2851         the wctype module should arrange for it.
2852         * lib/regex_internal.h: Likewise.
2853         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
2854         since the wctype module should handle this now.
2855         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
2856         * modules/fnmatch (Depends-on): Add wctype.
2857         * modules/quotearg (Depends-on): Likewise.
2858         * modules/regex (Depends-on): Likewise.
2859
2860 2006-12-19  Bruno Haible  <bruno@clisp.org>
2861
2862         * lib/strdup.h [C++]: Wrap definitions in extern "C".
2863         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
2864
2865 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2866
2867         * modules/savewd (Depends-on): Fix dependency on fcntl.
2868
2869 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
2870
2871         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
2872         conforms to C99, rather than relying on the user's environment
2873         setting of STDINT_H.
2874
2875 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
2876         and Eric Blake  <ebb9@byu.net>
2877
2878         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
2879         This is more consistent with the other defines here.
2880         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
2881         Port to z/OS.  Problem reported by Paul Gilmartin.
2882         Change local vars to use gl_ prefix rather than ac_.
2883         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
2884         with other defines.
2885         * modules/double-slash-root: New module.
2886         * modules/dirname (Files): Remove m4/double-slash-root.m4.
2887         (Depends-on): Add double-slash-root.
2888         * MODULES.html.sh (File system functions): Mention new module.
2889
2890 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
2891
2892         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
2893         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
2894         This is for the benefit of gzip, which doesn't do i18n.
2895
2896 2006-12-12  Jim Meyering  <jim@meyering.net>
2897
2898         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
2899         Reported by Andreas Schwab <schwab@suse.de>.
2900
2901 2006-12-12  Bruno Haible  <bruno@clisp.org>
2902
2903         Merge these changes.
2904         2006-09-05  Bruno Haible  <bruno@clisp.org>
2905         * lib/iconvme.c (iconv_string): No need to save and restore errno when
2906         iconv_alloc succeeded.
2907         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
2908         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
2909         test for " && dest " at the end - dest is always != NULL there. Call
2910         iconv with 4xNULL arguments initially, to reset the state. Call iconv
2911         with 2xNULL arguments, also to flush the state storage. Handle the
2912         IRIX iconv behaviour. Realloc the final result, to throw away unused
2913         memory.
2914
2915 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
2916
2917         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
2918         and fchmodat unconditionally, since glibc 2.4 has them.
2919         Problem reported by Arkadiusz Miskiewicz.
2920
2921 2006-12-10  Bruno Haible  <bruno@clisp.org>
2922
2923         * gnulib-tool (func_import): Show the include files only for those
2924         modules that are copied and specified.
2925         Reported by Karl Berry.
2926
2927 2006-12-08  Jim Meyering  <jim@meyering.net>
2928
2929         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
2930         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
2931
2932         * build-aux/announce-gen: Add two new options, both optional:
2933         --bootstrap-tools=TOOL_LIST
2934               a comma-separated list of tools, e.g.,
2935               autoconf,automake,bison,gnulib
2936         --gnulib-snapshot-date=DATE
2937               if gnulib is in the bootstrap tool list,
2938               then report this as the snapshot date.
2939               If not specified, use the current date/time.
2940               If you specify a date here, be sure it's UTC.
2941
2942 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2943
2944         * tests/test-argp-2.sh: Fix test to match actual output.
2945         (func_compare): Fix sed script to be portable.
2946
2947 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
2948
2949         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
2950         workaround for this case.  It is not autoconfigured now; offhand
2951         it's hard to see how to autoconfigure it.
2952
2953 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
2954
2955         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
2956         a directory that is about to be chowned.  Such a directory's
2957         initial file permissions should permit the owner only and this
2958         should not be changed until after the chown, since the group and
2959         other bits would be incorrect if they granted permission before
2960         the chown.
2961
2962         Fix porting problem for iswctype reported by Georg Schwarz in:
2963         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
2964         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
2965         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
2966         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
2967         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
2968
2969 2006-12-03  Jim Meyering  <jim@meyering.net>
2970
2971         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
2972         p->fts_statp may not yet be defined.
2973         (fts_read): Instead, set it in the caller, once p->fts_statp is
2974         sure to be defined, and corresponds to a top-level directory.
2975         This bug made du -x fail.  Here's the coreutils test case:
2976         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
2977         Reported by Mike Frysinger.
2978
2979 2006-12-01  Jim Meyering  <jim@meyering.net>
2980
2981         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
2982         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
2983         Reported by Simon Josefsson.
2984
2985 2006-11-30  Jim Meyering  <jim@meyering.net>
2986
2987         * m4/warning.m4: Use the all-permissive copyright notice
2988         recommended by RMS (rather than LGPL).
2989         * m4/vararrays.m4: Likewise.
2990         * m4/flexmember.m4: Likewise.
2991
2992 2006-11-29  Bruno Haible  <bruno@clisp.org>
2993
2994         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
2995         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
2996         using +=.
2997         Reported by Simon Josefsson <simon@josefsson.org>.
2998
2999 2006-11-28  James Youngman <jay@gnu.org>
3000
3001         * README: Advise users that they might find the bug-gnulib@gnu.org
3002         and autotools-announce@gnu.org mailing lists useful.
3003
3004 2006-11-28  Bruno Haible  <bruno@clisp.org>
3005
3006         * m4/ptrdiff_max.m4: Remove file.
3007
3008 2006-11-21  Bruno Haible  <bruno@clisp.org>
3009
3010         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
3011         _AC_COMPUTE_INT.
3012         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3013         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
3014         _AC_COMPUTE_INT.
3015         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3016         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
3017         _AC_COMPUTE_INT.
3018         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3019
3020 2006-11-28  Jim Meyering  <jim@meyering.net>
3021
3022         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
3023         warning from "gcc -Wshadow" about shadowing the builtin.
3024
3025 2006-11-27  Bruno Haible  <bruno@clisp.org>
3026
3027         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
3028         _AC_COMPUTE_INT.
3029         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3030
3031 2006-11-27  Bruno Haible  <bruno@clisp.org>
3032             Paul Eggert  <eggert@cs.ucla.edu>
3033
3034         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
3035
3036 2006-11-26  Bruno Haible  <bruno@clisp.org>
3037
3038         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
3039         noinst_LTLIBRARIES.
3040
3041 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
3042             Bruno Haible  <bruno@clisp.org>
3043
3044         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
3045         if compiling with "gcc -ansi".
3046
3047 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
3048
3049         Fix some incompatibilities with gcc -ansi -pedantic.
3050         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
3051         if compiling pedantically with GCC, unless it's C99 or later.
3052         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
3053         it mishandles gcc -ansi -pedantic as well.
3054         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
3055         if gcc -pedantic.
3056         * lib/regexec.c (check_node_accept_bytes): Don't use auto
3057         initializers for struct if -pedantic, unless it's C99 or later.
3058
3059 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
3060
3061         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
3062         Don't close an fd more than once. Identical atimes indicate
3063         success, not failure.
3064
3065 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
3066
3067         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
3068
3069 2006-11-23  Jim Meyering  <jim@meyering.net>
3070
3071         * build-aux/announce-gen: New file.  From coreutils.
3072
3073 2006-11-22  Jim Meyering  <jim@meyering.net>
3074
3075         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
3076         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
3077         (fts_read): Use a temporary to narrow the overused st_size member
3078         before using it in a switch statement.  Reported by Matthew Woehlke.
3079
3080         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
3081         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
3082
3083 2006-11-20  Bruno Haible  <bruno@clisp.org>
3084
3085         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
3086         changequote instead of pairs of brackets.
3087         Reported by Andreas Schwab <schwab@suse.de>.
3088
3089 2006-11-21  Jim Meyering  <jim@meyering.net>
3090
3091         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
3092         so as to remain compatible with older compilers.
3093         Patch from Michael Deutschmann.
3094
3095 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
3096
3097         * MODULES.html.sh (File system functions): Add openat.
3098
3099         * lib/openat.h (rpl_fstatat): New macro, if
3100         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
3101         (fstatat): Define to rpl_fstatat under the same conditions,
3102         unless COMPILING_FSTATAT.
3103         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
3104         seems to have the bug.
3105         * lib/fstatat.c: New file.
3106         * modules/openat (Files): Add it.
3107
3108 2006-11-20  Bruno Haible  <bruno@clisp.org>
3109
3110         * Makefile: New file.
3111
3112 2006-11-20  Jim Meyering  <jim@meyering.net>
3113
3114         The beginnings of syntax-related checks for gnulib.
3115         * lib/Makefile: New file.
3116         * lib/t-idcache: New script.  Ensure that the two halves of
3117         idcache.c stay in sync.
3118
3119         * lib/idcache.c: Adjust comments in user- and group- portions to
3120         be more accurate, and to be consistent with one another.
3121
3122 2006-11-20  Jim Meyering  <jim@meyering.net>
3123
3124         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
3125         continue using the flexible array member (thus, this module performs
3126         half as many malloc calls), with the addition that...
3127         (getgroup, getuser): Consistently record a non-match via an empty
3128         "name" string, and map an empty string match to a NULL return value.
3129         * modules/idcache (Depends-on): Re-add flexmember.
3130
3131         * lib/idcache.c (getuser): Remove all uses of the register keyword.
3132         (getuidbyname, getgroup, getgidbyname): Likewise.
3133
3134         Use cleaner syntax: NULL rather than 0.
3135         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
3136
3137 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
3138
3139         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
3140         It mishandled the case where the group was missing.
3141         Problem reported by Greg Schafer.
3142         * modules/idcache: Likewise.
3143
3144 2006-11-18  Jim Meyering  <jim@meyering.net>
3145
3146         * check-module (%exempt_header): Add exception for some
3147         conditionally-included headers.
3148
3149         * modules/i-ring (Depends-on): Add verify.
3150         (License): Change to LGPL.
3151
3152 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
3153
3154         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
3155         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
3156         and inttostr.h.  Use snprintf rather than uinttostr, so that
3157         LGPLed code doesn't depend on GPLed.
3158
3159 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
3160
3161         * modules/inline (License): Change from GPL to LGPL.
3162
3163 2006-11-17  Jim Meyering  <jim@meyering.net>
3164
3165         * modules/d-type (License): Switch to LGPL.
3166
3167 2006-11-15  Bruno Haible  <bruno@clisp.org>
3168
3169         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
3170
3171 2006-11-15  Eric Blake  <ebb9@byu.net>
3172
3173         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
3174         the module dependency.
3175
3176 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
3177             Bruno Haible  <bruno@clisp.org>
3178
3179         * gnulib-tool (func_create_testdir): Add license consistency check.
3180
3181 2006-11-15  Eric Blake  <ebb9@byu.net>
3182
3183         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
3184         random "(cached)" in configure output.
3185
3186 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3187
3188         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
3189         test for conforming inttypes.h is both announced and cached.
3190
3191         * MODULES.html.sh (seen_modules, seen_files): New variables.
3192         (func_module): Rewrite to use a few less gnulib-tool and sed
3193         invocations.  Avoid a couple of quadratic algorithms for ...
3194         (missed_modules, missed_files): ... these, with ...
3195         (func_append, func_tmpdir): ... these new functions, from
3196         gnulib-tool.  Analogously, install traps for cleanup.
3197
3198         * tests/test-gc.c (main): Remove unused variables.
3199         * tests/test-read-file.c: Include stdlib.h, for 'free'.
3200
3201 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
3202
3203         * modules/inttostr (License): Change to LGPL.
3204
3205 2006-11-14  Eric Blake  <ebb9@byu.net>
3206
3207         * modules/tempname (License): Change to LGPL.
3208
3209 2006-11-14  Eric Blake  <ebb9@byu.net>
3210
3211         * doc/functions.texi (Function Portability): *printf functions on
3212         Cygwin now understand all POSIX size specifiers.
3213
3214 2006-11-14  Bruno Haible  <bruno@clisp.org>
3215
3216         * modules/c-ctype (License): Change to LGPL.
3217
3218 2006-11-12  Bruno Haible  <bruno@clisp.org>
3219
3220         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
3221         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
3222         for GNOME libraries, for which the include files are installed in
3223         subdirectories of $prefix/include.
3224
3225 2006-11-12  Bruno Haible  <bruno@clisp.org>
3226
3227         * m4/lib-link.m4: Require at least autoconf-2.54.
3228         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
3229         name to underscores for the --with option.
3230
3231 2006-11-13  Bruno Haible  <bruno@clisp.org>
3232
3233         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
3234         the tests directory.
3235         Reported by Ralf Wildenhues.
3236
3237 2006-11-13  Bruno Haible  <bruno@clisp.org>
3238
3239         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
3240         (func_emit_initmacro_end): Undo the override here.
3241         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
3242         Works around the famous automake error in coreutils.
3243
3244 2006-11-13  Eric Blake  <ebb9@byu.net>
3245
3246         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
3247         element, not its node.
3248
3249 2006-11-12  Bruno Haible  <bruno@clisp.org>
3250
3251         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
3252         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
3253
3254 2006-11-12  Bruno Haible  <bruno@clisp.org>
3255
3256         * gnulib-tool: New option --local-symlink.
3257         (func_usage): Document it.
3258         (lsymbolic): New variable.
3259         (func_import, func_create_testdir): If --symlink was not specified,
3260         test whether --local-symlink was specified and the file comes from
3261         the local_gnulib_dir.
3262
3263 2006-11-12  Bruno Haible  <bruno@clisp.org>
3264
3265         * gnulib-tool (func_ln): New function.
3266         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
3267
3268 2006-11-12  Bruno Haible  <bruno@clisp.org>
3269
3270         Finish support for source files in subdirectories.
3271         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
3272         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
3273         AUTOMAKE_OPTIONS.
3274         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
3275
3276 2006-11-12  Bruno Haible  <bruno@clisp.org>
3277
3278         * gnulib-tool (func_get_automake_snippet): Synthesize also an
3279         EXTRA_lib_SOURCES augmentation.
3280         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
3281
3282 2006-11-12  Jim Meyering  <jim@meyering.net>
3283
3284         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
3285         file descriptors.  This also averts a failure on systems with
3286         native openat support when a traversed directory lacks "x" access.
3287         * lib/fts_.h: Include "i-ring.h"
3288         (struct FTS) [fts_fd_ring]: New member.
3289         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
3290         (FCHDIR): Add parentheses.
3291         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
3292         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
3293         When descending, rather than simply closing the previous
3294         fts_cwd_fd value, push that file descriptor onto the ring.
3295         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
3296         (fts_open): Initialize the new fd_ring member.
3297         (fts_close): Clear the ring.
3298         (fts_safe_changedir): When possible, use our new fd_ring to skip
3299         the diropen and fstat and dev/ino comparison that would normally
3300         accompany a virtual `chdir ("..")'.
3301
3302         * modules/fts (Depends-on): Add i-ring.
3303         * modules/i-ring: New module.
3304         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
3305         * m4/i-ring.m4: New file.
3306
3307 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3308
3309         * gnulib-tool (func_create_testdir): Fix replacement of
3310         `build-aux' in configure.ac.  Run autotools in gltests
3311         subdirectory.
3312         (func_create_testdir, func_create_megatestdir, test): There is
3313         no need for '--force' in most autotool invocations in a new
3314         tree.  Actually fail the whole test if any of the tools, or the
3315         configure or make stages fail.
3316
3317         Sync from Automake.
3318         * build-aux/gnupload: Revert last change.  Add pointer to upload
3319         instructions of the GNU Maintenance Instructions.
3320         Suggestion by Karl Berry.
3321
3322 2006-11-10  Jim Meyering  <jim@meyering.net>
3323
3324         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
3325
3326 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
3327
3328         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
3329         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
3330         (bind_textdomain_codeset) [! ENABLE_NLS]:
3331         Evaluate all the arguments.  That way, callers get compatible behavior
3332         if the arguments have side effects.  Also, it avoids some GCC
3333         diagnostics in some cases; Joel E. Denny reported problems when Bison
3334         was configured with --enable-gcc-warnigs.
3335
3336 2006-11-10  Jim Meyering  <jim@meyering.net>
3337
3338         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
3339         relevant options in CFLAGS (like -O, -fno-inline) are taken into
3340         account.
3341
3342 2006-11-10  Jim Meyering  <jim@meyering.net>
3343
3344         * modules/inline: New file/module.
3345         * modules/xalloc (Files): Remove m4/inline.m4.
3346         (Depends-on): Add inline, instead.
3347         * modules/oset: Likewise.
3348         * modules/list: Likewise.
3349
3350 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
3351
3352         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
3353         Problem reported by Matthew Woehlke.
3354
3355 2006-11-09  Bruno Haible  <bruno@clisp.org>
3356
3357         * lib/tempname.c (gen_tempname): Remove variant that invokes
3358         __gen_tempname.
3359         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
3360         __gen_tempname.
3361
3362 2006-11-08  Bruno Haible  <bruno@clisp.org>
3363
3364         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
3365         to 'yes' instead of 'cross-compiling'.
3366
3367 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
3368
3369         * lib/quotearg.h (quotearg_free): New decl.
3370         * lib/quotearg.c (quotearg_free): New function.
3371         (slot0, nslots, slotvec0, slotvec):
3372         Now file-scope so that quotearg_free can get at them.
3373
3374 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3375
3376         Sync from Automake.
3377         * build-aux/gnupload: Add missing 'gnu' to example URL.
3378         Report by Karl Berry.
3379
3380 2006-11-08  Bruno Haible  <bruno@clisp.org>
3381
3382         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
3383         Suggested by Paul Eggert.
3384
3385 2006-11-08  Jim Meyering  <jim@meyering.net>
3386
3387         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
3388         It's already included if !_LIBC.
3389         (fts_safe_changedir): Add a comment.
3390
3391 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
3392
3393         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
3394         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
3395         Matthew Woehlke.
3396
3397         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
3398         definitions up, to avoid colliding with change below.
3399         (static_inline) [HAVE_INLINE]: New macro.
3400         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
3401         Provide extern decls when !HAVE_INLINE.  Do not define unless
3402         static_inline is defined, either by us or by xmalloc.c.  Use
3403         static_inline rather than static inline.
3404         (XCALLOC): Optimize sizeof(T) = 1 case.
3405         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
3406
3407 2006-11-07  Bruno Haible  <bruno@clisp.org>
3408
3409         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
3410         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
3411         AC_C_INLINE.
3412         * modules/xalloc (Files): Add m4/inline.m4.
3413
3414 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3415
3416         * README: Fix typo.
3417         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
3418         (Miscellanous Notes): ...from this.
3419
3420 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
3421
3422         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
3423         Mention that offsetof should be used instead of sizeof.
3424         From Bruno Haible.
3425
3426 2006-11-07  Bruno Haible  <bruno@clisp.org>
3427
3428         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
3429
3430 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
3431
3432         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
3433         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
3434         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
3435         (gl_tree_add_before, gl_tree_add_after):
3436         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
3437         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
3438         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
3439         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
3440         (gl_linked_add_after, gl_linked_add_at): Likewise.
3441         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
3442         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
3443         (gl_tree_add_before, gl_tree_add_after): Likewise.
3444         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
3445         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
3446         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
3447
3448 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3449
3450         * lib/gl_oset.h: Use C comment style, not C++ comment style.
3451
3452 2006-11-06  Bruno Haible  <bruno@clisp.org>
3453
3454         * m4/inline.m4: New file.
3455         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
3456         * modules/list (Files): Add m4/inline.m4.
3457         * modules/oset (Files): Likewise.
3458
3459 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
3460
3461         * lib/idcache.c: Include <stddef.h>, for offsetof.
3462         (struct userid.name): Change from char * to a flexible array member.
3463         All uses changed.
3464         * modules/idcache (Depends-on): Add flexmember.
3465
3466         * MODULES.html.sh (Core language properties): New module flexmember.
3467         * modules/flexmember, m4/flexmember.m4: New files.
3468
3469         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
3470         inline functions that are identical with the old xnmalloc_inline,
3471         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
3472         that we can avoid some unnecessary integer multiplications and
3473         divisions in the common case where the element size is known at
3474         compile time.
3475         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
3476         needed.
3477         (xnboundedmalloc): Remove.
3478         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
3479         arguments, for consistency with rest of this header.
3480         (xcharalloc): Rewrite using XNMALLOC.
3481         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
3482         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
3483         versions have been moved to lib/xalloc.h and renamed to be the
3484         non-*_inline versions.
3485         (xmalloc, xrealloc): Implement without reference to the xnmalloc
3486         and xnrealloc functions, since those functions are now inline and
3487         now call us.
3488         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
3489         renaming described above.
3490         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
3491         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
3492         captures the dependency in AC_C_INLINE.
3493
3494         New module canonicalize-lgpl, proposed by Charles Wilson in
3495         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
3496         with a few small changes afterwards.
3497         * MODULES.html.sh (File system functions): New module
3498         canonicalize-lgpl.
3499         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
3500         and canonicalize_file_name.
3501         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
3502         * modules/canonicalize-lgpl: New files.
3503
3504 2006-11-05  Bruno Haible  <bruno@clisp.org>
3505
3506         * gnulib-tool (func_import, func_create_testdir): Create directories
3507         also for files in subdirectories of lib/.
3508
3509 2006-11-05  Bruno Haible  <bruno@clisp.org>
3510
3511         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
3512         ANSI C compliant.
3513
3514 2006-11-03  Bruno Haible  <bruno@clisp.org>
3515
3516         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
3517         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
3518         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
3519         (xnboundedmalloc): New inline function.
3520         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
3521         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
3522         xmalloc.
3523         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
3524         xmalloc.
3525         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
3526         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
3527         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
3528         xmalloc.
3529         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
3530         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
3531         xmalloc.
3532         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
3533         gl_tree_add_after): Use XMALLOC instead of xmalloc.
3534         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
3535         xmalloc.
3536         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
3537         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
3538         gl_tree_add_after): Use XMALLOC instead of xmalloc.
3539         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
3540         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
3541         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
3542         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
3543
3544 2006-11-03  Bruno Haible  <bruno@clisp.org>
3545
3546         * lib/c-ctype.h [C++]: Define functions without name mangling.
3547         * lib/fwriteerror.h [C++]: Likewise.
3548         * lib/gcd.h [C++]: Likewise.
3549         * lib/linebreak.h [C++]: Likewise.
3550
3551 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
3552
3553         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
3554         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
3555         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
3556         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
3557         Check for functions and headers just once.
3558         Check for declaration of canonicalize_file_name.
3559         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
3560
3561 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
3562
3563         * gnulib-tool (func_import): Fix typo in actioncmd.
3564
3565 2006-11-02  Bruno Haible  <bruno@clisp.org>
3566
3567         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
3568         newline sequence in the Makefile.am snippet as a space, like "make"
3569         does.
3570         Reported by Roger Persson <perrog@gmail.com>.
3571
3572 2006-11-01  Bruno Haible  <bruno@clisp.org>
3573
3574         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
3575         already declared in <string.h>.
3576         * lib/strcase.h (strncasecmp): Don't declare it if yes.
3577
3578 2006-11-01  Bruno Haible  <bruno@clisp.org>
3579
3580         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
3581         * lib/strcase.h: Include <string.h>.
3582         (strcasecmp): Define to rpl_strcasecmp here.
3583
3584 2006-11-01  Bruno Haible  <bruno@clisp.org>
3585
3586         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
3587
3588 2006-11-01  Eric Blake  <ebb9@byu.net>
3589
3590         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
3591
3592         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
3593
3594 2006-10-29  Bruno Haible  <bruno@clisp.org>
3595
3596         Make it compile in C++ mode.
3597         * lib/full-write.c (full_rw): Add a cast.
3598
3599 2006-11-01  Bruno Haible  <bruno@clisp.org>
3600
3601         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
3602         be POSIX compliant.
3603         Reported by Roger Persson <perrog@gmail.com>.
3604
3605 2006-11-01  Eric Blake  <ebb9@byu.net>
3606
3607         * lib/getopt_.h: Fix comments.
3608
3609 2006-10-31  Eric Blake  <ebb9@byu.net>
3610
3611         * modules/tmpdir (Depends-on): Add sys_stat.
3612         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
3613         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
3614         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
3615         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
3616         tempname.
3617
3618 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
3619
3620         Avoid some C++ diagnostics reported by Bruno Haible.
3621         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
3622         xmalloc.
3623         (quotearg_alloc): Use xcharalloc rather than xmalloc.
3624         (struct slotvec): Move to top level.
3625         (quotearg_n_options): Rewrite to avoid xmalloc.
3626         * lib/xalloc.h (xcharalloc): New function.
3627         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
3628         [defined __cplusplus]: Add function template that provides result
3629         type propagation.  This part of the change is from Bruno Haible.
3630
3631 2006-10-29  Bruno Haible  <bruno@clisp.org>
3632
3633         Make it compile in C++ mode.
3634         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
3635         * lib/strnlen1.c (strnlen1): Cast memchr result.
3636         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
3637         * lib/clean-temp.c (string_equals, string_hash): Add casts.
3638         (create_temp_dir): Rename local variable 'template'.
3639         (compile_csharp_using_sscli): Add cast.
3640         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
3641         * lib/findprog.c (find_in_path): Likewise.
3642         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
3643         * lib/wait-process.c (register_slave_subprocess): Likewise.
3644
3645 2006-10-22  Bruno Haible  <bruno@clisp.org>
3646
3647         * modules/tsearch: New file.
3648         * lib/tsearch.h: New file.
3649         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
3650         * m4/tsearch.m4: New file.
3651         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
3652
3653 2006-10-29  Eric Blake  <ebb9@byu.net>
3654
3655         * lib/arcfour.c: Assume config.h.
3656         * lib/arctwo.c: Likewise.
3657         * lib/base64.c: Likewise.
3658         * lib/check-version.c: Likewise.
3659         * lib/crc.c: Likewise.
3660         * lib/des.c: Likewise.
3661         * lib/gc-gnulib.c: Likewise.
3662         * lib/gc-libgcrypt.c: Likewise.
3663         * lib/gc-pbkdf2-sha1.c: Likewise.
3664         * lib/getaddrinfo.c: Likewise.
3665         * lib/getdelim.c: Likewise.
3666         * lib/getline.c: Likewise.
3667         * lib/hmac-md5.c: Likewise.
3668         * lib/hmac-sha1.c: Likewise.
3669         * lib/iconvme.c: Likewise.
3670         * lib/md2.c: Likewise.
3671         * lib/md4.c: Likewise.
3672         * lib/memxor.c: Likewise.
3673         * lib/read-file.c: Likewise.
3674         * lib/readline.c: Likewise.
3675         * lib/rijndael-alg-fst.c: Likewise.
3676         * lib/rijndael-api-fst.c: Likewise.
3677         * lib/xgetdomainname.c: Likewise.
3678
3679 2006-10-28  Eric Blake  <ebb9@byu.net>
3680
3681         * lib/xstrndup.c: Assume config.h.
3682
3683 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
3684
3685         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
3686         stat-macros.h is now for our own macros, whereas stat_h is for
3687         macros in the <sys/stat.h> name space.
3688         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
3689         (STAT_MACROS_H): Remove.
3690         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
3691         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
3692         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
3693         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
3694         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
3695         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
3696         Move these macros to ...
3697         * lib/stat_.h: here.  Don't include stat-macros.h.
3698         * lib/canonicalize.c: Don't include stat-macros.h.
3699         * lib/chown.c: Likewise.
3700         * lib/euidaccess.c: Likewise.
3701         * lib/file-type.c: Likewise.
3702         * lib/filemode.c: Likewise.
3703         * lib/glob.c: Likewise.
3704         * lib/isapipe.c: Likewise.
3705         * lib/lchown.c: Likewise.
3706         * lib/lstat.c: Likewise.
3707         * lib/mkdir-p.c: Likewise.
3708         * lib/rmdir.c: Likewise.
3709         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
3710         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
3711         unless mkdir isn't declared, to speed up 'configure'.
3712         Always create sys/stat.h, since it's unlikely any real sys/stat.h
3713         would define all the S_* symbols.
3714         * modules/canonicalize (Depends-on):
3715         Depend on sys_stat, not stat-macros.
3716         * modules/chown: Likewise.
3717         * modules/euidaccess: Likewise.
3718         * modules/filemode: Likewise.
3719         * modules/file-type: Likewise.
3720         * modules/glob: Likewise.
3721         * modules/isapipe: Likewise.
3722         * modules/lchown: Likewise.
3723         * modules/lstat: Likewise.
3724         * modules/mkancesdirs: Likewise.
3725         * modules/rmdir: Likewise.
3726         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
3727         * modules/modechange: Likewise.
3728         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
3729         (configure.ac): Remove gl_STAT_MACROS.
3730         * modules/sys_stat (Depends-on): Remove stat-macros.
3731
3732 2006-10-27  Bruno Haible  <bruno@clisp.org>
3733
3734         * m4/signed.m4: Remove file.
3735         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
3736         invocation.
3737         * modules/vasnprintf (Files): Remove m4/signed.m4.
3738
3739 2006-10-27  Bruno Haible  <bruno@clisp.org>
3740
3741         Update to GNU gettext 0.16.
3742         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
3743         m4/inttypes-h.m4, m4/signed.m4.
3744         * m4/gettext.m4: Update to GNU gettext 0.16.
3745         * m4/intl.m4: New file, from GNU gettext.
3746         * m4/intldir.m4: New file, from GNU gettext.
3747         * config/srclist.txt: Update
3748
3749 2006-10-27  Eric Blake  <ebb9@byu.net>
3750
3751         * MODULES.html.sh: Document tempname.
3752         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
3753         dependencies.
3754         (Files): Move lib/tempname.c...
3755         * modules/tempname: ...to this new module.
3756         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
3757         (gl_PREREQ_TEMPNAME): Move...
3758         * m4/tempname.m4: ...to this new file.
3759         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
3760         * modules/sys_stat (Depends-on): Add stat-macros.
3761         * lib/stat_.h (includes): Pick up stat macros.
3762         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
3763         if stat macros are broken.
3764         * lib/tempname.c (includes): No need to include "stat-macros.h".
3765         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
3766         (direxists, __path_search) [!_LIBC]: Don't compile these in
3767         gnulib; the tmpdir module covers that.
3768         * lib/tempname.h: New file.
3769
3770 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
3771
3772         * COPYING: Explain how gnulib-tool converts licence headers.
3773         Almost all wording by Eric Blake.
3774
3775 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
3776
3777         * lib/mbchar.h (is_basic_table): Make read-only.
3778         * lib/mbchar.c (is_basic_table): Likewise.
3779         Reported by John Darrington.
3780
3781 2006-10-25  Bruno Haible  <bruno@clisp.org>
3782
3783         * lib/progname.h (set_program_name): Undefine before defining.
3784
3785 2006-10-25  Bruno Haible  <bruno@clisp.org>
3786
3787         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
3788         false for non-gcc C++ compilers.
3789         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
3790
3791 2006-10-24  Bruno Haible  <bruno@clisp.org>
3792
3793         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
3794         iconv implementations like Irix iconv.
3795
3796 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3797
3798         * modules/vararrays: New file.
3799         * m4/vararrays.m4: New file, taken from diffutils.
3800         * MODULES.html.sh: New module vararrays.
3801
3802 2006-10-24  Karl Berry  <karl@gnu.org>
3803
3804         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
3805         Don't call GNU Unix.
3806
3807 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3808
3809         * users.txt: Add Libtool.
3810
3811         Sync from Libtool:
3812
3813         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3814
3815         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
3816         to gnulib's policy of including config.h unconditionally.
3817
3818 2006-10-24  Bruno Haible  <bruno@clisp.org>
3819
3820         * modules/wcwidth (Files): Add m4/wint_t.m4.
3821         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
3822         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
3823
3824 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3825
3826         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
3827         to pacify GCC with some -W flags enabled.  Problem reported by
3828         Bruno Haible.
3829
3830 2006-10-24  Jim Meyering  <jim@meyering.net>
3831
3832         * MODULES.html.sh: Remove uinttostr.  It's not a module.
3833         Reported by Karl Berry.
3834
3835 2006-10-23  Bruno Haible  <bruno@clisp.org>
3836
3837         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
3838
3839 2006-10-24  Bruno Haible  <bruno@clisp.org>
3840
3841         * lib/gl_list.h: Use C comment style, not C++ comment style.
3842
3843 2006-10-23  Eric Blake  <ebb9@byu.net>
3844
3845         * lib/getaddrinfo.c (includes): Add missing include.
3846
3847 2006-10-23  Bruno Haible  <bruno@clisp.org>
3848             Paul Eggert  <eggert@cs.ucla.edu>
3849
3850         Ability to rename obstack_free.
3851         * lib/obstack.h (__obstack_free): New macro. Declare instead of
3852         obstack_free.
3853         (obstack_free): Invoke the __obstack_free macro.
3854         * lib/obstack.c (obstack_free): Use __obstack_free macro.
3855
3856 2006-10-23  Bruno Haible  <bruno@clisp.org>
3857             Paul Eggert  <eggert@cs.ucla.edu>
3858
3859         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
3860         __argc, __argv from the declaration. (They are defined as macros on
3861         mingw.)
3862
3863 2006-10-22  Bruno Haible  <bruno@clisp.org>
3864
3865         * doc/gnulib-intro.texi: New file.
3866         * doc/gnulib.texi: Include it.
3867
3868 2006-10-21  Bruno Haible  <bruno@clisp.org>
3869
3870         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
3871         "Introduction", "Miscellanous Notes", "Particular Modules".
3872
3873 2006-10-21  Bruno Haible  <bruno@clisp.org>
3874
3875         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3876         Change mostlyclean-local rule to avoid sh syntax error from bash
3877         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
3878
3879 2006-10-23  Jim Meyering  <jim@meyering.net>
3880
3881         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
3882         in place of snprintf.
3883
3884         * modules/inttostr (Files): Add lib/uinttostr.c.
3885         * lib/uinttostr.c (inttostr): New file/function.
3886         * lib/inttostr.h (uinttostr): Declare.
3887         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
3888         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
3889         Add uinttostr.
3890         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
3891
3892 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
3893
3894         * lib/canonicalize.c (ELOOP): Define if not already defined.
3895         Problem reported by Bruno Haible in
3896         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
3897
3898 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
3899
3900         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
3901         Problem reported by Perry Smith and Ville Laurikari.
3902
3903         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
3904         uses.
3905
3906 2006-10-19  Bruno Haible  <bruno@clisp.org>
3907
3908         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
3909         for mingw.
3910
3911 2006-10-19  Bruno Haible  <bruno@clisp.org>
3912
3913         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
3914         Needed for mingw.
3915
3916 2006-10-19  Bruno Haible  <bruno@clisp.org>
3917
3918         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
3919
3920 2006-10-19  Bruno Haible  <bruno@clisp.org>
3921
3922         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
3923         it.
3924
3925 2006-10-19  Bruno Haible  <bruno@clisp.org>
3926
3927         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
3928         invocation.
3929
3930 2006-10-19  Bruno Haible  <bruno@clisp.org>
3931
3932         * gnulib-tool (func_create_testdir): Don't include ftruncate and
3933         mountlist by default.
3934
3935 2006-10-16  Bruno Haible  <bruno@clisp.org>
3936
3937         * lib/c-strstr.c: Include c-strstr.h.
3938
3939 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
3940
3941         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
3942         in a slash.
3943
3944 2006-10-18  Bruno Haible  <bruno@clisp.org>
3945
3946         * lib/lock.h [C++]: Wrap definitions in extern "C".
3947
3948 2006-10-18  Bruno Haible  <bruno@clisp.org>
3949
3950         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
3951         gl_LIBOBJS list.
3952
3953 2006-10-18  Bruno Haible  <bruno@clisp.org>
3954
3955         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
3956
3957 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
3958
3959         * lib/xstrtol.h: Include gettext.h.
3960         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
3961         Problem reported by Eric Blake.
3962         * modules/xstrtol (Depends-on): Add gettext-h.
3963
3964 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
3965
3966         * lib/strftime.c (advance): New macro.
3967         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
3968         incomplete type, so you can't add 0 to it.  Problem and patch
3969         reported by Eelco Dolstra for dietlibc.
3970
3971 2006-10-18  Jim Meyering  <jim@meyering.net>
3972
3973         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
3974         type for a local, and rename it: s/up/user_proc/.
3975
3976 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
3977
3978         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
3979         READ_UTMP_USER_PROCESS.
3980         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
3981
3982 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
3983
3984         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
3985         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
3986
3987 2006-10-17  Eric Blake  <ebb9@byu.net>
3988
3989         * lib/sigprocmask.c (sigprocmask): Fix typo.
3990
3991         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
3992
3993         * modules/clean-temp (Makefile.am): Don't add to make output...
3994         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
3995         config.h.
3996
3997 2006-10-17  Bruno Haible  <bruno@clisp.org>
3998
3999         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
4000         differently if DEFAULT_TEXT_DOMAIN is set.
4001
4002 2006-10-16  Bruno Haible  <bruno@clisp.org>
4003
4004         * lib/clean-temp.c: Include fwriteerror.h.
4005
4006 2006-10-16  Bruno Haible  <bruno@clisp.org>
4007
4008         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
4009
4010 2006-10-16  Bruno Haible  <bruno@clisp.org>
4011
4012         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
4013         * lib/sigprocmask.h: Include <sys/types.h>.
4014         (sigset_t): Use the system's definition if present.
4015
4016 2006-10-17  Eric Blake  <ebb9@byu.net>
4017
4018         * lib/xvasprintf.c (includes): Assume config.h.
4019         * lib/xasprintf.c (includes): Likewise.
4020
4021 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
4022
4023         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
4024         at least as wide as intmax_t.
4025
4026 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
4027
4028         (Imported from Automake.)
4029         * build-aux/gnupload: Update to version 1.1 of directive file.
4030
4031 2006-10-16  Eric Blake  <ebb9@byu.net>
4032
4033         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
4034         match Automake 1.10a.
4035
4036 2006-10-14  Bruno Haible  <bruno@clisp.org>
4037
4038         * modules/sigprocmask: New file.
4039         * lib/sigprocmask.h: New file.
4040         * lib/sigprocmask.c: New file.
4041         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
4042         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
4043         request sigprocmask.o.
4044         (gl_PREREQ_SIGPROCMASK): New macro.
4045         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
4046         (Depends-on): Add sigprocmask.
4047         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
4048         gt_SIGNALBLOCKING. Test for 'raise' only once.
4049         * lib/fatal-signal.c: Include sigprocmask.h.
4050         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
4051         unblock_fatal_signals): Define always.
4052         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
4053         sigprocmask.
4054
4055 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
4056
4057         Sync from Automake.
4058         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
4059         which incorrectly sets the mode of an existing destination
4060         directory.  In some cases the unpatched install-sh could do the
4061         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
4062         system.  We hope this is rare in practice, but it's clearly worth
4063         fixing.  Problem reported by Alex Unleashed in
4064         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
4065         Also, don't bother to check for -m bugs unless we're using -m;
4066         suggested by Stepan Kasal.
4067
4068 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4069
4070         Sync from Automake.
4071         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
4072         `-c' flag, so they appear at the same position as in %FASTDEP%
4073         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
4074         which ignores unknown options only after the first non-option.
4075         Bug report against M4 by Nelson H. F. Beebe.
4076
4077 2006-10-13  Jim Meyering  <jim@meyering.net>
4078
4079         Fix a bug in yesterday's change.
4080         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
4081         p->fts_statp->st_dev would be used uninitialized.
4082         Ensures that we always call fts_stat on the very first entry.
4083         Miklos Szeredi reported that find -xdev stopped working.
4084
4085 2006-10-12  Bruno Haible  <bruno@clisp.org>
4086
4087         * gnulib-tool (func_get_automake_snippet): Append an automatically
4088         computed EXTRA_DIST augmentation.
4089         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
4090         * modules/alloca-opt (Makefile.am): Likewise.
4091         * modules/allocsa (Makefile.am): Likewise.
4092         * modules/arcfour (Makefile.am): Likewise.
4093         * modules/arctwo (Makefile.am): Likewise.
4094         * modules/argmatch (Makefile.am): Likewise.
4095         * modules/argz (Makefile.am): Likewise.
4096         * modules/atexit (Makefile.am): Likewise.
4097         * modules/backupfile (Makefile.am): Likewise.
4098         * modules/byteswap (Makefile.am): Likewise.
4099         * modules/c-strtod (Makefile.am): Likewise.
4100         * modules/c-strtold (Makefile.am): Likewise.
4101         * modules/calloc (Makefile.am): Likewise.
4102         * modules/canon-host (Makefile.am): Likewise.
4103         * modules/canonicalize (Makefile.am): Likewise.
4104         * modules/chdir-long (Makefile.am): Likewise.
4105         * modules/chdir-safer (Makefile.am): Likewise.
4106         * modules/check-version (Makefile.am): Likewise.
4107         * modules/chown (Makefile.am): Likewise.
4108         * modules/cloexec (Makefile.am): Likewise.
4109         * modules/close-stream (Makefile.am): Likewise.
4110         * modules/closeout (Makefile.am): Likewise.
4111         * modules/crc (Makefile.am): Likewise.
4112         * modules/csharpexec (Makefile.am): Likewise.
4113         * modules/cycle-check (Makefile.am): Likewise.
4114         * modules/des (Makefile.am): Likewise.
4115         * modules/dev-ino (Makefile.am): Likewise.
4116         * modules/dirfd (Makefile.am): Likewise.
4117         * modules/dirname (Makefile.am): Likewise.
4118         * modules/dup2 (Makefile.am): Likewise.
4119         * modules/eealloc (Makefile.am): Likewise.
4120         * modules/error (Makefile.am): Likewise.
4121         * modules/euidaccess (Makefile.am): Likewise.
4122         * modules/exclude (Makefile.am): Likewise.
4123         * modules/exitfail (Makefile.am): Likewise.
4124         * modules/fcntl-safer (Makefile.am): Likewise.
4125         * modules/fcntl (Makefile.am): Likewise.
4126         * modules/file-type (Makefile.am): Likewise.
4127         * modules/fileblocks (Makefile.am): Likewise.
4128         * modules/filemode (Makefile.am): Likewise.
4129         * modules/filenamecat (Makefile.am): Likewise.
4130         * modules/fnmatch (Makefile.am): Likewise.
4131         * modules/fopen-safer (Makefile.am): Likewise.
4132         * modules/fpending (Makefile.am): Likewise.
4133         * modules/fprintftime (Makefile.am): Likewise.
4134         * modules/free (Makefile.am): Likewise.
4135         * modules/fsusage (Makefile.am): Likewise.
4136         * modules/ftruncate (Makefile.am): Likewise.
4137         * modules/fts (Makefile.am): Likewise.
4138         * modules/gc-arcfour (Makefile.am): Likewise.
4139         * modules/gc-des (Makefile.am): Likewise.
4140         * modules/gc-hmac-md5 (Makefile.am): Likewise.
4141         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
4142         * modules/gc-md4 (Makefile.am): Likewise.
4143         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
4144         * modules/gc-sha1 (Makefile.am): Likewise.
4145         * modules/gc (Makefile.am): Likewise.
4146         * modules/getaddrinfo (Makefile.am): Likewise.
4147         * modules/getcwd (Makefile.am): Likewise.
4148         * modules/getdelim (Makefile.am): Likewise.
4149         * modules/getdomainname (Makefile.am): Likewise.
4150         * modules/getgroups (Makefile.am): Likewise.
4151         * modules/gethostname (Makefile.am): Likewise.
4152         * modules/gethrxtime (Makefile.am): Likewise.
4153         * modules/getline (Makefile.am): Likewise.
4154         * modules/getloadavg (Makefile.am): Likewise.
4155         * modules/getlogin_r (Makefile.am): Likewise.
4156         * modules/getndelim2 (Makefile.am): Likewise.
4157         * modules/getopt (Makefile.am): Likewise.
4158         * modules/getpagesize (Makefile.am): Likewise.
4159         * modules/getpass-gnu (Makefile.am): Likewise.
4160         * modules/getpass (Makefile.am): Likewise.
4161         * modules/getsubopt (Makefile.am): Likewise.
4162         * modules/gettime (Makefile.am): Likewise.
4163         * modules/gettimeofday (Makefile.am): Likewise.
4164         * modules/getugroups (Makefile.am): Likewise.
4165         * modules/getusershell (Makefile.am): Likewise.
4166         * modules/glob (Makefile.am): Likewise.
4167         * modules/group-member (Makefile.am): Likewise.
4168         * modules/hard-locale (Makefile.am): Likewise.
4169         * modules/hash (Makefile.am): Likewise.
4170         * modules/hmac-md5 (Makefile.am): Likewise.
4171         * modules/hmac-sha1 (Makefile.am): Likewise.
4172         * modules/human (Makefile.am): Likewise.
4173         * modules/idcache (Makefile.am): Likewise.
4174         * modules/imaxabs (Makefile.am): Likewise.
4175         * modules/imaxdiv (Makefile.am): Likewise.
4176         * modules/inet_ntop (Makefile.am): Likewise.
4177         * modules/inet_pton (Makefile.am): Likewise.
4178         * modules/intprops (Makefile.am): Likewise.
4179         * modules/inttostr (Makefile.am): Likewise.
4180         * modules/inttypes (Makefile.am): Likewise.
4181         * modules/isapipe (Makefile.am): Likewise.
4182         * modules/javaversion (Makefile.am): Likewise.
4183         * modules/lchmod (Makefile.am): Likewise.
4184         * modules/lchown (Makefile.am): Likewise.
4185         * modules/localcharset (Makefile.am): Likewise.
4186         * modules/long-options (Makefile.am): Likewise.
4187         * modules/lstat (Makefile.am): Likewise.
4188         * modules/malloc (Makefile.am): Likewise.
4189         * modules/mathl (Makefile.am): Likewise.
4190         * modules/mbchar (Makefile.am): Likewise.
4191         * modules/md2 (Makefile.am): Likewise.
4192         * modules/md4 (Makefile.am): Likewise.
4193         * modules/md5 (Makefile.am): Likewise.
4194         * modules/memcasecmp (Makefile.am): Likewise.
4195         * modules/memchr (Makefile.am): Likewise.
4196         * modules/memcmp (Makefile.am): Likewise.
4197         * modules/memcoll (Makefile.am): Likewise.
4198         * modules/memcpy (Makefile.am): Likewise.
4199         * modules/memmem (Makefile.am): Likewise.
4200         * modules/memmove (Makefile.am): Likewise.
4201         * modules/mempcpy (Makefile.am): Likewise.
4202         * modules/memrchr (Makefile.am): Likewise.
4203         * modules/memset (Makefile.am): Likewise.
4204         * modules/memxor (Makefile.am): Likewise.
4205         * modules/mkancesdirs (Makefile.am): Likewise.
4206         * modules/mkdir-p (Makefile.am): Likewise.
4207         * modules/mkdir (Makefile.am): Likewise.
4208         * modules/mkdtemp (Makefile.am): Likewise.
4209         * modules/mkstemp (Makefile.am): Likewise.
4210         * modules/mktime (Makefile.am): Likewise.
4211         * modules/modechange (Makefile.am): Likewise.
4212         * modules/mountlist (Makefile.am): Likewise.
4213         * modules/nanosleep (Makefile.am): Likewise.
4214         * modules/obstack (Makefile.am): Likewise.
4215         * modules/openat (Makefile.am): Likewise.
4216         * modules/pagealign_alloc (Makefile.am): Likewise.
4217         * modules/pathmax (Makefile.am): Likewise.
4218         * modules/physmem (Makefile.am): Likewise.
4219         * modules/poll (Makefile.am): Likewise.
4220         * modules/posixtm (Makefile.am): Likewise.
4221         * modules/posixver (Makefile.am): Likewise.
4222         * modules/putenv (Makefile.am): Likewise.
4223         * modules/quote (Makefile.am): Likewise.
4224         * modules/quotearg (Makefile.am): Likewise.
4225         * modules/raise (Makefile.am): Likewise.
4226         * modules/read-file (Makefile.am): Likewise.
4227         * modules/readline (Makefile.am): Likewise.
4228         * modules/readlink (Makefile.am): Likewise.
4229         * modules/readtokens (Makefile.am): Likewise.
4230         * modules/readutmp (Makefile.am): Likewise.
4231         * modules/realloc (Makefile.am): Likewise.
4232         * modules/regex (Makefile.am): Likewise.
4233         * modules/rename-dest-slash (Makefile.am): Likewise.
4234         * modules/rename (Makefile.am): Likewise.
4235         * modules/rijndael (Makefile.am): Likewise.
4236         * modules/rmdir (Makefile.am): Likewise.
4237         * modules/rpmatch (Makefile.am): Likewise.
4238         * modules/safe-read (Makefile.am): Likewise.
4239         * modules/safe-write (Makefile.am): Likewise.
4240         * modules/same-inode (Makefile.am): Likewise.
4241         * modules/same (Makefile.am): Likewise.
4242         * modules/save-cwd (Makefile.am): Likewise.
4243         * modules/savedir (Makefile.am): Likewise.
4244         * modules/setenv (Makefile.am): Likewise.
4245         * modules/settime (Makefile.am): Likewise.
4246         * modules/sha1 (Makefile.am): Likewise.
4247         * modules/sig2str (Makefile.am): Likewise.
4248         * modules/snprintf (Makefile.am): Likewise.
4249         * modules/stat-macros (Makefile.am): Likewise.
4250         * modules/stat-time (Makefile.am): Likewise.
4251         * modules/stdbool (Makefile.am): Likewise.
4252         * modules/stdint (Makefile.am): Likewise.
4253         * modules/stdlib-safer (Makefile.am): Likewise.
4254         * modules/stpcpy (Makefile.am): Likewise.
4255         * modules/stpncpy (Makefile.am): Likewise.
4256         * modules/strcase (Makefile.am): Likewise.
4257         * modules/strcasestr (Makefile.am): Likewise.
4258         * modules/strchrnul (Makefile.am): Likewise.
4259         * modules/strcspn (Makefile.am): Likewise.
4260         * modules/strdup (Makefile.am): Likewise.
4261         * modules/strerror (Makefile.am): Likewise.
4262         * modules/strftime (Makefile.am): Likewise.
4263         * modules/strndup (Makefile.am): Likewise.
4264         * modules/strnlen (Makefile.am): Likewise.
4265         * modules/strpbrk (Makefile.am): Likewise.
4266         * modules/strsep (Makefile.am): Likewise.
4267         * modules/strstr (Makefile.am): Likewise.
4268         * modules/strtod (Makefile.am): Likewise.
4269         * modules/strtoimax (Makefile.am): Likewise.
4270         * modules/strtok_r (Makefile.am): Likewise.
4271         * modules/strtol (Makefile.am): Likewise.
4272         * modules/strtoll (Makefile.am): Likewise.
4273         * modules/strtoul (Makefile.am): Likewise.
4274         * modules/strtoull (Makefile.am): Likewise.
4275         * modules/strtoumax (Makefile.am): Likewise.
4276         * modules/strverscmp (Makefile.am): Likewise.
4277         * modules/sys_socket (Makefile.am): Likewise.
4278         * modules/sys_stat (Makefile.am): Likewise.
4279         * modules/sysexits (Makefile.am): Likewise.
4280         * modules/time_r (Makefile.am): Likewise.
4281         * modules/timegm (Makefile.am): Likewise.
4282         * modules/timespec (Makefile.am): Likewise.
4283         * modules/tmpfile-safer (Makefile.am): Likewise.
4284         * modules/trim (Makefile.am): Likewise.
4285         * modules/unistd-safer (Makefile.am): Likewise.
4286         * modules/unlinkdir (Makefile.am): Likewise.
4287         * modules/unlocked-io (Makefile.am): Likewise.
4288         * modules/userspec (Makefile.am): Likewise.
4289         * modules/utime (Makefile.am): Likewise.
4290         * modules/utimecmp (Makefile.am): Likewise.
4291         * modules/utimens (Makefile.am): Likewise.
4292         * modules/vasnprintf (Makefile.am): Likewise.
4293         * modules/vasprintf (Makefile.am): Likewise.
4294         * modules/vsnprintf (Makefile.am): Likewise.
4295         * modules/xalloc (Makefile.am): Likewise.
4296         * modules/xgetcwd (Makefile.am): Likewise.
4297         * modules/xnanosleep (Makefile.am): Likewise.
4298         * modules/xreadlink (Makefile.am): Likewise.
4299         * modules/xstrtod (Makefile.am): Likewise.
4300         * modules/xstrtol (Makefile.am): Likewise.
4301         * modules/xstrtold (Makefile.am): Likewise.
4302         * modules/yesno (Makefile.am): Likewise.
4303         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
4304
4305 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
4306
4307         * modules/error (Makefile.am): Distribute files through
4308         EXTRA_DIST, not lib_SOURCES.
4309
4310 2006-10-12  Eric Blake  <ebb9@byu.net>
4311
4312         * modules/error (Makefile.am): Distribute files in /lib.
4313         * modules/obstack (Makefile.am): Likewise.
4314
4315 2006-10-12  Bruno Haible  <bruno@clisp.org>
4316
4317         * modules/acl (Makefile.am): Distribute all files in lib/ through
4318         EXTRA_DIST.
4319         * modules/arcfour (Makefile.am): Likewise.
4320         * modules/arctwo (Makefile.am): Likewise.
4321         * modules/argmatch (Makefile.am): Likewise.
4322         * modules/argz (Makefile.am): Likewise.
4323         * modules/atexit (Makefile.am): Likewise.
4324         * modules/backupfile (Makefile.am): Likewise.
4325         * modules/c-strtod (Makefile.am): Likewise.
4326         * modules/c-strtold (Makefile.am): Likewise.
4327         * modules/calloc (Makefile.am): Likewise.
4328         * modules/canon-host (Makefile.am): Likewise.
4329         * modules/canonicalize (Makefile.am): Likewise.
4330         * modules/chdir-long (Makefile.am): Likewise.
4331         * modules/chdir-safer (Makefile.am): Likewise.
4332         * modules/check-version (Makefile.am): Likewise.
4333         * modules/chown (Makefile.am): Likewise.
4334         * modules/cloexec (Makefile.am): Likewise.
4335         * modules/close-stream (Makefile.am): Likewise.
4336         * modules/closeout (Makefile.am): Likewise.
4337         * modules/crc (Makefile.am): Likewise.
4338         * modules/cycle-check (Makefile.am): Likewise.
4339         * modules/des (Makefile.am): Likewise.
4340         * modules/dirfd (Makefile.am): Likewise.
4341         * modules/dirname (Makefile.am): Likewise.
4342         * modules/dup2 (Makefile.am): Likewise.
4343         * modules/euidaccess (Makefile.am): Likewise.
4344         * modules/exclude (Makefile.am): Likewise.
4345         * modules/exitfail (Makefile.am): Likewise.
4346         * modules/fcntl-safer (Makefile.am): Likewise.
4347         * modules/file-type (Makefile.am): Likewise.
4348         * modules/fileblocks (Makefile.am): Likewise.
4349         * modules/filemode (Makefile.am): Likewise.
4350         * modules/filenamecat (Makefile.am): Likewise.
4351         * modules/fnmatch (Makefile.am): Likewise.
4352         * modules/fopen-safer (Makefile.am): Likewise.
4353         * modules/fpending (Makefile.am): Likewise.
4354         * modules/fprintftime (Makefile.am): Likewise.
4355         * modules/free (Makefile.am): Likewise.
4356         * modules/fsusage (Makefile.am): Likewise.
4357         * modules/ftruncate (Makefile.am): Likewise.
4358         * modules/fts (Makefile.am): Likewise.
4359         * modules/gc (Makefile.am): Likewise.
4360         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
4361         * modules/getaddrinfo (Makefile.am): Likewise.
4362         * modules/getcwd (Makefile.am): Likewise.
4363         * modules/getdelim (Makefile.am): Likewise.
4364         * modules/getdomainname (Makefile.am): Likewise.
4365         * modules/getgroups (Makefile.am): Likewise.
4366         * modules/gethostname (Makefile.am): Likewise.
4367         * modules/gethrxtime (Makefile.am): Likewise.
4368         * modules/getline (Makefile.am): Likewise.
4369         * modules/getloadavg (Makefile.am): Likewise.
4370         * modules/getlogin_r (Makefile.am): Likewise.
4371         * modules/getopt (Makefile.am): Likewise.
4372         * modules/getpass (Makefile.am): Likewise.
4373         * modules/getpass-gnu (Makefile.am): Likewise.
4374         * modules/getsubopt (Makefile.am): Likewise.
4375         * modules/gettime (Makefile.am): Likewise.
4376         * modules/gettimeofday (Makefile.am): Likewise.
4377         * modules/getugroups (Makefile.am): Likewise.
4378         * modules/getusershell (Makefile.am): Likewise.
4379         * modules/glob (Makefile.am): Likewise.
4380         * modules/group-member (Makefile.am): Likewise.
4381         * modules/hard-locale (Makefile.am): Likewise.
4382         * modules/hash (Makefile.am): Likewise.
4383         * modules/hmac-md5 (Makefile.am): Likewise.
4384         * modules/hmac-sha1 (Makefile.am): Likewise.
4385         * modules/human (Makefile.am): Likewise.
4386         * modules/idcache (Makefile.am): Likewise.
4387         * modules/imaxabs (Makefile.am): Likewise.
4388         * modules/imaxdiv (Makefile.am): Likewise.
4389         * modules/inet_ntop (Makefile.am): Likewise.
4390         * modules/inet_pton (Makefile.am): Likewise.
4391         * modules/inttostr (Makefile.am): Likewise.
4392         * modules/isapipe (Makefile.am): Likewise.
4393         * modules/lchown (Makefile.am): Likewise.
4394         * modules/long-options (Makefile.am): Likewise.
4395         * modules/lstat (Makefile.am): Likewise.
4396         * modules/malloc (Makefile.am): Likewise.
4397         * modules/mathl (Makefile.am): Likewise.
4398         * modules/mbchar (Makefile.am): Likewise.
4399         * modules/md2 (Makefile.am): Likewise.
4400         * modules/md4 (Makefile.am): Likewise.
4401         * modules/md5 (Makefile.am): Likewise.
4402         * modules/memcasecmp (Makefile.am): Likewise.
4403         * modules/memchr (Makefile.am): Likewise.
4404         * modules/memcmp (Makefile.am): Likewise.
4405         * modules/memcoll (Makefile.am): Likewise.
4406         * modules/memcpy (Makefile.am): Likewise.
4407         * modules/memmem (Makefile.am): Likewise.
4408         * modules/memmove (Makefile.am): Likewise.
4409         * modules/mempcpy (Makefile.am): Likewise.
4410         * modules/memrchr (Makefile.am): Likewise.
4411         * modules/memset (Makefile.am): Likewise.
4412         * modules/memxor (Makefile.am): Likewise.
4413         * modules/mkancesdirs (Makefile.am): Likewise.
4414         * modules/mkdir (Makefile.am): Likewise.
4415         * modules/mkdir-p (Makefile.am): Likewise.
4416         * modules/mkdtemp (Makefile.am): Likewise.
4417         * modules/mkstemp (Makefile.am): Likewise.
4418         * modules/mktime (Makefile.am): Likewise.
4419         * modules/modechange (Makefile.am): Likewise.
4420         * modules/mountlist (Makefile.am): Likewise.
4421         * modules/nanosleep (Makefile.am): Likewise.
4422         * modules/openat (Makefile.am): Likewise.
4423         * modules/pagealign_alloc (Makefile.am): Likewise.
4424         * modules/physmem (Makefile.am): Likewise.
4425         * modules/poll (Makefile.am): Likewise.
4426         * modules/posixtm (Makefile.am): Likewise.
4427         * modules/posixver (Makefile.am): Likewise.
4428         * modules/putenv (Makefile.am): Likewise.
4429         * modules/quote (Makefile.am): Likewise.
4430         * modules/quotearg (Makefile.am): Likewise.
4431         * modules/raise (Makefile.am): Likewise.
4432         * modules/read-file (Makefile.am): Likewise.
4433         * modules/readline (Makefile.am): Likewise.
4434         * modules/readlink (Makefile.am): Likewise.
4435         * modules/readtokens (Makefile.am): Likewise.
4436         * modules/readutmp (Makefile.am): Likewise.
4437         * modules/realloc (Makefile.am): Likewise.
4438         * modules/regex (Makefile.am): Likewise.
4439         * modules/rename (Makefile.am): Likewise.
4440         * modules/rename-dest-slash (Makefile.am): Likewise.
4441         * modules/rijndael (Makefile.am): Likewise.
4442         * modules/rmdir (Makefile.am): Likewise.
4443         * modules/rpmatch (Makefile.am): Likewise.
4444         * modules/safe-read (Makefile.am): Likewise.
4445         * modules/safe-write (Makefile.am): Likewise.
4446         * modules/same (Makefile.am): Likewise.
4447         * modules/save-cwd (Makefile.am): Likewise.
4448         * modules/savedir (Makefile.am): Likewise.
4449         * modules/setenv (Makefile.am): Likewise.
4450         * modules/settime (Makefile.am): Likewise.
4451         * modules/sha1 (Makefile.am): Likewise.
4452         * modules/sig2str (Makefile.am): Likewise.
4453         * modules/snprintf (Makefile.am): Likewise.
4454         * modules/stdlib-safer (Makefile.am): Likewise.
4455         * modules/stpcpy (Makefile.am): Likewise.
4456         * modules/stpncpy (Makefile.am): Likewise.
4457         * modules/strcase (Makefile.am): Likewise.
4458         * modules/strcasestr (Makefile.am): Likewise.
4459         * modules/strchrnul (Makefile.am): Likewise.
4460         * modules/strcspn (Makefile.am): Likewise.
4461         * modules/strdup (Makefile.am): Likewise.
4462         * modules/strerror (Makefile.am): Likewise.
4463         * modules/strftime (Makefile.am): Likewise.
4464         * modules/strndup (Makefile.am): Likewise.
4465         * modules/strnlen (Makefile.am): Likewise.
4466         * modules/strpbrk (Makefile.am): Likewise.
4467         * modules/strsep (Makefile.am): Likewise.
4468         * modules/strstr (Makefile.am): Likewise.
4469         * modules/strtod (Makefile.am): Likewise.
4470         * modules/strtoimax (Makefile.am): Likewise.
4471         * modules/strtok_r (Makefile.am): Likewise.
4472         * modules/strtol (Makefile.am): Likewise.
4473         * modules/strtoll (Makefile.am): Likewise.
4474         * modules/strtoul (Makefile.am): Likewise.
4475         * modules/strtoull (Makefile.am): Likewise.
4476         * modules/strtoumax (Makefile.am): Likewise.
4477         * modules/strverscmp (Makefile.am): Likewise.
4478         * modules/time_r (Makefile.am): Likewise.
4479         * modules/timegm (Makefile.am): Likewise.
4480         * modules/tmpfile-safer (Makefile.am): Likewise.
4481         * modules/unistd-safer (Makefile.am): Likewise.
4482         * modules/unlinkdir (Makefile.am): Likewise.
4483         * modules/userspec (Makefile.am): Likewise.
4484         * modules/utime (Makefile.am): Likewise.
4485         * modules/utimecmp (Makefile.am): Likewise.
4486         * modules/utimens (Makefile.am): Likewise.
4487         * modules/vasnprintf (Makefile.am): Likewise.
4488         * modules/vasprintf (Makefile.am): Likewise.
4489         * modules/vsnprintf (Makefile.am): Likewise.
4490         * modules/xalloc (Makefile.am): Likewise.
4491         * modules/xgetcwd (Makefile.am): Likewise.
4492         * modules/xnanosleep (Makefile.am): Likewise.
4493         * modules/xreadlink (Makefile.am): Likewise.
4494         * modules/xstrtod (Makefile.am): Likewise.
4495         * modules/xstrtol (Makefile.am): Likewise.
4496         * modules/xstrtold (Makefile.am): Likewise.
4497         * modules/yesno (Makefile.am): Likewise.
4498
4499 2006-10-12  Jim Meyering  <jim@meyering.net>
4500
4501         * m4/getloadavg.m4: Revert the change below.
4502
4503         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
4504         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
4505         fail with a symlink, which is what coreutils' ./bootstrap now
4506         creates by default.
4507
4508 2006-10-12  Bruno Haible  <bruno@clisp.org>
4509
4510         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
4511         mingw.
4512         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
4513         MSVC and mingw explicitly.
4514
4515 2006-10-11  Simon Josefsson  <jas@extundo.com>
4516             Bruno Haible  <bruno@clisp.org>
4517
4518         Add support for multiple gnulib-tool invocations in the scope of a
4519         single configure.ac file.
4520         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
4521         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
4522         with the same contents as the _LIBADD variable.
4523         (func_emit_initmacro_start, func_emit_initmacro_end,
4524         func_emit_initmacro_done): New functions.
4525         (func_import, func_create_testdir): Invoke them. Allow the identifiers
4526         gl_LIBOBJS and gl_LTLIBOBJS.
4527
4528 2006-10-11  Bruno Haible  <bruno@clisp.org>
4529
4530         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
4531         (func_create_testdir): Don't create po/Makefile.am, don't invoke
4532         autoreconf. Instead, invoke autopoint explicitly but move back the
4533         *.m4 files from gnulib.
4534
4535 2006-10-11  Bruno Haible  <bruno@clisp.org>
4536
4537         * gnulib-tool (func_usage): Make module names after --create-testdir
4538         optional.
4539         (func_create_testdir): If no module was specified, use nearly all
4540         modules.
4541
4542 2006-10-12  Jim Meyering  <jim@meyering.net>
4543
4544         Big performance improvement for fts-based tools that use FTS_NOSTAT.
4545         Avoid spurious inode-mismatch problems on non-POSIX file systems.
4546         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
4547         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
4548         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
4549         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
4550         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
4551         (fts_set_stat_required): New function.
4552         (fts_open): Defer the calls to fts_stat, if possible or requested.
4553         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
4554         into fts_stat itself.
4555         (fts_read): Perform any required (deferred) fts_stat call.
4556         (fts_build): Likewise, for the directory we're about to open and read.
4557         In the readdir loop, carefully decide whether each entry will require
4558         an eventual call to fts_stat, using dirent.d_type info if available.
4559         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
4560         a command line argument into this function.  Update all callers.
4561         Map a return value of FTS_DOT to FTS_D for a command line argument.
4562         * modules/fts (Depends-on): Add d-type.  Alphabetize.
4563         Thanks to Miklos Szeredi for his tenacity and for the initial
4564         bug report about "find" failing on a FUSE-based file system.
4565
4566         * lib/fts.c (fts_open): Use consistent indentation.
4567
4568 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
4569
4570         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
4571         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
4572         reported by Jim Meyering.  All uses of cache variables renamed
4573         to match Autoconf's.
4574         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
4575         the other one.
4576
4577         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
4578         Fix misspelling in diagnostic.
4579
4580 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
4581
4582         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
4583         defined.  Problem reported by Matthew Woehlke.
4584
4585         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
4586         Add support for Tandem NonStop R series.
4587         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
4588         Use new macro.
4589
4590         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
4591         (has_trailing_slash): Omit size arg; all callers changed.
4592         Omit 'inline', since it doesn't help performance and we'd
4593         need to configure it.
4594         Don't count //, ///, etc. as having a trailing slash.
4595         As a side effect, this removes a C99ism reported by Matthew Woehlke.
4596         (rpl_rename_dest_slash): On failure, use rename's errno rather
4597         than (in some cases) an incorrect or junk errno.
4598         Simplify code by removing need to compute length; this does
4599         cause it to make two passes instead of one over the file name,
4600         but it's worth it.
4601
4602         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
4603         change, since Autoconf's version may no longer be appropriate now
4604         that we are using CVS Autoconf's version.  Add support for Tandem.
4605
4606 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
4607             Bruno Haible  <bruno@clisp.org>
4608
4609         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
4610         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
4611         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
4612         gl_AC_TYPE_LONG_LONG.
4613
4614         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
4615         instead of HAVE_LONG_LONG.
4616         * lib/printf-args.c (printf_fetchargs): Likewise.
4617         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
4618         * lib/vasnprintf.c (VASNPRINTF): Likewise.
4619         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
4620         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
4621         gl_AC_TYPE_LONG_LONG.
4622
4623 2006-10-11  Bruno Haible  <bruno@clisp.org>
4624
4625         * m4/longlong.m4: Add comments.
4626         * m4/ulonglong.m4: Likewise.
4627
4628 2006-10-10  Bruno Haible  <bruno@clisp.org>
4629
4630         Make it possible to #define stpcpy, strdup to aliases.
4631         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
4632         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
4633
4634 2006-10-10  Bruno Haible  <bruno@clisp.org>
4635
4636         Make it possible to #define gcd to an alias.
4637         * lib/gcd.c: Include config.h.
4638
4639 2006-10-10  Bruno Haible  <bruno@clisp.org>
4640
4641         Make it possible to #define c_isascii to an alias.
4642         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
4643         defined. Undefine the macros before defining them, to avoid gcc
4644         warnings.
4645         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
4646         define NO_C_CTYPE_MACROS early.
4647
4648 2006-10-10  Bruno Haible  <bruno@clisp.org>
4649
4650         Make it possible to #define set_program_name to an alias.
4651         * lib/progname.c: Don't undefine set_program_name; instead, undefine
4652         ENABLE_RELOCATABLE early.
4653
4654 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
4655
4656         Port to Tandem NSK OSS, which has 64-bit signed int but at most
4657         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
4658         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
4659         More generally, don't assume that 64-bit signed int is available
4660         if unsigned int is, and vice versa.
4661         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
4662         unsigned symbols, not on their signed counterparts.
4663         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
4664         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
4665         (UINT64_C, UINTMAX_C):
4666         Likewise.
4667         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
4668         unsigned counterparts.
4669         (Have_long_long, Unsigned): New macros.
4670         (Int): Renamed from INT.
4671         (strtoimax): Use the new macros.
4672         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
4673         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
4674         * modules/inttypes (inttypes.h): Substitute
4675         HAVE_UNSIGNED_LONG_LONG_INT.
4676         * modules/stdint (stdint.h): Likewise.
4677         (Files): Add m4/ulonglong.m4.
4678
4679 2006-10-10  Bruno Haible  <bruno@clisp.org>
4680
4681         Fix a gcc -Wshadow warning.
4682         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
4683         to 'bucket'.
4684         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
4685         gl_linked_indexof_from_to): Likewise.
4686         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
4687         Likewise.
4688         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
4689         Likewise.
4690         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
4691         Reported by Eric Blake.
4692
4693 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
4694
4695         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
4696         for NetBSD.  Problem reported by Bruno Haible.
4697
4698 2006-10-09  Jim Meyering  <jim@meyering.net>
4699
4700         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
4701         Patch from Bruno Haible.
4702
4703 2006-10-09  Jim Meyering  <jim@meyering.net>
4704
4705         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
4706         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
4707         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
4708
4709 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
4710
4711         Don't include <config.h> twice; this doesn't work in some cases,
4712         e.g., when config.h has "#define intmax_t long long int" and
4713         we include <config.h>, <inttypes.h>, <config.h> in that order.
4714         Problem reported by Matthew Woehlke in:
4715         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
4716         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
4717         * lib/fts-cycle.c: Don't include config.h.
4718         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
4719         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
4720         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
4721         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
4722         inttypes.h.
4723         * lib/xstrtoumax.c: Likewise.
4724         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
4725         __strtol and the like, so that this module is more like its siblings.
4726         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
4727         Remove; no longer needed now that we assume gnulib inttypes.h.
4728
4729 2006-10-08  Bruno Haible  <bruno@clisp.org>
4730
4731         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
4732         option.
4733
4734 2006-10-07  Jim Meyering  <jim@meyering.net>
4735
4736         * modules/inttypes (inttypes.h): Revert what seems to have been
4737         an inadvertent part of today's change: use "|", not "/" in the
4738         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
4739
4740 2006-10-07  Bruno Haible  <bruno@clisp.org>
4741
4742         * modules/sublist: New file.
4743
4744 2006-10-07  Bruno Haible  <bruno@clisp.org>
4745
4746         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
4747         * modules/argz (argz.h): Likewise.
4748         * modules/arpa_inet (arpa/inet.h): Likewise.
4749         * modules/byteswap (byteswap.h): Likewise.
4750         * modules/configmake (configmake.h): Likewise.
4751         * modules/fcntl (fcntl.h): Likewise.
4752         * modules/fnmatch (fnmatch.h): Likewise.
4753         * modules/getopt (getopt.h): Likewise.
4754         * modules/glob (glob.h): Likewise.
4755         * modules/inttypes (inttypes.h): Likewise.
4756         * modules/netinet_in (netinet/in.h): Likewise.
4757         * modules/poll (poll.h): Likewise.
4758         * modules/stdbool (stdbool.h): Likewise.
4759         * modules/stdint (stdint.h): Likewise.
4760         * modules/sys_select (sys/select.h): Likewise.
4761         * modules/sys_socket (sys/socket.h): Likewise.
4762         * modules/sys_stat (sys/stat.h): Likewise.
4763         * modules/sysexits (sysexits.h): Likewise.
4764         * modules/unistd (unistd.h): Likewise.
4765         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4766         Add a "DO NOT EDIT" comment to the generated file.
4767         (func_import): Likewise for gnulib-comp.m4.
4768
4769 2006-10-07  Bruno Haible  <bruno@clisp.org>
4770
4771         * lib/gl_sublist.h: New file.
4772         * lib/gl_sublist.c: New file.
4773
4774 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
4775
4776         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
4777         name (relative to the original working directory) and the file
4778         name component (relative to the temporary working directory).  All
4779         callers changed.
4780         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
4781         * lib/mkdir-p.c (make_dir_parents): Likewise.
4782         * lib/mkdir-p.h (make_dir_parents): Likewise.
4783
4784 2006-10-06  Eric Blake  <ebb9@byu.net>
4785
4786         Define several macros for use by the clean-temp module.
4787         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
4788         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
4789         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
4790
4791         * lib/clean-temp.h (close_stream_temp): New declaration.
4792         * lib/clean-temp.c (includes): Pull in headers according to what
4793         other modules are in use.
4794         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
4795
4796 2006-10-06  Bruno Haible  <bruno@clisp.org>
4797
4798         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
4799         instead of fopen, fwriteerror.
4800
4801 2006-10-06  Bruno Haible  <bruno@clisp.org>
4802
4803         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
4804         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
4805         int.
4806         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
4807         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
4808         Return an error indicator.
4809         Suggested by Eric Blake.
4810
4811 2006-10-06  Bruno Haible  <bruno@clisp.org>
4812
4813         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
4814         Reported by Eric Blake.
4815
4816 2006-10-06  Bruno Haible  <bruno@clisp.org>
4817
4818         * modules/closeout (Description): Mention stderr too.
4819
4820 2006-10-06  Bruno Haible  <bruno@clisp.org>
4821         and Paul Eggert  <eggert@cs.ucla.edu>
4822
4823         * lib/closeout.c (close_stdout): Also close stderr.
4824         * lib/closeout.h: Update comment.
4825
4826 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
4827
4828         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
4829         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
4830         * lib/dirchownmod.c: Include lchown.h.
4831         * lib/lchown.c: Don't include files that lchown.h now includes.
4832         Don't declare chown, since lchown.h now does that.
4833         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
4834         (lchown): Define to rpl_chown if lchown is declared but
4835         does not exist.  Declare using a prototype if lchown is not
4836         declared.  Add a copyright notice.
4837         * lib/mkstemp.h: Include <unistd.h>.
4838         * lib/openat.c: Include lchown.h.
4839
4840         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
4841         we now test for that separately.
4842         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
4843         rather than O_NOFOLLOW, when testing whether it's possible to
4844         avoid a race condition reliably.
4845         * lib/savewd.c (savewd_chdir): Likewise.
4846
4847         Remove macros that are no longer needed now that stdint.h is
4848         reliable.
4849         * lib/fsusage.c (UINTMAX_MAX): Remove.
4850         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
4851         * lib/utimecmp.c (SIZE_MAX): Remove.
4852
4853         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
4854
4855         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
4856         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
4857         O_NOATIME works.
4858
4859 2006-10-05  Bruno Haible  <bruno@clisp.org>
4860
4861         * lib/gl_list.h (gl_sortedlist_search_from_to,
4862         gl_sortedlist_indexof_from_to): New declarations.
4863         (gl_list_implementation): New fields sortedlist_search_from_to,
4864         sortedlist_indexof_from_to.
4865         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
4866         inline functions.
4867         * lib/gl_list.c (gl_sortedlist_search_from_to,
4868         gl_sortedlist_indexof_from_to): New functions.
4869         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
4870         function.
4871         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
4872         (gl_array_sortedlist_search_from_to): New function.
4873         (gl_array_list_implementation): Update.
4874         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
4875         function.
4876         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
4877         (gl_carray_sortedlist_search_from_to): New function.
4878         (gl_carray_list_implementation): Update.
4879         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
4880         gl_linked_sortedlist_indexof_from_to): New functions.
4881         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
4882         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
4883         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
4884         gl_tree_sortedlist_indexof_from_to): New functions.
4885         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
4886         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
4887         Update.
4888         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
4889         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
4890         Update.
4891
4892 2006-10-05  Bruno Haible  <bruno@clisp.org>
4893
4894         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
4895         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
4896         (struct gl_list_implementation): Add fields search_from_to,
4897         indexof_from_to. Remove fields search, indexof.
4898         (gl_list_search): Use the search_from_to method.
4899         (gl_list_search_from, gl_list_search_from_to): New functions.
4900         (gl_list_indexof): Use the indexof_from_to method.
4901         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
4902         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
4903         (gl_list_search_from, gl_list_search_from_to): New functions.
4904         (gl_list_indexof): Use the indexof_from_to method.
4905         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
4906         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
4907         gl_array_indexof. Add start_index, end_index arguments.
4908         (gl_array_search_from_to): Renamed from gl_array_search. Add
4909         start_index, end_index arguments.
4910         (gl_array_remove, gl_array_list_implementation): Update.
4911         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
4912         gl_carray_indexof. Add start_index, end_index arguments.
4913         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
4914         start_index, end_index arguments.
4915         (gl_carray_remove, gl_carray_list_implementation): Update.
4916         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
4917         gl_linked_search. Add start_index, end_index arguments.
4918         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
4919         start_index, end_index arguments.
4920         (gl_linked_remove): Update.
4921         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
4922         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
4923         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
4924         field to 'size_t'.
4925         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
4926         gl_tree_search. Add start_index, end_index arguments.
4927         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
4928         start_index, end_index arguments.
4929         (gl_tree_remove): Update.
4930         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
4931         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
4932         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
4933         function.
4934         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
4935         gl_tree_search. Add start_index, end_index arguments.
4936         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
4937         start_index, end_index arguments.
4938         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
4939         Update.
4940         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
4941
4942 2006-10-05  Bruno Haible  <bruno@clisp.org>
4943
4944         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
4945
4946         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
4947         fwriteerror_temp): New declarations.
4948         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
4949         (descriptors): New variable.
4950         (cleanup): First, close the descriptors.
4951         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
4952         fclose_temp, fwriteerror_temp): New functions.
4953
4954 2006-10-04  Jim Meyering  <jim@meyering.net>
4955
4956         * lib/fts.c (fts_open): Tiny comment change.
4957
4958 2006-10-04  Bruno Haible  <bruno@clisp.org>
4959
4960         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
4961         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
4962         gl_LOCK_BODY.
4963         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
4964         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
4965         gl_LOCK_EARLY_BODY.
4966         (gl_LOCK): Require gl_LOCK_BODY.
4967
4968 2006-10-04  Bruno Haible  <bruno@clisp.org>
4969
4970         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
4971         (gl_oset_search_atleast): New declaration.
4972         (struct gl_oset_implementation): Add field 'search_atleast'.
4973         (gl_oset_search_atleast): New inline function.
4974         * lib/gl_oset.c (gl_oset_search_atleast): New function.
4975         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
4976         (gl_array_oset_implementation): Update.
4977         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
4978         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
4979         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
4980
4981 2006-10-04  Bruno Haible  <bruno@clisp.org>
4982
4983         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
4984
4985 2006-10-03  Bruno Haible  <bruno@clisp.org>
4986
4987         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
4988         from gl_avltreehash_list_implementation.
4989
4990 2006-10-03  Bruno Haible  <bruno@clisp.org>
4991
4992         * lib/gl_oset.c (gl_oset_add): Fix return type.
4993
4994 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
4995
4996         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
4997
4998 2006-10-02  Eric Blake  <ebb9@byu.net>
4999
5000         * modules/strnlen (Depends-on): Add extensions.
5001
5002 2006-10-02  Eric Blake  <ebb9@byu.net>
5003
5004         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
5005         definition in 2.60+.
5006
5007 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
5008
5009         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
5010         checks.
5011
5012 2006-10-02  Bruno Haible  <bruno@clisp.org>
5013
5014         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
5015         to the AUTOMAKE_OPTIONS.
5016         Reported by Jim Meyering.
5017
5018 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
5019
5020         Work around bug in Solaris 10 /proc file system:
5021         /proc/self/fd/NNN/.. isn't the parent directory of
5022         the directory whose file descriptor is NNN.  This needs to
5023         be worked around at run time, not compile time, since a
5024         program might be built on Solaris 8, where things work, and
5025         run on Solaris 10.
5026         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
5027         to use the following interface instead:
5028         (OPENAT_BUFFER_SIZE): New macro.
5029         (openat_proc_name): New function.
5030         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
5031         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
5032         Likewise.
5033         * lib/openat-proc.c: New file.
5034         * modules/openat (Files): Add lib/openat-proc.c.
5035         (Depends-on): Add same-inode, stdbool.
5036         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
5037
5038 2006-09-29  Bruno Haible  <bruno@clisp.org>
5039
5040         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
5041         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
5042         argument. Set stdout_closed before testing for ferror, not after.
5043         (fwriteerror, fwriteerror_no_ebadf): New functions.
5044
5045 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5046
5047         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
5048
5049 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
5050
5051         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
5052         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
5053
5054 2006-09-28  Jim Meyering  <jim@meyering.net>
5055
5056         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
5057         Include <unistd.h>.
5058
5059 2006-09-28  Bruno Haible  <bruno@clisp.org>
5060
5061         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
5062         * modules/linkedhash-list (Depends-on): Likewise.
5063         * modules/rbtreehash-list (Depends-on): Likewise.
5064
5065 2006-09-28  Bruno Haible  <bruno@clisp.org>
5066
5067         * lib/strndup.h: Simplify the redefinition of strndup.
5068         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
5069         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
5070
5071 2006-09-28  Bruno Haible  <bruno@clisp.org>
5072
5073         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
5074         * lib/gl_linkedhash_list.c: Likewise.
5075         * lib/gl_rbtreehash_list.c: Likewise.
5076
5077 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
5078
5079         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
5080         getaddrinfo.
5081
5082         * lib/__fpending.h: Don't include <stdio_ext.h> unless
5083         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
5084         it causes <stdio_ext.h> to cause a compile-time error.
5085         Problem reported by Nelson H. F. Beebe.
5086         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
5087         of HAVE_DECL___PENDING.
5088
5089         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
5090         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
5091         declaration.
5092
5093 2006-09-27  Jim Meyering  <jim@meyering.net>
5094
5095         This file could end up with a definition for a function
5096         named __strndup, rather than rpl_strndup on a system with
5097         incomplete weak_alias support.
5098         * lib/strndup.c (strndup): Rename from __strndup.
5099         Remove #defines that used to map __strndup to strndup.
5100         Don't use K&R prototypes.
5101         Remove LIBC-related code, since this file is not sync'd with glibc.
5102         * lib/strndup.h: Revamp, accordingly.
5103         * m4/strndup.m4: Modernize.
5104
5105 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
5106
5107         * modules/savewd (Depends-on): Add 'raise'.
5108         * lib/savewd.c: Include <signal.h>, for 'raise'.
5109
5110 2006-09-26  Jim Meyering  <jim@meyering.net>
5111
5112         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
5113         when we detect Darwin 8.7.0's acl_get_file bug.
5114         Rearrange to perform the new (below) run-test while $LIBS
5115         contains any acl-related library.  Set USE_ACL at the end.
5116         (gl_ACL_GET_FILE): New function.
5117
5118 2006-09-26  Eric Blake  <ebb9@byu.net>
5119
5120         * lib/verror.c: Include <config.h> unconditionally.
5121
5122 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
5123
5124         * modules/clock-time (Maintainer): Add self.
5125         * modules/getlogin_r (Depends-on): Add extensions.
5126
5127 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5128
5129         * modules/clock-time: New module.
5130         * modules/nanosleep (Depends-on): Add clock-time.
5131         * modules/gethrxtime (Depends-on): Likewise.
5132         * modules/gettime (Depends-on): Likewise.
5133         * modules/settime (Depends-on): Likewise.
5134
5135         * modules/fts-lgpl: Depend on openat.
5136         * modules/mkancesdirs: Depend on savewd.
5137         * modules/mkdir-p: Likewise.
5138
5139 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5140
5141         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
5142
5143         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
5144         `gl_have_arbitrary_file_name_length_limit' to
5145         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
5146         actually works between configure runs.
5147
5148 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5149             Bruno Haible  <bruno@clisp.org>
5150
5151         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
5152
5153 2006-09-25  Jim Meyering  <jim@meyering.net>
5154
5155         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
5156         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
5157
5158 2006-09-25  Eric Blake  <ebb9@byu.net>
5159
5160         * gnulib-tool (func_import, func_create_testdir): Fix typos in
5161         exec's in 2006-09-18 patch when shuffling fds.
5162
5163 2006-09-25  Bruno Haible  <bruno@clisp.org>
5164
5165         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
5166         Reported by Jim Meyering.
5167
5168 2006-09-24  Jim Meyering  <jim@meyering.net>
5169
5170         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
5171         compare a pointer against a literal "0".  That caused failures with
5172         at least HP-UX's hpcc.
5173
5174 2006-09-22  Simon Josefsson  <jas@extundo.com>
5175
5176         * modules/gc-sha1:
5177         * modules/gc-md4:
5178         * modules/gc-hmac-sha1:
5179         * modules/gc-hmac-md5:
5180         * modules/gc-des:
5181         * modules/gc-arcfour: Distribute more files.
5182
5183 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5184
5185         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
5186         (gl_linked_iterator_from_to): Initialize struct completely.
5187         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
5188         (gl_tree_iterator_from_to): Likewise
5189         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
5190         * lib/gl_array_list.c [lint] (gl_array_iterator)
5191         (gl_array_iterator_from_to): Likewise.
5192         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
5193         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
5194         (gl_carray_iterator_from_to): Likewise.
5195
5196         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
5197         * lib/md4.c (md4_process_block): Remove unused variable.
5198         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
5199         parentheses for clarity.
5200
5201 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5202
5203         * modules/bison-i18n (Depends-on): Add gettext.
5204
5205 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5206
5207         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
5208         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
5209         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
5210         also add missing comma that caused broken test.
5211         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
5212         stdlib.h, for `abort'.
5213         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
5214         variables.
5215         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
5216         include unistd.h if present, for `rmdir'.
5217         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
5218         variables.
5219         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
5220         in the process include standard headers for prototypes.
5221         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
5222         gets declared on GNU/Linux.
5223         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
5224         unistd.h, for `rmdir'.
5225         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
5226
5227         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
5228         always true.
5229         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
5230
5231         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
5232
5233 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5234
5235         * gnulib-tool (func_version): Create output all at once.  This
5236         may help avoid triggering unnecessary SIGPIPEs, and at any
5237         rate it doesn't hurt.
5238
5239 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5240             Bruno Haible  <bruno@clisp.org>
5241
5242         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
5243         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
5244         * m4/signed.m4 (bh_C_SIGNED): Likewise.
5245
5246         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
5247         (gl_FUNC_VASPRINTF): Invoke it.
5248
5249 2006-09-22  Bruno Haible  <bruno@clisp.org>
5250
5251         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
5252         getloadavg.c as first argument.
5253
5254 2006-09-22  Bruno Haible  <bruno@clisp.org>
5255
5256         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
5257         at the beginning of the gl_INIT macro.
5258         * modules/getloadavg (configure.ac): Pass $gl_source_base to
5259         gl_GETLOADAVG.
5260
5261 2006-09-22  Bruno Haible  <bruno@clisp.org>
5262
5263         * gnulib-tool (func_create_megatestdir): Don't include the config-h
5264         module.
5265         Suggested by Ralf Wildenhues.
5266
5267 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
5268
5269         Import this patch from libc:
5270
5271         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
5272
5273         * lib/regex_internal.c (re_string_reconstruct): Handle
5274         offset < pstr->valid_raw_len && pstr->offsets_needed case.
5275         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
5276         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
5277         re_string_context_at.
5278
5279         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
5280         now requires it.
5281         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
5282         gl_REGEX now does it for us.
5283         (gl_REGEX): Add test taken from
5284         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
5285
5286         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
5287         Check that large offsets work.  Modernize Autoconf usages.
5288         Prefer "yes" to mean a good thing rather than a bad.
5289         Don't put "#define mkstemp" in config.h, as this might interfere
5290         with standard system headers that "#define mkstemp mkstemp64".
5291
5292         * modules/mkstemp (Depends-on): Add extensions, so that
5293         mkstemp is visible on some platforms.
5294         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
5295         (Include): Change to "mkstemp.h" from <stdlib.h>.
5296         (Files): Add mkstemp.h.
5297
5298         * lib/mkstemp.h: New file, since some standard headers
5299         #define mkstemp.
5300         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
5301         Include "mkstemp.h".
5302         Make the _LIBC code resemble glibc original more,
5303         e.g., use K&R style.
5304         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
5305         (mkstemp): Remove, since mkstemp.h does this for us.
5306         * lib/stdlib--.h: Include mkstemp.h.
5307
5308         Import this patch from libc:
5309
5310         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
5311
5312         * lib/tempname.c (__gen_tempname): Change attempts_min
5313         into a macro.  Use preprocessor to decide how to initialize
5314         attempts [Coverity CID 67].
5315
5316 2006-09-20  Bruno Haible  <bruno@clisp.org>
5317
5318         * lib/mkdtemp.c: Import from libc.
5319         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
5320                 * sysdeps/posix/tempname.c (__gen_tempname): Change
5321                 attempts_min into a macro.  Use preprocessor to decide how to
5322                 initialize attempts [Coverity CID 67].
5323         2001-11-27  Paul Eggert  <eggert@twinsun.com>
5324                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
5325                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
5326
5327 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5328
5329         * gnulib-tool (func_exit): New function, to allow to pass the
5330         exit status portably through the trap.  Use everywhere.
5331         (--help, --version): Signal a write error.
5332         (trap): catch SIGPIPE, for write errors.
5333         Exit at the end of the trap, with the correct exit status.
5334
5335 2006-09-19  Karl Berry  <karl@gnu.org>
5336
5337         * doc/gnulib.texi: note about the license texinfo files.
5338
5339 2006-09-19  Eric Blake  <ebb9@byu.net>
5340
5341         * gnulib-tool: Avoid space-tab.
5342
5343 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
5344
5345         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
5346         that prevented coreutils 6.1 from building.  Problem reported
5347         by Petter Reinholdtsen.
5348
5349 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
5350
5351         * gnulib-tool (avoidlist): Fix typo that broke options like
5352         --avoid=lock that are used by coreutils bootstrap.
5353
5354 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
5355
5356         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
5357         more systematically.
5358
5359 2006-09-18  Jim Meyering  <jim@meyering.net>
5360
5361         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
5362
5363 2006-09-18  Bruno Haible  <bruno@clisp.org>
5364
5365         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
5366
5367 2006-09-18  Bruno Haible  <bruno@clisp.org>
5368
5369         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
5370         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
5371         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
5372         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
5373         * m4/gettext.m4: Require autoconf >= 2.52.
5374         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
5375         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
5376         of gl_cv_header_inttypes_h.
5377
5378 2006-09-18  Bruno Haible  <bruno@clisp.org>
5379
5380         * lib/javaversion.c: Include configmake.h.
5381
5382 2006-09-18  Bruno Haible  <bruno@clisp.org>
5383
5384         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
5385         avoid that the while loops be executed in a subshell.
5386
5387 2006-09-18  Bruno Haible  <bruno@clisp.org>
5388
5389         * MODULES.html.sh (func_module): Break long lines.
5390         Suggested by Bruce Korb <bkorb@gnu.org>.
5391
5392 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5393
5394         Speed up by a factor of 1.12.
5395         * gnulib-tool (nl): New variable.
5396         (func_import): Rewrite include directive extraction to only read each
5397         directive once.
5398
5399 2006-09-17  Bruno Haible  <bruno@clisp.org>
5400
5401         * modules/javaversion (Makefile.am): Remove DEFS setting.
5402         (Depends-on): Add configmake, for PKGDATADIR definition.
5403
5404 2006-09-17  Bruno Haible  <bruno@clisp.org>
5405
5406         * gnulib-tool (func_create_testdir): Rewrite all files at once.
5407
5408 2006-09-17  Bruno Haible  <bruno@clisp.org>
5409
5410         * gnulib-tool (func_append): New function, stolen from libtool.m4.
5411         (func_modules_transitive_closure, func_modules_add_dummy,
5412         func_modules_to_filelist, func_import, func_create_testdir,
5413         func_create_megatestdir, ...): Use it wherever possible.
5414         Suggested by Ralf Wildenhues.
5415
5416 2006-09-16  Karl Berry  <karl@gnu.org>
5417
5418         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
5419         to avoid sectioning errors.
5420         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
5421         [ifinfo]: blank line after @center-ed titles.
5422         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
5423         Spell FSF address consistently with others.
5424         (These changes approved by rms.)
5425
5426 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5427
5428         Speed up by a factor of 1.61.
5429         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
5430         already checked module names again.
5431
5432 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5433
5434         Speed up by a factor of 1.13.
5435         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
5436         for new_files, and the input to func_add_or_update.
5437
5438 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5439
5440         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
5441         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
5442
5443 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
5444
5445         * modules/mkancesdirs (Depends-on): Add fcntl.
5446         * modules/savewd: New file.
5447         * MODULES.html.sh (File system functions): Add savewd.
5448
5449         * modules/configmake (Makefile.am): Add support for the
5450         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
5451
5452 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
5453
5454         * m4/savewd.m4: New file.
5455
5456 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
5457
5458         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
5459         (dirchownmod): New arg FD.  All callers changed.
5460         Use FD rather than opening the directory ourself, as opening is
5461         now the caller's responsibility.
5462         * lib/dirchownmod.h: Likewise.
5463         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
5464         hosts that require <sys/types.h> before <sys/stat.h>.  Include
5465         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
5466         (test_dir): Remove.
5467         (mkancesdirs): Return length of prefix of FILE that has already
5468         been made, or -2 if there is a child doing the work.  Redo
5469         algorithm so that it is O(N) rather than O(N**2).  Optimize away
5470         ".", and treat ".." specially since it might stray back into
5471         already-created areas.  Use a subprocess if necessary.  New arg
5472         WD; all users changed.  MAKE_DIR function should now return 1
5473         if it creates a directory that is not readable.  Return -2 if
5474         a child process is spun off.
5475         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
5476         Adjust signature to match code.
5477         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
5478         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
5479         all users changed.
5480         * lib/savewd.c, lib/savewd.h: New files.
5481
5482 2006-09-15  Jim Meyering  <jim@meyering.net>
5483
5484         * modules/rename-dest-slash: New module.
5485         * MODULES.html.sh (posix_compat): Add it here.
5486
5487         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
5488
5489 2006-09-15  Jim Meyering  <jim@meyering.net>
5490
5491         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
5492         file.
5493
5494         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
5495
5496 2006-09-15  Jim Meyering  <jim@meyering.net>
5497
5498         * lib/rename-dest-slash.c (has_trailing_slash): Use
5499         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
5500         (rpl_rename_dest_slash): Perform the cheaper trailing slash
5501         test before testing whether SRC is a directory.
5502         Suggestions from Bruno Haible.
5503
5504         Avoid a warning about an unused variable.
5505         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
5506         into the #ifdef block where it's used.
5507
5508         * lib/rename-dest-slash.c: New file.
5509
5510 2006-09-14  Bruno Haible  <bruno@clisp.org>
5511
5512         * lib/allocsa.c: Include <config.h> unconditionally.
5513         * lib/asnprintf.c: Likewise.
5514         * lib/asprintf.c: Likewise.
5515         * lib/c-strcasecmp.c: Likewise.
5516         * lib/c-strcasestr.c: Likewise.
5517         * lib/c-strncasecmp.c: Likewise.
5518         * lib/c-strstr.c: Likewise.
5519         * lib/classpath.c: Likewise.
5520         * lib/clean-temp.c: Likewise.
5521         * lib/concatpath.c: Likewise.
5522         * lib/copy-file.c: Likewise.
5523         * lib/csharpcomp.c: Likewise.
5524         * lib/csharpexec.c: Likewise.
5525         * lib/execute.c: Likewise.
5526         * lib/fatal-signal.c: Likewise.
5527         * lib/findprog.c: Likewise.
5528         * lib/fwriteerror.c: Likewise.
5529         * lib/gl_array_list.c: Likewise.
5530         * lib/gl_array_oset.c: Likewise.
5531         * lib/gl_avltree_list.c: Likewise.
5532         * lib/gl_avltree_oset.c: Likewise.
5533         * lib/gl_avltreehash_list.c: Likewise.
5534         * lib/gl_carray_list.c: Likewise.
5535         * lib/gl_linked_list.c: Likewise.
5536         * lib/gl_linkedhash_list.c: Likewise.
5537         * lib/gl_list.c: Likewise.
5538         * lib/gl_oset.c: Likewise.
5539         * lib/gl_rbtree_list.c: Likewise.
5540         * lib/gl_rbtree_oset.c: Likewise.
5541         * lib/gl_rbtreehash_list.c: Likewise.
5542         * lib/imaxabs.c: Likewise.
5543         * lib/imaxdiv.c: Likewise.
5544         * lib/javacomp.c: Likewise.
5545         * lib/javaexec.c: Likewise.
5546         * lib/javaversion.c: Likewise.
5547         * lib/linebreak.c: Likewise.
5548         * lib/localcharset.c: Likewise.
5549         * lib/lock.c: Likewise.
5550         * lib/mbchar.c: Likewise.
5551         * lib/mbswidth.c: Likewise.
5552         * lib/mkdtemp.c: Likewise.
5553         * lib/pipe.c: Likewise.
5554         * lib/printf-args.c: Likewise.
5555         * lib/printf-parse.c: Likewise.
5556         * lib/progname.c: Likewise.
5557         * lib/progreloc.c: Likewise.
5558         * lib/readlink.c: Likewise.
5559         * lib/sh-quote.c: Likewise.
5560         * lib/stpcpy.c: Likewise.
5561         * lib/stpncpy.c: Likewise.
5562         * lib/strcasecmp.c: Likewise.
5563         * lib/strcasestr.c: Likewise.
5564         * lib/strcspn.c: Likewise.
5565         * lib/striconv.c: Likewise.
5566         * lib/strncasecmp.c: Likewise.
5567         * lib/strnlen1.c: Likewise.
5568         * lib/strstr.c: Likewise.
5569         * lib/strtok_r.c: Likewise.
5570         * lib/tls.c: Likewise.
5571         * lib/tmpdir.c: Likewise.
5572         * lib/unicodeio.c: Likewise.
5573         * lib/unsetenv.c: Likewise.
5574         * lib/vasnprintf.c: Likewise.
5575         * lib/vasprintf.c: Likewise.
5576         * lib/wait-process.c: Likewise.
5577         * lib/xallocsa.c: Likewise.
5578         * lib/xsetenv.c: Likewise.
5579         * lib/xstriconv.c: Likewise.
5580
5581 2006-09-13  Simon Josefsson  <jas@extundo.com>
5582
5583         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
5584         that internally, suggested by Ralf Wildenhues
5585         <Ralf.Wildenhues@gmx.de>.
5586
5587 2006-09-13  Simon Josefsson  <jas@extundo.com>
5588
5589         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
5590         @LIBOBJS@.
5591         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5592
5593 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
5594
5595         * lib/_fpending.c: Include <config.h> unconditionally, since we no
5596         longer worry about uses that don't define HAVE_CONFIG_H.
5597         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
5598         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
5599         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
5600         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
5601         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
5602         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
5603         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
5604         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
5605         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
5606         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
5607         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
5608         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
5609         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
5610         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
5611         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
5612         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
5613         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
5614         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
5615         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
5616         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
5617         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
5618         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
5619         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
5620         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
5621         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
5622         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
5623         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
5624         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
5625         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
5626         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
5627         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
5628         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
5629         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
5630         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
5631         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
5632         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
5633         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
5634         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
5635         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
5636         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
5637         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
5638         Likewise.
5639
5640 2006-09-13  Eric Blake  <ebb9@byu.net>
5641
5642         * lib/getopt.c: Fix typo in last commit.
5643
5644 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
5645
5646         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
5647         dgettext.
5648
5649 2006-09-12  Jim Meyering  <jim@meyering.net>
5650
5651         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
5652         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
5653         Reported by Nelson H. F. Beebe.
5654
5655 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
5656
5657         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
5658         program_invocation_name and program_invocation_short_name are
5659         initialized.
5660         * lib/argp-namefrob.h: Move declarations of program_invocation_name
5661         and program_invocation_short_name to argp.h, so they are visible
5662         to user programs.
5663         * lib/argp.h: Likewise
5664
5665 2006-09-10  Bruno Haible  <bruno@clisp.org>
5666
5667         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
5668         m4/inttypes_h.m4, m4/uintmax_t.m4.
5669
5670 2006-09-10  Bruno Haible  <bruno@clisp.org>
5671
5672         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
5673         gl_AC_TYPE_UINTMAX_T.
5674
5675 2006-09-10  Bruno Haible  <bruno@clisp.org>
5676
5677         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
5678
5679 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
5680
5681         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
5682         convention.  Text proposed by Bruno Haible.
5683         (struct argp_option): Document the use of N_() wrappers.
5684
5685         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
5686         '\v', and translate the two parts separately, instead of feeding
5687         the whole string to gettext.  This allows to exclude
5688         '\v' from the strings visible to the translator by writing doc
5689         strings as N_("..") "\v" N_("..").
5690
5691 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
5692
5693         * config/srclist.txt: Undo latest change; the bug was fixed.
5694
5695 2006-09-09  Bruno Haible  <bruno@clisp.org>
5696
5697         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
5698         assignments if building a library without libtool.
5699         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
5700         in func_emit_lib_Makefile_am.
5701         (func_import): When building a static library libfoo.a, arrange to
5702         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
5703         (func_create_testdir): Likewise.
5704         * modules/gc (configure.ac, Makefile.am): If building statically,
5705         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
5706         * modules/iconvme (configure.ac, Makefile.am): Likewise.
5707         * modules/striconv (configure.ac, Makefile.am): Likewise.
5708         Based on a suggestion by Ralf Wildenhues.
5709
5710 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5711
5712         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
5713         Check for unistd.h too, since Autoconf doesn't assume POSIX.
5714         Also:
5715
5716         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5717         Add year_2050_test to catch glibc bug 2821
5718         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
5719
5720         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5721         Prefer #ifdef to #if.
5722
5723         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
5724         Return from 'main' instead of calling 'exit'.
5725
5726 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5727
5728         * lib/mktime.c (guess_time_tm): Fix bug where mktime
5729         returned the maximum time_t value rather than (time_t) -1.
5730         Problem originally reported by William Bardwell
5731         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
5732
5733         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
5734         Moved to here ...
5735         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
5736         ... from here.
5737
5738 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5739
5740         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
5741         2821 is fixed.
5742
5743 2006-09-08  Jim Meyering  <jim@meyering.net>
5744
5745         Don't make generated files read-only.  That would bother too many
5746         people.  However, do retain the ability to work when targets are
5747         read-only: remove the destination and temporary files before writing
5748         them (when generated via sed or echo), or by using the -f option for
5749         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
5750         * modules/alloca-opt, modules/argz, modules/arpa_inet:
5751         * modules/byteswap, modules/configmake, modules/fcntl:
5752         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
5753         * modules/localcharset, modules/netinet_in, modules/poll:
5754         * modules/stdbool, modules/stdint, modules/sys_select:
5755         * modules/sys_socket, modules/sys_stat, modules/sysexits:
5756
5757 2006-09-08  Jim Meyering  <jim@meyering.net>
5758
5759         Avoid new build failure on FreeBSD 6.0.
5760         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
5761         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
5762         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
5763
5764 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5765
5766         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
5767
5768 2006-09-07  Jim Meyering  <jim@meyering.net>
5769
5770         Fix global typo in last change: use chmod u-w, not chmod u-x.
5771         Spotted by Paul Eggert and Bruce Korb.
5772         * modules/alloca-opt, modules/argz, modules/arpa_inet:
5773         * modules/byteswap, modules/configmake, modules/fcntl:
5774         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
5775         * modules/localcharset, modules/netinet_in, modules/poll:
5776         * modules/stdbool, modules/stdint, modules/sys_select:
5777         * modules/sys_socket, modules/sys_stat, modules/sysexits:
5778
5779 2006-09-06  Jim Meyering  <jim@meyering.net>
5780
5781         Make generated files be read-only.
5782         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
5783         Ensure that each generated file is now read-only.
5784         * modules/argz: Likewise.
5785         * modules/arpa_inet: Likewise.
5786         * modules/byteswap: Likewise.
5787         * modules/configmake: Likewise.
5788         * modules/fcntl: Likewise.
5789         * modules/fnmatch: Likewise.
5790         * modules/getopt: Likewise.
5791         * modules/glob: Likewise.
5792         * modules/inttypes: Likewise.
5793         * modules/netinet_in: Likewise.
5794         * modules/poll: Likewise.
5795         * modules/stdbool: Likewise.
5796         * modules/stdint: Likewise.
5797         * modules/sys_select: Likewise.
5798         * modules/sys_socket: Likewise.
5799         * modules/sys_stat: Likewise.
5800         * modules/sysexits: Likewise.
5801         * modules/localcharset: Same as above, but continue using temporary
5802         file named "t-$@" (why different?) rather than the "$@-t" used
5803         everywhere else.
5804
5805         * modules/sysexits (Makefile.am): Replace literal occurrences
5806         of "sysexit.h" more readable, and more consistent, "$@".
5807
5808 2006-09-06  Bruno Haible  <bruno@clisp.org>
5809
5810         * modules/striconv: New file.
5811         * modules/xstriconv: New file.
5812         * MODULES.html.sh (Internationalization functions): Add striconv,
5813         xstriconv.
5814
5815 2006-09-06  Bruno Haible  <bruno@clisp.org>
5816
5817         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
5818         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
5819         not using libtool correctly.
5820
5821 2006-09-06  Bruno Haible  <bruno@clisp.org>
5822
5823         * lib/striconv.h: New file.
5824         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
5825         iconvstring.c.
5826         * lib/xstriconv.h: New file.
5827         * lib/xstriconv.c: New file.
5828
5829 2006-09-06  Bruno Haible  <bruno@clisp.org>
5830
5831         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
5832         lib_..._LDFLAGS.
5833
5834 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5835
5836         * lib/argz_.h: Sync from Libtool.
5837
5838         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
5839                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5840
5841         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
5842
5843 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
5844
5845         * modules/trim: New file.
5846
5847 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
5848
5849         * lib/trim.h: New file.
5850         * lib/trim.c: New file.
5851
5852 2006-09-05  Bruno Haible  <bruno@clisp.org>
5853
5854         * MODULES.html.sh (String handling): Add trim.
5855
5856 2006-09-04  Karl Berry  <karl@gnu.org>
5857
5858         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
5859         until next release.
5860
5861 2006-09-03  Bruno Haible  <bruno@clisp.org>
5862
5863         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
5864         correctly.
5865
5866 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5867
5868         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
5869         not gl_GETLOADAVG.  Omit unneeded semicolons.
5870         Problems reported by Ralf Wildenhues in
5871         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
5872         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
5873         at the end, which is the usual gnulib style.
5874
5875         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
5876         of doing all the work ourselves.
5877         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
5878         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
5879
5880 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5881
5882         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
5883         Problem reported by Ralf Wildenhues in
5884         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
5885
5886         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
5887         HAVE_STRUCT_STATFS_F_FSTYPENAME.
5888
5889 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5890
5891         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
5892         yesterday's patch by changing test -n to test -z.
5893
5894 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5895
5896         * modules/getloadavg (Files): Add m4/getloadavg.m4.
5897         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
5898         the former is now obsolescent.
5899
5900         * modules/chdir-long (Depends-on): Add fcntl.
5901
5902 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5903
5904         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
5905         obsolescent, and programs should use gnulib instead.
5906         * m4/getloadavg.m4: New file, with contents taken from Autoconf
5907         but with prefixes changed.
5908
5909 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5910
5911         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
5912         or stdbool.h, because they might not exist while configuring.
5913
5914         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
5915         Don't include unistd.h or limits.h; not needed, since chdir-long.h
5916         does that for us.
5917         (O_DIRECTORY): Remove.
5918
5919 2006-08-31  Eric Blake  <ebb9@byu.net>
5920
5921         * gnulib-tool: Don't let emacs change spaces to TAB.
5922
5923 2006-08-31  Bruno Haible  <bruno@clisp.org>
5924
5925         * gnulib-tool: When calling func_import more than once, do it in a
5926         subshell.
5927         Reported by Eric Blake <ebb9@byu.net>.
5928
5929 2006-08-31  Bruno Haible  <bruno@clisp.org>
5930
5931         * gnulib-tool (nl): Remove variable.
5932         (sed_transform_lib_file): Use more robust test for config-h module.
5933         (func_import): Fix typo in 2006-08-25 patch.
5934
5935 2006-08-31  Bruno Haible  <bruno@clisp.org>
5936
5937         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
5938         specified, augment Makefile.am variables instead of assigning them.
5939
5940 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5941
5942         Work around a bug in both the Linux and SunOS 64-bit kernels:
5943         nanosleep mishandles sleeps for longer than 2**31 seconds.
5944         Problem reported by Frank v Waveren in
5945         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
5946         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
5947         Check for nanosleep bug.
5948         (LIB_NANOSLEEP): Append clock_gettime library if needed.
5949
5950 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5951
5952         Work around a bug in both the Linux and SunOS 64-bit kernels:
5953         nanosleep mishandles sleeps for longer than 2**31 seconds.
5954         Problem reported by Frank v Waveren in
5955         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
5956         * lib/nanosleep.c (BILLION): New constant.
5957         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
5958         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
5959         implementation.
5960
5961 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5962
5963         * modules/nanosleep (Depends-on): Add gettime.
5964
5965 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5966         and Simon Josefsson  <jas@extundo.com>
5967         and Oskar Liljeblad  <oskar@osk.mine.nu>
5968
5969         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
5970         * gnulib-tool (func_import): New license type 'unmodifiable license
5971         text'.
5972         * modules/fdl: Use it.  Longer description.
5973         * module/gpl, module/lgpl: New files.
5974
5975 2006-08-30  Jim Meyering  <jim@meyering.net>
5976
5977         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
5978         shadowing the parameter.
5979
5980 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5981
5982         Sync from Libtool:
5983
5984         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5985
5986         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
5987         sharing with gnulib.  Report by Eric Blake.
5988
5989 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5990
5991         * modules/isapipe: New file.
5992         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
5993
5994 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5995
5996         * modules/configmake (Makefile.am): Add a comment, and omit
5997         the CONFIGMAKE_ prefix from generated macro names.  Suggested
5998         by Bruno Haible.
5999
6000 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
6001
6002         * m4/isapipe.m4: New file.
6003
6004 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
6005
6006         * lib/isapipe.c, lib/isapipe.h: New files.
6007
6008 2006-08-29  Jim Meyering  <jim@meyering.net>
6009
6010         * modules/configmake (Makefile.am): Make configmake.h depend on
6011         Makefile.  Otherwise, a stale configmake.h could hang around.
6012
6013 2006-08-29  Eric Blake  <ebb9@byu.net>
6014
6015         * lib/error.c (error_at_line, print_errno_message): Match libc, after
6016         resolution of upstream bug 3044.
6017
6018 2006-08-29  Bruno Haible  <bruno@clisp.org>
6019
6020         * modules/localcharset (Depends-on): Add configmake.
6021         (Makefile.am): Remove setting of LIBDIR through DEFS.
6022
6023 2006-08-29  Bruno Haible  <bruno@clisp.org>
6024
6025         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
6026         defined.
6027
6028 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6029
6030         * modules/fcntl: New file.
6031         * modules/chdir-safer (Depends-on): Add fcntl.
6032         * modules/fts: Likewise.
6033         * modules/mkdir-p: Likewise.
6034
6035         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
6036         This undoes the most recent change, since we're now addressing the
6037         problem in a different way.
6038
6039         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
6040         into output, since the output might be called Makefile.am even
6041         if $makefile_name is something different.
6042         (func_import): Use $makefile_am rather than
6043         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
6044         empty.
6045
6046         * modules/inttypes (Files): Add m4/inttypes-h.m4.
6047
6048 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6049
6050         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
6051         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
6052         recent change to stdint.m4, since we're now addressing the problem in a
6053         different way.
6054
6055 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6056
6057         * m4/fcntl_h.m4: New file.
6058
6059 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6060
6061         * lib/fcntl_.h: New file.
6062         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
6063         the fcntl module.
6064         * lib/dirchownmod.c: Likewise.
6065         * lib/fts.c: Likewise.
6066
6067         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
6068         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
6069         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
6070         just before including <inttypes.h>, to avoid circular inclusion.
6071
6072 2006-08-28  Jim Meyering  <jim@meyering.net>
6073
6074         * doc/visibility.texi: Actually read and correct the grammar of the
6075         sentence affected by yesterday's change.
6076
6077 2006-08-28  Eric Blake  <ebb9@byu.net>
6078
6079         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
6080         needs wrapper.
6081
6082 2006-08-28  Eric Blake  <ebb9@byu.net>
6083
6084         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
6085
6086 2006-08-28  Eric Blake  <ebb9@byu.net>
6087
6088         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
6089
6090 2006-08-28  Bruno Haible  <bruno@clisp.org>
6091
6092         * modules/c-strstr: New file, from GNU gettext.
6093         * MODULES.html.sh (String handling): Add c-strstr.
6094
6095 2006-08-28  Bruno Haible  <bruno@clisp.org>
6096
6097         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
6098         macros.
6099         Reported by Eric Blake.
6100
6101 2006-08-28  Bruno Haible  <bruno@clisp.org>
6102
6103         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
6104         (VASNPRINTF): Return a string of length > INT_MAX without failing.
6105         * lib/vasprintf.c: Include errno.h, limits.h.
6106         (EOVERFLOW): New fallback definition.
6107         (vasprintf): Test here whether the string length is > INT_MAX.
6108         * lib/vsnprintf.c: Include errno.h, limits.h.
6109         (EOVERFLOW): New fallback definition.
6110         (vsnprintf): Fix bug when generated string was too long for the buffer.
6111         Test here whether the string length is > INT_MAX.
6112
6113 2006-08-28  Bruno Haible  <bruno@clisp.org>
6114
6115         * lib/inttypes_.h (SCNX*): Remove definitions.
6116         Reported by Eric Blake.
6117
6118 2006-08-28  Bruno Haible  <bruno@clisp.org>
6119
6120         * lib/c-strstr.h: New file, from GNU gettext.
6121         * lib/c-strstr.c: New file, from GNU gettext.
6122
6123 2006-08-28  Bruno Haible  <bruno@clisp.org>
6124
6125         * gnulib-tool: Reorder some statements.
6126
6127 2006-08-28  Bruno Haible  <bruno@clisp.org>
6128
6129         * gnulib-tool: New option --makefile-name.
6130         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
6131         $makefile_name.
6132         (func_import): Write $makefile_name to the cache file, and read it from
6133         there unless explicitly specified. Use $makefile_name as file name
6134         instead of Makefile.am. Adjust the recommendations accordingly.
6135
6136 2006-08-28  Bruno Haible  <bruno@clisp.org>
6137
6138         * gnulib-tool (func_verify_module): Check against misapplying patch.
6139
6140 2006-08-28  Bruno Haible  <bruno@clisp.org>
6141
6142         * gnulib-tool (func_relativize, func_relconcat): New functions.
6143         Give an error if --local-dir is given with --update.
6144         Remove trailing slashes from $local_gnulib_dir.
6145         (func_import): Store the relativized $local_gnulib_dir in
6146         gnulib-cache.m4, and read it from there if not specified explicitly.
6147
6148 2006-08-28  Bruno Haible  <bruno@clisp.org>
6149
6150         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
6151         is the current directory. Respect also $local_gnulib_dir.
6152
6153 2006-08-28  Bruno Haible  <bruno@clisp.org>
6154             Simon Josefsson  <jas@extundo.com>
6155
6156         BeOS portability.
6157         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
6158
6159 2006-08-27  Jim Meyering  <jim@meyering.net>
6160
6161         * doc/visibility.texi: Remove duplicate word: "pointer".
6162
6163 2006-08-26  Bruno Haible  <bruno@clisp.org>
6164
6165         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
6166         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
6167         (Makefile.am): Create inttypes.h from inttypes_.h.
6168         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
6169
6170         * modules/imaxabs: New file.
6171
6172         * modules/imaxdiv: New file.
6173
6174 2006-08-26  Bruno Haible  <bruno@clisp.org>
6175
6176         * m4/inttypes.m4: New file.
6177         * m4/_inttypes_h.m4: Remove file.
6178         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
6179         PRI_MACROS_BROKEN.
6180         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
6181
6182         * m4/imaxabs.m4: New file.
6183
6184         * m4/imaxdiv.m4: New file.
6185
6186 2006-08-26  Bruno Haible  <bruno@clisp.org>
6187
6188         * lib/inttypes_.h: New file.
6189         * lib/inttypes.h: Remove file.
6190         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
6191
6192         * lib/imaxabs.c: New file.
6193
6194         * lib/imaxdiv.c: New file.
6195
6196 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
6197
6198         New config-h module, so that "make" output needn't be cluttered
6199         by -DHAVE_CONFIG_H.
6200         * MODULES.html.sh (Support for building libraries and executables):
6201         Add config-h.
6202         * modules/config-h: New file.
6203         * gnulib-tool (nl, sed_transform_lib_file): New vars.
6204         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
6205         the config-h module is used.
6206
6207         New configmake module, so that "make" output needn't be cluttered
6208         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
6209         * MODULES.html.sh (Support for building libraries and executables):
6210         Add configmake.
6211         * modules/configmake: New file.
6212
6213 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
6214
6215         * m4/config-h.m4: New file.
6216
6217 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
6218
6219         * config/srclist.txt: Add elisp-comp.
6220
6221 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
6222
6223         * MODULES.html.sh (Support for building libraries and executables):
6224         Add elisp-comp.
6225         * build-aux/elisp-comp: New file.
6226         * modules/elisp-comp: New file.
6227
6228 2006-08-24  Bruno Haible  <bruno@clisp.org>
6229
6230         * gnulib-tool (func_create_testdir): Use non-default values of
6231         sourcebase and m4base.
6232
6233 2006-08-24  Bruno Haible  <bruno@clisp.org>
6234
6235         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
6236         HTML structure.
6237
6238 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
6239
6240         * modules/openat (Depends-on): Add lchown.
6241
6242 2006-08-23  Bruno Haible  <bruno@clisp.org>
6243
6244         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
6245         of gl_LOCK_EARLY instead of gl_LOCK.
6246
6247 2006-08-23  Bruno Haible  <bruno@clisp.org>
6248
6249         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
6250         on OSF/1 to no.
6251         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
6252
6253 2006-08-23  Bruno Haible  <bruno@clisp.org>
6254
6255         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
6256         as unusable.
6257
6258         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
6259         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
6260         (gl_LOCK): New macro.
6261
6262 2006-08-22  Simon Josefsson  <jas@extundo.com>
6263
6264         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
6265         to md5 module.
6266
6267 2006-08-22  Simon Josefsson  <jas@extundo.com>
6268
6269         * MODULES.html.sh: Add "Support for maintaining and release
6270         projects".
6271
6272         * build-aux/gnupload: New file, from coreutils.
6273
6274 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6275
6276         Avoid the need for AC_LIBSOURCES in m4 macros.
6277         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
6278         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
6279         * modules/check-version (EXTRA_DIST): Add check-version.h.
6280         * modules/crc (EXTRA_DIST): Add crc.h.
6281         * modules/des (EXTRA_DIST): Add des.h.
6282         * modules/gc (EXTRA_DIST): Add gc.h.
6283         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
6284         * modules/getline (EXTRA_DIST): Add getline.h.
6285         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
6286         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
6287         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
6288         * modules/md2 (EXTRA_DIST): Add md2.h.
6289         * modules/md4 (EXTRA_DIST): Add md4.h.
6290         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
6291         * modules/read-file (EXTRA_DIST): Add read-file.h.
6292         * modules/readline (EXTRA_DIST): Add readline.h.
6293         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
6294         rijndael-api-fst.h.
6295
6296 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6297
6298         * m4/rijndael.m4 (gl_ARCFOUR):
6299         * m4/arctwo.m4 (gl_ARCTWO):
6300         * m4/check-version.m4 (gl_CHECK_VERSION):
6301         * m4/crc.m4 (gl_CRC):
6302         * m4/des.m4 (gl_DES):
6303         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
6304         * m4/gc.m4 (gl_GC):
6305         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
6306         * m4/getline.m4 (gl_FUNC_GETLINE):
6307         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
6308         * m4/hmac-md5.m4 (gl_HMAC_MD5):
6309         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
6310         * m4/md2.m4 (gl_MD2):
6311         * m4/md4.m4 (gl_MD4):
6312         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
6313         * m4/read-file.m4 (gl_FUNC_READ_FILE):
6314         * m4/readline.m4 (gl_FUNC_READLINE):
6315         * m4/rijndael.m4 (gl_RIJNDAEL):
6316         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
6317         to get the necessary .h files and whatnot.
6318
6319 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6320
6321         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
6322         gnulib rather than the other way around.
6323         * config/srclistvars.sh (COREUTILS): Remove.
6324
6325 2006-08-22  Jim Meyering  <jim@meyering.net>
6326
6327         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
6328
6329         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
6330
6331 2006-08-22  Eric Blake  <ebb9@byu.net>
6332
6333         * modules/regexprops-generic: New file.
6334         * MODULES.html.sh (Support for building documentation): List it.
6335
6336 2006-08-22  Eric Blake  <ebb9@byu.net>
6337
6338         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
6339         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
6340         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
6341         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
6342
6343 2006-08-22  Bruno Haible  <bruno@clisp.org>
6344
6345         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
6346         and lib_LTLIBRARIES like the other lib_* variables.
6347
6348 2006-08-22  Bruno Haible  <bruno@clisp.org>
6349
6350         * build-aux/x-to-1.in: New file, from GNU gettext.
6351
6352 2006-08-22  Bruno Haible  <bruno@clisp.org>
6353
6354         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
6355         <utmpx.h> exists.
6356
6357 2006-08-22  Bruno Haible  <bruno@clisp.org>
6358
6359         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
6360         <utmpx.h> exists.
6361
6362 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6363
6364         BeOS portability.
6365         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
6366         exist.
6367         Problem reported by Bruno Haible.
6368
6369 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6370
6371         Avoid the need for AC_LIBSOURCES in m4 macros.
6372         * modules/acl (EXTRA_DIST): Add acl.h.
6373         * modules/argmatch (Files): Add m4/argmatch.m4.
6374         (configure.ac): Add gl_ARGMATCH.
6375         (EXTRA_DIST): Renamed from lib_SOURCES, for
6376         consistency with the other modules.  Remove argmatch.c.
6377         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
6378         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
6379         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
6380         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
6381         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
6382         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
6383         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
6384         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
6385         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
6386         * modules/closeout (EXTRA_DIST): Add closeout.h.
6387         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
6388         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
6389         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
6390         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
6391         dirname.h; remove basename.c and stripslash.c.
6392         * modules/exclude (EXTRA_DIST): Add exclude.h.
6393         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
6394         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
6395         * modules/file-type (EXTRA_DIST): Add file-type.h.
6396         * modules/filemode (EXTRA_DIST): Add filemode.h.
6397         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
6398         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
6399         * modules/fpending (EXTRA_DIST): Add __fpending.h.
6400         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
6401         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
6402         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
6403         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
6404         * modules/getdate (EXTRA_DIST): Add getdate.c.
6405         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
6406         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
6407         * modules/getpass (EXTRA_DIST): Add getpass.h.
6408         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
6409         * modules/group-member (EXTRA_DIST): Add group-member.h.
6410         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
6411         * modules/hash (EXTRA_DIST): Add hash.h.
6412         * modules/human (EXTRA_DIST): Add human.h.
6413         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
6414         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
6415         * modules/lchown (EXTRA_DIST): Add lchown.h.
6416         * modules/long-options (EXTRA_DIST): Add long-options.h.
6417         * modules/lstat (EXTRA_DIST): Add lstat.h.
6418         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
6419         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
6420         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
6421         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
6422         * modules/memxor (EXTRA_DIST): Add memxor.h.
6423         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
6424         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
6425         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
6426         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
6427         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
6428         * modules/physmem (EXTRA_DIST): Add physmem.h.
6429         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
6430         * modules/posixver (EXTRA_DIST): Add posixver.h.
6431         * modules/quote (EXTRA_DIST): Add quote.h.
6432         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
6433         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
6434         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
6435         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
6436         regex_internal.h regexec.c.
6437         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
6438         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
6439         * modules/same (EXTRA_DIST): Add same.h.
6440         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
6441         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
6442         * modules/savedir (EXTRA_DIST): Add savedir.h.
6443         * modules/sha1 (EXTRA_DIST): Add sha1.h.
6444         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
6445         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
6446         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
6447         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
6448         * modules/strdup (EXTRA_DIST): Add strdup.h.
6449         * modules/strftime (EXTRA_DIST): Add strftime.h.
6450         * modules/strndup (EXTRA_DIST): Add strndup.h.
6451         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
6452         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
6453         * modules/time_r (EXTRA_DIST): Add time_r.h.
6454         * modules/timespec (EXTRA_DIST): Add timespec.h.
6455         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
6456         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
6457         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
6458         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
6459         * modules/userspec (EXTRA_DIST): Add userspec.h.
6460         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
6461         * modules/utimens (EXTRA_DIST): Add utimens.h.
6462         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
6463         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
6464         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
6465         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
6466         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
6467         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
6468         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
6469         * modules/yesno (EXTRA_DIST): Add yesno.h.
6470
6471 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6472
6473         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
6474
6475         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
6476         * m4/dev-ino.m4, same-inode.m4: Remove.
6477
6478         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
6479         * m4/acl.m4 (AC_FUNC_ACL):
6480         * m4/backupfile.m4 (gl_BACKUPFILE):
6481         * m4/c-strtod.m4 (gl_C99_STRTOLD):
6482         * m4/canon-host.m4 (gl_CANON_HOST):
6483         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
6484         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
6485         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
6486         * m4/cloexec.m4 (gl_CLOEXEC):
6487         * m4/close-stream.m4 (gl_CLOSE_STREAM):
6488         * m4/closeout.m4 (gl_CLOSEOUT):
6489         * m4/dirfd.m4 (gl_FUNC_DIRFD):
6490         * m4/dirname.m4 (gl_DIRNAME):
6491         * m4/exclude.m4 (gl_EXCLUDE):
6492         * m4/exitfail.m4 (gl_EXITFAIL):
6493         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
6494         * m4/file-type.m4 (gl_FILE_TYPE):
6495         * m4/filemode.m4 (gl_FILEMODE):
6496         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
6497         * m4/fpending.m4 (gl_FUNC_FPENDING):
6498         * m4/fprintftime.m4 (gl_FPRINTFTIME):
6499         * m4/fts.m4 (gl_FUNC_FTS):
6500         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
6501         * m4/getdate.m4 (gl_GETDATE):
6502         * m4/gethrxtime.m4 (gl_GETHRXTIME):
6503         * m4/getpagesize.m4 (gl_GETPAGESIZE):
6504         * m4/getpass.m4 (gl_FUNC_GETPASS):
6505         * m4/gettime.m4 (gl_GETTIME):
6506         * m4/getugroups.m4 (gl_GETUGROUPS):
6507         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
6508         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
6509         * m4/hard-locale.m4 (gl_HARD_LOCALE):
6510         * m4/hash.m4 (gl_HASH):
6511         * m4/idcache.m4 (gl_IDCACHE):
6512         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
6513         * m4/lchown.m4 (gl_FUNC_LCHOWN):
6514         * m4/long-options.m4 (gl_LONG_OPTIONS):
6515         * m4/lstat.m4 (gl_FUNC_LSTAT):
6516         * m4/md5.m4 (gl_MD5):
6517         * m4/memcasecmp.m4 (gl_MEMCASECMP):
6518         * m4/memcoll.m4 (gl_MEMCOLL):
6519         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
6520         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
6521         * m4/memxor.m4 (gl_MEMXOR):
6522         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
6523         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
6524         * m4/modechange.m4 (gl_MODECHANGE):
6525         * m4/mountlist.m4 (gl_MOUNTLIST):
6526         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
6527         * m4/openat.m4 (gl_FUNC_OPENAT):
6528         * m4/pathmax.m4 (gl_PATHMAX):
6529         * m4/physmem.m4 (gl_PHYSMEM):
6530         * m4/posixtm.m4 (gl_POSIXTM):
6531         * m4/posixver.m4 (gl_POSIXVER):
6532         * m4/quote.m4 (gl_QUOTE):
6533         * m4/quotearg.m4 (gl_QUOTEARG):
6534         * m4/readtokens.m4 (gl_READTOKENS):
6535         * m4/readutmp.m4 (gl_READUTMP):
6536         * m4/regex.m4 (gl_REGEX):
6537         * m4/safe-read.m4 (gl_SAFE_READ):
6538         * m4/safe-write.m4 (gl_SAFE_WRITE):
6539         * m4/same.m4 (gl_SAME):
6540         * m4/save-cwd.m4 (gl_SAVE_CWD):
6541         * m4/savedir.m4 (gl_SAVEDIR):
6542         * m4/settime.m4 (gl_SETTIME):
6543         * m4/sha1.m4 (gl_SHA1):
6544         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
6545         * m4/stat-macros.m4 (gl_STAT_MACROS):
6546         * m4/stat-time.m4 (gl_STAT_TIME):
6547         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
6548         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
6549         * m4/strdup.m4 (gl_FUNC_STRDUP):
6550         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
6551         * m4/strndup.m4 (gl_FUNC_STRNDUP):
6552         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
6553         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
6554         * m4/time_r.m4 (gl_TIME_R):
6555         * m4/timespec.m4 (gl_TIMESPEC):
6556         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
6557         * m4/unlinkdir.m4 (gl_UNLINKDIR):
6558         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
6559         * m4/userspec.m4 (gl_USERSPEC):
6560         * m4/utimecmp.m4 (gl_UTIMECMP):
6561         * m4/utimens.m4 (gl_UTIMENS):
6562         * m4/xalloc.m4 (gl_XALLOC):
6563         * m4/xgetcwd.m4 (gl_XGETCWD):
6564         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
6565         * m4/xreadlink.m4 (gl_XREADLINK):
6566         * m4/xstrtod.m4 (gl_XSTRTOD):
6567         * m4/yesno.m4 (gl_YESNO):
6568         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
6569         to get the necessary .h files and whatnot.
6570
6571 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
6572             Bruno Haible  <bruno@clisp.org>
6573
6574         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
6575         /bin/sh understanding of '!' conditional negation.
6576
6577 2006-08-21  Jim Meyering  <jim@meyering.net>
6578
6579         * modules/openat (Depends-on): Really alphabetize.
6580
6581         * modules/acl (Depends-on): Add error and quote.
6582
6583         * check-module (find_included_lib_files): Add at-func.c to the
6584         ok-to-include-more-than-once white list.
6585
6586         * modules/openat (Depends-on): Add lstat.  Alphabetize.
6587
6588 2006-08-21  Bruno Haible  <bruno@clisp.org>
6589
6590         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6591         Emit a pkgdata_DATA variable only if some snippets add contents to it.
6592         Reported by Martin Lambers <marlam@marlam.de>.
6593
6594 2006-08-21  Bruno Haible  <bruno@clisp.org>
6595
6596         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
6597         specify an installation location, don't emit a noinst_LIBRARIES or
6598         noinst_LTLIBRARIES assignment.
6599
6600 2006-08-21  Bruno Haible  <bruno@clisp.org>
6601
6602         BeOS portability.
6603         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
6604         BeOS has mbrtowc() but no <wctype.h>.
6605
6606 2006-08-21  Bruno Haible  <bruno@clisp.org>
6607
6608         BeOS portability.
6609         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
6610         exist.
6611
6612 2006-08-21  Bruno Haible  <bruno@clisp.org>
6613
6614         BeOS portability.
6615         * lib/mbchar.h: Include <wctype.h> only if it exists.
6616
6617 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
6618
6619         Remove files that are no longer needed by their respective modules.
6620         * m4/obstack.m4: Remove.
6621         * m4/strerror_r.m4: Remove.
6622         * m4/uint32_t.m4: Remove.
6623         * m4/uintptr_t.m4: Remove.
6624         * m4/ullong_max.m4: Remove.
6625         * m4/xstrtoimax.m4: Remove.
6626         * m4/xstrtoumax.m4: Remove.
6627
6628         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
6629         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
6630         dependencies now capture this.
6631
6632         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
6633         Do not use AC_LIBSOURCES, since gnulib modules now do this.
6634         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
6635         * m4/human.m4 (gl_HUMAN): Likewise.
6636         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
6637         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
6638
6639         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
6640
6641         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
6642         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
6643         stdint.
6644         * m4/human.m4 (gl_HUMAN): Likewise.
6645         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
6646         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
6647         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
6648         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
6649         * m4/xstrtol (gl_XSTRTOL): Likewise.
6650
6651         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
6652         AC_TYPE_LONG_LONG_INT.
6653         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
6654         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
6655         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
6656         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
6657
6658         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
6659         on stdbool.
6660
6661         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
6662         (gl_PREREQ_XSTRTOUL): Remove.
6663
6664         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
6665
6666         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
6667         mode.
6668
6669 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
6670
6671         Add and change modules to make it easier for coreutils to use
6672         gnulib-tool.
6673         * modules/backupfile (Files): Remove m4/d-ino.m4.
6674         (Depends-on): Add d-ino.
6675         * modules/cycle-check (Depends-on): Add stdint.
6676         (lib_SOURCES): Add cycle-check.h.
6677         * modules/d-ino: New module.
6678         * modules/d-type: New module.
6679         * modules/error (Files): Remove m4/strerror_r.m4.
6680         * modules/filemode (Files): Add m4/st_dm_mode.m4.
6681         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
6682         m4/inttypes_h.m4, m4/uintmax_t.m4.
6683         (Depends-on): Add stdint.
6684         (lib_SOURCES): Add fsusage.h.
6685         * modules/getcwd (Files): Remove d-ino.m4.
6686         (Depends-on): Add d-ino.
6687         * modules/getndelim2 (Depends-on): Add stdint.
6688         * modules/glob (Files): Remove m4/d-type.m4.
6689         (Depends-on): Add d-type.
6690         * modules/host-os: New module.
6691         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
6692         m4/inttypes_h.m4, m4/uintmax_t.m4.
6693         * Depends-on: Add stdint.
6694         (lib_SOURCES): Add human.h.
6695         * modules/inttostr (Files): Remove m4/intmax_t.m4,
6696         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
6697         m4/uintmax_t.m4, m4/ulonglong.m4.
6698         (Depends-on): Add stdint.
6699         (EXTRA_DIST): Add inttostr.h.
6700         * modules/lchmod: New module.
6701         * modules/link-follow: New module.
6702         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
6703         (Depends-on): Add lchmod.
6704         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
6705         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
6706         (Depends-on): Add stdint.
6707         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
6708         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
6709         (Depends-on): Add stdint.
6710         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
6711         * modules/perl: New module.
6712         * modules/regex (Depends-on): Add stdint.
6713         * modules/rmdir-errno: New module.
6714         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
6715         m4/intmax_t.m4.
6716         (Depends-on): Add stdint.
6717         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
6718         m4/uintmax_t.m4.
6719         (Depends-on): Add stdint.
6720         * modules/unlink-busy: New module.
6721         * modules/utimecmp (Depends-on): Add stdint.
6722         * modules/uptime: New module.
6723         * modules/winsz-ioctl: New module.
6724         * modules/winsz-termios: New module.
6725         * modules/xnanosleep (Depends-on): Add nanosleep.
6726         * modules/ullong_max: Remove.
6727         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
6728         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
6729         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
6730         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
6731         (Depends-on): Add inttypes.
6732         (lib_SOURCES): Add xstrtol.h.
6733         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
6734         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
6735         * MODULES.html.sh: Move 'assert' into the assert section.
6736         Move 'dummy' into the linking section.
6737         Remove ullong_max.
6738         Add section for compatibility checks for POSIX:2001 functions,
6739         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
6740         winsz-ioctl, and winsz-termios into it.
6741         Add lchmod.
6742         Add top-level Misc section and put host-os, perl, and uptime
6743         into it.
6744
6745 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
6746
6747         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
6748         now assume the stdint module.  Do not include inttypes.h.
6749         * lib/fsusage.h: Likewise.
6750         * lib/getndelim2.c: Likewise.
6751         * lib/human.h: Likewise.
6752         * lib/inttostr.h: Likewise.
6753         * lib/obstack.c: Likewise.
6754         * lib/regex_internal.h: Likewise.
6755         * lib/tempname.c: Likewise.
6756         * lib/utimecmp.c: Likewise.
6757         * lib/xstrtol.h: Likewise.
6758
6759         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
6760
6761         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
6762         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
6763         * lib/xtime.h: Likewise.
6764
6765 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
6766
6767         * modules/openat (Files): Add lib/fchmodat.c.
6768         Fixes problem reported by Jay Youngman.
6769
6770 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
6771
6772         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
6773         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
6774
6775 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
6776             Bruno Haible  <bruno@clisp.org>
6777
6778         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
6779         and is a script that invokes bison. Tighten the code. Add comments.
6780
6781 2006-08-18  Jim Meyering  <jim@meyering.net>
6782
6783         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
6784         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
6785         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
6786         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
6787
6788 2006-08-18  Bruno Haible  <bruno@clisp.org>
6789
6790         * modules/bison-i18n: New file.
6791         * MODULES.html.sh (Internationalization functions): Add it.
6792
6793 2006-08-18  Bruno Haible  <bruno@clisp.org>
6794
6795         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
6796         sys/statvfs.h. When getmntinfo was found, check its declaration and
6797         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
6798
6799 2006-08-18  Bruno Haible  <bruno@clisp.org>
6800
6801         * m4/bison-i18n.m4: New file, from bison.
6802
6803 2006-08-18  Bruno Haible  <bruno@clisp.org>
6804
6805         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
6806         (ME_DUMMY): Treat "kernfs" as a dummy.
6807         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
6808
6809 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
6810
6811         Update from coreutils.
6812
6813         2006-08-15  Jim Meyering  <jim@meyering.net>
6814
6815         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
6816
6817         2006-01-17  Jim Meyering  <jim@meyering.net>
6818
6819         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
6820
6821         2006-01-11  Jim Meyering  <jim@meyering.net>
6822
6823         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
6824         Check for the lchmod function.
6825
6826 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
6827
6828         Update from coreutils.
6829
6830         * lib/__fpending.h: Add copyright notice.
6831         * lib/fprintftime.h: Likewise.
6832         * lib/savedir.c: Use (C) in copyright notice.
6833         * lib/savedir.h: Likewise.
6834
6835         2006-08-15  Jim Meyering  <jim@meyering.net>
6836
6837         * lib/at-func.c: New file, with the logic of all emulated at-functions.
6838         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
6839         in support of the EXPECTED_ERRNO macro.
6840         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
6841         definitions.  Instead, define the appropriate symbols and include
6842         "at-func.c".
6843         * lib/mkdirat.c (mkdirat): Likewise.
6844         * lib/fchmodat.c (fchmodat): Likewise.
6845         (ENOSYS): Remove definition.
6846         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
6847         it.  Don't include "unistd--.h" -- it wasn't ever used.
6848
6849         2006-01-17  Jim Meyering  <jim@meyering.net>
6850
6851         Rewrite fts.c not to change the current working directory,
6852         by using openat, fstatat, fdopendir, etc..
6853
6854         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
6855         (HAVE_OPENAT_SUPPORT): Define.
6856         [_LIBC] (fchdir): Don't undef or define; no longer used.
6857         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
6858         Now, this `function' always succeeds, and consumes its file descriptor
6859         parameter -- so callers must not close such FDs.  Update callers.
6860         (diropen_fd, opendirat, cwd_advance_fd): New functions.
6861         (diropen): Add parameter, SP.  Adjust all callers.
6862         Implement using diropen_fd, rather than open.
6863         (fts_open): Initialize new member, fts_cwd_fd.
6864         Remove fts_rft-setting code.
6865         (fts_close): Close fts_cwd_fd, if necessary.
6866         (__opendir2): Define in terms of opendir or opendirat,
6867         depending on whether the FST_NOCHDIR flag is set.
6868         (fts_build): Since fts_safe_changedir consumes its FD, and since
6869         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
6870         and close the dup'd file descriptor upon failure.
6871         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
6872         (fts_safe_changedir): Tweak semantics to reflect that this function
6873         now calls cwd_advance_fd and hence consumes its FD argument.
6874         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
6875         [struct FTS] (fts_rft): Remove now-unused member.
6876         [struct FTS] (fts_cycle.state): Improve comment.
6877
6878         * lib/openat.c (openat_needs_fchdir): New function.
6879         * lib/openat.h (openat_needs_fchdir): Declare it.
6880
6881 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
6882
6883         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
6884         Problem and fix reported by Pádraig Brady in
6885         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
6886
6887 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6888
6889         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
6890
6891 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6892
6893         * lib/memcoll.c (memcoll): Optimize for the common case where the
6894         arguments are bytewise equal.
6895
6896 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6897
6898         * doc/regexprops-generic.texi: Add a copyright notice.
6899
6900 2006-08-15  Bruno Haible  <bruno@clisp.org>
6901
6902         * modules/tmpdir (License): Change to LGPL.
6903
6904 2006-08-15  Bruno Haible  <bruno@clisp.org>
6905
6906         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
6907         module.
6908
6909 2006-08-14  Simon Josefsson  <jas@extundo.com>
6910
6911         * config/srclist.txt: Add gnupload.
6912
6913 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6914
6915         Change copyright notice from LGPL 2 to GPL 2, since that's the
6916         standard form used in the gnulib repository.
6917         * tests/test-lock.c: Likewise.
6918         * tests/test-stdint.c: Likewise.
6919         * tests/test-tls.c: Likewise.
6920
6921         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
6922         prelude-manager.  User shorter URLs for GNU projects, without '?'.
6923         Add copyright notice.
6924
6925         * check-module: Add copyright notice.  Output a copyright
6926         notice if "--version" is specified.
6927         * modules/COPYING: New file.
6928         * tests/test-getaddrinfo.c: Add copyright notice.
6929         * tests/test-verify.c: Likewise.
6930
6931 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6932
6933         Change copyright notice from LGPL 2 to GPL 2, since that's the
6934         standard form used in the gnulib repository.
6935         * lib/lock.c: LGPL -> GPL.
6936         * lib/lock.h: Likewise.
6937         * lib/strnlen1.c: Likewise.
6938         * lib/strnlen1.h: Likewise.
6939         * lib/tls.c: Likewise.
6940         * lib/tls.h: Likewise.
6941         * lib/tmpdir.c: Likewise.
6942
6943         * lib/TODO: Remove; this belongs only in coreutils.
6944
6945 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6946
6947         Add copyright notices to long-enough files that lack them, since
6948         otherwise the files aren't clearly free.  Use the same notice that
6949         getdate.texi already uses.
6950         * doc/alloca-opt.texi: Add copyright notice.
6951         * doc/alloca.texi: Likewise.
6952         * doc/ctime.texi: Likewise.
6953         * doc/functions.texi: Likewise.
6954         * doc/gcd.texi: Likewise.
6955         * doc/gnulib-tool.texi: Likewise.
6956         * doc/inet_ntoa.texi: Likewise.
6957         * doc/visibility.texi: Likewise.
6958
6959         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
6960         * doc/quote.texi: Add copyright notice.
6961
6962         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
6963         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
6964         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
6965         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
6966         is now obsolete, and give a pointer to the Sun list.
6967         Add copyright notice.
6968
6969 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6970
6971         * config/srclistvars.sh: Add copyright notice.
6972
6973 2006-08-14  Eric Blake  <ebb9@byu.net>
6974
6975         Import the following change from libc:
6976
6977         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
6978
6979         Upstream bug 2997.
6980         * lib/misc/error.c: Add space between program name and message if file
6981         name is missing.
6982
6983 2006-08-12  Karl Berry  <karl@gnu.org>
6984
6985         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
6986         remove, these originate in gnulib now.
6987
6988 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6989
6990         * doc/Makefile (standards.info standards.html standards.dvi):
6991         Also depend on make-stds.texi.
6992
6993 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
6994
6995         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
6996         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
6997
6998         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
6999         in wchar_t.  Problem reported by Eric Blake.
7000
7001         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
7002         LEN is smaller than SIZE.  Suggested by Bruno Haible.
7003         Also, help the compiler to keep LEN in a register.
7004
7005 2006-08-11  Eric Blake  <ebb9@byu.net>
7006
7007         * users.txt: Sort.  Add tar.
7008
7009 2006-08-11  Bruno Haible  <bruno@clisp.org>
7010
7011         * users.txt: New file.
7012
7013 2006-08-11  Bruno Haible  <bruno@clisp.org>
7014
7015         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
7016         before <wchar.h>. Needed for OSF/1 and BSD/OS.
7017
7018 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
7019
7020         * modules/snprintf (Depends-on): Remove minmax.
7021         (Maintainer): Add self and Bruno.
7022
7023 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
7024
7025         * lib/.cppi-disable: Add snprintf.h, socket_.h.
7026         * lib/snprintf.c: Include <errno.h> and <limits.h>.
7027         (EOVERFLOW): Define if the system does not.
7028         Do not include "minmax.h"; it wasn't used.
7029         (snprintf): Don't assume size_t promotes to an unsigned type.
7030         Fix bug when generated string was too long for the buffer: the
7031         buffer's contents are supposed to be the initial prefix of the
7032         output.  Don't assume vasnprintf returns EOVERFLOW if the size
7033         exceeds INT_MAX; do the check ourselves.
7034
7035         Import the following changes from libc:
7036
7037         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
7038
7039         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
7040         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
7041         set wc to the byte which couldn't be converted.
7042         (re_string_reconstruct): Don't clear valid_raw_len before calling
7043         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
7044         tip_context using re_string_context_at.
7045
7046         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
7047
7048         * lib/posix/regex.h: g++ still cannot handled [restrict].
7049
7050         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
7051
7052         * lib/posix/regex.h: Remove special handling for VMS.
7053
7054 2006-08-10  Jim Meyering  <jim@meyering.net>
7055
7056         * modules/same-inode: New module.
7057         * modules/dev-ino: New module.
7058         * modules/cycle-check: Depend on these modules, rather than simply
7059         including their .h files.
7060         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
7061         required via m4/cycle-check.m4.
7062         * modules/same: Depend on new same-inode module, rather than
7063         including same-inode.h.
7064         * modules/chdir-safer: New file.
7065
7066         * modules/chown (Depends-on): Add stat-macros.
7067
7068 2006-08-10  Jim Meyering  <jim@meyering.net>
7069
7070         * m4/cycle-check.m4: New file.
7071         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
7072         * m4/dev-ino.m4, m4/same-inode.m4: New files.
7073
7074 2006-08-10  Eric Blake  <ebb9@byu.net>
7075
7076         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
7077         in from original proposal.
7078
7079 2006-08-10  Eric Blake  <ebb9@byu.net>
7080         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7081
7082         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
7083         namespace.
7084
7085 2006-08-10  Bruno Haible  <bruno@clisp.org>
7086
7087         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
7088         as well.
7089
7090 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
7091
7092         Sync from coreutils.
7093
7094         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
7095
7096         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
7097         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
7098
7099 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
7100
7101         * modules/restrict: Remove; no longer needed now that we assume
7102         Autoconf 2.59 or later.
7103         * MODULES.html.sh: Remove 'restrict'.
7104         * modules/argp (Depends-on): Remove 'restrict'.
7105         * modules/base64 (Depends-on): Likewise.
7106         * modules/gc (Depends-on): Likewise.
7107         * modules/getaddrinfo (Depends-on): Likewise.
7108         * modules/glob (Depends-on): Likewise.
7109         * modules/inet_ntop (Depends-on): Likewise.
7110         * modules/inet_pton (Depends-on): Likewise.
7111         * modules/memxor (Depends-on): Likewise.
7112         * modules/regex (Depends-on): Likewise.
7113         * modules/strtok_r (Depends-on): Likewise.
7114         * modules/time_r (Depends-on): Likewise.
7115
7116 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
7117
7118         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
7119         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
7120         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
7121         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
7122         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
7123         * m4/memxor.m4 (gl_MEMXOR): Likewise.
7124         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
7125         gl_C_RESTRICT replaced by AC_C_RESTRICT.
7126
7127         Merge from coreutils.
7128         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
7129         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
7130         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
7131         * m4/time_r.m4 (gl_TIME_R): Likewise.
7132
7133 2006-08-09  Karl Berry  <karl@gnu.org>
7134
7135         * config/srclist.txt: no more gettext-tools, per Bruno.
7136
7137 2006-08-08  Eric Blake  <ebb9@byu.net>
7138
7139         * modules/verror: New module.
7140         * MODULES.html.sh: Document it.
7141
7142 2006-08-08  Eric Blake  <ebb9@byu.net>
7143
7144         * lib/verror.h, lib/verror.c: New files.
7145
7146 2006-08-08  Eric Blake  <ebb9@byu.net>
7147
7148         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
7149         verror_at_line output complies with GNU Coding Standards even when
7150         file is NULL.
7151
7152 2006-08-07  Bruno Haible  <bruno@clisp.org>
7153
7154         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
7155         versions of AIX.
7156         Reported by Ralf Wildenhues.
7157
7158 2006-08-07  Bruno Haible  <bruno@clisp.org>
7159
7160         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
7161         in an AC_DEFUN. Needed so that the autoconf snippets can use
7162         AC_REQUIRE.
7163
7164 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7165
7166         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7167         Initialize pkgdata_DATA.
7168         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
7169         overriding it.
7170
7171 2006-08-06  Eric Blake  <ebb9@byu.net>
7172
7173         * lib/error.h: Fold in some upstream changes from glibc.
7174         * lib/error.c: Likewise.
7175
7176 2006-08-04  Bruno Haible  <bruno@clisp.org>
7177
7178         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7179         Make the mostlyclean-local rule depend on mostlyclean-generic.
7180         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
7181
7182 2006-07-31  Bruno Haible  <bruno@clisp.org>
7183
7184         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
7185         <stdlib.h>, <string.h>.
7186
7187 2006-07-30  Bruno Haible  <bruno@clisp.org>
7188
7189         * modules/readlink (License): Change to LGPL.
7190
7191 2006-07-30  Bruno Haible  <bruno@clisp.org>
7192
7193         * modules/javaversion (Makefile.am): Distribute javaversion.java and
7194         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
7195         set PKGDATADIR to point to it.
7196
7197 2006-07-30  Bruno Haible  <bruno@clisp.org>
7198
7199         * modules/csharpexec (configure.ac): Comment out macro invocation.
7200         * modules/javaexec (configure.ac): Likewise.
7201         * modules/javacomp-script (configure.ac): Likewise.
7202
7203         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
7204
7205 2006-07-30  Bruno Haible  <bruno@clisp.org>
7206
7207         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
7208         linked-list.
7209
7210 2006-07-30  Bruno Haible  <bruno@clisp.org>
7211
7212         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
7213
7214 2006-07-30  Bruno Haible  <bruno@clisp.org>
7215
7216         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7217         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
7218         get removed.
7219
7220 2006-07-29  Bruno Haible  <bruno@clisp.org>
7221
7222         Make it possible for gnulib-tool to work with locally modified or
7223         augmented gnulib repositories.
7224         * gnulib-tool (func_usage): Document --local-dir option.
7225         (local_gnulib_dir): New variable.
7226         Handle --local-dir option.
7227         (func_lookup_file): New function.
7228         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
7229         (func_get_description, func_get_filelist, func_get_description,
7230         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
7231         func_get_automake_snippet, func_get_include_directive,
7232         func_get_license, func_get_maintainer): Use func_lookup_file.
7233         (func_import, func_create_testdir): Use func_lookup_file.
7234
7235 2006-07-29  Bruno Haible  <bruno@clisp.org>
7236
7237         * modules/setenv (Depends-on): Add unistd.
7238
7239 2006-07-29  Bruno Haible  <bruno@clisp.org>
7240
7241         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
7242
7243 2006-07-29  Bruno Haible  <bruno@clisp.org>
7244
7245         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
7246
7247 2006-07-29  Bruno Haible  <bruno@clisp.org>
7248
7249         * gnulib-tool (import, update): If there is no Makefile.am, look at
7250         aclocal.m4, instead of bailing out.
7251
7252 2006-07-29  Bruno Haible  <bruno@clisp.org>
7253
7254         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
7255         Categorize the options by when they are useful.
7256
7257 2006-07-29  Bruno Haible  <bruno@clisp.org>
7258
7259         * gnulib-tool (func_usage): Document option --no-libtool.
7260         Handle option --no-libtool.
7261         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
7262         for changed semantics of $libtool variable.
7263         (func_import): Likewise. If libtool is not used, show this through
7264         an option --no-libtool.
7265         (func_create_testdir): Update.
7266
7267 2006-07-29  Bruno Haible  <bruno@clisp.org>
7268
7269         * gnulib-tool (func_import): Extend error message about missing
7270         --doc-base.
7271
7272 2006-07-29  Bruno Haible  <bruno@clisp.org>
7273
7274         * gnulib-tool (func_import): Don't create the $docbase directory if
7275         there is no file to store there.
7276
7277 2006-07-29  Bruno Haible  <bruno@clisp.org>
7278
7279         * gnulib-tool (autoconf_minversion): If a --dir option is given and
7280         relevant, look for configure.ac there, not in the current directory.
7281         Also use a simple search for AC_PREREQ, not "autoconf --trace".
7282
7283 2006-07-29  Bruno Haible  <bruno@clisp.org>
7284
7285         * gnulib-tool (SORT): New variable.
7286         (func_usage): Undocument --assume-autoconf option.
7287         Remove --assume-autoconf option handling.
7288         (autoconf_minversion): Determine from the contents of configure.ac.
7289         (func_import): Remove autoconf_minversion handling.
7290         Suggested by Eric Blake.
7291
7292 2006-07-29  Bruno Haible  <bruno@clisp.org>
7293
7294         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
7295
7296 2006-07-29  Bruno Haible  <bruno@clisp.org>
7297
7298         * config/srclist.txt (*setenv.[ch]): Remove rules.
7299
7300 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7301
7302         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
7303
7304 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7305
7306         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
7307         arpa/inet.h.
7308
7309 2006-07-28  Simon Josefsson  <jas@extundo.com>
7310
7311         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
7312         * modules/inet_pton (Depends-on): Likewise.
7313
7314 2006-07-28  Simon Josefsson  <jas@extundo.com>
7315
7316         * m4/netinet_in_h.m4: New file.
7317
7318 2006-07-28  Simon Josefsson  <jas@extundo.com>
7319
7320         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
7321         #include's.
7322
7323 2006-07-28  Simon Josefsson  <jas@extundo.com>
7324
7325         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
7326         #include's.
7327
7328 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
7329
7330         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
7331         setgid on directories only if they set these bits.
7332         * lib/modechange.h: Remove obsolete comment about masks.
7333
7334 2006-07-28  Eric Blake  <ebb9@byu.net>
7335
7336         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
7337         macro expansion.
7338
7339 2006-07-28  Bruno Haible  <bruno@clisp.org>
7340
7341         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
7342
7343 2006-07-28  Bruno Haible  <bruno@clisp.org>
7344
7345         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
7346
7347 2006-07-28  Bruno Haible  <bruno@clisp.org>
7348
7349         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
7350         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
7351         Define fallbacks.
7352         Avoids link error on FreeBSD 4.x.
7353         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
7354
7355         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
7356         encoding.
7357         * lib/mbswidth.c (iswcntrl): Likewise.
7358
7359 2006-07-27  Bruno Haible  <bruno@clisp.org>
7360
7361         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
7362         test.
7363
7364 2006-07-27  Bruno Haible  <bruno@clisp.org>
7365
7366         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
7367         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
7368         defined.
7369
7370 2006-07-26  Eric Blake  <ebb9@byu.net>
7371
7372         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
7373
7374 2006-07-26  Eric Blake  <ebb9@byu.net>
7375
7376         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
7377         like mingw that lack mkstemp.
7378         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
7379         avoid compilation warning on mingw.
7380
7381 2006-07-26  Bruno Haible  <bruno@clisp.org>
7382
7383         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
7384         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
7385         INT_FAST*_MIN, INTPTR_MIN.
7386
7387 2006-07-25  Bruno Haible  <bruno@clisp.org>
7388
7389         * modules/version-etc (Depends-on): Add stdarg.
7390
7391 2006-07-25  Bruno Haible  <bruno@clisp.org>
7392
7393         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
7394         complex commands.
7395
7396 2006-07-25  Bruno Haible  <bruno@clisp.org>
7397
7398         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
7399         defined in <stdarg.h> or config.h.
7400
7401 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
7402
7403         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
7404         (gl_STDIO_SAFER): Remove.
7405
7406 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
7407
7408         * MODULES.html.sh (File stream based Input/Output):
7409         Add fopen-safer, tmpfile-safer; remove stdio-safer.
7410         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
7411         * modules/fopen-safer, modules/tmpfile-safer: New files.
7412         * modules/stdio-safer: Remove.
7413
7414 2006-07-24  Bruno Haible  <bruno@clisp.org>
7415
7416         * modules/tmpdir: New file.
7417         * MODULES.html.sh (File system functions): Add it.
7418
7419 2006-07-24  Bruno Haible  <bruno@clisp.org>
7420
7421         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
7422         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
7423
7424 2006-07-24  Bruno Haible  <bruno@clisp.org>
7425
7426         * modules/clean-temp: New file.
7427
7428 2006-07-24  Bruno Haible  <bruno@clisp.org>
7429
7430         * m4/tmpdir.m4: New file, from GNU gettext.
7431
7432 2006-07-24  Bruno Haible  <bruno@clisp.org>
7433
7434         * lib/tmpdir.h: New file, from GNU gettext.
7435         * lib/tmpdir.c: New file, from GNU gettext.
7436
7437 2006-07-24  Bruno Haible  <bruno@clisp.org>
7438
7439         * lib/clean-temp.h: New file, from GNU gettext.
7440         * lib/clean-temp.c: New file, from GNU gettext.
7441
7442 2006-07-23  Eric Blake  <ebb9@byu.net>
7443
7444         * modules/stdio-safer (Files): Add tmpfile-safer.c.
7445         (Depends-on): Add binary-io.
7446
7447 2006-07-23  Eric Blake  <ebb9@byu.net>
7448
7449         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
7450
7451 2006-07-23  Eric Blake  <ebb9@byu.net>
7452
7453         * lib/tmpfile-safer.c: New file.
7454         * lib/stdio-safer.h (fopen_safer): Add prototype.
7455         * lib/stdio--.h (tmpfile): Make safer.
7456
7457 2006-07-23  Bruno Haible  <bruno@clisp.org>
7458
7459         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
7460         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
7461         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
7462         gl_linked_remove_at): Use it.
7463
7464 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7465         and Simon Josefsson <jas@extundo.com>
7466
7467         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
7468
7469         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
7470
7471 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
7472
7473         * modules/close-stream: New file.
7474         * modules/closeout (Description): Make it clear that it exits
7475         with a diagnostic on error.
7476         (Depends-on): Add close-stream.  Remove fpending, stdbool.
7477         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
7478
7479 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
7480
7481         * m4/close-stream.m4: New file.
7482
7483 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
7484
7485         * lib/close-stream.c, lib/close-stream.h: New files.
7486
7487 2006-07-22  Bruno Haible  <bruno@clisp.org>
7488
7489         Merge from GNU gettext 0.15.
7490
7491         2006-05-01  Bruno Haible  <bruno@clisp.org>
7492
7493                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
7494
7495         2006-07-22  Bruno Haible  <bruno@clisp.org>
7496
7497                 * modules/javaversion: New file.
7498                 * MODULES.html.sh (Java): Add javaversion.
7499
7500         2006-03-12  Bruno Haible  <bruno@clisp.org>
7501
7502                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
7503
7504         2005-12-04  Bruno Haible  <bruno@clisp.org>
7505
7506                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
7507                 (untested).
7508
7509         2006-06-21  Bruno Haible  <bruno@clisp.org>
7510
7511                 Avoid warnings from recent versions of mcs.
7512                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
7513                 -o, -L, -r any more. Use options documented since mcs-1.0
7514                 instead. Similarly for -g.
7515
7516         2005-12-04  Bruno Haible  <bruno@clisp.org>
7517
7518                 * build-aux/csharpcomp.sh.in: Suffix for resources is
7519                 .resources, not .resource.
7520
7521         2005-07-09  Bruno Haible  <bruno@clisp.org>
7522
7523                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
7524                 add a .dll suffix.
7525                 Reported by Mark Junker <mjscod@gmx.de>.
7526
7527         2006-07-22  Bruno Haible  <bruno@clisp.org>
7528
7529                 * modules/gettext: Upgrade to gettext-0.15.
7530                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
7531                 m4/visibility.m4.
7532                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
7533
7534 2006-07-22  Bruno Haible  <bruno@clisp.org>
7535
7536         Merge from GNU gettext 0.15.
7537
7538         2006-03-25  Bruno Haible  <bruno@clisp.org>
7539
7540                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
7541
7542         2006-07-21  Bruno Haible  <bruno@clisp.org>
7543
7544                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
7545                 "1.1".
7546
7547         2006-05-09  Bruno Haible  <bruno@clisp.org>
7548
7549                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
7550                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
7551                 for the conftestver execution.
7552
7553         2006-05-01  Bruno Haible  <bruno@clisp.org>
7554
7555                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
7556                 optional target-version argument. Verify that the compiler
7557                 groks source of the specified source-version, or add -source
7558                 option as necessary. Verify that the compiler produces
7559                 bytecode in the specified target-version, or add -target and
7560                 -source options as necessary. Make the result of the test
7561                 available as variable CONF_JAVAC. Also log error output in
7562                 config.log.
7563
7564         2006-03-11  Bruno Haible  <bruno@clisp.org>
7565
7566                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
7567
7568         2006-05-09  Bruno Haible  <bruno@clisp.org>
7569
7570                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
7571                 CLASSPATH_SEPARATOR to a semicolon.
7572
7573         2006-03-12  Bruno Haible  <bruno@clisp.org>
7574
7575                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
7576                 available as variable CONF_JAVA, for subsequent autoconf
7577                 tests. Also log error output in config.log.
7578
7579         2006-07-19  Bruno Haible  <bruno@clisp.org>
7580
7581                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
7582                 that getline works on glibc2 systems. Needed to avoid trouble
7583                 in relocatable.c.
7584                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
7585
7586         2005-12-04  Bruno Haible  <bruno@clisp.org>
7587
7588                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
7589                 launcher (untested).
7590
7591         2005-12-04  Bruno Haible  <bruno@clisp.org>
7592
7593                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
7594
7595         2006-07-22  Bruno Haible  <bruno@clisp.org>
7596
7597                 * gettext.m4: Update from GNU gettext-0.15.
7598                 * nls.m4: Likewise.
7599                 * po.m4: Likewise.
7600                 * inttypes-pri.m4: Likewise.
7601                 * inttypes-h.m4: Renamed from inttypes.m4.
7602                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
7603
7604 2006-07-22  Bruno Haible  <bruno@clisp.org>
7605
7606         Merge from GNU gettext 0.15.
7607
7608         2005-07-05  Bruno Haible  <bruno@clisp.org>
7609
7610                 * printf-args.c (printf_fetchargs): Work around broken
7611                 definition of wint_t on mingw.
7612
7613         2005-02-12  Bruno Haible  <bruno@clisp.org>
7614
7615                 * xallocsa.h: Add extern "C" for C++.
7616
7617         2006-05-17  Bruno Haible  <bruno@clisp.org>
7618
7619                 Cygwin portability.
7620                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
7621
7622         2006-04-30  Bruno Haible  <bruno@clisp.org>
7623
7624                 * progreloc.c: Include <mach-o/dyld.h> if available.
7625                 (find_executable): Use _NSGetExecutablePath when possible.
7626
7627         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
7628
7629                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
7630                 function.
7631
7632         2005-12-29  Bruno Haible  <bruno@clisp.org>
7633
7634                 * progreloc.c (set_program_name_and_installdir): Fix
7635                 compilation error.
7636
7637         2005-12-04  Bruno Haible  <bruno@clisp.org>
7638
7639                 Cygwin portability.
7640                 * progreloc.c: Include <windows.h> also on Cygwin.
7641                 (find_executable): Add support for Cygwin.
7642                 (set_program_name_and_installdir): Handle also platforms with
7643                 nonempty EXEEXT.
7644
7645         2006-07-11  Bruno Haible  <bruno@clisp.org>
7646
7647                 * javacomp.c: Fix a comment.
7648                 Reported by Jim Meyering.
7649
7650         2006-04-30  Bruno Haible  <bruno@clisp.org>
7651
7652                 * javacomp.h (compile_java_class): Add source_version,
7653                 target_version arguments.
7654                 * javacomp.c: Rewritten to choose only a compiler that
7655                 respects the specified source_version and target_version.
7656
7657         2006-06-27  Bruno Haible  <bruno@clisp.org>
7658
7659                 Assume correct S_ISDIR macro.
7660                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
7661
7662         2006-07-22  Bruno Haible  <bruno@clisp.org>
7663
7664                 * javaversion.h: New file, from GNU gettext.
7665                 * javaversion.c: New file, from GNU gettext.
7666                 * javaversion.java: New file, from GNU gettext.
7667                 * javaversion.class: New file, from GNU gettext.
7668
7669         2006-05-17  Bruno Haible  <bruno@clisp.org>
7670
7671                 Cygwin portability.
7672                 * javaexec.c (execute_java_class): Test for jview program
7673                 also on Cygwin.
7674
7675         2006-04-09  Bruno Haible  <bruno@clisp.org>
7676
7677                 * fatal-signal.c: Don't include string.h.
7678                 (at_fatal_signal): Use a copying loop instead of memcpy.
7679
7680         2005-12-04  Bruno Haible  <bruno@clisp.org>
7681
7682                 * csharpexec.c: Add support for 'clix' launcher (untested).
7683                 (execute_csharp_using_sscli): New function.
7684                 (execute_csharp_program): Call it.
7685
7686         2006-06-21  Bruno Haible  <bruno@clisp.org>
7687
7688                 Avoid warnings from recent versions of mcs.
7689                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
7690                 -o, -L, -r any more. Use options documented since mcs-1.0
7691                 instead. Similarly for -g.
7692
7693         2005-07-09  Bruno Haible  <bruno@clisp.org>
7694
7695                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
7696                 add a .dll suffix.
7697                 Reported by Mark Junker <mjscod@gmx.de>.
7698
7699         2006-06-17  Bruno Haible  <bruno@clisp.org>
7700
7701                 * config.charset: Update for NetBSD 3.0.
7702
7703         2006-05-17  Bruno Haible  <bruno@clisp.org>
7704
7705                 Cygwin portability.
7706                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
7707
7708         2006-05-16  Bruno Haible  <bruno@clisp.org>
7709
7710                 * localcharset.c [CYGWIN]: Include <windows.h>.
7711                 (get_charset_aliases): For Cygwin, return the same CPxxx
7712                 aliases list as under WIN32.
7713                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
7714                 the environment variables. Fall back to GetACP().
7715
7716         2006-04-05  Bruno Haible  <bruno@clisp.org>
7717
7718                 * config.charset: Update Juan Manuel Guerrero's address.
7719
7720         2005-02-12  Bruno Haible  <bruno@clisp.org>
7721
7722                 * allocsa.h: Add extern "C" for C++.
7723
7724         2005-02-10  Bruno Haible  <bruno@clisp.org>
7725
7726                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
7727                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
7728
7729         2006-07-22  Bruno Haible  <bruno@clisp.org>
7730
7731                 * gettext.h: Update to GNU gettext-0.15.
7732
7733 2006-07-22  Bruno Haible  <bruno@clisp.org>
7734
7735         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
7736         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
7737         lib-prefix.m4, longdouble.m4, ssize_t.m4.
7738
7739 2006-07-21  Eric Blake  <ebb9@byu.net>
7740
7741         * modules/stdlib-safer: New file.
7742         * MODULES.html.sh (File stream based Input/Output): Add
7743         stdlib-safer.
7744
7745 2006-07-21  Eric Blake  <ebb9@byu.net>
7746
7747         * lib/stdlib-safer.h: New file from coreutils, required by
7748         stdlib--.h.
7749
7750 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
7751
7752         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
7753
7754 2006-07-20  Bruno Haible  <bruno@clisp.org>
7755
7756         * gnulib-tool: Recognize new option --assume-autoconf.
7757         (autoconf_minversion): New variable.
7758         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
7759
7760 2006-07-20  Bruno Haible  <bruno@clisp.org>
7761
7762         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
7763
7764 2006-07-19  Derek R. Price  <derek@ximbiot.com>
7765
7766         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
7767         Reindent and repaginate.
7768
7769 2006-07-19  Derek Price  <derek@ximbiot.com>
7770
7771         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
7772         Correct grammar.
7773
7774 2006-07-17  Bruno Haible  <bruno@clisp.org>
7775
7776         * modules/list: New file.
7777         * modules/array-list: New file.
7778         * modules/carray-list, modules/carray-list-tests: New files.
7779         * modules/linked-list, modules/linked-list-tests: New files.
7780         * modules/avltree-list, modules/avltree-list-tests: New files.
7781         * modules/rbtree-list, modules/rbtree-list-tests: New files.
7782         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
7783         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
7784         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
7785         * modules/oset: New file.
7786         * modules/array-oset: New file.
7787         * modules/avltree-oset, modules/avltree-oset-tests: New files.
7788         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
7789         * tests/test-carray_list.c: New file.
7790         * tests/test-linked_list.c: New file.
7791         * tests/test-avltree_list.c: New file.
7792         * tests/test-rbtree_list.c: New file.
7793         * tests/test-linkedhash_list.c: New file.
7794         * tests/test-avltreehash_list.c: New file.
7795         * tests/test-rbtreehash_list.c: New file.
7796         * tests/test-avltree_oset.c: New file.
7797         * tests/test-rbtree_oset.c: New file.
7798         * MODULES.html.sh (Container data structures): New section.
7799
7800 2006-07-17  Bruno Haible  <bruno@clisp.org>
7801
7802         * m4/gl_list.m4: New file.
7803
7804 2006-07-17  Bruno Haible  <bruno@clisp.org>
7805
7806         * lib/gl_list.h: New file.
7807         * lib/gl_list.c: New file.
7808         * lib/gl_array_list.h: New file.
7809         * lib/gl_array_list.c: New file.
7810         * lib/gl_carray_list.h: New file.
7811         * lib/gl_carray_list.c: New file.
7812         * lib/gl_linked_list.h: New file.
7813         * lib/gl_linked_list.c: New file.
7814         * lib/gl_anylinked_list1.h: New file.
7815         * lib/gl_anylinked_list2.h: New file.
7816         * lib/gl_avltree_list.h: New file.
7817         * lib/gl_avltree_list.c: New file.
7818         * lib/gl_anyavltree_list1.h: New file.
7819         * lib/gl_anyavltree_list2.h: New file.
7820         * lib/gl_rbtree_list.h: New file.
7821         * lib/gl_rbtree_list.c: New file.
7822         * lib/gl_anyrbtree_list1.h: New file.
7823         * lib/gl_anyrbtree_list2.h: New file.
7824         * lib/gl_anytree_list1.h: New file.
7825         * lib/gl_anytree_list2.h: New file.
7826         * lib/gl_linkedhash_list.h: New file.
7827         * lib/gl_linkedhash_list.c: New file.
7828         * lib/gl_anyhash_list1.h: New file.
7829         * lib/gl_anyhash_list2.h: New file.
7830         * lib/gl_avltreehash_list.h: New file.
7831         * lib/gl_avltreehash_list.c: New file.
7832         * lib/gl_rbtreehash_list.h: New file.
7833         * lib/gl_rbtreehash_list.c: New file.
7834         * lib/gl_anytreehash_list1.h: New file.
7835         * lib/gl_anytreehash_list2.h: New file.
7836
7837         * lib/gl_oset.h: New file.
7838         * lib/gl_oset.c: New file.
7839         * lib/gl_array_oset.h: New file.
7840         * lib/gl_array_oset.c: New file.
7841         * lib/gl_avltree_oset.h: New file.
7842         * lib/gl_avltree_oset.c: New file.
7843         * lib/gl_rbtree_oset.h: New file.
7844         * lib/gl_rbtree_oset.c: New file.
7845         * lib/gl_anytree_oset.h: New file.
7846
7847 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7848
7849         * m4/mkancesdirs.m4: New file.
7850         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
7851         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
7852         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
7853         it.
7854
7855 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7856
7857         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
7858         * lib/mkancesdirs.h: New files.
7859         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
7860         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
7861         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
7862         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
7863         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
7864         callers changed.  Revamp internals significantly, by not
7865         attempting to create directories that are temporarily more
7866         permissive than the final results.  Do not attempt to use
7867         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
7868         This removes some race conditions, fixes some bugs, and simplifies
7869         things.  Use new dirchownmod function to do owner and mode changes.
7870         * lib/mkdir-p.h: Likewise.
7871         * lib/modechange.c (octal_to_mode): New function.
7872         (struct mode_change): New member mentioned.
7873         (make_node_op_equals): New arg mentioned.  All callers changed.
7874         (mode_compile): Keep track of which mode bits the user has explicitly
7875         mentioned.
7876         (mode_adjust): New arg DIR, so that we implement the X op correctly.
7877         New arg PMODE_BITS, to keep track of which mode bits the user
7878         mentioned; it treats S_ISUID and S_ISGID speciall.
7879         All callers changed.
7880         * lib/modechange.h: Likewise.
7881
7882 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7883
7884         * MODULES.html.sh: Add mkancestors.
7885         * modules/mkancesdirs: New module.
7886         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
7887         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
7888         The chdir-safer and afs files are now orphans; I'll remove them
7889         unless someone speaks up.
7890         Add lib/dirchownmod.c, lib/dirchownmod.h.
7891         (Depends-on): Remove alloca, chown, save-cwd, dirname.
7892         Add lchown, mkancesdirs.
7893         (Maintainer): Add self.
7894
7895 2006-07-15  Karl Berry  <karl@gnu.org>
7896
7897         * gnulib-tool: help message wording/arrangement.
7898
7899 2006-07-14  Simon Josefsson  <jas@extundo.com>
7900
7901         * doc/gnulib.texi (Libtool and Windows): New section.
7902
7903 2006-07-12  Simon Josefsson  <jas@extundo.com>
7904
7905         * modules/gendocs (License): Fix license, approved by Karl.
7906
7907 2006-07-12  Eric Blake  <ebb9@byu.net>
7908
7909         * MODULES.html.sh: Add gendocs.
7910
7911 2006-07-11  Eric Blake  <ebb9@byu.net>
7912
7913         * modules/fdl: New module, to install doc/fdl.texi.
7914         * MODULES.html.sh: Add new section for documentation modules.
7915         * gnulib-tool: Avoid space-tab.
7916         (--doc-base): New option, to manage files from doc.
7917
7918 2006-07-11  Eric Blake  <ebb9@byu.net>
7919
7920         * m4/absolute-header.m4: Fix comments to match recent change.
7921
7922 2006-07-11  Eric Blake  <ebb9@byu.net>
7923
7924         * gnulib-tool: List --doc-base before --tests-base.
7925
7926 2006-07-11  Derek R. Price  <derek@ximbiot.com>
7927
7928         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
7929
7930 2006-07-11  Bruno Haible  <bruno@clisp.org>
7931
7932         * README: Mention where to put documentation.
7933
7934 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7935
7936         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
7937
7938 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
7939
7940         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
7941         to stdint.m4.
7942
7943 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
7944
7945         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
7946         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
7947         "no/such/file/stdint.h" when there is no such file, so that
7948         the resulting C code can be parsed by dodgy compilers.
7949         Problems reported by Bob Proulx.
7950
7951 2006-07-10  Derek R. Price  <derek@ximbiot.com>
7952
7953         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
7954         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
7955         macros into the GNU _D_EXACT_NAMLEN.
7956         * lib/savedir.c:  Likewise.
7957         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
7958
7959 2006-07-10  Derek R. Price  <derek@ximbiot.com>
7960         and Paul Eggert  <eggert@cs.ucla.edu>
7961
7962         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
7963         * m4/savedir.m4:
7964         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
7965         macros into the GNU _D_EXACT_NAMLEN.
7966
7967 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7968
7969         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
7970         around the absolute name, to work around a problem with the HP-UX
7971         11.23 native C compiler, reported by Bob Proulx.
7972
7973 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7974
7975         * doc/maintain.texi, make-stds.texi: Sync from
7976         <http://savannah.gnu.org/projects/gnustandards>.
7977
7978 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7979
7980         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
7981
7982 2006-07-09  Jim Meyering  <jim@meyering.net>
7983
7984         * m4/glob.m4: Remove a doubled word in a comment.
7985
7986 2006-07-09  Jim Meyering  <jim@meyering.net>
7987
7988         * lib/argp-pv.c: Remove a doubled word in a comment.
7989         * lib/check-version.c (check_version): Likewise.
7990         * lib/javacomp.c (compile_java_class): Likewise.
7991
7992 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
7993
7994         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
7995         for the benefit of people using Autoconf 2.60.  If you want to
7996         support older Autoconf versions you can copy m4/onceonly_2_57.m4
7997         (or m4/onceonly.m4, if pre-2.57) manually.
7998
7999 2006-07-08  Jim Meyering  <jim@meyering.net>
8000
8001         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
8002         comment.
8003         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
8004         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
8005         comment.
8006
8007 2006-07-08  Jim Meyering  <jim@meyering.net>
8008
8009         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
8010
8011 2006-07-07  Simon Josefsson  <jas@extundo.com>
8012
8013         * tests/test-crc.c: Change expected crc value, the test vector
8014         were probably computed using the old broken crc.c?
8015
8016 2006-07-06  Simon Josefsson  <jas@extundo.com>
8017
8018         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
8019         now the canonical place for the M4 file).
8020
8021         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
8022         from the sys_socket dependency now.
8023
8024         * modules/inet_pton (Files): Ditto.
8025
8026         * modules/inet_ntop (Files): Ditto.
8027
8028 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
8029
8030         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
8031         not gl_PREREQ_GETUSERSHELL.
8032
8033 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8034
8035         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
8036         with only one argument, for Autoconf 2.60.
8037         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
8038         expand to nothing, so add a shell command to avoid syntax error.
8039         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
8040
8041 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8042
8043         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
8044
8045 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
8046
8047         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
8048         no longer needed.  Check for isblank decl.
8049         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
8050         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
8051         of existence.
8052
8053 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
8054
8055         * lib/getloadavg.c: Use __VMS, not VMS.
8056         * lib/getopt.c: Likewise.
8057         * lib/getpagesize.h: Likewise.
8058         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
8059         and probably does not work.
8060
8061 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
8062
8063         * lib/.cppi-disable: Add wcwidth.
8064         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
8065         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
8066         (ISGRAPH): Remove.  All uses changed to isgraph.
8067         (FOLD) [!defined _LIBC]: Remove special case.
8068         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
8069         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
8070         HAVE_ISBLANK.
8071         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
8072         case.
8073
8074 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
8075
8076         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
8077         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
8078         brackets.  Other minor changes to suppress some compiler
8079         warnings.
8080
8081 2006-07-06  Derek R. Price  <derek@ximbiot.com>
8082         and Paul Eggert  <eggert@cs.ucla.edu>
8083
8084         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
8085         of invoking obsolescent AC_HEADER_DIRENT macro.
8086         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
8087         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
8088         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
8089         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
8090         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
8091         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
8092         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
8093         * m4/readdir.m4: Remove; no longer needed.
8094
8095 2006-07-06  Derek R. Price  <derek@ximbiot.com>
8096         and Paul Eggert  <eggert@cs.ucla.edu>
8097
8098         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
8099         Don't worry about this obsolete case any more.
8100         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
8101         directories.
8102         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
8103         worry about this obsolete case any more.
8104         * lib/fts.c: Likewise.
8105         * lib/getcwd.c: Likewise.
8106         * lib/glob.h: Likewise.
8107         * lib/savedir.c: Likewise.
8108
8109 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
8110
8111         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
8112         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
8113         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
8114         needed.
8115         All uses removed.
8116         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
8117         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
8118         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
8119         needed.
8120         * m4/getdate.m4 (gl_GETDATE): Likewise.
8121         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
8122         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
8123         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
8124         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
8125         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
8126         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
8127         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
8128         needed.
8129
8130 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
8131
8132         * lib/memcasecmp.c: Include <limits.h>.
8133         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
8134         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
8135         Don't assume isdigit succeeds only on '0' through '9'.
8136
8137 2006-07-05  Eric Blake  <ebb9@byu.net>
8138
8139         * modules/getaddrinfo (Depends-on): Add snprintf.
8140
8141 2006-07-05  Eric Blake  <ebb9@byu.net>
8142
8143         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
8144         to avoid 'header present but could not be compiled' on cygwin.
8145
8146 2006-07-05  Eric Blake  <ebb9@byu.net>
8147
8148         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
8149         missing from netdb.h.
8150         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
8151
8152 2006-07-05  Derek R. Price  <derek@ximbiot.com>
8153
8154         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
8155         no longer needed.
8156         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
8157         * m4/getdate.m4 (gl_GETDATE): Likewise.
8158         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
8159         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
8160         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
8161         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
8162         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
8163
8164 2006-07-05  Derek R. Price  <derek@ximbiot.com>
8165
8166         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
8167         All uses of is_space replaced by isspace.
8168         * lib/exit.h: Don't talk about STDC_HEADERS.
8169         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
8170         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
8171         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
8172         replaced by isprint etc.
8173         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
8174         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
8175         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
8176         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
8177         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
8178         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
8179
8180 2006-07-05  Bruno Haible  <bruno@clisp.org>
8181
8182         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
8183         the function exists, before testing against AIX.
8184         Reported by Martin Lambers <marlam@marlam.de>.
8185
8186 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
8187
8188         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
8189         From Mark D. Baushke.
8190
8191 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
8192
8193         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
8194         to the absolute name, not just one, to bypass Sun C 5.8's
8195         "warning: #include of /usr/include/... may be non-portable".
8196
8197 2006-07-04  Eric Blake  <ebb9@byu.net>
8198
8199         * modules/dirname-tests: New test module.
8200         * tests/test-dirname.c: New file, replacing dirname.c
8201         TEST_DIRNAME section that was recently deleted.
8202
8203 2006-07-04  Bruno Haible  <bruno@clisp.org>
8204
8205         Assume ANSI C header files and <ctype.h> functions.
8206         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
8207         (mbsnwidth): Use isprint, iscntrl instead.
8208
8209 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8210
8211         Merge from coreutils.
8212         * MODULES.html.sh: Add xstrtold.
8213         * modules/xstrtold: New file.
8214         * modules/cycle-check (Files): Add lib/same-inode.h.
8215         * modules/dirname (Files): Add m4/double-slash-root.m4.
8216         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
8217         * modules/mkdir-p (Files): Add lib/same-inode.h.
8218         * modules/same (Files): Add lib/same-inode.h.
8219
8220 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8221
8222         * m4/absolute-header.m4: Renamed from full-header-path.m4.
8223         This is to keep the terminology clean; POSIX talks about
8224         "absolute pathnames", not "full pathnames", but the GNU
8225         Coding Standards say to use "path" for something else;
8226         so use "absolute" to keep both sides happy.
8227         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
8228         Set gl_absolute_header, not gl_full_header_path.
8229         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
8230         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
8231         All uses changed.
8232
8233         Merge from coreutils.
8234
8235         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
8236
8237         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
8238         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
8239         want to require the building of c-strtod.o.
8240         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
8241         needs -lm directly.
8242         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
8243
8244         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
8245
8246         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
8247         --as-needed option if available.  Problem reported by Albert Chin in
8248         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
8249         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
8250         cc merely issues a bunch of annoying warnings for --as-needed
8251         (this problem was reported by Bob Proulx).  Also, try linking with
8252         -lm to detect a bug in binutils 2.16 (this problem was reported
8253         by Ralf Wildenhues).
8254
8255         2006-06-18  Jim Meyering  <jim@meyering.net>
8256
8257         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
8258         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
8259         macro.
8260         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
8261         also check for glibc-2.4's abort-inducing bug.
8262
8263         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
8264         Low-probability clean-up should be to use rmdir to get rid of
8265         the just-created directory, not unlink.
8266
8267         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
8268         configure fail, and request a bug report to inform us about it.
8269         Add a comment that, barring reports to the contrary, in 2007 we'll
8270         assume ftruncate is universally available.
8271
8272         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
8273
8274         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
8275
8276         2006-03-12  Jim Meyering  <jim@meyering.net>
8277
8278         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
8279         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
8280         * m4/same.m4 (gl_SAME): Likewise.
8281         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
8282
8283         2006-03-11  Eric Blake  <ebb9@byu.net>
8284
8285         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
8286         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
8287         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
8288         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
8289
8290 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8291
8292         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
8293         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
8294         reported by Mark D. Baushke, one in
8295         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
8296
8297         Merge from coreutils.
8298
8299         * lib/.cppi-disable: Add stdint_.h.
8300         * lib/.cvsignore: Add stdint.h.
8301
8302         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
8303
8304         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
8305         both double and long double versions.
8306         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
8307         * lib/xstrtold.c: New file.
8308         * lib/xstrtod.h (xstrtold): New decl.
8309
8310         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
8311
8312         * lib/filemode.c (setst): Remove.
8313         (strmode): Rewrite to avoid setst.  This makes the code shorter,
8314         (arguably) clearer, and the generated code is a bit smaller on my
8315         Debian GNU/Linux stable x86 host.
8316
8317         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
8318
8319         * lib/filemode.c: Include "filemode.h" first, to test the interface.
8320         Assume that filemode.h includes sys/types.h and sys/stat.h.
8321         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
8322         (ftypelet): Reorder to put common cases first, for efficiency.
8323         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
8324         to do 'M'.
8325         (strmode): Renamed from mode_string, and now stores 12 bytes instead
8326         of 10, for compatibility with FreeBSD.  All callers changed.
8327         (filemodestring): Now stores 12 bytes instead of 10, and sets file
8328         types that can't be deduced solely from st_mode.  First arg is now a
8329         const pointer.
8330         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
8331         (strmode): Renamed from mode_string.
8332         (filemodestring): New decl.
8333         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
8334         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
8335         needed.
8336         (S_ISPORT, S_ISWHT): New macros, if not already defined.
8337
8338         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
8339
8340         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
8341         fsusage.h now does that.  Include fsusage.h first, to test interface.
8342         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
8343         at most one method (the old code could have generated decls that
8344         didn't conform to C89, not that this was ever exercised).
8345         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
8346
8347         2006-03-19  Jim Meyering  <jim@meyering.net>
8348
8349         Work even in a chroot where d_ino values for entries in "/"
8350         don't match the stat.st_ino values for the same names.
8351         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
8352         number, iterate through all entries again, using lstat instead.
8353         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
8354         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
8355
8356         * lib/getcwd.c (__getcwd): Clarify a comment.
8357         Use memcpy in place of a call to strcpy.
8358
8359         2006-03-12  Jim Meyering  <jim@meyering.net>
8360
8361         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
8362         matches that of the current directory (which we're about to chdir ".."
8363         out of), then save the dev-ino of the parent, instead.
8364
8365         * lib/same-inode.h (SAME_INODE): New file/macro.
8366         * lib/chdir-safer.c (SAME_INODE): Remove definition.
8367         Include "same-inode.h", instead.
8368         * lib/same.c: Likewise.
8369         * lib/cycle-check.h: Include "same-inode.h".
8370         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
8371         * lib/cycle-check.c (SAME_INODE): Remove definition.
8372         * lib/root-dev-ino.h: Include "same-inode.h".
8373
8374         2006-03-11  Eric Blake  <ebb9@byu.net>
8375
8376         * lib/same.c (same_name): s/base_name/last_component/
8377         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
8378         * lib/filenamecat.c (file_name_concat): Likewise.
8379
8380         2006-03-11  Eric Blake  <ebb9@byu.net>,
8381                     Paul Eggert  <eggert@cs.ucla.edu>
8382
8383         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
8384         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
8385         drive prefix.
8386         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
8387         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
8388         (last_component): New method.
8389         * lib/dirname.c (dir_len): Determine when drive letters need a
8390         subsequent slash.  Preserve // when it is special.
8391         (dir_name): Don't append dot when drive letter is absolute.
8392         [TEST_DIRNAME]: Move into a full-blown gnulib test.
8393         * lib/basename.c (base_name): New semantics - malloc the result.
8394         Preserve // when it is special.  Preserve relative files that look
8395         like drive letters.
8396         (base_len): Preserve // when it is special.
8397         (last_component): New method, similar to old base_name semantics.
8398         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
8399         base_name.  Strip redundant slashes from ///.
8400
8401 2006-07-03  Jim Meyering  <jim@meyering.net>
8402
8403         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
8404         macro is used before the first cycle_check call.
8405
8406 2006-07-03  Eric Blake  <ebb9@byu.net>
8407
8408         * modules/dirname (Depends-on): Add xstrndup.
8409
8410 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
8411
8412         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
8413         test cases, so that config.log is a bit easier to follow.
8414
8415 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
8416
8417         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
8418         both are 64 bits, since this seems to be the tradition, and this
8419         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
8420         we ever run into a host that prefers long long to long in this
8421         case, we'll need another configure-time test.  Problem reported by
8422         Jim Meyering.
8423
8424 2006-07-02  Eric Blake  <ebb9@byu.net>
8425
8426         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
8427
8428 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
8429
8430         * modules/inttypes (Depends-on): No longer depends on stdint.
8431         * modules/stdint (Description): Say more about assumptions.
8432         Say that the fast types might differ.  Say macros are used.
8433         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
8434         (Makefile.am): Revise list of substituted symbols to match
8435         new stdint.m4.
8436         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
8437         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
8438         * tests/test-stdint.c (verify_same_types)
8439         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
8440         the code conforms to C99/C89.
8441         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
8442         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
8443
8444 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
8445
8446         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
8447         but fix a bug, by requiring at least 64 bits.
8448         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
8449         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
8450         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
8451         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
8452
8453         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
8454         changes.  Make 2.59 a prerequisite.  Check and substitute for
8455         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
8456         inttypes.h.  Do not use special include files; just use the
8457         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
8458         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
8459         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
8460         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
8461         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
8462         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
8463         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
8464         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
8465         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
8466         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
8467         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
8468         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
8469         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
8470         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
8471         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
8472         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
8473         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
8474         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
8475         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
8476         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
8477         WINT_MAX.  Check for C99 conformance more strictly, by detecting
8478         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
8479         not check for things that C99 does not require, e.g., int8_t.  If
8480         a test isn't needed unless <stdint.h> isn't working, and is
8481         unlikely to be needed for any other reason, then don't do it
8482         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
8483         size_t, since we assume C89 freestanding at least.  Do not check
8484         for sig_atomic_t, wchar_t, or wint_t, since the code now does
8485         the right thing even if the types are not defined.  Instead use:
8486         (gl_STDINT_TYPE_PROPERTIES): New macro.
8487         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
8488         testing whether <sys/types.h> clashes, as Autoconf does this for
8489         us now.  All uses removed.
8490         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
8491         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
8492         (gl_CHECK_TYPE_SAME):
8493         Remove; no longer needed.
8494         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
8495         exists, since we'll return 0 anyway in that case.
8496         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
8497
8498 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
8499
8500         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
8501         possible collision with system files.
8502         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
8503         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
8504         WCHAR_MIN and WCHAR_MAX in this case.
8505         (<stddef.h>): Do not include; no longer needed.
8506         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
8507         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
8508         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
8509         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
8510         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
8511         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
8512         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
8513         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
8514         !defined(__c99))]: Include in this case too, since it's harmless
8515         now.
8516         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
8517         dangerous to do so.
8518         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
8519         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
8520         (_STDINT_MIN, _STDINT_MAX): New macros.
8521         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
8522         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
8523         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
8524         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
8525         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
8526         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
8527         macros, not typedefs; this simplifies things quite a bit.
8528         Use long int for all types narrower than int64_t.
8529         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
8530         Define in terms of long long int or int64_t or long int,
8531         not int64_t or int32_t.  This saves some compile-time testing.
8532         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
8533         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
8534         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
8535         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
8536         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
8537         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
8538         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
8539         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
8540         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
8541         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
8542         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
8543         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
8544         undef any previous version and define our own version, for
8545         simplicity and consistency with the new macros for types.
8546         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
8547         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
8548         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
8549         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
8550         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
8551         @WINT_T_SUFFIX@ to keep things simple here.
8552         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
8553         Simplify by assuming typical 8/16/32/64 host, since we're
8554         already doing that elsewhere anyway.
8555         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
8556         and assume long long int is 64 bits if available.  This
8557         speeds up 'configure'.
8558
8559 2006-07-01  Eric Blake  <ebb9@byu.net>
8560
8561         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
8562         Reported by Andreas Buening.
8563
8564 2006-07-01  Eric Blake  <ebb9@byu.net>
8565
8566         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
8567
8568 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
8569
8570         * lib/getaddrinfo.c: fixed typo
8571
8572 2006-06-29  Jim Meyering  <jim@meyering.net>
8573
8574         * modules/strftime (Maintainer): Add my name, since with the
8575         FPRINTFTIME changes strftime.c has forked from glibc.
8576
8577 2006-06-29  Eric Blake  <ebb9@byu.net>
8578
8579         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
8580
8581 2006-06-29  Eric Blake  <ebb9@byu.net>
8582
8583         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
8584
8585 2006-06-29  Eric Blake  <ebb9@byu.net>
8586
8587         * lib/stat_.h: New file.
8588
8589 2006-06-29  Eric Blake  <ebb9@byu.net>
8590
8591         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
8592         unused static function.
8593
8594 2006-06-29  Eric Blake  <ebb9@byu.net>
8595
8596         * doc/functions.texi (Function Portability): Document missing lstat
8597         on mingw.
8598
8599 2006-06-29  Eric Blake  <ebb9@byu.net>
8600
8601         * MODULES.html.sh: Add sys_stat.
8602         * modules/sys_stat: New module.
8603         * modules/mkstemp (Depends-on): Add sys_stat.
8604
8605 2006-06-29  Derek R. Price  <derek@ximbiot.com>
8606
8607         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
8608
8609 2006-06-29  Derek R. Price  <derek@ximbiot.com>
8610
8611         * m4/c-bs-a.m4: Removed.
8612
8613 2006-06-29  Derek R. Price  <derek@ximbiot.com>
8614
8615         * lib/strftime.c: Assume strftime() exists.
8616
8617 2006-06-29  Derek Price  <derek@ximbiot.com>
8618
8619         * modules/c-bs-a: Removed - \a is C89.
8620         * MODULES.html.sh: Remove c-bs-a.
8621
8622 2006-06-29  Bruno Haible  <bruno@clisp.org>
8623
8624         * modules/wcwidth (License): Change to LGPL.
8625
8626 2006-06-28  Simon Josefsson  <jas@extundo.com>
8627
8628         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
8629         on _WIN32.
8630
8631         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
8632         getnameinfo.
8633
8634 2006-06-28  Simon Josefsson  <jas@extundo.com>
8635
8636         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
8637
8638 2006-06-28  Simon Josefsson  <jas@extundo.com>
8639
8640         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
8641         functions there.  It will succeed on Windows XP, but on Windows
8642         2000 and (presumably) earlier, it will fail, and use the internal
8643         re-implementation.
8644         (use_win32_p): New function.
8645         (getaddrinfo): Use strtoul on servname, to support numeric ports.
8646         Support AI_NUMERICSERV to disable getservbyname.
8647         (getnameinfo): New function, only supports
8648         NI_NUMERICHOST|NI_NUMERICSERV for now.
8649
8650         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
8651         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
8652         getnameinfo.
8653
8654 2006-06-28  Eric Blake  <ebb9@byu.net>
8655
8656         * modules/wcwidth: New file.
8657         * modules/mbchar (Depends-on): Add wcwidth.
8658         * modules/mbswidth (Depends-on): Add wcwidth.
8659         * MODULES.html.sh: Add wcwidth.
8660
8661 2006-06-28  Eric Blake  <ebb9@byu.net>
8662
8663         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
8664         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
8665
8666 2006-06-28  Eric Blake  <ebb9@byu.net>
8667
8668         * lib/xvasprintf.h: Fix comments.
8669
8670 2006-06-28  Eric Blake  <ebb9@byu.net>
8671
8672         * lib/mbchar.h (wcwidth): Include wcwidth.h.
8673         * lib/mbswidth.c (wcwidth): Move from here...
8674         * lib/wcwidth.h: ...to this new file.
8675
8676 2006-06-28  Derek R. Price  <derek@ximbiot.com>
8677
8678         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
8679
8680         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
8681         it's obsolete.
8682         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
8683
8684 2006-06-28  Derek R. Price  <derek@ximbiot.com>
8685
8686         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
8687         Autoconf 2.60 says this stuff was obsolete.
8688
8689 2006-06-28  Bruno Haible  <bruno@clisp.org>
8690
8691         * modules/wcwidth (Files): Add m4/wchar_t.m4.
8692
8693 2006-06-28  Bruno Haible  <bruno@clisp.org>
8694
8695         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
8696         gt_TYPE_WCHAR_T.
8697
8698 2006-06-28  Bruno Haible  <bruno@clisp.org>
8699
8700         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
8701         declaration for wcwidth.
8702         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
8703
8704 2006-06-28  Bruno Haible  <bruno@clisp.org>
8705
8706         * lib/mkdtemp.c [MINGW]: Include <io.h>.
8707         (mkdir): Define using _mkdir.
8708
8709 2006-06-28  Bruno Haible  <bruno@clisp.org>
8710
8711         * lib/getaddrinfo.h: Fix POSIX URL.
8712         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
8713         _WIN32.
8714         (use_win32_p): Make static.
8715         (getaddrinfo): Reject service name if it is empty or does not consist
8716         solely of decimal digits, or if its value is > 65535.
8717         (getnameinfo): Remove useless casts.
8718
8719 2006-06-27  Simon Josefsson  <jas@extundo.com>
8720
8721         * modules/sys_select: New file, suggested by Bruno Haible, Paul
8722         Eggert and Martin Lambers.
8723
8724 2006-06-27  Simon Josefsson  <jas@extundo.com>
8725
8726         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
8727         Eggert and Martin Lambers.
8728
8729 2006-06-27  Bruno Haible  <bruno@clisp.org>
8730
8731         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
8732         result to 0, not to empty.
8733         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
8734
8735 2006-06-27  Bruno Haible  <bruno@clisp.org>
8736
8737         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
8738
8739 2006-06-26  Simon Josefsson  <jas@extundo.com>
8740
8741         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
8742         present.
8743
8744 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
8745
8746         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
8747         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
8748         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
8749
8750 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
8751
8752         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
8753
8754 2006-06-26  Bruno Haible  <bruno@clisp.org>
8755
8756         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
8757
8758 2006-06-26  Bruno Haible  <bruno@clisp.org>
8759
8760         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
8761
8762 2006-06-26  Bruno Haible  <bruno@clisp.org>
8763
8764         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
8765         SGI C compiler in pre-C99 mode.
8766         Suggested by Mark D. Baushke and Larry Jones.
8767
8768 2006-06-26  Bruno Haible  <bruno@clisp.org>
8769
8770         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
8771         WCHAR_MAX.
8772         Reported by Mark D. Baushke and Larry Jones.
8773
8774 2006-06-26  Bruno Haible  <bruno@clisp.org>
8775
8776         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
8777         in pre-C99 mode.
8778         Suggested by Mark D. Baushke and Larry Jones.
8779
8780 2006-06-23  Simon Josefsson  <jas@extundo.com>
8781             Bruno Haible  <bruno@clisp.org>
8782
8783         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
8784         Emit mostlyclean-local rule.
8785         (func_emit_tests_Makefile_am): Likewise.
8786         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
8787
8788 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
8789
8790         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
8791
8792 2006-06-23  Bruno Haible  <bruno@clisp.org>
8793
8794         * tests/test-stdint.c: Update to match ISO C 99 Technical
8795         Corrigendum 1.
8796
8797 2006-06-23  Bruno Haible  <bruno@clisp.org>
8798
8799         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
8800
8801 2006-06-23  Bruno Haible  <bruno@clisp.org>
8802
8803         * lib/stdint_.h: Treat IRIX like OpenBSD.
8804
8805 2006-06-23  Bruno Haible  <bruno@clisp.org>
8806
8807         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
8808         ISO C 99 Technical Corrigendum 1.
8809
8810 2006-06-22  Simon Josefsson  <jas@extundo.com>
8811
8812         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
8813         MinGW.
8814
8815 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
8816
8817         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
8818         needed.  Some compiler complained about some of them.  Problem reported
8819         by Larry Jones in
8820         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
8821
8822 2006-06-21  Simon Josefsson  <jas@extundo.com>
8823
8824         * tests/test-getaddrinfo.c: New file.
8825
8826         * modules/getaddrinfo-tests: New file.
8827
8828         * MODULES.html.sh: Add inet_pton.
8829
8830         * modules/inet_pton: New file.
8831
8832 2006-06-21  Simon Josefsson  <jas@extundo.com>
8833
8834         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
8835         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
8836         of using the (limited) gnulib implementation on Windows XP.
8837
8838         * m4/inet_pton.m4: New file.
8839
8840 2006-06-21  Simon Josefsson  <jas@extundo.com>
8841
8842         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
8843         variable.
8844
8845         * lib/socket_.h: Don't define WINVER.
8846
8847         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
8848         slightly modified to work in gnulib.
8849
8850 2006-06-21  Simon Josefsson  <jas@extundo.com>
8851
8852         * doc/gnulib.texi (Windows sockets): Add.
8853
8854 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
8855
8856         * lib/read-file.c (fread_file): Start with buffer allocation of
8857         0 bytes rather than 1 byte; this simplifies the code.
8858         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
8859         code to free buffer and save/restore errno.
8860         (internal_read_file): Remove unused local.
8861
8862 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
8863
8864         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
8865         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
8866         Problem reported by Denis Excoffier in
8867         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
8868
8869 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8870
8871         * modules/sys_socket, modules/socklen: Include sys/types since
8872         FreeBSD 4.x's sys/socket.h needs it.
8873
8874 2006-06-19  Simon Josefsson  <jas@extundo.com>
8875
8876         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
8877
8878 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
8879
8880         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
8881
8882 2006-06-19  Bruno Haible  <bruno@clisp.org>
8883
8884         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
8885         and FULL_PATH_INTTYPES_H in angle brackets.
8886         Reported by Mark D. Baushke <mdb@gnu.org>.
8887
8888 2006-06-17  Eric Blake  <ebb9@byu.net>
8889
8890         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
8891         errno.
8892
8893 2006-06-17  Bruno Haible  <bruno@clisp.org>
8894
8895         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
8896         <sys/inttypes.h>.
8897
8898 2006-06-17  Bruno Haible  <bruno@clisp.org>
8899
8900         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
8901         whether errno is declared. Assume <errno.h> declares errno.
8902
8903 2006-06-17  Bruno Haible  <bruno@clisp.org>
8904
8905         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
8906
8907 2006-06-17  Bruno Haible  <bruno@clisp.org>
8908
8909         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
8910         problem on Solaris 2.5.1.
8911
8912 2006-06-16  Eric Blake  <ebb9@byu.net>
8913
8914         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
8915         * lib/unicodeio.c [!defined errno]: Likewise.
8916         * lib/strtol.c [!defined errno]: Likewise.
8917         * lib/strtod.c [!defined errno]: Likewise.
8918
8919 2006-06-15  Eric Blake  <ebb9@byu.net>
8920
8921         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
8922
8923 2006-06-15  Eric Blake  <ebb9@byu.net>
8924
8925         * config/srclist.txt (ssize_t.m4): Lose sync.
8926
8927 2006-06-15  Bruno Haible  <bruno@clisp.org>
8928
8929         * modules/stdint (Files): Include m4/full-header-path.m4,
8930         m4/size_max.m4, m4/wchar_t.m4.
8931         (Makefile.am): Many more substitutions.
8932         * modules/stdint-tests: New file.
8933         * tests/test-stdint.c: New file.
8934
8935 2006-06-15  Bruno Haible  <bruno@clisp.org>
8936
8937         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
8938         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
8939         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
8940         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
8941         gl_CHECK_TYPE_SAME): New macros.
8942
8943 2006-06-15  Bruno Haible  <bruno@clisp.org>
8944
8945         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
8946
8947 2006-06-15  Bruno Haible  <bruno@clisp.org>
8948
8949         * lib/stdint_.h: Rewritten to be fully auto-configured.
8950         Fixes bug on HP-UX/IA64.
8951
8952 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
8953
8954         * lib/getdate.y (__attribute__): Don't define if already defined.
8955         Problem reported by Larry Jones.
8956         * lib/utimens.c (__attribute__): Likewise.
8957
8958 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
8959
8960         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
8961         reported by Andreas Schwab.
8962
8963 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8964             Bruno Haible  <bruno@clisp.org>
8965
8966         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
8967         check for the declaration of strnlen and a run test that exposes the
8968         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
8969         rpl_strndup.
8970
8971 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8972             Bruno Haible  <bruno@clisp.org>
8973
8974         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
8975
8976 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8977
8978         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
8979         compile test, for Tru64 4.0D.
8980
8981 2006-05-28  Karl Berry  <karl@gnu.org>
8982
8983         * config/srclist.txt (printf-args.c): lose sync.
8984
8985 2006-05-26  Martin Lambers  <marlam@marlam.de>
8986
8987         * lib/getpass.c: Updates the test for the native W32 API, and adds
8988         missing includes, thus fixing compilation warnings.
8989
8990 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
8991
8992         * lib/exclude.c (exclude_fnmatch): New function.
8993         (excluded_file_name): Call exclude_fnmatch.
8994         * lib/exclude.h (excluded_file_name): New prototype
8995
8996 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
8997
8998         * lib/tempname.c (small_open, large_open): New macros.
8999         (__open, __open64) [!_LIBC]: Remove.
9000         (__gen_tempname): Use small_open and large_open instead of __open
9001         and __open64.  This fixes a portability bug on HP-UX 11.11i
9002         reported by Simon Wing-Tang in
9003         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
9004
9005 2006-05-24  Bruno Haible  <bruno@clisp.org>
9006
9007         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
9008         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
9009         Reported by Thorsten Maerz <torte@netztorte.de> via
9010         Aaron Stone <aaron@serendipity.cx>.
9011
9012 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
9013
9014         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
9015         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
9016         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
9017         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
9018         not really conditional on the cache.
9019         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
9020
9021 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
9022
9023         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
9024         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
9025         (my_usleep): Don't mishandle maximum value.
9026
9027 2006-05-19  Jim Meyering  <jim@meyering.net>
9028
9029         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
9030
9031 2006-05-17  Bruno Haible  <bruno@clisp.org>
9032
9033         Cygwin portability.
9034         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
9035
9036 2006-05-17  Bruno Haible  <bruno@clisp.org>
9037
9038         * lib/stdint_.h: Fix recognition of Cygwin.
9039
9040 2006-05-15  Bruno Haible  <bruno@clisp.org>
9041
9042         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
9043         on libtool patch by Ralf Wildenhues.
9044
9045 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
9046
9047         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
9048         test for C99 conformance; (bool) 0.5 is an integer constant
9049         expression, but (bool) -0.5 is not.  Problem reported by Fedor
9050         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
9051
9052 2006-05-11  Simon Josefsson  <jas@extundo.com>
9053
9054         * m4/xvasprintf.m4: Fix obvious typo.
9055
9056 2006-05-11  Jim Meyering  <jim@meyering.net>
9057
9058         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
9059         James Lemley.
9060
9061 2006-05-10  Simon Josefsson  <jas@extundo.com>
9062
9063         * lib/md4.c: Typo fix, update copyright years.
9064         (K1, K2): Don't use L because it turn computations into 64-bit on
9065         64-bit platforms.
9066
9067 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
9068
9069         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
9070         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
9071         unwanted sign propagation, e.g., on hosts with 64-bit int.
9072         There still are some problems with reeelly weird theoretical hosts
9073         (e.g., 33-bit int) but it's not worth worrying about now.
9074         * lib/sha1.c (rol): Likewise.
9075         (K1, K2, K3, K4): Remove unnecessary L suffix.
9076
9077 2006-05-10  Bruno Haible  <bruno@clisp.org>
9078
9079         * lib/des.c: Cast to avoid warnings.
9080
9081 2006-05-09  Bruno Haible  <bruno@clisp.org>
9082
9083         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
9084         (Depends-on): Depend also on xsize, stdarg.
9085         (configure.ac): Add gl_XVASPRINTF.
9086
9087 2006-05-09  Bruno Haible  <bruno@clisp.org>
9088
9089         * m4/xvasprintf.m4: New file.
9090
9091 2006-05-09  Bruno Haible  <bruno@clisp.org>
9092
9093         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
9094         (EOVERFLOW): Define fallback value.
9095         (xstrcat): New function.
9096         (xvasprintf): Recognize the special case of a string concatenation.
9097
9098 2006-05-08  Eric Blake  <ebb9@byu.net>
9099
9100         * gnulib-tool (func_version): Base copyright year on CVS date.
9101         (func_emit_copyright_notice): New function.
9102         (func_emit_lib_Makefile_am): Use it.
9103         (func_emit_tests_Makefile_am): Likewise.
9104         (func_import): Likewise.
9105
9106 2006-05-08  Bruno Haible  <bruno@clisp.org>
9107
9108         * modules/stdarg: New file.
9109         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
9110
9111 2006-05-08  Bruno Haible  <bruno@clisp.org>
9112
9113         * m4/stdarg.m4: New file, from GNU gettext.
9114
9115 2006-05-08  Bruno Haible  <bruno@clisp.org>
9116
9117         * config/srclist.txt (build-aux/config.rpath): different from latest
9118         release.
9119
9120 2006-05-08  Bruno Haible  <bruno@clisp.org>
9121
9122         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
9123
9124 2006-05-05  Jim Meyering  <jim@meyering.net>
9125
9126         * m4/warning.m4: New file, derived from bison's file by the same name.
9127
9128 2006-05-03  Bruno Haible  <bruno@clisp.org>
9129
9130         * lib/stdint_.h: Shorter URL.
9131         * lib/inttypes.h: Likewise.
9132
9133 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
9134
9135         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
9136
9137 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
9138
9139         * lib/verify.h: Document the internals better.  Most of this change
9140         was written by Bruno Haible.
9141
9142 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
9143
9144         * doc/verify.texi: New file, partly based on a proposal by
9145         Bruno Haible.
9146
9147 2006-05-02  Bruno Haible  <bruno@clisp.org>
9148
9149         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
9150         test from here...
9151         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
9152
9153 2006-04-29  Bruno Haible  <bruno@clisp.org>
9154
9155         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
9156         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
9157
9158 2006-04-29  Bruno Haible  <bruno@clisp.org>
9159
9160         * gnulib-tool: Make --update option actually work.
9161
9162 2006-04-29  Bruno Haible  <bruno@clisp.org>
9163
9164         * doc/gcd.texi: New file.
9165         * doc/gnulib.texi: Include it.
9166
9167 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
9168
9169         * lib/getdate.y (get_date): When adding relative date, start with the
9170         initial time, not with the result of the first mktime call.
9171
9172 2006-04-25  Bruno Haible  <bruno@clisp.org>
9173
9174         * gnulib-tool (func_import): Output the include directives in three
9175         blocks, sorted separately.
9176         Reported by Ben Pfaff <blp@cs.stanford.edu>.
9177
9178 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
9179
9180         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
9181         to define main with arguments, for C++.  Reported by Eric Blake.
9182         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
9183         Prefer 'int main ()' to 'int main (void)', for C++.
9184         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
9185         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
9186         for 'main', for C99 and C++.
9187
9188 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
9189
9190         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
9191         Don't assume that exit status -1 is valid.
9192         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
9193         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
9194         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
9195         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
9196         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
9197         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
9198         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
9199         functions can be used without declaring them, or that you can
9200         exit with status -1.
9201         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
9202
9203 2006-04-24  Karl Berry  <karl@gnu.org>
9204
9205         * config/srclist.txt (longdouble.m4): sync lost.
9206
9207 2006-04-24  Eric Blake  <ebb9@byu.net>
9208
9209         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
9210
9211 2006-04-24  Bruno Haible  <bruno@clisp.org>
9212
9213         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
9214         poll() implementation in AIX.
9215         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9216
9217 2006-04-24  Bruno Haible  <bruno@clisp.org>
9218
9219         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
9220         assigned exactly once.
9221
9222 2006-04-23  Claudio Fontana  <claudio@gnu.org>
9223             Bruno Haible  <bruno@clisp.org>
9224
9225         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
9226         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
9227         for AM_CPPFLAGS.
9228
9229 2006-04-23  Bruno Haible  <bruno@clisp.org>
9230
9231         * modules/copy-file: Depend on unistd.
9232         * modules/execute: Likewise.
9233         * modules/fatal-signal: Likewise.
9234         * modules/findprog: Likewise.
9235         * modules/mkdtemp : Likewise.
9236         * modules/pipe: Likewise.
9237         * modules/wait-process: Likewise.
9238
9239 2006-04-23  Bruno Haible  <bruno@clisp.org>
9240
9241         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
9242         condition was already detected.
9243         Reported by Ben Pfaff <blp@cs.stanford.edu>.
9244
9245 2006-04-23  Bruno Haible  <bruno@clisp.org>
9246
9247         * lib/copy-file.c: Include <unistd.h> unconditionally.
9248         * lib/execute.c: Likewise.
9249         * lib/fatal-signal.c: Likewise.
9250         * lib/findprog.c: Likewise.
9251         * lib/mkdtemp.c: Likewise.
9252         * lib/pipe.h: Likewise.
9253         * lib/pipe.c: Likewise.
9254         * lib/wait-process.h: Likewise.
9255
9256 2006-04-23  Bruno Haible  <bruno@clisp.org>
9257
9258         * gnulib-tool (func_usage): Fix --import description. Document
9259         --update.
9260         (func_import): Create temporary file in a temporary directory, if
9261         --dry-run is specified. Silence errors from 'grep' when there are no
9262         m4 files in $m4dir.
9263         (func_create_testdir): Silence errors from 'grep' when there are no
9264         m4 files in $m4dir.
9265         Reported by Karl Berry <karl@freefriends.org>.
9266
9267 2006-04-20  Bruno Haible  <bruno@clisp.org>
9268
9269         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
9270         one argument, so that the code will be portable to Autoconf 2.60.
9271         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
9272         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
9273         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
9274
9275 2006-04-19  Derek Price  <derek@ximbiot.com>
9276             Eric Blake  <ebb9@byu.net>
9277
9278         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
9279         rather than "/full/path.h".  Update comment to match.  Shorten &
9280         generalize m4_translit call via AS_TR_CPP.
9281
9282 2006-04-19  Derek Price  <derek@ximbiot.com>
9283             Eric Blake  <ebb9@byu.net>
9284
9285         * lib/inttypes.h: Correct grammar in comment.
9286
9287 2006-04-18  Derek Price  <derek@ximbiot.com>
9288             Paul Eggert  <eggert@cs.ucla.edu>
9289
9290         * modules/inttypes: New file.
9291         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
9292
9293 2006-04-18  Derek Price  <derek@ximbiot.com>
9294             Paul Eggert  <eggert@cs.ucla.edu>
9295
9296         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
9297         New files.
9298
9299 2006-04-18  Derek Price  <derek@ximbiot.com>
9300             Paul Eggert  <eggert@cs.ucla.edu>
9301
9302         * lib/inttypes.h: New file.
9303         * lib/strtoimax.c: Assume <inttypes.h>.
9304
9305 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
9306
9307         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
9308         isn't mounted.  Problem reported by Kir Kolyshkin.
9309
9310 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
9311
9312         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
9313         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
9314         Derek R. Price.
9315         * lib/regex.h (RE_DUP_MAX): Update comment to match current
9316         implementation.
9317
9318 2006-04-12  Eric Blake  <ebb9@byu.net>
9319
9320         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
9321         is now done automatically by the corresponding Autoconf macro.
9322
9323 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
9324
9325         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
9326         time_r.h.
9327
9328 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9329
9330         Merge regex changes from libc, removing some of our
9331         POSIX-conformance changes that were rejected and redoing them in a
9332         less-intrusive way.
9333
9334         * lib/regcomp.c (re_compile_internal, init_dfa):
9335         Length arg is now size_t, not Idx.  All uses changed.
9336         (peek_token): Forward decl now says internal_function.
9337         (__re_error_msgid, __re_error_msgid_idx):
9338         Now static rather than extern with attribute_hidden.
9339         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
9340         For some reason libc prefers K&R style defns for external functions.
9341         (regerror) [!defined _LIBC]: Likewise.
9342         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
9343         (seek_collating_symbol_entry, lookup_collation_sequence_value):
9344         (build_range_exp, build_collating_symbol):
9345         Use K&R-style defn.
9346         (re_compile_fastmap): Use '\0' to memset, not 0.
9347         (utf8_sb_map): Make the calculations more obvious.
9348         (init_dfa, parse_bracket_exp, build_charclass_op):
9349         Call calloc and cast result, as glibc does.
9350         (init_word_char, fetch_token, peek_token, peek_token_bracket):
9351         (build_range_exp, build_collating_symbol):
9352         Now internal functions.
9353
9354         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
9355
9356         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
9357         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
9358         Don't depend on VMS; depend on __VMS instead, for POSIX
9359         namespace cleanness.
9360         (regoff_t): Define to ssize_t, not long int.
9361
9362         Remove the REG_ macros named below.  Instead, make the old names
9363         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
9364         __USE_GNU_REGEX.
9365         (REG_BACKSLASH_ESCAPE_IN_LISTS):
9366         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
9367         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
9368         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
9369         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
9370         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
9371         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
9372         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
9373         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
9374         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
9375         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
9376         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
9377         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
9378         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
9379         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
9380         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
9381         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
9382         (REG_NREGS):
9383         Remove.  All uses replaced by the old RE_* names.
9384         (RE_BACKSLASH_ESCAPE_IN_LISTS):
9385         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
9386         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
9387         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
9388         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
9389         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
9390         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
9391         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
9392         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
9393         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
9394         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
9395         Don't bother having these macros be independent of each others'
9396         values, since they no longer exist in the POSIX name space.
9397
9398         Rename the following member names back to their old names,
9399         unless !__USE_GNU_REGEX.  All uses changed back.
9400         (buffer): Renamed from re_buffer.
9401         (allocated): Renamed from re_allocated.
9402         (used): Renamed from re_used.
9403         (syntax): Renamed from re_syntax.
9404         (fastmap): Renamed from re_fastmap.
9405         (translate): Renamed from re_translate.
9406         (can_be_null): Renamed from re_can_be_null.
9407         (regs_allocated): Renamed from re_regs_allocated.
9408         (fastmap_accurate): Renamed from re_fastmap_accurate.
9409         (no_sub): Renamed from re_no_sub.
9410         (not_bol): Renamed from re_not_bol.
9411         (not_eol): Renamed from re_not_eol.
9412         (newline_anchor): Renamed from re_newline_anchor.
9413         (num_regs): Renamed from rm_num_regs.
9414         (start): Renamed from rm_start.
9415         (end): Renamed from rm_end.
9416
9417         (free_state): Move up a bit.
9418
9419         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
9420         #define to be empty.
9421         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
9422         when that is what is intended.
9423         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
9424         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
9425         (MAX): New macro.
9426         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
9427         All uses changed back to re_malloc, etc.  It's now the caller's
9428         responsibility to check for overflow; all callers changed.
9429         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
9430         (re_x2nrealloc): Remove.
9431         (free_state): Remove decl.
9432
9433         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
9434         (re_set_registers, re_exec):
9435         Use K&R-style defn.
9436
9437         2006-01-31  Roland McGrath  <roland@redhat.com>
9438
9439         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
9440         Reported by Mike Frysinger <vapier@gentoo.org>.
9441
9442         2006-01-15  Andreas Jaeger  <aj@suse.de>
9443
9444         [BZ #1950]
9445         * lib/regex_internal.c (re_string_reconstruct): Adjust for
9446         build_wcs_upper_buffer change.
9447         (build_wcs_upper_buffer): Change return type.
9448
9449         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
9450
9451         * lib/regex_internal.h: Include <stdint.h> if available.
9452
9453         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
9454
9455         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
9456
9457         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
9458
9459         * lib/regcomp.c: Adjust for changed secondary hash function.
9460
9461         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
9462
9463         * lib/regex.h: Pretty printing.
9464         Clean up namespace a bit.
9465
9466         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
9467
9468         * lib/regexec.c (update_cur_sifted_state, check_arrival,
9469         check_arrival_add_next_nodes): Avoid using uninitialized variable.
9470
9471         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
9472                     Ulrich Drepper  <drepper@redhat.com>
9473
9474         [BZ #1302]
9475         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
9476         changed.
9477         (bitset_word_t): Renamed from bitset_word.  All uses changed.
9478
9479         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
9480
9481         [BZ #281]
9482         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
9483         * lib/regcomp.c: Remove unnecessary uses of
9484         unsigned RE_TRANSLATE_TYPE.
9485         * lib/regex_internal.h: Likewise.
9486         * lib/regex_internal.c: Likewise.
9487         * lib/regexec.c: Likewise.
9488         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
9489
9490         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
9491
9492         * lib/regexec.c (find_recover_state): Remove unnecessary
9493         initialization.
9494         (transit_state_bkref): Make DFA a const pointer.
9495         (get_subexp): Likewise.
9496         (check_arrival): Likewise.
9497         (update_cur_sifted_state): Likewise.
9498         (re_search_internal): Likewise.
9499         (prune_impossible_nodes): Likewise.
9500         (acquire_init_state_context): Likewise.
9501         (proceed_next_node): Likewise.
9502         (set_regs): Likewise.
9503         (free_fail_stack_return): Likewise.
9504         (check_arrival_expand_ecl): Mark DFA parameter as const.
9505         (check_arrival_expand_ecl_sub): Likewise.
9506         (check_subexp_limits): Likewise.
9507         (sub_epsilon_src_nodes):  Likewise.
9508         (add_epsilon_src_nodes):  Likewise.
9509         (merge_state_array): Likewise.
9510         (update_regs): Likewise.
9511         (build_trtable): Likewise.
9512         (sift_states_backward): Mark MCTX parameter as const.
9513         (build_sifted_states): Likewise.
9514         (update_cur_sifted_state): Likewise.
9515         (sift_states_mkref): Likewise.
9516         (check_arrival_expand_ecl): Mark eclosure as const.
9517         (check_dst_limits_calc_pos_1): Likewise.
9518         * lib/regex_internal.h (re_match_context_t): Make dfa a const
9519         pointer.
9520
9521         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
9522
9523         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
9524         (transit_state_sb): Likewise.
9525         (transit_state_mb): Likewise.
9526         (sift_states_iter_mb): Likewise.
9527         (check_arrival_add_next_nodes): Likewise.
9528         (check_node_accept_bytes): Change first parameter to pointer-to-const.
9529         [_LIBC] (re_search_2_stub): Use mempcpy.
9530
9531         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
9532         mbrtowc for very simple UTF-8 case.
9533
9534         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
9535         a pointer-to-const.
9536         (re_acquire_state_context): Likewise.
9537         * lib/regex_internal.h: Adjust prototypes.
9538
9539         * lib/regex.c: Prevent using C++ compilers.
9540
9541         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
9542         (re_acquire_state_context): Likewise.
9543
9544 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9545
9546         * modules/regex (Depends-on): Add ssize_t.
9547
9548 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9549
9550         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
9551         translation table.
9552
9553 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9554
9555         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
9556
9557 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
9558             Bruno Haible  <bruno@clisp.org>
9559
9560         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
9561         <sys/types.h> and <inttypes.h>.
9562
9563 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9564
9565         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
9566         `__error_t_defined', so argp.h will not typedef the former.
9567
9568 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
9569
9570         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
9571         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
9572         glibc names.  Even if glibc is changed to conform to POSIX, the
9573         traditional names will be available anyway, since regex depends on
9574         the extensions module.  Also, fix a longstanding typo in the
9575         implementation of Spencer ERE test #75 from grep 2.3.  Problems
9576         reported by Emanuele Giaquinta.  Also, change sense of cached
9577         variable, so that the message makes sense.
9578
9579 2006-03-24  Simon Josefsson  <jas@extundo.com>
9580
9581         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
9582         including some doc fixes.
9583         (base64_encode_alloc): Fix +1 bug on allocation failures.
9584
9585 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9586
9587         * lib/base64.c (base64_encode): Do not read past end of array with
9588         unsanitized input on systems with CHAR_BIT > 8.
9589
9590 2006-03-24  Eric Blake  <ebb9@byu.net>
9591
9592         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
9593
9594 2006-03-22  Karl Berry  <karl@gnu.org>
9595
9596         * config/srclist.txt (*setenv.[ch]): get from coreutils.
9597         * config/srclistvars.sh (COREUTILS): new var.
9598
9599 2006-03-17  Jim Meyering  <jim@meyering.net>
9600
9601         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
9602         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
9603
9604 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
9605
9606         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
9607         no longer needs it.  Instead, check that regoff_t is as least
9608         as wide as ptrdiff_t.
9609
9610         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
9611         so that our regex.h stays compatible with the installed regex.
9612         This is helpful for installers who configure --without-included-regex.
9613         Problem reported by Emanuele Giaquinta.
9614
9615 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
9616
9617         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
9618         Typedef to long int, not to off_, as POSIX will likely change
9619         in that direction.
9620
9621 2006-03-15  Eric Blake  <ebb9@byu.net>
9622
9623         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
9624
9625 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
9626
9627         * lib/argp-help.c (validate_uparams): Fix typo
9628         * lib/argp-parse.c (argp_default_options): Consistently begin help
9629         messages with a lowercase letter.
9630
9631 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
9632
9633         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
9634         overrun buffers and shouldn't be used (much as gets shouldn't be
9635         used).
9636         * lib/time_r.c (asctime_r, ctime_r): Likewise.
9637
9638 2006-03-08  Simon Josefsson  <jas@extundo.com>
9639
9640         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
9641         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9642
9643 2006-03-08  Simon Josefsson  <jas@extundo.com>
9644
9645         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
9646         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9647
9648 2006-03-08  Simon Josefsson  <jas@extundo.com>
9649
9650         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
9651         signal that configure disabled the device.
9652
9653 2006-03-08  Simon Josefsson  <jas@extundo.com>
9654
9655         * build-aux/maint.mk: Fix refresh-po, to handle no translated
9656         languages.
9657
9658 2006-03-07  Simon Josefsson  <jas@extundo.com>
9659
9660         * modules/getopt (Depends-on): Add unistd.
9661
9662         * modules/unistd: New file.
9663
9664 2006-03-07  Simon Josefsson  <jas@extundo.com>
9665
9666         * modules/gc-random: New file.
9667
9668 2006-03-07  Simon Josefsson  <jas@extundo.com>
9669
9670         * m4/unistd_h.m4: New file.
9671
9672 2006-03-07  Simon Josefsson  <jas@extundo.com>
9673
9674         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
9675         test to be side-effect free by storing the result in the cache
9676         variable gl_cv_lib_readline, and moving the assignment of
9677         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
9678         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9679
9680 2006-03-07  Simon Josefsson  <jas@extundo.com>
9681
9682         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
9683         error on missing devices (the functions will return an error).
9684
9685         * m4/gc.m4: Move random stuff to gc-random.m4
9686
9687 2006-03-07  Simon Josefsson  <jas@extundo.com>
9688
9689         * lib/unistd_.h: New file.
9690
9691 2006-03-07  Simon Josefsson  <jas@extundo.com>
9692
9693         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
9694
9695 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9696
9697         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
9698         Problem reported by Juan Manuel Guerrero.
9699
9700 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9701
9702         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
9703         the unistd module.
9704         * lib/getlogin_r.c: Likewise.
9705         * lib/getlogin_r.h: Likewise.
9706         * lib/glob.c: Likewise.
9707         * lib/pagealign_alloc.c: Likewise.
9708         * lib/unistd_.h: Remove; no longer needed.
9709
9710 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9711
9712         * MODULES.html.sh (Support for systems lacking POSIX:2001):
9713         Add unistd.
9714         * modules/c-stack (Depends-on): Add unistd.
9715         * modules/getlogin_r: Likewise.
9716         * modules/glob: Likewise.
9717         * modules/pagealign_alloc: Likewise.
9718         * modules/unistd (Files): Remove lib/unistd_.h.
9719         (EXTRA_DIST): Remove.
9720         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
9721         need unistd_.h.
9722         (MOSTLYCLEANFILES): Remove unistd.h-t.
9723
9724 2006-03-03  Simon Josefsson  <jas@extundo.com>
9725
9726         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
9727
9728 2006-03-03  Simon Josefsson  <jas@extundo.com>
9729
9730         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
9731         libidn and bison.
9732
9733 2006-03-03  Simon Josefsson  <jas@extundo.com>
9734
9735         * build-aux/maint.mk: Add indent target.
9736
9737 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
9738
9739         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
9740         our replacement poll.h in any case, to avoid a differing
9741         declaration from a system header.  Seen on AIX.
9742
9743 2006-03-01  Simon Josefsson  <jas@extundo.com>
9744
9745         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
9746         <kasal@ucw.cz>.
9747
9748 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
9749
9750         * modules/gettime (Depends-on): Add extensions module.
9751         * modules/nanosleep (Depends-on): Likewise.
9752         * modules/settime (Depends-on): Likewise.
9753
9754 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
9755
9756         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
9757         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
9758         pedantically.
9759         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
9760         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
9761
9762         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
9763         not "==".  Reported by Ralf Wildenhues.
9764
9765 2006-03-01  Karl Berry  <karl@gnu.org>
9766
9767         * doc/Copyright/request-*: new files, synced from gnuorg.
9768
9769 2006-03-01  Karl Berry  <karl@gnu.org>
9770
9771         * config/srclist.txt (Copyright/*): new entries.
9772
9773 2006-02-28  Simon Josefsson  <jas@extundo.com>
9774
9775         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
9776
9777 2006-02-27  Simon Josefsson  <jas@extundo.com>
9778
9779         * lib/base64.h: Indent #define's.  From Jim Meyering
9780         <jim@meyering.net>.
9781
9782 2006-02-27  Jim Meyering  <jim@meyering.net>
9783
9784         Revert the change of 2006-02-24, so these files can continue
9785         to be sync'd from gettext.
9786         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
9787         of `config.h'.
9788
9789 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
9790
9791         * modules/intprops: New file.
9792         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
9793         Add intprops.
9794         * modules/getloadavg (Files): Remove lib/intprops.h.
9795         (Depends-on): Add intprops.
9796         * modules/human: Likewise.
9797         * modules/inttostr: Likewise.
9798         * modules/openat: Likewise.
9799         * modules/sig2str: Likewise.
9800         * modules/userspec: Likewise.
9801         * modules/utimecmp: Likewise.
9802         * modules/xnanosleep: Likewise.
9803         * modules/xstrtol: Likewise.
9804
9805 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
9806
9807         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
9808         * modules/lock-tests (TESTS): Use $(EXEEXT).
9809         * modules/tls-tests: Likewise.
9810         * modules/argp-tests: Likewise.
9811         (check_PROGRAMS): New var, replacing...
9812         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
9813
9814 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9815
9816         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
9817         `config.h'.
9818
9819 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
9820
9821         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
9822
9823 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9824
9825         Sync from coreutils.
9826         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
9827         gl_CHDIR_SAFER.
9828
9829 2006-02-22  Jim Meyering  <jim@meyering.net>
9830
9831         Sync from coreutils.
9832         * m4/chdir-safer.m4: New file.
9833
9834 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
9835
9836         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
9837         AT_FDCWD exceeds INT_MAX.
9838         * lib/openat.h (AT_FDCWD): Likewise.
9839
9840 2006-02-17  Eric Blake  <address@hidden>
9841
9842         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
9843
9844 2006-02-16  Simon Josefsson  <jas@extundo.com>
9845
9846         * modules/getaddrinfo (Depends-on): Add sys_socket.
9847
9848 2006-02-15  Simon Josefsson  <jas@extundo.com>
9849
9850         * build-aux/maint.mk: Add dsyntax-check rule.
9851
9852 2006-02-15  Eric Blake  <ebb9@byu.net>
9853
9854         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
9855         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
9856         'present but cannot compile' warnings on cygwin.
9857         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
9858         use ws2tcpip.h if sys/socket.h works.
9859         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
9860         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
9861
9862 2006-02-14  Simon Josefsson  <jas@extundo.com>
9863
9864         * modules/maintainer-makefile (Files): Rename.
9865
9866         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
9867         and (the local) Makefile.cfg to maint-cfg.mk.
9868
9869         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
9870         to the latter.
9871
9872         * modules/maintainer-makefile: New module.
9873
9874         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
9875         severaly stripped to make it possible to build it up from scratch
9876         with reliable tests.
9877
9878         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
9879         fixes to permit overriding the default actions when configure and
9880         makefile are not available.
9881
9882 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
9883
9884         Sync from coreutils.
9885         * modules/lstat (Depends-on): Don't depend on xalloc.
9886         (License): Change from GPL to LGPL, since this is now simply a
9887         replacement for a libc function.
9888
9889 2006-02-14  Jim Meyering  <jim@meyering.net>
9890
9891         Sync from coreutils.
9892
9893         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
9894         failure on deficient systems, and simplify gnulib lgpl dependencies.
9895         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
9896         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
9897
9898         * lib/xalloc-die.c: Remove unused definition of N_.
9899
9900 2006-02-14  Jim Meyering  <jim@meyering.net>
9901
9902         Sync from coreutils.
9903         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
9904         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
9905         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
9906         double-quote uses of that variable, to accommodate the rare case in
9907         which getmntent is available in none of the libraries checked.  This
9908         happens at least on FreeBSD 5.0.
9909
9910 2006-02-13  Simon Josefsson  <jas@extundo.com>
9911
9912         * gnulib-tool (Usage): Fix --import, from
9913         karl@freefriends.org (Karl Berry).
9914
9915 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
9916
9917         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
9918
9919 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
9920
9921         * lib/argp-namefrob.h: Restore changes accidentally lost during the
9922         "autoupdate" on 2005-12-12.
9923
9924 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
9925
9926         * modules/closeout (Depends-on): Remove atexit.
9927
9928 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
9929
9930         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
9931         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
9932
9933 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
9934
9935         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
9936         __EXTENSIONS__ if this causes compilation to fail.  Problem
9937         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
9938         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
9939
9940 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
9941
9942         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
9943         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
9944         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
9945         All uses changed.
9946
9947 2006-01-26  Simon Josefsson  <jas@extundo.com>
9948
9949         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
9950         prototype is visible on mingw32.
9951
9952         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
9953         for mingw32.
9954
9955         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
9956         mingw32).
9957
9958 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
9959
9960         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
9961         attempt to open for write; this always fails, at least on POSIX
9962         hosts.  This reinstates the 2006-01-09 change, which was
9963         inadvertently removed.
9964
9965 2006-01-26  Bruno Haible  <bruno@clisp.org>
9966
9967         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
9968         Reported by Paul Eggert.
9969
9970 2006-01-26  Bruno Haible  <bruno@clisp.org>
9971             Paul Eggert  <eggert@cs.ucla.edu>
9972
9973         * lib/stdbool_.h (_Bool)
9974         [(! (defined __cplusplus || defined __BEOS__)
9975           && !defined __GNUC__
9976           && !(defined __HP_cc || defined __xlc__
9977                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
9978                || defined __sgi))]:
9979         #define to signed char in these cases too; this simplifies
9980         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
9981         etc., separately) and makes it more conservative.
9982
9983 2006-01-25  Simon Josefsson  <jas@extundo.com>
9984
9985         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
9986         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
9987         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
9988
9989 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
9990
9991         * lib/argp-namefrob.h: Bugfix. Remove stray #
9992
9993 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
9994
9995         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
9996         so that we test the test.
9997         Check for yet another HP-UX cc bug involving *bool |= bool.
9998
9999 2006-01-25  Karl Berry  <karl@gnu.org>
10000
10001         * config/srclist.txt (vasnprintf.c): sync lost.
10002
10003 2006-01-25  Jim Meyering  <jim@meyering.net>
10004
10005         Sync from the stable (b5) branch of coreutils:
10006
10007         * lib/fts.c (fts_children): Don't let close() clobber errno from
10008         failed fchdir().
10009
10010         * lib/fts.c (fts_stat): When following a symlink-to-directory,
10011         don't necessarily interpret stat-fails+lstat-succeeds as indicating
10012         a dangling symlink.  That can also happen at least for ELOOP.
10013         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
10014         FYI, this bug predates the inclusion of fts.c in coreutils.
10015
10016         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
10017         in their own block, so pre-c99 compilers don't object.
10018
10019         Avoid the double-free (first in fts_read, second in fts_close) that
10020         would occur when an `active' directory is made inaccessible (e.g.,
10021         via chmod a-x) during a traversal.
10022         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
10023         before returning.  Reproduce this failure by
10024         mkdir -p a/b; cd a; chmod a-x . b
10025         Reported by Stavros Passas.
10026
10027 2006-01-25  Jim Meyering  <jim@meyering.net>
10028
10029         * lib/fileblocks.c: Remove more useless parentheses.
10030         * lib/readutmp.h: Likewise.
10031
10032 2006-01-25  Bruno Haible  <bruno@clisp.org>
10033
10034         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
10035         warnings.
10036         Reported by Paul Eggert.
10037
10038 2006-01-25  Bruno Haible  <bruno@clisp.org>
10039
10040         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
10041         rid of a trap command. For Solaris sh.
10042         Reported by Mark D. Baushke <mdb@gnu.org>.
10043
10044 2006-01-24  Simon Josefsson  <jas@extundo.com>
10045
10046         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
10047         Bruno.
10048
10049 2006-01-24  Karl Berry  <karl@gnu.org>
10050
10051         * config/srclist.txt (argp-namefrob.h): sync lost.
10052
10053 2006-01-24  Jim Meyering  <jim@meyering.net>
10054
10055         * modules/openat (Files): Add lib/intprops.h.
10056         From Mark D. Baushke.
10057
10058 2006-01-24  Jim Meyering  <jim@meyering.net>
10059
10060         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
10061         Reported by Mark D. Baushke.
10062
10063 2006-01-24  Jim Meyering  <jim@meyering.net>
10064
10065         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
10066
10067 2006-01-24  Bruno Haible  <bruno@clisp.org>
10068
10069         * modules/strnlen (Maintainer): Change from glibc to all.
10070
10071 2006-01-24  Bruno Haible  <bruno@clisp.org>
10072
10073         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
10074         Patch by Paul Eggert.
10075
10076 2006-01-24  Bruno Haible  <bruno@clisp.org>
10077
10078         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
10079         already has it.
10080         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
10081         2005-11-26.
10082
10083         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
10084         'signed char' to avoid problems with the built-in _Bool type.
10085         Reported by Paul Eggert on 2005-11-26.
10086
10087 2006-01-24  Bruno Haible  <bruno@clisp.org>
10088
10089         * gnulib-tool (func_import): Avoid constructing complicated sed
10090         expressions inside backquote.
10091         Report and solution by Mark D. Baushke <mdb@gnu.org>.
10092
10093 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
10094
10095         These changes imported from libc.
10096         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
10097         test and two separate function calls.
10098         * lib/strndup.c (__strndup): Add libc_hidden_def.
10099
10100 2006-01-23  Simon Josefsson  <jas@extundo.com>
10101
10102         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
10103         Remove the test_*_SOURCES variable: automake infers it by default.
10104         * modules/tls-tests: Likewise.
10105
10106 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10107
10108         Work around porting bugs reported by Dieter in
10109         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
10110         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
10111         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
10112         Include "getopt.h" first, to check interface.
10113         (getenv): Declare only if defined HAVE_DECL_GETENV &&
10114         !HAVE_DECL_GETENV.
10115         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
10116         (__strndup): Revert to K&R-style function dfns, the glibc style.
10117         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
10118         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
10119         Include strnlen.h first, to get prototype properly.
10120         (strnlen): Renamed from __strnlen.
10121         Remove weak alias.
10122
10123 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10124
10125         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
10126
10127 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10128
10129         * config/srclist.txt: Adjust to reflect glibc reorganization.
10130         This affects only comments.
10131
10132 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
10133
10134          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
10135          Reported by Bruce Korb <bkorb@gnu.org>.
10136
10137 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
10138
10139         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
10140         to pacify gcc -Wswitch-default.
10141
10142 2006-01-22  Bruno Haible  <bruno@clisp.org>
10143
10144         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
10145         temporary buffer for sprintf, take into account the precision also
10146         for 'd', 'i', 'u', 'o', 'x', 'X'.
10147
10148 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
10149
10150         * modules/argp-tests: New module
10151         * tests/test-argp.c: New file
10152         * tests/test-argp-2.sh: New file
10153
10154 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
10155
10156         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
10157         (__argp_base_name): Removed
10158         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
10159         typo.
10160         (__argp_base_name): Provide macro definition or extern declaration
10161         depending on the configuration
10162
10163 2006-01-20  Simon Josefsson  <jas@extundo.com>
10164
10165         * modules/inet_ntop (Depends-on): Depend on sys_socket.
10166
10167 2006-01-20  Simon Josefsson  <jas@extundo.com>
10168
10169         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
10170
10171 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
10172
10173         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
10174         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
10175         Suggested by Bruno Haible.
10176
10177 2006-01-20  Karl Berry  <karl@gnu.org>
10178
10179         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
10180         until changes propagate, I guess.
10181
10182 2006-01-19  Simon Josefsson  <jas@extundo.com>
10183
10184         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
10185
10186 2006-01-19  Simon Josefsson  <jas@extundo.com>
10187
10188         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
10189
10190 2006-01-19  Simon Josefsson  <jas@extundo.com>
10191
10192         * gnulib-tool: Set check_PROGRAMS.
10193
10194         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
10195         modules/des-tests, modules/gc-arcfour-tests,
10196         modules/gc-arctwo-tests, modules/gc-des-tests,
10197         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
10198         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
10199         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
10200         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
10201         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
10202         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
10203         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
10204         test_*_SOURCES.
10205
10206 2006-01-18  Simon Josefsson  <jas@extundo.com>
10207
10208         * modules/socklen (Depends-on): Depend on sys_socket.
10209
10210 2006-01-18  Simon Josefsson  <jas@extundo.com>
10211
10212         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
10213         modules/des-tests, modules/gc-arcfour-tests,
10214         modules/gc-arctwo-tests, modules/gc-des-tests,
10215         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
10216         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
10217         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
10218         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
10219         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
10220         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
10221         $(EXEEXT) to automake TESTS variable, for mingw32.
10222
10223 2006-01-17  Simon Josefsson  <jas@extundo.com>
10224
10225         * modules/socklen (Include): Need sys/socket.h.
10226
10227 2006-01-17  Bruno Haible  <bruno@clisp.org>
10228
10229         * modules/ssize_t (Include): Add <sys/types.h>.
10230
10231 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
10232
10233         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
10234         it's not portable and it doesn't work with cross-compiles.
10235         Problem reported by Bruno Haible.  Fix missing-$ typo in
10236         'test "gl_cv_ignore_unused_libraries" ...' that prevented
10237         -zignore from being used with Sun's C compiler.
10238
10239 2006-01-12  Simon Josefsson  <jas@extundo.com>
10240
10241         * lib/base64.c: Fix warning, reported by Bruno Haible
10242         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
10243
10244 2006-01-12  Bruno Haible  <bruno@clisp.org>
10245
10246         * modules/ldd: New file.
10247         * build-aux/ldd.sh.in: New file.
10248         * MODULES.html.sh (Support for building libraries and executables): Add
10249         ldd.
10250
10251 2006-01-12  Bruno Haible  <bruno@clisp.org>
10252
10253         * m4/ldd.m4: New file.
10254
10255 2006-01-12  Bruno Haible  <bruno@clisp.org>
10256
10257         * gnulib-tool (func_import, func_create_testdir): Don't go into an
10258         endless loop while replacing $auxdir with build-aux.
10259
10260 2006-01-11  Simon Josefsson  <jas@extundo.com>
10261
10262         * lib/stdint_.h (SIZE_MAX): Add missing (.
10263
10264 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
10265
10266         Sync from coreutils.
10267         * lib/md5.c: Fix commentary typos.
10268         (alignof, UNALIGNED_P): No need for a GCC-specific version.
10269         * lib/md5.h (__attribute__): Remove; unused.
10270         * lib/sha1.c: Fix commentary to match md5 better.
10271         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
10272         so that we don't need to worry about alignment.  All uses changed.
10273         This merges the 2005-10-28 md5 change into sha1.
10274
10275 2006-01-11  Jim Meyering  <jim@meyering.net>
10276
10277         Sync from coreutils.
10278         * lib/md5.c (OP): Fix spacing.
10279
10280 2006-01-11  Bruno Haible  <bruno@clisp.org>
10281
10282         Ensure automatic ordering between gl_LOCK and gl_ARGP.
10283         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
10284         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
10285
10286 2006-01-11  Bruno Haible  <bruno@clisp.org>
10287
10288         Ensure automatic ordering between gl_LOCK and gl_ARGP.
10289         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
10290         the "early" section as well.
10291
10292 2006-01-11  Bruno Haible  <bruno@clisp.org>
10293
10294         Avoid "ar: no archive members specified" error on MacOS X.
10295         * gnulib-tool (func_modules_add_dummy): New function.
10296         (func_import, func_create_testdir): Invoke it.
10297
10298 2006-01-11  Bruno Haible  <bruno@clisp.org>
10299
10300         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
10301         with $auxdir in AC_CONFIG_FILES statements.
10302
10303 2006-01-11  Bruno Haible  <bruno@clisp.org>
10304
10305         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
10306         Initialize also noinst_HEADERS to empty.
10307
10308 2006-01-11  Bruno Haible  <bruno@clisp.org>
10309
10310         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
10311         variables.
10312         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
10313         autoreconf.
10314
10315 2006-01-11  Bruno Haible  <bruno@clisp.org>
10316
10317         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
10318         overridable by the user.
10319         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10320
10321 2006-01-10  Simon Josefsson  <jas@extundo.com>
10322
10323         * modules/sys_socket: New file.
10324
10325 2006-01-10  Simon Josefsson  <jas@extundo.com>
10326
10327         * m4/sys_socket_h.m4: New file.
10328
10329 2006-01-10  Simon Josefsson  <jas@extundo.com>
10330
10331         * lib/socket_.h: New file.
10332
10333 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10334
10335         * modules/readutmp (Maintainer): Add myself.
10336
10337 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10338
10339         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
10340         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
10341         People who are still concerned with buggy memcmp implementations
10342         can invoke gl_FUNC_MEMCMP themselves.
10343
10344 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10345
10346         * lib/regex_internal.h (BITSET_WORD_BITS):
10347         Work around a bug in 64-bit PGC (before version 6.1-2), where the
10348         preprocessor mishandles large unsigned values as if they were signed.
10349         Problem reported by Claudio Fontana in
10350         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
10351
10352 2006-01-10  Jim Meyering  <jim@meyering.net>
10353
10354         Avoid the double-free (first in fts_read, second in fts_close) that
10355         would occur when an `active' directory is made inaccessible (e.g.,
10356         via chmod a-x) during a traversal.
10357         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
10358         before returning.  Reproduce this failure by
10359         mkdir -p a/b; cd a; chmod a-x . b
10360         Reported by Stavros Passas.
10361
10362         Sync from coreutils.
10363         * lib/sha1.c: Tweak grammar in a comment.
10364
10365 2006-01-10  Jim Meyering  <jim@meyering.net>
10366
10367         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
10368         Patch by Joerg Sonnenberger.
10369
10370 2006-01-10  Bruno Haible  <bruno@clisp.org>
10371
10372         * modules/readutmp: Depend on module free.
10373         * modules/strtok_r: Depend on module restrict.
10374
10375 2006-01-10  Bruno Haible  <bruno@clisp.org>
10376
10377         * modules/gettext (configure.ac): Add an invocation of
10378         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
10379
10380 2006-01-10  Bruno Haible  <bruno@clisp.org>
10381
10382         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
10383         Reported by Werner Lemberg <wl@gnu.org>.
10384
10385 2006-01-10  Bruno Haible  <bruno@clisp.org>
10386
10387         * lib/localcharset.c: Update from GNU gettext.
10388
10389 2006-01-10  Bruno Haible  <bruno@clisp.org>
10390
10391         * lib/argp.h (__const): Remove macro. Use const instead.
10392         * lib/argp-fmtstream.h (__const): Likewise.
10393         * lib/glob_.h (__const): Remove macro.
10394         * lib/glob-libc.h: Use const instead of __const.
10395
10396 2006-01-10  Bruno Haible  <bruno@clisp.org>
10397
10398         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
10399         variable.
10400         Needed to avoid an automake error regarding the 'gettext' module.
10401
10402 2006-01-09  Simon Josefsson  <jas@extundo.com>
10403
10404         * modules/inet_ntop (Depends-on): Add restrict.
10405
10406 2006-01-09  Simon Josefsson  <jas@extundo.com>
10407
10408         * modules/gc-rijndael-tests (License): Put under LGPL.
10409
10410         * modules/gc-des-tests (License): Likewise.
10411
10412         * modules/gc-arcfour-tests (License): Likewise.
10413
10414         * modules/gc-arctwo-tests (License): Likewise.
10415
10416         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
10417
10418         * modules/gc-hmac-sha1-tests (Files): Likewise.
10419
10420         * modules/gc-hmac-md5-tests (License): Likewise.
10421
10422         * modules/gc-sha1-tests (License): Likewise.
10423
10424         * modules/gc-md5-tests (License): Likewise.
10425
10426         * modules/gc-md4-tests (License): Likewise.
10427
10428         * modules/gc-md2-tests (License): Likewise.
10429
10430         * modules/gc-tests (License): Likewise.
10431
10432         * modules/des-tests (License): Likewise.
10433
10434         * modules/md4-tests (License): Likewise.
10435
10436         * modules/md2-tests (License): Likewise.
10437
10438 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10439
10440         Sync from coreutils:
10441
10442         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
10443         * modules/lib-ignore: New file.
10444         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
10445         chdir-safer.m4, lchmod.m4.
10446         * modules/openat: Add mkdirat.c, openat-priv.h.
10447
10448 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10449
10450         Sync from coreutils.
10451         * m4/lib-ignore.m4: New file.
10452         * m4/lchmod.m4: New file.
10453
10454 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10455
10456         Sync from coreutils.
10457         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
10458         for write access: POSIX says that must fail.
10459         * lib/fts.c (diropen): Likewise.
10460         * lib/save-cwd.c (save_cwd): Likewise.
10461         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
10462         well, for minor improvements on hosts that lack O_DIRECTORY.
10463         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
10464         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
10465         Fall back on chown if open failed with EACCES.
10466
10467         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
10468         Report an error at compile-time if only a 1-second nominal clock
10469         resolution is found.
10470
10471         * lib/lchmod.h: New file.
10472         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
10473         (make_dir_parents): Use lchown rather than chown, and
10474         lchmod rather than chmod.
10475
10476         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
10477         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
10478         "proc" reported by n0dalus.
10479
10480         * lib/mountlist.c: Include <limits.h>.
10481         (dev_from_mount_options)
10482         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
10483         New function.  It no longer assumes "dev=" has the System V meaning
10484         on Linux (since it doesn't).  It also parses "dev=" more carefully.
10485         (read_file_system_list)
10486         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
10487         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
10488         dev= in that case.
10489
10490         * lib/posixtm.h (PDS_PRE_2000): New macro.
10491         * lib/posixtm.c (year): Arg is now syntax_bits rather than
10492         allow_century.  All usages changed.  Reject dates outside the range
10493         1969-1999 if PDS_PRE_2000 is used.
10494
10495 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10496
10497         Sync from coreutils.
10498         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
10499         (Time of day items): Mention the possibility of leap seconds.
10500         Problem reported by Dr. David Alan Gilbert.
10501
10502 2006-01-09  Jim Meyering  <jim@meyering.net>
10503
10504         Sync from coreutils.
10505
10506         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
10507
10508         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
10509
10510         * lib/modechange.c (mode_compile): Reject an invalid mode string
10511         that starts with an octal digit.  From Andreas Gruenbacher.
10512
10513         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
10514         and dup to open_safer and dup_safer, respectively.
10515         (openat_permissive): Fix typo in comment.
10516
10517         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
10518         "gettext.h"; either no longer needed or are guaranteed by openat.h.
10519         (_): Remove; no longer needed.
10520         (openat): Renamed from rpl_openat; no need for rpl_openat
10521         since openat.h renames openat for us.
10522         Replace most of the body with a call to openat_permissive,
10523         to avoid duplicate code.
10524         Port to (probably hypothetical) environments were mode_t is
10525         wider than int.
10526         (openat_permissive): Require mode arg, so that we can check
10527         types better.  Put it just after flags.  Change cwd failure
10528         indicator from pointer-to-bool to pointer-to-errno-value.
10529         All callers changed.
10530         Invoke openat_save_fail and/or openat_restore_fail if
10531         cwd_errno is null, so that openat can call us.
10532         (openat_permissive, fdopendir, fstatat, unlinkat):
10533         Simplify errno handling to avoid some duplicate code,
10534         as it's OK to set errno on success.
10535         * lib/openat.h: Revamp code so that function macros depend on
10536         __OPENAT_PREFIX only, not also on AT_FDCWD.
10537         (openat_ro): Remove.  Caller changed to use openat_permissive.
10538         (openat_permissive): Now a macro, if not a function.
10539         (openat_restore_fail, openat_save_fail): Now always functions,
10540         since mkdirat needs them even if __OPENAT_PREFIX is defined.
10541
10542         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
10543         and openat.c.
10544         * lib/mkdirat.c: Include openat-priv.h.
10545         Remove definitions of macros defined therein.
10546         * lib/openat.c: Likewise.
10547
10548         * lib/mkdirat.c (mkdirat): New file and function.
10549         * lib/openat.h (mkdirat): Declare.
10550
10551         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
10552
10553         * lib/openat.h (openat_permissive): Declare.
10554         (openat_ro): Define.
10555
10556         * lib/openat.c (EXPECTED_ERRNO): New macro.
10557         (openat_permissive): New function -- used in remove.c rewrite.
10558         (all functions): Set errno just before returning, only if there
10559         was an actual failure.
10560         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
10561
10562         Emulate openat-family functions using Linux's procfs, if possible.
10563         Idea and some code based on Ulrich Drepper's glibc changes.
10564
10565         * lib/openat.c: (BUILD_PROC_NAME): New macro.
10566         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
10567         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
10568         before falling back on save_cwd and restore_cwd.
10569         (fdopendir, fstatat, unlinkat): Likewise.
10570
10571         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
10572         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
10573
10574         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
10575         as second argument to va_arg.  Otherwise, some versions of gcc
10576         warn that `if this code is reached, the program will abort'.
10577
10578 2006-01-09  Jim Meyering  <jim@meyering.net>
10579
10580         Sync from coreutils.
10581         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
10582         Require openat-priv.h.
10583
10584 2006-01-09  Bruno Haible  <bruno@clisp.org>
10585
10586         * modules/strnlen (Include): Use strnlen.h.
10587
10588 2006-01-09  Bruno Haible  <bruno@clisp.org>
10589
10590         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
10591
10592 2006-01-09  Bruno Haible  <bruno@clisp.org>
10593
10594         * lib/sysexit_.h (EX_OK): New macro.
10595         Suggested by Martin Lambers <marlam@marlam.de>.
10596
10597 2006-01-09  Bruno Haible  <bruno@clisp.org>
10598
10599         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
10600         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
10601
10602 2006-01-09  Bruno Haible  <bruno@clisp.org>
10603
10604         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
10605         numbers.
10606
10607 2006-01-09  Bruno Haible  <bruno@clisp.org>
10608
10609         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
10610         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
10611         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
10612         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
10613
10614 2006-01-09  Bruno Haible  <bruno@clisp.org>
10615
10616         * build-aux/javacomp.sh.in: New file, moved from lib/.
10617         * modules/javacomp-script (Files): Update.
10618         (configure.ac): Add AC_CONFIG_FILES invocation.
10619         (EXTRA_DIST): Remove variable.
10620
10621         * build-aux/javaexec.sh.in: New file, moved from lib/.
10622         * modules/javaexec (Files): Update.
10623         (configure.ac): Add AC_CONFIG_FILES invocation.
10624         (EXTRA_DIST): Remove javaexec.sh.in.
10625
10626         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
10627         * modules/csharpcomp-script (Files): Update.
10628         (configure.ac): Add AC_CONFIG_FILES invocation.
10629         (EXTRA_DIST): Remove variable.
10630
10631         * build-aux/csharpexec.sh.in: New file, moved from lib/.
10632         * modules/csharpexec (Files): Update.
10633         (configure.ac): Add AC_CONFIG_FILES invocation.
10634         (EXTRA_DIST): Remove csharpexec.sh.in.
10635
10636 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
10637
10638         Sync from coreutils.
10639
10640         Add POSIX ACL support
10641         * lib/acl.h (copy_acl, set_acl): Add declarations.
10642         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
10643         systems other than Linux.
10644         (chmod_or_fchmod): New function: use fchmod when possible,
10645         and chmod otherwise.
10646         (file_has_acl): Add a POSIX ACL implementation, with a
10647         Linux-specific subcase.
10648         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
10649         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
10650         acls are unsupported.
10651         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
10652         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
10653         are unsupported.
10654
10655 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
10656
10657         Sync from coreutils.
10658         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
10659
10660 2006-01-07  Bruno Haible  <bruno@clisp.org>
10661
10662         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
10663         gl_EARLY.
10664
10665 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
10666
10667         * lib/strftime.c (tzname): Don't declare if it is already #defined.
10668         Problem reported for Mingw by Mark Junker.
10669
10670 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
10671
10672         * README: Gnulib normally doesn't generate a tarball.
10673
10674 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
10675
10676         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
10677         long int, not int, for nanosecond counts, so that people who are
10678         used to POSIX struct timespec won't be surprised.  Reported by Jim
10679         Meyering.
10680
10681 2005-12-28  Bruno Haible  <bruno@clisp.org>
10682
10683         * build-aux/config.rpath: Update from GNU gettext.
10684
10685 2005-12-16  Jim Meyering  <jim@meyering.net>
10686
10687         * modules/fprintftime: New module.
10688         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
10689
10690 2005-12-16  Jim Meyering  <jim@meyering.net>
10691
10692         * m4/fprintftime.m4: New file.
10693
10694 2005-12-16  Jim Meyering  <jim@meyering.net>
10695
10696         * lib/fprintftime.c, lib/fprintftime.h: New files.
10697
10698 2005-12-15  Simon Josefsson  <jas@extundo.com>
10699
10700         * modules/socklen (configure.ac): Fix M4 macro name, to align with
10701         new m4/socklen.m4.
10702
10703 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
10704
10705         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
10706         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
10707
10708 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
10709
10710         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
10711         * lib/argp-help.c (fill_in_uparams): Check if the constructed
10712         struct uparams is valid. Fall back to the default values if it is
10713         not.
10714
10715 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10716
10717         * modules/argp (Files): Add argp-pin.c
10718         (Depends-on): dirname
10719         (lib_SOURCES): Add argp-pin.c
10720
10721 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10722
10723         * m4/argp.m4:  Check if program_invocation_name and
10724         program_invocation_short_name are declared and define appropriate
10725         macros if they are not.
10726
10727 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10728
10729         * lib/argp-help.c (__argp_base_name): New function
10730         (__argp_short_program_name): Rewrite using __argp_base_name
10731         * lib/argp-namefrob.h: Define program_invocation_name and
10732         program_invocation_short_name if requested
10733         (__argp_base_name): Add prototype
10734         * lib/argp-parse.c (argp_def): Use gettext wrappers
10735         (argp_default_parser): Use __argp_base_name
10736         * lib/argp-pin.c: New file. Defines program_invocation_name and
10737         program_invocation_short_name on systems that lack them.
10738
10739 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
10740
10741         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
10742         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
10743         porting problem reported by Georg Schwarz in
10744         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
10745
10746 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
10747
10748         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
10749         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
10750         porting problem reported by Georg Schwarz in
10751         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
10752
10753 2005-12-05  Bruno Haible  <bruno@clisp.org>
10754
10755         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
10756         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
10757         Reported by Mark Junker <mjscod@gmx.de>.
10758
10759 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
10760
10761         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
10762         Use implementation from Albert Chin, with some
10763         comments/corrections by Stepan Kasal and myself.
10764
10765 2005-12-02  Bruno Haible  <bruno@clisp.org>
10766
10767         * gnulib-tool (func_import): Accept GPLed build tool modules when
10768         --lgpl is given.
10769         * modules/csharpcomp-script: New file.
10770         * modules/csharpcomp: Depend on it.
10771         * modules/javacomp-script: New file.
10772         * modules/javacomp: Depend on it.
10773         Suggested by Simon Josefsson.
10774
10775 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
10776
10777         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
10778         statement, to work around an HP-UX 10.20 compiler bug reported by
10779         Peter O'Gorman.
10780
10781 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
10782
10783         * modules/savedir (Depends-on): Add openat.
10784
10785 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
10786
10787         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
10788         (uintmax_t) [defined uintmax_t]: Do not declare.
10789         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
10790         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
10791         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
10792         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
10793         sake of portability to weird hosts that C allows (though we don't
10794         know of any practical examples).
10795
10796         * lib/savedir.h (fdsavedir): New decl.
10797         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
10798         contains most of the former guts of savedir.
10799         (savedir): Use savedirstream.
10800         Include "openat.h".
10801
10802 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
10803
10804         * modules/obstack (Files): Add m4/ulonglong.m4.
10805         Problem reported by Davide Angelocola.
10806
10807 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
10808
10809         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
10810         coreutils no longer futzes with rounding modes.
10811
10812 2005-11-14  Jim Meyering  <jim@meyering.net>
10813
10814         * lib/mkstemp-safer.c: Include <config.h>, required for possible
10815         replacement of mkstemp.
10816
10817 2005-11-10  Simon Josefsson  <jas@extundo.com>
10818
10819         * lib/readline.c: Remove EOL.
10820
10821 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10822
10823         * modules/gethrxtime (Depends-on): Add gettime.
10824
10825 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10826
10827         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
10828         or gettimeofday; no longer needed.
10829
10830 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10831
10832         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
10833         time business.
10834         (gethrxtime) [! (HAVE_NANOUPTIME
10835         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
10836         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
10837         our own approximation.
10838
10839 2005-11-08  Eric Blake  <ebb9@byu.net>
10840
10841         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
10842
10843 2005-11-08  Eric Blake  <ebb9@byu.net>
10844
10845         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
10846
10847 2005-11-04  Bruno Haible  <bruno@clisp.org>
10848
10849         * gnulib-tool: Implement --update mode.
10850
10851 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
10852
10853         Fix porting problem reported by Theodoros V. Kalamatianos.
10854         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
10855         Don't assume that futimes failing means we must fail.
10856
10857 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
10858
10859         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
10860         variables to suggest the intended function of the PATH_MAX check.
10861
10862 2005-10-30  Kean Johnston  <jkj@sco.com>
10863
10864         Trivial changes to support SCO systems.
10865         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
10866         as PATH_MAX.
10867         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
10868         where __ptr is null when no I/O is pending.
10869
10870 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
10871
10872         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
10873         leave errno alone.  Problem reported by Dmitry V. Levin.
10874
10875 2005-10-28  Simon Josefsson  <jas@extundo.com>
10876
10877         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
10878         Test more.
10879
10880         * tests/test-gc-md2.c, tests/test-md2.c: New files.
10881
10882         * modules/md2, modules/md2-tests: New files.
10883
10884 2005-10-28  Simon Josefsson  <jas@extundo.com>
10885
10886         * m4/inet_ntop.m4: More tests.
10887
10888         * m4/gc-md2.m4, md2.m4: New file.
10889
10890 2005-10-28  Simon Josefsson  <jas@extundo.com>
10891
10892         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
10893         "restrict" keywords, as per POSIX.  Protect the function
10894         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
10895         Don't use K&R prototypes.  Check the sprintf return values.
10896         Re-define EAFNOSUPPORT if not present.  Indent.
10897
10898         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
10899         suggested by Bruno Haible <bruno@clisp.org>.
10900
10901         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
10902
10903         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
10904
10905         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
10906         libgcrypt).
10907
10908         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
10909
10910         * lib/md2.h, lib/md2.c: New files.
10911
10912 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
10913
10914         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
10915         errno alone.  Problem reported by Frederic Jolliton.
10916
10917 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
10918
10919         * modules/verify (License): Change from GPL to LGPL.  This is a
10920         tiny module and there are apparently near-equivalents that are
10921         under the BSD license.
10922
10923 2005-10-24  Simon Josefsson  <jas@extundo.com>
10924
10925         * modules/sha1: Relicense to LGPL.
10926
10927 2005-10-24  Simon Josefsson  <jas@extundo.com>
10928
10929         * lib/md4.h: Shrink buffer size, now that we changed the type.
10930
10931 2005-10-23  Simon Josefsson  <jas@extundo.com>
10932
10933         * gnulib-tool (func_import): Fix --tests-base.
10934
10935 2005-10-22  Simon Josefsson  <jas@extundo.com>
10936
10937         * modules/arcfour (Depends-on): Need stdint.
10938
10939 2005-10-22  Simon Josefsson  <jas@extundo.com>
10940
10941         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
10942         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
10943
10944 2005-10-22  Simon Josefsson  <jas@extundo.com>
10945
10946         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
10947         suggested by Bruno Haible <bruno@clisp.org>.
10948
10949 2005-10-22  Simon Josefsson  <jas@extundo.com>
10950
10951         * lib/crc.h: Include stddef.h, for size_t.
10952
10953 2005-10-22  Simon Josefsson  <jas@extundo.com>
10954
10955         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
10956         arcfour_context struct (simplify test vector testing in GNU
10957         Shishi).
10958
10959 2005-10-21  Simon Josefsson  <jas@extundo.com>
10960
10961         * modules/des, modules/des-tests: New files.
10962
10963         * modules/gc-des, modules/gc-des-tests: New files.
10964
10965         * tests/test-des.c, tests/test-gc-des.c: New file.
10966
10967 2005-10-21  Simon Josefsson  <jas@extundo.com>
10968
10969         * modules/arctwo, modules/arctwo-tests: New files.
10970
10971         * tests/test-arctwo.c: New file.
10972
10973         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
10974
10975         * tests/test-gc-arctwo.c: New file.
10976
10977 2005-10-21  Simon Josefsson  <jas@extundo.com>
10978
10979         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
10980         Bruno Haible <bruno@clisp.org>.
10981
10982         * m4/gc-des.m4: New file.
10983
10984 2005-10-21  Simon Josefsson  <jas@extundo.com>
10985
10986         * m4/arctwo.m4: New file.
10987
10988         * m4/gc-arctwo.m4: New file.
10989
10990 2005-10-21  Simon Josefsson  <jas@extundo.com>
10991
10992         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
10993         block.
10994
10995 2005-10-21  Simon Josefsson  <jas@extundo.com>
10996
10997         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
10998         <bruno@clisp.org>.
10999
11000         * lib/hmac-sha1.c (hmac_sha1): Likewise.
11001
11002         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
11003         Bruno Haible <bruno@clisp.org>.
11004
11005         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
11006         <bruno@clisp.org>.
11007
11008 2005-10-21  Simon Josefsson  <jas@extundo.com>
11009
11010         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
11011
11012 2005-10-21  Simon Josefsson  <jas@extundo.com>
11013
11014         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
11015
11016 2005-10-21  Simon Josefsson  <jas@extundo.com>
11017
11018         * lib/des.h, lib/des.c: New files.
11019
11020         * lib/gc-gnulib.c: Support DES.c
11021
11022 2005-10-21  Simon Josefsson  <jas@extundo.com>
11023
11024         * lib/arctwo.h, lib/arctwo.c: New files.
11025
11026         * lib/gc-gnulib.c: Support ARCTWO.
11027
11028 2005-10-21  Simon Josefsson  <jas@extundo.com>
11029
11030         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
11031         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11032
11033 2005-10-21  Simon Josefsson  <jas@extundo.com>
11034
11035         * gnulib-tool (func_import, func_create_testdir): Define automake
11036         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
11037         Makefile.am snippet),
11038         suggested by Bruno Haible <bruno@clisp.org>.
11039
11040         * modules/gc (Makefile.am): Use it.
11041
11042 2005-10-21  Bruno Haible  <bruno@clisp.org>
11043
11044         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
11045         patch.
11046
11047 2005-10-19  Simon Josefsson  <jas@extundo.com>
11048
11049         * tests/test-gc-rijndael.c: New file.
11050
11051         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
11052
11053 2005-10-19  Simon Josefsson  <jas@extundo.com>
11054
11055         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
11056         interface too.
11057
11058 2005-10-19  Simon Josefsson  <jas@extundo.com>
11059
11060         * tests/test-gc-arcfour.c: New file.
11061
11062         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
11063
11064 2005-10-19  Simon Josefsson  <jas@extundo.com>
11065
11066         * modules/gc-md4, modules/gc-md4-tests: New file.
11067
11068         * tests/test-gc-md4.c: New file.
11069
11070 2005-10-19  Simon Josefsson  <jas@extundo.com>
11071
11072         * m4/gc-md4.m4: New file.
11073
11074 2005-10-19  Simon Josefsson  <jas@extundo.com>
11075
11076         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
11077         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
11078         <kasal@ucw.cz>.
11079
11080 2005-10-19  Simon Josefsson  <jas@extundo.com>
11081
11082         * m4/gc-arcfour.m4: New file.
11083
11084         * m4/gc-rijndael.m4: New file.
11085
11086 2005-10-19  Simon Josefsson  <jas@extundo.com>
11087
11088         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
11089
11090 2005-10-19  Simon Josefsson  <jas@extundo.com>
11091
11092         * lib/gc-gnulib.c: Support ARCFOUR.
11093
11094 2005-10-19  Simon Josefsson  <jas@extundo.com>
11095
11096         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
11097         support.
11098
11099         * lib/gc.h: Add ECB enum type.
11100
11101         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
11102
11103 2005-10-18  Simon Josefsson  <jas@extundo.com>
11104
11105         * tests/test-md5.c: New file.
11106
11107         * modules/md5-tests: New file.
11108
11109 2005-10-18  Simon Josefsson  <jas@extundo.com>
11110
11111         * tests/test-md4.c: New file.
11112
11113         * modules/md4, modules/md4-tests: New files.
11114
11115 2005-10-18  Simon Josefsson  <jas@extundo.com>
11116
11117         * m4/md4.m4: New file.
11118
11119 2005-10-18  Simon Josefsson  <jas@extundo.com>
11120
11121         * lib/md4.h, lib/md4.c: New files, based on md5.?.
11122
11123 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
11124
11125         * gnulib-tool (func_create_testdir): Omit the second check whether
11126         BUILT_SOURCES in nonempty.
11127
11128 2005-10-17  Simon Josefsson  <jas@extundo.com>
11129
11130         * tests/test-rijndael.c: New file.
11131
11132 2005-10-17  Simon Josefsson  <jas@extundo.com>
11133
11134         * modules/sha1: Depend on stdint instead of md5.
11135
11136         * modules/md5: Depend on stdint, remove uint32_t.
11137
11138 2005-10-17  Simon Josefsson  <jas@extundo.com>
11139
11140         * modules/gc-sha1-tests: New file.
11141
11142         * tests/test-gc-sha1.c: New file.
11143
11144 2005-10-17  Simon Josefsson  <jas@extundo.com>
11145
11146         * m4/md5.m4: Remove call to uint32_t.m4.
11147
11148 2005-10-17  Simon Josefsson  <jas@extundo.com>
11149
11150         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
11151
11152         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
11153         md5.h.
11154
11155         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
11156
11157         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
11158
11159 2005-10-17  Simon Josefsson  <jas@extundo.com>
11160
11161         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
11162
11163 2005-10-17  Simon Josefsson  <jas@extundo.com>
11164
11165         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
11166
11167 2005-10-17  Simon Josefsson  <jas@extundo.com>
11168
11169         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
11170
11171         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
11172
11173 2005-10-17  Bruno Haible  <bruno@clisp.org>
11174
11175         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
11176         that it can also be used in a test.
11177
11178 2005-10-16  Bruno Haible  <bruno@clisp.org>
11179
11180         * gnulib-tool (func_emit_tests_Makefile_am): Also define
11181         TESTS_ENVIRONMENT, so that individual tests can augment it.
11182
11183         * gnulib-tool (func_create_testdir): Use an intermediate target for
11184         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
11185         macros, like $(ALLOCA_H), which cannot be passed through the command
11186         line.
11187
11188 2005-10-15  Simon Josefsson  <jas@extundo.com>
11189
11190         * modules/rijndael-tests: New file.
11191
11192         * modules/rijndael: New file.
11193
11194 2005-10-15  Simon Josefsson  <jas@extundo.com>
11195
11196         * m4/rijndael.m4: New file.
11197
11198 2005-10-15  Simon Josefsson  <jas@extundo.com>
11199
11200         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
11201
11202         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
11203
11204 2005-10-14  Simon Josefsson  <jas@extundo.com>
11205
11206         * tests/test-arcfour.c: New file.
11207
11208         * modules/arcfour, modules/arcfour-tests: New files.
11209
11210 2005-10-14  Simon Josefsson  <jas@extundo.com>
11211
11212         * m4/arcfour.m4: New file.
11213
11214 2005-10-14  Simon Josefsson  <jas@extundo.com>
11215
11216         * lib/arcfour.h, lib/arcfour.c: New files.
11217
11218 2005-10-14  Roland McGrath  <roland@redhat.com>
11219
11220         Import from libc.  [BZ #1331]
11221         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
11222         macro argument.
11223         Reported by Matej Vela <vela@debian.org>.
11224
11225 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
11226
11227         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
11228         include <wchar.h>; no longer needed.
11229
11230 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
11231
11232         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
11233
11234 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
11235         and  Ulrich Drepper  <drepper@redhat.com>
11236
11237         Import from libc.
11238         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
11239         instead of inline stream orientation test and two separate
11240         function calls.  Pay no attention to USE_IN_LIBIO.
11241
11242 2005-10-13  Simon Josefsson  <jas@extundo.com>
11243
11244         * modules/gc-hmac-md5-tests: New file.
11245
11246         * tests/test-gc-hmac-sha1.c: New file.
11247
11248         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
11249
11250         * modules/gc-hmac-md5-tests: New file.
11251
11252         * tests/test-gc-md5.c: New file.
11253
11254         * modules/gc-md5-tests: New file.
11255
11256 2005-10-13  Simon Josefsson  <jas@extundo.com>
11257
11258         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
11259         Move memory allocation outside of loop.
11260
11261 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
11262
11263         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
11264         intermediate directory is in a read-only file system.  Problem
11265         reported by Eric Blake.
11266
11267 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
11268
11269         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
11270
11271 2005-10-12  Simon Josefsson  <jas@extundo.com>
11272
11273         * tests/test-hmac-sha1.c: New file.
11274
11275         * modules/hmac-sha1-tests: New file.
11276
11277         * modules/hmac-sha1: New file.
11278
11279 2005-10-12  Simon Josefsson  <jas@extundo.com>
11280
11281         * modules/gc-sha1: New file.
11282
11283 2005-10-12  Simon Josefsson  <jas@extundo.com>
11284
11285         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
11286
11287         * tests/test-gc-pbkdf2-sha1.c: New file.
11288
11289 2005-10-12  Simon Josefsson  <jas@extundo.com>
11290
11291         * modules/gc-md5, modules/gc-hmac-md5: New files.
11292
11293         * modules/gc (Files): Remove md5, memxor and hmac files.
11294
11295 2005-10-12  Simon Josefsson  <jas@extundo.com>
11296
11297         * m4/gc-pbkdf2-sha1.m4: New file.
11298
11299         * m4/gc-hmac-sha1.m4: New file.
11300
11301         * m4/gc-sha1: New file.
11302
11303         * m4/hmac-sha1.m4: New file.
11304
11305 2005-10-12  Simon Josefsson  <jas@extundo.com>
11306
11307         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
11308
11309         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
11310
11311 2005-10-12  Simon Josefsson  <jas@extundo.com>
11312
11313         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
11314         suggested by Bruno Haible <bruno@clisp.org>.
11315
11316 2005-10-12  Simon Josefsson  <jas@extundo.com>
11317
11318         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
11319
11320 2005-10-12  Simon Josefsson  <jas@extundo.com>
11321
11322         * lib/gc-pbkdf2-sha1.c: New file.
11323
11324         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
11325
11326 2005-10-12  Simon Josefsson  <jas@extundo.com>
11327
11328         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
11329
11330         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
11331
11332 2005-10-12  Simon Josefsson  <jas@extundo.com>
11333
11334         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
11335         GC_USE_HMAC_MD5, respectively.
11336
11337         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
11338         (gc_md5): Fix typo.
11339
11340         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
11341
11342         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
11343
11344         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
11345
11346 2005-10-12  Bruno Haible  <bruno@clisp.org>
11347
11348         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
11349         Reported by Stepan Kasal <kasal@ucw.cz>.
11350
11351 2005-10-11  Simon Josefsson  <jas@extundo.com>
11352
11353         * tests/test-crc.c: New file.
11354
11355         * modules/crc, modules/crc-tests: New files.
11356
11357 2005-10-11  Simon Josefsson  <jas@extundo.com>
11358
11359         * m4/crc.m4: New file.
11360
11361 2005-10-11  Simon Josefsson  <jas@extundo.com>
11362
11363         * lib/gc.h: Add gc_hash and gc_hash_buffer.
11364
11365         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
11366
11367         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
11368
11369 2005-10-11  Simon Josefsson  <jas@extundo.com>
11370
11371         * lib/crc.h, lib/crc.c: New files.
11372
11373         * lib/gc.h (gc_hash_buffer): Add doc.
11374
11375 2005-10-11  Bruno Haible  <bruno@clisp.org>
11376
11377         * modules/c-strcasestr: New file.
11378         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
11379
11380 2005-10-11  Bruno Haible  <bruno@clisp.org>
11381
11382         * modules/c-strcase: New file.
11383         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
11384
11385 2005-10-11  Bruno Haible  <bruno@clisp.org>
11386
11387         * lib/strcasecmp.c: Include limits.h.
11388         (strcasecmp): Avoid integer overflow on exotic platforms.
11389         * lib/strncasecmp.c: Include limits.h.
11390         (strncasecmp): Avoid integer overflow on exotic platforms.
11391         Reported by Paul Eggert.
11392
11393 2005-10-11  Bruno Haible  <bruno@clisp.org>
11394
11395         * lib/c-strcasestr.h: New file, from GNU gettext.
11396         * lib/c-strcasestr.c: New file, from GNU gettext.
11397
11398 2005-10-11  Bruno Haible  <bruno@clisp.org>
11399
11400         * lib/c-strcase.h: New file, from GNU gettext.
11401         * lib/c-strcasecmp.c: New file, from GNU gettext.
11402         * lib/c-strncasecmp.c: New file, from GNU gettext.
11403
11404 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
11405
11406         * modules/mempcpy (License): GPL -> LGPL.
11407         * modules/strchrnul (License): Likewise.
11408         * modules/sysexits (License): Likewise.
11409
11410 2005-10-08  Simon Josefsson  <jas@extundo.com>
11411
11412         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
11413
11414 2005-10-07  Simon Josefsson  <jas@extundo.com>
11415
11416         * m4/memxor.m4: Remove gl_C_RESTRICT call.
11417
11418 2005-10-06  Simon Josefsson  <jas@extundo.com>
11419
11420         * tests/test-hmac-md5.c: New file.
11421
11422         * modules/hmac-md5-tests: New file.
11423
11424         * modules/hmac-md5: New file.
11425
11426 2005-10-06  Simon Josefsson  <jas@extundo.com>
11427
11428         * m4/hmac-md5.m4: New file.
11429
11430         * m4/memxor.m4: Require gl_C_RESTRICT.
11431
11432 2005-10-06  Simon Josefsson  <jas@extundo.com>
11433
11434         * lib/memxor.c (memxor): Avoid casts and warnings.
11435
11436 2005-10-06  Simon Josefsson  <jas@extundo.com>
11437
11438         * lib/hmac-md5.c: New file.
11439
11440         * lib/hmac.h: New file.
11441
11442 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
11443
11444         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
11445         promotes to int, not unsigned int, to catch the AIX 5.3
11446         compiler bug.
11447
11448 2005-10-05  Simon Josefsson  <jas@extundo.com>
11449
11450         * modules/memxor: New file.
11451
11452         * modules/iconv (Files): Move config.rpath to havelib, it is used
11453         there.
11454
11455         * modules/havelib (Files): Add config.rpath.
11456
11457 2005-10-05  Simon Josefsson  <jas@extundo.com>
11458
11459         * m4/memxor.m4: New file.
11460
11461 2005-10-05  Simon Josefsson  <jas@extundo.com>
11462
11463         * lib/memxor.c (memxor): Fix compiler error.
11464
11465         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
11466         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
11467
11468         * lib/memxor.h, lib/memxor.c: New files.
11469
11470         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
11471         we assume all systems have it, suggested by Jim Meyering
11472         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
11473         any systems lack sys/socket.h; mingw32 is known to lack it, but we
11474         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
11475         same reasons.
11476
11477 2005-10-05  Simon Josefsson  <jas@extundo.com>
11478
11479         * config/srclist.txt: Add glibc bug 1423 for md5.h.
11480
11481 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
11482
11483         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
11484         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
11485         needed, since the source code now assumes these .h files.
11486
11487 2005-10-05  Derek Price  <derek@ximbiot.com>
11488
11489         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
11490
11491 2005-10-05  Bruno Haible  <bruno@clisp.org>
11492
11493         * modules/stdint (License): Change to LGPL.
11494
11495 2005-10-04  Simon Josefsson  <jas@extundo.com>
11496
11497         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
11498         D. Baushke" <mdb@gnu.org>.
11499
11500 2005-10-04  Bruno Haible  <bruno@clisp.org>
11501
11502         * lib/verify.h (verify_true): Provide alternative definition for C++.
11503
11504 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
11505
11506         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
11507         (SSIZE_MAX): New macro, if not already defined.
11508         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
11509         than 2 GiB.
11510
11511 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
11512
11513         Sync from coreutils.
11514         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
11515         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
11516         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
11517         ULLONG_MAX doesn't work with 2.7.2.1.
11518
11519 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
11520
11521         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
11522         From Ben Pfaff.
11523
11524         * modules/exclude (Depends-on): Depend on verify.
11525         * modules/strtoimax (Depends-on): Likewise.
11526         * modules/utimecmp (Depends-on): Likewise.
11527
11528 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
11529
11530         * lib/exclude.c: Include verify.h.
11531         (verify): Remove.  All callers changed to use verify.h's version.
11532         * lib/strtoimax.c: Likewise.
11533         * lib/utimecmp.c: Likewis.e
11534
11535         Sync from coreutils.
11536         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
11537         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
11538         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
11539         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
11540         bother returning ENOSYS if settimeofday or stime fails; just let
11541         them return whatever errno they want to return.
11542         * lib/utimens.c: Include unistd.h, for dup2.
11543         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
11544         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
11545
11546 2005-10-02  Jim Meyering  <jim@meyering.net>
11547
11548         Sync from coreutils.
11549         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
11550         from glibc-2.2.5 that fails for read-only files.
11551
11552 2005-10-02  Jim Meyering  <jim@meyering.net>
11553
11554         Sync from coreutils.
11555         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
11556         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
11557         `#if HAVE_CONFIG_H'.
11558         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
11559         Remove AT_FDCWD test.
11560         Do not consume the fd unless successful.
11561         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
11562         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
11563         block, so that we don't even try to compile it if settimeofday is
11564         available.  This works around a compilation failure on OSF1 V5.1,
11565         due to stime requiring a `long int*' while tv_sec is `int'.
11566
11567 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
11568
11569         Sync from coreutils.
11570         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
11571         against `yes', rather than just testing for nonempty.
11572
11573 2005-10-01  Simon Josefsson  <jas@extundo.com>
11574
11575         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
11576         and Darwin.
11577
11578         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
11579         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
11580         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
11581         freeaddrinfo and gai_strerror are declared by the POSIX headers.
11582         Check if struct addrinfo is declared.
11583
11584 2005-10-01  Simon Josefsson  <jas@extundo.com>
11585
11586         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
11587         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
11588         AI_* and EAI_* definitions.  Protect function declarations.
11589
11590 2005-10-01  Jim Meyering  <jim@meyering.net>
11591
11592         Sync from coreutils.
11593
11594         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
11595         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
11596         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
11597         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
11598         in the inet and nsl libraries.  Required on Solaris 5.7.
11599
11600 2005-10-01  Jim Meyering  <jim@meyering.net>
11601
11602         Sync from coreutils.
11603         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
11604         in the inet and nsl libraries.  Required on Solaris 5.7.
11605
11606 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
11607
11608         * lib/getdelim.c (getdelim): Remove unused variables.
11609
11610 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
11611
11612         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
11613         so that the code works even with ancient cpp.  Portability problem
11614         with GCC 2.7.2.1 reported by Thomas M.Ott.
11615
11616 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
11617
11618         * modules/regex (Depends-on): Add strcase.
11619
11620         * modules/gethostname (Licence): Change from GPL to LGPL, since
11621         gethostname.c is a trivial implementation of a standard library
11622         function.
11623         * modules/poll (License): Change from GPL to LGPL, since it's
11624         derived from LGPL code.
11625
11626 2005-09-27  Jim Meyering  <jim@meyering.net>
11627
11628         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
11629         HAVE_CONFIG_H.
11630
11631         * lib/intprops.h (signed_type_or_expr__): Define.
11632         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
11633         for unsigned types.
11634
11635 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
11636
11637         * lib/verify.h (verify_expr): Remove, replacing with:
11638         (verify_true): New macro that returns true instead of void.
11639         (verify_type__): Remove.
11640         (verify): Use verify_true rather than verify_type__.
11641
11642 2005-09-26  Bruno Haible  <bruno@clisp.org>
11643
11644         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
11645         is necessary.
11646         (lib_SOURCES): Remove mbchar.c.
11647         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
11648         (Files): Add m4/mbrtowc.m4.
11649         * modules/mbiter: Likewise.
11650         * modules/mbuiter: Likewise.
11651
11652 2005-09-26  Bruno Haible  <bruno@clisp.org>
11653
11654         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
11655         compile mbchar.c if they are not both present.
11656         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
11657         * m4/mbiter.m4 (gl_MBITER): Likewise.
11658         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
11659         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
11660         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
11661
11662 2005-09-25  Jim Meyering  <jim@meyering.net>
11663
11664         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
11665         also uses socklen_t.
11666
11667 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
11668
11669         * lib/utimens.c (ENOSYS): Define if not already defined.
11670         (futimens): Support having a null PATH if the file descriptor
11671         is nonnegative.
11672
11673         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
11674         Remove.
11675         (__attribute): Define to empty unless GCC 3.1 or later.
11676         This works around a core dump on OpenBSD 3.4, which has GCC
11677         2.95.3, which dumps core when given __attribute__(()).  It also
11678         simplifies other tests, since we really don't want to bother with
11679         worrying about which ancient version of GCC supported what.
11680         Original problem reported by Yoann Vandoorselaere, with part of
11681         the fix suggested by Derek Price.
11682
11683 2005-09-24  Jim Meyering  <jim@meyering.net>
11684
11685         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
11686         so we can once again use a positive bitfield width of 1 -- now we
11687         don't have to explain why we were using a bitfield width of 2.
11688
11689 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
11690
11691         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
11692         and similarly for the other external symbols.  Problem reported
11693         by James Gallager.
11694
11695         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
11696         bug reported by Jim Meyering.
11697
11698         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
11699         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
11700         not needed, since socklen is a prerequisite module.
11701
11702 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
11703
11704         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
11705         Problem reported by Eric Blake.
11706         (getaddrinfo): Initialize se so that it's not garbage.
11707         Redo internal storage allocation so that it doesn't make unportable
11708         assumptions about alignment.
11709         Fix a memory leak.
11710
11711         * lib/utimens.c (futimens): Use futimesat if available.
11712         Prefer it to futimes since it doesn't have the futimes bug.
11713
11714         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
11715         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
11716         Instead, declare a function that returns a pointer to an array,
11717         and use verify_type__ to declare the size of the array.
11718         Problem and germ of a solution reported by Bruno Haible.
11719         (verify_type__): Use 2, not 1, for bitfield size, to avoid
11720         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
11721
11722 2005-09-23  Jim Meyering  <jim@meyering.net>
11723
11724         Sync from coreutils.
11725         Correct build failure (socklen_t not defined) on at least
11726         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
11727         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
11728
11729 2005-09-23  Jim Meyering  <jim@meyering.net>
11730
11731         * modules/getaddrinfo (Depends-on): Add socklen.
11732
11733 2005-09-23  Bruno Haible  <bruno@clisp.org>
11734
11735         * tests/test-verify.c: New file.
11736
11737 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11738
11739         Sync from coreutils.
11740
11741         * modules/argmatch (Depends-on): Add verify.
11742         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
11743         unistd-safer.
11744         * modules/save-cwd (Depends-on): Likewise.
11745
11746         * modules/openat (Files): Add lib/openat-die.c.
11747         (Depends-on): Remove error, exitfail.
11748         Add dirname.
11749
11750         * modules/verify: New file.
11751         * MODULES.html.sh (Diagnostics <assert.h>): New section,
11752         with "verify" module.
11753
11754 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11755
11756         Sync from coreutils.
11757
11758         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
11759         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
11760         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
11761         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
11762         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
11763         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
11764         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
11765         Don't bother checking for string.h, stdlib.h, unistd.h.
11766         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
11767         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
11768         module's job.
11769         * m4/jm-macros.m4 (gl_MACROS): Likewise.
11770         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
11771
11772         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
11773         (gl_GETDATE): Use it.
11774
11775         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
11776
11777 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11778
11779         Sync from coreutils.
11780
11781         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
11782         stat-time.h.
11783         * lib/argmatch.h: Include verify.h
11784         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
11785         (ARGMATCH_ASSERT): Remove; unused.
11786         * lib/canonicalize.c: Assume STDC_HEADERS.
11787         * lib/exclude.c: Include "strcase.h".
11788         * lib/regex_internal.h [!defined _LIBC]: Likewise.
11789         * lib/getusershell.c: Include stdio--.h rather than stdio.h
11790         and stdio-safer.h.
11791         (getusershell): Call fopen, not fopen_safer.
11792         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
11793         Do not include unistd-safer.h.
11794         (save_cwd): Don't call fd_safer; no longer needed
11795         now that we include fcntl--.h.
11796
11797         * lib/getdate.y (relative_time): New type.
11798         (RELATIVE_TIME_0): New constant.
11799         (parser_control): Use relative_time instead of doing it ourselves.
11800         (%union): Add new relative_time rel member.
11801         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
11802         Now typeless.
11803         (relunit, relunit_snumber): Now of type rel.
11804         (zone, rel, relunit, get_date): Adjust to above changes.
11805
11806         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
11807         Do not include unistd-safer.h.
11808         (getloadavg): Don't call fd_safer; no longer needed
11809         now that we include fcntl--.h.
11810
11811         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
11812         (make_dir_parents): Treat ENOSYS like EEXIST.
11813
11814         Improve quality of diagnostics on restore_cwd failure.
11815         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
11816         (make_dir_parents): Last arg is now int * (for errno), not bool *.
11817         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
11818         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
11819         each time through the loop.  Do not diagnose restore_cwd failure;
11820         that is the caller's job (and perhaps the caller does not care).
11821
11822         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
11823         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
11824         If the file already exists but is not a directory, don't bother
11825         to try to make its parents.
11826         Close potential file descriptor leak if we can't chdir("/") (!).
11827         Don't always return true if chdir($PWD) fails; return true only
11828         if the requested action was done successfully (except for the
11829         chdir($PWD)).
11830         Don't log final directory unless we actually made it.
11831         Refactor to avoid duplicate code to fix up permissions.
11832         Don't attempt to fix up parent permissions if chdir($PWD) fails.
11833
11834         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
11835         to make it a bit faster and (I hope) clearer.
11836         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
11837         Fix bug in formats like %2N.
11838
11839         * lib/verify.h: New file.
11840
11841 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11842
11843         Sync from coreutils.
11844         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
11845
11846 2005-09-22  Jim Meyering  <jim@meyering.net>
11847
11848         Sync from coreutils.
11849
11850         * m4/lstat.m4 (gl_FUNC_LSTAT):
11851         Use AC_LIBSOURCES to require lstat.c and lstat.h.
11852         Remove obsolete comment.
11853         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
11854         * m4/xstrtod.m4: Likewise.
11855
11856         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
11857
11858 2005-09-22  Jim Meyering  <jim@meyering.net>
11859
11860         Sync from coreutils.
11861
11862         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
11863
11864         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
11865         the .tm_year member, since otherwise gcc-4.0 would now warn about
11866         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
11867
11868         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
11869         order to avoid an unsuppressible warning from gcc on 64-bit systems.
11870
11871         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
11872         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
11873         when run in a time zone for which daylight savings time is in effect
11874         for the starting date.
11875
11876         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
11877         stop us from restricting permissions of just-created absolute-named
11878         directories.
11879         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
11880         to restore initial working directory.
11881         * lib/mkdir-p.c (make_dir_parents): New parameter:
11882         different_working_dir, to tell caller if/when we change the working
11883         directory and are unable to return to the initial one.
11884         * lib/mkdir-p.h (make_dir_parents): Update prototype.
11885         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
11886         `return false'.  This fixes a bug introduced on 2004-07-30.
11887
11888         * lib/openat.c (fdopendir): Be sure to close the supplied
11889         file descriptor before returning.  This makes our replacement
11890         implementation a little closer to Solaris's, where fdopendir
11891         ties the file descriptor to the returned DIR* pointer.
11892         * lib/openat.c (unlinkat): New function.
11893         * lib/openat.h (unlinkat): Add prototype.
11894         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
11895         (openat_restore_fail): Rename from openat_restore_die.
11896         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
11897
11898         Provide an alternative to exiting immediately upon save_cwd or
11899         restore_cwd failure.  Now, an application can arrange e.g.,
11900         to perform a longjump in that case.
11901         * lib/openat.c: Include dirname.h.
11902         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
11903         (rpl_openat, fdopendir, fstatat): Call openat_save_die
11904         and openat_restore_die rather than calling error directly.
11905         Don't include "error.h" or "exitfail.h"; they're no longer needed.
11906
11907         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
11908         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
11909         define.
11910
11911         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
11912         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
11913                             int utc, int nanoseconds);
11914         Background:
11915         date should not have to allocate a megabyte of virtual memory to
11916         handle a format argument like +%1048575T.  When implemented with
11917         strftime, it must allocate such a buffer, use strftime to fill it
11918         in, print it, then free it.
11919         With fprintftime, it simply prints everything and exits.
11920         With no need for memory allocation, that's one fewer way to fail.
11921         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
11922         optional field width, not before, so we accept %9:z, not %:9z.
11923         (my_strftime): Be sure to use L_('x') for literals.
11924
11925         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
11926         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
11927         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
11928         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
11929         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
11930         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
11931         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
11932         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
11933         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
11934         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
11935         * lib/xgethostname.c, lib/xreadlink.c:
11936         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
11937
11938         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
11939         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
11940         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
11941         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
11942         and don't include <sys/file.h>).
11943
11944 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
11945
11946         Sync from coreutils.
11947
11948         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
11949         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
11950         [!LDAV_DONE]: Avoid unused variable warning.
11951
11952 2005-09-21  Bruno Haible  <bruno@clisp.org>
11953
11954         * lib/unicodeio.h (unicode_to_mb): New declaration.
11955
11956 2005-09-20  Derek Price  <derek@ximbiot.com>
11957
11958         * lib/getaddrinfo.c: Don't include <netdb.h> included from
11959         getaddrinfo.h.
11960
11961 2005-09-20  Bruno Haible  <bruno@clisp.org>
11962
11963         * gnulib-tool: Remove trailing slashes from the values specified for
11964         --source-base, --m4-base, --tests-base, --aux-dir.
11965         Suggested by Simon Josefsson <jas@extundo.com>.
11966
11967 2005-09-20  Bruno Haible  <bruno@clisp.org>
11968
11969         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
11970         func_modules_to_filelist, func_import, func_create_testdir): Make all
11971         sorting results locale-independent, so that gnulib-cache.m4 doesn't
11972         change when gnulib-tool is invoked in a different locale.
11973
11974 2005-09-19  Simon Josefsson  <jas@extundo.com>
11975
11976         * m4/socklen.m4: Fix typo.
11977
11978 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11979
11980         Use a consistent style for including <config.h>.
11981         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
11982         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
11983         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
11984         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
11985         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
11986         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
11987         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
11988         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
11989         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
11990         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
11991         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
11992         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
11993         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
11994         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
11995         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
11996         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
11997         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
11998         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
11999         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
12000         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
12001         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
12002         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
12003         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
12004         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
12005         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
12006         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
12007         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
12008         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
12009         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
12010         lib/xstrtoumax.c, lib/yesno.c:
12011         Standardize inclusion of config.h.
12012         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
12013         lib/inttostr.h:  Removed inclusion of config.h from header files.
12014         * lib/inttostr.c:  Adjusted in-tree users.
12015         * lib/timespec.h: Remove superfluous warning to include config.h.
12016         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
12017         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
12018         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
12019         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
12020         config.h with HAVE_CONFIG_H.
12021
12022 2005-09-19  Jim Meyering  <jim@meyering.net>
12023
12024         * modules/pathmax (License): Change to LGPL.
12025
12026 2005-09-19  Derek Price  <derek@ximbiot.com>
12027
12028         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
12029
12030 2005-09-19  Bruno Haible  <bruno@clisp.org>
12031
12032         * gnulib-tool (import): Provide default for --tests-base.
12033
12034 2005-09-19  Bruno Haible  <bruno@clisp.org>
12035
12036         * doc/quote.texi: New file, extracted from gnulib.texi.
12037         * doc/ctime.texi: New file, extracted from gnulib.texi.
12038         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
12039         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
12040         * doc/gnulib.texi: Include them.
12041
12042 2005-09-18  Bruno Haible  <bruno@clisp.org>
12043
12044         Portability fix.
12045         * gnulib-tool (func_readlink): New function.
12046         (func_ln_if_changed): Use it.
12047
12048 2005-09-18  Bruno Haible  <bruno@clisp.org>
12049
12050         * gnulib-tool: Support --with-tests also with --import.
12051         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
12052         (func_import): Use variables $testsbase and $inctests. Emit a
12053         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
12054         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
12055         SUBDIRS += $testsdir.
12056         (func_create_testdir): Update.
12057
12058 2005-09-18  Bruno Haible  <bruno@clisp.org>
12059
12060         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
12061         instead of $dry_run.
12062         (func_cp_if_changed, func_mv_if_changed): Remove functions.
12063         (func_ln_if_changed): Don't handle dry-run here.
12064         (func_import): In dry-run mode, detect more precisely which actions
12065         would be performed, and don't use "...ing" verbs.
12066
12067 2005-09-18  Bruno Haible  <bruno@clisp.org>
12068
12069         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
12070         (func_import): Use join on two temporary files instead of three nested
12071         loops, in order to determine which files are new or old.
12072
12073 2005-09-18  Bruno Haible  <bruno@clisp.org>
12074
12075         * gnulib-tool (func_import): Comment out code that spits out the
12076         new files with --dry-run.
12077
12078 2005-09-18  Bruno Haible  <bruno@clisp.org>
12079
12080         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
12081
12082 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
12083
12084         * lib/stat-time.h: New file.
12085         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
12086         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
12087         in a different way.
12088         (timespec_cmp): New function.
12089         * lib/utimecmp.c: Include stat-time.h.
12090         (SYSCALL_RESOLUTION): Depend on whether various struct stat
12091         members exist, not on the obsolescent ST_MTIM_NSEC.
12092         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
12093
12094 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
12095
12096         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
12097
12098 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
12099
12100         * MODULES.html.sh (File system functions): Add stat-time.
12101         * modules/stat-time: New file.
12102         * modules/timespec (Files): Remove m4/st_mtim.m4; this
12103         is now done in a different way, by the stat-time module.
12104         * modules/utimecmp (Depends-on): Add stat-time.
12105
12106 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
12107
12108         * m4/st_mtim.m4: Remove.  Superseded by...
12109         * m4/stat-time.m4: New file.
12110         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
12111         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
12112
12113 2005-09-15  Derek Price  <derek@ximbiot.com>
12114
12115         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
12116
12117 2005-09-15  Derek Price  <derek@ximbiot.com>
12118
12119         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
12120         * lib/regex_internal.c: Ditto, using this...
12121         (__GNUC_PREREQ): ...new macro.
12122         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
12123         using...
12124         (__GNUC_PREREQ): ...this new macro.
12125
12126         * lib/strstr.h: Include string.h. Define strstr as a macro here.
12127
12128 2005-09-15  Derek Price  <derek@ximbiot.com>
12129             Paul Eggert  <eggert@cs.ucla.edu>
12130
12131         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
12132         changes, consolidating in...
12133         * lib/regex_internal.h: ...this file.
12134
12135 2005-09-13  Jim Meyering  <jim@meyering.net>
12136
12137         * lib/canon-host.c: Filter through gnu indent and reword comments
12138         slightly.
12139         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
12140
12141 2005-09-13  Derek Price  <derek@ximbiot.com>
12142
12143         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
12144         failure.
12145         Reported by Jim Meyering  <jim@meyering.net>.
12146
12147 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
12148
12149         * lib/base64.c: Typo.
12150         (base64_encode): Put b64str in initialized data section.
12151
12152 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
12153
12154         Merge glibc and coreutils changes into gnulib, plus a few
12155         extra fixes.
12156         * lib/md5.c: Use #error rather than a string.
12157         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
12158         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
12159         (__attribute__): Define to empty for non recent-GCC.
12160         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
12161         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
12162         Renamed from their non-__ counterparts, with new macros replacing
12163         them if not _LIBC.  Add __THROW attribute.
12164         (rol): Remove.
12165         (struct md5_ctx): Align buffer if using GCC.
12166         * lib/sha1.h (struct sha1_ctx): Likewise.
12167         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
12168         The old name was backwards.
12169         (NOTSWAP): Remove; not used.
12170         (rol): New macro, moved here from md5.h.
12171         (sha1_process_block): Remove a FIXME that doesn't make sense.
12172
12173 2005-09-12  Derek Price  <derek@ximbiot.com>
12174
12175         Return usable errors from canon-host.
12176         * lib/canon-host.h: New file.
12177         * lib/canon-host.c (canon_host): Wrap...
12178         (canon_host_r): ...this new function, which now relies exclusively on
12179         getaddrinfo.
12180         (ch_strerror): New function.
12181         (last_cherror): New global.
12182         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
12183         interface.
12184         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
12185         void *.
12186         (freeaddrinfo): Free ai->ai_canonname when set.
12187
12188 2005-09-12  Derek Price  <derek@ximbiot.com>
12189
12190         Make canon-host require getaddrinfo.
12191         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
12192         AC_LIBSOURCE canon-host.h.  Call...
12193         (gl_PREREQ_CANON_HOST): ...this new function, which requires
12194         gl_GETADDRINFO.
12195         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
12196
12197 2005-09-12  Derek Price  <derek@ximbiot.com>
12198
12199         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
12200         LGPL.
12201         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
12202
12203 2005-09-12  Derek Price  <derek@ximbiot.com>
12204
12205         * lib/gai_strerror.c: Include config.h when available.  Include
12206         getaddrinfo.h before other headers to test interface.
12207         Reported by Larry Jones <lawrence.jones@ugs.com>.
12208
12209 2005-09-12  Derek Price  <derek@ximbiot.com>
12210             Paul Eggert  <eggert@cs.ucla.edu>
12211
12212         * modules/glob (Files): Add glob-libc.h.
12213
12214 2005-09-12  Derek Price  <derek@ximbiot.com>
12215             Paul Eggert  <eggert@cs.ucla.edu>
12216
12217         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
12218         glob_.h, glob-libc.h.
12219         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
12220
12221 2005-09-12  Derek Price  <derek@ximbiot.com>
12222             Paul Eggert  <eggert@cs.ucla.edu>
12223
12224         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
12225         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
12226         protecting things that should be done only in gnulib contexts.
12227         * lib/glob_.h: New file, containing only the glob things needed for
12228         gnulib.
12229         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
12230         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
12231         (glob, globfree, glob_pattern_p): Now defined simply in terms of
12232         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
12233         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
12234         and to respect the namespace rules better.
12235
12236 2005-09-08  Simon Josefsson  <jas@extundo.com>
12237
12238         * modules/socklen: New file.
12239
12240 2005-09-08  Simon Josefsson  <jas@extundo.com>
12241
12242         * m4/socklen.m4: New file.
12243
12244 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12245
12246         * modules/utimens (Files): Add m4/utimbuf.m4, since
12247         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
12248         Reported by Sergey Poznyakoff.
12249
12250 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12251
12252         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
12253         definitions, since that's the preferred style in glibc.
12254         Fix a minor spacing issue, and update copyright notice to match
12255         glibc's.
12256
12257 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12258
12259         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
12260
12261 2005-09-06  Simon Josefsson  <jas@extundo.com>
12262
12263         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
12264         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
12265
12266 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
12267
12268         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
12269         warning.
12270
12271 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
12272
12273         * config/srclist.txt: Add glibc bug 1302.
12274
12275 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
12276
12277         Change bitset word type from unsigned int to unsigned long int,
12278         as this has better performance on typical 64-bit hosts.
12279         Port bitset code to hosts with unusual word sizes.
12280         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
12281         (build_collating_symbol):
12282         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
12283         argument is a bitset.  This is merely a style issue, but it makes
12284         it clearer that an entire array is expected.
12285         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
12286         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
12287         Port to the case where bitset_word is not the same as unsigned int.
12288         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
12289         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
12290         Likewise.
12291         * lib/regexec.c (check_dst_limits_calc_pos_1,
12292         check_subexp_matching_top):
12293         (build_trtable, group_nodes_into_DFAstates):
12294         Likewise.
12295         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
12296         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
12297         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
12298         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
12299         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
12300         * lib/regcomp.c (optimize_subexps, lower_subexp):
12301         Work even if bitset_word has holes in its bitwise representation.
12302         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
12303         * lib/regexec.c (check_dst_limits_calc_pos_1,
12304         check_subexp_matching_top):
12305         Likewise.
12306         * lib/regex_internal.c (re_string_reconstruct):
12307         Don't assume UCHAR_MAX == 255.
12308         * lib/regex_internal.h (bitset_set_all): Likewise.
12309         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
12310         All uses changed.
12311         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
12312         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
12313         All uses changed.
12314         (BITSET_WORD_MAX): New macro.
12315         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
12316         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
12317         (bitset_empty, bitset_copy):
12318         Prefer sizeof (bitset) to multiplying it out ourselves.
12319         (bitset_not_merge): Remove; unused.
12320         (bitset_contain): Return bool, not unsigned int with one bit on.
12321         All callers changed.
12322         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
12323         alignment than re_node_set; do this by defining a new internal
12324         type struct dests_alloc and using it to allocate memory.
12325
12326 2005-09-05  Bruno Haible  <bruno@clisp.org>
12327
12328         * gnulib-tool (func_import): Fix comparison in handling of symbolic
12329         links.
12330
12331 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
12332
12333         * modules/size_max (Makefile.am): Add size_max.h
12334
12335 2005-09-04  Derek Price  <derek@ximbiot.com>
12336
12337         * gnulib-tool (func_import): Fix reversed $symbolic logic.
12338
12339 2005-09-03  Simon Josefsson  <jas@extundo.com>
12340
12341         * gnulib-tool: Fix typo.
12342
12343 2005-09-03  Simon Josefsson  <jas@extundo.com>
12344
12345         * config/srclist.txt: Add glibc bug 1293.
12346
12347 2005-09-03  Derek Price  <derek@ximbiot.com>
12348
12349         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
12350         From Larry Jones <lawrence.jones@ugs.com>.
12351
12352 2005-09-02  Simon Josefsson  <jas@extundo.com>
12353
12354         * modules/socklen: New file.
12355
12356 2005-09-02  Simon Josefsson  <jas@extundo.com>
12357
12358         * modules/havelib: New module.
12359
12360         * modules/gettext, modules/iconv, modules/lock, modules/readline:
12361         Use havelib.
12362
12363 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
12364
12365         Check for arithmetic overflow when calculating sizes, to prevent
12366         some buffer-overflow issues.  These patches are conservative, in the
12367         sense that when I couldn't determine whether an overflow was possible,
12368         I inserted a run-time check.
12369         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
12370         macros.
12371         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
12372         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
12373         (re_xnrealloc, re_x2nrealloc): New inline functions.
12374         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
12375         parse_bracket_exp):
12376         (build_equiv_class, build_charclass): Check for arithmetic overflow
12377         in size expression calculations.
12378         * lib/regex_internal.c (re_string_realloc_buffers):
12379         (build_wcs_upper_buffer, re_node_set_add_intersect):
12380         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
12381         (re_dfa_add_node, register_state): Likewise.
12382         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
12383         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
12384         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
12385         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
12386
12387 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
12388
12389         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
12390         m4/ulonglong.m4.  Problem reported by Martin Lambers.
12391
12392 2005-09-02  Bruno Haible  <bruno@clisp.org>
12393
12394         Support for lib vs. lib64 distinction on biarch platforms.
12395         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
12396         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
12397         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
12398
12399 2005-09-02  Bruno Haible  <bruno@clisp.org>
12400
12401         * gnulib-tool (import): In the other first-use case, provide defaults
12402         as well.
12403
12404 2005-09-02  Bruno Haible  <bruno@clisp.org>
12405
12406         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
12407         patches not yet found in the latest gettext release.
12408
12409 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
12410
12411         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
12412         to avoid a collision with bits/local_lim.h in glibc.
12413         All uses changed.  Problem reported by Dmitry V. Levin in
12414         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
12415
12416         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
12417         bugs in int versus size_t comparisons.
12418         (re_string_context_at): Fix bug where the code assumed that
12419         Idx is signed.
12420
12421         Use bool where appropriate.
12422         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
12423         All callers changed.
12424         (calc_eclosure_iter): Likewise, for ROOT arg.
12425         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
12426         (build_charclass_op): Likewise, for NON_MATCH arg.
12427         * lib/regex_internal.c (re_string_allocate, re_string_construct):
12428         (re_string_construct_common): Likewise, for ICASE arg.
12429         * lib/regexec.c (re_search_2_stub, re_search_stub):
12430         Likewise, for RET_LEN arg.
12431         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
12432         (set_regs): Likewise, for FL_BACKTRACK arg.
12433         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
12434         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
12435         (calc_eclosure_iter, parse_bracket_exp):
12436         Use bool for internal variables that are booleans.
12437         * lib/regexec.c (re_search_internal, check_matching,
12438         proceed_next_node):
12439         (set_regs, build_sifted_states, sift_states_bkref):
12440         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
12441         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
12442         (find_collation_sequence_value):
12443         Likewise.
12444         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
12445         (re_node_set_compare):
12446         Return bool, not int. All callers changed.
12447         * lib/regexec.c (check_halt_node_context, check_dst_limits):
12448         (build_trtable, check_node_accept): Likewise.
12449         * lib/regex_internal.h: Include stdbool.h.
12450
12451         Fix bugs uncovered when converting to bool.
12452         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
12453         failure instead of charging ahead blindly.
12454         * lib/regex_internal.c (register_state): Likewise.
12455         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
12456         for freeing internal storage.
12457         (group_nodes_into_DFA_states): Use unsigned int, not int, for
12458         bitset pieces used as boolean, to avoid undefined behavior
12459         on hosts that do int overflow checking.
12460
12461 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
12462
12463         * config/srclist.txt: Add glibc bugs 1285-1287.
12464
12465 2005-09-01  Jim Meyering  <jim@meyering.net>
12466
12467         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
12468         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
12469         Require gl_STAT_MACROS, too.
12470
12471 2005-09-01  Bruno Haible  <bruno@clisp.org>
12472
12473         * gnulib-tool (import): In the first-use case, provide defaults.
12474
12475 2005-09-01  Bruno Haible  <bruno@clisp.org>
12476
12477         * gnulib-tool (func_import): Remove the .tmp files.
12478
12479 2005-09-01  Bruno Haible  <bruno@clisp.org>
12480
12481         * gnulib-tool (func_import): Fix handling of symbolic links.
12482
12483 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12484
12485         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
12486         old glibc regex code mishandles strings longer than 2**31 bytes.
12487         This patch fixes this when the regex code is used in gnulib
12488         (i.e., outside glibc).
12489
12490         This patch should not affect the use of the regex code inside
12491         glibc.  No doubt this problem also needs to be handled for glibc
12492         as well, but the result will be an incompatible change to the
12493         glibc ABI, and the old ABI will have to be supported too.  That
12494         can be the the subject for another patch.
12495
12496         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
12497         governing whether the rest of this patch is active.  By default,
12498         the macro is disabled and the patch has no effect.
12499         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
12500         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
12501         (struct re_pattern_buffer, re_search, re_search_2, re_match):
12502         (re_match_2, re_set_registers): Use the new types.
12503         * lib/regex_internal.h (Idx, re_hashval_t): New types.
12504         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
12505         New macros.
12506         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
12507         (re_string_context_at, bin_tree_t, re_dfastate_t):
12508         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
12509         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
12510         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
12511         (re_string_char_size_at, re_string_wchar_at):
12512         (re_string_elem_size_at):
12513         Use the new types and macros to port to 64-bit hosts.
12514         Use unsigned types for internal values, so that the code
12515         mostly works even for arrays larger than SSIZE_MAX.
12516         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
12517         (search_duplicated_node, calc_eclosure_iter, fetch_number):
12518         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
12519         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
12520         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
12521         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
12522         (calc_inveclosure, parse_dup_op, build_range_exp):
12523         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
12524         (fetch_number, create_token_tree, mark_opt_subexp):
12525         Likewise.
12526         * lib/regex_internal.c (re_string_construct_common,
12527         create_ci_newstate):
12528         (create_cd_newstate, re_string_allocate, re_string_construct):
12529         (re_string_realloc_buffers, build_wcs_upper_buffer):
12530         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
12531         (re_string_reconstruct, re_string_peek_byte_case):
12532         (re_string_fetch_byte_case, re_string_context_at):
12533         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
12534         (re_node_set_init_copy, re_node_set_add_intersect):
12535         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
12536         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
12537         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
12538         (re_acquire_state, re_acquire_state_context, register_state):
12539         Likewise.
12540         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
12541         search_cur_bkref_entry):
12542         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
12543         (re_search_internal, re_search_2_stub, re_search_stub)
12544         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
12545         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
12546         (update_cur_sifted_state, check_dst_limits):
12547         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
12548         (check_subexp_limits, sift_states_bkref, merge_state_array):
12549         (check_subexp_matching_top, get_subexp, get_subexp_sub):
12550         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
12551         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
12552         (expand_bkref_cache, check_node_accept_bytes):
12553         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
12554         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
12555         (acquire_init_state_context, check_halt_node_context):
12556         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
12557         (sift_states_backward, clean_state_log_if_needed):
12558         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
12559         (find_recover_state, transit_state_sb, transit_state_mb):
12560         (transit_state_bkref, build_trtable, match_ctx_clean):
12561         Likewise.
12562         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
12563         to work around an assumption that REG_MISSING is negative.
12564
12565         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
12566         (seek_collating_symbol_entry) [defined _LIBC]:
12567         (lookup_collation_sequence_value) [defined _LIBC]:
12568         (build_range_exp, build_collating_symbol) [defined _LIBC]:
12569         Use prototypes rather than old-style function definitions.
12570         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
12571         (transit_state_sb) [0]:
12572         (find_collation_sequence_value) [defined _LIBC]: Likewise.
12573
12574         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
12575         rm_eo.
12576
12577         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
12578         (optimize_subexps, lower_subexp):
12579         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
12580         since the signed shift might overflow.  Use 1u<<31 instead.
12581         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
12582         Likewise.
12583         * lib/regexec.c (check_dst_limits_calc_pos_1,
12584         check_subexp_matching_top): Likewise.
12585
12586         * lib/regcomp.c (optimize_subexps, lower_subexp):
12587         Use CHAR_BIT rather than 8, for clarity.
12588         * lib/regexec.c (check_dst_limits_calc_pos_1):
12589         (check_subexp_matching_top): Likewise.
12590         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
12591         have to worry about portability issues when shifting it left.
12592         Remove no-longer-needed test for table_size > 0.
12593         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
12594         in a word, as the resulting behavior is undefined.
12595         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
12596         in one case, a <= should have been an <, and in another case the
12597         whole test was missing.
12598         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
12599         the standard name CHAR_BIT.
12600         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
12601         this is not true on one's complement and signed-magnitude hosts.
12602
12603         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
12604         next_last_offset.
12605         (struct re_dfa_t): Remove unused member states_alloc.
12606         * lib/regcomp.c (init_dfa): Don't initialize unused members.
12607
12608 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12609
12610         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
12611         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
12612         and large-file glibc and in 32-bit large-file Solaris.
12613
12614 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12615
12616         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
12617         lengths fit in regoff_t; this isn't true if regoff_t is the same
12618         width as size_t.
12619         * lib/regex.c (re_search_internal): 5th arg is LAST_START
12620         (= START + RANGE) instead of RANGE.  This avoids overflow
12621         problems when regoff_t is the same width as size_t.
12622         All callers changed.
12623         (re_search_2_stub): Check for overflow when adding the
12624         sizes of the two strings.
12625         (re_search_stub): Check for overflow when adding START
12626         to RANGE; if it occurs, substitute the extreme value.
12627
12628 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12629
12630         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
12631
12632 2005-08-31  Jim Meyering  <jim@meyering.net>
12633
12634         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
12635         a pointer-to-const.
12636         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
12637         (register_state): Likewise.
12638         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
12639         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
12640         (group_nodes_into_DFAstates): Likewise.
12641
12642 2005-08-31  Jim Meyering  <jim@meyering.net>
12643
12644         * check-module: Add a FIXME comment.
12645
12646 2005-08-31  Eric Blake  <ebb9@byu.net>
12647
12648         * modules/unistd-safer (Files): Add unistd--.h.
12649         * modules/stdio-safer (Files): Add stdio--.h.
12650
12651 2005-08-31  Derek Price  <derek@ximbiot.com>
12652
12653         * lib/getdelim.c (getdelim): Return EOF on EOF.
12654         Reported by Larry Jones <lawrence.jones@ugs.com>.
12655
12656 2005-08-31  Bruno Haible  <bruno@clisp.org>
12657
12658         Avoid unnecessary diffs in the generated lib/Makefile.am.
12659         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
12660         the generated files.
12661         (func_import): Don't set cmd.
12662
12663 2005-08-31  Bruno Haible  <bruno@clisp.org>
12664
12665         * lib/strstr.c: Include <stddef.h>, for NULL.
12666         * lib/strcasestr.c: Likewise.
12667         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
12668
12669 2005-08-31  Bruno Haible  <bruno@clisp.org>
12670
12671         * gnulib-tool: New option --macro-prefix.
12672         (func_import): Use macro_prefix.
12673         (import): Handle option --macro-prefix.
12674
12675 2005-08-31  Bruno Haible  <bruno@clisp.org>
12676
12677         * gnulib-tool (import): Rename most ac_* variables to cached_*.
12678         Also use new variables cached_lgpl, cached_libtool.
12679
12680 2005-08-31  Bruno Haible  <bruno@clisp.org>
12681
12682         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
12683         always instantiating them.
12684
12685 2005-08-31  Bruno Haible  <bruno@clisp.org>
12686
12687         * gnulib-tool (func_import): Read the previous cached settings
12688         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
12689         earlier added by gnulib but are now dropped. Warn when a gnulib file
12690         overwrites a non-gnulib file.
12691
12692 2005-08-31  Bruno Haible  <bruno@clisp.org>
12693
12694         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
12695         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
12696         projects that don't keep autogenerated files in CVS. Put into
12697         actioncmd only the specified modules, not the transitive closure.
12698
12699 2005-08-31  Bruno Haible  <bruno@clisp.org>
12700
12701         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
12702         Create directories that shall be filled.
12703         (import): Don't look for gl_* macros in configure.ac. Recurse across
12704         all directories containing a gnulib-cache.m4 files, if meaningful.
12705
12706 2005-08-31  Bruno Haible  <bruno@clisp.org>
12707
12708         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
12709         (import): Set seen_libtool when we see gl_LIBTOOL.
12710
12711 2005-08-31  Bruno Haible  <bruno@clisp.org>
12712
12713         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
12714         declaration macro definitions from generated gnulib.m4.
12715
12716 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
12717
12718         * lib/iconvme.h: Add prototype for iconv_alloc.
12719
12720 2005-08-29  Simon Josefsson  <jas@extundo.com>
12721
12722         * lib/iconvme.c: Fix errno.
12723
12724 2005-08-29  Bruno Haible  <bruno@clisp.org>
12725
12726         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
12727         that it works when the directory contains spaces.
12728
12729 2005-08-29  Bruno Haible  <bruno@clisp.org>
12730
12731         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
12732
12733 2005-08-29  Bruno Haible  <bruno@clisp.org>
12734
12735         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
12736         Emit more advice.
12737
12738 2005-08-29  Bruno Haible  <bruno@clisp.org>
12739         and Stepan Kasal  <kasal@ucw.cz>
12740
12741         * check-module: If more parameters are given, check each of them
12742         separately; add more exceptions, as noted by Jim Meyering.
12743         (check_module): New procedure.
12744         (%exempt_header): Now contains all exceptions.
12745
12746 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
12747
12748         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
12749
12750 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
12751
12752         * lib/iconvme.c: Split iconv_string into iconv_alloc.
12753
12754 2005-08-28  Bruno Haible  <bruno@clisp.org>
12755
12756         * m4/gnulib-tool.m4: New file.
12757
12758 2005-08-27  Jim Meyering  <jim@meyering.net>
12759
12760         * modules/unistd-safer (Files): Add pipe-safer.c.
12761         * modules/fcntl-safer (Files): Add creat-safer.c.
12762
12763 2005-08-27  Jim Meyering  <jim@meyering.net>
12764
12765         * m4/stdlib-safer.m4: New file.  From coreutils.
12766         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
12767         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
12768         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
12769         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
12770         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
12771
12772 2005-08-27  Jim Meyering  <jim@meyering.net>
12773
12774         * lib/fopen-safer.c: Merge minor changes from coreutils.
12775         * lib/dup-safer.c: Likewise.
12776         * lib/fd-safer.c: Likewise.
12777
12778         Merge from coreutils.
12779         * lib/stdio--.h: New file.
12780         * lib/stdlib--.h: New file.
12781         * lib/mkstemp-safer.c: New file.
12782
12783         GNU tar needs these.
12784         * lib/pipe-safer.c: New file.
12785         * lib/creat-safer.c: New file.
12786         * lib/fcntl--.h (creat): Define to creat_safer.
12787         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
12788         * lib/unistd--.h (pipe): Define to pipe_safer.
12789         * lib/unistd-safer.h: Declare pipe_safer.
12790
12791 2005-08-26  Simon Josefsson  <jas@extundo.com>
12792
12793         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
12794         Haible <bruno@clisp.org>.
12795
12796 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
12797
12798         * lib/regex_internal.h: Remove all references to
12799         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
12800         or better.
12801         (bitset_not, bitset_merge, bitset_not_merge):
12802         (bitset_mask, re_string_allocate, re_string_construct):
12803         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
12804         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
12805         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
12806         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
12807         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
12808         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
12809         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
12810         (re_acquire_state_context):
12811         Remove unnecessary forward decls.
12812         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
12813         Put __attribute at function definition,
12814         now that the function decl has been removed.
12815         * lib/regex_internal.c (re_string_peek_byte_case):
12816         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
12817         Likewise.
12818
12819 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
12820
12821         * m4/regex.m4: Add AC_PREREQ(2.50).
12822         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
12823
12824 2005-08-25  Simon Josefsson  <jas@extundo.com>
12825
12826         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
12827         __fsetlocking.
12828
12829 2005-08-25  Simon Josefsson  <jas@extundo.com>
12830
12831         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
12832         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
12833         GLIBC specific code.
12834
12835 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12836
12837         Make regex safe for g++.  This fixes one real bug (an "err"
12838         that should have been "*err").  g++ problem reported by
12839         Sam Steingold.
12840         * lib/regex_internal.h (re_calloc): New macro, consistent with
12841         re_malloc etc.  All callers of calloc changed to use re_calloc.
12842         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
12843         not int.  All callers changed.
12844         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
12845         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
12846         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
12847         (find_recover_state): Change "err" to "*err"; this fixes what
12848         appears to be a real bug.
12849         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
12850         versus int.
12851
12852 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12853
12854         * modules/regex (Depends-on): Add malloc, since the code
12855         assumes that !malloc(0) means failure.
12856
12857 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12858
12859         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
12860
12861         alloca modernization/simplification for regex.
12862         * lib/regex.c: Remove portability cruft for alloca.  This no longer
12863         needs to be at the start of the file, and can be moved into
12864         regex_internal.h and simplified.
12865         * lib/regex_internal.h: Include <alloca.h>.
12866         (__libc_use_alloca) [!defined _LIBC]: New macro.
12867         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
12868         now works outside glibc.
12869
12870 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12871
12872         * config/srclist.txt: Add glibc bugs 1241, 1245.
12873
12874 2005-08-25  Jim Meyering  <jim@meyering.net>
12875
12876         * lib/open-safer.c: Include <config.h>.
12877         Otherwise, we'd lose LARGEFILE support in any file using
12878         e.g. "fcntl--.h"
12879
12880 2005-08-25  Bruno Haible  <bruno@clisp.org>
12881
12882         * m4/minmax.m4: Require autoconf 2.52.
12883         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
12884         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
12885         alternatives of translit over the alphabet.
12886         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
12887
12888 2005-08-24  Simon Josefsson  <jas@extundo.com>
12889
12890         * tests/test-getpass.c: New file.
12891
12892 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12893
12894         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
12895         for GNU regex features.
12896
12897 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12898
12899         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
12900         * lib/regex.h (regerror): Likewise.
12901
12902         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
12903         requires this.  (The code never needed it.)
12904
12905         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
12906         All uses of recently-renamed identifiers changed to use the new,
12907         POSIX-compliant names.  The code will build and run just fine
12908         without these changes, but it's better to eat our own dog food
12909         and use the standard-conforming names.
12910
12911         * lib/regex.h: Fix a multitude of POSIX name space violations.
12912         These changes have an effect only for programs that define
12913         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
12914         do not change anything for programs compiled in the normal way.
12915         Also, there is no effect on the ABI.
12916
12917         (_REGEX_SOURCE): New macro.
12918         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
12919         defined and _GNU_SOURCE is not; this fixes a name space violation.
12920
12921         Rename the following macros to obey POSIX requirements.
12922         The old names are still visible as macros if _REGEX_SOURCE is defined.
12923         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
12924         RE_BACKSLASH_ESCAPE_IN_LISTS.
12925         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
12926         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
12927         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
12928         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
12929         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
12930         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
12931         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
12932         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
12933         (REG_INTERVALS): renamed from RE_INTERVALS.
12934         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
12935         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
12936         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
12937         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
12938         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
12939         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
12940         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
12941         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
12942         RE_UNMATCHED_RIGHT_PAREN_ORD.
12943         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
12944         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
12945         (REG_DEBUG): renamed from RE_DEBUG.
12946         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
12947         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
12948         unusual, since we can't clash with the POSIX REG_ICASE.
12949         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
12950         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
12951         (REG_NO_SUB): renamed from RE_NO_SUB.
12952         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
12953         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
12954         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
12955         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
12956         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
12957         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
12958         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
12959         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
12960         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
12961         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
12962         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
12963         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
12964         RE_SYNTAX_POSIX_MINIMAL_BASIC.
12965         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
12966         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
12967         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
12968         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
12969         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
12970         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
12971         (REG_FIXED): Renamed from REGS_FIXED.
12972         (REG_NREGS): Renamed from RE_NREGS.
12973
12974         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
12975         of other REG_* macros, since POSIX says the user is allowed to
12976         #undef these macros selectively.
12977
12978         (reg_errcode_t): Update comment stating what other tables need
12979         to be consistent.
12980
12981         Rename the following enum values to obey POSIX requirements.
12982         The old names are still visible as macros.
12983         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
12984         is not defined, since GNU is supposed to be a superset of POSIX as
12985         much as possible, and since we want reg_errcode_t to be a signed
12986         type for implementation consistency.
12987         (_REG_NOERROR): Renamed from REG_NOERROR.
12988         (_REG_NOMATCH): Renamed from REG_NOMATCH.
12989         (_REG_BADPAT): Renamed from REG_BADPAT.
12990         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
12991         (_REG_ECTYPE): Renamed from REG_ECTYPE.
12992         (_REG_EESCAPE): Renamed from REG_EESCAPE.
12993         (_REG_ESUBREG): Renamed from REG_ESUBREG.
12994         (_REG_EBRACK): Renamed from REG_EBRACK.
12995         (_REG_EPAREN): Renamed from REG_EPAREN.
12996         (_REG_EBRACE): Renamed from REG_EBRACE.
12997         (_REG_BADBR): Renamed from REG_BADBR.
12998         (_REG_ERANGE): Renamed from REG_ERANGE.
12999         (_REG_ESPACE): Renamed from REG_ESPACE.
13000         (_REG_BADRPT): Renamed from REG_BADRPT.
13001         (_REG_EEND): Renamed from REG_EEND.
13002         (_REG_ESIZE): Renamed from REG_ESIZE.
13003         (_REG_ERPAREN): Renamed from REG_ERPAREN.
13004         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
13005         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
13006         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
13007         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
13008
13009         (_REG_RE_NAME, _REG_RM_NAME): New macros.
13010         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
13011         changed.  But support the old name if the new one is not defined
13012         and if _REGEX_SOURCE.
13013
13014         Change the following member names in struct re_pattern_buffer.
13015         The old names are still supported if !_REGEX_SOURCE.
13016         The new names are always supported, regardless of _REGEX_SOURCE.
13017         (re_buffer): Renamed from buffer.
13018         (re_allocated): Renamed from allocated.
13019         (re_used): Renamed from used.
13020         (re_syntax): Renamed from syntax.
13021         (re_fastmap): Renamed from fastmap.
13022         (re_translate): Renamed from translate.
13023         (re_can_be_null): Renamed from can_be_null.
13024         (re_regs_allocated): Renamed from regs_allocated.
13025         (re_fastmap_accurate): Renamed from fastmap_accurate.
13026         (re_no_sub): Renamed from no_sub.
13027         (re_not_bol): Renamed from not_bol.
13028         (re_not_eol): Renamed from not_eol.
13029         (re_newline_anchor): Renamed from newline_anchor.
13030
13031         Change the following member names in struct re_registers.
13032         The old names are still supported if !_REGEX_SOURCE.
13033         The new names are always supported, regardless of _REGEX_SOURCE.
13034         (rm_num_regs): Renamed from num_regs.
13035         (rm_start): Renamed from start.
13036         (rm_end): Renamed from end.
13037
13038         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
13039         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
13040         Prepend __ to parameter names.
13041
13042         Undo yesterday's changes.
13043
13044 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
13045
13046         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
13047         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
13048         lib/regex.c.
13049
13050 2005-08-24  Jim Meyering  <jim@meyering.net>
13051
13052         Sync from coreutils.
13053         * m4/fcntl-safer.m4: New file.
13054
13055         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
13056         and object files for this module.
13057
13058 2005-08-24  Jim Meyering  <jim@meyering.net>
13059
13060         Sync from coreutils.
13061         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
13062
13063 2005-08-24  Jim Meyering  <jim@meyering.net>
13064
13065         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
13066         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
13067
13068 2005-08-24  Jim Meyering  <jim@meyering.net>
13069
13070         * modules/fcntl-safer: New module.
13071         * modules/fts (Depends-on): Add fcntl-safer.
13072         * MODULES.html.sh (File descriptor based Input/Output):
13073         Add fcntl-safer.
13074
13075 2005-08-24  Bruno Haible  <bruno@clisp.org>
13076
13077         Support for unit test modules.
13078         * modules/README: Mention tests modules.
13079         * modules/TEMPLATE-TESTS: New file.
13080         * gnulib-tool: New options --extract-tests-module, --with-tests and
13081         --tests-base (unused for the moment).
13082         (testsbase, inctests): New variables.
13083         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
13084         (func_verify_module): Exclude TEMPLATE-TESTS.
13085         (func_verify_nontests_module, func_verify_tests_module): New functions.
13086         (func_get_dependencies): Add implicit dependency for tests modules.
13087         (func_get_tests_module): New function.
13088         (func_modules_transitive_closure): When --with-tests was specified,
13089         include the unit tests as well, unless explicitly avoided.
13090         (func_emit_lib_Makefile_am): Ignore the tests modules here.
13091         (func_emit_tests_Makefile_am): New function.
13092         (func_create_testdir): When --with-tests was specified, emit a
13093         tests/ directory.
13094         * MODULES.html.sh (Future developments): Update.
13095
13096 2005-08-24  Bruno Haible  <bruno@clisp.org>
13097
13098         * modules/tls-tests: New file.
13099         * tests/test-tls.c: New file, from GNU gettext.
13100
13101 2005-08-24  Bruno Haible  <bruno@clisp.org>
13102
13103         * modules/lock-tests: New file.
13104         * tests/test-lock.c: New file, from GNU gettext.
13105
13106 2005-08-24  Bruno Haible  <bruno@clisp.org>
13107
13108         * lib/lock.h: Add multiple inclusion guard.
13109         * lib/tls.h: Add multiple inclusion guard.
13110
13111 2005-08-24  Bruno Haible  <bruno@clisp.org>
13112
13113         * gnulib-tool: Add support for the --aux-dir option to
13114         --create-testdir, --create-megatestdir, --test, --megatest.
13115         (func_create_testdir, func_create_megatestdir): Optionally emit a
13116         AC_CONFIG_AUX_DIR directive.
13117         (create-testdir, create-megatestdir, test, megatest): Provide a
13118         default value for $auxdir.
13119
13120 2005-08-24  Bruno Haible  <bruno@clisp.org>
13121
13122         * gnulib-tool (import): Use compound statement instead of subshell
13123         where possible.
13124
13125 2005-08-24  Bruno Haible  <bruno@clisp.org>
13126
13127         * gnulib-tool (import): Change --aux-dir default to "build-aux".
13128
13129 2005-08-24  Bruno Haible  <bruno@clisp.org>
13130
13131         * gnulib-tool (func_version): Update.
13132
13133 2005-08-24  Bruno Haible  <bruno@clisp.org>
13134
13135         * gnulib-tool (func_import, func_create_testdir,
13136         func_create_megatestdir): Quote all autoconf macro arguments.
13137
13138 2005-08-24  Bruno Haible  <bruno@clisp.org>
13139
13140         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
13141         option --force, because --force causes the aclocal.m4 of each
13142         subdirectory to be newer than the corresponding config.h.in.
13143
13144 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
13145
13146         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
13147         All contents moved to gl_REGEX.
13148         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
13149         assume that it does.
13150
13151 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
13152
13153         * lib/regex.h (REG_NOSYS)
13154         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
13155         Define, since POSIX requires it as of 2001.
13156         (_REG_ENOSYS)
13157         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
13158         New private symbol, used to keep the enum signed in all cases.
13159         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
13160         Youngman in
13161         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
13162
13163         * lib/regex_internal.c (re_string_skip_chars, register_state):
13164         (calc_state_hash):
13165         Remove forward decls; no longer needed now that we use prototypes.
13166         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
13167         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
13168         (clean_state_log_if_needed): Likewise.
13169
13170 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
13171
13172         * config/srclist.txt: Add glibc bugs 1231-1233.
13173
13174 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13175
13176         Fix problems reported by Sam Steingold in
13177         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
13178         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
13179         assumed that reg_errcode_t is a signed type, which is not
13180         necessarily true if _XOPEN_SOURCE is not defined.
13181         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
13182         since some compilers warn about it otherwise.
13183
13184 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13185
13186         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
13187         (init_word_char, create_initial_state, duplicate_node_closure):
13188         (fetch_token, peek_token_bracket, build_range_exp):
13189         (build_collating_symbol): Remove forward decls; no longer needed
13190         now that we use prototypes.
13191
13192         * lib/regcomp.c:
13193         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
13194         (re_compile_fastmap_iter, regcomp, regerror, regfree):
13195         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
13196         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
13197         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
13198         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
13199         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
13200         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
13201         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
13202         (build_range_exp, build_collating_symbol, parse_bracket_exp):
13203         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
13204         (build_charclass, build_charclass_op, fetch_number, create_tree):
13205         (create_token_tree, mark_opt_subexp, duplicate_tree):
13206         Use prototypes rather than old-style definitions.
13207
13208         * lib/regex_internal.c:
13209         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
13210         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
13211         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
13212         (re_string_reconstruct, re_string_peek_byte_case):
13213         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
13214         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
13215         (re_node_set_init_copy, re_node_set_add_intersect):
13216         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
13217         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
13218         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
13219         (re_acquire_state, re_acquire_state_context, register_state):
13220         (create_ci_newstate, create_cd_newstate, free_state):
13221         Likewise.
13222         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
13223         re_search_2):
13224         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
13225         (re_search_internal, prune_impossible_nodes):
13226         (acquire_init_state_context, check_matching, static):
13227         (check_halt_node_context, check_halt_state_context, proceed_next_node):
13228         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
13229         (update_regs, sift_states_backward, build_sifted_states):
13230         (clean_state_log_if_needed, merge_state_array):
13231         (update_cur_sifted_state, add_epsilon_src_nodes):
13232         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
13233         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
13234         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
13235         (find_recover_state, check_subexp_matching_top, transit_state_mb):
13236         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
13237         (check_arrival, check_arrival_add_next_nodes):
13238         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
13239         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
13240         (check_node_accept_bytes, check_node_accept, extend_buffers):
13241         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
13242         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
13243         (sift_ctx_init):
13244         Likewise.
13245
13246         * lib/regex_internal.h:
13247         (re_string_allocate, re_string_construct, re_string_reconstruct):
13248         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
13249         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
13250         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
13251         (re_string_context_at, re_string_peek_byte_case):
13252         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
13253         is defined, since we now use prototypes always.
13254
13255         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
13256         C89 or better.  All uses removed.
13257
13258 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13259
13260         * config/srclist.txt: Add glibc bugs 1220-1227.
13261
13262 2005-08-20  Jim Meyering  <jim@meyering.net>
13263
13264         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
13265         of unused local, dfa.
13266
13267 2005-08-20  Bruno Haible  <bruno@clisp.org>
13268
13269         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
13270
13271 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13272
13273         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
13274         (re_node_set_insert_last, re_dfa_add_node):
13275         Rename local variables to avoid GCC shadowing warnings.
13276
13277 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13278
13279         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
13280         [defined lint]: Suppress bogus uninitialized-variable warnings.
13281
13282         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
13283         and let the caller return REG_ESPACE if out of space.  This
13284         removes an uninitialied-variable warning with GCC 4.0.1, and also
13285         avoids taking the address of a local variable.  All callers
13286         changed.
13287
13288 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13289
13290         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
13291         $LIBCSRC/posix/regexec.c.
13292         Add glibc bug 1217 for regcomp.c.
13293
13294 2005-08-19  Jim Meyering  <jim@meyering.net>
13295
13296         * lib/regexec.c (proceed_next_node): Redo local variables to
13297         avoid GCC shadowing warnings.
13298
13299 2005-08-18  Bruno Haible  <bruno@clisp.org>
13300
13301         * lib/strstr.c (strstr): Fix return value in multibyte case.
13302         * lib/strcasestr.c (strcasestr): Likewise.
13303
13304 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
13305
13306         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
13307
13308 2005-08-17  Jim Meyering  <jim@meyering.net>
13309
13310         Make the %s format (seconds since the epoch) work for a negative
13311         number and when used with a zero-padded field width, e.g. %015s.
13312
13313         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
13314         label so that it precedes the code to set `digits'.  Otherwise,
13315         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
13316         print `00-22'.  Now, it prints `-0022', as it should.
13317
13318 2005-08-17  Bruno Haible  <bruno@clisp.org>
13319
13320         * modules/strstr (Files): Add m4/mbrtowc.m4.
13321         (Depends-on): Add mbuiter.
13322
13323 2005-08-17  Bruno Haible  <bruno@clisp.org>
13324
13325         * modules/strcasestr: New file.
13326         * MODULES.html.sh (String handling, based on ANSI C 89): Add
13327         strcasestr.
13328
13329 2005-08-17  Bruno Haible  <bruno@clisp.org>
13330
13331         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
13332
13333 2005-08-17  Bruno Haible  <bruno@clisp.org>
13334
13335         * modules/mbuiter: New file.
13336         * MODULES.html.sh (Extended multibyte and wide character utilities):
13337         Add mbuiter.
13338
13339 2005-08-17  Bruno Haible  <bruno@clisp.org>
13340
13341         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
13342         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
13343
13344 2005-08-17  Bruno Haible  <bruno@clisp.org>
13345
13346         * m4/strcasestr.m4: New file.
13347
13348 2005-08-17  Bruno Haible  <bruno@clisp.org>
13349
13350         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
13351         * lib/strstr.c: Completely rewritten, with multibyte locale support.
13352
13353 2005-08-17  Bruno Haible  <bruno@clisp.org>
13354
13355         * lib/strcasestr.h: New file.
13356         * lib/strcasestr.c: New file.
13357
13358 2005-08-17  Bruno Haible  <bruno@clisp.org>
13359
13360         * lib/strcasecmp.c: Use mbuiter.h.
13361
13362 2005-08-17  Bruno Haible  <bruno@clisp.org>
13363
13364         * lib/mbuiter.h: New file.
13365
13366 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
13367
13368         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
13369         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
13370         and gl_GETOPT are both invoked via different paths (as happens
13371         with GNU tar CVS because it uses both argp and getopt), the former
13372         wins.
13373
13374 2005-08-16  Bruno Haible  <bruno@clisp.org>
13375
13376         * modules/tls: New file.
13377         * MODULES.html.sh (Multithreading): Add tls.
13378
13379 2005-08-16  Bruno Haible  <bruno@clisp.org>
13380
13381         * modules/strnlen1: New file.
13382         * MODULES.html.sh (String handling): Add strnlen1.
13383
13384 2005-08-16  Bruno Haible  <bruno@clisp.org>
13385
13386         * modules/strcase (Files): Add m4/mbrtowc.m4.
13387         (Depends-on): Add strnlen1, mbchar.
13388
13389 2005-08-16  Bruno Haible  <bruno@clisp.org>
13390
13391         * modules/mbiter: New file.
13392         * MODULES.html.sh (Extended multibyte and wide character utilities):
13393         Add mbiter.
13394
13395 2005-08-16  Bruno Haible  <bruno@clisp.org>
13396
13397         * modules/mbfile: New file.
13398         * MODULES.html.sh (Extended multibyte and wide character utilities):
13399         Add mbfile.
13400
13401 2005-08-16  Bruno Haible  <bruno@clisp.org>
13402
13403         * modules/mbchar: New file.
13404         * MODULES.html.sh (Extended multibyte and wide character utilities):
13405         New section.
13406
13407 2005-08-16  Bruno Haible  <bruno@clisp.org>
13408
13409         * m4/tls.m4: New file, from GNU gettext.
13410
13411 2005-08-16  Bruno Haible  <bruno@clisp.org>
13412
13413         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
13414         always.
13415         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
13416
13417 2005-08-16  Bruno Haible  <bruno@clisp.org>
13418
13419         * m4/mbiter.m4: New file.
13420
13421 2005-08-16  Bruno Haible  <bruno@clisp.org>
13422
13423         * m4/mbfile.m4: New file.
13424
13425 2005-08-16  Bruno Haible  <bruno@clisp.org>
13426
13427         * m4/mbchar.m4: New file.
13428
13429 2005-08-16  Bruno Haible  <bruno@clisp.org>
13430
13431         * lib/tls.h: New file, from GNU gettext.
13432         * lib/tls.c: New file, from GNU gettext.
13433
13434 2005-08-16  Bruno Haible  <bruno@clisp.org>
13435
13436         * lib/strnlen1.h: New file.
13437         * lib/strnlen1.c: New file.
13438
13439 2005-08-16  Bruno Haible  <bruno@clisp.org>
13440
13441         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
13442         (mbi_init): Update.
13443         (mbi_avail, mbi_advance): Let the iteration end before the terminating
13444         NUL byte, not after it.
13445
13446 2005-08-16  Bruno Haible  <bruno@clisp.org>
13447
13448         * lib/strcase.h (strcasecmp): Add note in comments.
13449         * lib/strncasecmp.c: Use code from strcasecmp.c.
13450         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
13451         (strcasecmp): Work correctly in multibyte locales.
13452
13453 2005-08-16  Bruno Haible  <bruno@clisp.org>
13454
13455         * lib/mbiter.h: New file.
13456
13457 2005-08-16  Bruno Haible  <bruno@clisp.org>
13458
13459         * lib/mbfile.h: New file.
13460
13461 2005-08-16  Bruno Haible  <bruno@clisp.org>
13462
13463         * lib/mbchar.h: New file.
13464         * lib/mbchar.c: New file.
13465
13466 2005-08-16  Bruno Haible  <bruno@clisp.org>
13467
13468         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
13469         the valid ones. Makes the comparison operations transitive:
13470         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
13471         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
13472
13473 2005-08-15  Simon Josefsson  <jas@extundo.com>
13474
13475         * modules/ssize_t (License): Change to 'unlimited'.
13476
13477         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
13478
13479 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
13480
13481         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
13482         Add comments for each pending glibc patch.
13483
13484 2005-08-15  Bruno Haible  <bruno@clisp.org>
13485
13486         * lib/regex.h (__restrict_arr): Don't define to __restrict if
13487         __cplusplus is defined.
13488
13489 2005-08-14  Jim Meyering  <jim@meyering.net>
13490
13491         Sync from coreutils.
13492
13493         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
13494         Use the hash-table-based cycle-detection code not just when
13495         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
13496         Reported by James Youngman in
13497         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
13498         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
13499         FTS_TIGHT_CYCLE_CHECK.
13500         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
13501         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
13502         once again.
13503         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
13504         * lib/fts.c (fd_safer): Remove decl.
13505         Include fcntl--.h rather than unistd-safer.h
13506         (fts_safe_changedir): Don't call fd_safer; no longer needed
13507         now that we include fcntl--.h.
13508
13509 2005-08-12  Simon Josefsson  <jas@extundo.com>
13510
13511         * modules/getndelim2: Use ssize_t module.
13512         * modules/getnline: Likewise.
13513         * modules/safe-read: Likewise.
13514         * modules/xreadlink: Likewise.
13515
13516         * modules/ssize_t: New file.
13517
13518 2005-08-12  Simon Josefsson  <jas@extundo.com>
13519
13520         * m4/readline.m4: Look for termcap, curses or ncurses if required.
13521
13522 2005-08-12  Simon Josefsson  <jas@extundo.com>
13523
13524         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13525         ssize_t.
13526
13527 2005-08-12  Simon Josefsson  <jas@extundo.com>
13528
13529         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
13530         readline, getdelim and check_version.
13531         (Support for systems lacking ISO C 99: Sizes of integer types):
13532         Add size_max.
13533
13534 2005-08-12  Bruno Haible  <bruno@clisp.org>
13535
13536         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
13537
13538 2005-08-11  Simon Josefsson  <jas@extundo.com>
13539
13540         * modules/readline: New file.
13541
13542         * modules/strnlen (Files): Add strnlen.h.
13543
13544 2005-08-11  Simon Josefsson  <jas@extundo.com>
13545
13546         * m4/readline.m4: New file.
13547
13548 2005-08-11  Simon Josefsson  <jas@extundo.com>
13549
13550         * lib/readline.h, readline.c: New file.
13551
13552 2005-08-11  Simon Josefsson  <jas@extundo.com>
13553
13554         * doc/gnulib.texi (Initial import, Finishing touches): Mention
13555         gl_AVOID.
13556
13557 2005-08-11  Bruno Haible  <bruno@clisp.org>
13558
13559         * lib/strnlen.h (strnlen): Change parameter name to match comment.
13560
13561 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
13562
13563         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
13564
13565 2005-08-10  Simon Josefsson  <jas@extundo.com>
13566
13567         * tests/test-iconvme.c: New file.
13568
13569 2005-08-10  Simon Josefsson  <jas@extundo.com>
13570
13571         * m4/strnlen.m4: New file.
13572
13573         * m4/strndup.m4: Don't check for strnlen declaration, done in
13574         strnlen.m4.
13575
13576 2005-08-10  Simon Josefsson  <jas@extundo.com>
13577
13578         * lib/strndup.c: Use strnlen.h.
13579
13580         * lib/strnlen.h: New file.
13581
13582 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
13583
13584         * README: Typos.
13585
13586 2005-08-02  Simon Josefsson  <jas@extundo.com>
13587
13588         * modules/readline: New file.
13589
13590 2005-08-02  Simon Josefsson  <jas@extundo.com>
13591
13592         * modules/getdelim: New file.
13593
13594         * modules/getline: Rewrite, don't use getndelim2.
13595
13596 2005-08-02  Simon Josefsson  <jas@extundo.com>
13597
13598         * m4/getline.m4: Separate out getdelim stuff into separate module.
13599
13600         * m4/getdelim.m4: New file.
13601
13602 2005-08-02  Simon Josefsson  <jas@extundo.com>
13603
13604         * lib/getline.h, getline.c: Rewrite.
13605
13606         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
13607
13608 2005-07-31  Bruno Haible  <bruno@clisp.org>
13609
13610         * lib/lock.h (gl_lock_initializer): New macro.
13611         (gl_lock_define_initialized): Use it.
13612         (gl_rwlock_initializer): New macro.
13613         (gl_rwlock_define_initialized): Use it.
13614         (gl_recursive_lock_initializer): New macro.
13615         (gl_recursive_lock_define_initialized): Use it.
13616
13617 2005-07-30  Karl Berry  <karl@gnu.org>
13618
13619         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
13620         Report from Ben Pfaff, regarding getopt.
13621
13622 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
13623
13624         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
13625         normal way.
13626         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
13627         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
13628         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
13629         (gl_GETOPT): Use the new macros.  Most of the implementation
13630         is moved to the new macros.  This is for programs like Emacs
13631         that don't want all the functionality of gl_GETOPT.
13632
13633 2005-07-26  Bruno Haible  <bruno@clisp.org>
13634
13635         * m4/lock.m4: Update from GNU gettext.
13636
13637 2005-07-26  Bruno Haible  <bruno@clisp.org>
13638
13639         * lib/lock.h: Update from GNU gettext.
13640         * lib/lock.c: Update from GNU gettext.
13641
13642 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
13643
13644         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
13645         obsolescent AC_TRY_RUN.  Include the default includes files, for
13646         'exit'.
13647
13648 2005-07-24  Bruno Haible  <bruno@clisp.org>
13649
13650         * modules/visibility: New file.
13651         * MODULES.html.sh (Misc): Add visibility.
13652
13653 2005-07-24  Bruno Haible  <bruno@clisp.org>
13654
13655         * m4/visibility.m4: New file.
13656
13657 2005-07-24  Bruno Haible  <bruno@clisp.org>
13658
13659         * doc/visibility.texi: New file.
13660
13661 2005-07-22  Bruno Haible  <bruno@clisp.org>
13662
13663         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
13664         $(ALLOCA_H), redundant through BUILT_SOURCES.
13665         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
13666         redundant through BUILT_SOURCES.
13667         * modules/byteswap (Makefile.am): Remove explicit dependency on
13668         $(BYTESWAP_H), redundant through BUILT_SOURCES.
13669         * modules/fnmatch (Makefile.am): Remove explicit dependency on
13670         $(FNMATCH_H), redundant through BUILT_SOURCES.
13671         * modules/getopt (Makefile.am): Remove explicit dependency on
13672         $(GETOPT_H), redundant through BUILT_SOURCES.
13673         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
13674         redundant through BUILT_SOURCES.
13675         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
13676         redundant through BUILT_SOURCES.
13677         * modules/stdbool (Makefile.am): Remove explicit dependency on
13678         $(STDBOOL_H), redundant through BUILT_SOURCES.
13679         * modules/stdint (Makefile.am): Remove explicit dependency on
13680         $(STDINT_H), redundant through BUILT_SOURCES.
13681         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
13682         Remove explicit dependency on $(SYSEXITS_H).
13683         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
13684
13685 2005-07-18  Simon Josefsson  <jas@extundo.com>
13686
13687         * lib/check-version.c (check_version): Accept identical versions too.
13688
13689 2005-07-18  Bruno Haible  <bruno@clisp.org>
13690
13691         * modules/lock: New file.
13692         * MODULES.html.sh (Multithreading): New section.
13693
13694 2005-07-18  Bruno Haible  <bruno@clisp.org>
13695
13696         * m4/lock.m4: New file, from GNU gettext.
13697
13698 2005-07-18  Bruno Haible  <bruno@clisp.org>
13699
13700         * lib/lock.h: New file, from GNU gettext.
13701         * lib/lock.c: New file, from GNU gettext.
13702
13703 2005-07-18  Bruno Haible  <bruno@clisp.org>
13704
13705         * lib/lock.h (gl_once_t): New type.
13706         (gl_once_define, gl_once): New macros.
13707         * lib/lock.c (fresh_once): New variable.
13708         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
13709         functions.
13710
13711 2005-07-16  Simon Josefsson  <jas@extundo.com>
13712
13713         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
13714         workaround, suggested by Bruno.
13715
13716 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
13717
13718         * modules/xalloc (Depends-on): Add xalloc-die.
13719         * modules/xvasprintf (Depends-on): Add xalloc-die.
13720
13721 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
13722
13723         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
13724         with a minor change.
13725
13726 2005-07-15  Bruno Haible  <bruno@clisp.org>
13727
13728         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
13729         When using lib/poll.c, define poll as rpl_poll.
13730
13731 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
13732
13733         * modules/argp (Depends-on): Remove unlocked-io.
13734
13735 2005-07-14  Derek Price  <derek@ximbiot.com>
13736
13737         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
13738         for glob symlink bug.
13739
13740 2005-07-14  Bruno Haible  <bruno@clisp.org>
13741
13742         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
13743         Instead, test for *_unlocked function declarations directly.
13744
13745 2005-07-11  Simon Josefsson  <jas@extundo.com>
13746
13747         * modules/size_max: New file.
13748
13749         * modules/xsize: Depend on size_max module for size_max.m4.
13750
13751 2005-07-11  Simon Josefsson  <jas@extundo.com>
13752
13753         * lib/size_max.h: New file.
13754
13755 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
13756
13757         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
13758         copyright symbol and the year.
13759         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
13760         (version_etc_va): Use parameterized copyright notice.
13761         Reword to conform to the current GNU coding standards.
13762
13763 2005-07-11  Karl Berry  <karl@gnu.org>
13764
13765         * doc/gnulib.texi (Quoting): new node.
13766         (Initial import): more info, from Patrice.
13767
13768 2005-07-11  Bruno Haible  <bruno@clisp.org>
13769
13770         * gnulib-tool (func_usage): Document option --avoid.
13771         (Command line options): Handle --avoid.
13772         (func_acceptable): New function.
13773         (func_modules_transitive_closure): Use it.
13774
13775 2005-07-11  Bruno Haible  <bruno@clisp.org>
13776
13777         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
13778         Reported by Jim Meyering.
13779
13780 2005-07-10  Bruno Haible  <bruno@clisp.org>
13781
13782         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
13783         Needed when size_t is smaller than 'unsigned int'.
13784         Reported by Paul Eggert.
13785
13786 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13787
13788         * modules/argp (Depends-on): Add unlocked-io
13789
13790 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13791
13792         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
13793         block of defines.
13794
13795 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
13796
13797         * config/srclist.txt: Comment out regcomp.c, since we have a porting
13798         fix now.
13799
13800 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
13801         and Paul Eggert  <eggert@cs.ucla.edu>
13802
13803         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
13804         in wint_t, not wchar_t.  Remove now-unnecessary cast.
13805
13806 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13807
13808         * modules/regex (Files): Add lib/regex_internal.c,
13809         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
13810         (Depends-on): Add extensions.
13811         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
13812
13813 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13814
13815         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
13816         pathconf.
13817         * m4/same.m4 (gl_SAME): Likewise.
13818         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
13819
13820         * m4/regex.m4: Adjust to new libc regex implementation.
13821         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
13822         all the .c and .h parts of (the new) regex.
13823         Quote the m4 stuff better.
13824         Check for RE_ICASE bug of old gnulib.
13825         Check for REG_STARTEND of recent libc.
13826         Rename local variables from jm_* to gl_*.
13827         Quote operand of "test -f".
13828         Say "recent enough" version of libc, not "version 2".
13829         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
13830         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
13831         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
13832         Remove check for btowc, isascii.
13833         Require AM_LANGINFO_CODESET.
13834
13835 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13836
13837         * lib/regex.c, regex.h: Sync from libc.
13838         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
13839         * lib/regexec.c:
13840         New files, synced from libc, except that regex_internal.h
13841         currently has a small porting fix.
13842
13843 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13844
13845         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
13846         regex_internal.c, regexec.c.
13847         Add regex_internal.h too, but as a comment, since the libc version
13848         is currently broken in gnulib mode.
13849
13850 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
13851
13852         Support programs like Emacs that use gnulib but not gettext.
13853         * MODULES.html.sh (Internationalization functions): Add gettext-h.
13854         * modules/gettext-h: New file.
13855         * modules/gettext (Files): Remove lib/gettext.h.
13856         (Depends-on): Add gettext-h.
13857         (Makefile.am): Remove lib_SOURCES.
13858         * modules/argmatch, modules/c-stack, modules/closeout:
13859         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
13860         * modules/execute, modules/file-type, modules/getaddrinfo:
13861         * modules/getopt, modules/human, modules/javacomp:
13862         * modules/javaexec, modules/mkdir-p, modules/obstack:
13863         * modules/openat, modules/pagealign_alloc, modules/pipe:
13864         * modules/quotearg, modules/regex, modules/rpmatch:
13865         * modules/unicodeio, modules/userspec, modules/version-etc:
13866         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
13867         * modules/xsetenv:
13868         Depend on gettext-h, not gettext.
13869
13870 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
13871
13872         * gnulib-tool (func_import): Add support for 'public domain' license.
13873         * modules/alloca, modules/atexit, modules/memmove:
13874         Now public domain, not GPL.
13875         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
13876         * modules/realloc, modules/strerror, modules/strtod:
13877         Now LGPL, not GPL.
13878
13879 2005-07-05  Bruno Haible  <bruno@clisp.org>
13880
13881         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
13882         autoconf CVS. Needed for mingw.
13883
13884 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13885
13886         Remove the dependency of the strftime module on the tzset module.
13887         * modules/strftime (Depends-on): Remove dependency on tzset.
13888
13889 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13890
13891         Remove the dependency of the strftime module on the tzset module.
13892         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
13893         gl_FUNC_TZSET_CLOBBER.
13894
13895 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13896
13897         Remove the dependency of the strftime module on the tzset module.
13898         * lib/strftime.c (my_strftime)
13899         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
13900         Copy the input structure, to work around some of the bug with
13901         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
13902         Solaris releases, you should also use the tzset module, but we won't
13903         require it as a dependency any more since we don't want LGPLed code
13904         to depend on GPLed code.
13905
13906 2005-07-02  Jim Meyering  <jim@meyering.net>
13907
13908         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
13909         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
13910         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
13911         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
13912
13913 2005-07-02  Jim Meyering  <jim@meyering.net>
13914
13915         * lib/backupfile.c (backup_args): Change a `0' to NULL.
13916
13917 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13918
13919         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
13920         declares only 'struct timespec;' (!).
13921
13922 2005-07-01  Jim Meyering  <jim@meyering.net>
13923
13924         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
13925         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
13926         * lib/save-cwd.c, tempname.c:
13927         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
13928         and don't include <sys/file.h>).
13929
13930 2005-06-29  Jim Meyering  <jim@meyering.net>
13931
13932         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
13933         type name.  Use the variable name instead.
13934         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
13935         Likewise.
13936
13937 2005-06-28  Simon Josefsson  <jas@extundo.com>
13938
13939         * modules/check-version (Files): Add check-version.m4.
13940
13941 2005-06-28  Simon Josefsson  <jas@extundo.com>
13942
13943         * m4/check-version.m4: New file, suggested by Jim Meyering
13944         <jim@meyering.net>.
13945
13946 2005-06-28  Simon Josefsson  <jas@extundo.com>
13947
13948         * lib/check-version.h, lib/check-version.c: New files.
13949
13950 2005-06-28  Simon Josefsson  <jas@extundo.com>
13951
13952         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
13953         collision with global variable.  Better indentation.  Don't
13954         increment buffer pointer beyond buffer end.  Based on comments
13955         from Paul Eggert <eggert@cs.ucla.edu>.
13956
13957         * lib/base64.h: Indent.
13958
13959 2005-06-28  Simon Josefsson  <jas@extundo.com>
13960
13961         * doc/gnulib.texi (Library version handling): New section.
13962
13963 2005-06-28  Jim Meyering  <jim@meyering.net>
13964
13965         * check-module (find_included_lib_files): Hard-code another
13966         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
13967         but modules/fts-lgpl (correctly) does not list those files.
13968
13969         * modules/canonicalize (Files): Add lib/pathmax.h.
13970
13971 2005-06-25  Simon Josefsson  <jas@extundo.com>
13972
13973         * modules/check-version: New file.
13974
13975 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
13976
13977         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
13978         initializer of struct addrinfo, as an indication that we don't
13979         care how many members the structure has.
13980
13981 2005-06-24  Derek Price  <derek@ximbiot.com>
13982         and Bruno Haible  <bruno@clisp.org>
13983
13984         Remove stat module & update lstat.
13985         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
13986         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
13987         * m4/stat.m4: Remove this file.
13988
13989 2005-06-24  Derek Price  <derek@ximbiot.com>
13990         and Bruno Haible  <bruno@clisp.org>
13991
13992         Remove stat module & update lstat.
13993         * lib/stat.c: Remove this file...
13994         (slash_aware_lstat): ...moving this content and its support...
13995         * lib/lstat.c (rpl_lstat): ...into here.
13996         * lib/lstat.h: New file.
13997
13998 2005-06-24  Derek Price  <derek@ximbiot.com>
13999         and Bruno Haible  <bruno@clisp.org>
14000
14001         Remove stat module & update lstat.
14002         * config/srclist.txt (libc sources): Remove stat.
14003
14004 2005-06-24  Derek Price  <derek@ximbiot.com>
14005         and Bruno Haible  <bruno@clisp.org>
14006
14007         Remove stat module & update lstat.
14008         * MODULES.html.sh (stat): Remove.
14009         * MODULES.html: Regenerated.
14010         * modules/lstat (Description): Correct function name.
14011         (Files): Add "lstat.h".
14012         (Depends-on): Remove stat, add xalloc, stat-macros.
14013         * modules/stat: Remove this file.
14014         (Include): Add "lstat.h", remove <sys/stat.h>.
14015
14016 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
14017
14018         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
14019         (ranged_convert): Don't save conversion in a temporary struct.
14020         This causes a warning with GCC 4.0.0, and anyway in the typical
14021         case it's not worth the extra 100 bytes or so of code.
14022         (ranged_convert, __mktime_internal): When calling a function via a
14023         pointer P, use P () rather than (*P) (), as we now assume C89 or
14024         better.
14025
14026 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14027
14028         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
14029         "who -r" failed to give output.  Problem reported by Tim Waugh.
14030
14031         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
14032         (xcalloc): Use it to avoid needless tests.
14033         Problem reported by Jim Meyering.
14034
14035 2005-06-20  Derek Price  <derek@ximbiot.com>
14036
14037         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
14038         unnecessary for Autoconfs > 2.59c.
14039
14040 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14041
14042         * lib/argp.h (__option_is_short): Check upper limit of
14043         __key. Isprint() requires its argument to have the value
14044         of an unsigned char or EOF.
14045
14046 2005-06-16  Jim Meyering  <jim@meyering.net>
14047
14048         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
14049         when either N or S is zero.
14050
14051 2005-06-16  Derek Price  <derek@ximbiot.com>
14052
14053         * m4/bison.m4: Declare YACC & YFLAGS precious.
14054
14055 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
14056
14057         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
14058         multibyte string or pattern, fall back on unibyte matching.
14059         Problem reported by James Youngman.
14060
14061 2005-06-08  Bruno Haible  <bruno@clisp.org>
14062
14063         * modules/csharpcomp: New file.
14064         * MODULES.html.sh (C#): Add csharpcomp.
14065
14066 2005-06-08  Bruno Haible  <bruno@clisp.org>
14067
14068         * m4/csharpcomp.m4: New file, from GNU gettext.
14069
14070 2005-06-08  Bruno Haible  <bruno@clisp.org>
14071
14072         * lib/csharpcomp.h: New file, from GNU gettext.
14073         * lib/csharpcomp.c: New file, from GNU gettext.
14074         * lib/csharpcomp.sh.in: New file, from GNU gettext.
14075
14076 2005-06-08  Bruno Haible  <bruno@clisp.org>
14077
14078         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
14079         warning on mingw.
14080
14081 2005-06-07  Derek Price  <derek@ximbiot.com>
14082
14083         Sync from CVS.
14084         * lib/glob_.h: Indent nested #ifdef.
14085
14086 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
14087
14088         Sync from coreutils.
14089         Use "file name" when talking about file names, instead of "filename"
14090         or "path", as per the GNU coding standards.
14091         * lib/mkdir-p.c: Renamed from makepath.c.
14092         (make_dir_parents): Renamed from make_path.  All callers changed.
14093         * lib/mkdir-p.h: Likewise.  All includers changed.
14094         * lib/filenamecat.c: Renamed from path-concat.c.
14095         (file_name_concat): Renamed from path_concat.  All callers changed.
14096         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
14097         * lib/filenamecat.h: Likewise.  All includers changed.
14098         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
14099         in comments or local variable names.
14100         * lib/basename.c: Likewise.
14101         * lib/canonicalize.c, canonicalize.h: Likewise.
14102         * lib/dirname.c, dirname.h: Likewise.
14103         * lib/euidaccess.c: Likewise.
14104         * lib/exclude.c: Likewise
14105         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
14106         * lib/fsusage.c, fsuage.h: Likewise.
14107         * lib/fts.c, fts_.h: Likewise.
14108         * lib/getcwd.c: Likewise.
14109         * lib/getloadavg.c: Likewise.
14110         * lib/mkstemp.c: Likewise.
14111         * lib/mountlist.c, mountlist.h: Likewise.
14112         * lib/openat.c, openat.h: Likewise.
14113         * lib/readlink-stub.c: Likewise.
14114         * lib/readutmp.c, readutmp.h: Likewise.
14115         * lib/rename.c: Likewise.
14116         * lib/rmdir.c: Likewise.
14117         * lib/same.c: Likewise.
14118         * lib/savedir.c: Likewise.
14119         * lib/stripslash.c: Likewise.
14120         * lib/tempname.c: Likewise.
14121         * lib/xreadlink.c: Likewise.
14122         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
14123         All uses changed.
14124         * lib/exclude.h: Likewise.
14125
14126         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
14127         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
14128         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
14129         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
14130         * lib/pathmax.h: Include <limits.h> unconditionally, since other
14131         files have been getting away with it for years (MORE/BSD 4.3
14132         is extinct now).
14133         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
14134         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
14135
14136         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
14137         Define to 256, not 255, as per modern POSIX.
14138
14139 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
14140
14141         Sync from coreutils.
14142         Use "file name" when talking about file names, instead of "filename"
14143         or "path", as per the GNU coding standards.
14144         * MODULES.html.sh: mkdir-p renamed from makepath.
14145         filenamecat renamed from path-concat.
14146         * modules/filenamecat: Renamed from modules/path-concat.
14147         (Files): filenamecat.h and filenamecat.c renamed from
14148         path-concat.h and path-concat.c.
14149         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
14150         (Include): filenamecat.h, not path-concat.h.
14151         * modules/mkdir-p: Renamed from modules/makepath.
14152         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
14153         makepath.c.
14154         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
14155         (Include): mkdir-p.h, not makepath.h.
14156
14157 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
14158
14159         Sync from coreutils.
14160         * m4/mkdir-p.m4: Renamed from makepath.m4.
14161         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
14162         Rename files from makepath.c to mkdir-p.c, and from
14163         makepath.h to mkdir-p.h.
14164         * m4/filenamecat.m4: Renamed from path-concat.m4.
14165         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
14166         Rename files from path-concat.c to filenamecat.c,
14167         and from path-concat.h to filenamecat.h.
14168         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
14169         "file name" in local variables or comments.
14170         * m4/rename.m4: Likewise.
14171
14172 2005-06-01  Bruno Haible  <bruno@clisp.org>
14173
14174         * modules/csharpexec: New file.
14175         * MODULES.html.sh (C#): New section.
14176
14177 2005-06-01  Bruno Haible  <bruno@clisp.org>
14178
14179         * m4/csharp.m4: New file, from GNU gettext.
14180         * m4/csharpexec.m4: New file, from GNU gettext.
14181
14182 2005-06-01  Bruno Haible  <bruno@clisp.org>
14183
14184         * lib/csharpexec.h: New file, from GNU gettext.
14185         * lib/csharpexec.c: New file, from GNU gettext.
14186         * lib/csharpexec.sh.in: New file, from GNU gettext.
14187
14188 2005-05-31  Derek Price  <derek@ximbiot.com>
14189             Paul Eggert  <eggert@cs.ucla.edu>
14190
14191         Sync from cvs.
14192         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
14193
14194 2005-05-31  Derek Price  <derek@ximbiot.com>
14195             Paul Eggert  <eggert@cs.ucla.edu>
14196
14197         Sync from cvs.
14198         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
14199
14200 2005-05-29  Derek Price  <derek@ximbiot.com>
14201
14202         * config/srclist.txt (glob_.h, glob.c): Add these files.
14203
14204 2005-05-29  Derek Price  <derek@ximbiot.com>
14205
14206         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
14207         * modules/glob: New file.
14208         * modules/getlogin_r: Add link to POSIX spec in description.
14209
14210 2005-05-29  Derek Price  <derek@ximbiot.com>
14211             Paul Eggert  <eggert@cs.ucla.edu>
14212
14213         * m4/glob.m4: New file.
14214
14215 2005-05-29  Derek Price  <derek@ximbiot.com>
14216             Paul Eggert  <eggert@cs.ucla.edu>
14217
14218         * lib/glob_.h, lib/glob.c: New files.
14219
14220 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14221
14222         * modules/fts (Files): Remove m4/inttypes-pri.m4.
14223         * modules/fts-lgpl (Depends-on): Remove gettext.
14224
14225 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14226
14227         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
14228         and don't require gt_INTTYPES_PRI.
14229
14230 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14231
14232         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
14233
14234         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
14235         the configuration hassle isn't worth it.
14236         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
14237         (LONGEST_MODIFIER, PRIuMAX): Remove.
14238
14239 2005-05-27  Bruno Haible  <bruno@clisp.org>
14240
14241         * lib/getlogin_r.h: Remove second include of <stddef.h>.
14242
14243 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
14244
14245         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
14246         _POSIX_PTHREAD_SEMANTICS for Solaris.
14247
14248 2005-05-25  Derek Price  <derek@ximbiot.com>
14249
14250         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
14251
14252 2005-05-25  Derek Price  <derek@ximbiot.com>
14253             Paul Eggert  <eggert@cs.ucla.edu>
14254
14255         * modules/getlogin_r, m4/getlogin_r.m4: New files.
14256         * lib/getlogin_r.c, getlogin_r.h: New files.
14257
14258 2005-05-25  Bruno Haible  <bruno@clisp.org>
14259             Derek Price  <derek@ximbiot.com>
14260
14261         * lib/getlogin_r.h: Simplify API documentation.
14262
14263 2005-05-23  Derek Price  <derek@ximbiot.com>
14264
14265         * modules/minmax (Files): Add m4/minmax.m4.
14266         (configure.ac): Add gl_MINMAX.
14267
14268 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
14269
14270         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
14271         so that unistd-safer.h (GPL'ed code) need not be included.
14272
14273 2005-05-22  Bruno Haible  <bruno@clisp.org>
14274
14275         * m4/minmax.m4: New file.
14276         Based on a patch by Derek Price <derek@ximbiot.com>.
14277
14278 2005-05-22  Bruno Haible  <bruno@clisp.org>
14279
14280         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
14281         (INT64_MIN): Fix definition.
14282         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
14283
14284         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
14285         NEED_SIGNED_INT_TYPES.
14286
14287         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
14288         HAVE_SYSTEM_INTTYPES.
14289
14290 2005-05-22  Bruno Haible  <bruno@clisp.org>
14291
14292         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
14293         Also include <sys/param.h> if it defines MIN, MAX.
14294         Based on a patch by Derek Price <derek@ximbiot.com>.
14295
14296 2005-05-21  Jim Meyering  <jim@meyering.net>
14297
14298         * modules/fts (Files): Add m4/inttypes-pri.m4.
14299         (Depends-on): Add lstat and remove gettext.  Alphabetize.
14300
14301 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14302
14303         New fts module.
14304         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
14305         (setup_dir, free_dir): New functions.
14306         (enter_dir, leave_dir): Define trivial
14307         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
14308         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
14309         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
14310         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
14311         Move to fts-cycle.c.
14312         (fts_open): Use setup_dir.
14313         (fts_close): Use free_dir.
14314         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
14315         This adds a label and some gotos, but the alternatives were messier.
14316         Check for memory allocation failure when entering a dir.
14317         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
14318         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
14319         (FTS): New member fts_cycle, that is a union that contains the
14320         old active_dir_ht and cycle_state.  All uses changed to mention
14321         fts_cycle.ht and fts_cycle.state.
14322         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
14323         fts.c, with the following changes:
14324         (setup_dir, free_dir): New functions.
14325         (enter_dir): Now returns bool.  Return true if successful, false
14326         if memory exhausted.  All callers changed.
14327         Do not bother partly cleaning up on
14328         memory allocation failure; that is free_dir's job.
14329         However, free ad if hash_insert fails, to avoid memory leak.
14330         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
14331         fts->fts_options to see which union member to use.
14332
14333 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14334
14335         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
14336         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
14337
14338 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14339
14340         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
14341
14342 2005-05-20  Jim Meyering  <jim@meyering.net>
14343
14344         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
14345         Now a macro, to pacify GCC.
14346
14347 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
14348
14349         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
14350         of -1.
14351
14352 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
14353
14354         * lib/chown.c (rpl_chown): Return -1 on failure.
14355
14356 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
14357
14358         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
14359         Don't check for stddef.h.
14360         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
14361         don't use its results.
14362         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
14363         since we include them unconditionally.  Don't require
14364         AM_STDBOOL_H, since stdbool is a prerequisite.
14365         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
14366         since we assume C89 or better.
14367         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
14368         as we don't use their results.
14369         Don't check for fchdir, memmove, memset, strrchr, as we use
14370         them unconditionally.
14371         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
14372         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
14373
14374 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
14375
14376         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
14377         Include <stddef.h> unconditionally, since we assume C89 now.
14378         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
14379         * lib/fts.c: Include fts_.h first, to check interface.
14380         Do not include intprops.h; no longer needed.
14381         Include cycle-check.h and hash.h, since fts_.h no longer does.
14382         Remove unnecessary casts of closedir to void.
14383         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
14384         decide whether to decrement nlinks.
14385         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
14386         (FTS): Use struct hash_table * instead of Hash_table, so that
14387         we no longer need to include hash.h here.
14388
14389 2005-05-18  Jim Meyering  <jim@meyering.net>
14390
14391         * modules/dirfd (License): Change to LGPL.  Most of the code
14392         is already in the public domain.
14393
14394 2005-05-18  Jim Meyering  <jim@meyering.net>
14395
14396         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
14397         Reported by Yoann Vandoorselaere.
14398
14399 2005-05-17  Jim Meyering  <jim@meyering.net>
14400
14401         * m4/fts.m4: New file, from coreutils.
14402
14403 2005-05-17  Jim Meyering  <jim@meyering.net>
14404
14405         * lib/fts.c, lib/fts_.h: New files, from coreutils.
14406
14407 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14408
14409         Sync from coreutils.
14410         * m4/unlinkdir.m4: New file.
14411
14412 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14413
14414         Sync from coreutils.
14415         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
14416         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
14417         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
14418         White space changes only.
14419         * lib/makepath.c (make_path): Port to hosts where leading "//" is
14420         special.
14421         * lib/yesno.c: Include getline.h, not ctype.h.
14422         (yesno): Don't remove leading white space; POSIX doesn't allow it.
14423         Use getline to remove arbitrary restriction on response length.
14424
14425 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14426
14427         * config/srclist-update: Spell out "Street" in FSF postal
14428         mail address; this is the style the FSF seems to prefer.
14429
14430         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
14431         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
14432         this updates FSF postal mail address.
14433
14434         Sync from coreutils.
14435         * modules/unlinkdir: New file.
14436         * modules/yesno (Depends-on): Add getline.
14437         * MODULES.html.sh (File system functions): Add unlinkdir.
14438
14439 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14440
14441         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
14442         lib/strsep.h:
14443         Change the initial comment to refer to GPL, not LGPL.
14444         gnulib-tool will change it to LGPL as needed.
14445
14446         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
14447         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
14448         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
14449         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
14450         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
14451         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
14452         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
14453         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
14454         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
14455         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
14456         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
14457         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
14458         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
14459         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
14460         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
14461         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
14462         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
14463         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
14464         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
14465         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
14466         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
14467         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
14468         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
14469         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
14470         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
14471         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
14472         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
14473         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
14474         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
14475         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
14476         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
14477         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
14478         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
14479         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
14480         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
14481         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
14482         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
14483         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
14484         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
14485         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
14486         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
14487         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
14488         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
14489         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
14490         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
14491         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
14492         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
14493         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
14494         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
14495         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
14496         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
14497         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
14498         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
14499         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
14500         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
14501         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
14502         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
14503         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
14504         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
14505         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
14506         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
14507         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
14508         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
14509         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
14510         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
14511         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
14512         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
14513         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
14514         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
14515         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
14516         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
14517         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
14518         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
14519         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
14520         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
14521         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
14522         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
14523         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
14524         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
14525         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
14526         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
14527         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
14528         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
14529         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
14530         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
14531         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
14532         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
14533         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
14534         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
14535         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
14536         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
14537         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
14538         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
14539         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
14540         lib/yesno.c, lib/yesno.h:
14541         Update FSF postal mail address.
14542
14543 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14544
14545         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
14546         tests/test-memmem.c, tests/test-stpncpy.c:
14547         Update FSF postal mail address.
14548
14549 2005-05-13  Bruno Haible  <bruno@clisp.org>
14550
14551         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
14552         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
14553         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
14554         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
14555         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
14556         Add support for 64-bit integers in the MSVC compiler.
14557
14558 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14559
14560         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
14561
14562 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
14563
14564         * gnulib-tool (func_import): Sort and uniquify recommended includes.
14565
14566 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
14567
14568         * doc/getdate.texi (General date syntax): Don't say that date
14569         date --iso-8601=ns generates acceptable dates; it doesn't yet.
14570         Problem reported by Nic Ferrier.
14571
14572 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14573
14574         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
14575         specified in ai_socktype. Fix invalid ai_protocol
14576         check. ai_protocol is usually set to 0 or depending on
14577         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
14578         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
14579         ai_socktype / ai_protocol in the returned addrinfo structure.
14580
14581 2005-05-10  Simon Josefsson  <jas@extundo.com>
14582
14583         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
14584         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
14585
14586 2005-05-10  Karl Berry  <karl@gnu.org>
14587
14588         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
14589         (from http://www.gnu.org/licenses).
14590         * doc/COPYING.LIB: also rename to COPYING.LESSER.
14591         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
14592         fdl.texi suffices.
14593
14594 2005-05-10  Karl Berry  <karl@gnu.org>
14595
14596         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
14597         (COPYING.DOC): remove.
14598
14599         * config/srclist-update: new FSF address.
14600
14601 2005-05-10  Derek Price  <derek@ximbiot.com>
14602
14603         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
14604         possible.
14605
14606 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14607             Bruno Haible  <bruno@clisp.org>
14608
14609         * modules/inet_ntop: New file.
14610         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14611         inet_ntop.
14612
14613 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14614             Bruno Haible  <bruno@clisp.org>
14615
14616         * m4/inet_ntop.m4: New file.
14617
14618 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14619             Bruno Haible  <bruno@clisp.org>
14620
14621         * lib/inet_ntop.h: New file.
14622         * lib/inet_ntop.c: New file, from glibc with modifications.
14623
14624 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
14625
14626         * modules/time_r (License): Change to LGPL.
14627         * modules/extensions (License): Change to LGPL.  Actually,
14628         the license is more permissive than that, but currently gnulib-tool
14629         doesn't know how to handle more-permissive licenses.
14630
14631         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
14632         Problem reported by Dave Love.
14633
14634 2005-05-08  Jim Meyering  <jim@meyering.net>
14635
14636         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
14637         blank.
14638
14639 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
14640
14641         * modules/argmatch (Depends-on): Add stdbool.
14642         * modules/backupfile (Depends-on): Likewise.
14643         * modules/chdir-long (Depends-on): Likewise.
14644         * modules/closeout (Depends-on): Likewise.
14645         * modules/cycle-check (Depends-on): Likewise.
14646         * modules/dirname (Depends-on): Likewise.
14647         * modules/fnmatch (Depends-on): Likewise.
14648         * modules/fsusage (Depends-on): Likewise.
14649         * modules/fwriteerror (Depends-on): Likewise.
14650         * modules/getcwd (Depends-on): Likewise.
14651         * modules/getloadavg (Depends-on): Likewise.
14652         * modules/hard-locale (Depends-on): Likewise.
14653         * modules/makepath (Depends-on): Likewise.
14654         * modules/mountlist (Depends-on): Likewise.
14655         * modules/nanosleep (Depends-on): Likewise.
14656         * modules/posixtm (Depends-on): Likewise.
14657         * modules/quotearg (Depends-on): Likewise.
14658         * modules/readtokens (Depends-on): Likewise.
14659         * modules/readtokens0 (Depends-on): Likewise.
14660         * modules/readutmp (Depends-on): Likewise.
14661         * modules/save-cwd (Depends-on): Likewise.
14662         * modules/strftime (Depends-on): Likewise.
14663         * modules/userspec (Depends-on): Likewise.
14664         * modules/utimecmp (Depends-on): Likewise.
14665         * modules/xgetcwd (Depends-on): Likewise.
14666         * modules/xnanosleep (Depends-on): Likewise.
14667         * modules/xstrtod (Depends-on): Likewise.
14668         * modules/yesno (Depends-on): Likewise.
14669
14670 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
14671
14672         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
14673         needless checks.
14674
14675 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14676
14677         Merge from coreutils.  Among other things,
14678         add bulletproofing for cases where stdin, stdout, or stderr are closed.
14679         * lib/fd-safer.c: New file.
14680         * lib/fcntl-safer.h, open-safer.c: Remove.
14681         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
14682         * lib/dup-safer.c: Include unistd-safer.h first.
14683         Don't include errno.h.
14684         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
14685         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
14686         * lib/file-type.c: Rely on file-type.h change.
14687         * lib/getloadavg.c: Include unistd-safer.h.
14688         (getloadavg): Use safer open.
14689         * lib/getusershell.c: Include "stdio-safer.h".
14690         (getusershell): Use safer fopen.
14691         * lib/long-options.c (long_options): Use NULL rather than 0.
14692         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
14693         'free'.
14694         * lib/modechange.c: Likewise.
14695         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
14696         (MODE_DONE): New constant.
14697         (struct mode_change): Remove 'next' member.
14698         (make_node_op_equals): New function; like the old one of the
14699         same name, except it allocates an array.
14700         (mode_compile, mode_create_from_ref): Use it.
14701         (mode_compile): Allocate result as an array, not a linked list.
14702         Parse octal string ourself, so that we catch mistakes like "+0".
14703         (mode_adjust): Arg is an array, not a linked list.
14704         * lib/modechange.c: Include stat-macros.h, xalloc.h.
14705         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
14706         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
14707         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
14708         Remove.  This is now stat-macros.h's job.
14709         (talloc): Remove.  All callers replaced by xalloc, so that
14710         our invokers don't have to worry about reporting memory failures.
14711         (make_node_op_equals): Remove.
14712         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
14713         New constants.
14714         (struct mode_change): Moved here from modechange.h.
14715         (mode_append_entry): Remove.
14716         (mode_compile): Remove MASKED_OPS arg, since it encouraged
14717         apps to have incorrect behavior.  Use simpler algorithm for head
14718         and tail.  Don't futz with umask; that's now the job of mode_adjust.
14719         Detect more invalid usages rather than having somewhat-random behavior.
14720         Don't insert an "a=" action, as that leads to incorrect behavior.
14721         (mode_compile, mode_create_from_ref): Return NULL on error instead
14722         of an enum, since now there's only one way to have an error.  All
14723         callers changed.
14724         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
14725         at the correct time.  Simplify calculation of "+u" and its ilk.
14726         Don't mishandle "+X".
14727         (mode_free): Remove "register" and localize decls.
14728         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
14729         (struct mode_change): Move to modechange.c; callers don't
14730         need to see this stuff.
14731         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
14732         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
14733         (mode_change, mode_adjust): Reflect the new signatures noted above.
14734         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
14735         that might redefine system include files.
14736         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
14737         (my_usleep): Use NULL rather than (void *) 0.
14738         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
14739         Use siginterrupt to specify that system calls should be interrupted.
14740         (rpl_nanosleep): Move initialization of suspended closer to call of
14741         my_usleep.
14742         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
14743         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
14744         (desirable_utmp_entry): New function.
14745         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
14746         using x2nrealloc, to simplify logic.
14747         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
14748         size calculation.  Do not assume utmp file is a regular file.
14749         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
14750         (READ_UTMP_CHECK_PIDS): New constant.
14751         * lib/save-cwd.c: Include unistd-safer.h.
14752         (save_cwd): Use fd_safer.
14753         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
14754         [!_LIBC] Include "stat-macros.h" instead.
14755         * lib/unistd-safer.h (fd_safer): New decl.
14756
14757 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14758
14759         * modules/getloadavg (Depends-on): Add unistd-safer.
14760         * modules/getusershell (Depends-on): Add stdio-safer.
14761         * modules/lstat (Depends-on): Remove xalloc.
14762         * modules/mkstemp (Depends-on): Add stat-macros.
14763         * modules/modechange (Depends-on): Remove xstrtol.
14764         Add stat-macros, xalloc.
14765         * modules/save-cwd (Depends-on): Add unistd-safer.
14766         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
14767         * modules/unistd-safer (Files): Add lib/fd-safer.c
14768         (Makefile.am): Remove lib_SOURCES.
14769
14770         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
14771         Remove fcntl-safer; unistd-safer supersedes it.
14772
14773 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14774
14775         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
14776         AC_HEADER_STAT.
14777         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
14778         (gl_PREREQ_CHOWN): Remove.
14779         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
14780         it.  Don't require AC_HEADER_STAT.
14781         (gl_PREREQ_LSTAT): Remove.
14782         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
14783         Don't require AC_HEADER_STAT.
14784         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
14785         (gl_PREREQ_RMDIR): Remove.
14786         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
14787         mention stat-macros.h or AC_HEADER_STAT, since we'll make
14788         the stat-macros module a prerequisite.
14789         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
14790         * m4/filemode.m4 (gl_FILEMODE): Likewise.
14791         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
14792         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
14793         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
14794         variable names.
14795         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
14796         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
14797         variable prefixes.
14798         * m4/fcntl-safer.m4: Remove.
14799         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
14800         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
14801         Invoke gl_PREREQ_FD_SAFER.
14802         (gl_PREREQ_FD_SAFER): New macro.
14803         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
14804         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
14805         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
14806         Remove duplicate call to AC_LIBOBJ(readutmp).
14807         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
14808
14809         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
14810         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
14811
14812 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14813
14814         * MODULES.html.sh (Misc): Add byteswap.
14815
14816 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14817
14818         * modules/getcwd (Depends-on): Add extensions.
14819         * modules/openat (Depends-on): Likewise.
14820
14821 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14822
14823         * modules/byteswap: New file.
14824
14825 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14826
14827         * m4/byteswap.m4: New file.
14828
14829 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14830
14831         * lib/byteswap_.h: New file.
14832
14833 2005-04-25  Karl Berry  <karl@gnu.org>
14834
14835         * m4/gettext.m4: Update from GNU gettext 0.14.4.
14836
14837 2005-04-25  Albert Chin  <china@thewrittenword.com>
14838
14839         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
14840         Toolkit C bug.
14841
14842 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
14843
14844         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
14845         (func_ln_if_changed) Remove forcibly for no error message
14846         in case file does not exist.
14847
14848 2005-04-19  Simon Josefsson  <jas@extundo.com>
14849
14850         * gnulib-tool (Options): Make --symlink mean --symbolic.
14851
14852 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
14853
14854         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
14855
14856 2005-04-16  Simon Josefsson  <jas@extundo.com>
14857
14858         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
14859
14860 2005-04-15  Simon Josefsson  <jas@extundo.com>
14861
14862         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
14863
14864 2005-04-15  Simon Josefsson  <jas@extundo.com>
14865
14866         * gnulib-tool: Rename --symlink to --symbolic.
14867
14868 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
14869
14870         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
14871         symbolic links to files instead of copying/moving.  Add --aux-dir,
14872         specifying directory relative --dir where auxiliary build tools
14873         are placed.
14874
14875 2005-04-14  Bruno Haible  <bruno@clisp.org>
14876
14877         * modules/allocsa (License): Change to LGPL.
14878         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
14879
14880 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
14881
14882         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
14883         that "UTC +1 second" continues to work.  Problem reported
14884         by Dmitry V. Levin.
14885         (relunit_snumber): New rule.
14886         (relunit): Use it.
14887
14888 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
14889
14890         * lib/getdate.y (universal_time_zone_table): New constant.
14891         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
14892         universal_time_zone_table.
14893         (lookup_zone): Prefer universal_time_zone_table to
14894         local_time_zone_table, so that "GMT" time stamps are allowed in
14895         London during the summer.  Problem reported by Ian Abbott.
14896
14897 2005-04-12  Jim Meyering  <jim@meyering.net>
14898
14899         * lib/human.c (humblock): Set *options even when returning due to
14900         xstrtoumax conversion failure.  Thanks to a used-uninitialized
14901         warning from gcc-4.
14902
14903 2005-04-09  Jim Meyering  <jim@meyering.net>
14904
14905         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
14906         -Wuninitialized: initialize tm0.tm_year.
14907
14908 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
14909
14910         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
14911         count, since there's no maximum.  All uses changed.
14912         Add member dsts_seen.
14913         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
14914         not being INT_MAX.
14915         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
14916         Use pc_rels_seen to decide whther a date is absolute.
14917
14918         * lib/getdate.y (number): Don't overwrite year.
14919         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
14920         check.
14921
14922 2005-04-02  Simon Josefsson  <jas@extundo.com>
14923
14924         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
14925         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
14926
14927 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
14928
14929         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
14930         where no absolute path name can be longer than PATH_MAX.
14931
14932 2005-03-27  Jim Meyering  <jim@meyering.net>
14933
14934         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
14935
14936 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
14937
14938         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
14939         "one's complement" -> "ones' complement" in comment, as per Knuth.
14940         "value of type" -> "type or expression" in comment.
14941         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
14942
14943 2005-03-26  Jim Meyering  <jim@meyering.net>
14944
14945         Comment nits.
14946         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
14947         Correct typos: s/or/of/.
14948
14949 2005-03-26  Jim Meyering  <jim@meyering.net>
14950
14951         * modules/check-include-files: Move to ../ and rename to...
14952         * check-module: ...this.
14953
14954 2005-03-25  Jim Meyering  <jim@meyering.net>
14955
14956         * modules/xvasprintf (Files): Add xalloc.h.
14957
14958 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
14959
14960         * modules/gettext (Files): config/config.rpath ->
14961         build-aux/config.rpath
14962         * modules/iconv (Files): Likewise.
14963         Problem reported by Oskar Liljeblad.
14964
14965 2005-03-23  Jim Meyering  <jim@meyering.net>
14966
14967         * modules/check-include-files: New script to check for
14968         missing dependencies, multiple includes, etc.
14969
14970         * modules/c-strtold (Depends-on): Add xalloc.
14971         * modules/c-strtod (Depends-on): Add xalloc.
14972         * modules/hash (Depends-on): Add xalloc.
14973         (Files): Remove lib/xalloc.h.
14974
14975         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
14976         * modules/userspec (Files): Add lib/inttostr.h.
14977
14978 2005-03-23  Jim Meyering  <jim@meyering.net>
14979
14980         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
14981
14982 2005-03-22  Jim Meyering  <jim@meyering.net>
14983
14984         * modules/stat-macros: New module.
14985         * modules/canonicalize, modules/euidaccess, modules/file-type,
14986         * modules/filemode, modules/lchown, modules/makepath,
14987         * modules/rmdir, modules/stat: Depend on new stat-macros module
14988         rather than listing lib/stat-macros.h manually.
14989         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
14990
14991 2005-03-22  Jim Meyering  <jim@meyering.net>
14992
14993         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
14994
14995 2005-03-22  Bruno Haible  <bruno@clisp.org>
14996
14997         * config/srclist.txt: Replace target directory 'config' with
14998         'build-aux'.
14999         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
15000         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
15001         ../build-aux/.
15002
15003 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
15004
15005         * modules/chdir-long (Depends-on): Add mempcpy.
15006
15007         * modules/acl, modules/backupfile, modules/c-strtod,
15008         modules/c-strtold, modules/canon-host, modules/canonicalize,
15009         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
15010         modules/exclude, modules/exitfail, modules/file-type,
15011         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
15012         modules/getdate, modules/getline, modules/getpagesize,
15013         modules/getpass, modules/getugroups, modules/group-member,
15014         modules/hard-locale, modules/hash, modules/human, modules/idcache,
15015         modules/inttostr, modules/long-options, modules/makepath,
15016         modules/md5, modules/memcasecmp, modules/memcoll,
15017         modules/modechange, modules/mountlist, modules/path-concat,
15018         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
15019         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
15020         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
15021         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
15022         modules/strftime, modules/strndup, modules/strverscmp,
15023         modules/timespec, modules/unlocked-io, modules/userspec,
15024         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
15025         modules/yesno:
15026         Remove lib_SOURCES line from Makefile.am section, as this is now
15027         done automatically by the corresponding Autoconf macro.
15028
15029 2005-03-21  Jim Meyering  <jim@meyering.net>
15030
15031         Changes imported from coreutils.
15032
15033         * lib/cycle-check.c: Don't include xalloc.h.
15034
15035         * lib/path-concat.c: Don't include assert.h.
15036         (path_concat): Remove assertion that would have triggered
15037         for ABASE starting with more than one slash.
15038         Reported by Andreas Schwab.
15039
15040         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
15041         properly when ABASE is an absolute file name.
15042         Correct the description of this function.
15043         Include <assert.h>.
15044         Add an assertion and a test driver.
15045         This fixes a bug introduced on 2004-07-02.
15046         Andreas Schwab reported the resulting failure of cp --parents:
15047         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
15048
15049 2005-03-21  Jim Meyering  <jim@meyering.net>
15050
15051         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
15052         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
15053
15054 2005-03-21  Jim Meyering  <jim@meyering.net>
15055         and  Paul Eggert  <eggert@cs.ucla.edu>
15056
15057         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
15058         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
15059         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
15060         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
15061         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
15062         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
15063         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
15064         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
15065         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
15066         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
15067         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
15068         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
15069         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
15070         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
15071         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
15072         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
15073         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
15074         for these modules.
15075
15076 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
15077
15078         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
15079         (which shouldn't happen), generate nothing instead of returning 0
15080         immediately, so that nstrftime (NULL, ...) doesn't return 0.
15081
15082 2005-03-16  Bruno Haible  <bruno@clisp.org>
15083
15084         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
15085         HAVE_LONGLONG_64BIT.
15086
15087 2005-03-16  Bruno Haible  <bruno@clisp.org>
15088
15089         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
15090         HAVE_LONGLONG_64BIT.
15091
15092 2005-03-16  Bruno Haible  <bruno@clisp.org>
15093
15094         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
15095         HAVE_LONGLONG_64BIT.
15096
15097 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
15098
15099         * lib/strftime.c (my_strftime): Prepend space to format so that we can
15100         reliably distinguish strftime failure from empty output on POSIX
15101         hosts.
15102
15103 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
15104
15105         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
15106         (iconv_string): Don't guess a size-zero buffer, as that might cause
15107         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
15108         result would be 'too large', where 'too large' is (heuristically)
15109         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
15110         overflow concerns.  This will prevent some unwanted malloc failures
15111         when the inputs are very large.
15112
15113 2005-03-15  Karl Berry  <karl@gnu.org>
15114
15115         * config/srclist.txt (config.rpath): from gettext.
15116         * config/config.rpath: update.
15117
15118 2005-03-15  Bruno Haible  <bruno@clisp.org>
15119
15120         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
15121         to 'negate'.
15122
15123         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
15124         variable.
15125
15126         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
15127         results.
15128
15129 2005-03-14  Simon Josefsson  <jas@extundo.com>
15130
15131         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
15132         <fx@gnu.org>.
15133
15134 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
15135
15136         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
15137         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
15138         intprops.h.
15139         * lib/strtol.c: Likewise.
15140
15141 2005-03-14  Jim Meyering  <jim@meyering.net>
15142
15143         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
15144         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
15145         to be nonzero so that we (and caller) can detect the difference
15146         between a valid zero-length expansion and an error return, even
15147         when the underlying strftime fails before writing anything into
15148         that location.
15149
15150 2005-03-14  Bruno Haible  <bruno@clisp.org>
15151
15152         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
15153         Update from GNU gettext 0.14.3.
15154
15155 2005-03-10  Jim Meyering  <jim@meyering.net>
15156
15157         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
15158
15159 2005-03-10  Jim Meyering  <jim@meyering.net>
15160
15161         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
15162         so that this module works on systems without fchdir.
15163
15164 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
15165
15166         Factor int-properties macros into a single file, except for
15167         glibc-related files.
15168         * lib/intprops.h: New file.
15169         * lib/getloadavg.c: Include it instead of limits.h.
15170         (INT_STRLEN_BOUND): Remove.
15171         * lib/human.c: Include intprops.h.
15172         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
15173         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
15174         302/1000.
15175         * lib/inttostr.h: Include intprops.h instead of limits.h.
15176         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
15177         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
15178         for consistency with intprops.h.
15179         (time_t_is_integer, twos_complement_arithmetic): Use them.
15180         * lib/sig2str.h: Include <signal.h>, intprops.h.
15181         (INT_STRLEN_BOUND): Remove.
15182         * lib/strftime.c (TYPE_SIGNED): Remove.
15183         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
15184         * lib/strtol.c: Adjust comments to match intprops.h.
15185         * lib/userspec.c: Include intprops.h.
15186         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
15187         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
15188         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
15189         instead of rolling our own expressions.
15190         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
15191
15192         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
15193         instead of int.
15194         (my_strftime): Do not mishandle years close to INT_MAX, by doing
15195         the right thing even if adding 1900 would overflow.  Similarly
15196         for tm_mon + 1 and tm_yday + 1.
15197         Make %Y always equivalent to %C%y, and similarly for %G and %g.
15198         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
15199         (DO_SIGNED_NUMBER): New macro.
15200         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
15201
15202 2005-03-07  Bruno Haible  <bruno@clisp.org>
15203
15204         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
15205
15206 2005-03-07  Bruno Haible  <bruno@clisp.org>
15207
15208         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
15209
15210 2005-03-04  Derek R. Price  <derek@ximbiot.com>
15211
15212         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
15213         (func_import): Only replace files via --import when they have actually
15214         changed.
15215
15216 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15217
15218         * m4/mmap-anon.m4: New file.
15219         * m4/pagealign_alloc.m4: New file.
15220
15221 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15222             Bruno Haible  <bruno@clisp.org>
15223
15224         * modules/pagealign_alloc: New file.
15225         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
15226
15227 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15228             Bruno Haible  <bruno@clisp.org>
15229
15230         * lib/pagealign_alloc.h: New file.
15231         * lib/pagealign_alloc.c: New file.
15232
15233 2005-03-03  Bruno Haible  <bruno@clisp.org>
15234
15235         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
15236         Use an all-permissive copyright notice, recommended by RMS.
15237
15238 2005-03-02  Bruno Haible  <bruno@clisp.org>
15239
15240         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
15241         of AIX, the replacement has to be done only after <string.h> is
15242         included, therefore not in config.h. stpncpy.h does the replacement,
15243         and stpncpy.c uses it.
15244
15245 2005-03-02  Bruno Haible  <bruno@clisp.org>
15246
15247         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
15248         stpncpy.c uses it.
15249
15250 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15251
15252         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
15253         The workaround isn't strictly needed for POSIX conformance, and
15254         it's too much of a pain to configure and maintain.  We'll ask
15255         people to fix their kernels instead.
15256         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
15257         (NANOSLEEP_BUG_WORKAROUND): Remove.
15258         (xnanosleep): Remove the workaround.
15259
15260 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15261
15262         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
15263         Reported by Derek Price.
15264         (Include): Add "timespec.h".
15265
15266         * modules/xnanosleep (Depends-on): Remove gethrxtime.
15267
15268 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15269
15270         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
15271         to detect nanosleep bug.
15272
15273 2005-03-01  Bruno Haible  <bruno@clisp.org>
15274
15275         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
15276
15277 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
15278
15279         * modules/gethrxtime: New file.
15280         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
15281         (Depends-on): Add gethrxtime.
15282         (configure.ac): Add gl_XNANOSLEEP.
15283         (Makefile.am): Remove lib_SOURCES line.
15284
15285 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
15286
15287         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
15288         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
15289
15290 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
15291
15292         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
15293         * lib/timespec.h (gettime): Return void, since it always
15294         succeeds now.  All uses changed.
15295         * lib/gettime.c (gettime) Likewise.
15296         [HAVE_NANOTIME]: Prefer nanotime.
15297         Assume gettimeofday succeeds, as POSIX requires.
15298         Assime time () succeeds, since other code already does.
15299         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
15300         (timespec_subtract): Remove.
15301         (NANOSLEEP_BUG_WORKAROUND): New constant.
15302         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
15303         things considerably.  Use it only on GNU/Linux hosts, since the
15304         workaround shouldn't be needed elsewhere.
15305
15306 2005-02-24  Bruno Haible  <bruno@clisp.org>
15307
15308         * modules/gettext (Files): Add m4/glibc2.m4.
15309
15310 2005-02-24  Bruno Haible  <bruno@clisp.org>
15311
15312         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
15313         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
15314         * m4/progtest.m4:
15315         Update from GNU gettext 0.14.2.
15316         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
15317
15318 2005-02-24  Bruno Haible  <bruno@clisp.org>
15319
15320         * lib/localcharset.c: Update from GNU gettext 0.14.2.
15321         * lib/config.charset: Update from GNU gettext 0.14.2.
15322
15323 2005-02-24  Bruno Haible  <bruno@clisp.org>
15324
15325         * lib/gettext.h: Update from GNU gettext 0.14.2.
15326
15327 2005-02-23  Simon Josefsson  <jas@extundo.com>
15328
15329         * m4/iconvme.m4: New file.
15330
15331 2005-02-23  Jim Meyering  <jim@meyering.net>
15332
15333         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
15334         change.
15335         Thanks to Bruno Haible for catching it.
15336
15337 2005-02-22  Simon Josefsson  <jas@extundo.com>
15338
15339         * modules/iconvme: New file.
15340
15341         * MODULES.html.sh: Add iconvme.
15342
15343 2005-02-22  Simon Josefsson  <jas@extundo.com>
15344
15345         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
15346
15347 2005-02-22  Simon Josefsson  <jas@extundo.com>
15348
15349         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
15350
15351 2005-02-22  Jim Meyering  <jim@meyering.net>
15352
15353         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
15354         s/ifndef/ifdef/.
15355
15356 2005-02-20  Neil Conway  <neilc@samurai.com>
15357
15358         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
15359         returned by OSX/Darwin if the specified buffer is not large
15360         enough for the hostname.
15361
15362 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15363
15364         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
15365         pass it to _help, otherwise the latter coredumps trying to
15366         dereference state.root_argp.
15367
15368 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15369
15370         * modules/chdir-long (Depends-on): Add memrchr.
15371         * modules/memrchr (Files): Add lib/memrchr.h.
15372         (Include): "memrchr.h".
15373
15374 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15375
15376         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
15377
15378 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15379
15380         * lib/memrchr.h: New file.
15381         * lib/chdir-long.c: Include it.
15382         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
15383         Don't bother including stddef.h.
15384
15385 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
15386
15387         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
15388         inclusion.
15389         Include <sys/types.h>, for dev_t.
15390         (ME_DUMMY, ME_REMOTE): Move from here....
15391         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
15392         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
15393         Dmitry V. Levin.
15394         Include mountlist.h first, to test the interface.
15395
15396 2005-01-29  Bruno Haible  <bruno@clisp.org>
15397
15398         * lib/progname.c (program_name): Initialize.
15399         Needed when linking statically on MacOS X.
15400
15401 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
15402
15403         Sync from coreutils.
15404         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
15405         (Depends-on): Add c-strtod.
15406         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
15407
15408 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
15409
15410         Sync from coreutils.
15411         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
15412
15413         Remove files that are specific to coreutils.
15414         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
15415
15416 2005-01-28  Bruno Haible  <bruno@clisp.org>
15417
15418         * modules/javacomp: New file.
15419         * MODULES.html.sh (Java): Add javacomp.
15420
15421 2005-01-28  Bruno Haible  <bruno@clisp.org>
15422
15423         * m4/javacomp.m4: New file, from GNU gettext.
15424
15425 2005-01-28  Bruno Haible  <bruno@clisp.org>
15426
15427         * lib/javacomp.sh.in: New file, from GNU gettext.
15428         * lib/javacomp.h: New file, from GNU gettext.
15429         * lib/javacomp.c: New file, from GNU gettext.
15430
15431 2005-01-26  Simon Josefsson  <jas@extundo.com>
15432
15433         * lib/gai_strerror.c: Use GPL in header.
15434
15435 2005-01-26  Bruno Haible  <bruno@clisp.org>
15436
15437         * modules/javaexec: New file.
15438         * MODULES.html.sh (Java): Add javaexec.
15439
15440 2005-01-26  Bruno Haible  <bruno@clisp.org>
15441
15442         * m4/javaexec.m4: New file, from GNU gettext.
15443
15444 2005-01-26  Bruno Haible  <bruno@clisp.org>
15445
15446         * lib/javaexec.sh.in: New file, from GNU gettext.
15447         * lib/javaexec.h: New file, from GNU gettext.
15448         * lib/javaexec.c: New file, from GNU gettext.
15449
15450 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15451
15452         * modules/lchown (Depends-on): Remove lchown.h
15453
15454 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15455
15456         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
15457         must be defined if the header file was not found, in order
15458         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
15459
15460 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15461
15462         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
15463         initializers for struct pentry_state.
15464         (__argp_error): Check return value of __asprintf
15465         (__argp_failure): Translate error message
15466
15467         * lib/argp-parse.c: Removed braces around the expansion of N_()
15468
15469 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
15470
15471         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
15472         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
15473         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
15474         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
15475         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
15476         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
15477         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
15478         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
15479         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
15480         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
15481         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
15482         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
15483         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
15484         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
15485         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
15486         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
15487         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
15488         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
15489         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
15490         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
15491         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
15492         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
15493         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
15494         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
15495         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
15496         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
15497         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
15498         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
15499         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
15500         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
15501         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
15502         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
15503         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
15504         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
15505         xstrtol.m4, xstrtoumax.m4, yesno.m4:
15506         Use an all-permissive copyright notice, recommended by RMS.
15507
15508 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
15509
15510         * modules/chdir-long (Depends-on): Remove mempcpy.
15511
15512 2005-01-21  Jim Meyering  <jim@meyering.net>
15513
15514         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
15515         same value as for Solaris 9.
15516
15517         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
15518         component length.  This included changing the parameter to be
15519         of type `char *' rather than `char const *'.
15520         * lib/chdir-long.h (chdir_long): Update prototype.
15521
15522         * lib/openat.c (fdopendir, fstatat): New functions.
15523         * lib/openat.h: Include headers required for use of DIR and struct
15524         stat.
15525         [AT_SYMLINK_NOFOLLOW]: Define.
15526         (fdopendir, fstatat): Add prototypes.
15527
15528 2005-01-21  Bruno Haible  <bruno@clisp.org>
15529
15530         * modules/classpath: New file.
15531         * MODULES.html.sh (Java): Add classpath.
15532
15533 2005-01-21  Bruno Haible  <bruno@clisp.org>
15534
15535         * lib/classpath.h: New file, from GNU gettext.
15536         * lib/classpath.c: New file, from GNU gettext.
15537
15538 2005-01-20  Simon Josefsson  <jas@extundo.com>
15539
15540         * modules/version-etc-fsf: New file.
15541
15542 2005-01-20  Simon Josefsson  <jas@extundo.com>
15543
15544         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
15545         * lib/version-etc.c: Remove version_etc_copyright.
15546         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
15547         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
15548
15549 2005-01-20  Simon Josefsson  <jas@extundo.com>
15550
15551         * lib/base64.h (isbase64): Add.
15552
15553         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
15554         using a unsigned prototype, don't inline.
15555         (base64_decode): Use it.
15556
15557 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15558
15559         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
15560         it.
15561
15562 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15563
15564         * lib/save-cwd.c (save_cwd): Remove code to support the case
15565         where fchdir is missing or flaky.
15566
15567 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15568
15569         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
15570
15571 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
15572
15573         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
15574         AC_LIBSOURCES now does this.
15575         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
15576         with new ullong_max module.
15577
15578 2005-01-19  Bruno Haible  <bruno@clisp.org>
15579
15580         * modules/sh-quote: New file.
15581         * MODULES.html.sh (Executing programs): Add sh-quote.
15582
15583 2005-01-19  Bruno Haible  <bruno@clisp.org>
15584
15585         * lib/sh-quote.h: New file, from GNU gettext.
15586         * lib/sh-quote.c: New file, from GNU gettext.
15587
15588 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
15589
15590         Merge from coreutils.
15591         * m4/ullong_max.m4: New file.
15592         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
15593         (gl_MACROS): Assume localeconv exists.
15594
15595 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
15596
15597         Merge changes from coreutils, as described below in several
15598         changelogs dated today.
15599
15600         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
15601         (O_DIRECTORY): Remove; not needed here, since "." must be
15602         a directory.  All uses removed.
15603         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
15604         universal on Suns, and we also need to test for IRIX.
15605         Revamp code to use 'if' rather than '#if'.
15606         Avoid unnecessary comparison of cwd->desc to 0.
15607
15608         * lib/utimens.c (futimens): Robustify the previous patch, by checking
15609         for known valid error numbers rather than observed invalid ones.
15610
15611 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
15612
15613         * modules/ullong_max: New file.
15614
15615         * modules/chdir-long, modules/openat: New files.
15616         * modules/save-cwd (Depends-on): Depend on chdir-long.
15617         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
15618
15619 2005-01-18  Jim Meyering  <jim@meyering.net>
15620
15621         Merge from coreutils.
15622         * m4/chdir-long.m4, m4/openat.m4: New files.
15623         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
15624         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
15625         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
15626         is sane and DOES follow symlinks.  Besides, testing 20 different
15627         systems found no broken chown implementations.
15628         Prompted by a change in rsync's copy of this macro.
15629         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
15630
15631         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
15632
15633         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
15634         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
15635         NULL-means-set-to-current-time semantics.
15636         Remove temporary file immediately, rather than waiting
15637         for configure's at-exit trap code to do it.
15638
15639 2005-01-18  Jim Meyering  <jim@meyering.net>
15640
15641         * lib/version-etc.c (version_etc_copyright): Update copyright date.
15642
15643         * lib/utimens.c (futimens): Account for the fact that futimes
15644         can also fail with errno == ENOSYS or errno == ENOENT.
15645         Patch from Dmitry V. Levin.
15646
15647         Change the name of the robust chdir function from chdir to chdir_long.
15648         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
15649         (restore_cwd): Use chdir_long, not chdir.
15650         * lib/chdir-long.c: Renamed from chdir.c.
15651         * lib/chdir-long.h: Renamed from chdir.h.
15652         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
15653         Hurd.
15654
15655 2005-01-18  Bruno Haible  <bruno@clisp.org>
15656
15657         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
15658         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
15659         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
15660         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
15661         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
15662         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
15663         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
15664         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
15665         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
15666         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
15667         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
15668         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
15669         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
15670         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
15671         Use an all-permissive copyright notice, recommended by RMS.
15672
15673 2005-01-18  Bob Proulx  <bob@proulx.com>
15674
15675         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
15676         simplify offsetof() macro construct to avoid compile failure with
15677         native HP-UX 11.0 ANSI C compiler.
15678
15679 2005-01-17  Bruno Haible  <bruno@clisp.org>
15680
15681         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
15682         redundant because stpncpy.m4 takes care of it.
15683
15684 2005-01-17  Bruno Haible  <bruno@clisp.org>
15685
15686         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
15687
15688 2005-01-17  Bruno Haible  <bruno@clisp.org>
15689
15690         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
15691         used.
15692
15693 2005-01-17  Bruno Haible  <bruno@clisp.org>
15694
15695         * lib/fwriteerror.h (fwriteerror): Change specification to include
15696         fclose.
15697         * lib/fwriteerror.c: Include <stdbool.h>.
15698         (fwriteerror): At the end, close the file stream. Record whether
15699         stdout was already closed.
15700
15701 2005-01-17  Bruno Haible  <bruno@clisp.org>
15702
15703         * lib/execute.c (environ): Declare if needed.
15704         * lib/pipe.c (environ): Likewise.
15705         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
15706
15707 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15708
15709         * modules/argp: Depend on vsnprintf
15710
15711 2005-01-10  Jim Meyering  <jim@meyering.net>
15712
15713         * modules/closeout (Depends-on): Add atexit.
15714
15715 2005-01-06  Bruno Haible  <bruno@clisp.org>
15716
15717         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
15718
15719 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
15720
15721         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
15722         definitions to be after all include files, to avoid collisions.
15723         Problem reported by Bob Proulx.
15724
15725 2005-01-04  Jim Meyering  <jim@meyering.net>
15726
15727         Changes imported from coreutils.
15728         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
15729         as the mkstemp template, use a temporary directory and an
15730         8.3-friendly template to avoid trouble on systems like DJGPP.
15731         Reported by Juan M. Guerrero via Stepan Kasal.
15732         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
15733         close. Remove the temporary directory right away, rather than waiting
15734         for configure's at-exit trap code to do it.
15735         Suggestion from Stepan Kasal.
15736
15737 2005-01-01  Simon Josefsson  <jas@extundo.com>
15738
15739         * gnulib-tool: Print #include directives when --import'ing.
15740
15741 2004-12-28  Simon Josefsson  <jas@extundo.com>
15742
15743         * tests/test-base64.c: Include required header files.  Remove
15744         unused variables.
15745
15746 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
15747
15748         * modules/error (Depends-on): Remove gettext.
15749
15750 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
15751
15752         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
15753         not needed.  This removes a dependency on the gettext module.
15754         [defined _LIBC]: Do not include <libintl.h>; not needed.
15755
15756 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
15757
15758         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
15759         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
15760
15761 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
15762
15763         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
15764         HAVE_DECL_STRTOLD.
15765
15766 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15767
15768         * modules/getdate (Depends-on): Remove alloca-opt.
15769
15770 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15771
15772         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
15773
15774 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15775
15776         * lib/argp-parse.c: Include <stddef.h>.
15777         (alignof, alignto): New macros.
15778         (parser_init): Don't assume that void * is aligned sufficiently
15779         for struct option.
15780
15781         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
15782         need to extend the stack.
15783         (YYINITDEPTH): New macro, so that the initial stack isn't overly
15784         large.
15785
15786 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15787
15788         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
15789
15790 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
15791
15792         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
15793         (2004-10-24) change.  Apparently this was a false alarm.
15794
15795         * modules/getdate: Depend on alloca-opt, not alloca.
15796
15797 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
15798
15799         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
15800         Remove now-obsolete comment about AIX.
15801         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
15802         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
15803         (YYMAXDEPTH): New macro.
15804
15805 2004-12-18  Simon Josefsson  <jas@extundo.com>
15806
15807         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
15808
15809 2004-12-18  Bruno Haible  <bruno@clisp.org>
15810
15811         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
15812
15813 2004-12-18  Bruno Haible  <bruno@clisp.org>
15814
15815         * lib/fatal-signal.c (fatal_signals): Make non-const.
15816         (init_fatal_signals): New function.
15817         (uninstall_handlers, install_handlers): Ignore signals that were set to
15818         SIG_IGN.
15819         (at_fatal_signal): Call init_fatal_signals.
15820         (init_fatal_signal_set): Likewise. Ignore signals that were set to
15821         SIG_IGN.
15822         Reported by Paul Eggert.
15823
15824 2004-12-18  Bruno Haible  <bruno@clisp.org>
15825
15826         * doc/alloca.texi: New file.
15827         * doc/alloca-opt.texi: New file.
15828
15829 2004-12-17  Jim Meyering  <jim@meyering.net>
15830
15831         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
15832         Otherwise, install-sh could exit with improper exit status when
15833         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
15834
15835 2004-12-16  Simon Josefsson  <jas@extundo.com>
15836
15837         * tests/test-base64.c: Add license.
15838
15839 2004-12-15  Stepan Kasal  <address@hidden>
15840
15841         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
15842
15843 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
15844
15845         * modules/getcwd (Files): Add m4/d-ino.m4.
15846         Suggested by Mark D. Baushke.
15847
15848 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
15849
15850         * lib/getdate.y (textint): New member "negative".
15851         (time_zone_hhmm): New function.
15852         Expect 14 shift-reduce conflicts, not 13.
15853         (o_colon_minutes): New rule.
15854         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
15855         (yylex): Set the "negative" member of signed numbers.
15856
15857 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
15858
15859         * doc/getdate.texi (Time of day items, Time zone items):
15860         Describe new formats +00:00, UTC+00:00.
15861
15862 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
15863
15864         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
15865         spurious "-l"s.  Problem reported by Stepan Kasal.
15866
15867 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
15868
15869         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
15870         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
15871
15872 2004-12-04  Simon Josefsson  <jas@extundo.com>
15873
15874         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
15875         Vandoorselaere <yoann@prelude-ids.org>.
15876
15877 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15878
15879         Changes imported from coreutils.
15880         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
15881         exist.
15882         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
15883
15884 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15885
15886         Changes imported from coreutils.
15887         * lib/hard-locale.c: Assume <locale.h> exists.
15888         Include "strdup.h".
15889         (GLIBC_VERSION): New macro.
15890         (hard_locale): Assume setlocale exists.
15891         Rewrite to avoid #ifdef.
15892         Use strdup rather than malloc + strcpy.
15893         * lib/human.c: Assume <locale.h> exists.
15894         (human_readable): Assume localeconv exists.
15895
15896 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15897
15898         * modules/hard-locale (Depends-on): Add strdup.
15899
15900 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
15901
15902         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
15903         convert T2, not T.  (Imported from libc.)
15904
15905 2004-11-30  Simon Josefsson  <jas@extundo.com>
15906
15907         * modules/restrict (License): Change to LGPL.
15908
15909 2004-11-30  Simon Josefsson  <jas@extundo.com>
15910
15911         * m4/restrict.m4: Add copyright and copying conditions.
15912
15913 2004-11-30  Simon Josefsson  <jas@extundo.com>
15914
15915         * m4/base64.m4: New file.
15916
15917 2004-11-30  Simon Josefsson  <jas@extundo.com>
15918
15919         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
15920         base64.
15921
15922         * tests/test-base64.c: New file.
15923
15924         * modules/base64: New file.
15925
15926 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
15927
15928         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
15929         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
15930
15931         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
15932
15933 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
15934
15935         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
15936         (__getcwd.c): Don't restore errno; glibc doesn't.
15937         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
15938         first, falling back to our code only if its results look suspicious.
15939         Ensure that the resulting buffer is only as large as necessary.
15940
15941         * lib/readutmp.c: Include readutmp.h first.
15942         Include <errno.h>, since readutmp.h no longer does that.
15943         * lib/readutmp.h: Don't include <errno.h>,
15944         <sys/param.h>, <time.h>; not needed to establish interface.
15945         (errno): Remove decl.
15946         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
15947         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
15948         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
15949
15950 2004-11-28  Simon Josefsson  <jas@extundo.com>
15951
15952         * lib/base64.h, base64.c: New file.
15953
15954 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
15955
15956         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
15957
15958 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
15959
15960         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
15961         (Depends-on): Remove pathmax, same.  Add mempcpy.
15962         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
15963         (Makefile.am): Append getcwd.h to lib_SOURCES.
15964         (Include): Add getcwd.h.
15965         (Maintainer): Change from Jim Meyering to "all, glibc",
15966         since getdate now uses intended-for-glibc code.
15967         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
15968         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
15969
15970 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
15971
15972         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
15973         HP's ANSI C compiler.
15974         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
15975         Declaring int functions causes warnings on some modern systems and
15976         shouldn't be needed to compile on ancient ones.
15977         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
15978         defined.
15979
15980         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
15981         with the following changes.
15982         (__set_errno): Parenthesize properly.
15983         Include <stdbool.h>.
15984         (MIN, MAX, MATCHING_INO): New macros.
15985         (__getcwd): Define with prototype, not K&R form.
15986         Use heuristics to allocate default buffer on stack if possible.
15987         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
15988         behavior, and to avoid the PATH_MAX limit when computing
15989         ../../../../...
15990         Use MATCHING_INO to compare inode number to file.
15991         Check for arithmetic overflow in size calculations.
15992         Fix bug in reallocation of dot array that caused getcwd to fail
15993         on directories nested deeper than 75.
15994         Be more careful about saving errno on error.
15995         Do not use realloc; use only free+malloc, as this is a bit
15996         more flexible and avoids a needless copy operation.
15997         Do not inspect st_dev and st_ino for symbolic links; POSIX
15998         doesn't specify the latter.
15999         Check for closedir errors.
16000         Avoid needless casts.
16001         Use "#ifdef weak_alias" around weak_alias, to be like other
16002         glibc code.
16003         The following changes to getcwd.c have effect only when used in
16004         gnulib; they have no effect inside glibc proper.
16005         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
16006         as alloca isn't used.
16007         (alloca, __alloca): Likewise.
16008         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
16009         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
16010         unconditionally, as gnulib assumes C89 or better.
16011         Do not include <sys/param.h>.
16012         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
16013         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
16014         better.
16015         (NULL) [!defined NULL]: Remove; we assume C89 or better.
16016         Include <dirent.h> in a way that is compatible with modern Autoconf.
16017         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
16018         New macros, if not already defined.
16019         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
16020         Use "_LIBC", not "defined _LIBC", for consistency.
16021         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
16022         a mempcpy module.
16023         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
16024         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
16025         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
16026         credit only to Jim Meyering and adjust the copyright dates.
16027         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
16028         <stdlib.h>, <unistd.h>, "pathmax.h".
16029         Instead, include "xgetcwd.h" (first) and "getcwd.h".
16030         (INITIAL_BUFFER_SIZE): Remove.
16031         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
16032
16033 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
16034
16035         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
16036         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
16037         Use the _ONCE methods, for efficiency.
16038         Check for fcntl.h.  In test program, include <errno.h>
16039         and <fcntl.h> if available.  Remove old K&R cruft from
16040         test program.  Check for common errors in GNU/Linux,
16041         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
16042         don't do AC_LIBOBJ, as that's getcwd.m4's job.
16043         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
16044         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
16045         name accordingly.
16046         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
16047         accommodate new getcwd.c.
16048         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
16049         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
16050         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
16051         that's all we need now.
16052
16053 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16054
16055         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
16056         argp-parse.c depends on getopt internals, that means we should
16057         always use our getopt, to be on the safe side.
16058         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
16059         order not to spoil the result of an eventual previous invocation
16060         of gl_GETOPT_SUBSTITUTE.
16061
16062 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16063
16064         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
16065         redefinition warnings. To avoid them, include the defines
16066         in `#if !defined __need_getopt ... #endif'. The only place
16067         where __getopt_argv_const is used is in definitions
16068         of getopt_long and getopt_long_only below, which are as well
16069         protected by `#ifndef __need_getopt'.
16070         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
16071         __need_getopt after including <stdio.h> and <unistd.h> These
16072         headers might have defined it.
16073
16074 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
16075
16076         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
16077
16078 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
16079
16080         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
16081         (futimens): New function, which uses futimes if available.
16082         (futimens, utimens): Support timespec==NULL, with same semantics
16083         as utime and utimens.
16084         * lib/utimens.h (futimens): New decl.
16085
16086 2004-11-23  Jim Meyering  <jim@meyering.net>
16087
16088         * lib/getopt_.h: Remove trailing blanks.
16089
16090 2004-11-23  Jim Meyering  <jim@meyering.net>
16091
16092         * lib/__fpending.c: Add comment.
16093
16094 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
16095
16096         * modules/canonicalize (Depends-on): Add xreadlink.
16097         Problem reported by James Youngman.
16098
16099 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
16100
16101         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
16102         New macros.
16103         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
16104         optopt): Use them instead of invoking ## directly; otherwise, the
16105         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
16106
16107 2004-11-19  Bruno Haible  <bruno@clisp.org>
16108
16109         * lib/strtok_r.c: Move comments from here...
16110         * lib/strtok_r.h: ... to here.
16111
16112 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
16113
16114         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
16115         implementations that mishandle size_t overflow.
16116
16117 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
16118
16119         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
16120         might fail.  Problem reported by Yoann Vandoorselaere.
16121         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
16122         implementations that mishandle size_t overflow.
16123
16124 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16125
16126         * modules/canon-host (Depends-on): Add strdup.
16127
16128 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16129
16130         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
16131
16132 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16133
16134         * lib/canon-host.c: Include "strdup.h".
16135         (canon_host): Use getaddrinfo if available, so that IPv6 works.
16136         Use strdup instead of malloc/strcpy to duplicate strings.
16137
16138         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
16139         (human_space_before_unit): New constant.
16140         * lib/human.c (human_readable): Support it.
16141
16142         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
16143         (xgetcwd): Set errno correctly when failing.
16144         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
16145         the failure is actually due to a PATH_MAX problem.
16146
16147         Further getopt changes to make it more likely that glibc will
16148         buy the changes back.
16149         * lib/getopt.c (POSIXLY_CORRECT): New constant.
16150         (getopt): Use it, so to preserve glibc semantic
16151         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
16152         when compiling for libc.
16153         * lib/getopt_.h (__getopt_argv_const): Bring it back.
16154         (getopt_long, getopt_long_only): Use it.
16155
16156         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
16157         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
16158         (getopt): Argv is now char * const *, as per standard.
16159         (_getopt_internal_r, _getopt_internal): Argv is now char **,
16160         not char *__getopt_argv_const *.
16161         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
16162         _getopt_long_only_r): Likewise.
16163         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
16164         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
16165         _getopt_long_r, _getopt_long_only_r): Likewise.
16166         * lib/getopt_.h (__getopt_argv_const): Remove.
16167         (getopt): Argv is now char * const *, as per standard.
16168
16169         * lib/getdate.y (tORDINAL): New token.
16170         (day, relunit): Allow it for relative times.
16171         (relative_time_table): Use tORDINAL for ordinals.
16172
16173 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16174
16175         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
16176         Document that "second" isn't allowed as an ordinal number.
16177
16178 2004-11-16  Jim Meyering  <jim@meyering.net>
16179
16180         * modules/closeout (Depends-on): Add fpending.
16181
16182 2004-11-15  Jim Meyering  <jim@meyering.net>
16183
16184         * lib/closeout.c: Include "__fpending.h" once again.
16185         Include <stdbool.h>.
16186         (close_stdout): Don't fail just because stdout was closed initially,
16187         since some programs don't write to stdout in the normal course of
16188         operation (other than --version and --help), and we don't want this
16189         function to make e.g. `touch file >&-' fail.
16190         But do fail if it was closed and someone has tried to write to it.
16191         E.g., `printf foo >&-' must fail.
16192
16193 2004-11-13  Jim Meyering  <jim@meyering.net>
16194
16195         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
16196
16197 2004-11-12  Simon Josefsson  <jas@extundo.com>
16198
16199         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
16200         small doc fix is still pending.
16201
16202 2004-11-11  Simon Josefsson  <jas@extundo.com>
16203
16204         * modules/strtok_r: New file.
16205
16206         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16207         strtok_r.
16208
16209 2004-11-11  Simon Josefsson  <jas@extundo.com>
16210
16211         * m4/strtok_r.m4: New file.
16212
16213         * m4/getopt.m4: Replace opterr.
16214
16215 2004-11-11  Simon Josefsson  <jas@extundo.com>
16216
16217         * lib/strtok_r.h, strtok_r.c: New file.
16218
16219 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
16220
16221         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
16222         of replacing opterr, getopt, etc.  This should handle the
16223         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
16224
16225 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
16226
16227         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
16228         we can stop lying to compilers about the constness of argv when we
16229         are compiled outside glibc.
16230         (getopt, getopt_long, getopt_long_only): Use it.
16231         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
16232         _getopt_internal, getopt): Likewise.
16233         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
16234         _getopt_long_only_r): Likewise.
16235         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
16236         _getopt_long_r, _getopt_long_only_r): Likewise.
16237
16238         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
16239         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
16240         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
16241         the other external symbols.
16242         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
16243         declaration, since the above renaming now works around collisions.
16244
16245 2004-11-11  Jim Meyering  <jim@meyering.net>
16246
16247         * lib/linebreak.c: Remove trailing blanks.
16248         * lib/alloca_.h: Likewise.
16249         * lib/acosl.c: Likewise.
16250         * lib/euidaccess.c: Likewise.
16251         * lib/allocsa.h: Likewise.
16252
16253 2004-11-10  Simon Josefsson  <jas@extundo.com>
16254
16255         * m4/getaddrinfo.m4: New file.
16256
16257 2004-11-10  Simon Josefsson  <jas@extundo.com>
16258
16259         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
16260
16261 2004-11-10  Simon Josefsson  <jas@extundo.com>
16262
16263         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16264         getaddrinfo.
16265
16266         * modules/getaddrinfo: New file.
16267
16268 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16269
16270         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
16271
16272 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16273
16274         * lib/mktime.c (SHR): New macro, which is a portable
16275         substitute for >> that should work even on Crays.
16276         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
16277         Problem reported by Mark D. Baushke in
16278         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
16279         * lib/getdate.y (SHR): Likewise.
16280         (tm_diff): Use it.
16281         * lib/strftime.c (SHR): Likewise.
16282         (tm_diff): Use it.
16283         * lib/quotearg.c (struct quoting_options): Use unsigned int for
16284         quote_these_too, so that right shifts are well defined.  All uses
16285         changed.
16286
16287 2004-11-10  Jim Meyering  <jim@meyering.net>
16288
16289         Ensure that no close failure goes unreported.
16290         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
16291         return early when it seems there's nothing to flush.
16292         Don't include __fpending.h.
16293
16294 2004-11-10  Jim Meyering  <jim@meyering.net>
16295
16296         * modules/closeout (Depends-on): Remove fpending.
16297
16298 2004-11-10  Jim Meyering  <jim@meyering.net>
16299
16300         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
16301
16302 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
16303
16304         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
16305         gl_FUNC_STRFTIME.
16306         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
16307         and AC_REQUIRE when possible, to avoid duplicate checks.
16308         Check for <wchar.h>.
16309
16310 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
16311
16312         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
16313
16314 2004-11-09  Bruno Haible  <bruno@clisp.org>
16315
16316         * m4/sockpfaf.m4: New file.
16317
16318 2004-11-05  Bruno Haible  <bruno@clisp.org>
16319
16320         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
16321         Reported by Mark D. Baushke <mdb@cvshome.org>.
16322
16323 2004-11-04  Bruno Haible  <bruno@clisp.org>
16324
16325         2004-09-11  Bruno Haible  <bruno@clisp.org>
16326                 * allocsa.valgrind: New file.
16327         2004-02-06  Bruno Haible  <bruno@clisp.org>
16328                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
16329                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
16330                 Reported by Christopher Seip <chris.seip@hp.com>.
16331
16332 2004-11-04  Bruno Haible  <bruno@clisp.org>
16333
16334         * modules/allocsa (Files): Add lib/allocsa.valgrind.
16335         (Makefile.am): Distribute it.
16336
16337 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
16338
16339         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
16340         with errno == ERANGE if the buffer is too small.
16341         Problem reported by Mark D. Baushke.
16342
16343 2004-11-03  Albert Chin  <china@thewrittenword.com>
16344             Paul Eggert  <eggert@cs.ucla.edu>
16345
16346         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
16347         equivalent, substitute $ac_type for equivalent type rather than
16348         blindly using uint32_t *always* which won't work if uint32_t is not
16349         available.  Define _UINT32_T to work around typedef of uint32_t if
16350         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
16351         2.5.1.
16352
16353 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16354
16355         * m4/jm-macros.m4: Sync from coreutils.
16356         (gl_MACROS): Check for mbrlen, for pathchk.
16357         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
16358
16359 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16360
16361         * lib/xreadlink.c (MAXSIZE): New macro.
16362         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
16363         size does not exceed MAXSIZE.  Avoid cast.
16364         As suggested by Mark D. Baushke in
16365         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
16366         if readlink fails with buffer size just under MAXSIZE, try again
16367         with MAXSIZE.
16368
16369 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16370
16371         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
16372
16373 2004-11-02  Derek R. Price  <derek@ximbiot.com>
16374         and  Paul Eggert  <eggert@cs.ucla.edu>
16375
16376         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
16377         (get_date): Overparenthesize to avoid GCC warning.
16378
16379 2004-11-02  Bruno Haible  <bruno@clisp.org>
16380
16381         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
16382         returns void.
16383
16384 2004-11-02  Bruno Haible  <bruno@clisp.org>
16385
16386         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
16387         function returns void.
16388
16389 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
16390
16391         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
16392         fflush_unlocked, flockfile, funlockfile, funlockfile,
16393         fputs_unlocked, putc_unlocked.
16394
16395 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
16396
16397         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
16398         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
16399         already declared.
16400
16401 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16402
16403         * modules/getdate (Files): Add doc/getdate.texi.
16404         (Depends-on): Add setenv, xalloc.
16405
16406 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16407
16408         * lib/getdate.y: Add support for TZ="foo" within a date string.
16409         Fix some bugs near time_t boundaries.  Reject dates with
16410         out-of-range components, e.g., "Sept 31".
16411         Include <stdlib.h>, "setenv.h", "xalloc.h".
16412         (ISDIGIT_LOCALE): Remove; unused.
16413         Note that the TZ and time functions used here are not reentrant.
16414         (mktime_ok, get_tz): New functions.
16415         (TZBUFSIZE): New constant.
16416         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
16417         This requires that we sometimes generate our own TZ="XXX..." setting.
16418
16419 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16420
16421         * doc/getdate.texi: New file, from coreutils with modifications for
16422         the new TZ parsing.
16423
16424 2004-10-27  Derek R. Price  <derek@ximbiot.com>
16425
16426         * lib/mktime.c (not_equal_tm): Remove redundant check.
16427
16428 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
16429
16430         * modules/regex (lib_SOURCES): Add regex.c.
16431         Reported by James Youngman in
16432         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
16433
16434 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
16435
16436         * lib/getdate.y: Use Bison 1.875 features, and some minor
16437         code cleanups.  This change does not affect semantics.
16438         Don't include <stdlib.h>; no longer needed.
16439         Don't include unlocked-io.h; only the "#if TEST" code uses
16440         stdio, and performance isn't crucial there.
16441         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
16442         Bison 1.875 features as described below.
16443         All uses of "PC." replaced by "pc->".
16444         (YYSTYPE): Add a forward declaration.
16445         (yylex, yyerror): Use full prototypes in forward decls.
16446         Use "%pure-parser" rather than obsolescent "%pure_parser".
16447         Use %parse-param and %lex-param instead of obsolescent
16448         YYPARSE_PARAM and YYLEX_PARAM.
16449         (meridian_table, month_and_day_table, time_units_table,
16450         relative_time_table, time_zone_table, military_table,
16451         lookup_zone, lookup_word, get_date):
16452         Use NULL instead of 0 where appropriate.
16453         (to_hour): Avoid abort (), to avoid a dependency on
16454         stdlib.h.
16455         (yyerror, yylex): Now accepts parser_control * arg.
16456         (main) [TEST]: Use '\0' rather than 0 for char.
16457
16458 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
16459
16460         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
16461
16462 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
16463
16464         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
16465         It's now the caller's responsibility to handle the case where
16466         !HAVE_GETPAGESIZE && !defined getpagesize.
16467
16468         * lib/mktime.c (leapyear): Arg is long int, not int.
16469
16470 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
16471
16472         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
16473
16474 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
16475
16476         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
16477         missing.  Problem reported by James Youngman.
16478
16479 2004-10-16  Simon Josefsson  <jas@extundo.com>
16480
16481         * gnulib-tool: Fix comments.  Fix parse problem.
16482         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
16483
16484 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
16485
16486         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
16487         implementation of getopt_long.  Problem reported by Alexander Taler in:
16488         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
16489
16490 2004-10-15  Bruno Haible  <bruno@clisp.org>
16491
16492         * gnulib-tool: Untabify. Initialize supplied_libname.
16493         (func_usage): More homogenous output.
16494         (func_modules_transitive_closure, func_modules_to_filelist,
16495         func_emit_lib_Makefile_am): New functions.
16496         (func_import): New function, extracted from big case statement. Use
16497         func_get_license, func_modules_transitive_closure,
16498         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
16499         opt_lgpl. Don't use test -a, as it's not portable.
16500         (func_create_testdir): Use func_modules_transitive_closure,
16501         func_modules_to_filelist, func_emit_lib_Makefile_am.
16502
16503 2004-10-15  Bruno Haible  <bruno@clisp.org>
16504
16505         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
16506
16507 2004-10-15  Bruno Haible  <bruno@clisp.org>
16508
16509         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
16510         the portions belonging to each module.
16511         Suggested by Derek Robert Price <derek@ximbiot.com>.
16512
16513 2004-10-12  Simon Josefsson  <jas@extundo.com>
16514
16515         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
16516         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
16517         to real functions.
16518
16519 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16520
16521         * modules/vsnprintf: New file.
16522
16523 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16524
16525         * m4/vsnprintf.m4: New file.
16526
16527 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16528
16529         * lib/vsnprintf.h: New file.
16530         * lib/vsnprintf.c: New file.
16531
16532 2004-10-11  Bruno Haible  <bruno@clisp.org>
16533
16534         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
16535         vsnprintf.
16536
16537 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
16538
16539         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
16540
16541 2004-10-07  Bruno Haible  <bruno@clisp.org>
16542
16543         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
16544         fits into the provided buffer.
16545
16546 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
16547
16548         * lib/diacrit.c, diacrit.h: Add GPL notice.
16549
16550         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
16551         notice.
16552         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
16553         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
16554         This avoids a potential constant-folding bug.
16555
16556 2004-10-05  Bruno Haible  <bruno@clisp.org>
16557
16558         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
16559         for the declaration of strsep.
16560
16561 2004-10-05  Bruno Haible  <bruno@clisp.org>
16562
16563         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
16564
16565 2004-10-04  Simon Josefsson  <jas@extundo.com>
16566
16567         * modules/memmem: New file.
16568         * tests/test-memmem.c: New file.
16569         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
16570
16571 2004-10-04  Simon Josefsson  <jas@extundo.com>
16572
16573         * m4/memmem.m4: New file.
16574
16575 2004-10-04  Simon Josefsson  <jas@extundo.com>
16576
16577         * lib/memmem.h: New file.
16578         * lib/memmem.c: New file, taken from glibc.
16579
16580 2004-10-04  Simon Josefsson  <jas@extundo.com>
16581
16582         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
16583         '#ifdef USE_UNLOCKED_IO'.
16584
16585 2004-10-04  Simon Josefsson  <jas@extundo.com>
16586
16587         * config/srclist.txt: Add memmem from glibc.
16588
16589 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16590
16591         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
16592
16593         * modules/argmatch, modules/argp, modules/closeout, modules/error,
16594         modules/exclude, modules/getdate, modules/getline,
16595         modules/getndelim2, modules/getpass, modules/getpass-gnu,
16596         modules/getusershell, modules/linebuffer, modules/md5,
16597         modules/mountlist, modules/posixtm, modules/readtokens,
16598         modules/readutmp, modules/regex, modules/sha1,
16599         modules/version-etc, modules/yesno:
16600         Remove dependency on unlocked-io.
16601
16602 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16603
16604         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
16605
16606         * m4/unlocked-io.m4: Add copyright notice.
16607         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
16608
16609 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16610
16611         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
16612         * lib/xmalloc.c (xmemdup): Likewise.
16613         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
16614         XFREE): Remove these long-obsolescent macros.
16615         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
16616         * lib/xstrdup.c: Remove.
16617
16618         * lib/regex.c (re_comp): Cast gettext return value to char *,
16619         Problem reported by Martin Neitzel via Mark D. Baushke.
16620
16621 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16622
16623         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
16624         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
16625         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
16626         regex.c, sha1.c, version-etc.c, yesno.c:
16627         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
16628         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
16629         the includer's responsibility.
16630
16631         Sync from coreutils.
16632
16633         * lib/modechange.c (mode_compile): Don't decrement a pointer that
16634         points to the start of a string, as the C Standard says the
16635         resulting behavior is undefined.
16636
16637         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
16638         simple -> simple_backups, numbered_existing ->
16639         numbered_existing_backups, numbered -> numbered_backups
16640         to avoid shadowing problems.  All uses changed.
16641         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
16642         * lib/backupfile.c (check_extension, numbered_backup):
16643         Rename locals to avoid shadowing 'basename'.
16644         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
16645         once.
16646
16647         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
16648         * lib/.cvsignore: Add getopt.h.
16649
16650 2004-10-04  Bruno Haible  <bruno@clisp.org>
16651
16652         * modules/README: New file.
16653         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
16654         not a module.
16655
16656 2004-10-02  Jim Meyering  <jim@meyering.net>
16657
16658         * lib/dirfd.h, getpagesize.h: Add copyright notice.
16659
16660 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16661
16662         * modules/strsep: New file.
16663
16664 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16665
16666         * m4/strsep.m4: New file.
16667
16668 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16669
16670         * lib/strsep.h: New file.
16671         * lib/strsep.c: New file.
16672
16673 2004-10-01  Simon Josefsson  <jas@extundo.com>
16674
16675         * lib/snprintf.c (snprintf): Handle size==0.
16676
16677 2004-10-01  Simon Josefsson  <jas@extundo.com>
16678             Bruno Haible  <bruno@clisp.org>
16679
16680         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
16681         (snprintf): Declare 'args'.
16682
16683 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
16684
16685         * lib/snprintf.c: Remove comments as to why each header is needed.
16686
16687 2004-10-01  Bruno Haible  <bruno@clisp.org>
16688
16689         * MODULES.html.sh: Add strsep.
16690
16691 2004-09-30  Simon Josefsson  <jas@extundo.com>
16692
16693         * modules/snprintf: New file.
16694
16695 2004-09-30  Simon Josefsson  <jas@extundo.com>
16696
16697         * m4/snprintf.m4: New file.
16698
16699 2004-09-30  Simon Josefsson  <jas@extundo.com>
16700
16701         * lib/snprintf.h, lib/snprintf.c: New files.
16702
16703 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16704
16705         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
16706         (hol_entry_help): Never translate an empty string.
16707         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
16708         * lib/argp.h (OPTION_NO_TRANS): New option.
16709
16710 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16711
16712         * modules/argp (Maintainer): Replace Simon Josefsson
16713         by Sergey Poznyakoff.
16714
16715 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16716
16717         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
16718         changes merged back into glibc.
16719
16720 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16721
16722         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
16723
16724 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
16725
16726         * lib/xvasprintf.c: Include xalloc.h.
16727         (xvasprintf): Use xalloc_die, not xmalloc_die.
16728
16729 2004-09-29  Bruno Haible  <bruno@clisp.org>
16730
16731         * modules/alloca-opt: New file, derived from modules/alloca.
16732         * modules/allocsa: Depend on alloca-opt instead of alloca.
16733         * modules/setenv: Likewise.
16734         * modules/vasnprintf: Likewise.
16735         * MODULES.html.sh: Add alloca-opt.
16736
16737 2004-09-28  Simon Josefsson  <jas@extundo.com>
16738
16739         * gnulib-tool: New parameter --lgpl, to asseert that modules are
16740         LGPL, and to replace license template from GPL to LGPL.
16741
16742 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
16743
16744         * modules/dummy: Change license to LGPL.
16745
16746 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
16747
16748         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
16749
16750 2004-09-24  Simon Josefsson  <jas@extundo.com>
16751
16752         * modules/minmax (License): Change from GPL to LGPL.
16753
16754 2004-09-23  Simon Josefsson  <jas@extundo.com>
16755
16756         * gnulib-tool (--import): Typo.
16757
16758 2004-09-23  Simon Josefsson  <jas@extundo.com>
16759
16760         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
16761
16762 2004-09-22  Bruno Haible  <bruno@clisp.org>
16763
16764         * modules/*: Add 'License' field.
16765         * gnulib-tool: Accept --extract-license option.
16766         (func_get_license): New function.
16767
16768 2004-09-21  Bruno Haible  <bruno@clisp.org>
16769
16770         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
16771         Reported by Simon Josefsson.
16772
16773 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
16774
16775         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
16776         gl_AC_TYPE_LONG_LONG.
16777
16778 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
16779
16780         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
16781
16782 2004-09-18  Simon Josefsson  <jas@extundo.com>
16783         and  Paul Eggert  <eggert@cs.ucla.edu>
16784
16785         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
16786         calls with autoreconf.  Define GL_LIB.
16787
16788 2004-09-14  Karl Berry  <karl@gnu.org>
16789
16790         * config/srclist.txt: unsync setenv.c, sigh.
16791
16792 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
16793
16794         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
16795         Problem reported by Bruno Haible in:
16796         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
16797
16798 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
16799
16800         * config/srclist.txt: Comment out argp-pvh.c.
16801
16802 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
16803
16804         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
16805         in case some system header has #define'd it.  Problem reported by
16806         Soeren D. Schulze in
16807         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
16808
16809 2004-09-09  Karl Berry  <karl@gnu.org>
16810
16811         * regex.[ch]: delete from the root.  These were supposed to be
16812                 synced with emacs cvs, but this has not happened for about
16813                 a year, and anyway nothing else uses emacs regex.[ch].
16814                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
16815                 lib/regex[.ch] is untouched.
16816
16817 2004-09-09  Bruno Haible  <bruno@clisp.org>
16818
16819         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
16820
16821 2004-09-09  Bruno Haible  <bruno@clisp.org>
16822
16823         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
16824         modifications.
16825         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
16826
16827 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
16828
16829         * modules/xvasprintf: New file.
16830         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
16831
16832 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
16833
16834         * lib/xvasprintf.h: New file.
16835         * lib/xvasprintf.c: New file.
16836         * lib/xasprintf.c: New file.
16837
16838 2004-09-08  Bruno Haible  <bruno@clisp.org>
16839
16840         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
16841
16842 2004-09-08  Bruno Haible  <bruno@clisp.org>
16843
16844         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
16845         length is > INT_MAX.
16846         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
16847         more.
16848
16849 2004-09-08  Bruno Haible  <bruno@clisp.org>
16850
16851         * lib/stdint_.h: New file, taken from GNU clisp.
16852
16853 2004-09-08  Bruno Haible  <bruno@clisp.org>
16854             Oskar Liljeblad  <oskar@osk.mine.nu>
16855
16856         * modules/stdint: New file.
16857         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
16858
16859 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16860
16861         Import from coreutils.
16862         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
16863         strings on unbounded length.  alloca's performance benefits aren't
16864         that important here.
16865         (V_STRDUP): Remove.
16866         (parse_with_separator): New function, with most of the internals
16867         of the old parse_user_spec.  Allow user to omit both user and group,
16868         for compatibility with FreeBSD.
16869         Clone only the user name, not the entire spec.
16870         Do not set *uid, *gid unless entirely successful.
16871         Avoid memory leak in some failing cases.
16872         Fix regression for USER.GROUP reported by Dmitry V. Levin in
16873         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
16874         (parse_user_spec): Rewrite to use parse_with_separator.
16875
16876 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16877
16878         * modules/userspec: Don't depend on alloca.
16879
16880 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16881
16882         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
16883
16884 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
16885
16886         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
16887         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
16888         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
16889
16890 2004-08-16  Simon Josefsson  <jas@extundo.com>
16891
16892         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
16893         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
16894         Add --dry-run for --import.
16895         Let user provided command line parameters override configure.ac
16896         settings.
16897
16898 2004-08-12  Simon Josefsson  <jas@extundo.com>
16899
16900         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
16901         as discussed with Paul Eggert in threads rooted at
16902         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
16903         and
16904         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
16905         Before, the test was empty, and relied on ELIDE_CODE in source
16906         code.)
16907         (gl_PREREQ_GETOPT): New macro.
16908         (gl_GETOPT): Use them.
16909
16910 2004-08-12  Simon Josefsson  <jas@extundo.com>
16911
16912         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
16913         * lib/getopt_.h: Renamed from getopt.h.
16914
16915 2004-08-12  Simon Josefsson  <jas@extundo.com>
16916
16917         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
16918         Change default library name from libfoo to libgnu.
16919         Now, if you have a configure.ac that says:
16920                 gl_SOURCE_BASE(gl)
16921                 gl_M4_BASE(gl/m4)
16922                 gl_MODULES(error getopt etcetera)
16923                 gl_INIT
16924         you can import all you need by running:
16925                 ../gnulib/gnulib-tool --import
16926
16927         * modules/getopt (Files): Rename getopt.h to getopt_.h.
16928         (Makefile.am): Rewrite, use logic from argz.
16929         (Include): Use <getopt.h> instead of "getopt.h".
16930
16931 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16932
16933         * modules/argp (Files): Add m4/unlocked-io.m4.
16934         (Depends-on): Add extensions.
16935
16936 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16937
16938         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
16939         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
16940         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
16941         Check for program_invocation_name, program_invocation_short_name,
16942         flockfile, funlockfile, features.h, _getopt_long_only_r.
16943
16944 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16945
16946         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
16947         its complicated substitute.
16948         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
16949         and program_invocation_name.
16950         (__argp_basename) [!_LIBC]: Remove; the only use was
16951         replaced by its body.
16952         (__argp_short_program_name): Change condition from
16953         !defined __argp_short_program_name to
16954         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
16955         to match argp-namefrob.h.
16956         (__argp_failure): Don't assume strerror_r returns char *.
16957         * lib/argp-parse.c (N_): Define unconditionally.
16958         (argp_default_options): Fill out initializers with 0 to avoid
16959         gcc warnings.
16960
16961 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16962
16963         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
16964         getopt1.c.
16965
16966 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16967
16968         Merge from coreutils.
16969
16970         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
16971
16972         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
16973         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
16974
16975 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16976
16977         Merge from coreutils.
16978
16979         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
16980         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
16981         for Reliant Unix 5.43.
16982
16983         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
16984         (union fooround): Use uintmax_t, not long int.
16985         The rest is a merge from libc:
16986         [defined _LIBC]: Include <shlib-compat.h>.
16987         (_obstack) [defined _LIBC]: Remove after 2.3.4.
16988
16989         * lib/settime.c (settime): Recode to avoid warning with
16990         Sun Forte C 6U2.
16991
16992         * lib/strverscmp.c: Convert to UTF-8.
16993
16994 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16995
16996         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
16997         m4/uintmax_t.m4.
16998
16999 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
17000
17001         * modules/xalloc-die: New file.
17002         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
17003
17004         * modules/md5 (Files): Add m4/uint32_t.m4.
17005         * modules/sha1: Renamed from modules/sha.
17006         (Files):
17007         Rename lib/sha.h to lib/sha1.h.
17008         Rename lib/sha.c to lib/sha1.c.
17009         Rename m4/sha.m4 to m4/sha1.m4.
17010         (lib_SOURCES): Likewise.
17011         (configure.ac): Rename gl_SHA to gl_SHA1.
17012         (Include): sha.h -> sha1.h.
17013
17014 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
17015
17016         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
17017         * m4/sha1.m4: Renamed from sha.m4.
17018         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
17019
17020 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
17021
17022         * lib/obstack.h (obstack_empty_p):
17023         Don't assume that chunk->contents is suitably aligned.
17024         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
17025         Likewise. Problem reported by Benno in
17026         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
17027
17028         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
17029         readable.  This could be improved further but it'd take some work.
17030
17031 2004-08-08  Simon Josefsson  <jas@extundo.com>
17032
17033         * modules/xgethostname (Depends-on): Remove exit and error (not
17034         used).
17035
17036         * modules/getpass-gnu: Add getpass.h.
17037         (Depends-on): Add stdbool.
17038         * modules/getpass: Add getpass.h.
17039
17040 2004-08-08  Simon Josefsson  <jas@extundo.com>
17041
17042         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
17043         Check getpass declaration.
17044
17045 2004-08-08  Simon Josefsson  <jas@extundo.com>
17046
17047         * lib/xgethostname.c: Don't include error.h (not used).
17048
17049         * lib/getpass.h: Add.
17050         * lib/getpass.c: Include getpass.h first.
17051
17052 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
17053
17054         * lib/xalloc-die.c: New file.
17055         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
17056         All uses removed.
17057         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
17058         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
17059         xalloc-die.c.
17060         (_, N_, xalloc_die): Move to xalloc-die.c.
17061         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
17062         so that we needn't mess with xalloc_msg_memory_exhausted.
17063
17064         * lib/sha1.h: Renamed from sha.h.
17065         (SHA1_H): Renamed from _SHA_H.
17066         (sha1_ctx): Renamed from sha_ctx.
17067         (sha1_init_ctx): Renamed from sha_init_ctx.
17068         (sha1_process_block): Renamed from sha_process_block.
17069         (sha1_process_bytes): Renamed from sha_process_bytes.
17070         (sha1_finish_ctx): Renamed from sha_finish_ctx.
17071         (sha1_read_ctx): Renamed from sha_read_ctx.
17072         (sha1_stream): Renamed from sha_stream.
17073         (sha1_buffer): Renamed from sha_buffer.
17074         * lib/sha1.c: Likewise; renamed from sha.c.
17075         Do not include <sys/types.h>.
17076         Include <stddef.h> rather than <stdlib.h>.
17077
17078 2004-08-08  Bruno Haible  <bruno@clisp.org>
17079
17080         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
17081         FILESYSTEM_PREFIX_LEN.
17082         * lib/progreloc.c: Likewise.
17083         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
17084
17085 2004-08-06  Simon Josefsson  <jas@extundo.com>
17086
17087         * modules/progname (Depends-on): Don't depend on stdbool.
17088
17089 2004-08-06  Simon Josefsson  <jas@extundo.com>
17090
17091         * modules/getsubopt: New file.
17092         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
17093         getsubopt.
17094
17095 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
17096
17097         More merge from coreutils.
17098
17099         * m4/utimens.m4, m4/utimecmp.m4: New files.
17100         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
17101         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
17102         prereq.m4, sha.m4: Import changes from coreutils.
17103
17104 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
17105
17106         More merge from coreutils.
17107         * modules/raise, modules/readtokens0, modules/utimens:
17108         * modules/utimecmp, module/xnanosleep: New files.
17109         * modules/strftime: Add lib/strftime.h.
17110         Change include from <time.h> to "strftime.h".
17111         * modules/yesno: Add lib/yesno.h.
17112         * modules/backupfile: Remove lib/addext.c.
17113         * modules/euidaccess: Add stat-macros.h.
17114         * modules/canonicalize, modules/euidaccess,
17115         modules/filemode, modules/lchown, modules/makepath,
17116         modules/rmdir, modules/stat: Likewise.
17117
17118 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
17119
17120         Merge from tar.
17121         * lib/argp-help.c (make_hol, hol_append): Don't assume that
17122         SIZE_MAX is a valid preprocessor constant.
17123         (__argp_basename): Change from "#ifndef _LIBC"
17124         to "#ifndef __argp_short_program_name", so that
17125         we don't compile these functions for tar.
17126
17127         More merges from coreutils.
17128         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
17129         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
17130         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
17131         * lib/addext.c: Remove; no longer needed.
17132         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
17133         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
17134         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
17135         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
17136         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
17137         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
17138         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
17139         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
17140         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
17141         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
17142         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
17143         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
17144         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
17145         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
17146         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
17147         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
17148         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
17149         Import changes from coreutils.
17150
17151 2004-08-05  Simon Josefsson  <jas@extundo.com>
17152
17153         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
17154
17155 2004-08-05  Simon Josefsson  <jas@extundo.com>
17156
17157         * m4/getsubopt.m4: New file.
17158
17159 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17160
17161         Merge from coreutils.
17162
17163         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
17164         * m4/getcwd-path-max.m4: New files.
17165
17166         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
17167         FILESYSTEM_PREFIX_LEN ->
17168         FILE_SYSTEM_PREFIX_LEN.
17169         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
17170         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
17171         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
17172         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
17173
17174         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
17175         prerequisite modules now handle the DOS stuff.
17176         Don't check for unistd.h.
17177
17178 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17179
17180         Merge from coreutils.
17181
17182         * lib/.gdb-history: Remove; this doesn't belong here.
17183
17184         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
17185         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
17186         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
17187         * lib/getcwd.c: New files.
17188
17189         * lib/dirname.h: Include <stdbool.h>.
17190         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
17191         for consistency with POSIX terminology.  All uses changed.
17192         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
17193         (strip_trailing_slashes): Use bool for booleans.
17194         * lib/stripslash.c (strip_trailing_slashes): Likewise.
17195
17196         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
17197         sometimes returns a positive errno value even when it succeeds.
17198         (print_errno_message) [!LIBC]: Fall back on strerror if
17199         __strerror_r fails.
17200
17201         * lib/path-concat.c (mempcpy): Don't define if a system header defines
17202         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
17203         (longest_relative_suffix): New function.
17204         (path_concat): Use it.  Assume first argument is not NULL.
17205         Port to DOS.  Omit redundant separators.
17206         Report an error instead of returning NULL.
17207         Use mempcpy instead of memcpy.
17208         (xpath_concat): Remove: not declared or used.
17209
17210         * lib/same.h: Include <stdbool.h>
17211         (same_name): Return bool, not int.
17212         * lib/same.c (same_name): Likewise.
17213         (errno): Don't declare; we assume C89 or better now.
17214
17215         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
17216         if not already defined.
17217
17218         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
17219         * lib/dup-safer.c (errno): Likewise.
17220
17221 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17222
17223         Merge from coreutils.
17224         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
17225         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
17226         * modules/path-concat: Don't depend on strdup.
17227
17228 2004-08-03  Simon Josefsson  <jas@extundo.com>
17229
17230         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
17231         * lib/progname.h: Don't include stdbool.h.
17232
17233 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17234
17235         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
17236         * MODULES.html.sh (func_all_modules): Remove fatal.
17237
17238 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17239
17240         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
17241
17242 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17243
17244         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
17245         working.
17246
17247 2004-08-02  Simon Josefsson  <jas@extundo.com>
17248
17249         * lib/getsubopt.h: New file, with comments from Bruno Haible.
17250         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
17251         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
17252
17253 2004-08-01  Simon Josefsson  <jas@extundo.com>
17254
17255         * lib/xgetdomainname.c: Include stdlib.h, for free().
17256
17257 2004-07-19  Bruno Haible  <bruno@clisp.org>
17258
17259         * MODULES.html.sh (func_all_modules): Add dummy.
17260
17261 2004-07-16  Simon Josefsson  <jas@extundo.com>
17262
17263         * modules/dummy: New file.
17264
17265 2004-07-16  Simon Josefsson  <jas@extundo.com>
17266
17267         * lib/dummy.c: New file.
17268
17269 2004-07-16  Bruno Haible  <bruno@clisp.org>
17270
17271         * lib/backupfile.h: Add extern "C" for C++.
17272         * lib/closeout.h: Likewise.
17273         * lib/copy-file.h: Likewise.
17274         * lib/findprog.h: Likewise.
17275         * lib/full-write.h: Likewise.
17276         * lib/pathname.h: Likewise.
17277         * lib/progname.h: Likewise.
17278         * lib/stpcpy.h: Likewise.
17279         * lib/stpncpy.h: Likewise.
17280         * lib/strcase.h: Likewise.
17281         * lib/strstr.h: Likewise.
17282         * lib/xalloc.h: Likewise.
17283
17284         * lib/mbswidth.h: Add extern "C" for C++.
17285         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
17286
17287 2004-07-13  Robert Millan  <robertmh@gnu.org>
17288
17289         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
17290
17291 2004-07-09  Simon Josefsson  <jas@extundo.com>
17292
17293         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
17294         failed without this.)
17295
17296 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
17297
17298         * modules/chown (Files): Add lib/fchown-stub.c, since
17299         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
17300
17301 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
17302
17303         * lib/fchown-stub.c: New file.
17304
17305 2004-06-24  Jim Meyering  <jim@meyering.net>
17306
17307         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
17308
17309 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17310
17311         * modules/argz: Omit "#include".
17312
17313         * MODULES.html.sh (func_all_modules): Add calloc, to match
17314         2004-06-01 addition of calloc module.
17315
17316 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17317
17318         * m4/argz.m4: New file, which is autoupdated from libtool.
17319
17320 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17321
17322         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
17323         libtool.
17324
17325 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17326
17327         * config/srclist-update: Don't insist on "USA." before the
17328         close-comment, as libtool omits the period and puts the */ on a
17329         separate line.
17330         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
17331         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
17332
17333 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
17334
17335         * modules/argz: New file.
17336         * MODULES.html.sh (func_all_modules): Add argz.
17337
17338 2004-06-12  Jim Meyering  <jim@meyering.net>
17339         and  Paul Eggert  <eggert@cs.ucla.edu>
17340
17341         * modules/hash (Files): Add lib/xalloc.h.
17342         * modules/pipe (Depends-on): Add wait-process.
17343         * modules/stat (Depends-on): Add xalloc.
17344         * modules/userspec (Files): Add lib/userspec.h.
17345         * modules/xstrto
17346
17347         Upgrade from gettext-0.13.
17348         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
17349         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
17350         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
17351
17352 2004-06-10  Jim Meyering  <jim@meyering.net>
17353
17354         * lib/calloc.c: New file.
17355
17356 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
17357
17358         * lib/getdate.y (yylex): Allow space between sign and number.
17359         Problem reported by Dan Jacobson.
17360
17361 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
17362
17363         Merge from coreutils CVS.
17364
17365         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
17366         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
17367         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
17368         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
17369         xstrtol.m4: Fix copyright date and/or serial number.
17370
17371         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
17372         See if we need an fchown replacement.
17373         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
17374         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
17375         and use the replacement function if we detect either defect.
17376
17377         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
17378         gl_UTIMECMP.
17379
17380 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
17381         and  Jim Meyering  <jim@meyering.net>
17382
17383         Merge from coreutils CVS.
17384
17385         * lib/stat-macros.h: New file, with contents from file-type.h
17386         and coreutils' system.h.
17387         * lib/file-type.c: Include "stat-macros.h".
17388         * lib/file-type.h (file_type): Move all macro definitions to new file,
17389         stat-macros.h.
17390
17391         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
17392         Wrap old code with this conditional.
17393         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
17394         function that does not dereference symlinks.
17395         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
17396
17397         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
17398         dependency problems.
17399         (xreadlink): Accept new arg SIZE, for efficiency.
17400         All decls and uses changed.
17401         * lib/xreadlink.h: Include <stddef.h>, for size_t.
17402
17403         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
17404         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
17405
17406         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
17407         sysexits.h.
17408
17409 2004-06-01  Jim Meyering  <jim@meyering.net>
17410
17411         * m4/calloc.m4: New file.
17412
17413 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
17414
17415         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
17416         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
17417         Also, fix a typo in a diagnostic.
17418
17419 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
17420
17421         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
17422         or AC_FUNC_REALLOC.
17423
17424 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
17425
17426         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
17427         macros to be defined.
17428         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
17429         the allocator returns NULL because the requested size is zero.
17430
17431 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
17432
17433         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
17434         var.  Add comment explaining why libc still defines it.  This
17435         merges the following patch from glibc:
17436         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
17437
17438 2004-05-20  Andreas Schwab  <schwab@suse.de>
17439
17440         * m4/free.m4: Replace free if it not known to work, not the other
17441         way round.
17442
17443 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
17444
17445         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
17446         present in glibc since revision 1.1 of this file.
17447         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
17448         obstack_alignment_mask, obstack_alloc, obstack_base,
17449         obstack_blank, obstack_blank_fast, obstack_chunk_size,
17450         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
17451         obstack_grow0, obstack_init, obstack_int_grow,
17452         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
17453         obstack_next_free, obstack_object_size, obstack_ptr_grow,
17454         obstack_ptr_grow_fast, obstack_room): Remove declarations of
17455         nonexistent functions.
17456
17457 2004-05-18  Karl Berry  <karl@gnu.org>
17458
17459         * config/srclist.txt: break link for vasnprintf.c.
17460
17461 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
17462
17463         Port obstack to the AS/400, where pointers are 16 bytes wide and
17464         you cannot cast an integer to a valid pointer.  This patch is
17465         currently waiting to be integrated into glibc; see
17466         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
17467
17468         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
17469         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
17470         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
17471         (struct obstack): temp member is now a union of a pointer and
17472         an integer, instead of an integer.  All integer uses changed.
17473         This does not affect the physical layout of struct obstack,
17474         except on hosts (like the AS/400) where the size or alignment of
17475         void * is greater than that of ptrdiff_t.
17476         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
17477         __STDC__)]: Store temporary in pointer member of union, not
17478         integer member.
17479         * lib/obstack.c: Include <stddef.h>, for offsetof.
17480         (struct fooalign): Remove; it doesn't need a name.
17481         (union fooround): Change double to long double, and add void *.
17482         (DEFAULT_ALIGNMENT): Use offsetof to compute.
17483         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
17484         not a macro.  Hence the values are always int; so remove all
17485         casts-to-int in uses.
17486
17487 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
17488
17489         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
17490         we can get this patch merged into glibc.
17491
17492 2004-05-17  Derek R. Price  <derek@ximbiot.com>
17493             Paul Eggert  <eggert@cs.ucla.edu>
17494
17495         * m4/argp: Depend on alloca.
17496
17497 2004-05-17  Derek R. Price  <derek@ximbiot.com>
17498             Paul Eggert  <eggert@cs.ucla.edu>
17499
17500         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
17501         freecoding.
17502
17503 2004-05-17  Bruno Haible  <bruno@clisp.org>
17504
17505         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
17506         precision that consists of a '.' followed by an empty digit string.
17507         Patch by Tor Lillqvist <tml@iki.fi>.
17508
17509 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
17510
17511         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
17512         for backward compatibility with older code.  We need our own
17513         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
17514         it under some other name, and our alloca.h will define it.
17515
17516 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
17517             Derek Price  <derek@ximbiot.com>
17518
17519         * lib/alloca.c: Include <alloca.h>, to get our interface.
17520         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
17521         include <alloca.h> first.  Use C89 prototype for alloca; this
17522         requires including <stddef.h> for size_t.  Use extern "C" if C++.
17523         Use #elif for simplicity, since we can assume C89 now.
17524         Don't try to source the system alloca.h since it will not be found
17525         and to prevent recursively including its replacement.
17526         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
17527         * lib/regex.c: Likewise.
17528
17529 2004-05-16  Derek Price  <derek@ximbiot.com>
17530             Paul Eggert  <eggert@cs.ucla.edu>
17531
17532         getline cleanup.  This changes the getndelim2 API: both order of
17533         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
17534         no delimiter).
17535
17536         * lib/getline.c: Don't include stddef.h or stdio.h, since our
17537         interface does that.
17538         (getline): Always use getdelim, so that we don't have two
17539         copies of this code.
17540         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
17541         if available.
17542         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
17543         (GETNDELIM2_MAXIMUM): New macro.
17544         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
17545         instead of the old practice of delim2==0.  All callers changed.
17546         Return -1 on overflow, instead of returning junk.
17547         Do not set *linesize unless allocation succeeds.
17548         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
17549         that we include sys/types.h.
17550         * lib/getnline.h: Likewise.
17551         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
17552         (getndelim2): Reorder arguments.
17553         * lib/getnline.c (getnline, getndelim):
17554         Don't discard the NMAX argument.
17555         (getnline): Invoke getndelim, to avoid code duplication.
17556         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
17557         of (size_t) -1 by callers of the getnline family.
17558
17559 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
17560
17561         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
17562         Check for gettimeofday.
17563         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
17564         Check for settimeofday, stime.
17565
17566 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
17567
17568         * lib/nanosleep.c (suspended): Change its type from int to
17569         sig_atomic_t volatile.
17570         (first_call): Make it private to rpl_nanosleep, and have it
17571         be zero initially as that's a bit faster.
17572         (my_usleep): Round up fractional times instead of truncating them,
17573         as this is the usual meaning for 'sleep'.
17574
17575         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
17576         doesn't work.
17577         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
17578         (ENOSYS): Define if not defined.
17579         (settime): Fall back on stime if it exists and settimeofday fails.
17580         But don't bother with fallbacks if a method fails with errno == EPERM.
17581
17582 2004-05-11  Jim Meyering  <jim@meyering.net>
17583
17584         Prior to this change, the save_cwd caller required read access to the
17585         current directory on most systems (ones with the fchdir function).
17586
17587         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
17588         fails, try write-only, and finally, resort to using xgetcwd.
17589
17590 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
17591
17592         * lib/obstack.c, obstack.h: Import changes from libc.
17593
17594 2004-04-28  Bruno Haible  <bruno@clisp.org>
17595
17596         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
17597         also implicitly appends .exe to executables.
17598         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
17599         accepts Windows pathnames.
17600         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
17601         Treat Cygwin like Windows, since it now accepts Windows pathnames.
17602         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
17603         Treat Cygwin like Windows, since it now accepts Windows pathnames.
17604         Reported by Derek Robert Price <derek@ximbiot.com>.
17605
17606 2004-04-21  Karl Berry  <karl@gnu.org>
17607
17608         * config/srclist.txt (localcharset.c): break sync.
17609
17610 2004-04-20  Paul Eggert  <eggert@twinsun.com>
17611
17612         * m4/host-os.m4: Add a copyright notice.
17613
17614 2004-04-20  Jim Meyering  <jim@meyering.net>
17615
17616         Change UTILS_ to gl_ in AC_DEFINE'd names.
17617         Change utils_- and jm_-prefixed variables, too.
17618         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
17619         UTILS_FUNC_MKDIR_TRAILING_SLASH.
17620         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
17621
17622         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
17623         Don't emit trailing blanks.
17624         Also rename jm_-prefixed variables to have gl_ prefix.
17625
17626         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
17627         Also rename jm_-prefixed variables to have gl_ prefix.
17628
17629         * m4/jm-macros.m4: Reflect the renamings.
17630         * m4/prereq.m4: Likewise.
17631
17632 2004-04-20  Jim Meyering  <jim@meyering.net>
17633
17634         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
17635         memory.
17636
17637 2004-04-20  Jim Meyering  <jim@meyering.net>
17638             Bruno Haible  <bruno@clisp.org>
17639
17640         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
17641         memory when realloc fails.
17642
17643 2004-04-19  Jim Meyering  <jim@meyering.net>
17644
17645         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
17646         now that readutmp.c may call `free (0)'.
17647
17648 2004-04-19  Bruno Haible  <bruno@clisp.org>
17649
17650         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
17651         * m4/inttypes_h.m4: Likewise.
17652         * m4/stdint_h.m4: Likewise.
17653         * m4/intmax_t.m4: Likewise.
17654         * m4/uintmax_t.m4: Likewise.
17655
17656 2004-04-18  Jim Meyering  <jim@meyering.net>
17657
17658         * m4/prereq.m4: Don't forbid jm_ prefix.
17659
17660         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
17661         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
17662         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
17663         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
17664         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
17665         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
17666         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
17667         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
17668         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
17669         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
17670         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
17671         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
17672         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
17673         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
17674         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
17675         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
17676         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
17677         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
17678         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
17679
17680 2004-04-18  Jim Meyering  <jim@meyering.net>
17681
17682         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
17683         failure, don't leak memory and do call END_UTMP_ENT.
17684
17685 2004-04-16  Jim Meyering  <jim@meyering.net>
17686
17687         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
17688         coreutils' stat program.
17689         (gl_PREREQ): Don't require jm_PREREQ_STAT.
17690
17691 2004-04-11  Paul Eggert  <eggert@twinsun.com>
17692
17693         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
17694         C89.
17695         (CHAR_BIT): Remove, since we assume C89.
17696         Include <stdint.h> if available, as per current Autoconf CVS advice.
17697
17698 2004-03-31  Jim Meyering  <jim@meyering.net>
17699
17700         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
17701         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
17702         * m4/xalloc.m4: Likewise.
17703
17704 2004-03-30  Paul Eggert  <eggert@twinsun.com>
17705
17706         Merge from coreutils.
17707
17708         * m4/inttostr.m4: New file.
17709         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
17710         Require AM_STDBOOL_H and gl_TIMESPEC instead.
17711         Require gl_CLOCK_TIME.
17712         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
17713
17714 2004-03-30  Paul Eggert  <eggert@twinsun.com>
17715
17716         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
17717         not bool, to be more consistent with Unix conventions.
17718         Suggested by Bruno Haible.
17719
17720         Merge from coreutils.
17721
17722         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
17723         * lib/umaxtostr.c: New files.
17724
17725         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
17726         the usual <time.h> dance.
17727         (get_date): Change signature to support fractional time stamps.
17728         All callers changed.
17729         * lib/getdate.y: Include "getdate.h" first, as we can now
17730         assume C89 and don't need to worry about 'const'.
17731         Similarly, include "unlocked-io.h" near start, not in middle.
17732         Include <limits.h>.
17733         (textint.value): Use long int rather than int.
17734         (textint.digits): Use size_t rather than int.
17735         (BILLION, LOG10_BILLION): New constants.
17736         (parser_control): New member rel_ns.  Members day_ordinal,
17737         time_zone, month, day, hour, minutes, rel_year, rel_month,
17738         rel_day, rel_hour, rel_minutes, rel_seconds
17739         are now long int, not int.  Member seconds is now struct timespec,
17740         not int.  New member timespec_seen.  Members dates_seen, days_seen,
17741         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
17742         not int.
17743         (%union.intval): Now long int, not int.
17744         New member timespec.
17745         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
17746         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
17747         (spec): Now is a timespec or an item list.
17748         (timespec, items): New nonterminals.
17749         (time, rel, relunit, number, get_date):
17750         Add support for fractional seconds.
17751         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
17752         (gmtime, localtime, mktime): Remove decls; not needed with C89.
17753         (to_hour): First arg is now long int, not int.
17754         (to_year): Returns long int, not int.
17755         Don't treat year -70 like 70.
17756         (tm_diff): Returns long int, not int.
17757         (lookup_word): Use bool instead of int when appropriate.
17758         (yylex): Use size_t for count, not int.
17759         Detect overflow when parsing large integer constants.
17760         Add support for fractions.
17761         (get_date): Make pointers 'const' if possible.
17762         Use more-portable code to detect integer overflow.
17763         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
17764         Don't use ctime; it's not reliable if the year has >4 digits.
17765
17766         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
17767         This is for compatibility with BSD.
17768
17769         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
17770         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
17771         From coreutils' system.h.
17772
17773         * lib/userspec.c: Don't include "posixver.h".
17774         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
17775         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
17776         compatible extension.  Simplify code by removing a boolean int
17777         that was always nonzero if a string was nonnull.
17778
17779 2004-03-30  Jim Meyering  <jim@meyering.net>
17780
17781         Merge from coreutils.
17782
17783         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
17784         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
17785         on some systems one must include <grp.h> before it.
17786         Reported by Christian Krackowizer.
17787
17788 2004-03-30  Jim Meyering  <jim@meyering.net>
17789
17790         Merge from coreutils.
17791
17792         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
17793
17794         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
17795         an empty input stream.
17796
17797         * lib/readtokens.c: Include <stdbool.h>.
17798         (readtoken): Use `size_t' rather than int/long.
17799         All callers adjusted.
17800         Use `bool' rather than `int' where appropriate.
17801         Use memset rather than an explicit loop.
17802         Use x2nrealloc rather than xrealloc.
17803         Allow the use of `\0' as a delimiter.
17804         (readtokens): Likewise.
17805         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
17806
17807 2004-03-30  Jim Meyering  <jim@meyering.net>
17808
17809         * m4/realloc.m4: Remove file, since now it does no more than
17810         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
17811         the `configure.ac' section of module/realloc.
17812         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
17813
17814 2004-03-30  Bruno Haible  <bruno@clisp.org>
17815
17816         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
17817         nonnull.
17818
17819 2004-03-29  Paul Eggert  <eggert@twinsun.com>
17820
17821         Merge changes to getloadavg.c from coreutils and Emacs.
17822
17823         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
17824         Define to an expression, not to the empty string.
17825         Include cloexec.h and xalloc.h.
17826         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
17827         Use set_cloexec_flag rather than rolling our own.
17828         * lib/cloexec.c, lib/cloexec.h: New files.
17829
17830 2004-03-29  Paul Eggert  <eggert@twinsun.com>
17831
17832         * m4/cloexec.m4: New file.
17833
17834 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17835
17836         * lib/getopt.h: Sync with libc CVS.
17837
17838 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17839             Bruno Haible  <bruno@clisp.org>
17840
17841         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
17842         mbswidth.
17843
17844 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17845             Bruno Haible  <bruno@clisp.org>
17846
17847         * lib/mbswidth.h: Include <wchar.h> only if
17848         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
17849         <wchar.h>.
17850         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
17851
17852 2004-03-09  Paul Eggert  <eggert@twinsun.com>
17853
17854         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
17855         Sync with libc CVS.
17856         * lib/getopt_int.h: New file, also synced from libc.
17857
17858 2004-03-09  Paul Eggert  <eggert@twinsun.com>
17859
17860         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
17861         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
17862         Bring back getopt.c, getopt.h, getopt1.c.
17863
17864 2004-03-07  Paul Eggert  <eggert@twinsun.com>
17865
17866         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
17867         All uses changed.  Check for sa_sigaction member; this fixes
17868         a bug first reported by Jason Andrade in
17869         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
17870
17871 2004-03-07  Paul Eggert  <eggert@twinsun.com>
17872
17873         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
17874         '#if' expressions.  Unlike the code it replaces, it does not
17875         depend on (defined _SC_PAGESIZE).  However, it does depend on
17876         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
17877         first reported by Jason Andrade in
17878         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
17879
17880 2004-02-25  Simon Josefsson  <jas@extundo.com>
17881
17882         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
17883
17884 2004-02-25  Simon Josefsson  <jas@extundo.com>
17885
17886         * lib/strdup.h: New file.
17887         * lib/strdup.c: Include it.
17888         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
17889         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
17890
17891 2004-02-23  Karl Berry  <karl@gnu.org>
17892
17893         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
17894         (from fencepost.gnu.org:/gd/gnuorg).
17895
17896 2004-02-23  Karl Berry  <karl@gnu.org>
17897
17898         * config/srclistvars.sh (GNUORG) [karl]: redefine.
17899         * config/srclist.txt: add maintain/standards documents.
17900
17901 2004-02-18  Bruno Haible  <bruno@clisp.org>
17902
17903         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
17904         Reported by Derek Robert Price <derek@ximbiot.com>.
17905
17906 2004-02-16  Karl Berry  <karl@gnu.org>
17907
17908         * config/mkinstalldirs, install-sh: update from automake.
17909
17910 2004-02-06  Karl Berry  <karl@gnu.org>
17911
17912         * m4/po.m4: update from gettext 0.14.1.
17913
17914 2004-02-06  Karl Berry  <karl@gnu.org>
17915
17916         * lib/config.charset: update from gettext 0.14.1.
17917
17918 2004-02-05  Paul Eggert  <eggert@twinsun.com>
17919
17920         Add comments and code, prompted by suggestions from Bruno Haible
17921         for sh-quote.
17922         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
17923         describing the enum quoting_style values.
17924         * lib/quotearg.c (quotearg_alloc): New function.
17925         (quotearg_buffer_restyled): Treat lone { and } as special.
17926         Treat = as special.  Work around bug with older shells
17927         that "see" a '\' that is really the 2nd byte of a multibyte char.
17928         Quote empty string with shell_quoting_style.
17929
17930 2004-02-03  Bruno Haible  <bruno@clisp.org>
17931
17932         * m4/pipe.m4: New file, from GNU gettext.
17933
17934 2004-02-03  Bruno Haible  <bruno@clisp.org>
17935
17936         * lib/pipe.h: New file, from GNU gettext.
17937         * lib/pipe.c: New file, from GNU gettext.
17938
17939 2004-01-27  Bruno Haible  <bruno@clisp.org>
17940
17941         * m4/execute.m4: New file, from GNU gettext.
17942
17943 2004-01-27  Bruno Haible  <bruno@clisp.org>
17944
17945         * lib/execute.h: New file, from GNU gettext.
17946         * lib/execute.c: New file, from GNU gettext.
17947         * lib/w32spawn.h: New file, from GNU gettext.
17948
17949 2004-01-24  Paul Eggert  <eggert@twinsun.com>
17950
17951         Merge from diffutils.
17952
17953         * lib/file-type.c (file_type): Add typed memory objects.
17954         * lib/file-type.h (S_TYPEISTMO): New macro.
17955
17956         * lib/c-stack.h (c_stack_action): Remove argv argument.
17957         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
17958         (die): Don't calculate message unless segv_action returns.
17959         (get_stack_location, min_address_from_argv, max_address_from_argv,
17960         volatile stack_base, volatile_stack_size): Remove.
17961         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
17962         that every segmentation violation is a stack overflow.  (Ouch!)
17963         See Debian bug 136249 (still outstanding) for more info about why
17964         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
17965
17966 2004-01-24  Paul Eggert  <eggert@twinsun.com>
17967
17968         Exit-status fix from coreutils.
17969
17970         Use exit_failure consistently in place of EXIT_FAILURE,
17971         so that program exit statuses are consistent on failure.
17972
17973         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
17974         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
17975         * lib/argmatch.h: Comment fix to match the above.
17976         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
17977         Now a macro referring to exit_failure, instead of a separate
17978         variable.  Include "exitfail.h" to get it.
17979         * lib/xstrtol.h: Include "exitfail.h".
17980         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
17981
17982         * lib/long-options.c (parse_long_options): Use prototype
17983         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
17984         for clarity.
17985
17986 2004-01-21  Jim Meyering  <jim@meyering.net>
17987
17988         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
17989         so as not to conflict with a different-sized __mktime_internal
17990         function in GNU libc.
17991         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
17992         Problem building statically-linked `ls' reported by Michael Brunnbauer.
17993
17994 2004-01-20  Karl Berry  <karl@gnu.org>
17995
17996         * config/config.guess: update from config.
17997
17998         * config/srclistvars.sh: GNUWWWLICENSES for karl.
17999
18000 2004-01-20  Bruno Haible  <bruno@clisp.org>
18001
18002         Safer stack allocation.
18003         * lib/setenv.c: Include allocsa.h.
18004         (alloca): Remove fallback definition.
18005         (freea): Remove macro.
18006         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
18007         instead of freea.
18008
18009 2004-01-20  Bruno Haible  <bruno@clisp.org>
18010
18011         * m4/eealloc.m4: New file, from GNU gettext.
18012
18013 2004-01-20  Bruno Haible  <bruno@clisp.org>
18014
18015         * m4/allocsa.m4: New file, from GNU gettext.
18016
18017 2004-01-20  Bruno Haible  <bruno@clisp.org>
18018
18019         * lib/xallocsa.h: New file, from GNU gettext.
18020         * lib/xallocsa.c: New file, from GNU gettext.
18021
18022 2004-01-20  Bruno Haible  <bruno@clisp.org>
18023
18024         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
18025
18026 2004-01-20  Bruno Haible  <bruno@clisp.org>
18027
18028         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
18029         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
18030         specially.
18031
18032 2004-01-20  Bruno Haible  <bruno@clisp.org>
18033
18034         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
18035         patch.
18036
18037 2004-01-20  Bruno Haible  <bruno@clisp.org>
18038
18039         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
18040
18041 2004-01-20  Bruno Haible  <bruno@clisp.org>
18042
18043         * lib/eealloc.h: New file.
18044
18045 2004-01-20  Bruno Haible  <bruno@clisp.org>
18046
18047         * lib/binary-io.h: Avoid warnings on Cygwin.
18048
18049 2004-01-20  Bruno Haible  <bruno@clisp.org>
18050
18051         * lib/allocsa.h: New file, from GNU gettext.
18052         * lib/allocsa.c: New file, from GNU gettext.
18053
18054 2004-01-18  Karl Berry  <karl@gnu.org>
18055
18056         * doc/gpl.texi, doc/lgpl.texi: new files.
18057
18058 2004-01-18  Karl Berry  <karl@gnu.org>
18059
18060         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
18061         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
18062
18063 2004-01-15  Paul Eggert  <eggert@twinsun.com>
18064
18065         Merge from coreutils.
18066
18067         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
18068         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
18069         (gl_DEFAULT_POSIX2_VERSION): Move
18070         the documentation from 'configure' into 'config.hin',
18071         so that 'configure --help' isn't burdened by it and
18072         we don't have to worry about its formatting there.
18073         Reword the documentation so that it's more succinct
18074         and can be run together into a single paragraph.
18075         * m4/same.m4 (gl_SAME): Check for pathconf.
18076
18077 2004-01-15  Paul Eggert  <eggert@twinsun.com>
18078
18079         Merge from coreutils.
18080
18081         * lib/posixver.c: Include posixver.h.
18082
18083         * lib/same.c: Include <stdbool.h>, <limits.h>.
18084         (_POSIX_NAME_MAX): Define if not defined.
18085         (MIN): New macro.
18086         (same_name): If file names are silently truncated, report
18087         that the file names are the same if they are the same after
18088         the silent truncation.
18089
18090         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
18091         conversion function.
18092         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
18093         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
18094         longer needed.
18095
18096 2004-01-15  Jim Meyering  <jim@meyering.net>
18097
18098         Merge from coreutils.
18099
18100         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
18101         if no library is required.
18102         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
18103         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
18104         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
18105         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
18106         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
18107         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
18108         value, $ac_cv_search_crypt, if it's "none required".
18109         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
18110         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
18111         not gl_FUNC_GETLOADAVG.
18112         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
18113         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
18114
18115 2004-01-15  Jim Meyering  <jim@meyering.net>
18116
18117         Merge from coreutils.
18118
18119         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
18120         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
18121         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
18122
18123         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
18124         optional configure-time default.
18125
18126         * lib/version-etc.c (version_etc_copyright): Update copyright date.
18127
18128         * lib/xreadlink.c (xreadlink): Correct outdated comment.
18129
18130 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
18131
18132         Merge from coreutils.
18133
18134         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
18135         value, $ac_cv_search_nanosleep, if it's "none required".
18136
18137 2004-01-14  Paul Eggert  <eggert@twinsun.com>
18138
18139         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
18140         with like-named macro in fnmatch.c.
18141         (EXT): Use an internal constant instead.
18142
18143         Merge fnmatch patches from glibc.
18144         * lib/fnmatch.c (mbsinit): Remove define.
18145         Add libc_hidden_ver (__fnmatch, fnmatch).
18146         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
18147         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
18148
18149 2004-01-14  Karl Berry  <karl@gnu.org>
18150
18151         * config/install-sh: update from automake.
18152
18153 2004-01-13  Karl Berry  <karl@gnu.org>
18154
18155         * config/install-sh: update from automake.
18156
18157 2004-01-09  Karl Berry  <karl@gnu.org>
18158
18159         * config/install-sh: update from automake.
18160
18161 2004-01-05  Karl Berry  <karl@gnu.org>
18162
18163         * config/config.{sub,guess}: update from config.
18164
18165 2003-12-31  Karl Berry  <karl@gnu.org>
18166
18167         * config/depcomp: update from automake.
18168
18169 2003-12-14  Karl Berry  <karl@gnu.org>
18170
18171         * lib/config.charset: update from gettext-runtime.
18172
18173 2003-12-03  Paul Eggert  <eggert@twinsun.com>
18174
18175         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
18176         Bug reported by Alfred M. Szmidt.
18177
18178 2003-12-03  Bruno Haible  <bruno@clisp.org>
18179
18180         * m4/gettext.m4: Upgrade from gettext-0.13.
18181         * m4/po.m4: Upgrade from gettext-0.13.
18182         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
18183         * m4/intmax.m4: New file, from gettext-0.13.
18184         * m4/printf-posix.m4: New file, from gettext-0.13.
18185
18186 2003-11-29  Karl Berry  <karl@gnu.org>
18187
18188         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
18189
18190 2003-11-25  Paul Eggert  <eggert@twinsun.com>
18191             Bruno Haible  <bruno@clisp.org>
18192
18193         * lib/printf-parse.h: Don't include sys/types.h.
18194         (ARG_NONE): New macro.
18195         (char_directive): Change type of *arg_index fields to size_t.
18196         * lib/printf-parse.c: Don't include sys/types.h.
18197         (SSIZE_MAX): Remove macro.
18198         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
18199         Remove unnecessary overflow check.
18200         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
18201         fields.
18202
18203 2003-11-25  Bruno Haible  <bruno@clisp.org>
18204
18205         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
18206
18207 2003-11-25  Bruno Haible  <bruno@clisp.org>
18208
18209         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
18210         gt_TYPE_SSIZE_T.
18211
18212 2003-11-24  Paul Eggert  <eggert@twinsun.com>
18213
18214         * modules/alloca: Remove dependency on xalloc.
18215
18216 2003-11-24  Paul Eggert  <eggert@twinsun.com>
18217
18218         * lib/alloca.c: Remove dependency on xalloc module.
18219         (xalloc_die): Remove.
18220         (memory_full) [!defined emacs]: New macro.
18221         [!defined emacs]: Don't include xalloc.h.
18222         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
18223         address arithmetic overflows.  Change datatypes a bit to avoid
18224         unnecessary casts.
18225
18226 2003-11-22  Jim Meyering  <jim@meyering.net>
18227
18228         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
18229         s/size/size_t/.
18230
18231 2003-11-21  Karl Berry  <karl@gnu.org>
18232
18233         * config/config.{sub,guess}: update from config.
18234
18235 2003-11-18  Karl Berry  <karl@gnu.org>
18236
18237         * config/config.{sub,guess}: update from config.
18238
18239         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
18240
18241 2003-11-17  Paul Eggert  <eggert@twinsun.com>
18242
18243         * README: Mention that S+T cannot overflow if S is the size of
18244         an existing object and T is sufficiently small.
18245
18246 2003-11-17  Jim Meyering  <jim@meyering.net>
18247
18248         On systems without utime and without a utimes function capable of
18249         dealing with a NULL struct utimbuf* argument, this utime replacement
18250         could -- in unusual circumstances -- leak a file descriptor.
18251         * lib/utime.c: Include <unistd.h> and <errno.h>.
18252         (utime_null): Be sure to close `fd' and to preserve errno.
18253         Reported by Geoff Collyer via Arnold Robbins.
18254
18255 2003-11-17  Bruno Haible  <bruno@clisp.org>
18256
18257         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
18258         (Depends-on): Add xsize.
18259
18260 2003-11-17  Bruno Haible  <bruno@clisp.org>
18261
18262         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
18263
18264 2003-11-17  Bruno Haible  <bruno@clisp.org>
18265
18266         * lib/vasnprintf.c (alloca): Remove fallback definition.
18267         (freea): Remove definition.
18268         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
18269         Reported by Paul Eggert.
18270
18271 2003-11-16  Paul Eggert  <eggert@twinsun.com>
18272             Bruno Haible  <bruno@clisp.org>
18273
18274         Protect against address arithmetic overflow.
18275         * lib/printf-args.h: Include stddef.h.
18276         (arguments): Change type of field 'count' to size_t.
18277         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
18278         'unsigned int' where appropriate.
18279         * lib/printf-parse.h: Include sys/types.h.
18280         (char_directive): Change type of *arg_index fields to ssize_t.
18281         (char_directives): Change type of fields 'count', max_*_length to
18282         size_t.
18283         * lib/printf-parse.c: Include sys/types.h and xsize.h.
18284         (SSIZE_MAX): Define fallback value.
18285         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
18286         instead of 'int' where appropriate. Check a_allocated, d_allocated
18287         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
18288         * lib/vasnprintf.c: Include xsize.h.
18289         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
18290         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
18291         overflow. Avoid wraparound when converting a width or precision from
18292         decimal to binary.
18293
18294 2003-11-16  Bruno Haible  <bruno@clisp.org>
18295
18296         Update from GNU gettext.
18297         * lib/printf-parse.c: Generalize to it can be compiled for wide
18298         strings.
18299         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
18300         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
18301         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
18302         SNPRINTF): New macros.
18303         Don't include <alloca.h> if the file is used inside libintl.
18304         (local_wcslen): New function, for Solaris 2.5.1.
18305         (VASNPRINTF): Use it instead of wcslen.
18306
18307 2003-11-16  Bruno Haible  <bruno@clisp.org>
18308
18309         * lib/xsize.h (xmax): New function.
18310         (xsum, xsum3, xsum4): Declare as "pure" functions.
18311
18312 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18313
18314         * modules/xalloc (Files): Undo latest change, since xalloc.h
18315         no longer needs SIZE_MAX or PTRDIFF_MAX.
18316
18317 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18318
18319         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
18320         gl_PTRDIFF_MAX.
18321
18322 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18323
18324         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
18325         "return", to pacify some unknown compiler.  Problem reported
18326         by Joerg Schilling.
18327
18328 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18329
18330         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
18331         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
18332         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
18333         heuristic is just as accurate as far as we know, and it removes a
18334         dependency on size_max.m4 and ptrdiff_max.m4.
18335
18336 2003-11-11  Bruno Haible  <bruno@clisp.org>
18337
18338         * modules/xsize (Files): Add m4/size_max.m4.
18339         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
18340
18341 2003-11-11  Bruno Haible  <bruno@clisp.org>
18342
18343         * m4/size_max.m4: New file.
18344         * m4/ptrdiff_max.m4: New file.
18345         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
18346         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
18347         (gl_XALLOC): Invoke it.
18348
18349 2003-11-11  Bruno Haible  <bruno@clisp.org>
18350
18351         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
18352         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
18353         defined.
18354
18355 2003-11-10  Paul Eggert  <eggert@twinsun.com>
18356
18357         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
18358         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
18359         rejected some allocations of exactly SIZE_MAX - 2 bytes.
18360         From Bruno Haible.
18361         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
18362         not (size_t) -1, since it's defined here.
18363
18364 2003-11-09  Karl Berry  <karl@gnu.org>
18365
18366         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
18367
18368 2003-11-06  Paul Eggert  <eggert@twinsun.com>
18369
18370         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
18371         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
18372         Reject sizes of exactly SIZE_MAX bytes.
18373         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
18374         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
18375
18376 2003-11-05  Bruno Haible  <bruno@clisp.org>
18377
18378         * lib/xsize.h: Include limits.h, to avoid a possible collision with
18379         SIZE_MAX defined in <limits.h> on Solaris.
18380
18381 2003-11-04  Jim Meyering  <jim@meyering.net>
18382
18383         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
18384         variable names, rather than @VAR@.
18385         * modules/poll: Likewise.
18386
18387 2003-11-04  Bruno Haible  <bruno@clisp.org>
18388
18389         * modules/xsize: New file.
18390         * modules/linebreak: Depend on xsize.
18391         * MODULES.html.sh (func_all_modules): Add xsize.
18392
18393 2003-11-04  Bruno Haible  <bruno@clisp.org>
18394
18395         * m4/xsize.m4: New file.
18396
18397 2003-11-04  Bruno Haible  <bruno@clisp.org>
18398
18399         * lib/xsize.h: New file.
18400         * lib/linebreak.c: Include xsize.h.
18401         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
18402         argument for overflow.
18403         Suggested by Paul Eggert.
18404
18405 2003-11-03  Karl Berry  <karl@gnu.org>
18406
18407         * config/config.{guess,sub}: update from config.
18408
18409 2003-11-03  Jim Meyering  <jim@meyering.net>
18410
18411         * modules/userspec (lib_SOURCES): Add userspec.h.
18412         (Include): Add "userspec.h".
18413         Improve description.
18414
18415 2003-11-03  Jim Meyering  <jim@meyering.net>
18416
18417         * lib/userspec.c: Include "userspec.h".
18418         * lib/userspec.h: New file.
18419
18420 2003-11-03  Bruno Haible  <bruno@clisp.org>
18421
18422         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
18423
18424 2003-11-03  Bruno Haible  <bruno@clisp.org>
18425
18426         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
18427         available, to avoid (extremely rare) race condition.
18428         Suggested by Paul Eggert.
18429
18430 2003-11-02  Karl Berry  <karl@gnu.org>
18431
18432         * config/srclist.txt (vasprintf.c): sync broken, sigh.
18433
18434 2003-10-31  Paul Eggert  <eggert@twinsun.com>
18435
18436         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
18437         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
18438         (read_filesystem_list): Set and use me_type_malloced.
18439         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
18440         whatever the type happens to be), for brevity and consistency.
18441         Check for size calculation overflow on Alphas running OSF/1.
18442
18443 2003-10-31  Jim Meyering  <jim@meyering.net>
18444
18445         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
18446
18447         * lib/linebuffer.c: Include <string.h> for declaration of memset.
18448
18449 2003-10-30  Paul Eggert  <eggert@twinsun.com>
18450             Bruno Haible  <bruno@clisp.org>
18451
18452         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
18453         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
18454
18455 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
18456
18457         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
18458         netbsd*-gnu*.  Suggested by Robert Millan.
18459
18460 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18461
18462         * modules/group-member: Depend on stdbool.
18463
18464 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18465
18466         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
18467
18468 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18469
18470         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
18471         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
18472         after the 'gnu' in these cases.  This fixes some bugs in the
18473         previous change, and is based on suggestions by Robert Millan.
18474
18475 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18476
18477         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
18478         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
18479         no longer needed.
18480         * lib/quotearg.c (quotearg_n_options): Use it.
18481         * lib/group-member.c: Include <stdbool.h>.
18482         (free_group_info): Arg is now const *; don't free arg.
18483         (get_group_info): Now returns bool and accepts struct group_info *,
18484         rather than returning a malloc'ed struct group_info *.
18485         All uses changed.  Check for overflow in internal size calculation.
18486
18487         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
18488         rather than xmalloc/xrealloc.
18489         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
18490         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
18491         conformance bug: the old code used a pointer after freeing the
18492         storage that it addressed.
18493         * lib/hash.c (hash_initialize): Simplify the code by using
18494         xalloc_oversized rather than doing it by hand.
18495         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
18496         the buffer preserved.  Use free and xmalloc instead.
18497         * lib/quotearg.c (quotearg_n_options): Likewise.
18498         Use a simpler test for size overflow.  Don't use xalloc_oversized
18499         because unsigned int might be wider than size_t (!); this suggests
18500         that we should switch from unsigned int to size_t for slot numbers.
18501
18502 2003-10-28  Paul Eggert  <eggert@twinsun.com>
18503
18504         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
18505         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
18506         NetBSD kernels.  Requested by Richard Stallman.
18507
18508 2003-10-27  Paul Eggert  <eggert@twinsun.com>
18509
18510         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
18511         to allocate the returned structure.  Do not allocate a subarray,
18512         as x2nrealloc will do that.
18513         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
18514         instead of xnrealloc.
18515         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
18516
18517 2003-10-27  Bruno Haible  <bruno@clisp.org>
18518
18519         * lib/stdbool_.h: Better support for BeOS.
18520
18521 2003-10-26  Paul Eggert  <eggert@twinsun.com>
18522
18523         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
18524         now uses inline.
18525
18526 2003-10-26  Paul Eggert  <eggert@twinsun.com>
18527
18528         * lib/xalloc.h (xalloc_oversized): New static inline function, for
18529         callers that want to do their own size-overflow checking.  Include
18530         <stdbool.h>, since xalloc_oversized returns bool.
18531         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
18532         to use xalloc_oversized.
18533
18534         Add two functions x2realloc, x2nrealloc, for programs that grow
18535         arrays dynamically by doubling their sizes.
18536         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
18537         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
18538         New functions.
18539
18540         Port to C99 semantics for 'inline' of external functions.
18541         Bug reported by Bruno Haible.
18542         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
18543         with the old contents of xnmalloc.
18544         (xnmalloc, xmalloc): Use it.
18545         (xnrealloc_inline): New static inline function,
18546         with the old contents of xnrealloc.
18547         (xnrealloc, xrealloc): Use it.
18548
18549         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
18550         that.
18551
18552 2003-10-26  Karl Berry  <karl@gnu.org>
18553
18554         * config/srclist.txt (COPYING.DOC): no longer available from
18555         /gd/gnuorg; don't know where the ultimate source is.
18556
18557 2003-10-25  Paul Eggert  <eggert@twinsun.com>
18558
18559         Fix several address-calculation bugs in the hash modules,
18560         plus some minor code cleanup.
18561
18562         * lib/hash.h: Include <stdbool.h>, for bool.
18563         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
18564         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
18565         hash_get_n_entries, hash_get_max_bucket_length,
18566         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
18567         hash_rehash): Use size_t rather than unsigned.
18568         * lib/hash.c (struct hash_table, hash_get_n_buckets,
18569         hash_get_n_buckets_used, hash_get_n_entries,
18570         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
18571         hash_get_entries, hash_do_for_each, hash_string, is_prime,
18572         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
18573         Likewise.
18574         (SIZE_MAX): Define if not defined.
18575         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
18576         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
18577         hash_print):
18578         Use const * when possible.
18579         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
18580         (check_tuning): Fix bug: if tuning parameters were very close to
18581         0 or 1, rounding errors could have caused subscript violations.
18582         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
18583         (hash_initialize): Add 'fail:' label
18584         to free table and return NULL, and use it to simplify code.
18585         Use calloc rather than clearing the storage ourself.
18586         (hash_initialize, hash_rehash): Check for arithmetic overflow in
18587         buffer size calculations.
18588         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
18589         Include <stddef.h>, for size_t.
18590         * lib/hash-pjw.c (hash_pjw): Likewise.
18591         Switch to method described by Bruno Haible.
18592         Include <limits.h>, for CHAR_BIT.
18593         (SIZE_BITS): New macro.
18594
18595 2003-10-23  Paul Eggert  <eggert@twinsun.com>
18596
18597         * m4/getline.m4 (AM_FUNC_GETLINE):
18598         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
18599         hosts.  Problem reported by Derek Robert Price in
18600         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
18601         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
18602         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
18603
18604 2003-10-21  Paul Eggert  <eggert@twinsun.com>
18605
18606         * lib/getndelim2.c (getndelim2): When size calculation overflows,
18607         ceiling the allocation at NMAX bytes rather than silently
18608         discarding input bytes before NMAX is reached.  This makes
18609         a difference only if NMAX exceeds SIZE_MAX / 2.
18610
18611         * lib/obstack.c: Merge from glibc.
18612         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
18613         Add libc_hidden_def (_obstack_newchunk).
18614         (_obstack_free) [! defined _LIBC]: Remove.
18615         [defined _LIBC]: Make a strong alias from obstack_free, rather than
18616         a clone of the function body.
18617         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
18618         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
18619
18620         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
18621         glibc.
18622         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
18623         arg to memcpy.
18624
18625         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
18626         (obstack_ptr_grow_fast, obstack_int_grow_fast):
18627         Don't use lvalue casts, as GCC plans to remove support for them
18628         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
18629         was also present in the non-GCC version, indicating that this
18630         code had always been buggy and had never been widely used.
18631         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
18632         Use the fast variant of each macro, rather than copying the
18633         definiens of the fast variant; that way, we'll be more likely to
18634         catch future bugs in the fast variants.
18635
18636 2003-10-20  Bruno Haible  <bruno@clisp.org>
18637
18638         * modules/wait-process: New file.
18639         * MODULES.html.sh (func_all_modules): Add wait-process.
18640
18641 2003-10-20  Bruno Haible  <bruno@clisp.org>
18642
18643         * m4/wait-process.m4: New file.
18644
18645 2003-10-20  Bruno Haible  <bruno@clisp.org>
18646
18647         * lib/wait-process.h: New file, from GNU gettext.
18648         * lib/wait-process.c: New file, from GNU gettext.
18649
18650 2003-10-19  Jim Meyering  <jim@meyering.net>
18651
18652         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
18653         HPUX 10.20.
18654
18655 2003-10-18  Karl Berry  <karl@gnu.org>
18656
18657         * config/config.guess: update from config.
18658
18659 2003-10-16  Paul Eggert  <eggert@twinsun.com>
18660
18661         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
18662         (getgroups): First arg is int, not size_t.
18663         Don't let 'free' mangle errno.
18664
18665 2003-10-16  Paul Eggert  <eggert@twinsun.com>
18666
18667         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
18668
18669 2003-10-16  Karl Berry  <karl@gnu.org>
18670
18671         * config/config.{guess,sub}: update from config.
18672
18673 2003-10-16  Jim Meyering  <jim@meyering.net>
18674
18675         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
18676         memcpy.
18677
18678 2003-10-15  Paul Eggert  <eggert@twinsun.com>
18679
18680         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
18681         (SIZE_MAX): Remove.
18682         (new_exclude, add_exclude_file): Initial size no longer needs to
18683         be a power of 2.
18684         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
18685         our own address arithmetic overflow checking.
18686
18687         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
18688         (fnmatch): Do not alloca more than 2000 wide characters;
18689         instead, use malloc for large buffers.
18690         Check for address arithmetic overflow, and return -1
18691         with errno set to ENOMEM in that case.
18692         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
18693         (NEW_PATTERN): Do not alloca more than 8000 bytes;
18694         instead, return -1.  Check for address arithmetic overflow.
18695
18696 2003-10-14  Paul Eggert  <eggert@twinsun.com>
18697
18698         Handle invalid suffixes and overflow independently, so that
18699         callers can treat them independently as needed.  Fix some bugs in
18700         suffix handling, e.g., "100k@" was not diagnosed as an invalid
18701         suffix for a human-readable blocksize.  The major caller-visible
18702         change is the addition of a new
18703         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
18704         that both overflow and suffix chars were found.
18705
18706         * lib/human.c (humblock): Don't check separately for invalid suffix
18707         char; that is xstrtoumax's job (now that its bug is fixed).
18708         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
18709         INTMAX_MAX]: New macros.
18710         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
18711         TYPE_MAXIMUM): New macros.
18712         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
18713         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
18714         if overflow occurs, as it's what __strtol does and it's more useful
18715         in practice.
18716         (__xstrtol): If __strtol reports some error other than ERANGE,
18717         reflect it to the caller as LONGINT_INVALID.  If it reports
18718         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
18719         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
18720         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
18721         value.
18722         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
18723         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
18724         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
18725         [defined UINTMAX_MAX]: New macros.
18726
18727 2003-10-14  Bruno Haible  <bruno@clisp.org>
18728
18729         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
18730
18731 2003-10-14  Bruno Haible  <bruno@clisp.org>
18732
18733         * m4/sig_atomic_t: New file, from GNU gettext.
18734         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
18735
18736 2003-10-14  Bruno Haible  <bruno@clisp.org>
18737
18738         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
18739         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
18740         Also use volatile where needed.
18741
18742 2003-10-12  Paul Eggert  <eggert@twinsun.com>
18743
18744         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
18745         Change maintainer from Bruno Haible to 'all'.
18746
18747 2003-10-12  Paul Eggert  <eggert@twinsun.com>
18748
18749         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
18750
18751 2003-10-12  Paul Eggert  <eggert@twinsun.com>
18752
18753         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
18754         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
18755         and define in terms of the other primitives.
18756         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
18757         (SIZE_MAX): Define if not already defined.
18758         (array_size_overflow): New function.
18759         (xalloc_die): Abort instead of exiting if 'error' returns.
18760         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
18761         (xmalloc, xrealloc): Use them.
18762         (xcalloc): Check for address arithmetic overflow.
18763         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
18764         a bit faster than strcpy.
18765
18766 2003-10-10  Simon Josefsson  <jas@extundo.com>
18767
18768         * modules/argp (Depends-on): Add restrict and strcase.
18769
18770 2003-10-10  Simon Josefsson  <jas@extundo.com>
18771
18772         * m4/argp.m4: Add AC_C_INLINE.
18773
18774 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18775
18776         Merge getpass from libc, plus a few fixes.
18777
18778         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
18779         Include <stdbool.h>.
18780         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
18781         __fsetlocking to empty.
18782         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
18783         do include <bits/libc-lock.h>.
18784         Do not include <fcntl.h>; not needed.
18785         [_LIBC]: Include <wchar.h>.
18786         (NOTCANCEL_MODE): New macro.
18787         (flockfile, funlockfile) [_LIBC]: New macros.
18788         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
18789         [!_LIBC]: New macros.
18790         (call_fclose): New function.
18791         (getpass): Use it.  Save tty stream separately; this simplifies the
18792         code and makes it more reliable if stdin happens to equal stdout.
18793         Invoke __fsetlocking on tty.
18794         Handle thread cancellation if needed.
18795         Namespace cleanup (use __tcgetattr, __getline).
18796         Use bool for Booleans.
18797         [USE_IN_LIBIO]: Handle wide streams.
18798         [!_LIBC]: Unconditionally do the fseek, since we don't know what
18799         stream might go where.
18800
18801         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
18802         doesn't have to include <stdio.h> before us.
18803         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
18804         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
18805         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
18806         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
18807         if not declared, so that we can use getpass.c code from libc without
18808         rewriting it.
18809         (flockfile, ftrylockfile, funlockfile): New macros.
18810
18811 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18812
18813         * modules/getpass: Depend on stdbool.
18814
18815 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18816
18817         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
18818
18819 2003-10-07  Karl Berry  <karl@gnu.org>
18820
18821         * config/config.{guess,sub}: update from config.
18822
18823 2003-10-06  Jim Meyering  <jim@meyering.net>
18824             Bruno Haible  <bruno@clisp.org>
18825
18826         This lets translators provide better translations for the
18827         "Written by ..." part of --version output.
18828         * lib/version-etc.h: Include stdarg.h.
18829         (version_etc_copyright): Declare as readonly.
18830         (version_etc): Make this function variadic with a NULL-terminated list
18831         of author name strings.
18832         (version_etc_va): New declaration.
18833         * lib/version-etc.c: Include stdarg.h, stdlib.h.
18834         (version_etc_copyright): Declare as readonly.
18835         (version_etc_va): New function. Provide a different translatable string
18836         for each possible number of authors < 10. Abbreviate when there are 10
18837         authors or more.
18838         (version_etc): Make this function variadic. Call version_etc_va.
18839         Suggestion from Gary V. Vaughan.
18840
18841         * lib/long-options.h (parse_long_options): Change prototype: the
18842         authors string is moved to the end and becomes variadic.
18843         * lib/long-options.c: Include stdarg.h.
18844         (parse_long_options): Make this function variadic, too.
18845         Call version_etc_va, not version_etc.
18846
18847 2003-10-06  Bruno Haible  <bruno@clisp.org>
18848
18849         * modules/version-etc-2: Remove file.
18850         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
18851
18852 2003-10-06  Bruno Haible  <bruno@clisp.org>
18853
18854         * modules/fatal-signal: New file.
18855         * MODULES.html.sh (func_all_modules): Add fatal-signal.
18856
18857 2003-10-06  Bruno Haible  <bruno@clisp.org>
18858
18859         * m4/fatal-signal.m4: New file.
18860         * m4/signalblocking.m4: New file, from GNU gettext.
18861
18862 2003-10-06  Bruno Haible  <bruno@clisp.org>
18863
18864         * lib/version-etc-2.h: Remove file.
18865         * lib/version-etc-2.c: Remove file.
18866
18867 2003-10-06  Bruno Haible  <bruno@clisp.org>
18868
18869         * lib/fatal-signal.h: New file, from GNU gettext.
18870         * lib/fatal-signal.c: New file, from GNU gettext.
18871
18872 2003-10-05  Paul Eggert  <eggert@twinsun.com>
18873
18874         * README: Rework advice for preventing empty .o files.
18875         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
18876         not <sys/types.h>.
18877
18878 2003-10-04  Karl Berry  <karl@gnu.org>
18879
18880         * lib/argp*: update from libc.
18881
18882 2003-10-04  Karl Berry  <karl@gnu.org>
18883
18884         * config/config.{guess,sub}: update from config.
18885
18886 2003-10-02  Bruno Haible  <bruno@clisp.org>
18887
18888         * modules/lchown (Include): Add lchown.h.
18889         * modules/time_r (Include): Use "..." syntax.
18890         * modules/xgetdomainname (Include): Add xgetdomainname.h.
18891
18892 2003-10-01  Simon Josefsson  <jas@extundo.com>
18893
18894         * MODULES.html.sh (func_all_modules): Move gethostname from section
18895         'based on' to section 'lacking' POSIX:2001.
18896
18897 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
18898
18899         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
18900         to output mode on the same stream.
18901
18902 2003-09-29  Paul Eggert  <eggert@twinsun.com>
18903
18904         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
18905         Fix arg typo in previous patch.
18906
18907 2003-09-28  Jim Meyering  <jim@meyering.net>
18908
18909         * lib/error.c: Correct cpp indentation.
18910
18911 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18912
18913         * modules/free: New file.
18914
18915 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18916
18917         * m4/free.m4: New file.
18918
18919 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18920
18921         * lib/minmax.h (MIN, MAX)
18922         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
18923         Omit the special code that used __typeof__, since we worry that
18924         it could be more trouble than it's worth.  See:
18925         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
18926         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
18927
18928         * lib/free.c: New file.
18929
18930 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
18931
18932         Trivial fixes to Makefile.am parts of module listings.
18933         * modules/strstr: Append strstr.h to lib_SOURCES.
18934         * modules/strcase: Likewise, for strcase.h.
18935
18936 2003-09-27  Karl Berry  <karl@gnu.org>
18937
18938         * config/mkinstalldirs: update from automake.
18939
18940 2003-09-26  Paul Eggert  <eggert@twinsun.com>
18941
18942         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
18943         (error_tail): Do not loop, reallocating temporary buffer, since
18944         the output cannot contain more wide characters than the input
18945         contains bytes, the size must be big enough already.  This avoids
18946         one potential size overflow calculation.  Check for size overflow
18947         when calculating temporary buffer size.  Free temporary buffer
18948         when done, if it was allocated with malloc; this plugs a memory
18949         leak.  Remove casts from void * to pointers, that are no longer
18950         needed now that we're assuming C89 or better.
18951
18952         Merge error changes from glibc.
18953
18954         * lib/error.c, error.h: Update copyright notice header to match glibc.
18955         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
18956         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
18957         Disable cancellation while printing error.
18958         * lib/error.h: Prepend __ to parameter names.
18959
18960 2003-09-26  Jim Meyering  <jim@meyering.net>
18961
18962         * lib/error.c (error_tail): Move some declarations
18963         into inner scope where the local variables are used.
18964
18965 2003-09-26  Bruno Haible  <bruno@clisp.org>
18966
18967         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
18968         stpncpy().
18969         Don't define stpncpy through config.h; it's now done through stpncpy.h.
18970
18971 2003-09-26  Bruno Haible  <bruno@clisp.org>
18972
18973         * lib/stpncpy.h (gnu_stpncpy): New declaration.
18974         (stpncpy): Define as alias for gnu_stpncpy.
18975         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
18976
18977 2003-09-25  Simon Josefsson  <jas@extundo.com>
18978
18979         * lib/xgetdomainname.h: New file.
18980         * lib/xgetdomainname.c: New file.
18981
18982 2003-09-25  Simon Josefsson  <jas@extundo.com>
18983             Bruno Haible  <bruno@clisp.org>
18984
18985         * modules/getdomainname: New file.
18986         * modules/xgetdomainname: New file.
18987         * MODULES.html.sh (func_all_modules): Add getdomainname,
18988         xgetdomainname.
18989
18990 2003-09-25  Simon Josefsson  <jas@extundo.com>
18991             Bruno Haible  <bruno@clisp.org>
18992
18993         * m4/getdomainname.m4: New file.
18994
18995 2003-09-25  Simon Josefsson  <jas@extundo.com>
18996             Bruno Haible  <bruno@clisp.org>
18997
18998         * lib/getdomainname.h: New file.
18999         * lib/getdomainname.c: New file.
19000
19001 2003-09-25  Karl Berry  <karl@gnu.org>
19002
19003         * lib/argp-fmtstream.c, argp-help.c: update from libc.
19004
19005 2003-09-25  Karl Berry  <karl@gnu.org>
19006
19007         * config/install-sh: update from automake.
19008
19009 2003-09-25  Bruno Haible  <bruno@clisp.org>
19010
19011         * modules/version-etc-2: New file, from modules/version-etc with
19012         modifications.
19013         * MODULES.html.sh (func_all_modules): Add version-etc-2.
19014
19015 2003-09-25  Bruno Haible  <bruno@clisp.org>
19016
19017         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
19018         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
19019
19020 2003-09-24  Simon Josefsson  <jas@extundo.com>
19021
19022         * modules/xgethostname: Add xgethostname.h.
19023
19024 2003-09-24  Paul Eggert  <eggert@twinsun.com>
19025
19026         * lib/linebuffer.c (freebuffer): Don't free the argument, just
19027         the buffer associated with the argument.  Bug reported by
19028         Simon Josefsson.
19029
19030 2003-09-24  Paul Eggert  <eggert@twinsun.com>
19031
19032         * README: Document assumptions that 'int' is at least 32 bits
19033         wide, that integer arithmetic is 2's complement without overflow,
19034         that there are no holes in integer values, that adding sizes of
19035         two nonoverlapping objects can't overflow, and that all-bits-zero
19036         yields scalar zero.  Fix spelling and capitalization typos.
19037
19038 2003-09-19  Karl Berry  <karl@gnu.org>
19039
19040         * lib/argp.h: update from libc.
19041
19042 2003-09-17  Paul Eggert  <eggert@twinsun.com>
19043
19044         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
19045         to avoid spurious warnings like "AC_RUN_IFELSE was called before
19046         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
19047
19048 2003-09-17  Paul Eggert  <eggert@twinsun.com>
19049
19050         * gnulib-tool: Use "test -h", not "test -L", for portability
19051         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
19052         (tags_regexp): Remove, since \| doesn't conform to POSIX.
19053         (sed_extract_prog): Issue s commands one-by-one, rather than
19054         using \| in one s command.
19055
19056 2003-09-16  Paul Eggert  <eggert@twinsun.com>
19057
19058         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
19059         input error, instead of returning NULL the next time we are called
19060         (and therefore losing track of errno).
19061
19062 2003-09-16  Bruno Haible  <bruno@clisp.org>
19063
19064         * gnulib-tool (func_create_testdir): Warn about duplicated
19065         dependencies.
19066
19067 2003-09-15  Paul Eggert  <eggert@twinsun.com>
19068
19069         * modules/argmatch, modules/fatal, modules/obstack,
19070         modules/xalloc, modules/xgethostname: Sort dependencies by
19071         importance, not alphabetically.
19072
19073 2003-09-15  Paul Eggert  <eggert@twinsun.com>
19074
19075         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
19076         fails, so that the caller gets the proper errno.
19077
19078         * lib/readutmp.c (read_utmp): Likewise.
19079         Check for fstat error.  Close stream and free storage
19080         when failing.
19081
19082 2003-09-14  Karl Berry  <karl@gnu.org>
19083
19084         * config/srclist.txt (strdup.c): disable for c89 changes.
19085
19086 2003-09-14  Jim Meyering  <jim@meyering.net>
19087
19088         * lib/getloadavg.c: Correct cpp indentation.
19089         * lib/strdup.c: Likewise.
19090         * lib/vasnprintf.c: Likewise.
19091
19092 2003-09-14  Bruno Haible  <bruno@clisp.org>
19093
19094         * modules/fwriteerror: New file.
19095         * MODULES.html.sh (func_all_modules): Add fwriteerror.
19096
19097 2003-09-14  Bruno Haible  <bruno@clisp.org>
19098
19099         * lib/fwriteerror.h: New file.
19100         * lib/fwriteerror.c: New file.
19101
19102 2003-09-12  Paul Eggert  <eggert@twinsun.com>
19103
19104         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
19105         modules/xgethostname, modules/xalloc: Depend on exit.
19106
19107 2003-09-12  Paul Eggert  <eggert@twinsun.com>
19108
19109         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
19110
19111         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
19112         and AC_MINIX, too, so that their extensions are available.
19113
19114         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
19115         This macro has been superseded by gl_BACKUPFILE.
19116
19117         More patches to assume C89 or better.
19118
19119         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
19120
19121         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
19122         unconditionally.
19123         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
19124         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
19125         Include <string.h>, <stdlib.h> unconditionally.
19126         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
19127         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
19128         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
19129         headers or for string.h.
19130         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
19131         or strtoul.
19132
19133         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
19134         headers.
19135         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
19136         * m4/userspec.m4 (gl_USERSPEC): Likewise.
19137         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
19138         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
19139         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
19140         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
19141         memcpy, memset.
19142         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
19143         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
19144         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
19145         strtol.
19146         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
19147         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
19148         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
19149         strtoul.
19150
19151 2003-09-12  Paul Eggert  <eggert@twinsun.com>
19152
19153         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
19154         * lib/obstack.c [!defined _LIBC]: Likewise.
19155         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
19156         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
19157         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
19158
19159         More changes to assume C89 or better.
19160
19161         * lib/error.c (error_tail): Assume vprintf.
19162
19163         * lib/argmatch.c (getenv): Remove decl.
19164         * lib/progreloc.c (get_full_program_name): Define via prototype.
19165         * lib/setenv.c (clearenv): Likewise.
19166         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
19167         needed.
19168         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
19169         (malloc, memcpy): Remove decls.
19170         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
19171         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
19172         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
19173         (memcpy): Remove macro.
19174         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
19175         (__P): Remove.  All uses removed.
19176         (PTR): Remove.  All uses changed to void *.
19177         (CHAR_BIT, NULL): Remove.
19178         (spaces, zeros, memset_space, memset_zero)
19179         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
19180         Remove.
19181         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
19182         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
19183         Define with prototype.
19184         Remove now-unnecessary prototype decl.
19185         (extra_args_spec): Assume ANSI C.  All uses changed.
19186         (extra_args_spec_iso): Remove.
19187         (my_strftime, emacs_strftimeu): Define via prototype.
19188         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
19189         unconditionally.
19190         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
19191         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
19192         (strtoul, strtol): Remove decls.
19193         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
19194         LONG_MAX): Remove.
19195         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
19196         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
19197         (LOCALE_PARAM_PROTO): New macro.
19198         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
19199         (INTERNAL (strtol), strtol): Define with a prototype.
19200         (PARAMS): Remove.  All uses removed.
19201         * lib/tempname.c: Include <string.h> unconditionally.
19202         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
19203         * lib/xgethostname.c (main): Define with a prototype.
19204         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
19205         Include <stdlib.h> unconditionally.
19206         (calloc, malloc, realloc, free): Remove decls.
19207         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
19208         Include <stdlib.h> unconditionally.  Sort include file names.
19209         (strtod): Remove.
19210         (xstrtod): Define with a prototype.
19211         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
19212         (strtol, strtoul): Remove decls.
19213
19214 2003-09-11  Paul Eggert  <eggert@twinsun.com>
19215
19216         More patches to assume C89 or better.
19217         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
19218         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
19219         string.h, memchr, STDC_HEADERS.
19220
19221 2003-09-11  Paul Eggert  <eggert@twinsun.com>
19222
19223         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
19224         Include <stdlib.h>, <string.h> unconditionally.
19225         Remove now-unnecessary cast to char *.
19226         * lib/strnlen.c: Include <string.h> unconditionally.
19227         * lib/yesno.c (yesno): Define with a prototype.
19228
19229 2003-09-11  Bruno Haible  <bruno@clisp.org>
19230
19231         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
19232
19233 2003-09-10  Jim Meyering  <jim@meyering.net>
19234
19235         * lib/error.c: Correct indentation of cpp directives.
19236
19237 2003-09-10  Bruno Haible  <bruno@clisp.org>
19238
19239         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
19240         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
19241         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
19242         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
19243         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
19244         <stdlib.h> and <string.h> checks.
19245         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
19246         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
19247
19248 2003-09-10  Bruno Haible  <bruno@clisp.org>
19249
19250         * lib/strcspn.c: Include <string.h> unconditionally.
19251         * lib/strpbrk.c: Include <string.h> unconditionally.
19252         * lib/strstr.c: Include <string.h> unconditionally.
19253         * lib/unicodeio.c: Include <string.h> unconditionally.
19254         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
19255         * lib/unsetenv.c: Likewise.
19256         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
19257         * lib/yesno.c: Include <stdlib.h> unconditionally.
19258         (rpmatch): Add prototype.
19259
19260 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19261
19262         More patches to assume C89 or better.
19263         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
19264         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
19265         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
19266         or for string.h.
19267         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
19268         stdlib.h.
19269         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
19270         C headers.
19271         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
19272         string.h.
19273         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
19274         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
19275         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
19276         or for string.h.
19277         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
19278         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
19279         C headers.
19280         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
19281         memcpy.
19282         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
19283         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
19284         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
19285         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
19286         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
19287         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
19288         string.h, free.
19289         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
19290         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
19291         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
19292         C headers, or for string.h.
19293         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
19294         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
19295         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
19296         headers, memory.h, stdlib.h, string.h, strings.h.
19297         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
19298         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
19299         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
19300         strchr.
19301         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
19302         headers, memory.h, string.h.
19303         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
19304         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
19305         free.
19306         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
19307         headers.
19308         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
19309         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
19310         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
19311         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
19312         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
19313
19314 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19315
19316         More K&R removal.
19317
19318         * lib/acosl.c (main): Use a prototype.
19319         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
19320         tanl.c: Likewise.
19321
19322         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
19323
19324         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
19325         (getopt, etopt_long, getopt_long_only, _getopt_internal)
19326         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
19327         with a prototype.
19328         * lib/getopt.c (const): Remove macro.
19329         Include <string.h> unconditionally.
19330         (my_index): Remove; all uses changed to strchr.
19331         (strlen): Remove decl.
19332         (exchange): Remove forward decl; no longer needed.
19333         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
19334         Define with prototype.
19335         * lib/getopt1.c (const): Remove macro.
19336         (getopt_long, getopt_long_only, main): Define with prototype.
19337
19338         * lib/getugroups.c: Include <string.h> unconditionally.
19339
19340         * lib/getusershell.c: Include <stdlib.h> unconditionally.
19341         (getusershell, setusershell, endusershell, readname, main):
19342         Define with prototypes.
19343
19344         * lib/group-member.c: Include group-member.h first.
19345         Include <stdlib.h> unconditionally.
19346
19347         * lib/hard-locale.c: Include hard-locale.h first.
19348         Include <stdlib.h>, <string.h> unconditionally.
19349
19350         * lib/hash.c (free, malloc): Remove decls.
19351         Include <stdlib.h> unconditionally.
19352
19353         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
19354         (getenv): Do not declare.
19355
19356         * lib/idcache.c: Include <string.h> unconditionally.
19357
19358         * lib/long-options.c: Include long-options.h first, to test interface.
19359         Include <stdlib.h> unconditionally.
19360
19361         * lib/makepath.c: Include makepath.h first, to test interface.
19362         Include <stdlib.h> and <string.h> unconditionally.
19363
19364         * lib/linebuffer.c: Include <stdlib.h>.
19365         (free): Remove decl.
19366
19367         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
19368         stddef.h. rpl_malloc returns void *, not char *.
19369         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
19370         prototype.
19371
19372         * lib/md5.h: Include <limits.h> unconditionally.
19373         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
19374         (__P): Remove; all uses removed.
19375         * lib/md5.c: Include "md5.h" first.
19376         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
19377         md5_buffer, md5_process_bytes, md5_process_block):
19378         Define with prototypes.
19379         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
19380         * lib/sha.c: Include "sha.h" first.
19381         Include <stdlib.h>, <string.h> unconditionally.
19382
19383         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
19384         * lib/memcmp.c (__ptr_t): Likewise.
19385         * lib/memrchr.c (__ptr_t): Likewise.
19386         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
19387         Include <string.h> unconditionally.
19388         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
19389         * lib/memchr.c: Include <stdlib.h> unconditionally.
19390         * lib/memchr.c (LONG_MAX): Remove.
19391         * lib/memrchr.c (LONG_MAX): Likewise.
19392         * lib/memchr.c (__memchr): Define via a prototype.
19393         * lib/memrchr.c (__memrchr): Likewise.
19394         * lib/memcmp.c (__P): Remove, and remove all uses.
19395         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
19396         Remove forward decls; no longer needed.
19397         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
19398         Use types required by C89 in prototype.
19399
19400         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
19401         * lib/savedir.c: Likewise.
19402         * lib/mkdir.c (free): Remove decl.
19403         * lib/rmdir.c (rmdir): Define with a prototype.
19404         * lib/savedir.c: Include savedir.h first, to test interface.
19405
19406         * lib/mktime.c (STDC_HEADERS): Remove.
19407         Include <stdlib.h>, <string.h> unconditionally.
19408
19409         * lib/modechange.c: Include <stdlib.h> unconditionally.
19410         (malloc): Remove decl.
19411
19412         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
19413         (free): Remove decl.
19414
19415         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
19416         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
19417         (This type really should be intptr_t, but that's a C99ism.)
19418         (_obstack_memcpy): Remove: all uses changed to memcpy.
19419         Include <string.h> unconditionally.
19420         (struct obstack): Assume __STDC__ for types of members
19421         chunkfun, freefun, extra_arg.
19422         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
19423         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
19424         obstack_begin, obstack_specify_allocation,
19425         obstack_specify_allocation_with_arg, obstack_chunkfun,
19426         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
19427         Remove unprototyped decls and the macros that use them.
19428         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
19429         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
19430         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
19431         (defined __STDC__ && __STDC__)]:
19432         Remove nonprototyped code.
19433         Include <stdlib.h> unconditionally.
19434         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
19435         _obstack_allocated_p, _obstack_free, obstack_free,
19436         _obstack_memory_used, print_and_abort):
19437         Define using prototypes.
19438         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
19439         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
19440         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
19441         obstack_next_free, obstack_object_size, obstack_room) [0]:
19442         Remove unused, unprototyped code.
19443
19444         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
19445
19446         * lib/physmem.c (physmem_total, physmem_available, main): Define
19447         with prototypes.
19448
19449         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
19450         (main): Define with a prototype.
19451
19452         * lib/posixver.c (getenv): Remove decl.
19453
19454         * lib/putenv.c (malloc): Returns void *, not char *.
19455         Include <string.h> unconditionally.
19456         (strchr, memcpy, NULL): Do not define.
19457
19458         * lib/readtokens.c: Include readtokens.h first, to test interface.
19459         Include <stdlib.h>, <string.h> unconditionally.
19460         (init_tokenbuffer): Define with a prototype.
19461
19462         * lib/regex.c (PARAMS): Remove.  All uses removed.
19463         All uses of _RE_ARGS removed, too.
19464         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
19465         unconditionally.
19466         (bzero): Assume memset exists.
19467         (memcmp, memcpy, NULL): Remove.
19468         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
19469         char, or assignments to local vars of type signed char.
19470         (init_syntax_once, PREFIX(extract_number_and_incr),
19471         PREFIX(print_partial_compiled_pattern),
19472         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
19473         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
19474         PREFIX(regex_grow_registers), PREFIX(regex_compile),
19475         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
19476         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
19477         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
19478         wcs_compile_range, byte_compile_range, truncate_wchar,
19479         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
19480         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
19481         count_mbs_length, wcs_re_match_2_internal,
19482         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
19483         PREFIX(alt_match_null_string_p),
19484         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
19485         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
19486         regfree, PREFIX(extract_number)): Define with prototype.  Remove
19487         now-unnecessary declaration, if any.
19488         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
19489         regcomp, regexec):
19490         Remove now-unnecessary casts among pointer types.
19491         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
19492
19493         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
19494         (free): Remove decl.
19495
19496         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
19497
19498         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
19499         (free): Remove decl.
19500
19501         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
19502         * lib/xgetcwd.c: Likewise.
19503
19504         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
19505         (free): Remove decl.
19506
19507         * lib/strchrnul.c (strchrnul): Define with a prototype.
19508         Fix bug: c_in was not converted to char before searching.
19509
19510         The following changes are not K&R related:
19511
19512         * lib/group-member.h: Include <sys/types.h>, so that this file is
19513         self-contained.
19514         * lib/makepath.h: Likewise.
19515
19516         * lib/getusershell.c (readname, default_index, line_size, readname):
19517         Use size_t, not int, for sizes.
19518         (readname): If the size overflows, report an error instead of
19519         looping forever.
19520
19521 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19522
19523         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
19524         libc.
19525
19526 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19527
19528         * README: New section: portability guidelines.
19529
19530 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
19531
19532         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
19533         C89 spec.
19534
19535 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
19536
19537         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
19538
19539 2003-09-08  Paul Eggert  <eggert@twinsun.com>
19540
19541         Assume C89 or better; remove K&R cruft.
19542         A few of these changes were first proposed by Derek Robert Price
19543         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
19544
19545         * lib/addext.c: Include <string.h> unconditionally.
19546         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
19547         Don't declare getenv or malloc.
19548
19549         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
19550         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
19551         (NULL): Remove.
19552         (find_stack_direction, alloca): Use prototypes.
19553
19554         * lib/atexit.c (atexit): Define using a prototype.
19555
19556         * lib/basename.c, dirname.c, stripslash.c:
19557         Include <string.h> unconditionally.
19558
19559         * lib/bcopy.c: Include <stddef.h>.
19560         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
19561
19562         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
19563
19564         * lib/error.h (error, error_at_line, error_print_progname)
19565         [! (defined (__STDC__) && __STDC__)]: Remove decls.
19566         * lib/error.c: Include error.h first, to check interface.
19567         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
19568         (VA_START): Remove; all uses changeed to va_start.
19569         (exit, strerror): Remove decls.
19570         (error_print_progname): Prototype uncondionally.
19571         Don't include <errno.h>; no longer needed.
19572         (private_strerror): Remove.
19573         (error_tail): Always define.
19574         (error, error_at_line): Assume C89 or better; always use prototypes.
19575         * lib/fatal.c: Include "fatal.h" first, to test interface.
19576         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
19577         (VA_START): Remove; all uses changed to va_start.
19578         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
19579         this case.
19580         (exit): Remove decl.
19581         (fatal): Prototype unconditionally.  Assume va_start works.
19582         Abort at end, to pacify gcc.
19583
19584         * lib/euidaccess.c (main): Define with a prototype.
19585
19586         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
19587
19588         * lib/exitfail.c: Include <stdlib.h> unconditionally.
19589
19590         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
19591         prototypes.
19592         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
19593         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
19594         (getenv): Remove decl.
19595         (fnmatch): Define using a prototype.
19596         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
19597         (FCT): Define using a prototype.
19598
19599         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
19600
19601         * lib/gethostname.c: Include <stddef.h>.
19602         (gethostname): Define with prototype.  Length is size_t, not int.
19603
19604 2003-09-08  Paul Eggert  <eggert@twinsun.com>
19605
19606         Assume C89 or better; remove K&R cruft.
19607         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
19608         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
19609         string.h, getenv, malloc.
19610         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
19611         headers.
19612         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
19613         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
19614         do not check for strerror.
19615         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
19616         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
19617         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
19618         do not check for doprnt or vprintf.
19619         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
19620         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
19621
19622 2003-09-08  Paul Eggert  <eggert@twinsun.com>
19623
19624         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
19625         getversion.c should have been removed then, but was accidentally
19626         preserved.
19627
19628         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
19629         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
19630
19631 2003-09-08  Karl Berry  <karl@gnu.org>
19632
19633         * config/config.sub, config.guess, srclistvars.sh: update from savannah
19634                 config, forget about prep.
19635
19636         * config/depcomp, missing: update from automake.
19637
19638 2003-09-07  Paul Eggert  <eggert@twinsun.com>
19639
19640         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
19641         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
19642
19643 2003-09-07  Paul Eggert  <eggert@twinsun.com>
19644
19645         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
19646         copy_tm_result.  Bug reported by Simon Josefsson in
19647         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
19648
19649 2003-09-06  Paul Eggert  <eggert@twinsun.com>
19650
19651         * m4/time_r.m4: New file.
19652         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
19653         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
19654         is. Check for timegm declaration.
19655         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
19656         Do not check for gmtime_r.
19657         Replace mktime if __mktime_internal does not exist and if mktime
19658         hasn't been replaced already.
19659
19660 2003-09-06  Paul Eggert  <eggert@twinsun.com>
19661
19662         * lib/time_r.c, lib/time_r.h: New files.
19663
19664         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
19665         __localtime_r.
19666         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
19667         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
19668
19669         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
19670         __gmtime_r.
19671         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
19672         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
19673         Include <time_r.h>.
19674
19675         * lib/timegm.c: Switch to glibc implementation, with the following
19676         changes:
19677         [defined HAVE_CONFIG_H]: Include <config.h>.
19678         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
19679         (__mktime_internal) [!defined _LIBC]: New decl.
19680         (__gmtime_r) [!defined _LIBC]: New macro and function.
19681         (timegm): Use a prototype, since gnulib assumes C89.
19682         Do not bother declaring tmp to be const, as it's not really usefu.
19683         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
19684         (timegm): Declare only if HAVE_DECL_TIMEGM.
19685
19686 2003-09-06  Paul Eggert  <eggert@twinsun.com>
19687
19688         * MODULES.html.sh (func_all_modules): Add time_r.
19689         * modules/time_r: New file.
19690         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
19691         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
19692
19693 2003-09-03  Paul Eggert  <eggert@twinsun.com>
19694
19695         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
19696         Bug reported by Lute Kamstra in
19697         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
19698
19699         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
19700         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
19701         course with correspondingly smaller numbers for tomorrow and
19702         yesterday.  From Tadayoshi Funaba.  Originally installed into
19703         sh-utils on 1999-08-07, but the patch got lost (I guess during the
19704         coreutils merge?).
19705
19706 2003-08-31  Simon Josefsson  <jas@extundo.com>
19707
19708         * modules/timegm: New file.
19709         * MODULES.html.sh (func_all_modules): Add timegm.
19710
19711 2003-08-31  Simon Josefsson  <jas@extundo.com>
19712
19713         * m4/timegm.m4: New file.
19714
19715 2003-08-31  Simon Josefsson  <jas@extundo.com>
19716
19717         * lib/timegm.h: New file.
19718         * lib/timegm.c: New file.  Based on
19719         wget-1.8.2/src/http.c:mktime_from_utc.
19720
19721 2003-08-31  Karl Berry  <karl@gnu.org>
19722
19723         * lib/argp.h: update from libc.
19724
19725 2003-08-28  Bruno Haible  <bruno@clisp.org>
19726
19727         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
19728         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
19729         followed by '#define fnmatch fnmatch_posix' gives an error.
19730
19731 2003-08-28  Bruno Haible  <bruno@clisp.org>
19732
19733         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
19734         warning on QNX, which defines O_BINARY to 000000.
19735
19736 2003-08-27  Jim Meyering  <jim@meyering.net>
19737
19738         * m4/mkstemp.m4: Require that the system mkstemp be able to create
19739         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
19740         would fail after 32.  Reported by Danny Levinson.  Details here:
19741         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
19742
19743 2003-08-24  Bruno Haible  <bruno@clisp.org>
19744
19745         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
19746         MSVC7 <stdio.h> is included later.
19747
19748 2003-08-22  Simon Josefsson  <jas@extundo.com>
19749
19750         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
19751
19752 2003-08-20  Karl Berry  <karl@gnu.org>
19753
19754         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
19755
19756 2003-08-20  Bruno Haible  <bruno@clisp.org>
19757
19758         * modules/progname: New file.
19759         * MODULES.html.sh (func_all_modules): Add progname.
19760
19761 2003-08-20  Bruno Haible  <bruno@clisp.org>
19762
19763         * lib/progname.h: New file, from GNU gettext.
19764         * lib/progname.c: New file, from GNU gettext.
19765         * lib/progreloc.c: New file, from GNU gettext.
19766
19767 2003-08-19  Jim Meyering  <jim@meyering.net>
19768
19769         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
19770         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
19771
19772 2003-08-19  Bruno Haible  <bruno@clisp.org>
19773
19774         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
19775         more.
19776
19777 2003-08-19  Bruno Haible  <bruno@clisp.org>
19778
19779         * lib/xstrdup.c: Assume <string.h> exists.
19780
19781 2003-08-18  Paul Eggert  <eggert@twinsun.com>
19782
19783         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
19784         in makefile rules.
19785
19786 2003-08-18  Jim Meyering  <jim@meyering.net>
19787
19788         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
19789         * m4/lib-ld.m4: Likewise.
19790
19791 2003-08-18  Jim Meyering  <jim@meyering.net>
19792
19793         * lib/setenv.h: Indent nested cpp directive.
19794         * lib/vasnprintf.c: Remove trailing blanks.
19795
19796 2003-08-17  Simon Josefsson  <jas@extundo.com>
19797
19798         * modules/xstrndup: New file.
19799         * MODULES.html.sh (func_all_modules): Add xstrndup.
19800
19801 2003-08-17  Simon Josefsson  <jas@extundo.com>
19802
19803         * modules/argp: Fix autoconf macro name. Add more dependencies.
19804
19805 2003-08-17  Simon Josefsson  <jas@extundo.com>
19806
19807         * m4/xstrndup.m4: New file.
19808
19809 2003-08-17  Simon Josefsson  <jas@extundo.com>
19810
19811         * m4/argp.m4: New file.
19812
19813 2003-08-17  Simon Josefsson  <jas@extundo.com>
19814             Bruno Haible  <bruno@clisp.org>
19815
19816         * lib/xstrndup.h: New file.
19817         * lib/xstrndup.c: New file.
19818
19819 2003-08-17  Bruno Haible  <bruno@clisp.org>
19820
19821         * modules/strndup (Files, Include): Add lib/strndup.h.
19822
19823 2003-08-17  Bruno Haible  <bruno@clisp.org>
19824
19825         * modules/euidaccess (Files): Add lib/euidaccess.h.
19826
19827 2003-08-17  Bruno Haible  <bruno@clisp.org>
19828
19829         * lib/strndup.h: New file.
19830
19831 2003-08-17  Bruno Haible  <bruno@clisp.org>
19832
19833         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
19834         like AC_GNU_SOURCE.
19835         * modules/extensions (configure.ac): Comment out the invocation of
19836         gl_USE_SYSTEM_EXTENSIONS.
19837
19838 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19839
19840         Merges from coreutils, etc.
19841         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
19842         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
19843         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
19844         fixing a typo.
19845         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
19846         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
19847
19848 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19849
19850         Document merge from coreutils.
19851         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
19852         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
19853         * modules/utime: Add m4/utimes-null.m4.
19854
19855 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19856
19857         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
19858         space, undoing this 2003-08-12 change:
19859         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
19860
19861 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19862
19863         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
19864         strtoul.c from libc, undoing this 2003-08-12 change:
19865         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
19866
19867 2003-08-16  Jim Meyering  <jim@meyering.net>
19868
19869         Merges from coreutils.
19870         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
19871         prefix.  Adjust cache variables similarly.  Create 500 rather than
19872         just 300 files, to exercise bug on Darwin6.5, too.
19873         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
19874         $missing_dir.
19875         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
19876         AM_SYS_POSIX_TERMIOS.
19877         Reported by mkc@mathdogs.com.
19878         Also change use of $am_cv_sys_posix_termios
19879         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
19880         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
19881         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
19882         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
19883         in /proc/mounts until it finds one with matching device number.  This
19884         is unnecessary when the FILE argument *is* a mount point.  No stat call
19885         is necessary in that case.  So, disable the statvfs-testing code on
19886         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
19887         as RedHat bug# 84846.
19888         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
19889         to 1MB, so as not to render systems with no stack size limit (e.g.,
19890         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
19891         Include <unistd.h>.  On some systems,
19892         it is required for the definition of _SC_PAGESIZE.
19893
19894 2003-08-16  Jim Meyering  <jim@meyering.net>
19895
19896         Merge from coreutils.
19897         * lib/xstrtoimax.c: #else #if -> #elif.
19898         * lib/xstrtoumax.c: Likewise.
19899
19900 2003-08-16  Jim Meyering  <jim@meyering.net>
19901
19902         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
19903         * m4/utimes.m4: Removed.
19904         * m4/utimes-null.m4: Renamed from utimes.m4.
19905
19906         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
19907         to 1MB, so as not to render systems with no stack size limit (e.g.,
19908         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
19909         Include <unistd.h>.  On some systems,
19910         it is required for the definition of _SC_PAGESIZE.
19911
19912 2003-08-16  Jim Meyering  <jim@meyering.net>
19913         and Paul Eggert  <eggert@cs.ucla.edu>
19914
19915         Merges from coreutils, etc.
19916
19917         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
19918         using the latest version from cvs.  This avoids problems with #line
19919         directives using a vendor (Sun) compiler.
19920         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
19921         Don't set GETGROUPS_LIB here; now it's
19922         done via getgroups.m4's wrapper function.
19923         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
19924         rather than just in sh-util/configure.in, so that the
19925         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
19926         same.
19927         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
19928         AC_FUNC_GETLOADAVG where to find getloadavg.c.
19929         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
19930         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
19931         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
19932         Remove code that is now done by the newly-required macros.
19933         Append $(EXEEXT) to DF_PROG.
19934         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
19935         Do not invoke or require the following here,
19936         since prereq.m4 or some gnulib .m4 now does this for us:
19937         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
19938         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
19939         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
19940         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
19941         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
19942         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
19943         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
19944         AC_FUNC_OBSTACK.
19945         Do not replace the following functions, as this is now the job
19946         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
19947         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
19948         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
19949         atexit getpass, strdup, getpagesize.
19950         Replace 'raise'.
19951         Do not check for the following functions, as this is now the job
19952         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
19953         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
19954         setregid.
19955         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
19956         Check for sys/sysctl.h.
19957         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
19958         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
19959         of checking for ssize_t ourselves.
19960
19961         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
19962         Require every macro that gnulib/modules/* suggests for us.
19963         (jm_PREREQ_ADDEXT): New macro.
19964         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
19965         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
19966
19967         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
19968         (gl_PHYSMEM): Use it.
19969         Also check for `table' function.
19970         Check for new headers and functions.
19971         Add check for sys/sysmp.h.
19972         With suggestions from Kaveh Ghazi.
19973         Ignore headers that are present but cannot be compiled.  This
19974         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
19975         C 5.4.
19976
19977 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19978
19979         Document merge from coreutils.
19980         * modules/userspec: Depend on posixver.
19981         * modules/strftime: Depend on tzset.
19982
19983 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19984
19985         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
19986         rather than tab, after '#' in shell-script copyright notices.
19987         Suggested by Bruno Haible.
19988
19989 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19990
19991         * config/srclist-update: Use three spaces, rather than tab, after '#'
19992         in shell-script copyright notices.  Suggested by Bruno Haible.
19993         Remove unnecessary parenthesization in regular expression.
19994
19995 2003-08-15  Jim Meyering  <jim@meyering.net>
19996
19997         Merge from coreutils.
19998         * lib/xgethostname.c: Include <stdlib.h>.
19999         (xghostname): Don't exit for anything other than memory-related
20000         failure; just return NULL.
20001         * lib/userspec.c: Include "posixver.h".
20002         (parse_user_spec): Accept `.' as a separator only
20003         in pre-POSIX-200112 mode.
20004         * lib/strtoimax.c: Use #elif rather than #else #if.
20005         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
20006         Remove function, now that we can rely on a working tzset function.
20007         [!_LIBC]: Ensure that the required autoconf test has been run.
20008         [!defined _NL_CURRENT && HAVE_STRFTIME]:
20009         Use underlying_strftime for %r.
20010         * lib/sha.c: Merge in some clean-up and optimization changes from
20011         glibc.
20012         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
20013         Ensure that it is a multiple of 64.
20014         Rearrange loop exit tests so as to avoid performing an
20015         additional fread after encountering an error or EOF.
20016         * lib/realloc.c: Update copyright date.
20017
20018 2003-08-15  Jim Meyering  <jim@meyering.net>
20019         and Paul Eggert  <eggert@twinsun.com>
20020
20021         Merge from coreutils.
20022         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
20023         member but strut utmpx does not.  Needed for AIX 4.3.3.
20024         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
20025
20026 2003-08-15  Jim Meyering  <jim@meyering.net>
20027         and Paul Eggert  <eggert@cs.ucla.edu>
20028
20029         Merges from coreutils, etc.
20030         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
20031         Require gl_FUNC_TZSET_CLOBBER.
20032         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
20033         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
20034         members.
20035
20036 2003-08-14  Paul Eggert  <eggert@twinsun.com>
20037
20038         Help the merge from coreutils.
20039         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
20040         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
20041         * m4/tzset.m4: Use it too.
20042
20043 2003-08-14  Paul Eggert  <eggert@twinsun.com>
20044
20045         * modules/tzset: New file.
20046
20047 2003-08-14  Jim Meyering  <jim@meyering.net>
20048
20049         Merges from coreutils.
20050         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
20051         variable names, rather than @FNMATCH_H@.
20052         * modules/alloca: Likewise for $(ALLOCA_H).
20053
20054         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
20055         the three copies of the literal target, `fnmatch.h'.
20056         * modules/alloca (alloca.h): Likewise.
20057
20058 2003-08-14  Jim Meyering  <jim@meyering.net>
20059
20060         Merge from coreutils.
20061         * m4/tzset.m4: New file.
20062         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
20063         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
20064         otherwise, AIX 5.1 systems would end up using the latter.
20065         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
20066         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
20067         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
20068         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
20069
20070 2003-08-14  Jim Meyering  <jim@meyering.net>
20071
20072         Merge from coreutils.
20073         * lib/obstack.h: Whitespace changes.
20074         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
20075         and xcalloc return values.
20076         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
20077         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
20078         hang on OSF/1 5.1 for DIR on both local and remote file systems.
20079         Reported by (and fix confirmed by) Nelson H. F. Beebe.
20080         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
20081         error from mntctl.
20082         Use mntctl's return value to drive the entry-processing loop, since
20083         we can't rely on the value of the vmt_length member in the last
20084         entry.  On some systems doing so could result in exhausting
20085         virtual memory.  Based in part on a patch from Mike Jetzer.
20086
20087 2003-08-14  Jim Meyering  <jim@meyering.net>
20088         and Paul Eggert  <eggert@twinsun.com>
20089
20090         Merges from coreutils, plus other fixes.
20091         * lib/physmem.c: Merge in portability changes from gcc/libiberty
20092         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
20093         for credits and details.  Thanks to Kaveh Ghazi for helping
20094         to keep these files in sync.
20095         (ARRAY_SIZE): Define it.
20096         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
20097         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
20098         (memcasecmp): Don't assume size_t fits in unsigned int.
20099         Remove casts and duplicate code.
20100         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
20101         (memcpy): Remove definition.
20102         Merge in some clean-up and optimization changes from glibc.
20103         [BLOCKSIZE]: Move definition to top of file.
20104         Ensure that it is a multiple of 64.
20105         Rearrange loop exit tests so as to avoid performing an
20106         additional fread after encountering an error or EOF.
20107         * lib/md5.h (md5_uintptr): Define.
20108         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
20109         return to the initial working directory.  Preserve errno
20110         for caller.
20111         * lib/idcache.c: Include "xalloc.h".
20112         (xmalloc, xrealloc): Remove decls.
20113         (getuser): Remove casts no longer required in C89.
20114         * lib/human.c: Include stdio.h, for sprintf.
20115         * lib/group-member.c: Include "xalloc.h".
20116         (xmalloc, xrealloc): Remove decls.
20117         (get_group_info): Remove casts no longer required in C89.
20118         * lib/getusershell.c (readname): Remove casts no longer required in
20119         C89.
20120         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
20121         * lib/getline.c: Whitespace fix, from coreutils.
20122
20123 2003-08-13  Paul Eggert  <eggert@twinsun.com>
20124
20125         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
20126         Check for isascii.
20127
20128         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
20129         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
20130         Undo previous (whitespace-only) change.
20131
20132 2003-08-13  Paul Eggert  <eggert@twinsun.com>
20133
20134         * lib/exclude.c: Include <ctype.h>
20135         (IN_CTYPE_DOMAIN): New macro.
20136         (is_space): New fn.
20137         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
20138         and empty lines.
20139
20140         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
20141         Undo previous (whitespace-only) change.
20142
20143 2003-08-13  Paul Eggert  <eggert@twinsun.com>
20144
20145         * config/srclist-update: Change update back to the old behavior,
20146         leaving whitespace alone.  Use one 'sed' command rather than a
20147         pipeline.
20148         (fixlicense): Now a variable, not a function.
20149         (remove_trailing_blanks): Remove.
20150         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
20151         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
20152         Undo previous (whitespace-only) change.
20153
20154 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20155
20156         Merge from coreutils.
20157         * modules/euidaccess: Add lib_SOURCES, include for new
20158         file euidaccess.h
20159
20160 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20161
20162         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
20163         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
20164         Normalize leading white space and remove trailing white space.
20165
20166         Merge from coreutils
20167         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
20168
20169         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
20170         0.12.1.  These files are now being upgraded automatically by
20171         ../config/srclist-update.
20172
20173 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20174
20175         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
20176         Normalize leading white space and remove trailing white space.
20177         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
20178         notice, as per ../config/srclist-update.
20179
20180         Merge from coreutils.
20181         * lib/euidaccess.h: New file.
20182         * lib/euidaccess.c: Include it.
20183         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
20184         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
20185         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
20186
20187 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20188
20189         * config/srclist-update: Add copyright notice.
20190         (remove_id_lines, remove_trailing_blanks): New constants.
20191         (fixfile): Use them to normalize spacing a bit in copied files.
20192         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
20193         Normalize leading white space and remove trailing white space.
20194
20195         * config/texinfo.tex: Sync with texinfo.
20196
20197         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
20198         strtoul.c from libc, to merge coreutils whitespace changes.
20199
20200         * config/srclist.txt: Get the following m4 files from gettext:
20201         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
20202         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
20203         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
20204         wint_t.m4.
20205
20206 2003-08-12  Karl Berry  <karl@gnu.org>
20207
20208         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
20209         been made.
20210
20211 2003-08-11  Paul Eggert  <eggert@twinsun.com>
20212
20213         * modules/gnu-source, m4/gnu-source.m4:
20214         Remove; we're assuming Autoconf 2.54 or later now.
20215         Suggested by Bruno Haible.
20216         * MODULES.html.sh (func_all_modules): Remove gnu-source.
20217
20218 2003-08-11  Bruno Haible  <bruno@clisp.org>
20219
20220         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
20221
20222 2003-08-11  Bruno Haible  <bruno@clisp.org>
20223
20224         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
20225         (vasnprintf): Use it instead of wcslen.
20226
20227 2003-08-11  Bruno Haible  <bruno@clisp.org>
20228
20229         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
20230         value to ensure that _Bool promotes to int. Use #define for _Bool when
20231         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
20232
20233 2003-08-10  Karl Berry  <karl@gnu.org>
20234
20235         * lib/regex.h: update from libc (whitespace fix).
20236
20237 2003-08-09  Paul Eggert  <eggert@twinsun.com>
20238
20239         Merge some files from coreutils.  These changes were
20240         originally made by Jim Meyering.
20241         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
20242         many older Unixes require this.
20243         * lib/alloca.c (alloca): Remove cast to argument of free;
20244         no longer needed in C89.
20245         * lib/alloca_.h, regex.h: Fix white space to match
20246         what GNU indent does.
20247
20248 2003-08-09  Paul Eggert  <eggert@twinsun.com>
20249
20250         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
20251         apparently Emacs's Unicode mode got confused before my 2003-08-05
20252         checkin.
20253
20254 2003-08-08  Paul Eggert  <eggert@twinsun.com>
20255
20256         * m4/extensions.m4: New file.
20257         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
20258         Require gl_USE_SYSTEM_EXTENSIONS.
20259         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
20260         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
20261
20262 2003-08-08  Paul Eggert  <eggert@twinsun.com>
20263
20264         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
20265         * modules/extensions, modules/gnu-source: New files.
20266         * modules/timespec, modules/unlocked-io: Depend on extensions.
20267
20268 2003-08-07  Paul Eggert  <eggert@twinsun.com>
20269
20270         * modules/restrict: New file.
20271         * MODULES.html.sh (func_all_modules): Add restrict.
20272         * modules/regex: Depend on restrict.
20273
20274 2003-08-07  Paul Eggert  <eggert@twinsun.com>
20275
20276         * m4/restrict.m4: New file.
20277         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
20278
20279 2003-08-07  Bruno Haible  <bruno@clisp.org>
20280
20281         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
20282         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
20283
20284 2003-08-07  Bruno Haible  <bruno@clisp.org>
20285
20286         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
20287         makes the module 'getndelim2' compatible with the module 'getline'.
20288
20289 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20290
20291         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
20292         byte with "\201" to avoid glitches when editing that source file
20293         with multi-gnome-terminal.
20294
20295 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20296
20297         * lib/bumpalloc.h: Remove.
20298
20299 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20300
20301         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
20302         * modules/bumpalloc: Remove.
20303
20304 2003-08-04  Paul Eggert  <eggert@twinsun.com>
20305
20306         * lib/getloadavg.c: Change copyright notice and spacing to conform to
20307         GNU coding style.
20308
20309         Merge from coreutils.
20310         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
20311         1. From glibc.
20312         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
20313         from Karl Berry, implemented by Jim Meyering.
20314         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
20315         from Dmitry V. Levin.
20316         Remove anachronistic cast of xrealloc.
20317         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
20318         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
20319         type. Otherwise, it wouldn't compile with at least /bin/cc on
20320         ymp-cray-unicos9.0.2.X.
20321         Combine two mostly-identical uses of alloca into one.
20322         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
20323
20324 2003-08-04  Dave Love  <d.love@dl.ac.uk>
20325
20326         [From Emacs.]
20327
20328         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
20329         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
20330         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
20331         obsolete NLIST_NAME_UNION.
20332         [__GNU__]: Undef BSD and FSCALE.
20333         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
20334
20335 2003-08-03  Paul Eggert  <eggert@twinsun.com>
20336
20337         * lib/stdbool_.h (_Bool): Make it signed char, instead of
20338         an enum type, so that it's guaranteed to promote to int.  See:
20339         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
20340
20341 2003-08-03  Karl Berry  <karl@gnu.org>
20342
20343         * config/depcomp: update from automake.
20344
20345 2003-07-31  Paul Eggert  <eggert@twinsun.com>
20346
20347         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
20348         (strerror): Don't assume that a printable int fits in 14 bytes.
20349
20350 2003-07-31  Bruno Haible  <bruno@clisp.org>
20351
20352         * modules/getpass-gnu: New file.
20353         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
20354
20355 2003-07-31  Bruno Haible  <bruno@clisp.org>
20356
20357         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
20358
20359 2003-07-24  Karl Berry  <karl@gnu.org>
20360
20361         * config/missing: update from automake.
20362
20363 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
20364             Bruno Haible  <bruno@clisp.org>
20365
20366         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
20367         * lib/getline.c (getline, getdelim): Likewise.
20368         Remove _GNU_SOURCE define; now it's defined in config.h through
20369         m4/getline.m4.
20370
20371 2003-07-23  Karl Berry  <karl@gnu.org>
20372
20373         * config/config.sub: update from prep.
20374
20375 2003-07-22  Paul Eggert  <eggert@twinsun.com>
20376
20377         * modules/xalloc (Depends-on): Add exitfail.
20378         * modules/xmemcoll: Likewise.
20379
20380 2003-07-22  Paul Eggert  <eggert@twinsun.com>
20381
20382         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
20383         over-parenthesization in macros.
20384
20385         Sync with coreutils.
20386
20387         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
20388         required by C99.
20389
20390         Use `exit_failure' for xalloc and xmemcoll instead of their own
20391         private exit-failure variables.
20392         * lib/xalloc.h (xalloc_exit_failure): Remove.
20393         * lib/xmalloc.c: Likewise.  Include exitfail.h.
20394         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
20395         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
20396         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
20397         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
20398
20399 2003-07-20  Jim Meyering  <jim@meyering.net>
20400
20401         * modules/closeout (Depends-on): Add exitfail.
20402         Suggestion from Bruno Haible.
20403
20404 2003-07-19  Karl Berry  <karl@gnu.org>
20405
20406         * config/config.sub: update from prep.
20407
20408 2003-07-18  Paul Eggert  <eggert@twinsun.com>
20409
20410         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
20411         Remove.
20412         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
20413         to test that it can stand by itself.  Include "exitfail.h".
20414         Clients should set exit_failure instead.
20415         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
20416
20417 2003-07-18  Bruno Haible  <bruno@clisp.org>
20418
20419         * modules/getndelim2: New file.
20420         * modules/getline: Share files with module getndelim2.
20421         * modules/getnline: Depend on getndelim2 instead of sharing files with
20422         it. Add getnline.c to lib_SOURCES.
20423         * MODULES.html.sh (func_all_modules): Add getndelim2.
20424
20425 2003-07-18  Bruno Haible  <bruno@clisp.org>
20426
20427         * m4/getndelim2.m4: New file.
20428         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
20429         invoke gl_PREREQ_GETNDELIM2.
20430         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
20431         gl_PREREQ_GETNDELIM2.
20432         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
20433         gl_GETNDELIM2.
20434
20435 2003-07-18  Bruno Haible  <bruno@clisp.org>
20436
20437         * lib/getndelim2.h: New file.
20438         * lib/getndelim2.c: Make into a module of its own. Include config.h,
20439         getndelim2.h.
20440         (getndelim2): Make non-static. Change return type to ssize_t.
20441         * lib/getline.h: Change argument names.
20442         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
20443         * lib/getnline.c: Include getndelim2.h.
20444
20445 2003-07-18  Andreas Schwab  <schwab@suse.de>
20446
20447         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
20448
20449 2003-07-17  Karl Berry  <karl@gnu.org>
20450
20451         * config/config.sub: update from prep.
20452
20453 2003-07-17  Bruno Haible  <bruno@clisp.org>
20454
20455         * modules/getnline: New file.
20456         * modules/getline: Add lib/getndelim2.c to source file list.
20457         * MODULES.html.sh (func_all_modules): Add getnline.
20458
20459 2003-07-17  Bruno Haible  <bruno@clisp.org>
20460
20461         * m4/getnline.m4: New file.
20462
20463 2003-07-17  Bruno Haible  <bruno@clisp.org>
20464
20465         * m4/Makefile.am.in: Remove file.
20466         * m4/Makefile.am: Remove file.
20467         * m4/Makefile.in: Remove file.
20468
20469 2003-07-17  Bruno Haible  <bruno@clisp.org>
20470
20471         * lib/getnline.h: New file.
20472         * lib/getnline.c: New file.
20473         * lib/getndelim2.c: New file, extracted from getline.c.
20474         (getndelim2): Renamed from getdelim2, with added nmax argument.
20475         * lib/getline.c: Include getndelim2.c.
20476         (getdelim2): Moved out to getndelim2.c.
20477         (getline, getdelim): Update.
20478
20479 2003-07-17  Bruno Haible  <bruno@clisp.org>
20480
20481         * lib/Makefile.am: Remove file.
20482         * lib/Makefile.in: Remove file.
20483
20484 2003-07-17  Bruno Haible  <bruno@clisp.org>
20485
20486         * configure.in: Remove file.
20487         * Makefile.in: Remove file.
20488
20489 2003-07-17  Bruno Haible  <bruno@clisp.org>
20490
20491         * MODULES.html.sh: Put the </BODY> right before </HTML>.
20492
20493 2003-07-16  Karl Berry  <karl@gnu.org>
20494
20495         * config/srclist-update: was running fixlicense twice, which caused
20496                 texinfo.tex to be nullified for some reason.  Simplify,
20497                 $gplsrc is no longer needed as far as I can see?
20498
20499 2003-07-16  Jim Meyering  <jim@meyering.net>
20500
20501         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
20502
20503 2003-07-15  Paul Eggert  <eggert@twinsun.com>
20504
20505         * config/srclist.txt: Get the following files from gettext-runtime/intl
20506         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
20507         ref-del.sin.  From Bruno Haible.
20508         * config/srclist-update (fixfile): Change grep pattern again, since the
20509         previous fix didn't work (there was another trailing $).  Use
20510         '[$]' to escape the $s.
20511
20512 2003-07-15  Karl Berry  <karl@gnu.org>
20513
20514         * lib/vasnprintf.c: update from gettext.
20515
20516 2003-07-15  Karl Berry  <karl@gnu.org>
20517
20518         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
20519         gets expanded when surrounded by '$'.
20520
20521 2003-07-15  Jim Meyering  <jim@meyering.net>
20522
20523         * modules/save-cwd: Don't depend on error.  From Derek Price.
20524
20525 2003-07-15  Jim Meyering  <jim@meyering.net>
20526
20527         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
20528
20529 2003-07-14  Simon Josefsson  <jas@extundo.com>
20530
20531         * modules/mempcpy: New file.
20532         * MODULES.html.sh (func_all_modules): Add mempcpy.
20533
20534 2003-07-14  Simon Josefsson  <jas@extundo.com>
20535
20536         * m4/mempcpy.m4: New file.
20537
20538 2003-07-14  Simon Josefsson  <jas@extundo.com>
20539
20540         * lib/mempcpy.h: New file.
20541         * lib/mempcpy.c: New file.
20542
20543 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20544
20545         * modules/getdate, modules/posixtm: Depend on mktime.
20546
20547 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20548
20549         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
20550         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
20551         unicodeio.c, unicodeio.h, unlocked-io.h:
20552         Switch from LGPL to GPL.
20553
20554 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20555
20556         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
20557         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
20558         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
20559         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
20560         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
20561         updated automatically by ../config/srclist-update.  This changes
20562         their license from LPGL to GPL.
20563
20564 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20565
20566         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
20567         assumed to refer to the root of the most recent stable gettext version.
20568         * config/srclistvars.sh: Add defaults for eggert.
20569         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
20570         Match "This program" as well as "The program".  This is needed
20571         for gettext.
20572
20573 2003-07-14  Jim Meyering  <jim@meyering.net>
20574
20575         Don't emit diagnostics.  Let callers do that.
20576         * lib/save-cwd.c: Don't include "error.h".
20577         (save_cwd): Don't call error.  Ensure that errno is valid
20578         when returning nonzero.
20579
20580         * lib/save-cwd.h (restore_cwd): Update prototype.
20581         * lib/save-cwd.c (restore_cwd): Remove two parameters.
20582         Simplify.  Don't call error upon failure.  Let callers do that.
20583         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
20584         when auditing is enabled.  But don't bother updating the #if.
20585
20586 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
20587
20588         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
20589         it breaks C++ compilation.
20590         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
20591
20592 2003-07-10  Simon Josefsson  <jas@extundo.com>
20593
20594         * modules/strchrnul (Makefile.am): Add strchrnul.h.
20595
20596 2003-07-10  Jim Meyering  <jim@meyering.net>
20597
20598         * m4/clock_time.m4: Remove trailing blank.
20599         * m4/intmax_t.m4: Likewise.
20600
20601 2003-07-10  Jim Meyering  <jim@meyering.net>
20602
20603         * lib/vasnprintf.c: Remove trailing blanks.
20604         Make cpp indentation consistent.
20605
20606 2003-07-09  Paul Eggert  <eggert@twinsun.com>
20607
20608         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
20609         posixver.c, strftime.c, strnlen.c, strverscmp.c:
20610         Switch from LGPL to GPL.
20611
20612 2003-07-09  Paul Eggert  <eggert@twinsun.com>
20613
20614         * config/srclist.txt: Sort sublists.  Add
20615         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
20616         that differ from gnulib for one reason or another; we'd like this list
20617         to be smaller but for now let's document what we have.
20618
20619 2003-07-08  Paul Eggert  <eggert@twinsun.com>
20620
20621         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
20622         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
20623         and sweeter "eval x=$x".
20624         * config/srclist.txt: Get lib/argp* from glibc.
20625
20626 2003-07-07  Paul Eggert  <eggert@twinsun.com>
20627
20628         * lib/mktime.c: Fix some boundary cases and remove need for floating
20629         point.
20630
20631         Issue a compile-time diagnostic if time_t is floating point, or if
20632         two's complement arithmetic is not in effect, or if arithmetic
20633         right shift does not propagate the sign.  These assumptions were
20634         all in the original code but they weren't checked.
20635
20636         (TIME_T_MIDPOINT, verify): New macros.
20637         (__isleap): Remove; it has integer overflow problems.
20638         (leapyear): New function, without those problems.
20639         (ydhms_tm_diff): Remove; splitting into two parts.
20640         (ydhms_diff): New function, containing the arithmetic part of
20641         the old ydhms_tm_diff function.  Issue a compile-time
20642         diagnostic if we are not using C99 integer division.
20643         Avoid casts when possible.
20644         (guess_time_tm): New function, containing the checking part of
20645         the old ydhms_tm_diff function.  Return the new value, rather than
20646         the difference between it and the old.  Accept a new argument T
20647         so that *T specifies the old value.  Check for overflow in the result.
20648
20649         (__mktime_internal): Use a time_t offset, not a long int offset.
20650         This undoes the 2003-06-04 change, which is no longer needed now
20651         that we have better overflow checking.
20652         (localtime_offset): Likewise.
20653
20654         (__mktime_internal): Avoid harmful overflow on hosts where time_t
20655         and long are 64-bit but int is only 32-bit.
20656         (ydhms_diff): Use long int to store year1 and yday1.
20657         Issue a compile-time diagnostic if long int is not wide enough.
20658
20659         (__mktime_internal): Use long int to store adjusted year and yday.
20660         Use plain C rather than preprocessor commands, if that doesn't
20661         affect efficiency.
20662         Check for overflow (and try to repair) after each probe
20663         rather than checking only at the very end.  This avoids some bugs
20664         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
20665         does not equal GMT offset at maximum time).
20666         Use integer to check for overflow rather than floating point; this
20667         is more portable to non-IEEE hosts, and is a tad faster.
20668         When we detect that we are oscillating between two values,
20669         don't check whether tm_isdst has the requested value, since
20670         we already know the answer.  When tm_isdst has the wrong value,
20671         use a different heuristic to find the right one, based on the
20672         extreme values actually observed in practice in tz2003a,
20673         rather than the (overly optimistic) "previous 3 calendar quarters".
20674
20675         (not_equal_tm, print_tm, check_result): Use "const T" rather than
20676         "T const" to accommodate glibc style.
20677         (check_result): Use less-confusing report format.  "long" -> "long int.
20678         (main): Likewise.
20679         Don't loop if the iteration overflows time_t.
20680         Allow a negative step in the iteration.
20681
20682 2003-07-06  Karl Berry  <karl@gnu.org>
20683
20684         * config/depcomp: update from automake.
20685         * config/config.sub: update from prep.
20686
20687 2003-07-03  Karl Berry  <karl@gnu.org>
20688
20689         * config/config.guess: update from prep.
20690
20691 2003-07-01  Paul Eggert  <eggert@twinsun.com>
20692
20693         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
20694         xreadlink.c now includes it unconditionally.
20695
20696 2003-07-01  Paul Eggert  <eggert@twinsun.com>
20697
20698         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
20699         having it depend on HAVE_SYS_TYPES_H.
20700
20701 2003-07-01  Bruno Haible  <bruno@clisp.org>
20702
20703         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
20704         <sys/types.h> should be sufficient.
20705         Reported by Paul Eggert.
20706
20707 2003-06-26  Karl Berry  <karl@gnu.org>
20708
20709         * config/depcomp: update from automake.
20710
20711 2003-06-26  Bruno Haible  <bruno@clisp.org>
20712
20713         * modules/human: Depend on module stdbool.
20714
20715 2003-06-25  Bruno Haible  <bruno@clisp.org>
20716
20717         * modules/readlink: New file.
20718         * modules/xreadlink: Depend on it.
20719         * MODULES.html.sh (func_all_modules): Add readlink.
20720
20721 2003-06-25  Bruno Haible  <bruno@clisp.org>
20722
20723         * m4/readlink.m4: New file.
20724
20725 2003-06-25  Bruno Haible  <bruno@clisp.org>
20726
20727         * lib/readlink.c: New file.
20728
20729 2003-06-22  Karl Berry  <karl@gnu.org>
20730
20731         * config/srclist.txt: update mkinstalldirs from automake.
20732         * config/mkinstalldirs: update.
20733
20734 2003-06-22  Bruno Haible  <bruno@clisp.org>
20735
20736         Portability to mingw32.
20737         * m4/ssize_t.m4: New file, from GNU gettext.
20738         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
20739         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
20740
20741 2003-06-22  Bruno Haible  <bruno@clisp.org>
20742
20743         * modules/safe-read: Add m4/ssize_t.m4.
20744         * modules/xreadlink: Add m4/ssize_t.m4.
20745
20746 2003-06-20  Bruno Haible  <bruno@clisp.org>
20747
20748         Assume C89, so PARAMS isn't needed.
20749         * lib/unicodeio.h (PARAMS): Remove.
20750         * lib/unicodeio.c: Don't use PARAMS.
20751
20752 2003-06-18  Karl Berry  <karl@gnu.org>
20753
20754         * config/config.{guess,sub}: update from prep.
20755
20756 2003-06-18  Jim Meyering  <jim@meyering.net>
20757
20758         Merge changes from coreutils.
20759         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
20760         Remove explicit declarations of xmalloc and realloc.
20761         Include xalloc.h.
20762         (read_utmp): Remove anachronistic cast of xmalloc.
20763
20764 2003-06-17  Paul Eggert  <eggert@twinsun.com>
20765
20766         Assume C89, so PARAMS isn't needed.
20767         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
20768         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
20769         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
20770         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
20771         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
20772         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
20773         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
20774         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
20775         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
20776         lib/xstrtod.h, lib/xstrtol.h: Likewise.
20777         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
20778         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
20779         no longer needed. Anyway, config.h should always be included before any
20780         other file.
20781
20782 2003-06-11  Simon Josefsson  <jas@extundo.com>
20783
20784         * modules/sysexits: New file.
20785         * MODULES.html.sh (func_all_modules): Add sysexits.
20786
20787 2003-06-11  Simon Josefsson  <jas@extundo.com>
20788
20789         * lib/sysexit_.h: New file.
20790
20791 2003-06-11  Derek Price  <derek@ximbiot.com>
20792
20793         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
20794         necessary.
20795
20796 2003-06-11  Bruno Haible  <bruno@clisp.org>
20797
20798         * m4/sysexits.m4: New file.
20799
20800 2003-06-10  Simon Josefsson  <jas@extundo.com>
20801
20802         * lib/argp.h: New file, from glibc.
20803         * lib/argp-ba.c: New file, from glibc.
20804         * lib/argp-eexst.c: New file, from glibc.
20805         * lib/argp-fmtstream.c: New file, from glibc.
20806         * lib/argp-fmtstream.h: New file, from glibc.
20807         * lib/argp-fs-xinl.c: New file, from glibc.
20808         * lib/argp-help.c: New file, from glibc.
20809         * lib/argp-namefrob.h: New file, from glibc.
20810         * lib/argp-parse.c: New file, from glibc.
20811         * lib/argp-pv.c: New file, from glibc.
20812         * lib/argp-pvh.c: New file, from glibc.
20813         * lib/argp-xinl.c: New file, from glibc.
20814
20815 2003-06-10  Simon Josefsson  <jas@extundo.com>
20816
20817         * modules/strchrnul: New file.
20818
20819 2003-06-10  Simon Josefsson  <jas@extundo.com>
20820
20821         * modules/argp: New file.
20822
20823 2003-06-10  Simon Josefsson  <jas@extundo.com>
20824
20825         * m4/strchrnul.m4: New file.
20826
20827 2003-06-10  Simon Josefsson  <jas@extundo.com>
20828
20829         * lib/strchrnul.h: New file.
20830         * lib/strchrnul.c: New file.
20831
20832 2003-06-10  Bruno Haible  <bruno@clisp.org>
20833
20834         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
20835
20836 2003-06-07  Karl Berry  <karl@gnu.org>
20837
20838         * config/config.{guess,sub}: update from prep.
20839
20840 2003-06-07  Jim Meyering  <jim@meyering.net>
20841
20842         * modules/strtod: Use $(...) notation, not @...@ for
20843         AC_REPLACE'd variables.
20844         * modules/localcharset: Likewise.
20845
20846 2003-06-07  Jim Meyering  <jim@meyering.net>
20847
20848         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
20849         in place of my name in the copyright comment.
20850         Remove definition and uses of __P.
20851
20852         From coreutils.
20853         * lib/stat.c: Don't declare xmalloc explicitly.
20854         Instead, include "xalloc.h".
20855         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
20856         xrealloc, and xcalloc return values.
20857         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
20858         Improve comment.
20859         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
20860
20861 2003-06-07  Bruno Haible  <bruno@clisp.org>
20862
20863         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
20864         avoid AC_CONFIG_LINKS.
20865         * modules/fnmatch (Makefile.am): Use explicit creation rule for
20866         fnmatch.h, to avoid AC_CONFIG_LINKS.
20867         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
20868
20869 2003-06-07  Bruno Haible  <bruno@clisp.org>
20870
20871         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
20872         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
20873         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
20874         directory.
20875         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
20876         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
20877         directory.
20878
20879 2003-06-06  Jim Meyering  <jim@meyering.net>
20880
20881         Merge from coreutils.
20882         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
20883         Consolidate declarations and initializations of *_base* locals.
20884
20885         Merge from coreutils.
20886         This avoids a core dump on systems without GNU putenv,
20887         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
20888         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
20889         (unsetenv): New static function, from GNU libc.
20890         (rpl_putenv): Use it.
20891
20892         * lib/modechange.c: Remove trailing blanks.
20893
20894         Merge from coreutils.
20895         * lib/fsusage.c: Remove declaration of statfs.
20896         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
20897
20898         * lib/posixtm.c: Include <stdbool.h> unconditionally.
20899
20900 2003-06-06  Jim Meyering  <jim@meyering.net>
20901
20902         * lib/stdbool_.h: Renamed from stdbool.h.in.
20903
20904 2003-06-06  Jim Meyering  <jim@meyering.net>
20905             Bruno Haible  <bruno@clisp.org>
20906
20907         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
20908         Adjust Makefile.am snippet not to redirect directly to target.
20909         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
20910
20911 2003-06-05  Paul Eggert  <eggert@twinsun.com>
20912
20913         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
20914         mismatch, look in future quarters as well as past.  This fixes a
20915         bug when processing fall-backwards gaps immediately after a long
20916         period of daylight-saving time.
20917
20918         * lib/mktime.c: Assume freestanding C89 or better.
20919         (HAVE_LIMITS_H): Remove.  Assume it's 1.
20920         (__P): Remove; not used.
20921         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
20922         (mktime, not_equal_tm, print_tm, check_result,
20923         main): Use prototypes.  Use const * where appropriate.
20924         (main): Fix typo in testing code that uncovered by above changes.
20925         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
20926
20927 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20928
20929         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
20930         locale.h, localeconv.  This merges changes from coreutils.
20931
20932         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
20933         It can be removed after the next Autoconf is released.
20934         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
20935         needed.
20936
20937 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20938
20939         * lib/mktime.c: Fix Debian bug 177940
20940         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
20941         (localtime_offset): Now long int, not time_t, because we want it
20942         to be guaranteed to be signed.  All uses changed.
20943         (__mktime_internal): If overflow would occur when adding offset,
20944         don't add it.
20945
20946         Merge 'human' changes from coreutils.  Rewrite to support
20947         locale-specific notations like thousands separators.
20948         * lib/human.c: Simplify authorship notice.
20949         Include human.h immediately after config.h.
20950         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
20951         <limits.h>: Do not include, since human.h does.
20952         (SIZE_MAX, UINTMAX_MAX): New macros.
20953         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
20954         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
20955         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
20956         (power_letter): Renamed from suffixes.
20957         (generate_suffix_backwards): Remove.
20958         (adjust_value): Now takes int style (because of human.h changes)
20959         and long double value (for greater precision on some platforms).
20960         (group_number): New function.
20961         (human_readable): Use it.  Use integer options, not enum.
20962         Put the options before the sizes in the arg list.
20963         Support all the new options.
20964         The old human_readable function has been removed;
20965         use inttostr.h instead.
20966         (human_readable, default_block_size, humblock):
20967         Use uintmax_t, not int, for block sizes.
20968         (human_readable_inexact, block_size_types): Remove.
20969         (block_size_opts): New constant.
20970         (human_options): Renamed from human_block_size, with new signature
20971         that allows block sizes up to UINTMAX_MAX.  All callers changed.
20972         * lib/human.h: Add copyright and authorship notice.
20973         Include <limits.h> and <stdbool.h> unconditionally.
20974         (PARAMS): Remove.  All uses removed.
20975         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
20976         (enum human_inexact_style): Remove tag; now a nameless enum.
20977         (human_floor, human_ceiling, human_round_to_even): Now have
20978         values 2, 0, 1 rather than -1, 1, 0.
20979         (human_group_digits, human_suppress_point_zero, human_autoscale,
20980         human_base_1024, human_SI, human_B): New constants.
20981         (human_readable_inexact, human_block_size): Remove.
20982         (human_readable): Size args are now uintmax_t, not int.
20983         (human_options): New decl.
20984
20985         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
20986         unnecessary now that we assume C89 or better.  This change
20987         imported from coreutils.
20988
20989         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
20990         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
20991         in the 2003-05-30 sync from glibc.
20992
20993         .h files should stand alone, but we shouldn't include <sys/types.h>
20994         if we can get away with just <stddef.h>.
20995
20996         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
20997         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
20998         rather than <sys/types.h>, as we merely need size_t.
20999         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
21000         to get size_t.
21001         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
21002         Include <stdio.h>, to get FILE.
21003         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
21004         memcasecmp.h has included <stddef.h> and all we need is size_t.
21005         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
21006         our interface, instead of including <sys/types.h>
21007
21008 2003-06-04  Paul Eggert  <eggert@twinsun.com>
21009
21010         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
21011         now, as glibc mktime is buggy on non-glibc systems.
21012
21013 2003-06-03  Karl Berry  <karl@gnu.org>
21014
21015         * config/config.sub: update from prep.
21016
21017 2003-06-02  Paul Eggert  <eggert@twinsun.com>
21018
21019         [from coreutils]
21020         Fix some minor time-related bugs with POSIX time arguments.
21021         Some valid time stamps were being rejected (notably -1, and
21022         time stamps before 1900 on 64-bit hosts).  And some invalid
21023         time stamps were being accepted, e.g. September 31.
21024
21025         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
21026         that we can return (time_t) -1 successfully.
21027         * lib/posixtm.c: Likewise.
21028         [HAVE_STDBOOL_H]: Include <stdbool.h>.
21029         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
21030         (t): Remove static var.
21031         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
21032         of static var.  All uses changed.
21033         (year): Do not reject years before 1900; they can occur with
21034         64-bit time_t.
21035         (posix_time_parse): Do not check for out-of-range components;
21036         that is now the caller's responsibility, since our checks were
21037         only approximations.
21038         (posixtime): Use mktime to check for out-of-range components,
21039         since it knows them exactly.
21040         If mktime returns (time_t) -1, check whether an error actually occurred
21041         by invoking localtime on -1.
21042         (main) [TEST_POSIXTIME]: Check for input data errors, and report
21043         posixtime failures better.
21044         Improve the test data (in comments only).
21045
21046 2003-06-02  Karl Berry  <karl@gnu.org>
21047
21048         * config/mkinstalldirs (version): new variable.
21049         (--version): new option.
21050         (usage): improve message.
21051
21052 2003-05-30  Karl Berry  <karl@gnu.org>
21053
21054         * lib/mktime.c: update from libc.
21055
21056 2003-05-30  Bruno Haible  <bruno@clisp.org>
21057
21058         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
21059         * config/config.rpath: Upgrade to gettext-0.12.1.
21060
21061 2003-05-30  Bruno Haible  <bruno@clisp.org>
21062
21063         * m4/gettext.m4: Upgrade to gettext-0.12.1.
21064         * m4/nls.m4: New file, from gettext-0.12.1.
21065         * m4/po.m4: New file, from gettext-0.12.1.
21066         * m4/progtest.m4: Upgrade to gettext-0.12.1.
21067
21068 2003-05-30  Bruno Haible  <bruno@clisp.org>
21069
21070         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
21071         * lib/localcharset.h: Likewise.
21072         * lib/localcharset.c: Likewise.
21073
21074 2003-05-29  Karl Berry  <karl@gnu.org>
21075
21076         * config/config.rpath: update from gettext.
21077
21078 2003-05-28  Paul Eggert  <eggert@twinsun.com>
21079
21080         Assume the headers required for C89 freestanding compilers.
21081         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
21082         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
21083         * m4/human.m4 (gl_HUMAN): Likewise.
21084         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
21085         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
21086         * m4/userspec.m4 (gl_USERSPEC): Likewise.
21087         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
21088         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
21089         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
21090
21091 2003-05-28  Paul Eggert  <eggert@twinsun.com>
21092
21093         Assume the headers required for C89 freestanding compilers.
21094         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
21095         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
21096         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
21097         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
21098         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
21099         define, since <limits.h> is guaranteed to do that.
21100         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
21101         * lib/exclude.c: Include <stdbool.h> unconditionally.
21102         * lib/tempname.c: Include <stddef.h> unconditionally.
21103         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
21104         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
21105         <stddef.h> does that.
21106         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
21107         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
21108         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
21109         needed.
21110         * lib/xstrtol.c: Likewise.
21111         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
21112         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
21113
21114         * lib/addext.c (addext): Use assignment rather than cast, to avoid
21115         warnings on some platforms.
21116
21117         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
21118         arbitrarily.
21119
21120 2003-05-26  Jim Meyering  <jim@meyering.net>
21121
21122         Merge in a change from coreutils:
21123         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
21124         that is guaranteed to be `no'.  Use `no_such_member' to indicate
21125         that condition, rather than `-1' which is slightly misleading.
21126         Change the name of the cache variable to have the gl_ prefix.
21127         Prompted by a patch from Richard Dawe for DJGPP.
21128
21129 2003-05-24  Karl Berry  <karl@gnu.org>
21130
21131         * config/config.guess: update from prep.
21132
21133 2003-05-22  Karl Berry  <karl@gnu.org>
21134
21135         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
21136
21137 2003-05-20  Karl Berry  <karl@gnu.org>
21138
21139         * config/config.guess: update from prep.
21140
21141 2003-05-18  Karl Berry  <karl@gnu.org>
21142
21143         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
21144         might actually be set by the user.
21145
21146         * config/depcomp, install-sh, mdate-sh: update from automake.
21147
21148 2003-05-17  Bruno Haible  <bruno@clisp.org>
21149
21150         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
21151         invalid expansion for AC_EGREP_CPP.
21152         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
21153         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
21154         Suggested by Akim Demaille <akim@epita.fr> in
21155         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
21156
21157 2003-05-12  Jim Meyering  <jim@meyering.net>
21158
21159         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
21160         the space-padded-by-default conversion specifiers, %e, %k, %l.
21161
21162 2003-05-12  Bruno Haible  <bruno@clisp.org>
21163
21164         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
21165         the string is longer than 4 KB.
21166
21167 2003-05-11  Karl Berry  <karl@gnu.org>
21168
21169         * config/config.{guess,sub}: update from prep.
21170
21171 2003-05-09  Bruno Haible  <bruno@clisp.org>
21172
21173         * modules/error: Add m4/strerror_r.m4 to file list.
21174
21175 2003-05-03  Bruno Haible  <bruno@clisp.org>
21176
21177         Upgrade to Unicode-4.0.
21178         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
21179         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
21180         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
21181         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
21182         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
21183         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
21184         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
21185         Change width of U+E0100..U+E01EF from 1 to 0.
21186
21187 2003-04-25  Jim Meyering  <jim@meyering.net>
21188
21189         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
21190         of type size_t, not int.
21191
21192 2003-04-25  Bruno Haible  <bruno@clisp.org>
21193
21194         * lib/copy-file.c: Include <stddef.h>, for size_t.
21195
21196 2003-04-21  Paul Eggert  <eggert@twinsun.com>
21197
21198         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
21199         code which expansion is under static control.  Patch imported from
21200         Akim Demaille's patch to Bison; see
21201         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
21202
21203 2003-04-14  Bruno Haible  <bruno@clisp.org>
21204
21205         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
21206
21207 2003-04-11  Jim Meyering  <jim@meyering.net>
21208
21209         Merge changes from Coreutils.
21210
21211         2003-03-22  Jim Meyering  <jim@meyering.net>
21212
21213         * lib/strftime.c (widen): Cast alloca return value to proper type.
21214
21215         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
21216
21217         From GNU libc.
21218         * lib/strftime.c (my_strftime): Handle very large width
21219         specifications for numeric values correctly.  Improve checks for
21220         overflow.
21221
21222         2003-01-19  Jim Meyering  <jim@meyering.net>
21223
21224         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
21225         definitions.
21226         (nl_get_alt_digit) [! defined my_strftime]: Define.
21227         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
21228         _nl_get_alt_digit and _nl_get_walt_digit.
21229
21230         * lib/strftime.c (my_strftime): Merge in locale-related changes from
21231         libc. These changes have no effect outside of _LIBC.
21232
21233 2003-04-10  Bruno Haible  <bruno@clisp.org>
21234
21235         * modules/findprog: New file.
21236         * MODULES.html.sh (func_all_modules): Add it.
21237
21238 2003-04-10  Bruno Haible  <bruno@clisp.org>
21239
21240         * m4/findprog.m4: New file.
21241         * m4/eaccess.m4: New file.
21242
21243 2003-04-10  Bruno Haible  <bruno@clisp.org>
21244
21245         * lib/findprog.h: New file, from GNU gettext.
21246         * lib/findprog.c: New file, from GNU gettext.
21247
21248 2003-04-05  Jim Meyering  <jim@meyering.net>
21249
21250         Merge changes from Coreutils.
21251
21252         * lib/exclude.h (PARAMS): Remove definition and uses.
21253         * lib/exclude.c: Remove uses of `PARAMS'.
21254
21255         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
21256         Add test-cases for DOS filenames. Declare program_name.
21257         (main): Set up program_name.  Patch by Rich Dawe.
21258
21259         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
21260         error from mntctl.
21261         Use mntctl's return value to drive the entry-processing loop, since
21262         we can't rely on the value of the vmt_length member in the last
21263         entry.  On some systems doing so could result in exhausting
21264         virtual memory.  Based in part on a patch from Mike Jetzer.
21265
21266 2003-04-04  Bruno Haible  <bruno@clisp.org>
21267
21268         * modules/linebreak: New file.
21269         * MODULES.html.sh (func_all_modules): Add it.
21270
21271 2003-04-04  Bruno Haible  <bruno@clisp.org>
21272
21273         * m4/linebreak.m4: New file.
21274
21275 2003-04-04  Bruno Haible  <bruno@clisp.org>
21276
21277         * lib/linebreak.h: New file, from GNU gettext.
21278         * lib/linebreak.c: New file, from GNU gettext with slight
21279         modifications.
21280         * lib/lbrkprop.h: New file, from GNU gettext.
21281
21282 2003-04-03  Bruno Haible  <bruno@clisp.org>
21283
21284         * modules/utf8-ucs4: New file.
21285         * modules/utf16-ucs4: New file.
21286         * modules/ucs4-utf8: New file.
21287         * modules/ucs4-utf16: New file.
21288         * MODULES.html.sh (func_all_modules): Add them.
21289
21290 2003-04-03  Bruno Haible  <bruno@clisp.org>
21291
21292         * m4/utf-ucs4.m4: New file.
21293         * m4/ucs4-utf.m4: New file.
21294
21295 2003-04-03  Bruno Haible  <bruno@clisp.org>
21296
21297         * lib/utf8-ucs4.h: New file, from GNU gettext.
21298         * lib/utf16-ucs4.h: New file, from GNU gettext.
21299         * lib/ucs4-utf8.h: New file, from GNU gettext.
21300         * lib/ucs4-utf16.h: New file, from GNU gettext.
21301
21302 2003-04-02  Bruno Haible  <bruno@clisp.org>
21303
21304         * modules/binary-io: New file.
21305         * MODULES.html.sh (func_all_modules): Add it.
21306
21307 2003-04-02  Bruno Haible  <bruno@clisp.org>
21308
21309         * lib/binary-io.h: New file, from GNU gettext.
21310
21311 2003-04-01  Bruno Haible  <bruno@clisp.org>
21312
21313         * modules/pathname: New file.
21314         * MODULES.html.sh (func_all_modules): Add it.
21315
21316 2003-04-01  Bruno Haible  <bruno@clisp.org>
21317
21318         * lib/pathname.h: New file, from GNU gettext.
21319         * lib/concatpath.c: New file, from GNU gettext.
21320
21321 2003-03-30  Bruno Haible  <bruno@clisp.org>
21322
21323         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
21324
21325 2003-03-30  Bruno Haible  <bruno@clisp.org>
21326
21327         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
21328         function chown() doesn't exist.
21329
21330 2003-03-28  Bruno Haible  <bruno@clisp.org>
21331
21332         * modules/copy-file: New file.
21333         * MODULES.html.sh (func_all_modules): Add it.
21334
21335 2003-03-28  Bruno Haible  <bruno@clisp.org>
21336
21337         * m4/copy-file.m4: New file.
21338
21339 2003-03-28  Bruno Haible  <bruno@clisp.org>
21340
21341         * lib/copy-file.h: New file, from GNU gettext.
21342         * lib/copy-file.c: New file, from GNU gettext.
21343
21344 2003-03-18  Jim Meyering  <jim@meyering.net>
21345
21346         * lib/quote.c (quote_n): Fix typo in comment.
21347
21348 2003-03-18  Bruno Haible  <bruno@clisp.org>
21349
21350         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
21351         checking.
21352         * m4/onceonly_2_57.m4: Likewise.
21353
21354 2003-03-17  Bruno Haible  <bruno@clisp.org>
21355
21356         * m4/onceonly.m4: Require autoconf 2.54 or newer.
21357         (m4_quote): Remove macro.
21358         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
21359
21360 2003-03-14  Jim Meyering  <jim@meyering.net>
21361
21362         Merge changes from Coreutils.
21363         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
21364         to be const, in order to avoid warnings.
21365         (obstack_room): Likewise.
21366         (obstack_empty_p): Likewise.
21367
21368 2003-03-14  Bruno Haible  <bruno@clisp.org>
21369
21370         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
21371         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
21372
21373 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21374
21375         Merge changes from Bison.
21376         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
21377         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
21378         when compiling Bison 1.875's `bitset bset = obstack_alloc
21379         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
21380         * lib/hash.c: Include <stdbool.h> unconditionally.
21381
21382 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21383
21384         * m4/onceonly.m4 (m4_quote): New macro.
21385         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
21386         Quote AC_FOREACH variable-expansions properly.
21387
21388 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21389
21390         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
21391
21392 2003-03-09  Paul Eggert  <eggert@twinsun.com>
21393
21394         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
21395         Reported by Bruce Becker; see:
21396         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
21397
21398 2003-03-03  Paul Eggert  <eggert@twinsun.com>
21399             Bruno Haible  <bruno@clisp.org>
21400
21401         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
21402         Reported by John Hughes, see
21403         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
21404
21405 2003-02-20  Bruno Haible  <bruno@clisp.org>
21406
21407         * MODULES.html.sh (func_all_modules): Add poll.
21408
21409 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
21410
21411         * modules/poll: New file.
21412
21413 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
21414
21415         * lib/poll_.h: New file.
21416         * lib/poll.c: New file.
21417
21418 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
21419
21420         * m4/poll.m4: New file.
21421
21422 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
21423
21424         * modules/mathl: New file.
21425
21426 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
21427
21428         * lib/mathl.h: New file.
21429         * lib/acosl.c: New file.
21430         * lib/asinl.c: New file.
21431         * lib/atanl.c: New file.
21432         * lib/ceill.c: New file.
21433         * lib/cosl.c: New file.
21434         * lib/expl.c: New file.
21435         * lib/floorl.c: New file.
21436         * lib/frexpl.c: New file.
21437         * lib/ldexpl.c: New file.
21438         * lib/logl.c: New file.
21439         * lib/sincosl.c: New file.
21440         * lib/sinl.c: New file.
21441         * lib/sqrtl.c: New file.
21442         * lib/tanl.c: New file.
21443         * lib/trigl.c: New file.
21444         * lib/trigl.h: New file.
21445
21446 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
21447
21448         * m4/mathl.m4: New file.
21449
21450 2003-02-18  Bruno Haible  <bruno@clisp.org>
21451
21452         * MODULES.html.sh (func_all_modules): Add mathl.
21453
21454 2003-02-17  Bruno Haible  <bruno@clisp.org>
21455
21456         * modules/mkdtemp: New module.
21457         * MODULES.html.sh (func_all_modules): Add it.
21458
21459 2003-02-17  Bruno Haible  <bruno@clisp.org>
21460
21461         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
21462
21463 2003-02-17  Bruno Haible  <bruno@clisp.org>
21464
21465         * lib/mkdtemp.h: New file, from GNU gettext.
21466         * lib/mkdtemp.c: New file, from GNU gettext.
21467
21468 2003-02-02  Jim Meyering  <jim@meyering.net>
21469
21470         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
21471         e.g. glibc-2.2.93.
21472
21473 2003-01-31  Bruno Haible  <bruno@clisp.org>
21474
21475         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
21476         'rpl_rename'.
21477         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
21478         'rpl_strnlen'.
21479         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
21480         'rpl_strtod'.
21481         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
21482         'rpl_utime'.
21483
21484 2003-01-31  Bruno Haible  <bruno@clisp.org>
21485
21486         * lib/rename.c: #undef rename before defining rpl_rename.
21487         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
21488
21489 2003-01-30  Bruno Haible  <bruno@clisp.org>
21490
21491         * modules/vasnprintf, modules/vasprintf: New modules.
21492         * MODULES.html.sh (func_all_modules): Add them.
21493
21494 2003-01-30  Bruno Haible  <bruno@clisp.org>
21495
21496         * m4/signed.m4: New file, from GNU gettext.
21497         * m4/longdouble.m4: New file, from GNU gettext.
21498         * m4/wchar_t.m4: New file, from GNU gettext.
21499         * m4/wint_t.m4: New file, from GNU gettext.
21500         * m4/vasnprintf.m4: New file.
21501         * m4/vasprintf.m4: New file.
21502
21503 2003-01-30  Bruno Haible  <bruno@clisp.org>
21504
21505         * lib/printf-args.h: New file, from GNU gettext.
21506         * lib/printf-args.c: New file, from GNU gettext.
21507         * lib/printf-parse.h: New file, from GNU gettext.
21508         * lib/printf-parse.c: New file, from GNU gettext.
21509         * lib/vasnprintf.h: New file, from GNU gettext.
21510         * lib/vasnprintf.c: New file, from GNU gettext.
21511         * lib/asnprintf.c: New file, from GNU gettext.
21512         * lib/vasprintf.h: New file, from GNU gettext with modifications.
21513         * lib/vasprintf.c: New file, from GNU gettext.
21514         * lib/asprintf.c: New file, from GNU gettext.
21515
21516 2003-01-29  Bruno Haible  <bruno@clisp.org>
21517
21518         * modules/stpncpy: New module.
21519         * MODULES.html.sh (func_all_modules): Add it.
21520
21521 2003-01-29  Bruno Haible  <bruno@clisp.org>
21522
21523         * m4/stpncpy.m4: New file.
21524
21525 2003-01-29  Bruno Haible  <bruno@clisp.org>
21526
21527         * lib/stpncpy.h: New file, from GNU gettext with modifications.
21528         * lib/stpncpy.c: New file, from GNU gettext with modifications.
21529
21530 2003-01-28  Bruno Haible  <bruno@clisp.org>
21531
21532         * modules/c-ctype: New module.
21533         * MODULES.html.sh (func_all_modules): Add it.
21534
21535 2003-01-28  Bruno Haible  <bruno@clisp.org>
21536
21537         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
21538         Paul Eggert.
21539         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
21540         Paul Eggert.
21541
21542 2003-01-27  Bruno Haible  <bruno@clisp.org>
21543
21544         * modules/xsetenv: New module.
21545         * MODULES.html.sh (func_all_modules): Add it.
21546
21547 2003-01-27  Bruno Haible  <bruno@clisp.org>
21548
21549         * lib/xsetenv.h: New file, from GNU gettext.
21550         * lib/xsetenv.c: New file, from GNU gettext.
21551
21552 2003-01-23  Jim Meyering  <jim@meyering.net>
21553
21554         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
21555         from working on systems without dirfd (at least Irix and OSF1/Tru64).
21556
21557 2003-01-23  Bruno Haible  <bruno@clisp.org>
21558
21559         * modules/minmax: New module.
21560         * MODULES.html.sh (func_all_modules): Add it.
21561
21562 2003-01-23  Bruno Haible  <bruno@clisp.org>
21563
21564         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
21565         Eggert.
21566
21567 2003-01-22  Bruno Haible  <bruno@clisp.org>
21568
21569         * modules/exit: New module.
21570         * MODULES.html.sh (func_all_modules): Add it.
21571
21572 2003-01-22  Bruno Haible  <bruno@clisp.org>
21573
21574         * lib/exit.h: New file, from GNU gettext.
21575
21576 2003-01-19  Bruno Haible  <bruno@clisp.org>
21577
21578         * gnulib-tool: Recognize option --extract-maintainer.
21579         (func_get_maintainer): New function.
21580         * modules/*: Add Maintainer entry.
21581
21582 2003-01-16  Jim Meyering  <jim@meyering.net>
21583
21584         * m4/regex.m4: The `regex' struct is both input and output.
21585         Initialize it before each use.  Patch by Tim Waugh.
21586
21587 2003-01-16  Bruno Haible  <bruno@clisp.org>
21588
21589         * MODULES.html.sh: Add a table of contents. Add the module name as
21590         leftmost column. Add hyperlinks.
21591
21592 2003-01-15  Bruno Haible  <bruno@clisp.org>
21593
21594         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
21595
21596 2003-01-15  Bruno Haible  <bruno@clisp.org>
21597
21598         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
21599         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
21600         suffix.
21601
21602 2003-01-15  Bruno Haible  <bruno@clisp.org>
21603
21604         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
21605
21606 2003-01-15  Bruno Haible  <bruno@clisp.org>
21607
21608         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
21609         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
21610
21611 2003-01-14  Jim Meyering  <jim@meyering.net>
21612
21613         * lib/same.c (same_name): Tweak a comment.
21614
21615 2003-01-14  Bruno Haible  <bruno@clisp.org>
21616
21617         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
21618         when a string comparison is sufficient.
21619
21620 2003-01-14  Bruno Haible  <bruno@clisp.org>
21621
21622         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
21623         'unsigned int'.
21624
21625 2003-01-14  Bruno Haible  <bruno@clisp.org>
21626
21627         * lib/hash-pjw.c: Add comment about low quality of this function.
21628
21629 2003-01-13  Bruno Haible  <bruno@clisp.org>
21630
21631         * modules/stpcpy: Distribute lib/stpcpy.h.
21632         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
21633
21634 2003-01-13  Bruno Haible  <bruno@clisp.org>
21635
21636         * modules/*: Add a description.
21637         * modules/strpbrk: Fix Makefile.am snippet.
21638         * modules/strtoimax: Fix dependencies.
21639         * modules/strtoumax: Likewise.
21640
21641 2003-01-13  Bruno Haible  <bruno@clisp.org>
21642
21643         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
21644         * modules/alloca (Makefile.am): All object files depend on alloca.h.
21645         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
21646
21647 2003-01-13  Bruno Haible  <bruno@clisp.org>
21648
21649         * gnulib-tool (func_create_testdir): Store config/* files in the main
21650         directory.
21651         * config.rpath: Move to ...
21652         * config/config.rpath: ... here.
21653         * modules/gettext: Contains config/config.rpath, not config.rpath.
21654         * modules/iconv: Likewise.
21655
21656 2003-01-12  Paul Eggert  <eggert@twinsun.com>
21657
21658         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
21659         to avoid collisions with libcurses and libreadline.
21660
21661         * m4/getstr.m4: Remove.
21662         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
21663
21664 2003-01-12  Paul Eggert  <eggert@twinsun.com>
21665
21666         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
21667         to avoid collisions with libcurses and libreadline.
21668
21669         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
21670         * lib/getstr.h, getstr.c: Remove.
21671         * lib/getline.c: Include "getline.h", to check interface.
21672         Move body of old getstr.c here: this defines MIN_CHUNK and
21673         declares getdelim2, which is renamed from getstr.
21674         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
21675
21676         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
21677         All uses changed.
21678         * lib/linebuffer.h: Likewise.
21679         (readline): Remove backward-compatibility macro.
21680
21681 2003-01-12  Paul Eggert  <eggert@twinsun.com>
21682
21683         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
21684         to avoid collisions with libcurses and libreadline.
21685         * getstr: Remove.
21686         * MODULES.html.sh: Remove getstr.
21687         * modules/getline: Depend on unlocked-io, not getstr.
21688
21689 2003-01-12  Jim Meyering  <jim@meyering.net>
21690
21691         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
21692
21693 2003-01-10  Bruno Haible  <bruno@clisp.org>
21694
21695         * modules/alloca: Change Makefile.am requirements. Simplify Include
21696         requirements. Add lib/alloca_.h to file list.
21697
21698 2003-01-10  Bruno Haible  <bruno@clisp.org>
21699
21700         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
21701
21702 2003-01-10  Bruno Haible  <bruno@clisp.org>
21703
21704         * lib/alloca_.h: New file.
21705         * lib/getdate.y: Unconditionally include alloca.h.
21706         * lib/makepath.c: Likewise.
21707         * lib/setenv.c: Likewise.
21708         * lib/userspec.c: Likewise.
21709
21710 2003-01-09  Karl Berry  <karl@gnu.org>
21711
21712         * MODULES.html.sh: include `dirname $0` in PATH, to find
21713         gnulib-tool.
21714
21715 2003-01-09  Bruno Haible  <bruno@clisp.org>
21716
21717         * modules/stdbool: Change configure.ac, Makefile.am requirements.
21718         Simplify Include requirements. Add lib/stdbool.h.in to file list.
21719
21720 2003-01-09  Bruno Haible  <bruno@clisp.org>
21721
21722         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
21723
21724 2003-01-09  Bruno Haible  <bruno@clisp.org>
21725
21726         * lib/stdbool.h.in: New file.
21727
21728 2003-01-09  Bruno Haible  <bruno@clisp.org>
21729
21730         * gnulib-tool (func_all_modules): Ignore files ending in ~.
21731         * MODULES.html.sh: Likewise.
21732
21733 2003-01-08  Jim Meyering  <jim@meyering.net>
21734
21735         * lib/full-write.c: Undefine and define-away `const' after inclusion
21736         of errno.h, not before.  Suggestion from Bruno Haible.
21737
21738 2003-01-08  Bruno Haible  <bruno@clisp.org>
21739
21740         * modules/full-read: Depend on full-write.
21741
21742 2003-01-08  Bruno Haible  <bruno@clisp.org>
21743
21744         * lib/safe-read.c: Include specification header first, to ensure its
21745         selfcontainedness.
21746         * lib/full-write.c: Likewise.
21747
21748 2003-01-07  Jim Meyering  <jim@meyering.net>
21749
21750         * lib/full-write.c: Rework so that it may serve to define full_read,
21751         too.
21752         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
21753
21754 2003-01-07  Bruno Haible  <bruno@clisp.org>
21755
21756         * lib/strtoimax.c: Include <stdint.h> as an alternative to
21757         <inttypes.h>.
21758         * lib/xstrtol.h: Likewise.
21759         * lib/xstrtoimax.c: Likewise.
21760         * lib/xstrtoumax.c: Likewise.
21761         * lib/human.h: Likewise.
21762
21763         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
21764         on systems that have <inttypes.h> but not <stdint.h>.
21765
21766 2003-01-07  Bruno Haible  <bruno@clisp.org>
21767
21768         * MODULES.html.sh: Add copyright notice.
21769         (missed_files): Omit CVS directory entries.
21770         (func_module): Make it work with sed-3.02.
21771         * MODULES.txt: Remove file.
21772
21773 2003-01-06  Jim Meyering  <jim@meyering.net>
21774
21775         * lib/version-etc.c: Update year in translatable copyright string.
21776
21777 2003-01-03  Karl Berry  <karl@gnu.org>
21778
21779         * config/config.{guess,sub}: update from prep.
21780
21781 2003-01-02  Karl Berry  <karl@gnu.org>
21782
21783         * doc/COPYING.DOC: belatedly updated to 1.2.
21784
21785 2003-01-01  Karl Berry  <karl@gnu.org>
21786
21787         * gnulib-tool (func_verify_module): report module name $module in
21788         error message, not $1.
21789         * gnulib-tool (create-testdir): don't complain if destdir couldn't
21790         be created, only if it doesn't exist.
21791         * gnulib-tool (last_checkin_date): don't expand the $Date here.
21792
21793 2002-12-31  Paul Eggert  <eggert@twinsun.com>
21794
21795         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
21796
21797 2002-12-31  Paul Eggert  <eggert@twinsun.com>
21798
21799         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
21800         memcmp if strcoll doesn't work.
21801
21802 2002-12-31  Bruno Haible  <bruno@clisp.org>
21803
21804         * lib/utime.c (utime_null): No need to call ftruncate if the file was
21805         nonempty.
21806
21807 2002-12-31  Bruno Haible  <bruno@clisp.org>
21808
21809         * lib/memcoll.c (STRCOLL): New macro.
21810         (memcoll): Use it.
21811
21812 2002-12-31  Bruno Haible  <bruno@clisp.org>
21813
21814         * lib/localcharset.h: New file.
21815         * lib/localcharset.c: Include it.
21816         * lib/unicodeio.c: Likewise.
21817
21818 2002-12-31  Bruno Haible  <bruno@clisp.org>
21819
21820         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
21821         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
21822
21823 2002-12-31  Bruno Haible  <bruno@clisp.org>
21824
21825         * lib/getline.h: Include <stddef.h>, for size_t.
21826
21827         * lib/unicodeio.h: Include <stddef.h>, for size_t.
21828         * lib/unicodeio.c: Don't include <stddef.h>.
21829
21830 2002-12-31  Bruno Haible  <bruno@clisp.org>
21831
21832         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
21833         HAVE_TM_ZONE.
21834
21835 2002-12-24  Karl Berry  <karl@gnu.org>
21836
21837         * config/config.guess: update from prep.
21838
21839 2002-12-24  Bruno Haible  <bruno@clisp.org>
21840
21841         General infrasructure.
21842         * m4/README: Rewritten.
21843         * m4/onceonly.m4: New file.
21844         * m4/onceonly_2_57.m4: New file.
21845
21846         Module atexit.
21847         * m4/atexit.m4: New file.
21848
21849         Module strtod.
21850         * m4/strtod.m4: New file.
21851
21852         Module strtol.
21853         * m4/strtol.m4: New file.
21854
21855         Module strtoul.
21856         * m4/strtoul.m4: New file.
21857
21858         Module memchr.
21859         * m4/memchr.m4: New file.
21860
21861         Module memcmp.
21862         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
21863         (jm_FUNC_MEMCMP): Invoke it.
21864
21865         Module memcpy.
21866         * m4/memcpy.m4: New file.
21867
21868         Module memmove.
21869         * m4/memmove.m4: New file.
21870
21871         Module memset.
21872         * m4/memset.m4: New file.
21873
21874         Module strcspn.
21875         * m4/strcspn.m4: New file.
21876
21877         Module strpbrk.
21878         * m4/strpbrk.m4: New file.
21879
21880         Module strstr.
21881         * m4/strstr.m4: New file.
21882
21883         Module strerror.
21884         * m4/strerror.m4: New file.
21885
21886         Module mktime.
21887         * m4/mktime.m4: Renamed from jm-mktime.m4.
21888         (gl_PREREQ_MKTIME): New macro.
21889         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
21890
21891         Module malloc.
21892         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
21893         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
21894         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
21895
21896         Module realloc.
21897         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
21898         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
21899         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
21900
21901         Module strftime.
21902         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
21903         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
21904         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
21905         gl_TM_GMTOFF.
21906         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
21907
21908         Module xalloc.
21909         * m4/xalloc.m4: New file.
21910
21911         Module alloca.
21912         * m4/alloca.m4: New file.
21913
21914         Module putenv.
21915         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
21916         (jm_FUNC_PUTENV): Invoke it.
21917
21918         Module setenv.
21919         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
21920         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
21921         when invoked twice.
21922         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
21923         gt_FUNC_SETENV.
21924
21925         Module memrchr.
21926         * m4/memrchr.m4: New file.
21927
21928         Module stpcpy.
21929         * m4/stpcpy.m4: New file.
21930
21931         Module strcase.
21932         * m4/strcase.m4: New file.
21933
21934         Module strdup.
21935         * m4/strdup.m4: New file.
21936
21937         Module strnlen.
21938         * m4/strnlen.m4: New file.
21939
21940         Module strndup.
21941         * m4/strndup.m4: New file.
21942
21943         Module xstrtod.
21944         * m4/xstrtod.m4: New file.
21945
21946         Module xstrtol.
21947         * m4/xstrtol.m4: New file.
21948
21949         Module getdate.
21950         * m4/getdate.m4: New file.
21951
21952         Module unlocked-io.
21953         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
21954         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
21955         * m4/jm-glibc-io.m4n: Remove file.
21956
21957         Module long-options.
21958         * m4/long-options.m4: New file.
21959
21960         Module md5.
21961         * m4/md5.m4: New file.
21962
21963         Module sha.
21964         * m4/sha.m4: New file.
21965
21966         Module getstr.
21967         * m4/getstr.m4: New file.
21968
21969         Module getline.
21970         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
21971         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
21972         <sys/types.h>, for size_t. Use the function name gnu_getline, not
21973         simply getline. Infoke gl_PREREQ_GETLINE.
21974
21975         Module obstack.
21976         * m4/obstack.m4: New file.
21977
21978         Module hash.
21979         * m4/hash.m4: New file.
21980
21981         Module readtokens.
21982         * m4/readtokens.m4: New file.
21983
21984         Module strverscmp.
21985         * m4/strverscmp.m4: New file.
21986
21987         Module stdbool.
21988         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
21989         OSF/1.
21990
21991         Module strtoll.
21992         * m4/strtoll.m4: New file.
21993
21994         Module strtoull.
21995         * m4/strtoull.m4: New file.
21996
21997         Module strtoimax.
21998         * m4/strtoimax.m4: New file.
21999
22000         Module strtoumax.
22001         * m4/strtoumax.m4: New file.
22002
22003         Module xstrtoimax.
22004         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
22005         jm_AC_PREREQ_XSTRTOIMAX.
22006         Moved the strtol prerequisites to strtol.m4.
22007         Moved the strtoll prerequisites to strtoll.m4.
22008         Moved the strtoimax prerequisites to strtoimax.m4.
22009
22010         Module xstrtoumax.
22011         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
22012         jm_AC_PREREQ_XSTRTOUMAX.
22013         Moved the strtoul prerequisites to strtoul.m4.
22014         Moved the strtoull prerequisites to strtoull.m4.
22015         Moved the strtoumax prerequisites to strtoumax.m4.
22016
22017         Module chown.
22018         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
22019         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
22020
22021         Module dup2.
22022         * m4/dup2.m4: New file.
22023
22024         Module ftruncate.
22025         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
22026         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
22027
22028         Module getgroups.
22029         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
22030         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
22031
22032         Module gettimeofday.
22033         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
22034         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
22035         gl_PREREQ_GETTIMEOFDAY.
22036
22037         Module mkdir.
22038         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
22039         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
22040
22041         Module mkstemp.
22042         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
22043         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
22044         jm_AC_TYPE_UINTMAX_T.
22045         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
22046
22047         Module stat.
22048         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
22049         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
22050
22051         Module lstat.
22052         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
22053         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
22054
22055         Module timespec.
22056         * m4/timespec.m4 (gl_TIMESPEC): New macro.
22057         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
22058         * m4/st_mtim.m4: Indentation.
22059
22060         Module nanosleep.
22061         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
22062         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
22063         gl_PREREQ_NANOSLEEP.
22064
22065         Module regex.
22066         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
22067         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
22068         (gl_REGEX): New macro.
22069
22070         Module rename.
22071         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
22072         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
22073
22074         Module rmdir.
22075         * m4/rmdir.m4: New file.
22076
22077         Module utime.
22078         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
22079         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
22080         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
22081
22082         Module dirname.
22083         * m4/dirname.m4: New file.
22084
22085         Module getopt.
22086         * m4/getopt.m4: New file.
22087
22088         Module unistd-safer.
22089         * m4/unistd-safer.m4: New file.
22090
22091         Module fnmatch.
22092         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
22093         declaration.
22094         (gl_PREREQ_FNMATCH_EXTRA): New macro.
22095         (gl_FUNC_FNMATCH_POSIX): New macro.
22096         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
22097         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
22098         simply fnmatch.
22099
22100         Module exclude.
22101         * m4/exclude.m4: New file.
22102
22103         Module human.
22104         * m4/human.m4: New file.
22105
22106         Module acl.
22107         * m4/acl.m4: Nop.
22108
22109         Module backupfile.
22110         * m4/backupfile.m4: New file.
22111         * m4/d-ino.m4: Indentation.
22112
22113         Module fsusage.
22114         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
22115         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
22116         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
22117
22118         Module dirfd.
22119         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
22120         requirements.
22121
22122         Module euidaccess.
22123         * m4/euidaccess.m4: New file.
22124
22125         Module file-type.
22126         * m4/file-type.m4: New file.
22127
22128         Module fileblocks.
22129         * m4/fileblocks.m4: New file.
22130
22131         Module filemode.
22132         * m4/filemode.m4: New file.
22133
22134         Module isdir.
22135         * m4/isdir.m4: New file.
22136
22137         Module lchown.
22138         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
22139         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
22140
22141         Module makepath.
22142         * m4/makepath.m4: New file.
22143
22144         Module modechange.
22145         * m4/modechange.m4: New file.
22146
22147         Module mountlist.
22148         * m4/mountlist.m4: New file.
22149         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
22150         Indentation.
22151
22152         Module path-concat.
22153         * m4/path-concat.m4: New file.
22154
22155         Module pathmax.
22156         * m4/pathmax.m4: New file.
22157
22158         Module same.
22159         * m4/same.m4: New file.
22160
22161         Module save-cwd.
22162         * m4/save-cwd.m4: New file.
22163
22164         Module savedir.
22165         * m4/savedir.m4: New file.
22166
22167         Module xgetcwd.
22168         * m4/xgetcwd.m4: New file.
22169         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
22170
22171         Module xreadlink.
22172         * m4/xreadlink.m4: New file.
22173
22174         Module safe-read.
22175         * m4/safe-read.m4: New file.
22176
22177         Module safe-write.
22178         * m4/safe-write.m4: New file.
22179
22180         Module closeout.
22181         * m4/closeout.m4: New file.
22182
22183         Module stdio-safer.
22184         * m4/stdio-safer.m4: New file.
22185
22186         Module getpass.
22187         * m4/getpass.m4: New file.
22188
22189         Module getugroups.
22190         * m4/getugroups.m4: New file.
22191
22192         Module group-member.
22193         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
22194         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
22195
22196         Module idcache.
22197         * m4/idcache.m4: New file.
22198
22199         Module userspec.
22200         * m4/userspec.m4: New file.
22201
22202         Module gettime.
22203         * m4/clock_time.m4: New file.
22204         * m4/gettime.m4: New file.
22205
22206         Module settime.
22207         * m4/settime.m4: New file.
22208
22209         Module posixtm.
22210         * m4/posixtm.m4: New file.
22211
22212         Module gethostname.
22213         * m4/gethostname.m4: New file.
22214
22215         Module canon-host.
22216         * m4/canon-host.m4: New file.
22217
22218         Module gettext.
22219         * m4/codeset.m4: New file, from gettext-0.11.5.
22220         * m4/gettext.m4: New file, from gettext-0.11.5.
22221         * m4/glibc21.m4: New file, from gettext-0.11.5.
22222         * m4/iconv.m4: New file, from gettext-0.11.5.
22223         * m4/intdiv0.m4: New file, from gettext-0.11.5.
22224         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
22225         * m4/inttypes.m4: New file, from gettext-0.11.5.
22226         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
22227         * m4/isc-posix.m4: New file, from gettext-0.11.5.
22228         * m4/lcmessage.m4: New file, from gettext-0.11.5.
22229         * m4/lib-ld.m4: New file, from gettext-0.11.5.
22230         * m4/lib-link.m4: New file, from gettext-0.11.5.
22231         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
22232         * m4/progtest.m4: New file, from gettext-0.11.5.
22233         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
22234         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
22235         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
22236
22237         Module localcharset.
22238         * m4/localcharset.m4: New file.
22239
22240         Module hard-locale.
22241         * m4/hard-locale.m4: New file.
22242
22243         Module mbswidth.
22244         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
22245         onceonly macros.
22246         * m4/mbrtowc.m4: Add comment.
22247
22248         Module memcasecmp.
22249         * m4/memcasecmp.m4: New file.
22250
22251         Module memcoll.
22252         * m4/memcoll.m4: New file.
22253
22254         Module unicodeio.
22255         * m4/unicodeio.m4: New file.
22256
22257         Module rpmatch.
22258         * m4/rpmatch.m4: New file.
22259
22260         Module yesno.
22261         * m4/yesno.m4: New file.
22262
22263         Module exitfail.
22264         * m4/exitfail.m4: New file.
22265
22266         Module c-stack.
22267         * m4/c-stack.m4 (gl_C_STACK): New macro.
22268         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
22269
22270         Module error.
22271         * m4/error.m4 (gl_ERROR): New macro.
22272         (jm_PREREQ_ERROR): Use onceonly macros.
22273
22274         Module fatal.
22275         * m4/fatal.m4: New file.
22276
22277         Module getloadavg.
22278         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
22279         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
22280
22281         Module getpagesize.
22282         * m4/getpagesize.m4: New file.
22283
22284         Module getusershell.
22285         * m4/getusershell.m4: New file.
22286
22287         Module physmem.
22288         * m4/physmem.m4: New file.
22289
22290         Module posixver.
22291         * m4/posixver.m4: New file.
22292
22293         Module quotearg.
22294         * m4/quotearg.m4: New file.
22295
22296         Module quote.
22297         * m4/quote.m4: New file.
22298
22299         Module readutmp.
22300         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
22301
22302         Module sig2str.
22303         * m4/sig2str.m4: New file.
22304
22305         Other.
22306         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
22307         ulonglong.m4.
22308         * m4/intmax_t.m4: New file.
22309         * m4/d-type.m4: Indentation.
22310         * m4/jm-macros.m4: Update.
22311         * m4/prereq.m4 (jm_PREREQ): Update.
22312         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
22313         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
22314         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
22315         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
22316         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
22317         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
22318         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
22319         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
22320         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
22321         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
22322         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
22323         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
22324         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
22325         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
22326         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
22327         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
22328         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
22329         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
22330         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
22331
22332 2002-12-24  Bruno Haible  <bruno@clisp.org>
22333
22334         * MODULES.txt: Update according to m4/ changes.
22335
22336         Module gettext.
22337         * config.rpath: New file, from gettext-0.11.5.
22338
22339         * modules/*: New module descriptions.
22340         * gnulib-tool: New file.
22341         * MODULES.html.sh: New file.
22342
22343 2002-12-21  Karl Berry  <karl@gnu.org>
22344
22345         * doc/fdl.texi: update to version 1.2.
22346
22347 2002-12-19  Karl Berry  <karl@gnu.org>
22348
22349         * config/config.guess: update from prep.
22350
22351 2002-12-18  Bruno Haible  <bruno@clisp.org>
22352
22353         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
22354         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
22355
22356 2002-12-17  Bruno Haible  <bruno@clisp.org>
22357
22358         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
22359         stdlib.h, string.h.
22360
22361 2002-12-17  Bruno Haible  <bruno@clisp.org>
22362
22363         * lib/canon-host.c (strdup): Remove unused declaration.
22364
22365         * lib/fsusage.c: Include full_read.h.
22366         (get_fs_usage): Use full_read instead of safe_read.
22367
22368         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
22369
22370 2002-12-12  Karl Berry  <karl@gnu.org>
22371
22372         * config/config.guess: update from prep.
22373
22374 2002-12-11  Bruno Haible  <bruno@clisp.org>
22375
22376         * m4/setenv.m4: New file, from gettext-0.11.5.
22377
22378 2002-12-11  Bruno Haible  <bruno@clisp.org>
22379
22380         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
22381         not unsetenv().
22382         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
22383         modifications:
22384
22385         2002-12-11  Bruno Haible  <bruno@clisp.org>
22386
22387                 * setenv.c (alloca): Fall back to malloc.
22388                 (freea): New macro.
22389                 (setenv): Use freea() to free memory allocated with alloca().
22390
22391         2002-11-13  Bruno Haible  <bruno@clisp.org>
22392
22393                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
22394                 function declarations.
22395                 * unsetenv.c (unsetenv): Likewise.
22396
22397         2002-03-04  Bruno Haible  <bruno@clisp.org>
22398
22399                 Portability to AIX 4.3.3.
22400                 * unsetenv.c: New file, extracted from setenv.c.
22401                 * setenv.c: Move the unsetenv() function to unsetenv.c.
22402
22403         2001-12-20  Bruno Haible  <bruno@clisp.org>
22404
22405                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
22406                 use malloc instead. For SunOS 4.
22407
22408         2001-12-11  Bruno Haible  <bruno@clisp.org>
22409
22410                 * setenv.c: Declare alloca.
22411                 (compar_fn_t): New typedef.
22412                 (KNOWN_VALUE, STORE_VALUE): Use it.
22413
22414         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
22415         setenv.h.
22416
22417 2002-12-10  Paul Eggert  <eggert@twinsun.com>
22418
22419         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
22420         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
22421         Choose values that are less likely to collide with system fnmatch
22422         options.
22423         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
22424         defined (e.g., a pure POSIX system).
22425         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
22426         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
22427
22428 2002-12-06  Paul Eggert  <eggert@twinsun.com>
22429
22430         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
22431         a pain in practice to deal with generated m4 files.  This change
22432         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
22433
22434         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
22435         and jm-glibc-io.m4, as they are no longer a special case.
22436         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
22437         kludge and the auto-generation stuff.  Check only whether the
22438         functions are declared, not whether they exist, since older hosts
22439         that don't declare the functions can't use the optimization anyway.
22440
22441 2002-12-06  Jim Meyering  <jim@meyering.net>
22442
22443         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
22444
22445         Merge in changes from libc's misc/error.c, in preparation
22446         for the merge of gnulib's changes back into libc.
22447
22448         * lib/error.c (_): Define only if not already defined.
22449         Move definition to follow all #include directives.
22450         Include unlocked-io.h only if !_LIBC.
22451         [_LIBC]: Include <libio/libioP.h>.
22452         [USE_IN_LIBIO]: Include <libio/iolibio.h>
22453         (fflush): Tweak definition to use INTUSE.
22454         (putc): Define.
22455
22456 2002-12-05  Paul Eggert  <eggert@twinsun.com>
22457
22458         * lib/alloca.c [defined emacs]: Include "lisp.h".
22459         (xalloc_die) [defined emacs]: New macro.
22460         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
22461         [! defined emacs]: Include <xalloc.h>.
22462         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
22463         (pointer): Typedef to POINTER_TYPE *.
22464         (malloc): Remove decl; we now always use xmalloc.
22465         (alloca): Use old-style definition, since Emacs needs this.
22466         Check for arithmetic overflow when computing combined size.
22467
22468 2002-12-04  Paul Eggert  <eggert@twinsun.com>
22469
22470         Do not generate unlocked-io.h automatically, since it's easier to
22471         maintain it by hand.
22472
22473         * lib/unlocked-io.h: New file, from GNU diffutils,
22474         but with proper copyright notice and attribution.
22475         * lib/gen-uio: Remove.
22476         * lib/Makefile.am: Add copyright notice.
22477         (libfetish_a_SOURCES): Add unlocked-io.h.
22478         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
22479         (DISTCLEANFILES, io_functions): Remove macros.
22480         (EXTRA_DIST): Remove gen_uio.
22481         (unlocked-io.h): Remove rule.
22482
22483 2002-12-04  Jim Meyering  <jim@meyering.net>
22484
22485         Reflect the fact that stat.c and lstat.c are no longer generated.
22486         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
22487         (DISTCLEANFILES): Likewise.
22488         (EXTRA_DIST): Likewise.
22489         (all_local): Don't depend on stat.c or lstat.c.
22490         (stat.c, lstat.c): Remove rules.
22491         (EXTRA_DIST): Remove xstat.in.
22492
22493         * lib/xstat.in: Remove file.  Contents moved into stat.c.
22494         * lib/stat.c: New file.  Contents mostly from xstat.in.
22495         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
22496         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
22497
22498         * lib/safe-read.c: Rework so that it may serve to define safe_write,
22499         too.
22500         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
22501
22502 2002-12-03  Jim Meyering  <jim@meyering.net>
22503
22504         * lib/safe-read.c, safe-write.c: Change variable names and comments,
22505         but not semantics, to minimize the differences between these two files.
22506         (safe_read): Change comment to mention SAFE_READ_ERROR.
22507
22508         * lib/safe-read.c (IS_EINTR): Define.
22509         (safe_read): Use IS_EINTR in place of in-function cpp directives.
22510
22511 2002-12-02  Jim Meyering  <jim@meyering.net>
22512
22513         * lib/safe-read.c (EINTR): Define.
22514         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
22515         (INT_MAX): Provide fallback.
22516         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
22517
22518         * lib/safe-read.h (SAFE_READ_ERROR): Define.
22519
22520 2002-12-02  Bruno Haible  <bruno@clisp.org>
22521
22522         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
22523         Define, taken from safe-read.c.
22524         (INT_MAX): Provide fallback.
22525         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
22526         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
22527
22528         * lib/safe-read.c (EINTR): Remove definition.
22529         (safe_read): Don't use EINTR if it is absent.
22530
22531 2002-12-01  Jim Meyering  <jim@meyering.net>
22532
22533         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
22534         zero.
22535         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
22536
22537 2002-11-27  Paul Eggert  <eggert@twinsun.com>
22538
22539         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
22540         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
22541         with `if (! (value < limit)) abort ();', for readability.
22542
22543 2002-11-26  Karl Berry  <karl@gnu.org>
22544
22545         * lib/strdup.c: copy from libc again, with jim's ok.
22546         * lib/.cppi-disable: re-add strdup.c
22547
22548 2002-11-25  Karl Berry  <karl@gnu.org>
22549
22550         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
22551         instead of "strtol.c".
22552
22553 2002-11-25  Karl Berry  <karl@gnu.org>
22554
22555         * config/install-sh: update from automake for variable quoting, $0 in
22556         error msgs, etc.
22557
22558         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
22559         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
22560         entry.
22561
22562 2002-11-25  Jim Meyering  <jim@meyering.net>
22563
22564         * lib/mktime.c: Sync from libc, now that it has the latest fix.
22565
22566 2002-11-24  Karl Berry  <karl@gnu.org>
22567
22568         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
22569         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
22570
22571 2002-11-24  Jim Meyering  <jim@meyering.net>
22572
22573         Update from coreutils:
22574
22575         * lib/mktime.c: Merge in changes from libc.
22576
22577         Avoid a link-time failure on some Linux systems.
22578         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
22579         (otherwise).
22580         (__mon_yday): Declare with the STATIC attribute.
22581         (__mktime_internal): Likewise.
22582         Based on a report from Greg Schafer.
22583
22584 2002-11-23  Jim Meyering  <jim@meyering.net>
22585
22586         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
22587         Use `unsigned', not `int', as type of index.
22588
22589         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
22590
22591         * lib/fsusage.c: Remove unneeded parentheses around operands of
22592         `defined'.
22593
22594 2002-11-22  Paul Eggert  <eggert@twinsun.com>
22595
22596         * lib/quotearg.h: Allow multiple inclusion by surrounding with
22597         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
22598         so that we can be included first.
22599         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
22600         * lib/quotearg.c: Include quotearg.h immediately after config.h.
22601         No need to include stddef.h or sys/types.h any more.
22602         Surround local include files with "", not "<>".
22603         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
22604         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
22605         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
22606         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
22607         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
22608         (ISPRINT): Remove; no longer needed now that we assume C89.
22609
22610         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
22611         Preserve errno.
22612
22613         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
22614         quotearg_char): Use SIZE_MAX rather than
22615         (size_t) -1 when we are talking about "infinity".
22616
22617         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
22618
22619 2002-11-22  Paul Eggert  <eggert@twinsun.com>
22620
22621         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
22622         hint that one should use `if (! x) abort ();' rather than `assert
22623         (x);', and anyway it's one less thing to worry about configuring.
22624         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
22625         hash_rehash, hash_insert): Use abort rather than assert.
22626
22627 2002-11-22  Bruno Haible  <bruno@clisp.org>
22628
22629         * lib/safe-read.h: Assume C89. Add comments.
22630         (safe_read): Change return type to size_t.
22631         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
22632         byte counts > SSIZE_MAX correctly.
22633         * lib/safe-write.h: New file.
22634         * lib/safe-write.c: New file.
22635         * lib/full-read.h: New file.
22636         * lib/full-read.c: New file.
22637         * lib/full-write.h: Assume C89. Add comments.
22638         * lib/full-write.c: Include safe-write.h.
22639         (full_write): Rewritten to use safe_write.
22640         Suggested by Jim Meyering and Paul Eggert.
22641
22642 2002-11-21  Jim Meyering  <jim@meyering.net>
22643
22644         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
22645
22646         Merge in changes from the coreutils.
22647
22648         2002-09-25  Paul Eggert  <eggert@twinsun.com>
22649         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
22650         <stdint.h>.
22651         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
22652         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
22653         int.  Work more efficiently if X is the same width as uintmax_t.
22654         Do not compare X to -1, to avoid bogus compiler warning.
22655         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
22656         Don't assume that f_frsize and f_bsize are the same type.
22657
22658         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
22659         warning on FreeBSD.
22660
22661         * lib/makepath.c (make_path): Restore umask *before* creating the final
22662         component.
22663         (make_path): Minor reformatting.
22664
22665         * lib/xmalloc.c: Adjust to work with new autoconf macros,
22666         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
22667         HAVE_MALLOC/HAVE_REALLOC.
22668
22669         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
22670         dummy ones.  At least on GNU/Linux systems, `auto' means something
22671         else.
22672         From Michael Stone.
22673
22674 2002-11-21  Bruno Haible  <bruno@clisp.org>
22675
22676         Remove case insensitive option matching.
22677         * lib/argmatch.h (argcasematch): Remove declaration.
22678         (ARGCASEMATCH): Remove macro.
22679         (__xargmatch_internal): Remove case_sensitive argument.
22680         (XARGMATCH): Update.
22681         (XARGCASEMATCH): Remove macro.
22682         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
22683         case_sensitive argument.
22684         (argcasematch): Remove function.
22685         (__xargmatch_internal): Remove case_sensitive argument.
22686         (main): Use XARGMATCH instead of XARGCASEMATCH.
22687
22688         * lib/xmalloc.c: Change compile-time error message. Add comment about
22689         required autoconf version.
22690
22691 2002-11-20  Paul Eggert  <eggert@twinsun.com>
22692
22693         Merge argmatch cleanups from Bison.  Assume C89.
22694
22695         * lib/argmatch.c: Include config.h here, not in argmatch.h.
22696         Include stdlib.h, for EXIT_FAILURE.
22697         Always include <string.h>, since we assume C89.
22698         (EXIT_FAILURE): Remove pre-C89 bug workaround.
22699         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
22700         Include <stddef.h> instead, since it's all we need for size_t.
22701         (PARAMS): Remove.  All uses removed.
22702         (ARRAY_CARDINALITY): Do not bother to #undef.
22703         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
22704         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
22705         Remove unnecessary parentheses.
22706         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
22707         Insert necessary parentheses.
22708         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
22709         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
22710
22711 2002-11-19  Bruno Haible  <bruno@clisp.org>
22712
22713         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
22714         * lib/mbswidth.h: Include <stddef.h>, for size_t.
22715
22716         * lib/mbswidth.h (PARAMS): Remove macro.
22717         (mbswidth, mbsnwidth): Use ANSI C function declarations.
22718         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
22719
22720         * lib/gcd.h (PARAMS): Remove macro.
22721         (gcd): Use ANSI C function declarations.
22722         * lib/gcd.c (gcd): Likewise.
22723
22724 2002-11-15  Bruno Haible  <bruno@clisp.org>
22725
22726         * lib/strcspn.c: Include <stddef.h>.
22727         (strcspn): Use ANSI C function declaration. Change return type to
22728         size_t. Use NULL.
22729         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
22730         (strpbrk): Use NULL.
22731         * lib/strpbrk.h (PARAMS): Remove macro.
22732         (strpbrk): Use ANSI C function declaration.
22733         * lib/strstr.c: Don't include <sys/types.h>.
22734         * lib/strstr.h (PARAMS): Remove macro.
22735         (strstr): Use ANSI C function declarations.
22736
22737 2002-11-14  Karl Berry  <karl@gnu.org>
22738
22739         * config/mkinstalldirs: `do' on separate line, instead of
22740         `for var; do'.
22741
22742 2002-11-06  Bruno Haible  <bruno@clisp.org>
22743
22744         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
22745         * lib/gcd.c (gcd): Likewise.
22746
22747 2002-11-05  Bruno Haible  <bruno@clisp.org>
22748
22749         * lib/gcd.h: New file, from gettext-0.11.5.
22750         * lib/gcd.c: New file, from gettext-0.11.5.
22751
22752 2002-11-05  Bruno Haible  <bruno@clisp.org>
22753
22754         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22755         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22756         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22757         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22758
22759         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
22760         <libintl.h>.
22761         * lib/makepath.c: Include gettext.h instead of <locale.h> and
22762         <libintl.h>.
22763
22764         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
22765         * lib/human.c: Include gettext.h instead of <libintl.h>.
22766         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
22767         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
22768         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
22769         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
22770         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
22771         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
22772         (textdomain): Remove definition.
22773         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
22774
22775         * lib/long-options.c: Remove include of <libintl.h> and definition of
22776         _.
22777         * lib/same.c: Remove include of <libintl.h> and definition of _.
22778
22779 2002-11-04  Owen Taylor  <otaylor@redhat.com>
22780
22781         * lib/config.charset: A few additions for Solaris.
22782
22783 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
22784
22785         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
22786         * lib/localcharset.c (locale_charset): Declare as extern "C".
22787
22788 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
22789
22790         * lib/config.charset: msdos in uk_UA uses CP1125.
22791
22792 2002-11-04  Bruno Haible  <bruno@clisp.org>
22793
22794         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
22795         * lib/strcase.h: New file, from GNU gettext-0.11.5.
22796         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
22797         * lib/strstr.h: New file, from GNU gettext-0.11.5.
22798         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
22799
22800 2002-11-04  Bruno Haible  <bruno@clisp.org>
22801
22802         * lib/localcharset.c (locale_charset): Don't return an empty string.
22803
22804 2002-11-04  Bruno Haible  <bruno@clisp.org>
22805
22806         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
22807         aliases.
22808
22809 2002-11-04  Bruno Haible  <bruno@clisp.org>
22810
22811         * lib/config.charset: Update for newest glibc. Add canonical names
22812         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
22813
22814 2002-11-04  Bruno Haible  <bruno@clisp.org>
22815
22816         * lib/config.charset: Add support for NetBSD.
22817
22818 2002-11-04  Bruno Haible  <bruno@clisp.org>
22819
22820         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
22821
22822 2002-11-01  Bruno Haible  <bruno@clisp.org>
22823
22824         * configure.in: Add AC_CONFIG_AUX_DIR call.
22825         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
22826         test/Makefile.
22827         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
22828
22829 2002-09-28  Karl Berry  <karl@gnu.org>
22830
22831         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
22832         installed automake until the next release, since changes have been
22833         made.
22834
22835 2002-09-25  Karl Berry  <karl@gnu.org>
22836
22837         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
22838         * lib/getopt*: copy from libc/posix.
22839         * lib/gettext.h: copy from gettext.
22840         * lib/.cppi-disable: add strdup.c, gettext.h.
22841
22842 2002-09-25  Karl Berry  <karl@gnu.org>
22843
22844         * config/srclist.txt: enable gettext.h check.
22845         * config/config.{guess,sub}: update from prep.
22846         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
22847                 from automake 1.6.3.
22848         See srclist*.
22849
22850 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
22851
22852         * regex.c (PATFETCH): Remove the translating fetch.
22853         (PATFETCH_RAW): Rename to PATFETCH.
22854         (set_image_of_range): New fun.
22855         (SET_RANGE_TABLE_WORK_AREA): Use it.
22856         (regex_compile): Don't translate the pattern chars so eagerly.
22857         Only do it when inserting an `exactn' bytecode or when handling
22858         a char-range.
22859         (mutually_exclusive_p): Avoid empty statement.
22860
22861 2002-07-06  Jim Meyering  <meyering@lucent.com>
22862
22863         * m4/README: Don't mention Makefile.am.in.
22864         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
22865
22866 2002-07-01  Jim Meyering  <meyering@lucent.com>
22867
22868         * lib/c-stack.c: Include sys/time.h.
22869         From Volker Borchert.
22870
22871 2002-06-26  Paul Eggert  <eggert@twinsun.com>
22872
22873         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
22874
22875 2002-06-26  Paul Eggert  <eggert@twinsun.com>
22876
22877         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
22878         New macro.  Use it uniformly instead of
22879         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
22880         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
22881         reported by Vin Shelton.
22882
22883 2002-06-22  Paul Eggert  <eggert@twinsun.com>
22884
22885         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
22886         Do not assume SA_SIGINFO behavior.
22887         Bug reported by Jim Meyering on NetBSD 1.5.2.
22888
22889 2002-06-22  Jim Meyering  <meyering@lucent.com>
22890
22891         * m4/c-stack.m4: New file, from diffutils-2.8.2.
22892         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
22893
22894         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
22895         now that configure.ac uses AC_GNU_SOURCE.
22896         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
22897         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
22898
22899         Update to latest tools.  Suggestions from Paul Eggert.
22900         * m4/stdbool.m4: New file, from diffutils-2.8.2.
22901         * m4/gnu-source.m4: Update from diffutils-2.8.2.
22902         * m4/fnmatch.m4: Likewise.
22903         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
22904         to AC_HEADER_STDBOOL
22905
22906 2002-06-22  Jim Meyering  <meyering@lucent.com>
22907
22908         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
22909         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
22910
22911 2002-06-22  Jim Meyering  <meyering@lucent.com>
22912
22913         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
22914
22915         * lib/exitfail.c, exitfail.h: Likewise.
22916         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
22917
22918         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
22919         of fnmatch.h.
22920         (EXTRA_DIST): Add fnmatch_loop.c.
22921         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
22922
22923         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
22924         * lib/fnmatch.c: Update from diffutils-2.8.2.
22925         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
22926         * lib/fnmatch.h: Remove file.
22927
22928 2002-06-21  Jim Meyering  <meyering@lucent.com>
22929
22930         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
22931         * m4/mbrtowc.m4: Likewise.
22932
22933         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
22934         * m4/mbswidth.m4: Reflect name change:
22935         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
22936         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
22937
22938         * m4/lib-link.m4: Update from gettext-0.11.2.
22939         * m4/gettext.m4: Likewise.
22940
22941         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
22942         From Alfred M. Szmidt.
22943
22944 2002-06-18  Paul Eggert  <eggert@twinsun.com>
22945
22946         * lib/file-type.h: Report an error if neither S_ISREG nor
22947         S_IFREG is defined, instead of using a test specific to glibc
22948         2.2.  This should be safe, since POSIX requires S_ISREG and
22949         Unix Version 7 had S_IFREG.  We don't need to check for
22950         <sys/types.h> since we don't use any symbols that it defines.
22951
22952 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
22953
22954         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
22955         $@-t, so that each temporary file name is unique and valid in the first
22956         8 characters, for operation under DOS.
22957
22958 2002-06-15  Paul Eggert  <eggert@twinsun.com>
22959
22960         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
22961
22962 2002-06-15  Jim Meyering  <meyering@lucent.com>
22963
22964         Work even with DJGPP 2.03, which lacks support for symlinks.
22965         From Richard Dawe.
22966         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
22967         is defined.
22968         * lib/lchown.c (S_ISLNK): Likewise.
22969
22970 2002-06-15  Jim Meyering  <meyering@lucent.com>
22971
22972         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
22973         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
22974         have been included before this file.
22975
22976 2002-06-14  Jim Meyering  <meyering@lucent.com>
22977
22978         * lib/file-type.h: Use the version from diffutils-2.8.2.
22979         * lib/file-type.c: Likewise.
22980
22981 2002-06-07  Jim Meyering  <meyering@lucent.com>
22982
22983         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
22984         They're needed at least for NetBSD 1.5.2.
22985         ($statxfs_includes): Include those same headers.
22986         ($statxfs_includes): Include sys/vfs.h if available.
22987         ($statxfs_includes): Likewise for sys/statvfs.h.
22988         Check for the following members in both structs statfs and statvfs:
22989         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
22990
22991 2002-06-01  Jim Meyering  <meyering@lucent.com>
22992
22993         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
22994         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
22995
22996 2002-05-28  Jim Meyering  <meyering@lucent.com>
22997
22998         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
22999         Reported by Volker Borchert.
23000
23001 2002-05-27  Jim Meyering  <meyering@lucent.com>
23002
23003         Fix a problem seen only on nonconforming systems whereby ls.c's
23004         use of localtime, and then of gettimeofday would cause trouble:
23005         the localtime call used to initialize rpl_gettimeofday's save
23006         mechanism would clobber ls's current local time information so
23007         that in any long listing the first file would always be listed
23008         with date 1970-01-01.  Analysis by Volker Borchert.
23009
23010         * lib/gettimeofday.c (localtime): Undefine.
23011         (rpl_localtime): New function.
23012
23013 2002-05-27  Jim Meyering  <meyering@lucent.com>
23014
23015         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
23016         localtime.
23017
23018         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
23019         use the replacement function; it wouldn't resolve at link time.
23020         Reported by Volker Borchert.
23021
23022 2002-05-22  Jim Meyering  <meyering@lucent.com>
23023
23024         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
23025         file-type.h.
23026         * lib/file-type.h: New file.
23027         * lib/file-type.c (file_type): New file/function.  Extracted from
23028         diffutils.
23029
23030 2002-04-30  Jim Meyering  <meyering@lucent.com>
23031
23032         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
23033
23034 2002-04-29  Paul Eggert  <eggert@twinsun.com>
23035
23036         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
23037
23038 2002-04-29  Paul Eggert  <eggert@twinsun.com>
23039
23040         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
23041         Do not check for alloca.h (no longer used) or stdbool.h (was never
23042         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
23043
23044 2002-04-29  Paul Eggert  <eggert@twinsun.com>
23045
23046         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
23047
23048 2002-04-29  Jim Meyering  <meyering@lucent.com>
23049
23050         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
23051         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
23052         Use AC_FUNC_STRNLEN here instead.
23053
23054         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
23055         With autoconf-2.53a, it's part of AC_PROG_CC.
23056
23057 2002-04-28  Paul Eggert  <eggert@twinsun.com>
23058
23059         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
23060         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
23061
23062 2002-04-28  Paul Eggert  <eggert@twinsun.com>
23063
23064         * lib/sig2str.h, lib/sig2str.c: New files.
23065         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
23066
23067 2002-04-28  Paul Eggert  <eggert@twinsun.com>
23068
23069         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
23070         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
23071         of 127, since 64 is the largest conceivable number for ancient
23072         nonstandard hosts.
23073         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
23074
23075 2002-04-28  Jim Meyering  <meyering@lucent.com>
23076
23077         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
23078
23079 2002-04-24  Jim Meyering  <meyering@lucent.com>
23080
23081         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
23082         (jm_PREREQ): Use it.
23083
23084         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
23085         mach/mach.h fcntl.h.
23086         Check for this function: setlocale.
23087
23088 2002-04-24  Jim Meyering  <meyering@lucent.com>
23089
23090         * lib/gettext.h: New file, from Gettext.
23091         * lib/Makefile.am (INCLUDES): Remove -I../intl.
23092         (libfetish_a_SOURCES): Add gettext.h.
23093
23094 2002-04-16  Jim Meyering  <meyering@lucent.com>
23095
23096         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
23097         ut_pid, ut_id, ut_exit.
23098
23099 2002-04-16  Jim Meyering  <meyering@lucent.com>
23100
23101         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
23102         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
23103         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
23104
23105 2002-04-12  Jim Meyering  <meyering@lucent.com>
23106
23107         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
23108         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
23109         existence of the getmntinfo function.  Needed for Darwin 5.3.
23110
23111         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
23112         This is necessary at least on Darwin 5.3.
23113
23114         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
23115         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
23116         strnlen.o in the library, and that makes some versions of ranlib
23117         object.
23118
23119 2002-04-12  Jim Meyering  <meyering@lucent.com>
23120
23121         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
23122
23123 2002-04-09  Jim Meyering  <meyering@lucent.com>
23124
23125         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
23126         to be more precise.  Rather than saying we're checking whether the
23127         function `works', say what we're testing.
23128         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
23129         Reported by Bruno Haible.
23130
23131 2002-03-10  Jim Meyering  <meyering@lucent.com>
23132
23133         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
23134         Suggestion from Santiago Vila.
23135
23136 2002-03-08  Jim Meyering  <meyering@lucent.com>
23137
23138         * lib/rename.c: Mention that this wrapper is needed also on
23139         mips-dec-ultrix4.4 systems.
23140
23141 2002-03-02  Jim Meyering  <meyering@lucent.com>
23142
23143         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
23144         not HAVE_CLOCK_SETTIME.
23145
23146 2002-02-27  Paul Eggert  <eggert@twinsun.com>
23147
23148         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
23149         Check for clock_settime.
23150
23151 2002-02-27  Paul Eggert  <eggert@twinsun.com>
23152
23153         * lib/nanosleep.h: Rename to....
23154         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
23155
23156         * lib/gettime.c: New file.
23157         * lib/settime.c: New file.
23158         * lib/stime.c: Remove.
23159
23160         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
23161         timespec.h.  Remove nanosleep.h.
23162
23163 2002-02-25  Paul Eggert  <eggert@twinsun.com>
23164
23165         * m4/acl.m4: New file.
23166         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
23167         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
23168
23169 2002-02-25  Paul Eggert  <eggert@twinsun.com>
23170
23171         * lib/acl.c, lib/acl.h: New files.
23172         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
23173
23174 2002-02-24  Jim Meyering  <meyering@lucent.com>
23175
23176         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
23177         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
23178         cause trouble.  Reported by Nelson Beebe.
23179
23180 2002-02-23  Paul Eggert  <eggert@twinsun.com>
23181
23182         * lib/path-concat.c (xpath_concat): Reorder code to pacify
23183         compilers that don't know that xalloc_die never returns.
23184
23185 2002-02-20  Jim Meyering  <meyering@lucent.com>
23186
23187         * lib/getdate.c: Regenerate using bison-1.33.
23188
23189 2002-02-17  Jim Meyering  <meyering@lucent.com>
23190
23191         * config/config.guess (main): Don't use `head -1'; it's no longer
23192         portable. Use `sed 1q' instead.
23193
23194 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
23195
23196         * m4/codeset.m4: Upgrade to gettext-0.11.
23197         * m4/gettext.m4: Upgrade to gettext-0.11.
23198         * m4/glibc21.m4: Upgrade to gettext-0.11.
23199         * m4/iconv.m4: Upgrade to gettext-0.11.
23200         * m4/isc-posix.m4: Upgrade to gettext-0.11.
23201         * m4/lcmessage.m4: Upgrade to gettext-0.11.
23202         * m4/lib-ld.m4: New file, from gettext-0.11.
23203         * m4/lib-link.m4: New file, from gettext-0.11.
23204         * m4/lib-prefix.m4: New file, from gettext-0.11.
23205         * m4/progtest.m4: Upgrade to gettext-0.11.
23206
23207 2002-02-15  Paul Eggert  <eggert@twinsun.com>
23208
23209         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
23210         (jm_PREREQ): Use it.
23211
23212 2002-02-15  Paul Eggert  <eggert@twinsun.com>
23213
23214         * lib/posixver.c, lib/posixver.h: New files.
23215         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
23216
23217 2002-02-02  Paul Eggert  <eggert@twinsun.com>
23218             Bruno Haible  <bruno@clisp.org>
23219
23220         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
23221         (fwrite_success_callback): New declaration.
23222         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
23223         print_unicode_char. Call failure callback instead of error.
23224         (fwrite_success_callback): New function.
23225         (exit_failure_callback): New function.
23226         (fallback_failure_callback): New function.
23227         (print_unicode_char): Call unicode_to_mb.
23228
23229 2002-01-26  Jim Meyering  <meyering@lucent.com>
23230
23231         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
23232         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
23233
23234 2002-01-26  Jim Meyering  <meyering@lucent.com>
23235
23236         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
23237
23238 2002-01-22  Paul Eggert  <eggert@twinsun.com>
23239
23240         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
23241
23242 2002-01-22  Jim Meyering  <meyering@lucent.com>
23243
23244         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
23245         Otherwise, some versions of automake would omit the rule that makes
23246         Makefile from Makefile.in.
23247
23248 2002-01-21  Paul Eggert  <eggert@twinsun.com>
23249
23250         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
23251         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
23252         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
23253         (memcoll): Set errno to zero if there is no error.
23254
23255         * lib/quotearg.c (quotearg_buffer_restyled):
23256         Fix bug with quoting buffers containing NUL when backslashing escapes.
23257         This bug was exposed by the other changes in this patch.
23258         (quotearg_n_options): New arg ARGSIZE.
23259         All callers changed.
23260         (quoting_options_from_style): New function.
23261         (quotearg_n_style): Use it.
23262         (quotearg_n_style_mem): New function.
23263
23264         * lib/quotearg.h (quotearg_n_style_mem): New function.
23265
23266 2002-01-19  Jim Meyering  <meyering@lucent.com>
23267
23268         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
23269         Remove useless quotes: DF_PROG="df".
23270         * m4/strnlen.m4: New file.
23271
23272 2002-01-16  Paul Eggert  <eggert@twinsun.com>
23273
23274         * lib/backupfile.c (ISDIGIT): Comment fix.
23275         * lib/getdate.y (ISDIGIT): Likewise.
23276         * lib/posixtm.c (ISDIGIT, year): Likewise.
23277         * lib/strverscmp.c (ISDIGIT): Likewise.
23278         * lib/userspec.c (ISDIGIT): Likewise.
23279
23280 2002-01-16  Jim Meyering  <meyering@lucent.com>
23281
23282         * lib/getdate.y: Add three semicolons, each just before a closing
23283         brace. Bison (as of version 1.31) no longer papers over that mistake.
23284
23285 2002-01-05  Jim Meyering  <meyering@lucent.com>
23286
23287         * lib/version-etc.c (version_etc_copyright): Update copyright year.
23288
23289 2001-12-19  Paul Eggert  <eggert@twinsun.com>
23290
23291         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
23292         not silently exit merely because the output buffer happens to
23293         have nothing pending.
23294
23295 2001-12-18  Paul Eggert  <eggert@twinsun.com>
23296
23297         See the big note in ../ChangeLog.
23298         * lib/human.c (suffixes): Prefer K to k for 1024.
23299         (generate_suffix_backwards): New function.
23300         (human_readable_inexact): Use it.
23301         * lib/xstrtol.c (__xstrtol): If there is no number but there
23302         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
23303         Accept 'K' as well as 'k'.
23304
23305 2001-12-15  Jim Meyering  <meyering@lucent.com>
23306
23307         * lib/regex.h (__restrict_arr): Update from libc.
23308
23309         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
23310         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
23311         (STREQ): Define.
23312
23313 2001-12-14  Jim Meyering  <meyering@lucent.com>
23314
23315         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
23316         Suggestion from Bruno Haible.
23317
23318 2001-12-10  Jim Meyering  <meyering@lucent.com>
23319
23320         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
23321         xrealloc, Instead, include "xalloc.h".
23322         (initbuffer): Don't cast xmalloc return value to char*.
23323         (readline): Reword comment.
23324         Don't cast xrealloc return value to char*
23325         Return NULL, not 0.
23326
23327 2001-12-09  Jim Meyering  <meyering@lucent.com>
23328
23329         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
23330         about `signed and unsigned type in conditional expression'.
23331         * lib/posixtm.c (posix_time_parse): Likewise.
23332
23333         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
23334
23335         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
23336         to avoid a pedantic warning.
23337
23338         * lib/getstr.c: Don't include assert.h.
23339         (getstr): Remove warning-evoking assertions.
23340         Return -1 if offset parameter is out of bounds.
23341         Change the type of a local from int to size_t.
23342
23343         * lib/strftime.c (my_strftime_localtime_r): Include this function
23344         definition in the `#if ! HAVE_TM_GMTOFF' block.
23345
23346         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
23347         Include xalloc.h instead.
23348
23349 2001-12-02  Jim Meyering  <meyering@lucent.com>
23350
23351         * lib/tempname.c: Don't declare getenv, thus reverting the change of
23352         2001-11-18.  It's no longer necessary, now that stdlib.h is always
23353         included.
23354
23355         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
23356         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
23357
23358 2001-11-30  Akim Demaille  <akim@epita.fr>
23359
23360         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
23361         before being defined.
23362
23363 2001-11-27  Paul Eggert  <eggert@twinsun.com>
23364
23365         * lib/quotearg.h (quotearg_n, quotearg_n_style):
23366         First arg is int, not unsigned.
23367         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
23368         (SIZE_MAX, UINT_MAX): New macros.
23369         (quotearg_n_options): Abort if N is negative.
23370         Avoid overflow check on hosts where size_t is 64 bits and int
23371         is 32 bits, as overflow is impossible there.
23372         Fix off-by-one typo that caused unnecessary reallocation.
23373
23374 2001-11-27  Jim Meyering  <meyering@lucent.com>
23375
23376         * lib/tempname.c: Merge with version from libc.
23377         * lib/regex.c: Likewise.
23378
23379         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
23380         systems for which STDC_HEADERS is 0, it was not included, resulting in
23381         a warning about an integer-to-pointer conversion problem with getenv.
23382         Reported by Volker Borchert.
23383
23384 2001-11-26  Jim Meyering  <meyering@lucent.com>
23385
23386         * lib/gtod.h: Remove file.
23387         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
23388         * lib/gettimeofday.c: Don't include gtod.h.
23389         (GTOD_init): Remove function.
23390         (rpl_gettimeofday): Do its job here instead, rather than aborting.
23391         Suggestion from Volker Borchert.
23392
23393 2001-11-23  Jim Meyering  <meyering@lucent.com>
23394
23395         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
23396         it.
23397         * lib/hash.c (struct hash_table): Define it here instead.
23398
23399 2001-11-22  Jim Meyering  <meyering@lucent.com>
23400
23401         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
23402
23403 2001-11-20  Jim Meyering  <meyering@lucent.com>
23404
23405         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
23406         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
23407
23408 2001-11-19  Jim Meyering  <meyering@lucent.com>
23409
23410         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
23411         directory.  Use "conftestXXXXXX" as the template.
23412         Suggestion from Paul Eggert.
23413
23414         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
23415         immediately, so the test doesn't mistakenly hit the max-open-files
23416         limit.
23417
23418 2001-11-18  Paul Eggert  <eggert@twinsun.com>
23419
23420         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
23421         (TEMPORARIES): New macro.
23422         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
23423         removes an artificial limitation (e.g. HP-UX 10.20, where
23424         TMP_MAX is 17576).
23425
23426 2001-11-18  Jim Meyering  <meyering@lucent.com>
23427
23428         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
23429
23430 2001-11-18  Jim Meyering  <meyering@lucent.com>
23431
23432         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
23433         on SunOS 4.
23434
23435         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
23436         files will be created before anything else.
23437
23438 2001-11-17  Paul Eggert  <eggert@twinsun.com>
23439
23440         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
23441         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
23442
23443 2001-11-17  Jim Meyering  <meyering@lucent.com>
23444
23445         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
23446         Prompted by a report from Bob Proulx.
23447
23448         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
23449         Instead, require UTILS_FUNC_MKSTEMP.
23450
23451 2001-11-17  Jim Meyering  <meyering@lucent.com>
23452
23453         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
23454         Now, that's done as part of AC_FUNC_STRTOD.
23455
23456 2001-11-17  Jim Meyering  <meyering@lucent.com>
23457
23458         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
23459         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
23460         rather than group writable.  Patch by Juan F. Codagnone.
23461
23462         * lib/readtokens.c: Remove explicit declarations of xmalloc and
23463         xrealloc, Instead, include "xalloc.h".
23464
23465         * lib/mountlist.c: Include unlocked-io.h after all system headers.
23466         Remove explicit declarations of xmalloc, xrealloc,
23467         and xstrdup.  Instead, include "xalloc.h".
23468
23469         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
23470         unlocked-io.h.
23471         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
23472         Likewise.
23473         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
23474
23475         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
23476         Reported by Padraig Brady.
23477
23478         * lib/mkstemp.c: #undef mkstemp.
23479         Include config.h.
23480         (rpl_mkstemp): Rename from mkstemp.
23481         Protoize.
23482
23483 2001-11-16  Jim Meyering  <meyering@lucent.com>
23484
23485         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
23486         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
23487         determine the amount of total physical memory, use pstat_getstatic.
23488         HPUX-11 doesn't define _SC_PHYS_PAGES.
23489         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
23490         If sysconf couldn't be used to determine the amount of available
23491         physical memory, use both pstat_getstatic and pstat_getdynamic.
23492         Based on a patch from Bob Proulx.
23493
23494 2001-11-10  Jim Meyering  <meyering@lucent.com>
23495
23496         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
23497         (jm_PREREQ): Use it.
23498
23499 2001-11-09  Jim Meyering  <meyering@lucent.com>
23500
23501         * m4/jm-macros.m4: Require autoconf-2.52f.
23502         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
23503         Use these AC_-prefixed names, not the AM_-prefixed ones.
23504
23505         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
23506
23507 2001-11-05  Jim Meyering  <meyering@lucent.com>
23508
23509         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
23510
23511 2001-11-04  Jim Meyering  <meyering@lucent.com>
23512
23513         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
23514         $DEFS.
23515
23516 2001-11-03  Jim Meyering  <meyering@lucent.com>
23517
23518         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
23519         of AC_DEFUN.
23520
23521         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
23522         know the name of the variable in the macro definition.
23523
23524 2001-11-03  Jim Meyering  <meyering@lucent.com>
23525
23526         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
23527         in argmatch_to_argument call.
23528
23529         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
23530         argument.
23531
23532         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
23533         e.g., a fault due to an attempt to free a NULL pointer.
23534
23535 2001-11-01  Jim Meyering  <meyering@lucent.com>
23536
23537         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
23538         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
23539
23540 2001-11-01  Jim Meyering  <meyering@lucent.com>
23541
23542         * lib/dirfd.c, lib/dirfd.h: New files.
23543         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
23544
23545         * lib/hash.c (hash_print) [TESTING]: Clean up.
23546
23547 2001-10-22  Paul Eggert  <eggert@twinsun.com>
23548
23549         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
23550         to avoid a warning if -Wall.
23551
23552 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
23553
23554         * README: New file
23555         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
23556         (per RMS's instructions, this is now the canonical source)
23557         * lgpl/, gpl/: New directories.
23558
23559 2001-10-21  Paul Eggert  <eggert@twinsun.com>
23560
23561         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
23562
23563 2001-10-21  Jim Meyering  <meyering@lucent.com>
23564
23565         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
23566         this code would end up calling gettext even in packages built
23567         with --disable-nls.
23568         * lib/getopt.c (_): Likewise.
23569         * lib/regex.c (_): Likewise.
23570
23571 2001-10-20  Paul Eggert  <eggert@twinsun.com>
23572
23573         * m4/error.m4 (jm_PREREQ_ERROR):
23574         Do not invoke AC_CHECK_FUNCS with strerror_r, as
23575         AC_FUNC_STRERROR_R does that.
23576         Check for strerror declaration.
23577
23578         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
23579         are supposed to have them these days.
23580         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
23581         Merge changes from latest Autoconf CVS.
23582         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
23583         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
23584         POSIX decided to standardize on the int flavor of strerror_r.
23585
23586 2001-10-20  Paul Eggert  <eggert@twinsun.com>
23587
23588         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
23589         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
23590         Use strerror_r that is only a macro, even if it is not a function.
23591         (strerror): Check for HAVE_DECL_STRERROR before declaring.
23592         (private_strerror): Use prototypes, not old-style function definition.
23593         (print_errno_message): New function.
23594         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
23595         char*-flavored one.
23596         (error_tail, error, error_at_line): Use it.
23597
23598 2001-10-11  Jim Meyering  <meyering@lucent.com>
23599
23600         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
23601         and quote_n (1, ... to avoid clobbering a buffer.
23602
23603 2001-10-05  Jim Meyering  <meyering@lucent.com>
23604
23605         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
23606         hash-pjw.h.
23607         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
23608         * lib/hash-pjw.h: New file.
23609
23610 2001-09-30  Jim Meyering  <meyering@lucent.com>
23611
23612         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
23613         `struct fsstat' has the `f_fstypename' member.
23614         Use that to define FS_TYPE, which is now used to make
23615         the getfsstat link test tighter.
23616
23617 2001-09-30  Jim Meyering  <meyering@lucent.com>
23618
23619         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
23620         Include <sys/ucred.h>, for Apple Darwin.
23621         Include sys/mount.h and sys/fs_types.h only if available.
23622         (FS_TYPE): Define.
23623         (read_filesystem_list): Use FS_TYPE.
23624
23625 2001-09-29  Paul Eggert  <eggert@twinsun.com>
23626
23627         * lib/exclude.c (excluded_filename): 0 -> false, since it's
23628         a boolean context.
23629
23630 2001-09-29  Jim Meyering  <meyering@lucent.com>
23631
23632         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
23633         [one-argument getmntent function]): Include stdio.h before mntent.h.
23634         SunOS 4.1.x needs it for the declaration of `FILE'.
23635         Patch by Volker Borchert.
23636
23637         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
23638         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
23639         sys/fs_types.h, and make the link-test for getfsstat guard #include
23640         directives with appropriate #if HAVE_*_H tests so that we can
23641         detect getfsstat on Apple Darwin1.3.7 systems.
23642         Reported by Nelson Beebe.
23643         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
23644
23645 2001-09-28  Paul Eggert  <eggert@twinsun.com>
23646
23647         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
23648         #defines strtoimax.  Also treat the other strto* functions
23649         like strtoimax.
23650
23651         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
23652         Check for strtoul and strtoumax,
23653         as those declarations are made even in the signed case.
23654         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
23655         Likewise, for strtol and strtoimax.
23656
23657 2001-09-28  Paul Eggert  <eggert@twinsun.com>
23658
23659         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
23660         #defines strtoimax.  Also treat the other strto* functions
23661         like strtoimax.
23662
23663         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
23664         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
23665         (strtoimax, strtoumax): Do not declare if already defined as a macro.
23666
23667 2001-09-26  Jim Meyering  <meyering@lucent.com>
23668
23669         Most macros in unlocked-io.h had the wrong number of arguments.
23670         * lib/gen-uio: New script.
23671         (USE_UNLOCKED_IO): Define to 1 if not already defined.
23672         * lib/unlocked-io.hin: Remove file.
23673         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
23674         rather than trying to embed it here.
23675         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
23676         Reported by Padraig Brady.
23677
23678 2001-09-25  Volker Borchert  <bt@teknon.de>
23679
23680         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
23681         `result'.
23682
23683 2001-09-24  Jim Meyering  <meyering@lucent.com>
23684
23685         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
23686
23687 2001-09-23  Jim Meyering  <meyering@lucent.com>
23688
23689         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
23690         instead of the mere test for existence of mntent.h.  The latter
23691         would get a false-positive on AIX 3.4 systems.
23692         In the outer getmntent if-block, don't die if neither of the getmntent
23693         tests succeeds.  Instead, just fall through and continue with the
23694         remaining tests.
23695
23696 2001-09-23  Jim Meyering  <meyering@lucent.com>
23697
23698         * lib/mountlist.c: Remove useless parentheses in #if directives.
23699         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
23700         the deprecated MOUNTED symbol is no longer defined in mntent.h.
23701
23702 2001-09-22  Jim Meyering  <meyering@lucent.com>
23703
23704         * m4/gettext.m4: New file.  From gettext.
23705         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
23706         * m4/progtest.m4: Likewise
23707         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
23708         * m4/glibc21.m4: Likewise.
23709
23710         * m4/libintl.m4: Remove.  No longer used.
23711
23712 2001-09-22  Jim Meyering  <meyering@lucent.com>
23713
23714         * lib/localcharset.c: Update from latest gettext.
23715         * lib/config.charset: Likewise.
23716
23717 2001-09-20  Jim Meyering  <meyering@lucent.com>
23718
23719         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
23720         strtoimax.
23721         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
23722         strtoumax.
23723
23724 2001-09-20  Jim Meyering  <meyering@lucent.com>
23725
23726         * lib/xstrtol.c (strtoimax): Guard declaration with
23727         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
23728         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
23729         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
23730         (strtoumax): Likewise, for completeness (it wasn't necessary).
23731
23732 2001-09-17  Paul Eggert  <eggert@twinsun.com>
23733
23734         * lib/strtoimax.c (HAVE_LONG_LONG):
23735         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
23736         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
23737         to work around bug in IBM C compiler.
23738
23739 2001-09-17  Jim Meyering  <meyering@lucent.com>
23740
23741         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
23742         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
23743         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
23744         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
23745         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
23746         whenever the right hand side need not be expanded by the shell.
23747
23748 2001-09-16  Paul Eggert  <eggert@twinsun.com>
23749
23750         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
23751         library.  It's not correct, as some older glibcs are buggy.
23752         fnmatch wasn't fixed until glibc 2.2.
23753
23754         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
23755         special shell magic here.
23756
23757 2001-09-16  Jim Meyering  <meyering@lucent.com>
23758
23759         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
23760         * m4/jm-macros.m4: Require it.
23761
23762 2001-09-16  Jim Meyering  <meyering@lucent.com>
23763
23764         * lib/mkdir.c: New file.
23765
23766 2001-09-15  Jim Meyering  <meyering@lucent.com>
23767
23768         * m4/jm-macros.m4: Check for help2man.
23769
23770 2001-09-11  Jim Meyering  <meyering@lucent.com>
23771
23772         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
23773         The body, by Paul Eggert, was moved here from configure.in.
23774         * m4/jm-macros.m4: Require UTILS_HOST_OS.
23775
23776 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23777
23778         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
23779         (jm_PREREQ): Use it.
23780
23781 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23782
23783         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
23784         Use ssize_t, not int, to store result of readlink.
23785         Check for ssize_t overflow as well as size_t overflow,
23786         as POSIX says the result of readlink is implementation-defined
23787         when ssize_t overflows.
23788         Remove unnecessary cast to char*.
23789         Use free+malloc instead of realloc, as the storage doesn't need
23790         to be preserved and it's clearer and can be more efficient that way.
23791         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
23792         * lib/xreadlink.h (xreadlink): Update prototype.
23793
23794 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23795
23796         * lib/xgetcwd.c: Revert some of the previous change; intead,
23797         fix the HAVE_GETCWD_NULL code to behave more like the
23798         !HAVE_GETCWD_NULL code used to.
23799
23800         Include "xalloc.h".
23801         (xgetcwd): Do not return NULL when memory is exhausted; instead,
23802         invoke xalloc_die.
23803
23804 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23805
23806         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
23807         sys/param.h, as pathmax.h includes them.
23808
23809 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23810
23811         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
23812         (jm_PREREQ_XGETCWD): New macro.
23813
23814         * m4/getcwd.m4: New file.
23815
23816 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23817
23818         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
23819         like the HAVE_GETCWD_NULL code.
23820         Include pathmax.h if not HAVE_GETCWD.
23821         Do not include xalloc.h.
23822         (INITIAL_BUFFER_SIZE): New symbol.
23823         Do not use xmalloc / xrealloc, since the caller is responsible for
23824         handling errors.  Preserve errno around `free' during failure.
23825         Do not overrun buffer when using getwd.
23826
23827 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23828
23829         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
23830         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
23831         getcwd (NULL, 0).
23832
23833 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23834
23835         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
23836         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
23837         spotted by Jim Meyering.
23838
23839 2001-09-03  Jim Meyering  <meyering@lucent.com>
23840
23841         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
23842         failure.
23843
23844 2001-09-02  Jim Meyering  <meyering@lucent.com>
23845
23846         * lib/error.c: Update from GNU libc.
23847
23848 2001-09-01  Jim Meyering  <meyering@lucent.com>
23849
23850         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
23851         Used by df.
23852
23853 2001-09-01  Jim Meyering  <meyering@lucent.com>
23854
23855         * lib/xreadlink.c: New file.
23856         * lib/xreadlink.h: New file.
23857         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
23858         xreadlink.h.
23859
23860         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
23861         doesn't conflict with sparc Solaris 7's definition in
23862         /usr/include/sys/int_types.h.
23863
23864         * lib/exclude.c: Use `""', not `<>' to #include non-system header
23865         files.
23866         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
23867         and strncasecmp as r-values.  Unixware didn't have declarations.
23868
23869 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23870
23871         * lib/xstrtol.h: Add copyright notice.
23872         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
23873         LONGINT_INVALID_SUFFIX_CHAR.
23874
23875 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23876
23877         * lib/xstrtol.c (strtoimax): New decl.
23878
23879 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23880
23881         * lib/xgetcwd.c: Don't include pathmax.h.
23882         Include stdlib.h and unistd.h if available.
23883         Include xalloc.h.
23884         (xmalloc, xstrdup, free): Remove decls.
23885         (xgetcwd): Don't assume sizes fit in unsigned.
23886         Check for overflow when computing sizes.
23887         Simplify reallocation code.
23888
23889 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23890
23891         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
23892         a directory's st_size can have an arbitrary value, so the old
23893         usage could waste an arbitrary amount of memory.  All uses
23894         changed.
23895         * lib/savedir.h: Update prototype.
23896
23897 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23898
23899         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
23900
23901         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
23902         old strtoimax.c.
23903
23904         Also, make the following further changes to make this file's
23905         configuration more similar to that of strtol.c:
23906         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
23907         (strtoumax, uintmax_t, strtoull, strtol): Remove.
23908         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
23909         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
23910         changed to signed values.
23911
23912         And make the following changes as well:
23913         Fix copyright notice, as 1999 was missing.
23914         (verify): New macro.
23915         (strtoimax): Check sizes at compile-time, not run-time.
23916         Prefer strtol to strtoll if both work.
23917         (main): Remove; it was not that useful and was a pain to maintain.
23918
23919         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
23920
23921 2001-08-31  Jim Meyering  <meyering@lucent.com>
23922
23923         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
23924         Use an initial, malloc'd, buffer of length 128 rather than
23925         a statically allocated one of length 1024.
23926
23927 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23928
23929         Simplify code, partly by assuming autoconf 2.52 semantics.
23930
23931         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
23932
23933         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
23934         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
23935         All uses removed.
23936         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
23937         Move AC_REQUIRE to next-to-top level, to avoid confusion.
23938         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
23939         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
23940         jm_AC_HEADER_INTTYPES_H.
23941         * m4/jm-macros.m4 (jm_MACROS): Likewise.
23942
23943         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
23944
23945         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
23946         Quote first arg of AC_DEFUN.
23947         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
23948         since they are needed to parse the include file even if we need
23949         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
23950         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
23951         but with opposite signedness.
23952
23953 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23954
23955         Merge 'exclude' changes from tar 1.13.22.
23956         This fixes one or two unlikely storage allocation overflow bugs,
23957         but doesn't change user-visible behavior otherwise.
23958
23959 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23960
23961         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
23962         (jm_PREREQ_EXCLUDE): New macro.
23963
23964 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23965
23966         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
23967         tm to be declared.
23968
23969 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23970
23971         * lib/hash.c: Remove '2001' from copyright notice.
23972
23973 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23974
23975         * lib/full-write.h: New file.
23976         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
23977         * lib/full-write.c: Correct credits, as cccp.c no longer
23978         exists and anyway it was so heavily changed from the old cccp
23979         code as to be unrecognizable.  Include full-write.h.
23980         (full_write) Return size_t, with short writes meaning failure.
23981         All callers changed.  This fixes a bug with large buffers
23982         on 64-bit hosts.
23983         * lib/utime.c: Include full-write.h.
23984
23985 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23986
23987         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
23988         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
23989         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
23990         Include if available.
23991         (<xalloc.h>): Include
23992         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
23993         (verify): New macro.  Use it to verify that EXCLUDE macros do not
23994         collide with FNM macros.
23995         (struct patopts): New struct.
23996         (struct exclude): Use it, as exclude patterns now come with options.
23997         (new_exclude): Support above changes.
23998         (new_exclude, add_exclude_file):
23999         Initial size must now be a power of two to simplify overflow checking.
24000         (free_exclude, fnmatch_no_wildcards): New function.
24001         (excluded_filename): No longer requires options arg, as the options
24002         are determined by add_exclude.  Now returns bool, not int.
24003         (excluded_filename, add_exclude):
24004         Add support for the fancy new exclusion options.
24005         (add_exclude, add_exclude_file): Now takes int options arg.
24006         Check for arithmetic overflow when computing sizes.
24007         (add_exclude_file): xrealloc might modify errno, so don't
24008         realloc until after errno might be used.
24009
24010         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
24011         New macros.
24012         (free_exclude): New decl.
24013         (add_exclude, add_exclude_file): Now takes int options arg.
24014         (excluded_filename): No longer requires options arg, as the options
24015         are determined by add_exclude.  Now returns bool, not int.
24016
24017 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24018
24019         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
24020
24021 2001-08-27  Jim Meyering  <meyering@lucent.com>
24022
24023         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
24024
24025         * lib/version-etc.c (N_): Remove definition.
24026         Revert most of last change.
24027         Instead, simply don't mark the `Copyright...' string for translation.
24028         Based on advice from Paul Eggert.
24029
24030         * lib/strtoxmax.c: Tweak comment.
24031
24032 2001-08-26  Jim Meyering  <meyering@lucent.com>
24033
24034         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
24035
24036         * m4/xstrtoimax.m4: New file.
24037         * m4/xstrtoumax.m4: Add comments explaining why we
24038         AC_REPLACE_FUNCS(strtol).
24039
24040 2001-08-26  Jim Meyering  <meyering@lucent.com>
24041
24042         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
24043         of copyright with `%s' so translators don't get an untranslated
24044         message in 2002.
24045         (COPYRIGHT_YEAR): Define.
24046         (version_etc): Use fprintf rather than fputs.
24047         Suggestion from Ulrich Drepper.
24048
24049         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
24050
24051         * lib/strtoll.c: New file, from GNU libc.
24052         * lib/xstrtoimax.c: New file.
24053
24054         * lib/xstrtol.h: Add xstrtoimax.
24055         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
24056         * lib/strtoimax.c: New file.  Likewise, but first define
24057         STRTOUXMAX_SIGNED.
24058
24059         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
24060         ...
24061         * lib/strtoxmax.c: ... then renamed to this.
24062
24063 2001-08-18  Paul Eggert  <eggert@twinsun.com>
24064
24065         * m4/inttypes.m4: Add AC_PREREQ(2.13).
24066         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
24067         (jm_AC_TYPE_INTMAX_T): New macro.
24068         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
24069
24070         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
24071
24072         * m4/longlong.m4: Renamed from ulonglong.m4.
24073         * m4/inttypes.m4: Renamed from inttypes_h.m4.
24074         * m4/uintmax_t.m4: Removed.
24075
24076 2001-08-13  Paul Eggert  <eggert@twinsun.com>
24077
24078         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
24079         Port to Solaris 8, where 'sed' requires a space after the 'r'
24080         command, and where sh dislikes "$/".  Clean up the spacing a bit.
24081         Redirect output to $tmp just once.
24082
24083 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
24084
24085         * lib/addext.c (<errno.h>): Include.
24086         (errno): Declare if not defined.
24087         (addext): Work correctly when pathconf returns -1 and leaves
24088         errno alone because there is no limit.  Also, work even if
24089         pathconf returns a value greater than SIZE_MAX.
24090
24091 2001-08-12  Jim Meyering  <meyering@lucent.com>
24092
24093         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
24094         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
24095         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
24096         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
24097         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
24098         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
24099         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
24100         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
24101         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
24102         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
24103         utime.m4, utimes.m4, xstrtoumax.m4:
24104         Quote the first argument in each use of AC_DEFUN.
24105
24106 2001-08-12  Jim Meyering  <meyering@lucent.com>
24107
24108         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
24109         Simply `return getcwd (NULL, 0);'.
24110         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
24111         Use 1300 as initial value for length, not PATH_MAX.
24112
24113         * lib/pathmax.h: Clean up cpp syntax.
24114
24115 2001-08-12  Jim Meyering  <meyering@lucent.com>
24116
24117         * lib/gettimeofday.c: New file.
24118         * lib/gtod.h: New file.
24119         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
24120
24121 2001-08-05  Jim Meyering  <meyering@lucent.com>
24122
24123         * m4/jm-macros.m4: Require autoconf-2.52.
24124
24125 2001-08-04  Jim Meyering  <meyering@lucent.com>
24126
24127         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
24128         stmt, to get in sync with glibc.
24129
24130 2001-08-03  Paul Eggert  <eggert@twinsun.com>
24131
24132         The following changes are from gettext 0.10.39 as maintained by
24133         Bruno Haible.
24134
24135         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
24136         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
24137         with inverted sense.  All uses changed.
24138
24139         * lib/mbswidth.c: Don't include <limits.h>.
24140         Include <stdlib.h> and <string.h> unconditionally.
24141         (iswcntrl, mbsinit, ISCNTRL): New macros.
24142         (mbsnwidth): Use K&R style function declarations.
24143         Don't bother checking for MB_LEN_MAX == 1, since the compiler
24144         can optimize it when MB_CUR_MAX == 1.
24145         The width of control characters is zero, not 1.
24146
24147 2001-08-03  Paul Eggert  <eggert@twinsun.com>
24148
24149         The following changes are from gettext 0.10.39 as maintained by
24150         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
24151
24152         * m4/codeset.m4: Upgrade to serial AM1.
24153         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
24154         all uses changed.  Quote first arg of AC_DEFUN.
24155         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
24156
24157         * m4/iconv.m4: Upgrade to serial AM2.
24158         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
24159         Add --with-libconv-prefix.
24160         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
24161         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
24162         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
24163         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
24164         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
24165
24166         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
24167         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
24168         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
24169         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
24170         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
24171         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
24172         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
24173         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
24174         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
24175
24176         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
24177         string.h any more.
24178
24179         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
24180         not the default value.
24181
24182         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
24183         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
24184         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
24185         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
24186         Also check for iswcntrl, used for wcwidth fallback.
24187         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
24188         to Autoconf 2.13.
24189
24190 2001-08-03  Jim Meyering  <meyering@lucent.com>
24191
24192         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
24193         as it was in the original.  Reported by Paul Eggert.
24194
24195 2001-07-16  Jim Meyering  <meyering@lucent.com>
24196
24197         * m4/gettimeofday.m4: New file.
24198         Prompted by a report from Bernhard Baehr.
24199
24200 2001-07-15  Jim Meyering  <meyering@lucent.com>
24201
24202         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
24203         stuff. Now it's in ../Makefile.cfg.
24204
24205 2001-07-15  Jim Meyering  <meyering@lucent.com>
24206
24207         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
24208         (BUILT_SOURCES): Add unlocked-io.h.
24209         (io_functions): Define.
24210         (unlocked-io.h): New rule.
24211         (DISTCLEANFILES): Add unlocked-io.h.
24212         (all-local): Depend on unlocked-io.h, to ensure it is created.
24213
24214         * lib/unlocked-io.hin: New file
24215
24216         * lib/regex.c: Update from glibc.
24217
24218 2001-07-05  Jim Meyering  <meyering@lucent.com>
24219
24220         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
24221         recommendation.
24222         (libfetish_a_SOURCES): Put all .h files here instead.
24223         Remove a thus-exposed (better checks in automake) duplicate and
24224         two unnecessary .h files.
24225
24226 2001-07-04  Jim Meyering  <meyering@lucent.com>
24227
24228         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
24229         that generates jm-glibc-io.m4 so that it doesn't trigger any make
24230         distcheck failure.
24231
24232 2001-07-02  Jim Meyering  <meyering@lucent.com>
24233
24234         The following changes were prompted by suggestions from Bruno Haible.
24235
24236         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
24237         is now generated.
24238         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
24239         definition of EXTRA_DIST.
24240         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
24241         ensure that the generated file is created/updated whenever the list
24242         of $(unlocked_functions) is changed.
24243         (jm-glibc-io.m4): New rule.
24244         (unlocked-io.h): New rule -- currently unused.
24245
24246 2001-06-24  Jim Meyering  <meyering@lucent.com>
24247
24248         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
24249         unmatched right bracket, rather than kludging it with an extra,
24250         falsely-matching quote in a comment.  Patch by Akim Demaille.
24251
24252 2001-06-11  Jim Meyering  <meyering@lucent.com>
24253
24254         * lib/regex.c: Update from GNU libc.
24255
24256 2001-05-27  Jim Meyering  <meyering@lucent.com>
24257
24258         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
24259         Check for ut_type in struct utmp.
24260
24261 2001-05-27  Jim Meyering  <meyering@lucent.com>
24262
24263         * lib/readutmp.h (UT_TYPE): Define.
24264
24265 2001-05-24  Jim Meyering  <meyering@lucent.com>
24266
24267         * lib/argmatch.c: Include "quote.h".
24268         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
24269         quote function.  Reported by Göran Uddeborg.
24270
24271 2001-05-22  Jim Meyering  <meyering@lucent.com>
24272
24273         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
24274         now that we use the package-supplied version unconditionally.
24275         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
24276
24277 2001-05-21  Jim Meyering  <meyering@lucent.com>
24278
24279         * m4/regex.m4: Change a couple backticks to single quotes to avoid
24280         shell syntax errors.
24281
24282 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
24283
24284         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
24285
24286 2001-05-20  Paul Eggert  <eggert@twinsun.com>
24287
24288         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
24289         Don't bother to check library strftime, since
24290         we'll be using our own my_strftime function anyway.
24291         Define my_strftime instead of strftime.
24292
24293 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
24294
24295         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
24296         which is not yet declared.
24297
24298 2001-05-15  Jim Meyering  <meyering@lucent.com>
24299
24300         * m4/regex.m4: Use proper quoting so brackets appear in the test
24301         program.
24302         Reported by, and with help from, Bruno Haible.
24303
24304 2001-05-13  Jim Meyering  <meyering@lucent.com>
24305
24306         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
24307         undefined.
24308
24309 2001-05-11  Paul Eggert  <eggert@twinsun.com>
24310
24311         dirname code cleanup.  base_name now behaves more compatibly
24312         with POSIX basename when given file names that have trailing
24313         slashes, and similarly for dir_name.  Add new primitives
24314         base_len and dir_len.  Put the directory-name-related decls
24315         into dirname.h.
24316
24317         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
24318         * lib/backupfile.c (base_name): Likewise.
24319         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
24320         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
24321         * lib/makepath.c (strip_trailing_slashes): Likewise.
24322         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
24323         ISSLASH): Likewise.
24324         * lib/rename.c (strip_trailing_slashes): Likewise.
24325         * lib/same.c (base_name): Likewise.
24326         * lib/stripslash.c (ISSLASH): Likewise.
24327
24328         * lib/addext.c: Include <dirname.h> after size_t is defined.
24329         * lib/backupfile.c: Likewise.
24330
24331         * lib/addext.c (addext): Use base_len to trim redundant
24332         trailing slashes instead of doing it ourselves.
24333         But do not trim the last slash if it is not redundant.
24334
24335         * lib/backupfile.c (find_backup_file_name,
24336         max_backup_version): Use base_len instead of rolling it ourselves.
24337         Handle the case of "" and (on DOS) "C:" correctly.
24338
24339         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
24340         needed. Include <string.h>, <dirname.h>.
24341         (base_name): Allow file names ending in slashes, other than names
24342         that are all slashes.  In this case, return the basename followed
24343         by the slashes.  This is more general, and can be used in places
24344         where the original base_name purposely had an assertion failure.
24345         (base_len): New function.
24346
24347         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
24348         Do not include <assert.h>; no longer needed.
24349         Include xalloc.h.
24350         (memrchr): Remove decl.
24351         (dir_name_r): Remove.
24352         (dir_len): Renamed from dirlen.  All callers changed.
24353         Rewrite in terms of base_name, for simplicity and consistency.
24354         (dir_name): Never return NULL.  All callers changed.
24355         Do not include <stdlib.h> in test program; no longer needed.
24356         return 0; is fine for test program.
24357
24358         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
24359         New macros.
24360         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
24361
24362         * lib/path-concat.c (path_concat): Use base_len to compute
24363         base length, not strlen; this means we cannot rely on memcpy
24364         to null-terminate.
24365
24366         * lib/same.c (STREQ): Remove.
24367         (same_name): Handle the case where the basename ends in trailing '/'.
24368
24369         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
24370         a slash was stripped.  Do not strip the last slash after a
24371         file system prefix.
24372
24373 2001-05-11  Paul Eggert  <eggert@twinsun.com>
24374
24375         * lib/Makefile.am (libfetish_a_SOURCES):
24376         Add strftime.c, since we now compile it on all hosts.
24377
24378         * lib/strftime.c (my_strftime):
24379         Define to nstrftime if emacs, but only if my_strftime is not defined.
24380         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
24381         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
24382         Add one more extra argument: a nanoseconds value.
24383         All uses changed.
24384         (ns): New macro.
24385         (my_strftime function): Add %N format.
24386         (emacs_strftimeu): Renamed from emacs_strftime,
24387         with extra ut argument.
24388
24389 2001-05-09  Paul Eggert  <eggert@twinsun.com>
24390
24391         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
24392
24393 2001-04-21  Jim Meyering  <meyering@lucent.com>
24394
24395         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
24396         doesn't interfere.
24397
24398 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
24399
24400         * m4/ftruncate.m4: Check for chsize.
24401         Link with ftruncate.o unconditionally if ftruncate is missing.
24402         This was required when cross-compiling to i586-mingw32msvc.
24403
24404 2001-04-08  Jim Meyering  <meyering@lucent.com>
24405
24406         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
24407         recomputed; that's necessary when the offset spans a DST transition.
24408         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
24409
24410 2001-04-02  Jim Meyering  <meyering@lucent.com>
24411
24412         * lib/regex.h, regex.c: Update from GNU libc.
24413
24414 2001-03-24  Jim Meyering  <meyering@lucent.com>
24415
24416         * m4/jm-macros.m4: Require autoconf-2.49d.
24417
24418 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
24419
24420         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
24421
24422 2001-03-19  Paul Eggert  <eggert@twinsun.com>
24423
24424         * lib/version-etc.c (version_etc_copyright): Update to 2001.
24425
24426 2001-03-17  Jim Meyering  <meyering@lucent.com>
24427
24428         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
24429         now that the version in autoconf is equivalent.
24430         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
24431
24432         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
24433         Suggestion from Akim Demaille.
24434
24435         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
24436         (jm_PREREQ_TEMPNAME): New function.
24437
24438 2001-03-16  Paul Eggert  <eggert@twinsun.com>
24439
24440         * lib/tempname.c (uint64_t): Define to uintmax_t if
24441         not defined, and if UINT64_MAX is not defined.
24442         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
24443         Reported by John David Anglin.
24444
24445 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
24446
24447         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
24448         resolve alias if codeset is empty.
24449         * lib/config.charset (BeOS): Use wildcard syntax.
24450
24451 2001-03-13  Jim Meyering  <meyering@lucent.com>
24452
24453         * lib/path-concat.c (path_concat)
24454         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
24455         concatenating e.g., `C:' and `foo'.
24456         From Bruno Haible.
24457
24458 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
24459
24460         * lib/localcharset.c (locale_charset): Don't use
24461         setlocale(LC_CTYPE,NULL). Don't return NULL.
24462         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
24463
24464 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
24465
24466         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
24467         support for DOS/DJGPP.
24468
24469 2001-03-01  Paul Eggert  <eggert@twinsun.com>
24470
24471         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
24472         lacks mkstemp.  Compile our own tempname.c if we compile our own
24473         mkstemp.c, as mkstemp relies on tempname.
24474
24475 2001-03-01  Jim Meyering  <meyering@lucent.com>
24476
24477         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
24478         AH_VERBATIM really does output its argument verbatim.
24479
24480 2001-02-28  Paul Eggert  <eggert@twinsun.com>
24481
24482         * lib/Makefile.am (libfetish_a_SOURCES):
24483         Add dup-safer.c, fopen-safer.c.
24484         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
24485
24486         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
24487         * lib/unistd-safer.h: New files.
24488
24489 2001-02-25  Paul Eggert  <eggert@twinsun.com>
24490
24491         The mkstemp replacement is taken from glibc 2.2.2, with some
24492         portability fixes for use outside glibc, as follows:
24493
24494         * lib/tempname.c (struct_stat64): New macro.
24495         (direxists, __gen_tempname): Use it.
24496         This avoids a portability problem with Solaris 8.
24497
24498         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
24499         (<stddef.h>, <stdint.h>, <string.h>):
24500         Include only if STDC_HEADERS || _LIBC.
24501         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
24502         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
24503         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
24504         (__set_errno): Define this macro if <errno.h> doesn't.
24505         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
24506         Define these macros if <stdio.h> doesn't.
24507         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
24508         Define these macros if <sys/stat.h>
24509         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
24510         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
24511         __xstat64): Define if not _LIBC.
24512         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
24513         (__gen_tempname): Invoke gettimeofday only if
24514         HAVE_GETTIMEOFDAY || _LIBC;
24515         otherwise, fall back on plain "time".
24516         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
24517
24518         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
24519
24520         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
24521
24522 2001-02-18  Paul Eggert  <eggert@twinsun.com>
24523
24524         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
24525
24526 2001-02-17  Paul Eggert  <eggert@twinsun.com>
24527
24528         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
24529         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
24530         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
24531         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
24532
24533 2001-02-17  Paul Eggert  <eggert@twinsun.com>
24534
24535         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
24536         Remove workaround macros for hosts that have mbrtowc but not
24537         mbstate_t, as we now insist on proper declarations for both
24538         before using mbrtowc.
24539
24540 2001-02-17  Jim Meyering  <meyering@lucent.com>
24541
24542         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
24543         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
24544         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
24545         UnixWare 7.1.1.
24546
24547         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
24548         rather than AC_CACHE_VAL.
24549
24550 2001-02-17  Jim Meyering  <meyering@lucent.com>
24551
24552         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
24553         around included file name.
24554
24555         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
24556
24557         * lib/strftime.c: Update from GNU libc (the only changes were to
24558         comments).
24559
24560 2001-02-17  Jim Meyering  <meyering@lucent.com>
24561
24562         * lib/regex.c: Update from libc.
24563
24564 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
24565
24566         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
24567         clash.
24568
24569 2001-02-16  Paul Eggert  <eggert@twinsun.com>
24570
24571         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
24572         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
24573         Reported by Mark Hounschell via Paul Eggert.
24574
24575 2001-02-07  Jim Meyering  <meyering@lucent.com>
24576
24577         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
24578
24579 2001-02-05  Jim Meyering  <meyering@lucent.com>
24580
24581         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
24582         it includes the patch required for `large file' support with at least
24583         HP-UX's 10.20 /bin/cc.
24584
24585 2001-02-03  Jim Meyering  <meyering@lucent.com>
24586
24587         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
24588         AS_IF, now that it works once again (mysteriously).
24589         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
24590
24591 2001-01-30  Jim Meyering  <meyering@lucent.com>
24592
24593         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
24594         * m4/chown.m4: Rename conftestchown to conftest.chown.
24595         * m4/rename.m4: s/conftestdir/conftest.d1/ and
24596         s/conftestdir2/conftest.d2/.
24597         * m4/utimes.m4: s/conftestdata/conftest.data/
24598         Inspired by Pavel Roskin's change in autoconf.
24599
24600 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
24601
24602         * lib/config.charset: Update for FreeBSD 4.2.
24603
24604 2001-01-27  Jim Meyering  <meyering@lucent.com>
24605
24606         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
24607         a use of AS_IF.
24608         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
24609
24610 2001-01-26  Jim Meyering  <meyering@lucent.com>
24611
24612         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
24613         quotearg.c includes it.
24614
24615 2001-01-26  Jim Meyering  <meyering@lucent.com>
24616
24617         * lib/quotearg.c: Include stddef.h.
24618         * lib/quote.c: Include stddef.h.
24619         Reported by Axel Kittenberger.
24620
24621         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
24622         line in double quotes so that it evokes a better diagnostic.
24623         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
24624         Reported by Axel Kittenberger.
24625
24626 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
24627
24628         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
24629         as if it was a `charset'.
24630
24631 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
24632
24633         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
24634         has const.
24635
24636 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
24637
24638         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
24639         to avoid a warning.  Add back 'const' to inptr.
24640
24641 2001-01-20  Jim Meyering  <meyering@lucent.com>
24642
24643         Be sure that headers are checked before used in code compiled
24644         for the type checks.
24645         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
24646         In place of that, invoke jm_CHECK_ALL_TYPES.
24647         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
24648         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
24649         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
24650         The check for ssize_t was mistakenly run before the test for unistd.h.
24651
24652         The configure-time check for stdbool.h was missing.
24653         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
24654         (jm_PREREQ_HASH): New function.
24655
24656 2001-01-17  Jim Meyering  <meyering@lucent.com>
24657
24658         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
24659         for autoconf-2.49c.
24660         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
24661
24662 2001-01-16  Jim Meyering  <meyering@lucent.com>
24663
24664         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
24665         From Bruno Haible.
24666
24667 2001-01-14  Jim Meyering  <meyering@lucent.com>
24668
24669         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
24670         foo and bar.  Create conftestdir/ in the script, not in the C code.
24671         Remove directories in the script, not in the C code.
24672         Remove conftestdir{,2} before trying to create the directory.
24673         Make the entire configure script fail if the mkdir fails.
24674
24675 2001-01-14  Jim Meyering  <meyering@lucent.com>
24676
24677         * lib/rename.c: New file.  From Volker Borchert.
24678         Include stdlib.h, string.h or strings.h, and xalloc.h.
24679         Use strip_trailing_slashes rather than open-coding it.
24680
24681 2001-01-03  Paul Eggert  <eggert@twinsun.com>
24682
24683         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
24684
24685 2001-01-03  Jim Meyering  <meyering@lucent.com>
24686
24687         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
24688         of local `inptr' to avoid warning with some system declarations of
24689         iconv.
24690
24691 2001-01-02  Volker Borchert  <bt@teknon.de>
24692
24693         * m4/rename.m4: New file.
24694         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
24695
24696 2001-01-01  Jim Meyering  <meyering@lucent.com>
24697
24698         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
24699         even on systems with utmpx.h.  It's necessary for the declaration of
24700         utmp's ut_user member.  Reported by Andreas Jaeger.
24701
24702         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
24703         available. They are required for the declarations of getgrgid and
24704         getpwuid resp.
24705         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
24706         Reported by Andreas Jaeger.
24707
24708 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
24709
24710         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
24711         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
24712         so `make install' also works in VPATH builds.
24713
24714 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
24715
24716         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
24717         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
24718         can be used in subdirectories.
24719
24720 2000-12-29  Paul Eggert  <eggert@twinsun.com>
24721
24722         * lib/modechange.c: Do not assume that mode_t uses the
24723         traditional octal encoding.  E.g. "chmod 1 FOO" should set
24724         the other-execute bit of FOO even if S_IXOTH != 1.
24725
24726         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
24727         WOTH, XOTH, ALLM): New macros.
24728         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
24729          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
24730         Use them.
24731         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
24732         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
24733         (mode_compile):
24734         No need to use uintmax_t; unsigned long is long enough.
24735         Don't bother to get suffix since we don't use it.
24736
24737 2000-12-26  Jim Meyering  <meyering@lucent.com>
24738
24739         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
24740         better with autoheader.
24741
24742 2000-12-24  Jim Meyering  <meyering@lucent.com>
24743
24744         * lib/hash.c (is_prime): Return explicit boolean values.
24745         (hash_get_first): Return NULL to appease Irix5.6's 89.
24746         Reported by Nelson Beebe.
24747
24748 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
24749
24750         * lib/localcharset.c (locale_charset): Add support for Win32.
24751
24752 2000-12-18  Paul Eggert  <eggert@twinsun.com>
24753
24754         * lib/physmem.h, lib/physmem.c: New files.
24755
24756         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
24757         (noinst_HEADERS): Add physmem.h.
24758
24759         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
24760         't' for compatibility with Solaris 8 sort.
24761
24762 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
24763
24764         * lib/config.charset: Add support for BeOS.
24765
24766 2000-12-17  Jim Meyering  <meyering@lucent.com>
24767
24768         * m4/dos.m4 (jm_AC_DOS): New file and macro.
24769         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
24770
24771 2000-12-16  Jim Meyering  <meyering@lucent.com>
24772
24773         This bug had a serious impact on chown: `chown N:M FILE' (for integer
24774         N and M) would have treated it like `chown N:N FILE'.
24775
24776         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
24777
24778 2000-12-16  Jim Meyering  <meyering@lucent.com>
24779
24780         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
24781         SHELLS_FILE to a file name that's useful on djgpp systems.
24782         Include stdlib.h.
24783         (ADDITIONAL_DEFAULT_SHELLS): Define.
24784         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
24785         Based mostly on a patch from Prashant TR.
24786
24787 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
24788
24789         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
24790         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
24791         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
24792
24793 2000-12-08  Andreas Schwab  <schwab@suse.de>
24794
24795         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
24796         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
24797
24798 2000-12-07  Jim Meyering  <meyering@lucent.com>
24799
24800         * lib/stripslash.c (ISSLASH): Define.
24801         (strip_trailing_slashes): Use ISSLASH rather than comparing against
24802         `/'.
24803         From Prashant TR.
24804
24805         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
24806         (dir_name_r): Declare this function as static.
24807         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
24808         manifest itself on a name containing a mix of slashes and
24809         backslashes.
24810         Make this function work with names starting with a DOS-style
24811         drive letter and colon prefix.
24812         (dir_name): Append `.' if necessary.
24813         Based mostly on patches from Prashant TR and Eli Zaretskii.
24814
24815         * lib/dirname.h (dir_name_r): Remove prototype.
24816
24817 2000-12-06  Paul Eggert  <eggert@twinsun.com>
24818
24819         * m4/off_t-format.m4: Remove this file.
24820         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
24821
24822 2000-12-06  Jim Meyering  <meyering@lucent.com>
24823
24824         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
24825         replacement strtoull, we may well need the replacement strtoul, too.
24826         Check for declarations of strtoul and strtoull.
24827         Check for strtol.  Mainly as a cue to cause automake to include
24828         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
24829         Check for limits.h -- strtol.c needs it.
24830
24831 2000-12-05  Jim Meyering  <meyering@lucent.com>
24832
24833         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
24834
24835 2000-12-04  Jim Meyering  <meyering@lucent.com>
24836
24837         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
24838         Also include memory.h, stdlib.h, unistd.h if appropriate.
24839         Reported by Andreas Jaeger (conflicting declaration of malloc).
24840
24841 2000-12-02  Jim Meyering  <meyering@lucent.com>
24842
24843         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
24844         * m4/jm-macros.m4 (jm_MACROS): require it.
24845
24846 2000-12-02  Jim Meyering  <meyering@lucent.com>
24847
24848         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
24849
24850 2000-12-01  Paul Eggert  <eggert@twinsun.com>
24851
24852         * lib/memrchr.c: Include <config.h> before any system include file.
24853
24854 2000-11-30  Jim Meyering  <meyering@lucent.com>
24855
24856         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
24857
24858 2000-11-30  Jim Meyering  <meyering@lucent.com>
24859
24860         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
24861
24862 2000-11-29  Paul Eggert  <eggert@twinsun.com>
24863
24864         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
24865
24866 2000-11-26  Jim Meyering  <meyering@lucent.com>
24867
24868         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
24869
24870 2000-11-22  Paul Eggert  <eggert@twinsun.com>
24871
24872         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
24873         size of (size_t) -1; it's not portable.
24874
24875 2000-11-17  Jim Meyering  <meyering@lucent.com>
24876
24877         * lib/strstr.c: Update from GNU libc.
24878
24879 2000-11-17  Akim Demaille  <akim@epita.fr>
24880
24881         * lib/obstack.h: Formatting changes.
24882         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
24883         prevent type checking.
24884         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
24885         cast the value to (void *): assigning a `foo *' to a `void *'
24886         variable is valid.
24887         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
24888
24889 2000-11-16  Jim Meyering  <meyering@lucent.com>
24890
24891         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
24892
24893 2000-11-11  Jim Meyering  <meyering@lucent.com>
24894
24895         * lib/error.c: Add a couple #includes, merging from GNU libc version.
24896
24897 2000-11-10  Jim Meyering  <meyering@lucent.com>
24898
24899         * lib/obstack.h: Update from GNU libc.
24900         * lib/obstack.c: Likewise.
24901
24902 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
24903
24904         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
24905
24906 2000-11-06  Paul Eggert  <eggert@twinsun.com>
24907
24908         * lib/getusershell.c (setusershell): Use rewind rather than
24909         fseek/fseeko, to avoid configuration hassles with fseeko.
24910         Don't bother opening SHELLS_FILE if shellstream is NULL;
24911         it's not necessary.
24912
24913 2000-11-05  Jim Meyering  <meyering@lucent.com>
24914
24915         * lib/makepath.h (make_dir): Declare.
24916         * lib/makepath.c (make_dir): Remove `static' attribute.
24917         Tweak a comment.
24918
24919 2000-11-04  Jim Meyering  <meyering@lucent.com>
24920
24921         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
24922
24923 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
24924
24925         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
24926         last one in a bucket, advance to the next bucket.
24927
24928 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
24929
24930         * lib/fnmatch.c: Do not comment out all the code if we are using
24931         the GNU C library, because in some cases we are replacing buggy
24932         code in the GNU C library itself.
24933
24934 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
24935
24936         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
24937         (regex_compile): Catch bogus \(\1\).
24938
24939 2000-10-30  Paul Eggert  <eggert@twinsun.com>
24940
24941         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
24942         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
24943         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
24944
24945 2000-10-30  Paul Eggert  <eggert@twinsun.com>
24946
24947         * lib/error.h, getline.h, modechange.h:
24948         Remove "2000" from Copyright line, as the file hasn't been
24949         changed this year other than in the copyright notice.
24950
24951         * lib/xalloc.h: Add "2000" to Copyright line, as this file
24952         was changed this year.
24953
24954 2000-10-29  Jim Meyering  <meyering@lucent.com>
24955
24956         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
24957         renaming.
24958         * m4/ls-mntd-fs.m4: Likewise
24959
24960 2000-10-29  Jim Meyering  <meyering@lucent.com>
24961
24962         * lib/xstat.in: Fix grammar in comment.
24963
24964 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
24965
24966         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
24967         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
24968         doesn't define __restrict_arr.
24969
24970 2000-10-28  Jim Meyering  <meyering@lucent.com>
24971
24972         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
24973         (jm_PREREQ_MEMCHR): New function.
24974
24975 2000-10-28  Jim Meyering  <meyering@lucent.com>
24976
24977         * lib/memchr.c: Update from libc.
24978         Adjust for portability:
24979         [HAVE_STDLIB_H]: Include stdlib.h.
24980         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
24981         Undef __memchr, too.
24982         [!weak_alias]: Define __memchr to memchr.
24983
24984         * lib/regex.c: Update from libc.
24985         * lib/regex.h: Likewise.
24986         * lib/getopt1.c: Likewise.
24987         * lib/memcmp.c: Likewise.
24988
24989         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
24990         Avoid using fseek, when possible -- it's broken by design.
24991         Patch by Ulrich Drepper.
24992
24993 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
24994
24995         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
24996         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
24997         Giving in to popular pressure to shut up the compiler with casts.
24998
24999 2000-10-26  Jim Meyering  <meyering@lucent.com>
25000
25001         * lib/strftime.c: Update from libc.
25002
25003 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
25004
25005         * regex.c: More `unsigned char' -> `re_char' changes.
25006         Also change several `int' into `re_wchar_t'.
25007         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
25008         (PUSH_FAILURE_POINTER): Don't cast any more.
25009         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
25010         We want GCC to complain, since this piece of code makes
25011         re_match non-reentrant, which *should* be fixed.
25012         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
25013         (EXTEND_BUFFER): Use RETALLOC.
25014         (SET_LIST_BIT): Don't cast.
25015         (re_wchar_t): New type.
25016         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
25017         that those two functions will always properly return.
25018         (IMMEDIATE_QUIT_CHECK): Cast to void.
25019         (analyse_first): Use recursion rather than an explicit stack.
25020         (re_compile_fastmap): Can't fail anymore.
25021         (re_search_2): Don't check re_compile_fastmap for failure.
25022         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
25023         Now also sets the new value (passed in a new argument).
25024         (re_match_2_internal): Use it.
25025         Also, use a new var `reg' of type size_t when looping through regs
25026         rather than reuse the inappropriate `mcnt'.
25027
25028 2000-10-25  Jim Meyering  <meyering@lucent.com>
25029
25030         * lib/obstack.c: Update from libc.
25031
25032 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
25033
25034         * regex.c (regex_compile): Change the way of handling a range from
25035         a char less than 256 to a char not less than 256.
25036
25037 2000-10-24  Andrew Innes  <andrewi@gnu.org>
25038
25039         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
25040         NT-Emacs only.
25041         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
25042         so that re_search functions only quit when callers expect them to.
25043
25044 2000-10-23  Jim Meyering  <meyering@lucent.com>
25045
25046         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
25047         wrong.  That set_locale call must not have any side effects.
25048         From Paul Eggert.
25049
25050 2000-10-22  Jim Meyering  <meyering@lucent.com>
25051
25052         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
25053         [CYCLIC]: Remove now-unused definition.
25054
25055         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
25056         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
25057         Suggestion from Ulrich Drepper.
25058
25059 2000-10-21  Jim Meyering  <meyering@lucent.com>
25060
25061         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
25062         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
25063         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
25064
25065 2000-10-21  Jim Meyering  <meyering@lucent.com>
25066
25067         * lib/dirname.c (memrchr): Declare if necessary.
25068         (dir_name): Remove the restriction that there be no
25069         trailing slashes.  Now, this code skips past them, effectively
25070         ignoring them.
25071         [TEST_DIRNAME] (main): New unit tests.
25072
25073         * lib/memrchr.c: New file from GNU libc.
25074         Undef __memrchr, too.
25075         [!weak_alias]: Define __memrchr to memrchr.
25076         Guard weak_alias use with `#ifdef weak_alias'.
25077
25078 2000-10-21  Jim Meyering  <meyering@lucent.com>
25079
25080         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
25081         (dir_name): Use dir_name_r.
25082         * lib/dirname.h (dir_name_r): Declare it.
25083
25084 2000-10-17  Jim Meyering  <meyering@lucent.com>
25085
25086         * lib/quote.h (PARAMS): Define and use.
25087         Reported by Akim Demaille.
25088
25089         * lib/getopt.c: Update from libc.
25090
25091 2000-10-16  Jim Meyering  <meyering@lucent.com>
25092
25093         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
25094         setlocale.
25095         From Jan Fedak.
25096
25097 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
25098
25099         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
25100
25101 2000-09-25  Jim Meyering  <meyering@lucent.com>
25102
25103         * lib/md5.h (rol): Define (from GnuPG).
25104
25105         * lib/sha.c: Give credit (GnuPG) where due.
25106         (M): Use rol rather than open-coding it.
25107         Add a FIXME comment.
25108
25109 2000-09-21  Jim Meyering  <meyering@lucent.com>
25110
25111         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
25112         Reported by Michael Stone.
25113
25114 2000-09-20  Jim Meyering  <meyering@lucent.com>
25115
25116         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
25117         (noinst_HEADERS): Add sha.h.
25118         Based on code from Scott G. Miller and from GnuPG.
25119
25120 2000-09-18  Jim Meyering  <meyering@lucent.com>
25121
25122         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
25123         LIBS. Otherwise, everyone ends up linking with -lelf for some
25124         configurations.
25125         Reported by Mike Stone.
25126
25127 2000-09-15  Jim Meyering  <meyering@lucent.com>
25128
25129         * lib/regex.c: Update from libc.
25130
25131 2000-09-10  Jim Meyering  <meyering@lucent.com>
25132
25133         * lib/getopt.c (_getopt_internal): Update from glibc.
25134
25135 2000-09-09  Jim Meyering  <meyering@lucent.com>
25136
25137         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
25138         think it should be used as a general replacement for isascii.
25139         * lib/fnmatch.c: Likewise.
25140         * lib/mbswidth.c: Likewise
25141         * lib/regex.c: Likewise.
25142
25143         Don't use atoi.
25144         * lib/userspec.c: Include sys/param.h and limits.h.
25145         Include xstrtol.h.
25146         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
25147         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
25148         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
25149         UID, GID.  Check range.
25150
25151 2000-09-06  Jim Meyering  <meyering@lucent.com>
25152
25153         * lib/getopt.c (_getopt_internal): Update from glibc.
25154
25155 2000-08-30  Jim Meyering  <meyering@lucent.com>
25156
25157         * lib/strftime.c: Merge in changes from GNU libc.
25158
25159 2000-08-26  Jim Meyering  <meyering@lucent.com>
25160
25161         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
25162         * m4/fpending.m4: New file.
25163
25164 2000-08-26  Jim Meyering  <meyering@lucent.com>
25165
25166         * lib/closeout.c: Include "__fpending.h".
25167         (close_stdout_status): Return right away if there's nothing to flush.
25168
25169         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
25170         * lib/__fpending.c: New file.
25171         * lib/__fpending.h: New file.
25172
25173 2000-08-20  Jim Meyering  <meyering@lucent.com>
25174
25175         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
25176         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
25177         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
25178
25179 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
25180
25181         Improve fileutils installation on systems where running
25182         programs (like install) can't be unlinked.
25183         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
25184         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
25185
25186 2000-08-07  Paul Eggert  <eggert@twinsun.com>
25187
25188         Standardize on "memory exhausted" instead of "Memory exhausted"
25189         or "virtual memory exhausted".
25190         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
25191         "virtual memory exhausted".
25192         * lib/same.c (same_name): Invoke xalloc_die instead of printing
25193         our own message.
25194         * lib/userspec.c (parse_user_spec): Likewise.
25195         * lib/bumpalloc.h: comment fix
25196         * lib/same.c, userspec.c: Include xalloc.h.
25197
25198         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
25199         not char *const and pointing to a constant array.
25200         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
25201         (xrealloc): Comment fix.
25202
25203         * lib/userspec.c (parse_user_spec):
25204         Don't translate a message until just before returning,
25205         to avoid unnecessary translation.
25206
25207 2000-08-07  Jim Meyering  <meyering@lucent.com>
25208
25209         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
25210         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
25211         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
25212         getgroups.c, gethostname.c, getopt.h, group-member.c,
25213         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
25214         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
25215         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
25216         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
25217         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
25218         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
25219         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
25220         yesno.c: Back out Copyright date changes for each file with no change
25221         this year.  This eases coordination with other programs using the same
25222         source code modules.  From Paul Eggert.
25223
25224 2000-08-06  Paul Eggert  <eggert@twinsun.com>
25225
25226         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
25227         not char, for compatibility with glibc 2.1.3 strftime.c.
25228
25229 2000-08-03  Greg McGary  <greg@mcgary.org>
25230
25231         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
25232         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
25233         (EXTEND_BUFFER): Use them.
25234
25235 2000-08-01  Jim Meyering  <meyering@lucent.com>
25236
25237         * lib/dirname.c (ISSLASH): Define.
25238         (BACKSLASH_IS_PATH_SEPARATOR): Define.
25239         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
25240         both `\' and `/' may be use as path separators.
25241         Based on a patch from Prashant TR.
25242
25243 2000-07-31  Paul Eggert  <eggert@twinsun.com>
25244
25245         * lib/quotearg.c (quotearg_n_options): Don't make the initial
25246         slot vector a constant, since it might get modified.
25247
25248 2000-07-31  Jim Meyering  <meyering@lucent.com>
25249
25250         * lib/xmalloc.c: Use `virtual memory exhausted', not
25251         `Memory exhausted'.
25252         * lib/obstack.c (print_and_abort): Likewise.
25253
25254 2000-07-30  Paul Eggert  <eggert@twinsun.com>
25255
25256         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
25257         buffer, so that the caller can always quote one small
25258         component of a "memory exhausted" message in slot 0.
25259         From a suggestion by Jim Meyering.
25260
25261 2000-07-30  Jim Meyering  <meyering@lucent.com>
25262
25263         * lib/makepath.c (make_path): Quote the other instance, too.
25264
25265         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
25266         (STATIC_BUF_SIZE): Define.
25267         (quotearg_n_options): Use only statically allocated storage when
25268         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
25269         than STATIC_BUF_SIZE.
25270
25271 2000-07-29  Jim Meyering  <meyering@lucent.com>
25272
25273         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
25274         * lib/dirname.c (dir_name): Likewise.
25275
25276         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
25277         `/'.
25278
25279         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
25280         (dir_name): Assert that there are no trailing slashes.
25281
25282 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
25283
25284         * lib/mbswidth.h (mbswidth): Add a flags argument.
25285         (mbswidth): New declaration.
25286         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
25287         * lib/mbswidth.c (mbswidth): Add a flags argument.
25288         (mbsnwidth): New function.
25289
25290 2000-07-24  Jim Meyering  <meyering@lucent.com>
25291
25292         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
25293
25294 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25295
25296         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
25297
25298 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25299
25300         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
25301         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
25302         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
25303         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
25304         invoke multibyte primitives.
25305
25306 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25307
25308         * lib/quotearg.c:
25309         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
25310         so that mbstate_t is always defined.
25311
25312         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
25313         be 1 in at least one GCC installation, and this configuration
25314         error is likely to be common.  Ignoring MB_LEN_MAX hurts
25315         performance on hosts that have mbrtowc but have only unibyte
25316         locales, but I assume these hosts are rare.
25317
25318 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25319
25320         * lib/mbswidth.c (_XOPEN_SOURCE):
25321         Don't define; this causes problems on Solaris 7.
25322         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
25323
25324 2000-07-23  Jim Meyering  <meyering@lucent.com>
25325
25326         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
25327         too: getgrgid, getpwuid, getuid.
25328
25329 2000-07-23  Jim Meyering  <meyering@lucent.com>
25330
25331         * lib/basename.c (base_name): Add an assertion.
25332
25333 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
25334
25335         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
25336         shadow its mbsinit function.
25337
25338 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
25339
25340         * lib/mbswidth.h: New file.
25341         * lib/mbswidth.c: New file.
25342         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
25343         (noinst_HEADERS): Add mbswidth.h.
25344
25345 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
25346
25347         * lib/config.charset: Add support for FreeBSD. Improve support for
25348         HP-UX and IRIX 6.
25349
25350 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
25351
25352         * m4/mbswidth.m4: New file.
25353         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
25354
25355 2000-07-15  Jim Meyering  <meyering@lucent.com>
25356
25357         * lib/makepath.c: Include quote.h.
25358         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
25359         corresponding argument in a `quote (...)' call.
25360         Give better diagnostics.
25361
25362         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
25363         (noinst_HEADERS): Add quote.h.
25364
25365         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
25366         from tar's src/misc.c.
25367         * lib/quote.h: New file.  Prototypes for same.
25368
25369 2000-07-14  Paul Eggert  <eggert@twinsun.com>
25370
25371         From a suggestion by Bruno Haible.
25372         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
25373         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
25374         to decide whether to define the BeOS workaround macro;
25375         this adjusts to the change to AC_MBSTATE_T.
25376
25377 2000-07-14  Jim Meyering  <meyering@lucent.com>
25378
25379         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
25380         jm_AC_TYPE_UINTMAX_T.
25381
25382 2000-07-13  Paul Eggert  <eggert@twinsun.com>
25383
25384         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
25385
25386         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
25387         quotearg_buffer_restyled): Add support for
25388         clocale_quoting_style.  Undo previous change to
25389         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
25390         and "{RIGHT QUOTATION MARK}" msgids.
25391
25392 2000-07-10  Paul Eggert  <eggert@twinsun.com>
25393
25394         From a suggestion by Bruno Haible.
25395         * m4/mbstate_t.m4 (AC_MBSTATE_T):
25396         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
25397         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
25398         and mbstate_t, to a single-part test that simply defines mbstate_t.
25399         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
25400         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
25401
25402 2000-07-10  Jim Meyering  <meyering@lucent.com>
25403
25404         * m4/strerror_r.m4: Mirror the correction made in autoconf.
25405
25406         * m4/gnu-source.m4: Output to confdefs.h directly.
25407         Suggestion from Akim Demaille.
25408
25409 2000-07-09  Paul Eggert  <eggert@twinsun.com>
25410
25411         The old behavior of quoting `like this' doesn't look good with
25412         newer, ISO-style fonts.  See:
25413         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
25414
25415         Instead, quote "like this" by default.  Let the translator
25416         tailor the locale-specific quoting behavior by providing
25417         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
25418
25419         * lib/quotearg.c (N_): New macro.
25420         (gettext_default): New function.
25421         (quotearg_buffer_restyled): Use
25422         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
25423         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
25424
25425 2000-07-09  Jim Meyering  <meyering@lucent.com>
25426
25427         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
25428         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
25429
25430         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
25431         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
25432
25433 2000-07-09  Jim Meyering  <meyering@lucent.com>
25434
25435         * lib/Most files: Update copyright dates to include 2000.
25436
25437 2000-07-08  Jim Meyering  <meyering@lucent.com>
25438
25439         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
25440         if not defined.
25441         (xgethostname): Remove now-unnecessary #ifdef.
25442         Move declaration of `err' into loop where it's used.
25443
25444 2000-07-05  Paul Eggert  <eggert@twinsun.com>
25445         and Bruno Haible  <haible@clisp.cons.org>
25446
25447         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
25448         only if the test for an object-type mbstate_t fails.  This
25449         prevents us from mistakenly reporting that mbstate_t is a
25450         system object type after we "#define mbstate_t int" to work
25451         around its lack.
25452
25453 2000-07-05  Paul Eggert  <eggert@twinsun.com>
25454         and Bruno Haible  <haible@clisp.cons.org>
25455
25456         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
25457
25458 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
25459
25460         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
25461         to strerror_r.
25462         Include <ctype.h> for use of isalpha.
25463
25464 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
25465
25466         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
25467         by allocating a larger buffer. Test the gethostname return value for
25468         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
25469         returns an error and ENAMETOOLONG isn't defined.
25470
25471 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
25472
25473         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
25474         dimension.
25475
25476 2000-07-04  Jim Meyering  <meyering@lucent.com>
25477
25478         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
25479         of the deprecated AC_CHECKING.
25480
25481 2000-07-04  Jim Meyering  <meyering@lucent.com>
25482
25483         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
25484         Reported by Bruno Haible.
25485
25486 2000-07-04  Jim Meyering  <meyering@lucent.com>
25487
25488         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
25489         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
25490         lacks mbrtowc.
25491
25492 2000-07-03  Paul Eggert  <eggert@twinsun.com>
25493
25494         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
25495         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
25496
25497 2000-07-03  Paul Eggert  <eggert@twinsun.com>
25498         and Bruno Haible  <haible@clisp.cons.org>
25499
25500         * lib/quotearg.c (mbrtowc):
25501         Assign to *pwc, and return 1 only if result is nonzero.
25502         (iswprint): Use ISPRINT when substituting our own mbrtowc.
25503
25504 2000-07-03  Jim Meyering  <meyering@lucent.com>
25505
25506         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
25507
25508 2000-07-03  Jim Meyering  <meyering@lucent.com>
25509
25510         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
25511         This is necessary to get a definition of e.g., UTMP_FILE on
25512         HP-UX 10.20.
25513         From Bob Proulx.
25514
25515 2000-07-02  Jim Meyering  <meyering@lucent.com>
25516
25517         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
25518
25519         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
25520         AC_LIBOBJ(function_name).
25521         * m4/chown.m4: Likewise.
25522         * m4/fnmatch.m4: Likewise.
25523         * m4/ftruncate.m4: Likewise.
25524         * m4/getgroups.m4: Likewise.
25525         * m4/getline.m4: Likewise.
25526         * m4/group-member.m4: Likewise.
25527         * m4/jm-macros.m4: Likewise.
25528         * m4/lstat.m4: Likewise.
25529         * m4/malloc.m4: Likewise.
25530         * m4/memcmp.m4: Likewise.
25531         * m4/nanosleep.m4: Likewise.
25532         * m4/putenv.m4: Likewise.
25533         * m4/realloc.m4: Likewise.
25534         * m4/regex.m4: Likewise.
25535         * m4/stat.m4: Likewise.
25536         * m4/strftime.m4: Likewise.
25537
25538 2000-07-02  Jim Meyering  <meyering@lucent.com>
25539
25540         * lib/quotearg.c (mbstate_t): Don't define here.
25541
25542 2000-07-02  Jim Meyering  <meyering@lucent.com>
25543
25544         * lib/nanosleep.c (SIGCONT): Define if not already defined.
25545
25546 2000-07-01  Jim Meyering  <meyering@lucent.com>
25547
25548         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
25549
25550 2000-07-01  Jim Meyering  <meyering@lucent.com>
25551
25552         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
25553         problem.
25554
25555 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
25556
25557         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
25558         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
25559
25560 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
25561
25562         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
25563         per change in ../m4/ls-mntd-fs.m4.
25564         (read_filesystem_list): Ignore symbolic links.
25565
25566 2000-06-29  Jim Meyering  <meyering@lucent.com>
25567
25568         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
25569         for declaration of strcmp.
25570
25571         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
25572
25573         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
25574         Avoid warning by casting result to `char *' to remove `const'.
25575
25576 2000-06-28  Jim Meyering  <meyering@lucent.com>
25577
25578         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
25579         included by quotearg.c, for which we perform this test.  From
25580         Bruno Haible.
25581
25582 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
25583
25584         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
25585         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
25586         <utmpx.h> exists, put readutmp.o into LIBOBJS.
25587
25588 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
25589
25590         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
25591
25592 2000-06-26  Paul Eggert  <eggert@twinsun.com>
25593
25594         savedir now sets errno on failure and invokes xmalloc to get memory.
25595         Fix a couple of other minor bugs while we're at it.
25596
25597         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
25598         (NAMLEN): Remove macro.
25599         (malloc, realloc): Remove decls.
25600         (stpcpy): Likewise.
25601         ("xalloc.h"): Include.
25602         (NAME_SIZE_DEFAULT): New macro.
25603         (savedir): Use xmalloc / xrealloc to allocate memory.
25604         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
25605         Skip "" directory entries.
25606         Use strlen to calculate directory entry length, since the old method
25607         is rarely used these days and isn't worth supporting.
25608         Don't use a pointer after freeing it.
25609         Check for integer overflow when calculating allocation size.
25610         Use memcpy to copy entries, instead of stpcpy.
25611         Set errno properly when returning NULL.
25612         Check for readdir error.
25613
25614 2000-06-26  Jim Meyering  <meyering@lucent.com>
25615
25616         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
25617
25618 2000-06-25  Jim Meyering  <meyering@lucent.com>
25619
25620         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
25621         Linux header bug when _XOPEN_SOURCE is defined to 500.
25622
25623 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
25624
25625         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
25626         deficiency.
25627
25628 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
25629
25630         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
25631         Include xalloc.h.
25632         Don't include <stdlib.h>.  Don't declare malloc, realloc.
25633
25634 2000-06-24  Jim Meyering  <meyering@lucent.com>
25635
25636         * m4/strerror_r.m4: Revive this file -- to try out an experimental
25637         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
25638         for which strerror does return char*, but which lacks a conveniently
25639         accessible declaration of the function.  If the compile-test says
25640         strerror_r doesn't work, then resort to a `run'-test that works on
25641         BeOS and segfaults on DEC Unix.
25642
25643 2000-06-24  Jim Meyering  <meyering@lucent.com>
25644
25645         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
25646
25647 2000-06-23  Paul Eggert  <eggert@twinsun.com>
25648
25649         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
25650         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
25651
25652 2000-06-23  Paul Eggert  <eggert@twinsun.com>
25653
25654         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
25655         (mbrtowc, mbstate_t): Define substitutes if
25656         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
25657         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
25658         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
25659
25660 2000-06-23  Jim Meyering  <meyering@lucent.com>
25661
25662         * m4/afs.m4: Add missing AC_MSG_RESULT.
25663         Reported by Bruno Haible.
25664
25665         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
25666         Suggestion from Bruno Haible.
25667
25668 2000-06-23  Jim Meyering  <meyering@lucent.com>
25669
25670         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
25671
25672 2000-06-21  Jim Meyering  <meyering@lucent.com>
25673
25674         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
25675
25676 2000-06-21  Jim Meyering  <meyering@lucent.com>
25677
25678         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
25679         (noinst_HEADERS): Add getstr.h.
25680
25681         * lib/getline.c (getstr): Move into a separate file.
25682         * lib/getstr.c (getstr): New file, extracted from getline.c, with
25683         the following changes: new parameter, delim2; both delim[12]
25684         parameters have type `int', not `char'.  The latter would lose
25685         with 8-bit delimiters.
25686         * lib/getstr.h: New file.
25687
25688 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
25689
25690         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
25691         than 1024, return a memory chunk of least possible size, instead
25692         of size PATH_MAX + 2. In the loop, increment the size proportionally.
25693         Use free/xmalloc instead of xrealloc to avoid copying for very long
25694         paths.
25695
25696 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
25697
25698         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
25699         the empty string.
25700
25701 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
25702
25703         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
25704         address, not strdup.  Include <stdlib.h> and don't declare free().
25705
25706 2000-06-19  Jim Meyering  <meyering@lucent.com>
25707
25708         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
25709
25710 2000-06-18  Jim Meyering  <meyering@lucent.com>
25711
25712         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
25713
25714         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
25715         `checking whether...' message to be consistent with that of the
25716         lstat test.
25717
25718 2000-06-18  Jim Meyering  <meyering@lucent.com>
25719
25720         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
25721         Besides, these days every porting target provides a mkdir function.
25722
25723         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
25724         needed. (this snippet comes from src/system.h).
25725
25726 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
25727
25728         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
25729
25730 2000-06-15  Paul Eggert  <eggert@twinsun.com>
25731
25732         * lib/human.c (adjust_value): New function.
25733         (human_readable_inexact): Apply rounding style even when
25734         printing approximate values.
25735
25736 2000-06-14  Paul Eggert  <eggert@twinsun.com>
25737
25738         * lib/human.c (human_readable_inexact): Allow an input block
25739         size that is not a multiple of the output block size, and vice versa.
25740         Reported by Piergiorgio Sartor.
25741
25742 2000-06-14  Paul Eggert  <eggert@twinsun.com>
25743
25744         * lib/getdate.y (get_date): Apply relative times after time
25745         zone indicator, not before.  Reported by Todd A. Jacobs.
25746
25747 2000-06-13  Jim Meyering  <meyering@lucent.com>
25748
25749         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
25750
25751         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
25752
25753 2000-06-12  Paul Eggert  <eggert@twinsun.com>
25754
25755         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
25756
25757 2000-06-12  Jim Meyering  <meyering@lucent.com>
25758
25759         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
25760         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
25761         optional argument.
25762         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
25763         the optional argument, `lib'.
25764
25765 2000-06-08  Jim Meyering  <meyering@lucent.com>
25766
25767         * m4/largefile.m4: Remove file (now that it's part of autoconf).
25768
25769 2000-06-04  Paul Eggert  <eggert@twinsun.com>