0f1e117cad30ced04ec9086d191b4111c6801348
[gnulib.git] / ChangeLog
1 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
2
3         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
4         like glibc; on Solaris 10, it fails with errno == EINVAL.
5         POSIX says the behavior is unspecified if the first argument is NULL,
6         so play it safe and never pass NULL to the system getcwd.
7
8 2007-02-21  Jim Meyering  <jim@meyering.net>
9
10         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
11         of gettimeofday.  It would conflict with the one now always
12         provided via sys_time_.h.  Reported by Matthew Woehlke, as
13         an IRIX 6.5 build failure.
14
15 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
16
17         Minor fixups to port to Solaris 10 with Sun C 5.8.
18         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
19         * modules/getcwd (Depends-on): Add dirfd.
20         * lib/putenv.c (putenv): #undef it.
21         (rpl_putenv): New decl.
22         (malloc, free): Include <stdlib.h> rather than prototyping separately.
23
24 2007-02-20  Bruno Haible  <bruno@clisp.org>
25
26         * modules/stdio-tests: New file.
27         * tests/test-stdio.c: New file.
28
29         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
30         (Depends-on): Add stdio.
31         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
32         (Include): Use <stdio.h> instead of vsnprintf.h.
33         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
34         HAVE_DECL_VSNPRINTF.
35         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
36
37         * modules/snprintf (Files): Remove lib/snprintf.h.
38         (Depends-on): Add stdio.
39         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
40         (Include): Use <stdio.h> instead of snprintf.h.
41         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
42         HAVE_DECL_SNPRINTF.
43         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
44         * lib/getaddrinfo.c: Likewise.
45
46         * modules/stdio: New file.
47         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
48         * lib/snprintf.h: Remove file.
49         * lib/vsnprintf.h: Remove file.
50         * lib/.cppi-disable: Remove snprintf.h.
51         * m4/stdio_h.m4: New file.
52         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
53
54 2007-02-20  Jim Meyering  <jim@meyering.net>
55
56         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
57         used by e.g., mingw.  From Bruno Haible.
58
59 2007-02-19  Bruno Haible  <bruno@clisp.org>
60
61         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
62         warnings.
63         Reported by Ben Pfaff <blp@cs.stanford.edu>.
64
65 2007-02-19  Bruno Haible  <bruno@clisp.org>
66
67         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
68         from mingw users.
69
70 2007-02-19  Bruno Haible  <bruno@clisp.org>
71
72         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
73         warnings.
74         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
75
76 2007-02-19  Jim Meyering  <jim@meyering.net>
77
78         Don't use FD after a successful "fdopendir (fd)".
79         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
80         Reset it by calling dirfd on the just-obtained DIR*.
81
82         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
83         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
84
85 2007-02-18  Bruno Haible  <bruno@clisp.org>
86
87         * lib/readlink.c: Include <unistd.h>.
88         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
89         HAVE_READLINK.
90         * modules/readlink (Depends-on): Add unistd.
91         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
92         (Include): Add <unistd.h>.
93
94         * lib/getlogin_r.h: Remove file.
95         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
96         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
97         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
98         HAVE_DECL_GETLOGIN_R.
99         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
100         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
101         (Include): Use <unistd.h> instead of getlogin_r.h.
102
103         * lib/getcwd.h: Remove file.
104         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
105         * lib/xgetcwd.c: Likewise.
106         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
107         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
108         * modules/getcwd (Files): Remove lib/getcwd.h.
109         (Depends-on): Add unistd.
110         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
111         (Include): Use <unistd.h> instad of getcwd.h.
112
113         * lib/ftruncate.c: Include <unistd.h> first.
114         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
115         Set HAVE_FTRUNCATE.
116         * modules/ftruncate (Depends-on): Add unistd.
117         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
118
119         * lib/fchdir.c: Include <unistd.h> first.
120         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
121         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
122         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
123         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
124         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
125
126         * lib/dup2.c: Include <unistd.h> first.
127         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
128         HAVE_DUP2.
129         * modules/dup2 (Depends-on): Add unistd.
130         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
131
132         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
133         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
134         REPLACE_CHOWN. Don't define chown as a macro here.
135         * modules/chown (Depends-on): Add unistd.
136         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
137
138         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
139         Add definition for GL_LINK_WARNING.
140         (chown, dup2): New declarations.
141         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
142         link warning.
143         (ftruncate): New declaration.
144         (getcwd): New declaration, taken from old getcwd.h.
145         (getlogin_r): New declaration, taken from old getlogin_r.h.
146         (readlink): New declaration.
147         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
148         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
149         (gl_PREREQ_UNISTD): Remove macro.
150         (gl_UNISTD_MODULE_INDICATOR): New macro.
151         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
152         many new variables. Don't set UNISTD_H.
153         * modules/unistd (Description): Change.
154         (Depends-on): Add link-warning.
155         (configure.ac): Update.
156         (Makefile.am): Create unistd.h always. Substitute many new variables
157         into it.
158
159 2007-02-18  Bruno Haible  <bruno@clisp.org>
160
161         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
162         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
163         HAVE_GETSUBOPT.
164         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
165         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
166         * lib/getsubopt.h: Remove file.
167         * modules/getsubopt (Files): Remove lib/getsubopt.h.
168         (Depends-on): Add stdlib.
169         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
170         (Includes): Use <stdlib.h> instead of getsubopt.h.
171         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
172         Set HAVE_GETSUBOPT.
173         * lib/getsubopt.c: Don't include getsubopt.h.
174
175 2007-02-18  Bruno Haible  <bruno@clisp.org>
176
177         * modules/fchdir (Depends-on): Add dup2.
178
179 2007-02-18  Bruno Haible  <bruno@clisp.org>
180
181         * lib/stdlib_.h: Handle glibc's special invocation convention
182         specially.
183
184 2007-02-18  Bruno Haible  <bruno@clisp.org>
185
186         * modules/stdlib-tests: New file.
187         * tests/test-stdlib.c: New file.
188
189         * modules/mkstemp (Files): Remove lib/mkstemp.h.
190         (Depends-on): Add stdlib.
191         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
192         (Includes): Use <stdlib.h> instead of mkstemp.h.
193         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
194         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
195         * lib/mkstemp.c: Don't include mkstemp.h.
196         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
197         * lib/stdlib--.h: Don't include mkstemp.h.
198
199         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
200         (Depends-on): Add stdlib.
201         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
202         (Includes): Use <stdlib.h> instead of mkdtemp.h.
203         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
204         HAVE_MKDTEMP.
205         * lib/mkdtemp.c: Don't include mkdtemp.h.
206         * lib/clean-temp.c: Don't include mkdtemp.h.
207
208         * modules/exit (Files): Remove lib/exit.h.
209         (Depends-on): Add stdlib.
210         (Makefile.am): Remove lib_SOURCES.
211         (Include): Use <stdlib.h> instead of exit.h.
212         * lib/argmatch.c: Don't include exit.h.
213         * lib/execute.c: Likewise.
214         * lib/pagealign_alloc.c: Likewise.
215         * lib/pipe.c: Likewise.
216         * lib/wait-process.c: Likewise.
217         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
218         * lib/exitfail.c: Likewise.
219         * lib/savewd.c: Likewise.
220         * lib/xsetenv.c: Likewise.
221
222         * modules/stdlib: New file.
223         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
224         and extra comments about mkstemp().
225         * lib/exit.h: Remove file.
226         * lib/mkdtemp.h: Remove file.
227         * lib/mkstemp.h: Remove file.
228         * m4/stdlib_h.m4: New file.
229         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
230
231 2007-02-18  Bruno Haible  <bruno@clisp.org>
232
233         * modules/math-tests: New file.
234         * tests/test-math.c: New file.
235
236         * modules/math: New file.
237         * modules/mathl (Files): Remove lib/mathl.h.
238         (Depends-on): Add math.
239         (Makefile.am): Don't mention mathl.h.
240         (Include): Use <math.h> instead of mathl.h.
241         * lib/math_.h: New file.
242         * lib/mathl.h: Remove file.
243         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
244         mathl.h.
245         * lib/asinl.c: Likewise.
246         * lib/atanl.c: Likewise.
247         * lib/ceill.c: Likewise.
248         * lib/cosl.c: Likewise.
249         * lib/expl.c: Likewise.
250         * lib/floorl.c: Likewise.
251         * lib/frexpl.c: Likewise.
252         * lib/ldexpl.c: Likewise.
253         * lib/logl.c: Likewise.
254         * lib/sincosl.c: Likewise.
255         * lib/sinl.c: Likewise.
256         * lib/sqrtl.c: Likewise.
257         * lib/tanl.c: Likewise.
258         * lib/trigl.c: Likewise.
259         * m4/math_h.m4: New file.
260         * MODULES.html.sh (Mathematics): Add math.
261
262 2007-02-17  Bruno Haible  <bruno@clisp.org>
263
264         * modules/wctype-tests: New file.
265         * tests/test-wctype.c: New file.
266
267         * modules/wchar-tests: New file.
268         * tests/test-wchar.c: New file.
269
270         * modules/unistd-tests: New file.
271         * tests/test-unistd.c: New file.
272
273         * modules/time-tests: New file.
274         * tests/test-time.c: New file.
275
276         * modules/sysexits-tests: New file.
277         * tests/test-sysexits.c: New file.
278
279         * modules/sys_time-tests: New file.
280         * tests/test-sys_time.c: New file.
281
282         * modules/sys_stat-tests: New file.
283         * tests/test-sys_stat.c: New file.
284
285         * modules/sys_socket-tests: New file.
286         * tests/test-sys_socket.c: New file.
287
288         * modules/sys_select-tests: New file.
289         * tests/test-sys_select.c: New file.
290
291         * modules/string-tests: New file.
292         * tests/test-string.c: New file.
293
294         * modules/stdbool-tests: New file.
295         * tests/test-stdbool.c: New file.
296
297         * modules/netinet_in-tests: New file.
298         * tests/test-netinet_in.c: New file.
299
300         * modules/inttypes-tests: New file.
301         * tests/test-inttypes.c: New file.
302
303         * modules/fcntl-tests: New file.
304         * tests/test-fcntl.c: New file.
305
306         * modules/byteswap-tests: New file.
307         * tests/test-byteswap.c: New file.
308
309         * modules/arpa_inet-tests: New file.
310         * tests/test-arpa_inet.c: New file.
311
312 2007-02-17  Bruno Haible  <bruno@clisp.org>
313
314         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
315         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
316         if the corresponding module is not enabled. Emit link warnings if
317         the function is used nevertheless.
318         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
319         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
320         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
321         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
322         * modules/inttypes (Depends-on): Add link-warning.
323         (Makefile.am): Copy the contents of build-aux/link-warning.h into
324         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
325         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
326         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
327         * modules/imaxdiv (configure.ac): Likewise.
328         * modules/strtoimax (configure.ac): Likewise.
329         * modules/strtoumax (configure.ac): Likewise.
330
331 2007-02-17  Bruno Haible  <bruno@clisp.org>
332
333         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
334         gl_STRING_MODULE_INDICATOR_DEFAULTS.
335         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
336         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
337
338 2007-02-17  Bruno Haible  <bruno@clisp.org>
339
340         * modules/link-warning: New file.
341         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
342         * lib/string_.h (GL_LINK_WARNING): Remove definition.
343         * modules/string (Depends-on): Add link-warning.
344         (Makefile.am): Copy the contents of build-aux/link-warning.h into
345         string.h.
346         * MODULES.html.sh (Support for building libraries and executables): Add
347         link-warning.
348
349 2007-02-17  Bruno Haible  <bruno@clisp.org>
350
351         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
352         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
353         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
354         long lines.
355
356 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
357             Bruno Haible  <bruno@clisp.org>
358
359         * modules/tmpfile: New file.
360         * lib/tmpfile.c: New file.
361         * m4/tmpfile.m4: New file.
362         * MODULES.html.sh (func_all_modules): New section "Input/output".
363
364 2007-02-15  Bruno Haible  <bruno@clisp.org>
365
366         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
367         (supports_delete_on_close): New function.
368         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
369
370 2007-02-14  Bruno Haible  <bruno@clisp.org>
371
372         * modules/mbspcasecmp-tests: New file.
373         * tests/test-mbspcasecmp.sh: New file.
374         * tests/test-mbspcasecmp.c: New file.
375
376         New module mbspcasecmp.
377         * modules/mbspcasecmp: New file.
378         * lib/mbspcasecmp.c: New file.
379         * lib/string_.h (strncasecmp): Change warning message.
380         (mbspcasecmp): New declaration.
381         * m4/mbspcasecmp.m4: New file.
382         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
383         GNULIB_MBSPCASECMP.
384         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
385         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
386
387 2007-02-14  Bruno Haible  <bruno@clisp.org>
388
389         * modules/mbsncasecmp-tests: New file.
390         * tests/test-mbsncasecmp.sh: New file.
391         * tests/test-mbsncasecmp.c: New file.
392
393         New module mbsncasecmp.
394         * modules/mbsncasecmp: New file.
395         * lib/mbsncasecmp.c: New file.
396         * lib/string_.h (mbsncasecmp): New declaration.
397         * m4/mbsncasecmp.m4: New file.
398         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
399         GNULIB_MBSNCASECMP.
400         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
401         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
402
403 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
404
405         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
406         Verify that it doesn't overlap with our flags.
407         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
408         do not have the desired effect in multibyte locales; instead, use
409         mbscasecmp.
410         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
411         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
412         we don't require GNU fnmatch ourselves (if our users require it, they
413         should do so explicitly).
414
415         Fix regex code so it doesn't rely on strcasecmp.
416         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
417         Otherwise, include gnulib's langinfo.h.
418         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
419         undesirable behavior in non-C locales.  Instead, rely on localecharset.
420         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
421         * modules/regex (FILES): Remove m4/codeset.m4.
422         (Depends-on): Add localcharset.  Remove strcase.
423
424 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
425
426         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
427         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
428
429 2007-02-13  Bruno Haible  <bruno@clisp.org>
430
431         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
432         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
433
434 2007-02-12  Bruno Haible  <bruno@clisp.org>
435
436         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
437         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
438         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
439         time warning rather than a link error.
440
441 2007-02-12  Bruno Haible  <bruno@clisp.org>
442
443         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
444         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
445         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
446
447 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
448
449         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
450         args, not 2.
451
452 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
453
454         New module 'time', so that apps can include <time.h> as per
455         POSIX and GNU instead of separate include files like time_r.h
456         and timegm.h.  This implementation tries out a simpler approach
457         for replacing decls in standard include files (as compared to
458         the string module), somewhat as an experiment.
459
460         * config/srclist.txt: Comment out mktime.c for now.
461         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
462         since it doesn't apply any more.  Use generic wording instead.
463         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
464         'time'.
465         * lib/time_.h, m4/time_h.m4, modules/time: New files.
466         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
467         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
468         Don't include <sys/types.h>; no longer needed since we assume C89.
469         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
470         * lib/strftime.c: Likewise.
471         * lib/time_r.c: Likewise.
472         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
473         * lib/nanosleep.c: Include <time.h> first, to check interface.
474         * lib/strptime.c: Likewise.
475         * lib/time_r.c: Likewise.
476         * lib/timegm.c: Likewise.
477         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
478         needed.
479         * lib/timegm.c: Don't include timegm.h; no longer needed.
480         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
481         time.h now handles any problems in that area.
482         (struct timespec, nanosleep): Remove; time.h now arranges for these.
483         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
484         that time.h defines struct timespec.
485         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
486         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
487         handles that.
488         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
489         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
490         needed.  Set REPLACE_LOCALTIME.
491         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
492         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
493         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
494         nanosleep; time_h.m4 now does that.  Don't require
495         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
496         module handles this now.
497         * modules/getdate (Depends-on): Remove timespec.  Add time.
498         * modules/nanosleep (Depends-on): Likewise.
499         * modules/stat-time (Depends-on): Likewise.
500         * modules/nanosleep (Include): Include time.h, not timespec.h.
501         * modules/strptime (Files): Remove lib/strptime.h.
502         (Depends-on): Add extensions, time.
503         (Include): Include time.h, not strptime.h.
504         * modules/time_r (Files): Remove lib/time_r.h.
505         (Depends-on): Add time.
506         (Include): Include time.h, not time_r.h.
507         * modules/timegm: Likewise.
508         * modules/timespec (Description): Now does timespec-related decls
509         of our own, instead of struct timespec itself.
510         (Depends-on): Add time; remove extensions.
511         (Maintainer): Add self.
512         * modules/utimecmp (Depends-on): Add time; remove timespec.
513         * modules/utimens (Depends-on): Likewise.
514         * modules/xnanosleep (Depends-on): Likewise.
515
516 2007-02-11  Bruno Haible  <bruno@clisp.org>
517
518         * lib/c-strstr.c: Include allocsa.h.
519         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
520         * lib/c-strcasestr.c: Include allocsa.h.
521         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
522         * lib/strcasestr.c: Include allocsa.h.
523         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
524         * lib/mbsstr.c: Include allocsa.h.
525         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
526         allocsa/freesa instead of malloc/free.
527         * lib/mbscasestr.c: Include allocsa.h.
528         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
529         allocsa/freesa instead of malloc/free.
530         * modules/c-strstr (Depends-on): Add allocsa.
531         * modules/c-strcasestr (Depends-on): Likewise.
532         * modules/strcasestr (Depends-on): Likewise.
533         * modules/mbsstr (Depends-on): Likewise.
534         * modules/mbscasestr (Depends-on): Likewise.
535
536 2007-02-11  Bruno Haible  <bruno@clisp.org>
537
538         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
539
540         * modules/mbsspn-tests: New file.
541         * tests/test-mbsspn.sh: New file.
542         * tests/test-mbsspn.c: New file.
543
544 2007-02-11  Bruno Haible  <bruno@clisp.org>
545
546         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
547
548         * modules/mbspbrk-tests: New file.
549         * tests/test-mbspbrk.sh: New file.
550         * tests/test-mbspbrk.c: New file.
551
552 2007-02-11  Bruno Haible  <bruno@clisp.org>
553
554         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
555         unneeded cast.
556
557         * modules/mbscspn-tests: New file.
558         * tests/test-mbscspn.sh: New file.
559         * tests/test-mbscspn.c: New file.
560
561 2007-02-11  Bruno Haible  <bruno@clisp.org>
562
563         * modules/mbscasecmp-tests: New file.
564         * tests/test-mbscasecmp.sh: New file.
565         * tests/test-mbscasecmp.c: New file.
566
567 2007-02-11  Bruno Haible  <bruno@clisp.org>
568
569         Ensure O(n) worst-case complexity of mbscasestr.
570         * lib/mbscasestr.c: Include stdbool.h.
571         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
572         functions.
573         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
574         the bookkeeping indicates that it's worth it.
575         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
576
577         * modules/mbscasestr-tests: New file.
578         * tests/test-mbscasestr1.c: New file.
579         * tests/test-mbscasestr2.sh: New file.
580         * tests/test-mbscasestr2.c: New file.
581         * tests/test-mbscasestr3.sh: New file.
582         * tests/test-mbscasestr3.c: New file.
583         * tests/test-mbscasestr4.sh: New file.
584         * tests/test-mbscasestr4.c: New file.
585         * m4/locale-tr.m4: New file.
586
587 2007-02-11  Bruno Haible  <bruno@clisp.org>
588
589         Ensure O(n) worst-case complexity of mbsstr.
590         * lib/mbsstr.c: Include stdbool.h.
591         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
592         functions.
593         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
594         bookkeeping indicates that it's worth it.
595         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
596
597         * modules/mbsstr-tests: New file.
598         * tests/test-mbsstr1.c: New file.
599         * tests/test-mbsstr2.sh: New file.
600         * tests/test-mbsstr2.c: New file.
601         * tests/test-mbsstr3.sh: New file.
602         * tests/test-mbsstr3.c: New file.
603         * m4/locale-fr.m4: New file.
604
605 2007-02-11  Bruno Haible  <bruno@clisp.org>
606
607         * lib/mbsrchr.c (mbsrchr): Fix bug.
608
609         * modules/mbsrchr-tests: New file.
610         * tests/test-mbsrchr.sh: New file.
611         * tests/test-mbsrchr.c: New file.
612
613 2007-02-11  Bruno Haible  <bruno@clisp.org>
614
615         * lib/mbschr.c (mbschr): Fix bug.
616
617         * modules/mbschr-tests: New file.
618         * tests/test-mbschr.sh: New file.
619         * tests/test-mbschr.c: New file.
620         * m4/locale-zh.m4: New file.
621
622 2007-02-11  Bruno Haible  <bruno@clisp.org>
623
624         Support for copying multibyte string iterators.
625         * lib/mbiter.h: Include <string.h>.
626         (mbiter_multi_copy): New function.
627         (mbi_copy): New macro.
628         * lib/mbuiter.h: Include <string.h>.
629         (mbuiter_multi_copy): New function.
630         (mbui_copy): New macro.
631
632 2007-02-11  Bruno Haible  <bruno@clisp.org>
633
634         New module mbslen.
635         * modules/mbslen: New file.
636         * lib/mbslen.c: New file.
637         * lib/string_.h (mbslen): New declaration.
638         * m4/mbslen.m4: New file.
639         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
640         GNULIB_MBSLEN.
641         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
642         * MODULES.html.sh (Internationalization functions): Add mbslen.
643
644 2007-02-11  Bruno Haible  <bruno@clisp.org>
645
646         Ensure O(n) worst-case complexity of strcasestr substitute.
647         * lib/strcasestr.c: Include stdbool.h.
648         (knuth_morris_pratt): New function.
649         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
650         bookkeeping indicates that it's worth it.
651         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
652
653         * modules/strcasestr-tests: New file.
654         * tests/test-strcasestr.c: New file.
655
656 2007-02-11  Bruno Haible  <bruno@clisp.org>
657
658         Ensure O(n) worst-case complexity of c_strcasestr.
659         * lib/c-strcasestr.c: Include stdbool.h, string.h.
660         (knuth_morris_pratt): New function.
661         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
662         the bookkeeping indicates that it's worth it.
663         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
664
665         * modules/c-strcasestr-tests: New file.
666         * tests/test-c-strcasestr.c: New file.
667
668 2007-02-11  Bruno Haible  <bruno@clisp.org>
669
670         Ensure O(n) worst-case complexity of c_strstr.
671         * lib/c-strstr.c: Include stdbool.h, string.h.
672         (knuth_morris_pratt): New function.
673         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
674         bookkeeping indicates that it's worth it.
675         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
676
677         * lib/c-strstr.c: Complete rewrite for maintainability.
678
679         * modules/c-strstr-tests: New file.
680         * tests/test-c-strstr.c: New file.
681
682 2007-02-11  Bruno Haible  <bruno@clisp.org>
683
684         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
685         5.2.1 and earlier, whereby \055 was treated just like the range
686         delimiter '-'.
687         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
688
689 2007-02-08  Bruno Haible  <bruno@clisp.org>
690
691         * modules/regex (Depends-on): Add stdbool.
692         Reported by Dalibor Topic <robilad@kaffe.org>.
693
694 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
695
696         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
697         Prefer returning from main to exiting from it.
698         Remove unnecessary parens after sizeof.
699
700 2007-02-05  Bruno Haible  <bruno@clisp.org>
701
702         New module mbssep.
703         * modules/mbssep: New file.
704         * lib/mbssep.c: New file.
705         * lib/string_.h (strsep): Add a conditional link warning.
706         (mbssep): New declaration.
707         * m4/mbssep.m4: New file.
708         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
709         GNULIB_MBSSEP.
710         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
711         * MODULES.html.sh (Internationalization functions): Add mbssep.
712
713 2007-02-05  Bruno Haible  <bruno@clisp.org>
714
715         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
716         Optimize search in case of 1 delimiter.
717
718 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
719
720         * lib/acl.h: Include sys/types.h before sys/acl.h.
721
722 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
723
724         Merge upstream fix for glibc bugzilla #3957:
725
726         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
727
728         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
729         bit for RE_HAT_LISTS_NOT_NEWLINE.
730         (build_charclass_op): Remove bogus comment.
731
732 2007-02-05  Simon Josefsson  <simon@josefsson.org>
733
734         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
735
736 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
737
738         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
739         * lib/memmem.c [!defined _LIBC]: Include config.h.
740
741 2007-02-04  Bruno Haible  <bruno@clisp.org>
742
743         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
744         warning message.
745
746 2007-02-04  Bruno Haible  <bruno@clisp.org>
747
748         New module mbstok_r.
749         * modules/mbstok_r: New file.
750         * lib/mbstok_r.c: New file.
751         * lib/string_.h (strtok_r): Change argument names to match the
752         comments. Add a conditional link warning.
753         (mbstok_r): New declaration.
754         * m4/mbstok_r.m4: New file.
755         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
756         GNULIB_MBSTOK_R.
757         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
758         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
759
760 2007-02-04  Bruno Haible  <bruno@clisp.org>
761
762         New module mbsspn.
763         * modules/mbsspn: New file.
764         * lib/mbsspn.c: New file.
765         * lib/string_.h (strspn): Add a conditional link warning.
766         (mbsspn): New declaration.
767         * m4/mbsspn.m4: New file.
768         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
769         GNULIB_MBSSPN.
770         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
771         * MODULES.html.sh (Internationalization functions): Add mbsspn.
772
773 2007-02-04  Bruno Haible  <bruno@clisp.org>
774
775         New module mbspbrk.
776         * modules/mbspbrk: New file.
777         * lib/mbspbrk.c: New file.
778         * lib/string_.h (strpbrk): Add a conditional link warning.
779         (mbspbrk): New declaration.
780         * m4/mbspbrk.m4: New file.
781         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
782         GNULIB_MBSPBRK.
783         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
784         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
785
786 2007-02-04  Bruno Haible  <bruno@clisp.org>
787
788         New module mbscspn.
789         * modules/mbscspn: New file.
790         * lib/mbscspn.c: New file.
791         * lib/string_.h (strcspn): Add a conditional link warning.
792         (mbscspn): New declaration.
793         * m4/mbscspn.m4: New file.
794         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
795         GNULIB_MBSCSPN.
796         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
797         * MODULES.html.sh (Internationalization functions): Add mbscspn.
798
799 2007-02-04  Bruno Haible  <bruno@clisp.org>
800
801         New module mbscasestr, reduced goal of strcasestr.
802         * modules/mbscasestr: New file.
803         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
804         (mbscasestr): Renamed from strcasestr.
805         * lib/strcasestr.c: Don't include mbuiter.h.
806         (strcasestr): Remove support for multibyte locales.
807         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
808         Change the conditional link warning.
809         (mbscasestr): New declaration.
810         * m4/mbscasestr.m4: New file.
811         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
812         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
813         REPLACE_STRCASESTR.
814         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
815         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
816         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
817         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
818         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
819         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
820         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
821         (Depends-on): Remove mbuiter.
822         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
823
824 2007-02-04  Bruno Haible  <bruno@clisp.org>
825
826         Simplify handling of strncasecmp.
827         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
828         the conditional link warning.
829         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
830         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
831         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
832         * modules/strcase (configure.ac): Don't invoke
833         gl_STRING_MODULE_INDICATOR.
834         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
835
836 2007-02-04  Bruno Haible  <bruno@clisp.org>
837
838         New module mbscasecmp, reduced goal of strcasecmp.
839         * modules/mbscasecmp: New file.
840         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
841         (mbscasecmp): Renamed from strcasecmp.
842         * lib/strcasecmp.c: Don't include mbuiter.h.
843         (strcasecmp): Remove support for multibyte locales.
844         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
845         Change the conditional link warning.
846         (mbscasecmp): New declaration.
847         * m4/mbscasecmp.m4: New file.
848         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
849         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
850         REPLACE_STRCASECMP.
851         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
852         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
853         GNULIB_MBSCASECMP.
854         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
855         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
856         * modules/strcase (Files): Remove m4/mbrtowc.m4.
857         (Depends-on): Remove mbuiter.
858         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
859
860 2007-02-04  Bruno Haible  <bruno@clisp.org>
861
862         New module mbsstr. Remove module strstr.
863         * modules/mbsstr: New file.
864         * modules/strstr: Remove file.
865         * lib/mbsstr.c: Renamed from lib/strstr.c.
866         (mbsstr): Renamed from strstr.
867         * lib/string_.h (strstr): Remove declaration. Change the conditional
868         link warning.
869         (mbsstr): New declaration.
870         * m4/mbsstr.m4: New file.
871         * m4/strstr.m4: Remove file.
872         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
873         REPLACE_STRSTR.
874         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
875         Don't initialize GNULIB_STRSTR.
876         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
877         substitute GNULIB_STRSTR and REPLACE_STRSTR.
878         * MODULES.html.sh (Internationalization functions): Add mbsstr.
879         (Support for systems lacking ANSI C 89): Remove strstr.
880
881 2007-02-04  Bruno Haible  <bruno@clisp.org>
882
883         New module mbsrchr.
884         * modules/mbsrchr: New file.
885         * lib/mbsrchr.c: New file.
886         * lib/string_.h (strrchr): Add a conditional link warning.
887         (mbsrchr): New declaration.
888         * m4/mbsrchr.m4: New file.
889         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
890         GNULIB_MBSRCHR.
891         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
892         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
893
894 2007-02-04  Bruno Haible  <bruno@clisp.org>
895
896         New module mbschr.
897         * modules/mbschr: New file.
898         * lib/mbschr.c: New file.
899         * lib/string_.h (strchr): Add a conditional link warning.
900         (mbschr): New declaration.
901         * m4/mbschr.m4: New file.
902         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
903         GNULIB_MBSCHR.
904         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
905         * MODULES.html.sh (Internationalization functions): Add mbschr.
906
907 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
908
909         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
910
911         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
912
913 2007-02-04  Bruno Haible  <bruno@clisp.org>
914
915         New module description section 'configure.ac-early'.
916         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
917         (func_get_autoconf_early_snippet): New function.
918         (func_import, func_create_testdir): Use it. Remove special cases for
919         modules 'extensions' and 'lock'.
920         * modules/extensions (configure.ac-early): Require
921         gl_USE_SYSTEM_EXTENSIONS.
922         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
923
924 2007-02-04  Bruno Haible  <bruno@clisp.org>
925
926         Make use of gcj-4.3's -fsource and -ftarget option.
927         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
928         and if so try the options -fsource and -ftarget.
929         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
930         source_version, ftarget_option, target_version arguments.
931         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
932         (is_envjavac_oldgcj_14_14_usable): Renamed from
933         is_envjavac_gcj_14_14_usable.
934         (is_envjavac_oldgcj_14_13_usable): Renamed from
935         is_envjavac_gcj_14_13_usable.
936         (is_gcj_present): Update.
937         (is_gcj_43, is_gcj43_usable): New functions.
938         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
939         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
940         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
941         try the options -fsource and -ftarget.
942
943 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
944
945         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
946         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
947         larger value.
948
949 2007-02-03  Jim Meyering  <jim@meyering.net>
950
951         Give tools a better chance to allocate space for very large buffers.
952         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
953
954         Make pwd and readlink work also when run with an unreadable parent dir
955         on systems with openat support.
956         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
957         provided getcwd function, even when we have openat support.
958         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
959
960 2007-02-02  Bruno Haible  <bruno@clisp.org>
961
962         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
963         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
964         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
965         portability problems if one of these functions is only used on specific
966         platforms.
967         Reported by Paul Eggert.
968
969 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
970
971         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
972         is causing more trouble than it's curing.
973         * lib/regex_internal.h (__mempcpy): Remove.
974         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
975         (and make the code a tad smaller to boot).
976         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
977
978 2007-02-02  Jim Meyering  <jim@meyering.net>
979
980         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
981         section, not in the Makefile.am: one.
982
983 2007-02-02  Eric Blake  <ebb9@byu.net>
984
985         * lib/strchrnul.c: Always include config.h first.
986
987         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
988         gnulib strstr is not necessary here.
989
990 2007-02-02  Simon Josefsson  <simon@josefsson.org>
991
992         * m4/socklen.m4: Fix typo.
993
994 2007-02-02  Eric Blake  <ebb9@byu.net>
995
996         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
997         * modules/netinet_in (Makefile.am): Likewise.
998
999 2007-02-01  Bruno Haible  <bruno@clisp.org>
1000
1001         * lib/string_.h (GL_LINK_WARNING): New macro.
1002         (strcasecmp, strstr, strcasestr): If provided by the system,
1003         conditionally define as a macro that leads to a warning instead of to
1004         an error.
1005         (strncasecmp): Conditionally define as a macro that leads to a warning.
1006
1007 2007-02-01  Jim Meyering  <jim@meyering.net>
1008
1009         Give tools a better chance to allocate space for very large buffers.
1010         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
1011
1012 2007-02-01  Karl Berry  <karl@gnu.org>
1013
1014         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
1015
1016 2007-02-01  Bruno Haible  <bruno@clisp.org>
1017
1018         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
1019         renamings.
1020
1021 2007-02-01  Eric Blake  <ebb9@byu.net>
1022
1023         * modules/regex (Depends-on): Revert dependence on mempcpy.
1024         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
1025         module's definition of mempcpy.
1026         Reported by Paul Eggert.
1027
1028 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
1029
1030         * lib/string_.h: If the gnulib module XYZ is not present, undefine
1031         the symbol XYZ before redefining it.  This fixes a problem with
1032         programs that don't use XYZ, when compiled on systems that define
1033         XYZ to something else.
1034
1035 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
1036
1037         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
1038         occurs when "mkdir -m foo" creates a setgid directory that is (1)
1039         writeable to group or other and (2) is intended to have a special
1040         mode bit that is set or cleared.  In such a case, the directory
1041         should be neither group- nor other-writeable until the special
1042         mode bits are right.
1043
1044 2007-01-31  Eric Blake  <ebb9@byu.net>
1045
1046         * modules/mountlist (Depends-on): Add strstr.
1047
1048         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
1049         bug.
1050         * modules/string (Makefile.am): Remove redundant replacement.
1051         * modules/regex (Depends-on): Add mempcpy.
1052
1053 2007-01-31  Bruno Haible  <bruno@clisp.org>
1054
1055         New module description field 'Link'.
1056         * gnulib-tool (func_usage): Document --extract-link-directive.
1057         (sed_extract_prog): Recognize 'Link' directive.
1058         (func_get_link_directive): New function.
1059         (func_import): Show summary of link directives.
1060         Handle --extract-link-directive option.
1061         * modules/acl (Link): New section.
1062         * modules/clock-time (Link): New section.
1063         * modules/euidaccess (Link): New section.
1064         * modules/gettext (Link): New section.
1065         * modules/iconv (Link): New section.
1066         * modules/lock (Link): New section.
1067         * modules/nanosleep (Link): New section.
1068         * modules/readline (Link): New section.
1069
1070 2007-01-27  Bruno Haible  <bruno@clisp.org>
1071
1072         Enforce the use of gnulib modules for unportable <string.h> functions.
1073         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
1074         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
1075         (gl_HEADER_STRING_H_BODY): Require it.
1076         * lib/string_.h: If the gnulib module XYZ is not present, redefine
1077         the symbol XYZ to one that gives a link error.
1078         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
1079         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
1080         * modules/mempcpy (configure.ac): Likewise.
1081         * modules/memrchr (configure.ac): Likewise.
1082         * modules/stpcpy (configure.ac): Likewise.
1083         * modules/stpncpy (configure.ac): Likewise.
1084         * modules/strcase (configure.ac): Likewise.
1085         * modules/strcasestr (configure.ac): Likewise.
1086         * modules/strchrnul (configure.ac): Likewise.
1087         * modules/strdup (configure.ac): Likewise.
1088         * modules/strndup (configure.ac): Likewise.
1089         * modules/strnlen (configure.ac): Likewise.
1090         * modules/strpbrk (configure.ac): Likewise.
1091         * modules/strsep (configure.ac): Likewise.
1092         * modules/strstr (configure.ac): Likewise.
1093         * modules/strtok_r (configure.ac): Likewise.
1094
1095 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
1096
1097         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
1098
1099 2007-01-30  Jim Meyering  <jim@meyering.net>
1100
1101         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
1102
1103 2007-01-29  Bruno Haible  <bruno@clisp.org>
1104
1105         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
1106         * lib/execute.c: Likewise.
1107         * lib/pipe.c: Likewise.
1108         * lib/printf-args.h: Likewise.
1109         * lib/printf-args.c: Likewise.
1110         * lib/printf-parse.c: Likewise.
1111         * lib/vasnprintf.c: Likewise.
1112
1113 2007-01-29  Eric Blake  <ebb9@byu.net>
1114
1115         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
1116         declaration.
1117
1118 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
1119
1120         * lib/strptime.h (strptime): Use 'restrict' for args where
1121         POSIX requires this.
1122         * lib/strptime.c (strptime): Likewise.
1123         Change license notice from LGPL to GPL, since gnulib-tool will
1124         change this as needed.
1125         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
1126         defined.
1127         Include "strptime.h" first, to check interface.
1128         Do not #undef _LIBC and _NL_CURRENT.
1129         Do not include <stdlib.h>; no longer needed.
1130         Include "time_r.h" and declare ptime_locale_status
1131         only if _LIBC is not defined.
1132         (__P): Remove unused macro.
1133         (match_string): Bring back glibc version, but use it only if _LIBC
1134         is defined.
1135         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
1136         Remove unnecessary assertion and abort() call.
1137         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
1138         * m4/strptime.m4: Fix serial number comment.
1139         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
1140         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
1141         (Depends-on): Add time_r.
1142
1143 2007-01-29  Bruno Haible  <bruno@clisp.org>
1144
1145         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
1146         strptime.
1147         * modules/strptime (Depends-on): Add stdbool.
1148         * lib/strptime.h: Include <time.h> always. Add comments.
1149
1150 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
1151
1152         * modules/strptime: New file.
1153         * lib/strptime.h: New file.
1154         * lib/strptime.c: New file.
1155         * m4/strptime.m4: New file.
1156
1157 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
1158
1159         * MODULES.html.sh: New module mpsort.
1160         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
1161
1162         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
1163         a circularity problem with HP-UX ia64 reported by Bob Proulx in
1164         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
1165         All uses changed.
1166         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
1167         All uses changed.
1168         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
1169         to _Restrict_.
1170         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
1171         the parameter matches the prototype.
1172
1173 2007-01-28  Jim Meyering  <jim@meyering.net>
1174
1175         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
1176         sys/time.h here, reverting that part of the previous patch:
1177         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
1178
1179 2007-01-28  Bruno Haible  <bruno@clisp.org>
1180
1181         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
1182         value of $(SYS_TIME_H).
1183         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
1184         remove it conditionally, too. [added by Jim Meyering]
1185         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
1186         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
1187         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
1188         GETTIMEOFDAY_REPLACEMENT to 1.
1189
1190 2007-01-28  Bruno Haible  <bruno@clisp.org>
1191
1192         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
1193         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
1194         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
1195         Set UNISTD_H instead of UNISTD_H2.
1196         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
1197
1198 2007-01-28  Bruno Haible  <bruno@clisp.org>
1199
1200         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
1201         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
1202
1203 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1204
1205         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
1206         (func_create_testdir): Ensure C locale for `grep' and `tr'
1207         character ranges.
1208         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
1209         ACLOCAL_AMFLAGS parsing state machine.
1210
1211 2007-01-27  Bruno Haible  <bruno@clisp.org>
1212
1213         * modules/unistr/base: Update.
1214
1215 2007-01-27  Bruno Haible  <bruno@clisp.org>
1216
1217         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
1218         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
1219         * modules/unistr/u32-mbtouc-unsafe: Renamed from
1220         modules/unistr/u32-mbtouc.
1221         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
1222         * lib/unistr.h: Update.
1223         * lib/linebreak.c: Update.
1224         * modules/unistr/u32-mbtouc: Renamed from
1225         modules/unistr/u32-mbtouc-safe.
1226         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
1227         * lib/unistr.h: Update.
1228         * lib/unistr/u32-to-u8.c: Update.
1229         * lib/unistr/u32-to-u16.c: Update.
1230
1231 2007-01-27  Bruno Haible  <bruno@clisp.org>
1232
1233         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
1234         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
1235         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
1236         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
1237         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
1238         * modules/unistr/u16-mbtouc-unsafe: Renamed from
1239         modules/unistr/u16-mbtouc.
1240         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
1241         * lib/unistr.h: Update.
1242         * lib/linebreak.c: Update.
1243         * modules/linebreak: Update.
1244         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
1245         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
1246         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
1247         * modules/unistr/u16-mbtouc: Renamed from
1248         modules/unistr/u16-mbtouc-safe.
1249         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
1250         * lib/unistr.h: Update.
1251         * lib/unistr/u16-to-u8.c: Update.
1252         * modules/unistr/u16-to-u8: Update.
1253         * lib/unistr/u16-to-u32.c: Update.
1254         * modules/unistr/u16-to-u32: Update.
1255
1256 2007-01-27  Bruno Haible  <bruno@clisp.org>
1257
1258         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
1259         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
1260         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
1261         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
1262         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
1263         * modules/unistr/u8-mbtouc-unsafe: Renamed from
1264         modules/unistr/u8-mbtouc.
1265         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
1266         * lib/unistr.h: Update.
1267         * lib/striconveh.c: Update.
1268         * modules/striconveh: Update.
1269         * lib/linebreak.c: Update.
1270         * modules/linebreak: Update.
1271         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
1272         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
1273         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
1274         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
1275         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
1276         * lib/unistr.h: Update.
1277         * lib/striconveh.c: Update.
1278         * modules/striconveh: Update.
1279         * lib/unistr/u8-to-u16.c: Update.
1280         * modules/unistr/u8-to-u16: Update.
1281         * lib/unistr/u8-to-u32.c: Update.
1282         * modules/unistr/u8-to-u32: Update.
1283
1284 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1285
1286         Sync from Libtool.
1287         * lib/argz.c: Do not include strings.h nor memory.h, include
1288         string.h unconditionally.  Patch by Simon Josefsson.
1289
1290 2007-01-27  Bruno Haible  <bruno@clisp.org>
1291
1292         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
1293         from gl_HEADER_STRING_H_BODY.
1294         (gl_HEADER_STRING_H_BODY): Require it.
1295         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
1296         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
1297         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
1298         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
1299         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
1300         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
1301         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
1302         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
1303         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
1304         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
1305         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
1306         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
1307         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
1308         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
1309         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
1310
1311 2007-01-27  Bruno Haible  <bruno@clisp.org>
1312
1313         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
1314         check_PROGRAMS into noinst_PROGRAMS.
1315         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
1316         check_PROGRAMS in this case.
1317         (func_import): Set for_test to false.
1318         (func_create_testdir): Set for_test to true.
1319
1320 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
1321             Bruno Haible  <bruno@clisp.org>
1322
1323         * modules/strcasestr (Files): Remove lib/strcasestr.h.
1324         (Depends-on): Add string.
1325         (Includes): Use <string.h> instead of strcasestr.h.
1326         * modules/string (Makefile.am): Also substitute the value of
1327         REPLACE_STRCASESTR.
1328         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
1329         assume strcasestr is declared in <string.h> not <strings.h>. Also
1330         set REPLACE_STRCASESTR.
1331         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
1332         REPLACE_STRCASESTR.
1333         * lib/strcasestr.h: Remove file.
1334         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
1335         * lib/string_.h (strcasestr): New declaration.
1336
1337 2007-01-27  Bruno Haible  <bruno@clisp.org>
1338
1339         * lib/string_.h: Use 'extern'.
1340
1341 2007-01-27  Jim Meyering  <jim@meyering.net>
1342
1343         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
1344         of set-but-not-used local, "q".
1345
1346         * lib/mempcpy.c: Include <config.h> before <string.h>.
1347         This fixes a compilation error on HP-UX, due to the system's
1348         "restrict"-using mempcpy prototype.
1349
1350 2007-01-26  Bruno Haible  <bruno@clisp.org>
1351
1352         Small optimization.
1353         * lib/javacomp.c: Include c-strstr.h.
1354          (is_envjavac_gcj): Use c_strstr instead of strstr.
1355         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
1356
1357 2007-01-26  Bruno Haible  <bruno@clisp.org>
1358
1359         * MODULES.html.sh (Unicode string functions): Add the new modules.
1360
1361         * modules/uniconv/u32-strconv-to-locale: New file.
1362         * lib/uniconv/u32-strconv-to-locale.c: New file.
1363
1364         * modules/uniconv/u16-strconv-to-locale: New file.
1365         * lib/uniconv/u16-strconv-to-locale.c: New file.
1366
1367         * modules/uniconv/u8-strconv-to-locale: New file.
1368         * lib/uniconv/u8-strconv-to-locale.c: New file.
1369
1370         * modules/uniconv/u32-strconv-from-locale: New file.
1371         * lib/uniconv/u32-strconv-from-locale.c: New file.
1372
1373         * modules/uniconv/u16-strconv-from-locale: New file.
1374         * lib/uniconv/u16-strconv-from-locale.c: New file.
1375
1376         * modules/uniconv/u8-strconv-from-locale: New file.
1377         * lib/uniconv/u8-strconv-from-locale.c: New file.
1378
1379         * modules/uniconv/u32-strconv-to-enc: New file.
1380         * lib/uniconv/u32-strconv-to-enc.c: New file.
1381         * modules/uniconv/u32-strconv-to-enc-tests: New file.
1382         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
1383
1384         * modules/uniconv/u16-strconv-to-enc: New file.
1385         * lib/uniconv/u16-strconv-to-enc.c: New file.
1386         * lib/uniconv/u-strconv-to-enc.h: New file.
1387         * modules/uniconv/u16-strconv-to-enc-tests: New file.
1388         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
1389
1390         * modules/uniconv/u8-strconv-to-enc: New file.
1391         * lib/uniconv/u8-strconv-to-enc.c: New file.
1392         * modules/uniconv/u8-strconv-to-enc-tests: New file.
1393         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
1394
1395         * modules/uniconv/u32-strconv-from-enc: New file.
1396         * lib/uniconv/u32-strconv-from-enc.c: New file.
1397         * modules/uniconv/u32-strconv-from-enc-tests: New file.
1398         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
1399
1400         * modules/uniconv/u16-strconv-from-enc: New file.
1401         * lib/uniconv/u16-strconv-from-enc.c: New file.
1402         * modules/uniconv/u16-strconv-from-enc-tests: New file.
1403         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
1404
1405         * modules/uniconv/u8-strconv-from-enc: New file.
1406         * lib/uniconv/u8-strconv-from-enc.c: New file.
1407         * lib/uniconv/u-strconv-from-enc.h: New file.
1408         * modules/uniconv/u8-strconv-from-enc-tests: New file.
1409         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
1410
1411         * modules/uniconv/u32-conv-from-enc: New file.
1412         * lib/uniconv/u32-conv-from-enc.c: New file.
1413         * modules/uniconv/u32-conv-from-enc-tests: New file.
1414         * tests/uniconv/test-u32-conv-from-enc.c: New file.
1415
1416         * modules/uniconv/u16-conv-from-enc: New file.
1417         * lib/uniconv/u16-conv-from-enc.c: New file.
1418         * lib/uniconv/u-conv-from-enc.h: New file.
1419         * modules/uniconv/u16-conv-from-enc-tests: New file.
1420         * tests/uniconv/test-u16-conv-from-enc.c: New file.
1421
1422         * modules/uniconv/u8-conv-from-enc: New file.
1423         * lib/uniconv/u8-conv-from-enc.c: New file.
1424         * modules/uniconv/u8-conv-from-enc-tests: New file.
1425         * tests/uniconv/test-u8-conv-from-enc.c: New file.
1426
1427         * modules/uniconv/base: New file.
1428         * lib/uniconv.h: New file.
1429
1430 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
1431
1432         * doc/gnulib-tool.texi (Initial import): Update to match current
1433         behavior with strdup module.
1434         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
1435         * lib/memmem.h: Remove; all uses removed.  This is now done
1436         by <string.h>.
1437         * lib/mempcpy.h: Likewise.
1438         * lib/memrchr.h: Likewise.
1439         * lib/stpcpy.h: Likewise.
1440         * lib/stpncpy.h: Likewise.
1441         * lib/strcase.h: Likewise.
1442         * lib/strchrnul.h: Likewise.
1443         * lib/strdup.h: Likewise.
1444         * lib/strndup.h: Likewise.
1445         * lib/strnlen.h: Likewise.
1446         * lib/strpbrk.h: Likewise.
1447         * lib/strsep.h: Likewise.
1448         * lib/strstr.h: Likewise.
1449         * lib/strtok_r.h: Likewise.
1450         * lib/string_.h: New file.
1451         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
1452         Rely on <string.h> instead.
1453         * lib/canon-host.c: Likewise.
1454         * lib/chdir-long.c: Likewise.
1455         * lib/concatpath.c: Likewise.
1456         * lib/exclude.c: Likewise.
1457         * lib/fchdir.c: Likewise.
1458         * lib/getaddrinfo.c: Likewise.
1459         * lib/getcwd.c: Likewise.
1460         * lib/getsubopt.c: Likewise.
1461         * lib/glob.c: Likewise.
1462         * lib/hard-locale.c: Likewise.
1463         * lib/iconvme.c: Likewise.
1464         * lib/javacomp.c: Likewise.
1465         * lib/mempcpy.c: Likewise.
1466         * lib/memrchr.c: Likewise.
1467         * lib/regex_internal.h: Likewise.
1468         * lib/stpncpy.c: Likewise.
1469         * lib/strcasecmp.c: Likewise.
1470         * lib/strchrnul.c: Likewise.
1471         * lib/strdup.c: Likewise.
1472         * lib/striconv.c: Likewise.
1473         * lib/striconveh.c: Likewise.
1474         * lib/striconveha.c: Likewise.
1475         * lib/strncasecmp.c: Likewise.
1476         * lib/strndup.c: Likewise.
1477         * lib/strnlen.c: Likewise.
1478         * lib/strsep.c: Likewise.
1479         * lib/strstr.c: Likewise.
1480         * lib/strtok_r.c: Likewise.
1481         * lib/userspec.c: Likewise.
1482         * lib/w32spawn.h: Likewise.
1483         * lib/xstrndup.c: Likewise.
1484         * lib/mountlist.c (strstr): Remove decl.
1485         * m4/string_h.m4: New file.
1486         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
1487         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
1488         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
1489         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
1490         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
1491         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
1492         Set REPLACE_STRCASECMP if necessary.
1493         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
1494         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
1495         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
1496         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
1497         HAVE_DECL_STRDUP if necessary.
1498         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
1499         since gl_FUNC_STRNDUP does that now.
1500         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
1501         Check for decl here...
1502         (gl_PREREQ_STRNLEN): ... not here.
1503         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
1504         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
1505         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
1506         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
1507         necessary.
1508         * modules/string: New file.
1509         * modules/memmem (Files): Remove special-purpose include file.
1510         (Depends-on): Add string.
1511         (Include): Include <string.h>, not the removed file.
1512         * modules/mempcpy: Likewise.
1513         * modules/memrchr: Likewise.
1514         * modules/stpcpy: Likewise.
1515         * modules/stpncpy: Likewise.
1516         * modules/strcase: Likewise.
1517         * modules/strchrnul: Likewise.
1518         * modules/strdup: Likewise.
1519         * modules/strndup: Likewise.
1520         * modules/strnlen: Likewise.
1521         * modules/strpbrk: Likewise.
1522         * modules/strsep: Likewise.
1523         * modules/strstr: Likewise.
1524         * modules/strtok_r: Likewise.
1525         * tests/test-dirname.c: Don't include "strdup.h", since
1526         <string.h> now suffices.
1527         * tests/test-memmem.c: Don't include "memmem.h", since
1528         <string.h> now suffices.
1529
1530 2007-01-25  Bruno Haible  <bruno@clisp.org>
1531
1532         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
1533         *resultp is 0.
1534
1535         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
1536         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
1537         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
1538         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
1539
1540         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
1541         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
1542         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
1543         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
1544         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
1545         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
1546
1547 2007-01-24  Bruno Haible  <bruno@clisp.org>
1548
1549         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
1550         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
1551         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
1552         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
1553         gl_FUNC_FTS_CORE.
1554         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
1555         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
1556         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
1557         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
1558         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
1559         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
1560         gl_FUNC_FCHOWNAT.
1561         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
1562         gl_FUNC_STRFTIME.
1563         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
1564         Reported by Ralf Wildenhues.
1565
1566 2007-01-24  Bruno Haible  <bruno@clisp.org>
1567
1568         Drop AC_REQUIRE calls that are redundant with the module dependencies.
1569         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
1570         gl_GETADDRINFO.
1571         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
1572         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
1573         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
1574
1575 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
1576
1577         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
1578         Don't use 'exit'; just return from 'main'.
1579         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
1580
1581         * lib/fnmatch_.h: Readjust white space and comments to match
1582         glibc, to avoid spurious diffs.
1583
1584 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
1585
1586         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
1587         2004-12-01 change by Jakub Jelinek, since this code won't compile
1588         if !LIBC.  Problem reported by Bob Proulx.
1589
1590 2007-01-23  Bruno Haible  <bruno@clisp.org>
1591
1592         * lib/striconveh.c: Include c-strcaseeq.h.
1593         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
1594         * modules/striconveh (Depends-on): Add c-strcaseeq.
1595
1596 2007-01-23  Bruno Haible  <bruno@clisp.org>
1597
1598         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
1599
1600         * modules/c-strcaseeq: New file.
1601         * lib/c-strcaseeq.h: New file.
1602
1603         * modules/streq: New file.
1604         * lib/streq.h: New file.
1605
1606 2007-01-23  Bruno Haible  <bruno@clisp.org>
1607
1608         * modules/striconveha-tests: New file.
1609         * tests/test-striconveha.c: New file.
1610
1611         * lib/striconveha.h: Include <stdbool.h>.
1612         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
1613         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
1614         (mem_iconveha_notranslit): Renamed from mem_iconveha.
1615         (mem_iconveha): New function.
1616         (str_iconveha_notranslit): Renamed from str_iconveha.
1617         (str_iconveha): New function.
1618         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
1619         c-strcase.
1620
1621 2007-01-23  Bruno Haible  <bruno@clisp.org>
1622
1623         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
1624         encodings without forgiving before trying any encoding with handler.
1625         (str_iconveha): Try all encodings without forgiving before trying any
1626         encoding with handler.
1627
1628 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
1629
1630         Import the following changes from libc.
1631
1632         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
1633
1634         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
1635
1636         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
1637
1638         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
1639         normal_bracket label.
1640
1641         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
1642
1643         [BZ #361]
1644         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
1645         to normal_bracket after fetching the next character.
1646
1647 2007-01-22  Bruno Haible  <bruno@clisp.org>
1648
1649         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
1650         argument.
1651         * lib/striconveh.c (iconv_carefully_1): New function.
1652         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
1653         argument.
1654         (str_cd_iconveh): Update.
1655         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
1656         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
1657         * tests/test-striconveh.c (MAGIC): New macro.
1658         (new_offsets): New function.
1659         (main): Test call with and without offsets.
1660
1661 2007-01-22  Bruno Haible  <bruno@clisp.org>
1662
1663         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
1664         * modules/sys_select (Makefile.am): Likewise.
1665         * modules/sys_socket (Makefile.am): Likewise.
1666         * modules/sys_time (Makefile.am): Likewise.
1667
1668 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
1669
1670         * modules/gettimeofday (License): Change from GPL to LGPL, since
1671         gettimeofday is a library function.
1672
1673 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1674
1675         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
1676
1677 2007-01-21  Bruno Haible  <bruno@clisp.org>
1678
1679         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
1680
1681 2007-01-21  Bruno Haible  <bruno@clisp.org>
1682
1683         * modules/striconveha: New file.
1684         * lib/striconveha.h: New file.
1685         * lib/striconveha.c: New file.
1686         * MODULES.html.sh (Internationalization functions): Add striconveha.
1687         * lib/striconv.c (str_iconv): Optimize the case of an empty input
1688         string.
1689         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
1690
1691 2007-01-21  Bruno Haible  <bruno@clisp.org>
1692
1693         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
1694         * lib/striconveh.c (str_iconveh): Likewise.
1695
1696 2007-01-21  Bruno Haible  <bruno@clisp.org>
1697
1698         * lib/striconveh.h (mem_iconveh): New declaration.
1699         * lib/striconveh.c (mem_iconveh): New function.
1700         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
1701
1702 2007-01-21  Bruno Haible  <bruno@clisp.org>
1703
1704         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
1705
1706         * lib/striconveh.h (mem_cd_iconveh): Change specification.
1707         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
1708         original result buffer.
1709         (str_cd_iconveh): Update.
1710         * tests/test-striconveh.c (main): Update.
1711
1712         * lib/striconv.h (mem_cd_iconv): Change specification.
1713         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
1714         result buffer.
1715         (str_cd_iconv): Update.
1716         * tests/test-striconv.c (main): Update.
1717
1718 2007-01-21  Bruno Haible  <bruno@clisp.org>
1719
1720         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
1721
1722 2007-01-20  Jim Meyering  <jim@meyering.net>
1723
1724         * lib/userspec.c (parse_with_separator): If a user or group string
1725         starts with "+", skip the corresponding name-to-ID look-up, since
1726         such a look-up must fail: user and group names may not include "+".
1727
1728 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
1729
1730         * lib/poll.c: Include sys/time.h and time.h unconditionally,
1731         since we now assume the sys_time module.
1732         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
1733         check for sys/time.h; no longer needed.
1734         * modules/poll (Depends-on): Depend on sys_time.
1735
1736 2007-01-18  Bruno Haible  <bruno@clisp.org>
1737
1738         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
1739         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
1740
1741         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
1742         gettimeofday.
1743
1744         * tests/test-gettimeofday.c: Include <time.h>.
1745         (dummy): Remove variable.
1746
1747         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
1748         gl_HEADER_SYS_TIME_H.
1749         (gl_HEADER_SYS_TIME_H): New macro.
1750
1751         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
1752         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1753         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
1754         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
1755         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1756         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
1757         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
1758         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1759         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
1760         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
1761         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1762
1763         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
1764         last change; it caused a compilation error when cross-compiling to
1765         Cygwin.
1766
1767 2007-01-18  Jim Meyering  <jim@meyering.net>
1768
1769         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
1770         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
1771         than the race-prone "test -d sys || mkdir sys".
1772         (configure.ac): Use AC_PROG_MKDIR_P.
1773         * modules/sys_select: Likewise.
1774         * modules/sys_socket: Likewise.
1775         * modules/sys_time: Likewise.
1776
1777 2007-01-18  Eric Blake  <ebb9@byu.net>
1778
1779         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
1780         replace gettimeofday.
1781         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
1782         name, to avoid infinite recursion.
1783
1784 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
1785
1786         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
1787         module sys_time.
1788         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
1789         assume timespec.h defines struct timeval.
1790         * lib/settime.c: Likewise.
1791         * lib/utimens.c: Likewise.
1792         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
1793         since we now assume the gettimeofday module.
1794         * lib/tempname.c (__gen_tempname): Likewise.
1795         * lib/gettimeofday.h: Remove.
1796         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
1797         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
1798         Include <time.h>, for 'time()'.
1799         (localtime_buffer_addr): Also use this workaround if
1800         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
1801         to simplify the uses.  All uses changed.
1802         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
1803         that #undef is inside {}, and 'const' follows type name consistently.
1804         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
1805         (gettimeofday): Do not use the maximum possible value for
1806         tv->tv_usec, since that might break usages other than ls.c.
1807         Instead, we'll leave ls.c alone.  This undoes today's patch
1808         by Bruno.  Add a compile-time warning for 1s-clock resolution;
1809         we've never observed the problem but might as well keep the
1810         canary.
1811         * lib/nanosleep.c: Include timespec.h first, for interface check.
1812         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
1813         now assume the sys_time module.
1814         * lib/tempname.c: Likewise.
1815         * lib/timespec.h: Likewise.
1816         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
1817         needed.
1818         * lib/strftime.c: Likewise.
1819         * lib/timespec.h: Likewise.
1820         * lib/posixtm.c: Include posixtm.h first, for interface check.
1821         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
1822         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
1823         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
1824         * lib/sys_time_.h: New file.
1825         * lib/timespec.h (struct timespec): Use long int, not long.
1826         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
1827         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
1828         Remove obsolescent call to AC_HEADER_TIME.
1829         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
1830         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
1831         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
1832         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
1833         Likewise.
1834         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
1835         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
1836         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
1837         into the sys_time module.  Check for gettimeofday just once.
1838         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
1839         for gettimeofday signature to just check the signature.  Merely
1840         compile it, since linking doesn't test signature.  Improve test for
1841         whether gettimeofday.o is actually needed.
1842         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
1843         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
1844         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
1845         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1846         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
1847         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
1848         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
1849         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
1850         than worrying about sys/time.h.
1851         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
1852         Don't bother worrying about TIME_WITH_SYS_TIME.
1853         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
1854         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
1855         * m4/sys_time_h.m4: New file.
1856         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
1857         Don't include sys/time.h.  Return from main rather than exiting.
1858         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
1859         all uses changed.
1860         * modules/gethrxtime (Depends-on): Add sys_time.
1861         * modules/gettime (Depends-on): Likewise.
1862         * modules/gettimeofday (Depends-on): Likewise.
1863         * modules/nanosleep (Depends-on): Likewise.
1864         * modules/settime (Depends-on): Likewise.
1865         * modules/tempname (Depends-on): Likewise.
1866         * modules/utimens (Depends-on): Likewise.
1867         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
1868         (Include:) Change back to <sys/time.h>.
1869         (Maintainer:) Add self.
1870         * modules/sys_time: New file.
1871         * modules/tempname (Depends-on): Add gettimeofday.
1872         * tests/test-gettimeofday.c: Include <sys/time.h>
1873         rather than gettimeofday.h.
1874
1875 2007-01-17  Bruno Haible  <bruno@clisp.org>
1876
1877         * gnulib-tool (func_get_license): Revert last patch. Instead, let
1878         the license default to GPL.
1879         (func_create_testdir): Don't complain if a module is LGPL and its
1880         tests module depends on GPLed modules.
1881
1882 2007-01-17  Bruno Haible  <bruno@clisp.org>
1883
1884         * lib/gettimeofday.c (gettimeofday): Add code for the case
1885         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
1886         maximum possible value for tv->tv_usec, rather than the minimum one.
1887
1888 2005-10-08  Martin Lambers  <marlam@marlam.de>
1889 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
1890 2007-01-16  Bruno Haible  <bruno@clisp.org>
1891
1892         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
1893         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
1894         gl_FUNC_GETTIMEOFDAY.
1895         (Include): Add gettimeofday.h.
1896         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
1897         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
1898         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
1899         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
1900         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
1901         * lib/gettimeofday.h: New file.
1902         * lib/gettimeofday.c: Include <sys/timeb.h>.
1903         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
1904         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1905         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
1906         fall back on time().
1907
1908         * tests/test-gettimeofday.c: New file.
1909         * modules/gettimeofday-tests: New file.
1910
1911 2007-01-16  Eric Blake  <ebb9@byu.net>
1912
1913         * modules/fnmatch (Depends-on): Depend on wchar.
1914         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
1915         * m4/fnmatch.m4: Likewise.
1916         * modules/mbchar (Makefile.am): Assume <wchar.h>.
1917         * m4/mbchar.m4: Likewise.
1918         * modules/mbswidth (Depends-on): Depend on wchar.
1919         * lib/mbswidth.c: Assume <wchar.h>.
1920         * m4/mbswidth.m4: Likewise.
1921         * modules/quotearg (Depends-on): Depend on wchar.
1922         * lib/quotearg.c: Assume <wchar.h>.
1923         * m4/quotearg.m4: Likewise.
1924         * modules/regex (Depends-on): Depend on wchar.
1925         * lib/regex_internal.h: Assume <wchar.h>.
1926         * m4/regex.m4: Likewise.
1927         * modules/stdint (Depends-on): Depend on wchar.
1928         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
1929         * m4/stdint.m4: Likewise.
1930         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
1931         * modules/strftime (Depends-on): Depend on wchar.
1932         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
1933         * modules/strtol (Depends-on): Depend on wchar.
1934         * lib/strtol.c: Assume <wchar.h>.
1935         * modules/wcwidth (Depends-on): Depend on wchar.
1936         * lib/wcwidth.h: Assume <wchar.h>.
1937         * m4/wcwidth.m4: Likewise.
1938
1939 2007-01-16  Bruno Haible  <bruno@clisp.org>
1940
1941         * modules/csharpexec-script: New, created from...
1942         * modules/csharpexec: ... this.
1943
1944 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
1945
1946         * modules/javaexec-script: New, created from...
1947         * modules/javaexec: ... this.
1948
1949 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1950
1951         * modules/poll (Dependencies): Add sys_select.
1952
1953 2007-01-15  Jim Meyering  <jim@meyering.net>
1954
1955         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
1956         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
1957         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
1958         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
1959
1960 2007-01-15  Bruno Haible  <bruno@clisp.org>
1961
1962         * modules/striconveh: New file.
1963         * lib/striconveh.h: New file.
1964         * lib/striconveh.c: New file.
1965         * MODULES.html.sh (Internationalization functions): Add striconveh.
1966
1967         * modules/striconveh-tests: New file.
1968         * tests/test-striconveh.c: New file.
1969
1970 2007-01-15  Bruno Haible  <bruno@clisp.org>
1971
1972         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
1973         not from GNU libiconv or GNU libc.
1974
1975 2007-01-15  Bruno Haible  <bruno@clisp.org>
1976
1977         * doc/gnulib-intro.texi (Copyright): Explain the different license
1978         terms for module descriptions, autoconf macros, tests, documentation.
1979
1980 2007-01-14  Bruno Haible  <bruno@clisp.org>
1981
1982         * modules/striconv-tests: New file.
1983         * tests/test-striconv.c: New file.
1984
1985 2007-01-14  Bruno Haible  <bruno@clisp.org>
1986
1987         * modules/iconv-tests: New file.
1988         * tests/test-iconv.c: New file.
1989
1990 2007-01-14  Bruno Haible  <bruno@clisp.org>
1991
1992         * gnulib-tool (func_get_license): For test modules, use the license of
1993         the main module.
1994
1995 2007-01-14  Bruno Haible  <bruno@clisp.org>
1996
1997         * modules/iconv (Include): Clarify that <iconv.h> can only be included
1998         if iconv is found to exist.
1999
2000 2007-01-14  Bruno Haible  <bruno@clisp.org>
2001
2002         * modules/c-ctype-tests: New file.
2003         * tests/test-c-ctype.c: New file.
2004
2005 2007-01-14  Bruno Haible  <bruno@clisp.org>
2006
2007         * modules/binary-io-tests: New file.
2008         * tests/test-binary-io.sh: New file.
2009         * tests/test-binary-io.c: New file.
2010
2011 2007-01-14  Bruno Haible  <bruno@clisp.org>
2012
2013         * modules/array-oset-tests: New file.
2014         * tests/test-array_oset.c: New file.
2015
2016 2007-01-14  Bruno Haible  <bruno@clisp.org>
2017
2018         * modules/array-list-tests: New file.
2019         * tests/test-array_list.c: New file.
2020
2021 2007-01-14  Bruno Haible  <bruno@clisp.org>
2022
2023         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
2024         and make.
2025         Reported by Simon Josefsson in
2026         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
2027
2028 2007-01-14  Bruno Haible  <bruno@clisp.org>
2029
2030         * modules/allocsa-tests: New file.
2031         * tests/test-allocsa.c: New file.
2032
2033 2007-01-14  Bruno Haible  <bruno@clisp.org>
2034
2035         * modules/fchdir (Depends-on): Add absolute-header.
2036         * modules/unistd (Depends-on): Likewise.
2037
2038 2006-12-30  Bruno Haible  <bruno@clisp.org>
2039
2040         * modules/fchdir: New file.
2041         * modules/unistd (Files): Add lib/unistd_.h.
2042         (Makefile.am): Generate unistd.h from unistd_.h.
2043         * lib/fchdir.c: New file.
2044         * lib/dirent_.h: New file.
2045         * lib/unistd_.h: New file.
2046         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
2047         * m4/fchdir.m4: New file.
2048         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
2049         (gl_HEADER_UNISTD): Invoke it.
2050         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
2051         function.
2052         * lib/backupfile.c (opendir, closedir): Undefine.
2053         * lib/chown.c (open, close): Undefine.
2054         * lib/clean-temp.c (open, close): Undefine.
2055         * lib/copy-file.c (open, close): Undefine.
2056         * lib/execute.c (open, close): Undefine.
2057         * lib/fsusage.c (open, close): Undefine.
2058         * lib/gc-gnulib.c (open, close): Undefine.
2059         * lib/getcwd.c (opendir, closedir): Undefine.
2060         * lib/glob.c (opendir, closedir): Undefine.
2061         * lib/javacomp.c (open, close): Undefine.
2062         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
2063         * lib/openat-proc.c (open, close): Undefine.
2064         * lib/pagealign_alloc.c (open, close): Undefine.
2065         * lib/pipe.c (open, close): Undefine.
2066         * lib/progreloc.c (open, close): Undefine.
2067         * lib/savedir.c (opendir, closedir): Undefine.
2068         * lib/utime.c (open, close): Undefine.
2069         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
2070
2071 2007-01-10  Bruno Haible  <bruno@clisp.org>
2072
2073         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
2074
2075 2007-01-12  Eric Blake  <ebb9@byu.net>
2076
2077         Provide a robust <wchar.h>.  Further simplifications are now
2078         possible in other modules, but not included here.
2079         * modules/wchar: New module.
2080         * m4/wchar.m4: New file.
2081         * lib/wchar_.h: Likewise.
2082         * modules/mbchar (Depends-on): Depend on wchar, as the first use
2083         of the new module.
2084         * MODULES.html.sh (Extended multibyte and wide character utilities):
2085         New section.
2086
2087 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
2088
2089         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
2090         to a reasonable default for memory allocation.
2091         (xreadlink): Don't allocate a huge buffer, to work around a buggy
2092         file system that reports garbage st_size values for symlinks.
2093         Problem reported by Liyang Hu.
2094
2095 2007-01-11  Simon Josefsson  <simon@josefsson.org>
2096
2097         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
2098         Emacs .#* auto-save files).
2099
2100 2007-01-11  Bruno Haible  <bruno@clisp.org>
2101
2102         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
2103         directory.
2104
2105 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
2106
2107         Use @...@ consistently in lib/wctype_.h.
2108         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
2109         on it being set to 1 or 0.
2110         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
2111         go back to AC_SUBSTing it.
2112         * modules/wctype (Makefile.am): Undo previous change.
2113
2114 2007-01-10  Eric Blake  <ebb9@byu.net>
2115
2116         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
2117         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
2118         * modules/wctype (Makefile.am): Likewise.
2119         Reported by Chris McGuire.
2120
2121 2007-01-10  Jim Meyering  <jim@meyering.net>
2122
2123         fts.c: a small readability/maintainability improvement
2124         * lib/fts.c (fts_read): Make this code slightly more readable and
2125         maintainable by hoisting the "sp->fts_cur = p" assignments to
2126         immediately follow the statements that set P.  Derived from
2127         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
2128
2129 2007-01-10  Eric Blake  <ebb9@byu.net>
2130
2131         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
2132         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
2133         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
2134         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
2135         Reported by Chris McGuire.
2136
2137 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2138
2139         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
2140         in sed script.
2141
2142 2007-01-09  Bruno Haible  <bruno@clisp.org>
2143
2144         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
2145         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
2146         variables.
2147         (func_module): Use them.
2148
2149 2007-01-09  Bruno Haible  <bruno@clisp.org>
2150
2151         * modules/unistr/base: New file.
2152         * lib/unistr.h: New file.
2153
2154         * modules/unistr/u8-to-u16: New file.
2155         * lib/unistr/u8-to-u16.c: New file.
2156
2157         * modules/unistr/u8-to-u32: New file.
2158         * lib/unistr/u8-to-u32.c: New file.
2159
2160         * modules/unistr/u16-to-u8: New file.
2161         * lib/unistr/u16-to-u8.c: New file.
2162
2163         * modules/unistr/u16-to-u32: New file.
2164         * lib/unistr/u16-to-u32.c: New file.
2165
2166         * modules/unistr/u32-to-u8: New file.
2167         * lib/unistr/u32-to-u8.c: New file.
2168
2169         * modules/unistr/u32-to-u16: New file.
2170         * lib/unistr/u32-to-u16.c: New file.
2171
2172         * modules/unistr/u8-check: New file.
2173         * modules/unistr/u16-check: New file.
2174         * modules/unistr/u32-check: New file.
2175         * lib/unistr/u8-check.c: New file.
2176         * lib/unistr/u16-check.c: New file.
2177         * lib/unistr/u32-check.c: New file.
2178
2179         * modules/unistr/u8-chr: New file.
2180         * modules/unistr/u16-chr: New file.
2181         * modules/unistr/u32-chr: New file.
2182         * lib/unistr/u8-chr.c: New file.
2183         * lib/unistr/u16-chr.c: New file.
2184         * lib/unistr/u32-chr.c: New file.
2185
2186         * modules/unistr/u8-cmp: New file.
2187         * modules/unistr/u16-cmp: New file.
2188         * modules/unistr/u32-cmp: New file.
2189         * lib/unistr/u8-cmp.c: New file.
2190         * lib/unistr/u16-cmp.c: New file.
2191         * lib/unistr/u32-cmp.c: New file.
2192
2193         * modules/unistr/u8-cpy: New file.
2194         * modules/unistr/u16-cpy: New file.
2195         * modules/unistr/u32-cpy: New file.
2196         * lib/unistr/u8-cpy.c: New file.
2197         * lib/unistr/u16-cpy.c: New file.
2198         * lib/unistr/u32-cpy.c: New file.
2199         * lib/unistr/u-cpy.h: New file.
2200
2201         * modules/unistr/u8-cpy-alloc: New file.
2202         * modules/unistr/u16-cpy-alloc: New file.
2203         * modules/unistr/u32-cpy-alloc: New file.
2204         * lib/unistr/u8-cpy-alloc.c: New file.
2205         * lib/unistr/u16-cpy-alloc.c: New file.
2206         * lib/unistr/u32-cpy-alloc.c: New file.
2207         * lib/unistr/u-cpy-alloc.h: New file.
2208
2209         * modules/unistr/u8-endswith: New file.
2210         * modules/unistr/u16-endswith: New file.
2211         * modules/unistr/u32-endswith: New file.
2212         * lib/unistr/u8-endswith.c: New file.
2213         * lib/unistr/u16-endswith.c: New file.
2214         * lib/unistr/u32-endswith.c: New file.
2215         * lib/unistr/u-endswith.h: New file.
2216
2217         * modules/unistr/u8-mblen: New file.
2218         * modules/unistr/u16-mblen: New file.
2219         * modules/unistr/u32-mblen: New file.
2220         * lib/unistr/u8-mblen.c: New file.
2221         * lib/unistr/u16-mblen.c: New file.
2222         * lib/unistr/u32-mblen.c: New file.
2223
2224         * modules/unistr/u8-mbtouc: New file.
2225         * modules/unistr/u16-mbtouc: New file.
2226         * modules/unistr/u32-mbtouc: New file.
2227         * lib/unistr/u8-mbtouc.c: New file.
2228         * lib/unistr/u16-mbtouc.c: New file.
2229         * lib/unistr/u32-mbtouc.c: New file.
2230
2231         * modules/unistr/u8-mbtouc-safe: New file.
2232         * modules/unistr/u16-mbtouc-safe: New file.
2233         * modules/unistr/u32-mbtouc-safe: New file.
2234         * lib/unistr/u8-mbtouc-safe.c: New file.
2235         * lib/unistr/u16-mbtouc-safe.c: New file.
2236         * lib/unistr/u32-mbtouc-safe.c: New file.
2237
2238         * modules/unistr/u8-move: New file.
2239         * modules/unistr/u16-move: New file.
2240         * modules/unistr/u32-move: New file.
2241         * lib/unistr/u8-move.c: New file.
2242         * lib/unistr/u16-move.c: New file.
2243         * lib/unistr/u32-move.c: New file.
2244         * lib/unistr/u-move.h: New file.
2245
2246         * modules/unistr/u8-next: New file.
2247         * modules/unistr/u16-next: New file.
2248         * modules/unistr/u32-next: New file.
2249         * lib/unistr/u8-next.c: New file.
2250         * lib/unistr/u16-next.c: New file.
2251         * lib/unistr/u32-next.c: New file.
2252
2253         * modules/unistr/u8-prev: New file.
2254         * modules/unistr/u16-prev: New file.
2255         * modules/unistr/u32-prev: New file.
2256         * lib/unistr/u8-prev.c: New file.
2257         * lib/unistr/u16-prev.c: New file.
2258         * lib/unistr/u32-prev.c: New file.
2259
2260         * modules/unistr/u8-set: New file.
2261         * modules/unistr/u16-set: New file.
2262         * modules/unistr/u32-set: New file.
2263         * lib/unistr/u8-set.c: New file.
2264         * lib/unistr/u16-set.c: New file.
2265         * lib/unistr/u32-set.c: New file.
2266         * lib/unistr/u-set.h: New file.
2267
2268         * modules/unistr/u8-startswith: New file.
2269         * modules/unistr/u16-startswith: New file.
2270         * modules/unistr/u32-startswith: New file.
2271         * lib/unistr/u8-startswith.c: New file.
2272         * lib/unistr/u16-startswith.c: New file.
2273         * lib/unistr/u32-startswith.c: New file.
2274         * lib/unistr/u-startswith.h: New file.
2275
2276         * modules/unistr/u8-stpcpy: New file.
2277         * modules/unistr/u16-stpcpy: New file.
2278         * modules/unistr/u32-stpcpy: New file.
2279         * lib/unistr/u8-stpcpy.c: New file.
2280         * lib/unistr/u16-stpcpy.c: New file.
2281         * lib/unistr/u32-stpcpy.c: New file.
2282         * lib/unistr/u-stpcpy.h: New file.
2283
2284         * modules/unistr/u8-stpncpy: New file.
2285         * modules/unistr/u16-stpncpy: New file.
2286         * modules/unistr/u32-stpncpy: New file.
2287         * lib/unistr/u8-stpncpy.c: New file.
2288         * lib/unistr/u16-stpncpy.c: New file.
2289         * lib/unistr/u32-stpncpy.c: New file.
2290         * lib/unistr/u-stpncpy.h: New file.
2291
2292         * modules/unistr/u8-strcat: New file.
2293         * modules/unistr/u16-strcat: New file.
2294         * modules/unistr/u32-strcat: New file.
2295         * lib/unistr/u8-strcat.c: New file.
2296         * lib/unistr/u16-strcat.c: New file.
2297         * lib/unistr/u32-strcat.c: New file.
2298         * lib/unistr/u-strcat.h: New file.
2299
2300         * modules/unistr/u8-strchr: New file.
2301         * modules/unistr/u16-strchr: New file.
2302         * modules/unistr/u32-strchr: New file.
2303         * lib/unistr/u8-strchr.c: New file.
2304         * lib/unistr/u16-strchr.c: New file.
2305         * lib/unistr/u32-strchr.c: New file.
2306
2307         * modules/unistr/u8-strcmp: New file.
2308         * modules/unistr/u16-strcmp: New file.
2309         * modules/unistr/u32-strcmp: New file.
2310         * lib/unistr/u8-strcmp.c: New file.
2311         * lib/unistr/u16-strcmp.c: New file.
2312         * lib/unistr/u32-strcmp.c: New file.
2313
2314         * modules/unistr/u8-strcpy: New file.
2315         * modules/unistr/u16-strcpy: New file.
2316         * modules/unistr/u32-strcpy: New file.
2317         * lib/unistr/u8-strcpy.c: New file.
2318         * lib/unistr/u16-strcpy.c: New file.
2319         * lib/unistr/u32-strcpy.c: New file.
2320         * lib/unistr/u-strcpy.h: New file.
2321
2322         * modules/unistr/u8-strcspn: New file.
2323         * modules/unistr/u16-strcspn: New file.
2324         * modules/unistr/u32-strcspn: New file.
2325         * lib/unistr/u8-strcspn.c: New file.
2326         * lib/unistr/u16-strcspn.c: New file.
2327         * lib/unistr/u32-strcspn.c: New file.
2328         * lib/unistr/u-strcspn.h: New file.
2329
2330         * modules/unistr/u8-strdup: New file.
2331         * modules/unistr/u16-strdup: New file.
2332         * modules/unistr/u32-strdup: New file.
2333         * lib/unistr/u8-strdup.c: New file.
2334         * lib/unistr/u16-strdup.c: New file.
2335         * lib/unistr/u32-strdup.c: New file.
2336         * lib/unistr/u-strdup.h: New file.
2337
2338         * modules/unistr/u8-strlen: New file.
2339         * modules/unistr/u16-strlen: New file.
2340         * modules/unistr/u32-strlen: New file.
2341         * lib/unistr/u8-strlen.c: New file.
2342         * lib/unistr/u16-strlen.c: New file.
2343         * lib/unistr/u32-strlen.c: New file.
2344         * lib/unistr/u-strlen.h: New file.
2345
2346         * modules/unistr/u8-strmblen: New file.
2347         * modules/unistr/u16-strmblen: New file.
2348         * modules/unistr/u32-strmblen: New file.
2349         * lib/unistr/u8-strmblen.c: New file.
2350         * lib/unistr/u16-strmblen.c: New file.
2351         * lib/unistr/u32-strmblen.c: New file.
2352
2353         * modules/unistr/u8-strmbtouc: New file.
2354         * modules/unistr/u16-strmbtouc: New file.
2355         * modules/unistr/u32-strmbtouc: New file.
2356         * lib/unistr/u8-strmbtouc.c: New file.
2357         * lib/unistr/u16-strmbtouc.c: New file.
2358         * lib/unistr/u32-strmbtouc.c: New file.
2359
2360         * modules/unistr/u8-strncat: New file.
2361         * modules/unistr/u16-strncat: New file.
2362         * modules/unistr/u32-strncat: New file.
2363         * lib/unistr/u8-strncat.c: New file.
2364         * lib/unistr/u16-strncat.c: New file.
2365         * lib/unistr/u32-strncat.c: New file.
2366         * lib/unistr/u-strncat.h: New file.
2367
2368         * modules/unistr/u8-strncmp: New file.
2369         * modules/unistr/u16-strncmp: New file.
2370         * modules/unistr/u32-strncmp: New file.
2371         * lib/unistr/u8-strncmp.c: New file.
2372         * lib/unistr/u16-strncmp.c: New file.
2373         * lib/unistr/u32-strncmp.c: New file.
2374
2375         * modules/unistr/u8-strncpy: New file.
2376         * modules/unistr/u16-strncpy: New file.
2377         * modules/unistr/u32-strncpy: New file.
2378         * lib/unistr/u8-strncpy.c: New file.
2379         * lib/unistr/u16-strncpy.c: New file.
2380         * lib/unistr/u32-strncpy.c: New file.
2381         * lib/unistr/u-strncpy.h: New file.
2382
2383         * modules/unistr/u8-strnlen: New file.
2384         * modules/unistr/u16-strnlen: New file.
2385         * modules/unistr/u32-strnlen: New file.
2386         * lib/unistr/u8-strnlen.c: New file.
2387         * lib/unistr/u16-strnlen.c: New file.
2388         * lib/unistr/u32-strnlen.c: New file.
2389         * lib/unistr/u-strnlen.h: New file.
2390
2391         * modules/unistr/u8-strpbrk: New file.
2392         * modules/unistr/u16-strpbrk: New file.
2393         * modules/unistr/u32-strpbrk: New file.
2394         * lib/unistr/u8-strpbrk.c: New file.
2395         * lib/unistr/u16-strpbrk.c: New file.
2396         * lib/unistr/u32-strpbrk.c: New file.
2397         * lib/unistr/u-strpbrk.h: New file.
2398
2399         * modules/unistr/u8-strrchr: New file.
2400         * modules/unistr/u16-strrchr: New file.
2401         * modules/unistr/u32-strrchr: New file.
2402         * lib/unistr/u8-strrchr.c: New file.
2403         * lib/unistr/u16-strrchr.c: New file.
2404         * lib/unistr/u32-strrchr.c: New file.
2405
2406         * modules/unistr/u8-strspn: New file.
2407         * modules/unistr/u16-strspn: New file.
2408         * modules/unistr/u32-strspn: New file.
2409         * lib/unistr/u8-strspn.c: New file.
2410         * lib/unistr/u16-strspn.c: New file.
2411         * lib/unistr/u32-strspn.c: New file.
2412         * lib/unistr/u-strspn.h: New file.
2413
2414         * modules/unistr/u8-strstr: New file.
2415         * modules/unistr/u16-strstr: New file.
2416         * modules/unistr/u32-strstr: New file.
2417         * lib/unistr/u8-strstr.c: New file.
2418         * lib/unistr/u16-strstr.c: New file.
2419         * lib/unistr/u32-strstr.c: New file.
2420         * lib/unistr/u-strstr.h: New file.
2421
2422         * modules/unistr/u8-strtok: New file.
2423         * modules/unistr/u16-strtok: New file.
2424         * modules/unistr/u32-strtok: New file.
2425         * lib/unistr/u8-strtok.c: New file.
2426         * lib/unistr/u16-strtok.c: New file.
2427         * lib/unistr/u32-strtok.c: New file.
2428         * lib/unistr/u-strtok.h: New file.
2429
2430         * modules/unistr/u8-uctomb: New file.
2431         * modules/unistr/u16-uctomb: New file.
2432         * modules/unistr/u32-uctomb: New file.
2433         * lib/unistr/u8-uctomb.c: New file.
2434         * lib/unistr/u16-uctomb.c: New file.
2435         * lib/unistr/u32-uctomb.c: New file.
2436
2437         * MODULES.html.sh (Unicode string functions): Add the new modules.
2438
2439 2007-01-08  Bruno Haible  <bruno@clisp.org>
2440
2441         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
2442         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
2443         subdirectories.
2444
2445 2007-01-08  Karl Berry  <karl@gnu.org>
2446
2447         * doc/error.texi: mention that main() fns must set program_name
2448         when progname is used.
2449
2450 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
2451
2452         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
2453         WCTYPE_H is empty, for the benefit of builds from non-distclean
2454         directories.  Problem reported by Eric Blake in
2455         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
2456
2457 2007-01-08  Bruno Haible  <bruno@clisp.org>
2458
2459         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
2460         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
2461         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
2462         PROVIDE_CANONICALIZE_FILENAME_MODE.
2463         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
2464
2465 2007-01-08  Bruno Haible  <bruno@clisp.org>
2466
2467         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
2468         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
2469         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
2470         * lib/fts.c: Likewise.
2471         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
2472
2473 2006-12-25  Bruno Haible  <bruno@clisp.org>
2474
2475         * modules/utf8-ucs4-safe: New file.
2476         * lib/utf8-ucs4-safe.h: New file.
2477         * lib/unistr/utf8-ucs4-safe.c: New file.
2478
2479         * modules/utf16-ucs4-safe: New file.
2480         * lib/utf16-ucs4-safe.h: New file.
2481         * lib/unistr/utf16-ucs4-safe.c: New file.
2482
2483         * MODULES.html.sh (Unicode string functions): Add the new modules.
2484
2485 2007-01-08  Bruno Haible  <bruno@clisp.org>
2486
2487         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
2488         (Depends-on): Add unitypes.
2489         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
2490         (u8_mbtouc_aux): Move out to separate file.
2491         (u8_mbtouc): Use ucs4_t, uint8_t types.
2492         * lib/unistr/utf8-ucs4.c: New file.
2493
2494         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
2495         (Depends-on): Add unitypes.
2496         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
2497         (u16_mbtouc_aux): Move out to separate file.
2498         (u16_mbtouc): Use ucs4_t, uint16_t types.
2499         * lib/unistr/utf16-ucs4.c: New file.
2500
2501         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
2502         (Depends-on): Add unitypes.
2503         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
2504         (u8_uctomb_aux): Move out to separate file.
2505         (u8_uctomb): Use ucs4_t, uint8_t types.
2506         * lib/unistr/ucs4-utf8.c: New file.
2507
2508         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
2509         (Depends-on): Add unitypes.
2510         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
2511         (u16_uctomb_aux): Move out to separate file.
2512         (u16_uctomb): Use ucs4_t, uint16_t types.
2513         * lib/unistr/ucs4-utf16.c: New file.
2514
2515 2006-12-25  Bruno Haible  <bruno@clisp.org>
2516
2517         * modules/unitypes: New file.
2518         * lib/unitypes.h: New file.
2519         * MODULES.html.sh (func_all_modules): New section "Unicode string
2520         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
2521         this section. Add unitypes.
2522
2523 2007-01-08  Bruno Haible  <bruno@clisp.org>
2524
2525         Avoid variable names that conflict with those from libtool.
2526         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
2527         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
2528         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
2529         library_names_spec to acl_library_names_spec, hardcode_* to
2530         acl_hardcode_*.
2531         Reported by Ralf Wildenhues.
2532
2533 2007-01-08  Bruno Haible  <bruno@clisp.org>
2534
2535         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
2536         definition.
2537         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
2538         definition.
2539         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
2540         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
2541         definition.
2542         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
2543         definition.
2544         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
2545         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
2546         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
2547         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
2548         definition.
2549         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
2550         definition.
2551         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
2552         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
2553         GC_USE_<algorithm>.
2554         * lib/gc-libgcrypt.c: Likewise.
2555         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
2556         * modules/gc-arctwo (configure.ac): Likewise.
2557         * modules/gc-des (configure.ac): Likewise.
2558         * modules/gc-hmac-md5 (configure.ac): Likewise.
2559         * modules/gc-hmac-sha1 (configure.ac): Likewise.
2560         * modules/gc-md2 (configure.ac): Likewise.
2561         * modules/gc-md4 (configure.ac): Likewise.
2562         * modules/gc-md5 (configure.ac): Likewise.
2563         * modules/gc-random (configure.ac): Likewise.
2564         * modules/gc-rijndael (configure.ac): Likewise.
2565         * modules/gc-sha1 (configure.ac): Likewise.
2566
2567 2007-01-08  Bruno Haible  <bruno@clisp.org>
2568
2569         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
2570         macro definition.
2571         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
2572         definition.
2573         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
2574         definition.
2575         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
2576         * modules/fcntl-safer (configure.ac): Likewise.
2577         * modules/fopen-safer (configure.ac): Likewise.
2578         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
2579         GNULIB_FWRITEERROR macro definition.
2580
2581 2007-01-08  Bruno Haible  <bruno@clisp.org>
2582
2583         * m4/gnulib-common.m4: New file.
2584         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
2585         (func_get_filelist): Add m4/gnulib-common.m4.
2586
2587 2007-01-08  Bruno Haible  <bruno@clisp.org>
2588
2589         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
2590         command.
2591
2592 2007-01-08  Jim Meyering  <jim@meyering.net>
2593
2594         Use a more robust test for a "can't happen" condition.
2595         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
2596         narrowed the st_size value.  Presuming the "can't happen" condition
2597         is true, that narrowing could conceivably convert an invalid st_size
2598         value into a valid one.  Instead, use a change based on Matthew
2599         Woehlke's original patch.
2600
2601         Slight readability improvement: use an assert-like macro
2602         in place of literal "abort ()" uses.
2603         * lib/fts.c (fts_assert): Define.
2604         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
2605         Use this macro instead of a bare 'abort'.
2606
2607 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
2608
2609         Don't worry about using IRIX 5.3's wctype.h broken definitions;
2610         simply work around them.
2611         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
2612         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
2613         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before declaring.
2614         Don't bother to define as macros, since the standard doesn't require it.
2615         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
2616         longer worry about IRIX 5.3.
2617         (HAVE_WCTYPE_CTMP_BUG): Remove.
2618
2619 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
2620
2621         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
2622         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
2623         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
2624         Problems reported by Georg Schwarz for IRIX 5.3.
2625
2626         * gnulib-tool (autoconf_minversion): Take the maximum version number
2627         found, not the minimum.  Problem reported by James Youngman.
2628
2629 2007-01-03  Karl Berry  <karl@gnu.org>
2630
2631         * doc/error.texi: new file, explaining interaction with progname.
2632         * doc/gnulib.texi: include it.  Update copyright.
2633
2634 2007-01-03  Simon Josefsson  <simon@josefsson.org>
2635
2636         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
2637         AC_CANONICAL_HOST, to improve autobuild outputs.
2638
2639 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
2640             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
2641
2642         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
2643         sockets, server sockets, and other file descriptors.  Count errors
2644         to compute the return value.  Reorder the code a bit to be easier
2645         to follow.  Don't set event bits that were not requested (except
2646         POLLERR and POLLHUP).
2647
2648 2007-01-01  Bruno Haible  <bruno@clisp.org>
2649
2650         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
2651
2652 2007-01-03  Jim Meyering  <jim@meyering.net>
2653
2654         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
2655
2656 2007-01-02  Bruno Haible  <bruno@clisp.org>
2657
2658         * modules/settime (Include): Require timespec.h.
2659         * modules/nanosleep (Include): Likewise.
2660
2661 2007-01-01  Bruno Haible  <bruno@clisp.org>
2662
2663         * gnulib-tool (func_emit_copyright_notice): Bump year.
2664         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
2665
2666 2007-01-01  Bruno Haible  <bruno@clisp.org>
2667
2668         Improve support for OpenBSD.
2669         * build-aux/config.rpath (libname_spec): Export.
2670         (library_names_spec): New variable. Export.
2671         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
2672         library_names_spec from the config.rpath output. Locate shared library
2673         through the name pattern in library_names_spec.
2674
2675 2007-01-01  Eric Blake  <ebb9@byu.net>
2676
2677         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
2678
2679 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
2680
2681         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
2682         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
2683         assume the C locale, and avoid an "eval" that could cause trouble.
2684         Problem with SORT reported by Bob Proulx.
2685
2686         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
2687         Define.  Trivial patch from Henning Nielsen Lund, originally
2688         sent to bug-grep@gnu.org today.
2689
2690 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
2691
2692         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
2693         struct stat.  Problem reported by Henning Nielsen Lund.
2694         * lib/acl.c: Include acl.h first, to check interface.  Don't
2695         bother to include sys/types.h and sys/stat.h again.
2696
2697 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
2698
2699         Import the following change from libc; problem reported by
2700         Sven Verdoolaege.
2701
2702         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
2703
2704         [BZ #1373]
2705         * lib/argp.h: Remove __NTH for __argp_usage inline function.
2706
2707 2006-12-28  Jim Meyering  <jim@meyering.net>
2708
2709         * build-aux/announce-gen: Do not assume that the package
2710         builds any of tar.gz, tar.bz2, and .xdelta files.
2711         Suggestion from Simon Josefsson.
2712
2713 2006-12-28  Simon Josefsson  <simon@josefsson.org>
2714
2715         * modules/announce-gen: New file.
2716
2717 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
2718
2719         * lib/mbchar.h: Just include <wctype.h>; the wctype module
2720         handles its gotchas now.
2721         * lib/mbswidth.c: Likewise.
2722         * lib/wcwidth.h: Likewise.
2723         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
2724         and iswcntrl; the wctype module does this stuff now.
2725         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
2726         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
2727         * modules/mbchar (Depends-on): Add wctype.
2728         * modules/mbswidth (Depends-on): Likewise.
2729         * modules/wcwidth (Depends-on): Likewise.
2730
2731 2006-12-27  Eric Blake  <ebb9@byu.net>
2732
2733         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
2734         module uses more than what <wctype.h> is required to provide.
2735
2736 2006-12-26  Eric Blake  <ebb9@byu.net>
2737
2738         * gnulib-tool (sed_extract_prog): Avoid space-tab.
2739
2740 2006-12-26  Eric Blake  <ebb9@byu.net>
2741
2742         * modules/absolute-header: New module.
2743         * modules/fcntl (Depends-on): Depend on it.
2744         * modules/inttypes (Depends-on): Likewise.
2745         * modules/stdint (Depends-on): Likewise.
2746         * modules/sys_stat (Depends-on): Likewise.
2747         * modules/wctype (Depends-on): Likewise.
2748         * MODULES.html.sh (Support for building libraries and
2749         executables): Document it.
2750
2751 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
2752
2753         * gnulib-tool (SED): Remove, undoing previous change.
2754         The problem was that it broke coreutils on Solaris, because
2755         "sed --posix" leaked into a makefile.
2756         (sed): New alias, if 'alias' and GNU sed.
2757
2758 2006-12-24  Jim Meyering  <jim@meyering.net>
2759
2760         Work around an fchownat bug in glibc-2.4:
2761         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
2762         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
2763         in spite of the -P option.
2764         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
2765         New macros.
2766         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
2767         * modules/openat (Files): Add lib/fchownat.c.
2768         * lib/openat.c (fchownat): Don't define here.  Move to...
2769         * lib/fchownat.c: ...this new file.
2770
2771 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
2772
2773         Fix bug reported by Bruno Haible in
2774         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
2775         where quotearg.c didn't compile on Mac OS X 10.2 because it
2776         lacks <wchar.h> and wint_t.
2777         * lib/wctype_.h (__wctype_wint_t): New type.
2778         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
2779         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
2780         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
2781         Arg is now of type __wctype_wint_t, not wint_t.
2782         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
2783         substitute HAVE_WINT_T.
2784         * modules/wctype (Files): Add m4/wint_t.m4.
2785         (wctype.h): Substitute HAVE_WINT_T.
2786
2787 2006-12-23  Bruno Haible  <bruno@clisp.org>
2788
2789         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
2790
2791 2006-12-23  Bruno Haible  <bruno@clisp.org>
2792
2793         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
2794         S_ISLNK.
2795         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
2796         mingw.
2797
2798 2006-12-22  Bruno Haible  <bruno@clisp.org>
2799
2800         * lib/copy-file.c: Include acl.h.
2801         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
2802         Close the file descriptors only after being done with copy_acl.
2803         * modules/copy-file (Depends-on): Add acl.
2804
2805 2006-12-22  Bruno Haible  <bruno@clisp.org>
2806
2807         * gnulib-tool (SED): New variable.
2808         Use $SED instead of sed everywhere.
2809
2810 2006-12-22  Bruno Haible  <bruno@clisp.org>
2811
2812         * modules/no-c++: New file.
2813         * m4/no-c++.m4: New file.
2814         * MODULES.html.sh (Support for building libraries and executables):
2815         Add no-c++.
2816
2817 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
2818
2819         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
2820         Include <limits.h>, and use its INT_MAX to rewrite the
2821         j loop so that it does not overflow 'int'.  Problem reported by
2822         Ralf Wildenhues in
2823         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
2824         Play it safe by shifting left by 1 rather than multiplying by 2,
2825         as GCC is less likely to optimize this away when the value
2826         is signed (when it assumes overflow leads to undefined behavior).
2827         Also, don't assume time_t uses two's complement.
2828
2829 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
2830
2831         * MODULES.html.sh: New module wctype.
2832         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
2833         * lib/fnmatch.c: Don't bother to include <wchar.h> before
2834         <wctype.h>, since the new wctype module should fix this.
2835         * lib/quotearg.c: Include <wctype.h> unconditionally, since
2836         the wctype module should arrange for it.
2837         * lib/regex_internal.h: Likewise.
2838         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
2839         since the wctype module should handle this now.
2840         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
2841         * modules/fnmatch (Depends-on): Add wctype.
2842         * modules/quotearg (Depends-on): Likewise.
2843         * modules/regex (Depends-on): Likewise.
2844
2845 2006-12-19  Bruno Haible  <bruno@clisp.org>
2846
2847         * lib/strdup.h [C++]: Wrap definitions in extern "C".
2848         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
2849
2850 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2851
2852         * modules/savewd (Depends-on): Fix dependency on fcntl.
2853
2854 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
2855
2856         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
2857         conforms to C99, rather than relying on the user's environment
2858         setting of STDINT_H.
2859
2860 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
2861         and Eric Blake  <ebb9@byu.net>
2862
2863         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
2864         This is more consistent with the other defines here.
2865         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
2866         Port to z/OS.  Problem reported by Paul Gilmartin.
2867         Change local vars to use gl_ prefix rather than ac_.
2868         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
2869         with other defines.
2870         * modules/double-slash-root: New module.
2871         * modules/dirname (Files): Remove m4/double-slash-root.m4.
2872         (Depends-on): Add double-slash-root.
2873         * MODULES.html.sh (File system functions): Mention new module.
2874
2875 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
2876
2877         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
2878         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
2879         This is for the benefit of gzip, which doesn't do i18n.
2880
2881 2006-12-12  Jim Meyering  <jim@meyering.net>
2882
2883         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
2884         Reported by Andreas Schwab <schwab@suse.de>.
2885
2886 2006-12-12  Bruno Haible  <bruno@clisp.org>
2887
2888         Merge these changes.
2889         2006-09-05  Bruno Haible  <bruno@clisp.org>
2890         * lib/iconvme.c (iconv_string): No need to save and restore errno when
2891         iconv_alloc succeeded.
2892         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
2893         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
2894         test for " && dest " at the end - dest is always != NULL there. Call
2895         iconv with 4xNULL arguments initially, to reset the state. Call iconv
2896         with 2xNULL arguments, also to flush the state storage. Handle the
2897         IRIX iconv behaviour. Realloc the final result, to throw away unused
2898         memory.
2899
2900 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
2901
2902         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
2903         and fchmodat unconditionally, since glibc 2.4 has them.
2904         Problem reported by Arkadiusz Miskiewicz.
2905
2906 2006-12-10  Bruno Haible  <bruno@clisp.org>
2907
2908         * gnulib-tool (func_import): Show the include files only for those
2909         modules that are copied and specified.
2910         Reported by Karl Berry.
2911
2912 2006-12-08  Jim Meyering  <jim@meyering.net>
2913
2914         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
2915         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
2916
2917         * build-aux/announce-gen: Add two new options, both optional:
2918         --bootstrap-tools=TOOL_LIST
2919               a comma-separated list of tools, e.g.,
2920               autoconf,automake,bison,gnulib
2921         --gnulib-snapshot-date=DATE
2922               if gnulib is in the bootstrap tool list,
2923               then report this as the snapshot date.
2924               If not specified, use the current date/time.
2925               If you specify a date here, be sure it's UTC.
2926
2927 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2928
2929         * tests/test-argp-2.sh: Fix test to match actual output.
2930         (func_compare): Fix sed script to be portable.
2931
2932 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
2933
2934         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
2935         workaround for this case.  It is not autoconfigured now; offhand
2936         it's hard to see how to autoconfigure it.
2937
2938 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
2939
2940         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
2941         a directory that is about to be chowned.  Such a directory's
2942         initial file permissions should permit the owner only and this
2943         should not be changed until after the chown, since the group and
2944         other bits would be incorrect if they granted permission before
2945         the chown.
2946
2947         Fix porting problem for iswctype reported by Georg Schwarz in:
2948         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
2949         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
2950         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
2951         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
2952         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
2953
2954 2006-12-03  Jim Meyering  <jim@meyering.net>
2955
2956         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
2957         p->fts_statp may not yet be defined.
2958         (fts_read): Instead, set it in the caller, once p->fts_statp is
2959         sure to be defined, and corresponds to a top-level directory.
2960         This bug made du -x fail.  Here's the coreutils test case:
2961         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
2962         Reported by Mike Frysinger.
2963
2964 2006-12-01  Jim Meyering  <jim@meyering.net>
2965
2966         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
2967         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
2968         Reported by Simon Josefsson.
2969
2970 2006-11-30  Jim Meyering  <jim@meyering.net>
2971
2972         * m4/warning.m4: Use the all-permissive copyright notice
2973         recommended by RMS (rather than LGPL).
2974         * m4/vararrays.m4: Likewise.
2975         * m4/flexmember.m4: Likewise.
2976
2977 2006-11-29  Bruno Haible  <bruno@clisp.org>
2978
2979         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
2980         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
2981         using +=.
2982         Reported by Simon Josefsson <simon@josefsson.org>.
2983
2984 2006-11-28  James Youngman <jay@gnu.org>
2985
2986         * README: Advise users that they might find the bug-gnulib@gnu.org
2987         and autotools-announce@gnu.org mailing lists useful.
2988
2989 2006-11-28  Bruno Haible  <bruno@clisp.org>
2990
2991         * m4/ptrdiff_max.m4: Remove file.
2992
2993 2006-11-21  Bruno Haible  <bruno@clisp.org>
2994
2995         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
2996         _AC_COMPUTE_INT.
2997         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2998         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
2999         _AC_COMPUTE_INT.
3000         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3001         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
3002         _AC_COMPUTE_INT.
3003         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3004
3005 2006-11-28  Jim Meyering  <jim@meyering.net>
3006
3007         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
3008         warning from "gcc -Wshadow" about shadowing the builtin.
3009
3010 2006-11-27  Bruno Haible  <bruno@clisp.org>
3011
3012         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
3013         _AC_COMPUTE_INT.
3014         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3015
3016 2006-11-27  Bruno Haible  <bruno@clisp.org>
3017             Paul Eggert  <eggert@cs.ucla.edu>
3018
3019         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
3020
3021 2006-11-26  Bruno Haible  <bruno@clisp.org>
3022
3023         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
3024         noinst_LTLIBRARIES.
3025
3026 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
3027             Bruno Haible  <bruno@clisp.org>
3028
3029         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
3030         if compiling with "gcc -ansi".
3031
3032 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
3033
3034         Fix some incompatibilities with gcc -ansi -pedantic.
3035         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
3036         if compiling pedantically with GCC, unless it's C99 or later.
3037         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
3038         it mishandles gcc -ansi -pedantic as well.
3039         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
3040         if gcc -pedantic.
3041         * lib/regexec.c (check_node_accept_bytes): Don't use auto
3042         initializers for struct if -pedantic, unless it's C99 or later.
3043
3044 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
3045
3046         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
3047         Don't close an fd more than once. Identical atimes indicate
3048         success, not failure.
3049
3050 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
3051
3052         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
3053
3054 2006-11-23  Jim Meyering  <jim@meyering.net>
3055
3056         * build-aux/announce-gen: New file.  From coreutils.
3057
3058 2006-11-22  Jim Meyering  <jim@meyering.net>
3059
3060         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
3061         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
3062         (fts_read): Use a temporary to narrow the overused st_size member
3063         before using it in a switch statement.  Reported by Matthew Woehlke.
3064
3065         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
3066         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
3067
3068 2006-11-20  Bruno Haible  <bruno@clisp.org>
3069
3070         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
3071         changequote instead of pairs of brackets.
3072         Reported by Andreas Schwab <schwab@suse.de>.
3073
3074 2006-11-21  Jim Meyering  <jim@meyering.net>
3075
3076         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
3077         so as to remain compatible with older compilers.
3078         Patch from Michael Deutschmann.
3079
3080 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
3081
3082         * MODULES.html.sh (File system functions): Add openat.
3083
3084         * lib/openat.h (rpl_fstatat): New macro, if
3085         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
3086         (fstatat): Define to rpl_fstatat under the same conditions,
3087         unless COMPILING_FSTATAT.
3088         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
3089         seems to have the bug.
3090         * lib/fstatat.c: New file.
3091         * modules/openat (Files): Add it.
3092
3093 2006-11-20  Bruno Haible  <bruno@clisp.org>
3094
3095         * Makefile: New file.
3096
3097 2006-11-20  Jim Meyering  <jim@meyering.net>
3098
3099         The beginnings of syntax-related checks for gnulib.
3100         * lib/Makefile: New file.
3101         * lib/t-idcache: New script.  Ensure that the two halves of
3102         idcache.c stay in sync.
3103
3104         * lib/idcache.c: Adjust comments in user- and group- portions to
3105         be more accurate, and to be consistent with one another.
3106
3107 2006-11-20  Jim Meyering  <jim@meyering.net>
3108
3109         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
3110         continue using the flexible array member (thus, this module performs
3111         half as many malloc calls), with the addition that...
3112         (getgroup, getuser): Consistently record a non-match via an empty
3113         "name" string, and map an empty string match to a NULL return value.
3114         * modules/idcache (Depends-on): Re-add flexmember.
3115
3116         * lib/idcache.c (getuser): Remove all uses of the register keyword.
3117         (getuidbyname, getgroup, getgidbyname): Likewise.
3118
3119         Use cleaner syntax: NULL rather than 0.
3120         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
3121
3122 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
3123
3124         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
3125         It mishandled the case where the group was missing.
3126         Problem reported by Greg Schafer.
3127         * modules/idcache: Likewise.
3128
3129 2006-11-18  Jim Meyering  <jim@meyering.net>
3130
3131         * check-module (%exempt_header): Add exception for some
3132         conditionally-included headers.
3133
3134         * modules/i-ring (Depends-on): Add verify.
3135         (License): Change to LGPL.
3136
3137 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
3138
3139         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
3140         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
3141         and inttostr.h.  Use snprintf rather than uinttostr, so that
3142         LGPLed code doesn't depend on GPLed.
3143
3144 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
3145
3146         * modules/inline (License): Change from GPL to LGPL.
3147
3148 2006-11-17  Jim Meyering  <jim@meyering.net>
3149
3150         * modules/d-type (License): Switch to LGPL.
3151
3152 2006-11-15  Bruno Haible  <bruno@clisp.org>
3153
3154         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
3155
3156 2006-11-15  Eric Blake  <ebb9@byu.net>
3157
3158         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
3159         the module dependency.
3160
3161 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
3162             Bruno Haible  <bruno@clisp.org>
3163
3164         * gnulib-tool (func_create_testdir): Add license consistency check.
3165
3166 2006-11-15  Eric Blake  <ebb9@byu.net>
3167
3168         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
3169         random "(cached)" in configure output.
3170
3171 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3172
3173         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
3174         test for conforming inttypes.h is both announced and cached.
3175
3176         * MODULES.html.sh (seen_modules, seen_files): New variables.
3177         (func_module): Rewrite to use a few less gnulib-tool and sed
3178         invocations.  Avoid a couple of quadratic algorithms for ...
3179         (missed_modules, missed_files): ... these, with ...
3180         (func_append, func_tmpdir): ... these new functions, from
3181         gnulib-tool.  Analogously, install traps for cleanup.
3182
3183         * tests/test-gc.c (main): Remove unused variables.
3184         * tests/test-read-file.c: Include stdlib.h, for 'free'.
3185
3186 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
3187
3188         * modules/inttostr (License): Change to LGPL.
3189
3190 2006-11-14  Eric Blake  <ebb9@byu.net>
3191
3192         * modules/tempname (License): Change to LGPL.
3193
3194 2006-11-14  Eric Blake  <ebb9@byu.net>
3195
3196         * doc/functions.texi (Function Portability): *printf functions on
3197         Cygwin now understand all POSIX size specifiers.
3198
3199 2006-11-14  Bruno Haible  <bruno@clisp.org>
3200
3201         * modules/c-ctype (License): Change to LGPL.
3202
3203 2006-11-12  Bruno Haible  <bruno@clisp.org>
3204
3205         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
3206         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
3207         for GNOME libraries, for which the include files are installed in
3208         subdirectories of $prefix/include.
3209
3210 2006-11-12  Bruno Haible  <bruno@clisp.org>
3211
3212         * m4/lib-link.m4: Require at least autoconf-2.54.
3213         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
3214         name to underscores for the --with option.
3215
3216 2006-11-13  Bruno Haible  <bruno@clisp.org>
3217
3218         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
3219         the tests directory.
3220         Reported by Ralf Wildenhues.
3221
3222 2006-11-13  Bruno Haible  <bruno@clisp.org>
3223
3224         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
3225         (func_emit_initmacro_end): Undo the override here.
3226         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
3227         Works around the famous automake error in coreutils.
3228
3229 2006-11-13  Eric Blake  <ebb9@byu.net>
3230
3231         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
3232         element, not its node.
3233
3234 2006-11-12  Bruno Haible  <bruno@clisp.org>
3235
3236         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
3237         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
3238
3239 2006-11-12  Bruno Haible  <bruno@clisp.org>
3240
3241         * gnulib-tool: New option --local-symlink.
3242         (func_usage): Document it.
3243         (lsymbolic): New variable.
3244         (func_import, func_create_testdir): If --symlink was not specified,
3245         test whether --local-symlink was specified and the file comes from
3246         the local_gnulib_dir.
3247
3248 2006-11-12  Bruno Haible  <bruno@clisp.org>
3249
3250         * gnulib-tool (func_ln): New function.
3251         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
3252
3253 2006-11-12  Bruno Haible  <bruno@clisp.org>
3254
3255         Finish support for source files in subdirectories.
3256         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
3257         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
3258         AUTOMAKE_OPTIONS.
3259         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
3260
3261 2006-11-12  Bruno Haible  <bruno@clisp.org>
3262
3263         * gnulib-tool (func_get_automake_snippet): Synthesize also an
3264         EXTRA_lib_SOURCES augmentation.
3265         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
3266
3267 2006-11-12  Jim Meyering  <jim@meyering.net>
3268
3269         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
3270         file descriptors.  This also averts a failure on systems with
3271         native openat support when a traversed directory lacks "x" access.
3272         * lib/fts_.h: Include "i-ring.h"
3273         (struct FTS) [fts_fd_ring]: New member.
3274         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
3275         (FCHDIR): Add parentheses.
3276         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
3277         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
3278         When descending, rather than simply closing the previous
3279         fts_cwd_fd value, push that file descriptor onto the ring.
3280         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
3281         (fts_open): Initialize the new fd_ring member.
3282         (fts_close): Clear the ring.
3283         (fts_safe_changedir): When possible, use our new fd_ring to skip
3284         the diropen and fstat and dev/ino comparison that would normally
3285         accompany a virtual `chdir ("..")'.
3286
3287         * modules/fts (Depends-on): Add i-ring.
3288         * modules/i-ring: New module.
3289         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
3290         * m4/i-ring.m4: New file.
3291
3292 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3293
3294         * gnulib-tool (func_create_testdir): Fix replacement of
3295         `build-aux' in configure.ac.  Run autotools in gltests
3296         subdirectory.
3297         (func_create_testdir, func_create_megatestdir, test): There is
3298         no need for '--force' in most autotool invocations in a new
3299         tree.  Actually fail the whole test if any of the tools, or the
3300         configure or make stages fail.
3301
3302         Sync from Automake.
3303         * build-aux/gnupload: Revert last change.  Add pointer to upload
3304         instructions of the GNU Maintenance Instructions.
3305         Suggestion by Karl Berry.
3306
3307 2006-11-10  Jim Meyering  <jim@meyering.net>
3308
3309         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
3310
3311 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
3312
3313         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
3314         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
3315         (bind_textdomain_codeset) [! ENABLE_NLS]:
3316         Evaluate all the arguments.  That way, callers get compatible behavior
3317         if the arguments have side effects.  Also, it avoids some GCC
3318         diagnostics in some cases; Joel E. Denny reported problems when Bison
3319         was configured with --enable-gcc-warnigs.
3320
3321 2006-11-10  Jim Meyering  <jim@meyering.net>
3322
3323         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
3324         relevant options in CFLAGS (like -O, -fno-inline) are taken into
3325         account.
3326
3327 2006-11-10  Jim Meyering  <jim@meyering.net>
3328
3329         * modules/inline: New file/module.
3330         * modules/xalloc (Files): Remove m4/inline.m4.
3331         (Depends-on): Add inline, instead.
3332         * modules/oset: Likewise.
3333         * modules/list: Likewise.
3334
3335 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
3336
3337         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
3338         Problem reported by Matthew Woehlke.
3339
3340 2006-11-09  Bruno Haible  <bruno@clisp.org>
3341
3342         * lib/tempname.c (gen_tempname): Remove variant that invokes
3343         __gen_tempname.
3344         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
3345         __gen_tempname.
3346
3347 2006-11-08  Bruno Haible  <bruno@clisp.org>
3348
3349         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
3350         to 'yes' instead of 'cross-compiling'.
3351
3352 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
3353
3354         * lib/quotearg.h (quotearg_free): New decl.
3355         * lib/quotearg.c (quotearg_free): New function.
3356         (slot0, nslots, slotvec0, slotvec):
3357         Now file-scope so that quotearg_free can get at them.
3358
3359 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3360
3361         Sync from Automake.
3362         * build-aux/gnupload: Add missing 'gnu' to example URL.
3363         Report by Karl Berry.
3364
3365 2006-11-08  Bruno Haible  <bruno@clisp.org>
3366
3367         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
3368         Suggested by Paul Eggert.
3369
3370 2006-11-08  Jim Meyering  <jim@meyering.net>
3371
3372         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
3373         It's already included if !_LIBC.
3374         (fts_safe_changedir): Add a comment.
3375
3376 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
3377
3378         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
3379         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
3380         Matthew Woehlke.
3381
3382         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
3383         definitions up, to avoid colliding with change below.
3384         (static_inline) [HAVE_INLINE]: New macro.
3385         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
3386         Provide extern decls when !HAVE_INLINE.  Do not define unless
3387         static_inline is defined, either by us or by xmalloc.c.  Use
3388         static_inline rather than static inline.
3389         (XCALLOC): Optimize sizeof(T) = 1 case.
3390         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
3391
3392 2006-11-07  Bruno Haible  <bruno@clisp.org>
3393
3394         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
3395         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
3396         AC_C_INLINE.
3397         * modules/xalloc (Files): Add m4/inline.m4.
3398
3399 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3400
3401         * README: Fix typo.
3402         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
3403         (Miscellanous Notes): ...from this.
3404
3405 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
3406
3407         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
3408         Mention that offsetof should be used instead of sizeof.
3409         From Bruno Haible.
3410
3411 2006-11-07  Bruno Haible  <bruno@clisp.org>
3412
3413         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
3414
3415 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
3416
3417         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
3418         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
3419         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
3420         (gl_tree_add_before, gl_tree_add_after):
3421         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
3422         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
3423         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
3424         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
3425         (gl_linked_add_after, gl_linked_add_at): Likewise.
3426         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
3427         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
3428         (gl_tree_add_before, gl_tree_add_after): Likewise.
3429         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
3430         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
3431         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
3432
3433 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3434
3435         * lib/gl_oset.h: Use C comment style, not C++ comment style.
3436
3437 2006-11-06  Bruno Haible  <bruno@clisp.org>
3438
3439         * m4/inline.m4: New file.
3440         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
3441         * modules/list (Files): Add m4/inline.m4.
3442         * modules/oset (Files): Likewise.
3443
3444 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
3445
3446         * lib/idcache.c: Include <stddef.h>, for offsetof.
3447         (struct userid.name): Change from char * to a flexible array member.
3448         All uses changed.
3449         * modules/idcache (Depends-on): Add flexmember.
3450
3451         * MODULES.html.sh (Core language properties): New module flexmember.
3452         * modules/flexmember, m4/flexmember.m4: New files.
3453
3454         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
3455         inline functions that are identical with the old xnmalloc_inline,
3456         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
3457         that we can avoid some unnecessary integer multiplications and
3458         divisions in the common case where the element size is known at
3459         compile time.
3460         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
3461         needed.
3462         (xnboundedmalloc): Remove.
3463         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
3464         arguments, for consistency with rest of this header.
3465         (xcharalloc): Rewrite using XNMALLOC.
3466         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
3467         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
3468         versions have been moved to lib/xalloc.h and renamed to be the
3469         non-*_inline versions.
3470         (xmalloc, xrealloc): Implement without reference to the xnmalloc
3471         and xnrealloc functions, since those functions are now inline and
3472         now call us.
3473         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
3474         renaming described above.
3475         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
3476         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
3477         captures the dependency in AC_C_INLINE.
3478
3479         New module canonicalize-lgpl, proposed by Charles Wilson in
3480         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
3481         with a few small changes afterwards.
3482         * MODULES.html.sh (File system functions): New module
3483         canonicalize-lgpl.
3484         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
3485         and canonicalize_file_name.
3486         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
3487         * modules/canonicalize-lgpl: New files.
3488
3489 2006-11-05  Bruno Haible  <bruno@clisp.org>
3490
3491         * gnulib-tool (func_import, func_create_testdir): Create directories
3492         also for files in subdirectories of lib/.
3493
3494 2006-11-05  Bruno Haible  <bruno@clisp.org>
3495
3496         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
3497         ANSI C compliant.
3498
3499 2006-11-03  Bruno Haible  <bruno@clisp.org>
3500
3501         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
3502         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
3503         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
3504         (xnboundedmalloc): New inline function.
3505         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
3506         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
3507         xmalloc.
3508         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
3509         xmalloc.
3510         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
3511         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
3512         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
3513         xmalloc.
3514         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
3515         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
3516         xmalloc.
3517         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
3518         gl_tree_add_after): Use XMALLOC instead of xmalloc.
3519         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
3520         xmalloc.
3521         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
3522         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
3523         gl_tree_add_after): Use XMALLOC instead of xmalloc.
3524         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
3525         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
3526         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
3527         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
3528
3529 2006-11-03  Bruno Haible  <bruno@clisp.org>
3530
3531         * lib/c-ctype.h [C++]: Define functions without name mangling.
3532         * lib/fwriteerror.h [C++]: Likewise.
3533         * lib/gcd.h [C++]: Likewise.
3534         * lib/linebreak.h [C++]: Likewise.
3535
3536 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
3537
3538         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
3539         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
3540         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
3541         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
3542         Check for functions and headers just once.
3543         Check for declaration of canonicalize_file_name.
3544         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
3545
3546 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
3547
3548         * gnulib-tool (func_import): Fix typo in actioncmd.
3549
3550 2006-11-02  Bruno Haible  <bruno@clisp.org>
3551
3552         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
3553         newline sequence in the Makefile.am snippet as a space, like "make"
3554         does.
3555         Reported by Roger Persson <perrog@gmail.com>.
3556
3557 2006-11-01  Bruno Haible  <bruno@clisp.org>
3558
3559         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
3560         already declared in <string.h>.
3561         * lib/strcase.h (strncasecmp): Don't declare it if yes.
3562
3563 2006-11-01  Bruno Haible  <bruno@clisp.org>
3564
3565         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
3566         * lib/strcase.h: Include <string.h>.
3567         (strcasecmp): Define to rpl_strcasecmp here.
3568
3569 2006-11-01  Bruno Haible  <bruno@clisp.org>
3570
3571         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
3572
3573 2006-11-01  Eric Blake  <ebb9@byu.net>
3574
3575         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
3576
3577         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
3578
3579 2006-10-29  Bruno Haible  <bruno@clisp.org>
3580
3581         Make it compile in C++ mode.
3582         * lib/full-write.c (full_rw): Add a cast.
3583
3584 2006-11-01  Bruno Haible  <bruno@clisp.org>
3585
3586         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
3587         be POSIX compliant.
3588         Reported by Roger Persson <perrog@gmail.com>.
3589
3590 2006-11-01  Eric Blake  <ebb9@byu.net>
3591
3592         * lib/getopt_.h: Fix comments.
3593
3594 2006-10-31  Eric Blake  <ebb9@byu.net>
3595
3596         * modules/tmpdir (Depends-on): Add sys_stat.
3597         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
3598         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
3599         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
3600         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
3601         tempname.
3602
3603 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
3604
3605         Avoid some C++ diagnostics reported by Bruno Haible.
3606         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
3607         xmalloc.
3608         (quotearg_alloc): Use xcharalloc rather than xmalloc.
3609         (struct slotvec): Move to top level.
3610         (quotearg_n_options): Rewrite to avoid xmalloc.
3611         * lib/xalloc.h (xcharalloc): New function.
3612         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
3613         [defined __cplusplus]: Add function template that provides result
3614         type propagation.  This part of the change is from Bruno Haible.
3615
3616 2006-10-29  Bruno Haible  <bruno@clisp.org>
3617
3618         Make it compile in C++ mode.
3619         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
3620         * lib/strnlen1.c (strnlen1): Cast memchr result.
3621         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
3622         * lib/clean-temp.c (string_equals, string_hash): Add casts.
3623         (create_temp_dir): Rename local variable 'template'.
3624         (compile_csharp_using_sscli): Add cast.
3625         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
3626         * lib/findprog.c (find_in_path): Likewise.
3627         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
3628         * lib/wait-process.c (register_slave_subprocess): Likewise.
3629
3630 2006-10-22  Bruno Haible  <bruno@clisp.org>
3631
3632         * modules/tsearch: New file.
3633         * lib/tsearch.h: New file.
3634         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
3635         * m4/tsearch.m4: New file.
3636         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
3637
3638 2006-10-29  Eric Blake  <ebb9@byu.net>
3639
3640         * lib/arcfour.c: Assume config.h.
3641         * lib/arctwo.c: Likewise.
3642         * lib/base64.c: Likewise.
3643         * lib/check-version.c: Likewise.
3644         * lib/crc.c: Likewise.
3645         * lib/des.c: Likewise.
3646         * lib/gc-gnulib.c: Likewise.
3647         * lib/gc-libgcrypt.c: Likewise.
3648         * lib/gc-pbkdf2-sha1.c: Likewise.
3649         * lib/getaddrinfo.c: Likewise.
3650         * lib/getdelim.c: Likewise.
3651         * lib/getline.c: Likewise.
3652         * lib/hmac-md5.c: Likewise.
3653         * lib/hmac-sha1.c: Likewise.
3654         * lib/iconvme.c: Likewise.
3655         * lib/md2.c: Likewise.
3656         * lib/md4.c: Likewise.
3657         * lib/memxor.c: Likewise.
3658         * lib/read-file.c: Likewise.
3659         * lib/readline.c: Likewise.
3660         * lib/rijndael-alg-fst.c: Likewise.
3661         * lib/rijndael-api-fst.c: Likewise.
3662         * lib/xgetdomainname.c: Likewise.
3663
3664 2006-10-28  Eric Blake  <ebb9@byu.net>
3665
3666         * lib/xstrndup.c: Assume config.h.
3667
3668 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
3669
3670         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
3671         stat-macros.h is now for our own macros, whereas stat_h is for
3672         macros in the <sys/stat.h> name space.
3673         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
3674         (STAT_MACROS_H): Remove.
3675         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
3676         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
3677         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
3678         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
3679         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
3680         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
3681         Move these macros to ...
3682         * lib/stat_.h: here.  Don't include stat-macros.h.
3683         * lib/canonicalize.c: Don't include stat-macros.h.
3684         * lib/chown.c: Likewise.
3685         * lib/euidaccess.c: Likewise.
3686         * lib/file-type.c: Likewise.
3687         * lib/filemode.c: Likewise.
3688         * lib/glob.c: Likewise.
3689         * lib/isapipe.c: Likewise.
3690         * lib/lchown.c: Likewise.
3691         * lib/lstat.c: Likewise.
3692         * lib/mkdir-p.c: Likewise.
3693         * lib/rmdir.c: Likewise.
3694         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
3695         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
3696         unless mkdir isn't declared, to speed up 'configure'.
3697         Always create sys/stat.h, since it's unlikely any real sys/stat.h
3698         would define all the S_* symbols.
3699         * modules/canonicalize (Depends-on):
3700         Depend on sys_stat, not stat-macros.
3701         * modules/chown: Likewise.
3702         * modules/euidaccess: Likewise.
3703         * modules/filemode: Likewise.
3704         * modules/file-type: Likewise.
3705         * modules/glob: Likewise.
3706         * modules/isapipe: Likewise.
3707         * modules/lchown: Likewise.
3708         * modules/lstat: Likewise.
3709         * modules/mkancesdirs: Likewise.
3710         * modules/rmdir: Likewise.
3711         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
3712         * modules/modechange: Likewise.
3713         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
3714         (configure.ac): Remove gl_STAT_MACROS.
3715         * modules/sys_stat (Depends-on): Remove stat-macros.
3716
3717 2006-10-27  Bruno Haible  <bruno@clisp.org>
3718
3719         * m4/signed.m4: Remove file.
3720         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
3721         invocation.
3722         * modules/vasnprintf (Files): Remove m4/signed.m4.
3723
3724 2006-10-27  Bruno Haible  <bruno@clisp.org>
3725
3726         Update to GNU gettext 0.16.
3727         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
3728         m4/inttypes-h.m4, m4/signed.m4.
3729         * m4/gettext.m4: Update to GNU gettext 0.16.
3730         * m4/intl.m4: New file, from GNU gettext.
3731         * m4/intldir.m4: New file, from GNU gettext.
3732         * config/srclist.txt: Update
3733
3734 2006-10-27  Eric Blake  <ebb9@byu.net>
3735
3736         * MODULES.html.sh: Document tempname.
3737         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
3738         dependencies.
3739         (Files): Move lib/tempname.c...
3740         * modules/tempname: ...to this new module.
3741         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
3742         (gl_PREREQ_TEMPNAME): Move...
3743         * m4/tempname.m4: ...to this new file.
3744         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
3745         * modules/sys_stat (Depends-on): Add stat-macros.
3746         * lib/stat_.h (includes): Pick up stat macros.
3747         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
3748         if stat macros are broken.
3749         * lib/tempname.c (includes): No need to include "stat-macros.h".
3750         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
3751         (direxists, __path_search) [!_LIBC]: Don't compile these in
3752         gnulib; the tmpdir module covers that.
3753         * lib/tempname.h: New file.
3754
3755 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
3756
3757         * COPYING: Explain how gnulib-tool converts licence headers.
3758         Almost all wording by Eric Blake.
3759
3760 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
3761
3762         * lib/mbchar.h (is_basic_table): Make read-only.
3763         * lib/mbchar.c (is_basic_table): Likewise.
3764         Reported by John Darrington.
3765
3766 2006-10-25  Bruno Haible  <bruno@clisp.org>
3767
3768         * lib/progname.h (set_program_name): Undefine before defining.
3769
3770 2006-10-25  Bruno Haible  <bruno@clisp.org>
3771
3772         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
3773         false for non-gcc C++ compilers.
3774         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
3775
3776 2006-10-24  Bruno Haible  <bruno@clisp.org>
3777
3778         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
3779         iconv implementations like Irix iconv.
3780
3781 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3782
3783         * modules/vararrays: New file.
3784         * m4/vararrays.m4: New file, taken from diffutils.
3785         * MODULES.html.sh: New module vararrays.
3786
3787 2006-10-24  Karl Berry  <karl@gnu.org>
3788
3789         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
3790         Don't call GNU Unix.
3791
3792 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3793
3794         * users.txt: Add Libtool.
3795
3796         Sync from Libtool:
3797
3798         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3799
3800         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
3801         to gnulib's policy of including config.h unconditionally.
3802
3803 2006-10-24  Bruno Haible  <bruno@clisp.org>
3804
3805         * modules/wcwidth (Files): Add m4/wint_t.m4.
3806         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
3807         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
3808
3809 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3810
3811         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
3812         to pacify GCC with some -W flags enabled.  Problem reported by
3813         Bruno Haible.
3814
3815 2006-10-24  Jim Meyering  <jim@meyering.net>
3816
3817         * MODULES.html.sh: Remove uinttostr.  It's not a module.
3818         Reported by Karl Berry.
3819
3820 2006-10-23  Bruno Haible  <bruno@clisp.org>
3821
3822         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
3823
3824 2006-10-24  Bruno Haible  <bruno@clisp.org>
3825
3826         * lib/gl_list.h: Use C comment style, not C++ comment style.
3827
3828 2006-10-23  Eric Blake  <ebb9@byu.net>
3829
3830         * lib/getaddrinfo.c (includes): Add missing include.
3831
3832 2006-10-23  Bruno Haible  <bruno@clisp.org>
3833             Paul Eggert  <eggert@cs.ucla.edu>
3834
3835         Ability to rename obstack_free.
3836         * lib/obstack.h (__obstack_free): New macro. Declare instead of
3837         obstack_free.
3838         (obstack_free): Invoke the __obstack_free macro.
3839         * lib/obstack.c (obstack_free): Use __obstack_free macro.
3840
3841 2006-10-23  Bruno Haible  <bruno@clisp.org>
3842             Paul Eggert  <eggert@cs.ucla.edu>
3843
3844         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
3845         __argc, __argv from the declaration. (They are defined as macros on
3846         mingw.)
3847
3848 2006-10-22  Bruno Haible  <bruno@clisp.org>
3849
3850         * doc/gnulib-intro.texi: New file.
3851         * doc/gnulib.texi: Include it.
3852
3853 2006-10-21  Bruno Haible  <bruno@clisp.org>
3854
3855         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
3856         "Introduction", "Miscellanous Notes", "Particular Modules".
3857
3858 2006-10-21  Bruno Haible  <bruno@clisp.org>
3859
3860         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3861         Change mostlyclean-local rule to avoid sh syntax error from bash
3862         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
3863
3864 2006-10-23  Jim Meyering  <jim@meyering.net>
3865
3866         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
3867         in place of snprintf.
3868
3869         * modules/inttostr (Files): Add lib/uinttostr.c.
3870         * lib/uinttostr.c (inttostr): New file/function.
3871         * lib/inttostr.h (uinttostr): Declare.
3872         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
3873         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
3874         Add uinttostr.
3875         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
3876
3877 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
3878
3879         * lib/canonicalize.c (ELOOP): Define if not already defined.
3880         Problem reported by Bruno Haible in
3881         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
3882
3883 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
3884
3885         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
3886         Problem reported by Perry Smith and Ville Laurikari.
3887
3888         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
3889         uses.
3890
3891 2006-10-19  Bruno Haible  <bruno@clisp.org>
3892
3893         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
3894         for mingw.
3895
3896 2006-10-19  Bruno Haible  <bruno@clisp.org>
3897
3898         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
3899         Needed for mingw.
3900
3901 2006-10-19  Bruno Haible  <bruno@clisp.org>
3902
3903         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
3904
3905 2006-10-19  Bruno Haible  <bruno@clisp.org>
3906
3907         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
3908         it.
3909
3910 2006-10-19  Bruno Haible  <bruno@clisp.org>
3911
3912         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
3913         invocation.
3914
3915 2006-10-19  Bruno Haible  <bruno@clisp.org>
3916
3917         * gnulib-tool (func_create_testdir): Don't include ftruncate and
3918         mountlist by default.
3919
3920 2006-10-16  Bruno Haible  <bruno@clisp.org>
3921
3922         * lib/c-strstr.c: Include c-strstr.h.
3923
3924 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
3925
3926         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
3927         in a slash.
3928
3929 2006-10-18  Bruno Haible  <bruno@clisp.org>
3930
3931         * lib/lock.h [C++]: Wrap definitions in extern "C".
3932
3933 2006-10-18  Bruno Haible  <bruno@clisp.org>
3934
3935         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
3936         gl_LIBOBJS list.
3937
3938 2006-10-18  Bruno Haible  <bruno@clisp.org>
3939
3940         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
3941
3942 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
3943
3944         * lib/xstrtol.h: Include gettext.h.
3945         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
3946         Problem reported by Eric Blake.
3947         * modules/xstrtol (Depends-on): Add gettext-h.
3948
3949 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
3950
3951         * lib/strftime.c (advance): New macro.
3952         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
3953         incomplete type, so you can't add 0 to it.  Problem and patch
3954         reported by Eelco Dolstra for dietlibc.
3955
3956 2006-10-18  Jim Meyering  <jim@meyering.net>
3957
3958         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
3959         type for a local, and rename it: s/up/user_proc/.
3960
3961 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
3962
3963         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
3964         READ_UTMP_USER_PROCESS.
3965         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
3966
3967 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
3968
3969         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
3970         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
3971
3972 2006-10-17  Eric Blake  <ebb9@byu.net>
3973
3974         * lib/sigprocmask.c (sigprocmask): Fix typo.
3975
3976         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
3977
3978         * modules/clean-temp (Makefile.am): Don't add to make output...
3979         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
3980         config.h.
3981
3982 2006-10-17  Bruno Haible  <bruno@clisp.org>
3983
3984         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
3985         differently if DEFAULT_TEXT_DOMAIN is set.
3986
3987 2006-10-16  Bruno Haible  <bruno@clisp.org>
3988
3989         * lib/clean-temp.c: Include fwriteerror.h.
3990
3991 2006-10-16  Bruno Haible  <bruno@clisp.org>
3992
3993         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
3994
3995 2006-10-16  Bruno Haible  <bruno@clisp.org>
3996
3997         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
3998         * lib/sigprocmask.h: Include <sys/types.h>.
3999         (sigset_t): Use the system's definition if present.
4000
4001 2006-10-17  Eric Blake  <ebb9@byu.net>
4002
4003         * lib/xvasprintf.c (includes): Assume config.h.
4004         * lib/xasprintf.c (includes): Likewise.
4005
4006 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
4007
4008         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
4009         at least as wide as intmax_t.
4010
4011 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
4012
4013         (Imported from Automake.)
4014         * build-aux/gnupload: Update to version 1.1 of directive file.
4015
4016 2006-10-16  Eric Blake  <ebb9@byu.net>
4017
4018         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
4019         match Automake 1.10a.
4020
4021 2006-10-14  Bruno Haible  <bruno@clisp.org>
4022
4023         * modules/sigprocmask: New file.
4024         * lib/sigprocmask.h: New file.
4025         * lib/sigprocmask.c: New file.
4026         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
4027         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
4028         request sigprocmask.o.
4029         (gl_PREREQ_SIGPROCMASK): New macro.
4030         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
4031         (Depends-on): Add sigprocmask.
4032         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
4033         gt_SIGNALBLOCKING. Test for 'raise' only once.
4034         * lib/fatal-signal.c: Include sigprocmask.h.
4035         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
4036         unblock_fatal_signals): Define always.
4037         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
4038         sigprocmask.
4039
4040 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
4041
4042         Sync from Automake.
4043         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
4044         which incorrectly sets the mode of an existing destination
4045         directory.  In some cases the unpatched install-sh could do the
4046         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
4047         system.  We hope this is rare in practice, but it's clearly worth
4048         fixing.  Problem reported by Alex Unleashed in
4049         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
4050         Also, don't bother to check for -m bugs unless we're using -m;
4051         suggested by Stepan Kasal.
4052
4053 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4054
4055         Sync from Automake.
4056         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
4057         `-c' flag, so they appear at the same position as in %FASTDEP%
4058         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
4059         which ignores unknown options only after the first non-option.
4060         Bug report against M4 by Nelson H. F. Beebe.
4061
4062 2006-10-13  Jim Meyering  <jim@meyering.net>
4063
4064         Fix a bug in yesterday's change.
4065         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
4066         p->fts_statp->st_dev would be used uninitialized.
4067         Ensures that we always call fts_stat on the very first entry.
4068         Miklos Szeredi reported that find -xdev stopped working.
4069
4070 2006-10-12  Bruno Haible  <bruno@clisp.org>
4071
4072         * gnulib-tool (func_get_automake_snippet): Append an automatically
4073         computed EXTRA_DIST augmentation.
4074         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
4075         * modules/alloca-opt (Makefile.am): Likewise.
4076         * modules/allocsa (Makefile.am): Likewise.
4077         * modules/arcfour (Makefile.am): Likewise.
4078         * modules/arctwo (Makefile.am): Likewise.
4079         * modules/argmatch (Makefile.am): Likewise.
4080         * modules/argz (Makefile.am): Likewise.
4081         * modules/atexit (Makefile.am): Likewise.
4082         * modules/backupfile (Makefile.am): Likewise.
4083         * modules/byteswap (Makefile.am): Likewise.
4084         * modules/c-strtod (Makefile.am): Likewise.
4085         * modules/c-strtold (Makefile.am): Likewise.
4086         * modules/calloc (Makefile.am): Likewise.
4087         * modules/canon-host (Makefile.am): Likewise.
4088         * modules/canonicalize (Makefile.am): Likewise.
4089         * modules/chdir-long (Makefile.am): Likewise.
4090         * modules/chdir-safer (Makefile.am): Likewise.
4091         * modules/check-version (Makefile.am): Likewise.
4092         * modules/chown (Makefile.am): Likewise.
4093         * modules/cloexec (Makefile.am): Likewise.
4094         * modules/close-stream (Makefile.am): Likewise.
4095         * modules/closeout (Makefile.am): Likewise.
4096         * modules/crc (Makefile.am): Likewise.
4097         * modules/csharpexec (Makefile.am): Likewise.
4098         * modules/cycle-check (Makefile.am): Likewise.
4099         * modules/des (Makefile.am): Likewise.
4100         * modules/dev-ino (Makefile.am): Likewise.
4101         * modules/dirfd (Makefile.am): Likewise.
4102         * modules/dirname (Makefile.am): Likewise.
4103         * modules/dup2 (Makefile.am): Likewise.
4104         * modules/eealloc (Makefile.am): Likewise.
4105         * modules/error (Makefile.am): Likewise.
4106         * modules/euidaccess (Makefile.am): Likewise.
4107         * modules/exclude (Makefile.am): Likewise.
4108         * modules/exitfail (Makefile.am): Likewise.
4109         * modules/fcntl-safer (Makefile.am): Likewise.
4110         * modules/fcntl (Makefile.am): Likewise.
4111         * modules/file-type (Makefile.am): Likewise.
4112         * modules/fileblocks (Makefile.am): Likewise.
4113         * modules/filemode (Makefile.am): Likewise.
4114         * modules/filenamecat (Makefile.am): Likewise.
4115         * modules/fnmatch (Makefile.am): Likewise.
4116         * modules/fopen-safer (Makefile.am): Likewise.
4117         * modules/fpending (Makefile.am): Likewise.
4118         * modules/fprintftime (Makefile.am): Likewise.
4119         * modules/free (Makefile.am): Likewise.
4120         * modules/fsusage (Makefile.am): Likewise.
4121         * modules/ftruncate (Makefile.am): Likewise.
4122         * modules/fts (Makefile.am): Likewise.
4123         * modules/gc-arcfour (Makefile.am): Likewise.
4124         * modules/gc-des (Makefile.am): Likewise.
4125         * modules/gc-hmac-md5 (Makefile.am): Likewise.
4126         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
4127         * modules/gc-md4 (Makefile.am): Likewise.
4128         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
4129         * modules/gc-sha1 (Makefile.am): Likewise.
4130         * modules/gc (Makefile.am): Likewise.
4131         * modules/getaddrinfo (Makefile.am): Likewise.
4132         * modules/getcwd (Makefile.am): Likewise.
4133         * modules/getdelim (Makefile.am): Likewise.
4134         * modules/getdomainname (Makefile.am): Likewise.
4135         * modules/getgroups (Makefile.am): Likewise.
4136         * modules/gethostname (Makefile.am): Likewise.
4137         * modules/gethrxtime (Makefile.am): Likewise.
4138         * modules/getline (Makefile.am): Likewise.
4139         * modules/getloadavg (Makefile.am): Likewise.
4140         * modules/getlogin_r (Makefile.am): Likewise.
4141         * modules/getndelim2 (Makefile.am): Likewise.
4142         * modules/getopt (Makefile.am): Likewise.
4143         * modules/getpagesize (Makefile.am): Likewise.
4144         * modules/getpass-gnu (Makefile.am): Likewise.
4145         * modules/getpass (Makefile.am): Likewise.
4146         * modules/getsubopt (Makefile.am): Likewise.
4147         * modules/gettime (Makefile.am): Likewise.
4148         * modules/gettimeofday (Makefile.am): Likewise.
4149         * modules/getugroups (Makefile.am): Likewise.
4150         * modules/getusershell (Makefile.am): Likewise.
4151         * modules/glob (Makefile.am): Likewise.
4152         * modules/group-member (Makefile.am): Likewise.
4153         * modules/hard-locale (Makefile.am): Likewise.
4154         * modules/hash (Makefile.am): Likewise.
4155         * modules/hmac-md5 (Makefile.am): Likewise.
4156         * modules/hmac-sha1 (Makefile.am): Likewise.
4157         * modules/human (Makefile.am): Likewise.
4158         * modules/idcache (Makefile.am): Likewise.
4159         * modules/imaxabs (Makefile.am): Likewise.
4160         * modules/imaxdiv (Makefile.am): Likewise.
4161         * modules/inet_ntop (Makefile.am): Likewise.
4162         * modules/inet_pton (Makefile.am): Likewise.
4163         * modules/intprops (Makefile.am): Likewise.
4164         * modules/inttostr (Makefile.am): Likewise.
4165         * modules/inttypes (Makefile.am): Likewise.
4166         * modules/isapipe (Makefile.am): Likewise.
4167         * modules/javaversion (Makefile.am): Likewise.
4168         * modules/lchmod (Makefile.am): Likewise.
4169         * modules/lchown (Makefile.am): Likewise.
4170         * modules/localcharset (Makefile.am): Likewise.
4171         * modules/long-options (Makefile.am): Likewise.
4172         * modules/lstat (Makefile.am): Likewise.
4173         * modules/malloc (Makefile.am): Likewise.
4174         * modules/mathl (Makefile.am): Likewise.
4175         * modules/mbchar (Makefile.am): Likewise.
4176         * modules/md2 (Makefile.am): Likewise.
4177         * modules/md4 (Makefile.am): Likewise.
4178         * modules/md5 (Makefile.am): Likewise.
4179         * modules/memcasecmp (Makefile.am): Likewise.
4180         * modules/memchr (Makefile.am): Likewise.
4181         * modules/memcmp (Makefile.am): Likewise.
4182         * modules/memcoll (Makefile.am): Likewise.
4183         * modules/memcpy (Makefile.am): Likewise.
4184         * modules/memmem (Makefile.am): Likewise.
4185         * modules/memmove (Makefile.am): Likewise.
4186         * modules/mempcpy (Makefile.am): Likewise.
4187         * modules/memrchr (Makefile.am): Likewise.
4188         * modules/memset (Makefile.am): Likewise.
4189         * modules/memxor (Makefile.am): Likewise.
4190         * modules/mkancesdirs (Makefile.am): Likewise.
4191         * modules/mkdir-p (Makefile.am): Likewise.
4192         * modules/mkdir (Makefile.am): Likewise.
4193         * modules/mkdtemp (Makefile.am): Likewise.
4194         * modules/mkstemp (Makefile.am): Likewise.
4195         * modules/mktime (Makefile.am): Likewise.
4196         * modules/modechange (Makefile.am): Likewise.
4197         * modules/mountlist (Makefile.am): Likewise.
4198         * modules/nanosleep (Makefile.am): Likewise.
4199         * modules/obstack (Makefile.am): Likewise.
4200         * modules/openat (Makefile.am): Likewise.
4201         * modules/pagealign_alloc (Makefile.am): Likewise.
4202         * modules/pathmax (Makefile.am): Likewise.
4203         * modules/physmem (Makefile.am): Likewise.
4204         * modules/poll (Makefile.am): Likewise.
4205         * modules/posixtm (Makefile.am): Likewise.
4206         * modules/posixver (Makefile.am): Likewise.
4207         * modules/putenv (Makefile.am): Likewise.
4208         * modules/quote (Makefile.am): Likewise.
4209         * modules/quotearg (Makefile.am): Likewise.
4210         * modules/raise (Makefile.am): Likewise.
4211         * modules/read-file (Makefile.am): Likewise.
4212         * modules/readline (Makefile.am): Likewise.
4213         * modules/readlink (Makefile.am): Likewise.
4214         * modules/readtokens (Makefile.am): Likewise.
4215         * modules/readutmp (Makefile.am): Likewise.
4216         * modules/realloc (Makefile.am): Likewise.
4217         * modules/regex (Makefile.am): Likewise.
4218         * modules/rename-dest-slash (Makefile.am): Likewise.
4219         * modules/rename (Makefile.am): Likewise.
4220         * modules/rijndael (Makefile.am): Likewise.
4221         * modules/rmdir (Makefile.am): Likewise.
4222         * modules/rpmatch (Makefile.am): Likewise.
4223         * modules/safe-read (Makefile.am): Likewise.
4224         * modules/safe-write (Makefile.am): Likewise.
4225         * modules/same-inode (Makefile.am): Likewise.
4226         * modules/same (Makefile.am): Likewise.
4227         * modules/save-cwd (Makefile.am): Likewise.
4228         * modules/savedir (Makefile.am): Likewise.
4229         * modules/setenv (Makefile.am): Likewise.
4230         * modules/settime (Makefile.am): Likewise.
4231         * modules/sha1 (Makefile.am): Likewise.
4232         * modules/sig2str (Makefile.am): Likewise.
4233         * modules/snprintf (Makefile.am): Likewise.
4234         * modules/stat-macros (Makefile.am): Likewise.
4235         * modules/stat-time (Makefile.am): Likewise.
4236         * modules/stdbool (Makefile.am): Likewise.
4237         * modules/stdint (Makefile.am): Likewise.
4238         * modules/stdlib-safer (Makefile.am): Likewise.
4239         * modules/stpcpy (Makefile.am): Likewise.
4240         * modules/stpncpy (Makefile.am): Likewise.
4241         * modules/strcase (Makefile.am): Likewise.
4242         * modules/strcasestr (Makefile.am): Likewise.
4243         * modules/strchrnul (Makefile.am): Likewise.
4244         * modules/strcspn (Makefile.am): Likewise.
4245         * modules/strdup (Makefile.am): Likewise.
4246         * modules/strerror (Makefile.am): Likewise.
4247         * modules/strftime (Makefile.am): Likewise.
4248         * modules/strndup (Makefile.am): Likewise.
4249         * modules/strnlen (Makefile.am): Likewise.
4250         * modules/strpbrk (Makefile.am): Likewise.
4251         * modules/strsep (Makefile.am): Likewise.
4252         * modules/strstr (Makefile.am): Likewise.
4253         * modules/strtod (Makefile.am): Likewise.
4254         * modules/strtoimax (Makefile.am): Likewise.
4255         * modules/strtok_r (Makefile.am): Likewise.
4256         * modules/strtol (Makefile.am): Likewise.
4257         * modules/strtoll (Makefile.am): Likewise.
4258         * modules/strtoul (Makefile.am): Likewise.
4259         * modules/strtoull (Makefile.am): Likewise.
4260         * modules/strtoumax (Makefile.am): Likewise.
4261         * modules/strverscmp (Makefile.am): Likewise.
4262         * modules/sys_socket (Makefile.am): Likewise.
4263         * modules/sys_stat (Makefile.am): Likewise.
4264         * modules/sysexits (Makefile.am): Likewise.
4265         * modules/time_r (Makefile.am): Likewise.
4266         * modules/timegm (Makefile.am): Likewise.
4267         * modules/timespec (Makefile.am): Likewise.
4268         * modules/tmpfile-safer (Makefile.am): Likewise.
4269         * modules/trim (Makefile.am): Likewise.
4270         * modules/unistd-safer (Makefile.am): Likewise.
4271         * modules/unlinkdir (Makefile.am): Likewise.
4272         * modules/unlocked-io (Makefile.am): Likewise.
4273         * modules/userspec (Makefile.am): Likewise.
4274         * modules/utime (Makefile.am): Likewise.
4275         * modules/utimecmp (Makefile.am): Likewise.
4276         * modules/utimens (Makefile.am): Likewise.
4277         * modules/vasnprintf (Makefile.am): Likewise.
4278         * modules/vasprintf (Makefile.am): Likewise.
4279         * modules/vsnprintf (Makefile.am): Likewise.
4280         * modules/xalloc (Makefile.am): Likewise.
4281         * modules/xgetcwd (Makefile.am): Likewise.
4282         * modules/xnanosleep (Makefile.am): Likewise.
4283         * modules/xreadlink (Makefile.am): Likewise.
4284         * modules/xstrtod (Makefile.am): Likewise.
4285         * modules/xstrtol (Makefile.am): Likewise.
4286         * modules/xstrtold (Makefile.am): Likewise.
4287         * modules/yesno (Makefile.am): Likewise.
4288         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
4289
4290 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
4291
4292         * modules/error (Makefile.am): Distribute files through
4293         EXTRA_DIST, not lib_SOURCES.
4294
4295 2006-10-12  Eric Blake  <ebb9@byu.net>
4296
4297         * modules/error (Makefile.am): Distribute files in /lib.
4298         * modules/obstack (Makefile.am): Likewise.
4299
4300 2006-10-12  Bruno Haible  <bruno@clisp.org>
4301
4302         * modules/acl (Makefile.am): Distribute all files in lib/ through
4303         EXTRA_DIST.
4304         * modules/arcfour (Makefile.am): Likewise.
4305         * modules/arctwo (Makefile.am): Likewise.
4306         * modules/argmatch (Makefile.am): Likewise.
4307         * modules/argz (Makefile.am): Likewise.
4308         * modules/atexit (Makefile.am): Likewise.
4309         * modules/backupfile (Makefile.am): Likewise.
4310         * modules/c-strtod (Makefile.am): Likewise.
4311         * modules/c-strtold (Makefile.am): Likewise.
4312         * modules/calloc (Makefile.am): Likewise.
4313         * modules/canon-host (Makefile.am): Likewise.
4314         * modules/canonicalize (Makefile.am): Likewise.
4315         * modules/chdir-long (Makefile.am): Likewise.
4316         * modules/chdir-safer (Makefile.am): Likewise.
4317         * modules/check-version (Makefile.am): Likewise.
4318         * modules/chown (Makefile.am): Likewise.
4319         * modules/cloexec (Makefile.am): Likewise.
4320         * modules/close-stream (Makefile.am): Likewise.
4321         * modules/closeout (Makefile.am): Likewise.
4322         * modules/crc (Makefile.am): Likewise.
4323         * modules/cycle-check (Makefile.am): Likewise.
4324         * modules/des (Makefile.am): Likewise.
4325         * modules/dirfd (Makefile.am): Likewise.
4326         * modules/dirname (Makefile.am): Likewise.
4327         * modules/dup2 (Makefile.am): Likewise.
4328         * modules/euidaccess (Makefile.am): Likewise.
4329         * modules/exclude (Makefile.am): Likewise.
4330         * modules/exitfail (Makefile.am): Likewise.
4331         * modules/fcntl-safer (Makefile.am): Likewise.
4332         * modules/file-type (Makefile.am): Likewise.
4333         * modules/fileblocks (Makefile.am): Likewise.
4334         * modules/filemode (Makefile.am): Likewise.
4335         * modules/filenamecat (Makefile.am): Likewise.
4336         * modules/fnmatch (Makefile.am): Likewise.
4337         * modules/fopen-safer (Makefile.am): Likewise.
4338         * modules/fpending (Makefile.am): Likewise.
4339         * modules/fprintftime (Makefile.am): Likewise.
4340         * modules/free (Makefile.am): Likewise.
4341         * modules/fsusage (Makefile.am): Likewise.
4342         * modules/ftruncate (Makefile.am): Likewise.
4343         * modules/fts (Makefile.am): Likewise.
4344         * modules/gc (Makefile.am): Likewise.
4345         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
4346         * modules/getaddrinfo (Makefile.am): Likewise.
4347         * modules/getcwd (Makefile.am): Likewise.
4348         * modules/getdelim (Makefile.am): Likewise.
4349         * modules/getdomainname (Makefile.am): Likewise.
4350         * modules/getgroups (Makefile.am): Likewise.
4351         * modules/gethostname (Makefile.am): Likewise.
4352         * modules/gethrxtime (Makefile.am): Likewise.
4353         * modules/getline (Makefile.am): Likewise.
4354         * modules/getloadavg (Makefile.am): Likewise.
4355         * modules/getlogin_r (Makefile.am): Likewise.
4356         * modules/getopt (Makefile.am): Likewise.
4357         * modules/getpass (Makefile.am): Likewise.
4358         * modules/getpass-gnu (Makefile.am): Likewise.
4359         * modules/getsubopt (Makefile.am): Likewise.
4360         * modules/gettime (Makefile.am): Likewise.
4361         * modules/gettimeofday (Makefile.am): Likewise.
4362         * modules/getugroups (Makefile.am): Likewise.
4363         * modules/getusershell (Makefile.am): Likewise.
4364         * modules/glob (Makefile.am): Likewise.
4365         * modules/group-member (Makefile.am): Likewise.
4366         * modules/hard-locale (Makefile.am): Likewise.
4367         * modules/hash (Makefile.am): Likewise.
4368         * modules/hmac-md5 (Makefile.am): Likewise.
4369         * modules/hmac-sha1 (Makefile.am): Likewise.
4370         * modules/human (Makefile.am): Likewise.
4371         * modules/idcache (Makefile.am): Likewise.
4372         * modules/imaxabs (Makefile.am): Likewise.
4373         * modules/imaxdiv (Makefile.am): Likewise.
4374         * modules/inet_ntop (Makefile.am): Likewise.
4375         * modules/inet_pton (Makefile.am): Likewise.
4376         * modules/inttostr (Makefile.am): Likewise.
4377         * modules/isapipe (Makefile.am): Likewise.
4378         * modules/lchown (Makefile.am): Likewise.
4379         * modules/long-options (Makefile.am): Likewise.
4380         * modules/lstat (Makefile.am): Likewise.
4381         * modules/malloc (Makefile.am): Likewise.
4382         * modules/mathl (Makefile.am): Likewise.
4383         * modules/mbchar (Makefile.am): Likewise.
4384         * modules/md2 (Makefile.am): Likewise.
4385         * modules/md4 (Makefile.am): Likewise.
4386         * modules/md5 (Makefile.am): Likewise.
4387         * modules/memcasecmp (Makefile.am): Likewise.
4388         * modules/memchr (Makefile.am): Likewise.
4389         * modules/memcmp (Makefile.am): Likewise.
4390         * modules/memcoll (Makefile.am): Likewise.
4391         * modules/memcpy (Makefile.am): Likewise.
4392         * modules/memmem (Makefile.am): Likewise.
4393         * modules/memmove (Makefile.am): Likewise.
4394         * modules/mempcpy (Makefile.am): Likewise.
4395         * modules/memrchr (Makefile.am): Likewise.
4396         * modules/memset (Makefile.am): Likewise.
4397         * modules/memxor (Makefile.am): Likewise.
4398         * modules/mkancesdirs (Makefile.am): Likewise.
4399         * modules/mkdir (Makefile.am): Likewise.
4400         * modules/mkdir-p (Makefile.am): Likewise.
4401         * modules/mkdtemp (Makefile.am): Likewise.
4402         * modules/mkstemp (Makefile.am): Likewise.
4403         * modules/mktime (Makefile.am): Likewise.
4404         * modules/modechange (Makefile.am): Likewise.
4405         * modules/mountlist (Makefile.am): Likewise.
4406         * modules/nanosleep (Makefile.am): Likewise.
4407         * modules/openat (Makefile.am): Likewise.
4408         * modules/pagealign_alloc (Makefile.am): Likewise.
4409         * modules/physmem (Makefile.am): Likewise.
4410         * modules/poll (Makefile.am): Likewise.
4411         * modules/posixtm (Makefile.am): Likewise.
4412         * modules/posixver (Makefile.am): Likewise.
4413         * modules/putenv (Makefile.am): Likewise.
4414         * modules/quote (Makefile.am): Likewise.
4415         * modules/quotearg (Makefile.am): Likewise.
4416         * modules/raise (Makefile.am): Likewise.
4417         * modules/read-file (Makefile.am): Likewise.
4418         * modules/readline (Makefile.am): Likewise.
4419         * modules/readlink (Makefile.am): Likewise.
4420         * modules/readtokens (Makefile.am): Likewise.
4421         * modules/readutmp (Makefile.am): Likewise.
4422         * modules/realloc (Makefile.am): Likewise.
4423         * modules/regex (Makefile.am): Likewise.
4424         * modules/rename (Makefile.am): Likewise.
4425         * modules/rename-dest-slash (Makefile.am): Likewise.
4426         * modules/rijndael (Makefile.am): Likewise.
4427         * modules/rmdir (Makefile.am): Likewise.
4428         * modules/rpmatch (Makefile.am): Likewise.
4429         * modules/safe-read (Makefile.am): Likewise.
4430         * modules/safe-write (Makefile.am): Likewise.
4431         * modules/same (Makefile.am): Likewise.
4432         * modules/save-cwd (Makefile.am): Likewise.
4433         * modules/savedir (Makefile.am): Likewise.
4434         * modules/setenv (Makefile.am): Likewise.
4435         * modules/settime (Makefile.am): Likewise.
4436         * modules/sha1 (Makefile.am): Likewise.
4437         * modules/sig2str (Makefile.am): Likewise.
4438         * modules/snprintf (Makefile.am): Likewise.
4439         * modules/stdlib-safer (Makefile.am): Likewise.
4440         * modules/stpcpy (Makefile.am): Likewise.
4441         * modules/stpncpy (Makefile.am): Likewise.
4442         * modules/strcase (Makefile.am): Likewise.
4443         * modules/strcasestr (Makefile.am): Likewise.
4444         * modules/strchrnul (Makefile.am): Likewise.
4445         * modules/strcspn (Makefile.am): Likewise.
4446         * modules/strdup (Makefile.am): Likewise.
4447         * modules/strerror (Makefile.am): Likewise.
4448         * modules/strftime (Makefile.am): Likewise.
4449         * modules/strndup (Makefile.am): Likewise.
4450         * modules/strnlen (Makefile.am): Likewise.
4451         * modules/strpbrk (Makefile.am): Likewise.
4452         * modules/strsep (Makefile.am): Likewise.
4453         * modules/strstr (Makefile.am): Likewise.
4454         * modules/strtod (Makefile.am): Likewise.
4455         * modules/strtoimax (Makefile.am): Likewise.
4456         * modules/strtok_r (Makefile.am): Likewise.
4457         * modules/strtol (Makefile.am): Likewise.
4458         * modules/strtoll (Makefile.am): Likewise.
4459         * modules/strtoul (Makefile.am): Likewise.
4460         * modules/strtoull (Makefile.am): Likewise.
4461         * modules/strtoumax (Makefile.am): Likewise.
4462         * modules/strverscmp (Makefile.am): Likewise.
4463         * modules/time_r (Makefile.am): Likewise.
4464         * modules/timegm (Makefile.am): Likewise.
4465         * modules/tmpfile-safer (Makefile.am): Likewise.
4466         * modules/unistd-safer (Makefile.am): Likewise.
4467         * modules/unlinkdir (Makefile.am): Likewise.
4468         * modules/userspec (Makefile.am): Likewise.
4469         * modules/utime (Makefile.am): Likewise.
4470         * modules/utimecmp (Makefile.am): Likewise.
4471         * modules/utimens (Makefile.am): Likewise.
4472         * modules/vasnprintf (Makefile.am): Likewise.
4473         * modules/vasprintf (Makefile.am): Likewise.
4474         * modules/vsnprintf (Makefile.am): Likewise.
4475         * modules/xalloc (Makefile.am): Likewise.
4476         * modules/xgetcwd (Makefile.am): Likewise.
4477         * modules/xnanosleep (Makefile.am): Likewise.
4478         * modules/xreadlink (Makefile.am): Likewise.
4479         * modules/xstrtod (Makefile.am): Likewise.
4480         * modules/xstrtol (Makefile.am): Likewise.
4481         * modules/xstrtold (Makefile.am): Likewise.
4482         * modules/yesno (Makefile.am): Likewise.
4483
4484 2006-10-12  Jim Meyering  <jim@meyering.net>
4485
4486         * m4/getloadavg.m4: Revert the change below.
4487
4488         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
4489         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
4490         fail with a symlink, which is what coreutils' ./bootstrap now
4491         creates by default.
4492
4493 2006-10-12  Bruno Haible  <bruno@clisp.org>
4494
4495         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
4496         mingw.
4497         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
4498         MSVC and mingw explicitly.
4499
4500 2006-10-11  Simon Josefsson  <jas@extundo.com>
4501             Bruno Haible  <bruno@clisp.org>
4502
4503         Add support for multiple gnulib-tool invocations in the scope of a
4504         single configure.ac file.
4505         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
4506         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
4507         with the same contents as the _LIBADD variable.
4508         (func_emit_initmacro_start, func_emit_initmacro_end,
4509         func_emit_initmacro_done): New functions.
4510         (func_import, func_create_testdir): Invoke them. Allow the identifiers
4511         gl_LIBOBJS and gl_LTLIBOBJS.
4512
4513 2006-10-11  Bruno Haible  <bruno@clisp.org>
4514
4515         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
4516         (func_create_testdir): Don't create po/Makefile.am, don't invoke
4517         autoreconf. Instead, invoke autopoint explicitly but move back the
4518         *.m4 files from gnulib.
4519
4520 2006-10-11  Bruno Haible  <bruno@clisp.org>
4521
4522         * gnulib-tool (func_usage): Make module names after --create-testdir
4523         optional.
4524         (func_create_testdir): If no module was specified, use nearly all
4525         modules.
4526
4527 2006-10-12  Jim Meyering  <jim@meyering.net>
4528
4529         Big performance improvement for fts-based tools that use FTS_NOSTAT.
4530         Avoid spurious inode-mismatch problems on non-POSIX file systems.
4531         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
4532         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
4533         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
4534         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
4535         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
4536         (fts_set_stat_required): New function.
4537         (fts_open): Defer the calls to fts_stat, if possible or requested.
4538         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
4539         into fts_stat itself.
4540         (fts_read): Perform any required (deferred) fts_stat call.
4541         (fts_build): Likewise, for the directory we're about to open and read.
4542         In the readdir loop, carefully decide whether each entry will require
4543         an eventual call to fts_stat, using dirent.d_type info if available.
4544         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
4545         a command line argument into this function.  Update all callers.
4546         Map a return value of FTS_DOT to FTS_D for a command line argument.
4547         * modules/fts (Depends-on): Add d-type.  Alphabetize.
4548         Thanks to Miklos Szeredi for his tenacity and for the initial
4549         bug report about "find" failing on a FUSE-based file system.
4550
4551         * lib/fts.c (fts_open): Use consistent indentation.
4552
4553 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
4554
4555         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
4556         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
4557         reported by Jim Meyering.  All uses of cache variables renamed
4558         to match Autoconf's.
4559         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
4560         the other one.
4561
4562         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
4563         Fix misspelling in diagnostic.
4564
4565 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
4566
4567         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
4568         defined.  Problem reported by Matthew Woehlke.
4569
4570         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
4571         Add support for Tandem NonStop R series.
4572         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
4573         Use new macro.
4574
4575         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
4576         (has_trailing_slash): Omit size arg; all callers changed.
4577         Omit 'inline', since it doesn't help performance and we'd
4578         need to configure it.
4579         Don't count //, ///, etc. as having a trailing slash.
4580         As a side effect, this removes a C99ism reported by Matthew Woehlke.
4581         (rpl_rename_dest_slash): On failure, use rename's errno rather
4582         than (in some cases) an incorrect or junk errno.
4583         Simplify code by removing need to compute length; this does
4584         cause it to make two passes instead of one over the file name,
4585         but it's worth it.
4586
4587         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
4588         change, since Autoconf's version may no longer be appropriate now
4589         that we are using CVS Autoconf's version.  Add support for Tandem.
4590
4591 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
4592             Bruno Haible  <bruno@clisp.org>
4593
4594         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
4595         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
4596         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
4597         gl_AC_TYPE_LONG_LONG.
4598
4599         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
4600         instead of HAVE_LONG_LONG.
4601         * lib/printf-args.c (printf_fetchargs): Likewise.
4602         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
4603         * lib/vasnprintf.c (VASNPRINTF): Likewise.
4604         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
4605         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
4606         gl_AC_TYPE_LONG_LONG.
4607
4608 2006-10-11  Bruno Haible  <bruno@clisp.org>
4609
4610         * m4/longlong.m4: Add comments.
4611         * m4/ulonglong.m4: Likewise.
4612
4613 2006-10-10  Bruno Haible  <bruno@clisp.org>
4614
4615         Make it possible to #define stpcpy, strdup to aliases.
4616         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
4617         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
4618
4619 2006-10-10  Bruno Haible  <bruno@clisp.org>
4620
4621         Make it possible to #define gcd to an alias.
4622         * lib/gcd.c: Include config.h.
4623
4624 2006-10-10  Bruno Haible  <bruno@clisp.org>
4625
4626         Make it possible to #define c_isascii to an alias.
4627         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
4628         defined. Undefine the macros before defining them, to avoid gcc
4629         warnings.
4630         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
4631         define NO_C_CTYPE_MACROS early.
4632
4633 2006-10-10  Bruno Haible  <bruno@clisp.org>
4634
4635         Make it possible to #define set_program_name to an alias.
4636         * lib/progname.c: Don't undefine set_program_name; instead, undefine
4637         ENABLE_RELOCATABLE early.
4638
4639 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
4640
4641         Port to Tandem NSK OSS, which has 64-bit signed int but at most
4642         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
4643         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
4644         More generally, don't assume that 64-bit signed int is available
4645         if unsigned int is, and vice versa.
4646         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
4647         unsigned symbols, not on their signed counterparts.
4648         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
4649         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
4650         (UINT64_C, UINTMAX_C):
4651         Likewise.
4652         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
4653         unsigned counterparts.
4654         (Have_long_long, Unsigned): New macros.
4655         (Int): Renamed from INT.
4656         (strtoimax): Use the new macros.
4657         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
4658         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
4659         * modules/inttypes (inttypes.h): Substitute
4660         HAVE_UNSIGNED_LONG_LONG_INT.
4661         * modules/stdint (stdint.h): Likewise.
4662         (Files): Add m4/ulonglong.m4.
4663
4664 2006-10-10  Bruno Haible  <bruno@clisp.org>
4665
4666         Fix a gcc -Wshadow warning.
4667         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
4668         to 'bucket'.
4669         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
4670         gl_linked_indexof_from_to): Likewise.
4671         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
4672         Likewise.
4673         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
4674         Likewise.
4675         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
4676         Reported by Eric Blake.
4677
4678 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
4679
4680         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
4681         for NetBSD.  Problem reported by Bruno Haible.
4682
4683 2006-10-09  Jim Meyering  <jim@meyering.net>
4684
4685         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
4686         Patch from Bruno Haible.
4687
4688 2006-10-09  Jim Meyering  <jim@meyering.net>
4689
4690         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
4691         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
4692         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
4693
4694 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
4695
4696         Don't include <config.h> twice; this doesn't work in some cases,
4697         e.g., when config.h has "#define intmax_t long long int" and
4698         we include <config.h>, <inttypes.h>, <config.h> in that order.
4699         Problem reported by Matthew Woehlke in:
4700         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
4701         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
4702         * lib/fts-cycle.c: Don't include config.h.
4703         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
4704         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
4705         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
4706         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
4707         inttypes.h.
4708         * lib/xstrtoumax.c: Likewise.
4709         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
4710         __strtol and the like, so that this module is more like its siblings.
4711         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
4712         Remove; no longer needed now that we assume gnulib inttypes.h.
4713
4714 2006-10-08  Bruno Haible  <bruno@clisp.org>
4715
4716         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
4717         option.
4718
4719 2006-10-07  Jim Meyering  <jim@meyering.net>
4720
4721         * modules/inttypes (inttypes.h): Revert what seems to have been
4722         an inadvertent part of today's change: use "|", not "/" in the
4723         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
4724
4725 2006-10-07  Bruno Haible  <bruno@clisp.org>
4726
4727         * modules/sublist: New file.
4728
4729 2006-10-07  Bruno Haible  <bruno@clisp.org>
4730
4731         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
4732         * modules/argz (argz.h): Likewise.
4733         * modules/arpa_inet (arpa/inet.h): Likewise.
4734         * modules/byteswap (byteswap.h): Likewise.
4735         * modules/configmake (configmake.h): Likewise.
4736         * modules/fcntl (fcntl.h): Likewise.
4737         * modules/fnmatch (fnmatch.h): Likewise.
4738         * modules/getopt (getopt.h): Likewise.
4739         * modules/glob (glob.h): Likewise.
4740         * modules/inttypes (inttypes.h): Likewise.
4741         * modules/netinet_in (netinet/in.h): Likewise.
4742         * modules/poll (poll.h): Likewise.
4743         * modules/stdbool (stdbool.h): Likewise.
4744         * modules/stdint (stdint.h): Likewise.
4745         * modules/sys_select (sys/select.h): Likewise.
4746         * modules/sys_socket (sys/socket.h): Likewise.
4747         * modules/sys_stat (sys/stat.h): Likewise.
4748         * modules/sysexits (sysexits.h): Likewise.
4749         * modules/unistd (unistd.h): Likewise.
4750         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4751         Add a "DO NOT EDIT" comment to the generated file.
4752         (func_import): Likewise for gnulib-comp.m4.
4753
4754 2006-10-07  Bruno Haible  <bruno@clisp.org>
4755
4756         * lib/gl_sublist.h: New file.
4757         * lib/gl_sublist.c: New file.
4758
4759 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
4760
4761         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
4762         name (relative to the original working directory) and the file
4763         name component (relative to the temporary working directory).  All
4764         callers changed.
4765         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
4766         * lib/mkdir-p.c (make_dir_parents): Likewise.
4767         * lib/mkdir-p.h (make_dir_parents): Likewise.
4768
4769 2006-10-06  Eric Blake  <ebb9@byu.net>
4770
4771         Define several macros for use by the clean-temp module.
4772         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
4773         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
4774         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
4775
4776         * lib/clean-temp.h (close_stream_temp): New declaration.
4777         * lib/clean-temp.c (includes): Pull in headers according to what
4778         other modules are in use.
4779         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
4780
4781 2006-10-06  Bruno Haible  <bruno@clisp.org>
4782
4783         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
4784         instead of fopen, fwriteerror.
4785
4786 2006-10-06  Bruno Haible  <bruno@clisp.org>
4787
4788         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
4789         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
4790         int.
4791         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
4792         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
4793         Return an error indicator.
4794         Suggested by Eric Blake.
4795
4796 2006-10-06  Bruno Haible  <bruno@clisp.org>
4797
4798         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
4799         Reported by Eric Blake.
4800
4801 2006-10-06  Bruno Haible  <bruno@clisp.org>
4802
4803         * modules/closeout (Description): Mention stderr too.
4804
4805 2006-10-06  Bruno Haible  <bruno@clisp.org>
4806         and Paul Eggert  <eggert@cs.ucla.edu>
4807
4808         * lib/closeout.c (close_stdout): Also close stderr.
4809         * lib/closeout.h: Update comment.
4810
4811 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
4812
4813         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
4814         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
4815         * lib/dirchownmod.c: Include lchown.h.
4816         * lib/lchown.c: Don't include files that lchown.h now includes.
4817         Don't declare chown, since lchown.h now does that.
4818         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
4819         (lchown): Define to rpl_chown if lchown is declared but
4820         does not exist.  Declare using a prototype if lchown is not
4821         declared.  Add a copyright notice.
4822         * lib/mkstemp.h: Include <unistd.h>.
4823         * lib/openat.c: Include lchown.h.
4824
4825         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
4826         we now test for that separately.
4827         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
4828         rather than O_NOFOLLOW, when testing whether it's possible to
4829         avoid a race condition reliably.
4830         * lib/savewd.c (savewd_chdir): Likewise.
4831
4832         Remove macros that are no longer needed now that stdint.h is
4833         reliable.
4834         * lib/fsusage.c (UINTMAX_MAX): Remove.
4835         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
4836         * lib/utimecmp.c (SIZE_MAX): Remove.
4837
4838         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
4839
4840         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
4841         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
4842         O_NOATIME works.
4843
4844 2006-10-05  Bruno Haible  <bruno@clisp.org>
4845
4846         * lib/gl_list.h (gl_sortedlist_search_from_to,
4847         gl_sortedlist_indexof_from_to): New declarations.
4848         (gl_list_implementation): New fields sortedlist_search_from_to,
4849         sortedlist_indexof_from_to.
4850         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
4851         inline functions.
4852         * lib/gl_list.c (gl_sortedlist_search_from_to,
4853         gl_sortedlist_indexof_from_to): New functions.
4854         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
4855         function.
4856         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
4857         (gl_array_sortedlist_search_from_to): New function.
4858         (gl_array_list_implementation): Update.
4859         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
4860         function.
4861         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
4862         (gl_carray_sortedlist_search_from_to): New function.
4863         (gl_carray_list_implementation): Update.
4864         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
4865         gl_linked_sortedlist_indexof_from_to): New functions.
4866         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
4867         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
4868         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
4869         gl_tree_sortedlist_indexof_from_to): New functions.
4870         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
4871         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
4872         Update.
4873         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
4874         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
4875         Update.
4876
4877 2006-10-05  Bruno Haible  <bruno@clisp.org>
4878
4879         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
4880         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
4881         (struct gl_list_implementation): Add fields search_from_to,
4882         indexof_from_to. Remove fields search, indexof.
4883         (gl_list_search): Use the search_from_to method.
4884         (gl_list_search_from, gl_list_search_from_to): New functions.
4885         (gl_list_indexof): Use the indexof_from_to method.
4886         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
4887         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
4888         (gl_list_search_from, gl_list_search_from_to): New functions.
4889         (gl_list_indexof): Use the indexof_from_to method.
4890         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
4891         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
4892         gl_array_indexof. Add start_index, end_index arguments.
4893         (gl_array_search_from_to): Renamed from gl_array_search. Add
4894         start_index, end_index arguments.
4895         (gl_array_remove, gl_array_list_implementation): Update.
4896         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
4897         gl_carray_indexof. Add start_index, end_index arguments.
4898         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
4899         start_index, end_index arguments.
4900         (gl_carray_remove, gl_carray_list_implementation): Update.
4901         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
4902         gl_linked_search. Add start_index, end_index arguments.
4903         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
4904         start_index, end_index arguments.
4905         (gl_linked_remove): Update.
4906         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
4907         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
4908         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
4909         field to 'size_t'.
4910         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
4911         gl_tree_search. Add start_index, end_index arguments.
4912         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
4913         start_index, end_index arguments.
4914         (gl_tree_remove): Update.
4915         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
4916         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
4917         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
4918         function.
4919         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
4920         gl_tree_search. Add start_index, end_index arguments.
4921         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
4922         start_index, end_index arguments.
4923         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
4924         Update.
4925         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
4926
4927 2006-10-05  Bruno Haible  <bruno@clisp.org>
4928
4929         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
4930
4931         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
4932         fwriteerror_temp): New declarations.
4933         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
4934         (descriptors): New variable.
4935         (cleanup): First, close the descriptors.
4936         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
4937         fclose_temp, fwriteerror_temp): New functions.
4938
4939 2006-10-04  Jim Meyering  <jim@meyering.net>
4940
4941         * lib/fts.c (fts_open): Tiny comment change.
4942
4943 2006-10-04  Bruno Haible  <bruno@clisp.org>
4944
4945         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
4946         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
4947         gl_LOCK_BODY.
4948         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
4949         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
4950         gl_LOCK_EARLY_BODY.
4951         (gl_LOCK): Require gl_LOCK_BODY.
4952
4953 2006-10-04  Bruno Haible  <bruno@clisp.org>
4954
4955         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
4956         (gl_oset_search_atleast): New declaration.
4957         (struct gl_oset_implementation): Add field 'search_atleast'.
4958         (gl_oset_search_atleast): New inline function.
4959         * lib/gl_oset.c (gl_oset_search_atleast): New function.
4960         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
4961         (gl_array_oset_implementation): Update.
4962         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
4963         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
4964         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
4965
4966 2006-10-04  Bruno Haible  <bruno@clisp.org>
4967
4968         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
4969
4970 2006-10-03  Bruno Haible  <bruno@clisp.org>
4971
4972         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
4973         from gl_avltreehash_list_implementation.
4974
4975 2006-10-03  Bruno Haible  <bruno@clisp.org>
4976
4977         * lib/gl_oset.c (gl_oset_add): Fix return type.
4978
4979 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
4980
4981         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
4982
4983 2006-10-02  Eric Blake  <ebb9@byu.net>
4984
4985         * modules/strnlen (Depends-on): Add extensions.
4986
4987 2006-10-02  Eric Blake  <ebb9@byu.net>
4988
4989         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
4990         definition in 2.60+.
4991
4992 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
4993
4994         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
4995         checks.
4996
4997 2006-10-02  Bruno Haible  <bruno@clisp.org>
4998
4999         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
5000         to the AUTOMAKE_OPTIONS.
5001         Reported by Jim Meyering.
5002
5003 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
5004
5005         Work around bug in Solaris 10 /proc file system:
5006         /proc/self/fd/NNN/.. isn't the parent directory of
5007         the directory whose file descriptor is NNN.  This needs to
5008         be worked around at run time, not compile time, since a
5009         program might be built on Solaris 8, where things work, and
5010         run on Solaris 10.
5011         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
5012         to use the following interface instead:
5013         (OPENAT_BUFFER_SIZE): New macro.
5014         (openat_proc_name): New function.
5015         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
5016         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
5017         Likewise.
5018         * lib/openat-proc.c: New file.
5019         * modules/openat (Files): Add lib/openat-proc.c.
5020         (Depends-on): Add same-inode, stdbool.
5021         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
5022
5023 2006-09-29  Bruno Haible  <bruno@clisp.org>
5024
5025         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
5026         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
5027         argument. Set stdout_closed before testing for ferror, not after.
5028         (fwriteerror, fwriteerror_no_ebadf): New functions.
5029
5030 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5031
5032         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
5033
5034 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
5035
5036         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
5037         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
5038
5039 2006-09-28  Jim Meyering  <jim@meyering.net>
5040
5041         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
5042         Include <unistd.h>.
5043
5044 2006-09-28  Bruno Haible  <bruno@clisp.org>
5045
5046         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
5047         * modules/linkedhash-list (Depends-on): Likewise.
5048         * modules/rbtreehash-list (Depends-on): Likewise.
5049
5050 2006-09-28  Bruno Haible  <bruno@clisp.org>
5051
5052         * lib/strndup.h: Simplify the redefinition of strndup.
5053         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
5054         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
5055
5056 2006-09-28  Bruno Haible  <bruno@clisp.org>
5057
5058         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
5059         * lib/gl_linkedhash_list.c: Likewise.
5060         * lib/gl_rbtreehash_list.c: Likewise.
5061
5062 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
5063
5064         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
5065         getaddrinfo.
5066
5067         * lib/__fpending.h: Don't include <stdio_ext.h> unless
5068         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
5069         it causes <stdio_ext.h> to cause a compile-time error.
5070         Problem reported by Nelson H. F. Beebe.
5071         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
5072         of HAVE_DECL___PENDING.
5073
5074         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
5075         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
5076         declaration.
5077
5078 2006-09-27  Jim Meyering  <jim@meyering.net>
5079
5080         This file could end up with a definition for a function
5081         named __strndup, rather than rpl_strndup on a system with
5082         incomplete weak_alias support.
5083         * lib/strndup.c (strndup): Rename from __strndup.
5084         Remove #defines that used to map __strndup to strndup.
5085         Don't use K&R prototypes.
5086         Remove LIBC-related code, since this file is not sync'd with glibc.
5087         * lib/strndup.h: Revamp, accordingly.
5088         * m4/strndup.m4: Modernize.
5089
5090 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
5091
5092         * modules/savewd (Depends-on): Add 'raise'.
5093         * lib/savewd.c: Include <signal.h>, for 'raise'.
5094
5095 2006-09-26  Jim Meyering  <jim@meyering.net>
5096
5097         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
5098         when we detect Darwin 8.7.0's acl_get_file bug.
5099         Rearrange to perform the new (below) run-test while $LIBS
5100         contains any acl-related library.  Set USE_ACL at the end.
5101         (gl_ACL_GET_FILE): New function.
5102
5103 2006-09-26  Eric Blake  <ebb9@byu.net>
5104
5105         * lib/verror.c: Include <config.h> unconditionally.
5106
5107 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
5108
5109         * modules/clock-time (Maintainer): Add self.
5110         * modules/getlogin_r (Depends-on): Add extensions.
5111
5112 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5113
5114         * modules/clock-time: New module.
5115         * modules/nanosleep (Depends-on): Add clock-time.
5116         * modules/gethrxtime (Depends-on): Likewise.
5117         * modules/gettime (Depends-on): Likewise.
5118         * modules/settime (Depends-on): Likewise.
5119
5120         * modules/fts-lgpl: Depend on openat.
5121         * modules/mkancesdirs: Depend on savewd.
5122         * modules/mkdir-p: Likewise.
5123
5124 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5125
5126         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
5127
5128         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
5129         `gl_have_arbitrary_file_name_length_limit' to
5130         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
5131         actually works between configure runs.
5132
5133 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5134             Bruno Haible  <bruno@clisp.org>
5135
5136         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
5137
5138 2006-09-25  Jim Meyering  <jim@meyering.net>
5139
5140         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
5141         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
5142
5143 2006-09-25  Eric Blake  <ebb9@byu.net>
5144
5145         * gnulib-tool (func_import, func_create_testdir): Fix typos in
5146         exec's in 2006-09-18 patch when shuffling fds.
5147
5148 2006-09-25  Bruno Haible  <bruno@clisp.org>
5149
5150         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
5151         Reported by Jim Meyering.
5152
5153 2006-09-24  Jim Meyering  <jim@meyering.net>
5154
5155         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
5156         compare a pointer against a literal "0".  That caused failures with
5157         at least HP-UX's hpcc.
5158
5159 2006-09-22  Simon Josefsson  <jas@extundo.com>
5160
5161         * modules/gc-sha1:
5162         * modules/gc-md4:
5163         * modules/gc-hmac-sha1:
5164         * modules/gc-hmac-md5:
5165         * modules/gc-des:
5166         * modules/gc-arcfour: Distribute more files.
5167
5168 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5169
5170         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
5171         (gl_linked_iterator_from_to): Initialize struct completely.
5172         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
5173         (gl_tree_iterator_from_to): Likewise
5174         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
5175         * lib/gl_array_list.c [lint] (gl_array_iterator)
5176         (gl_array_iterator_from_to): Likewise.
5177         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
5178         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
5179         (gl_carray_iterator_from_to): Likewise.
5180
5181         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
5182         * lib/md4.c (md4_process_block): Remove unused variable.
5183         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
5184         parentheses for clarity.
5185
5186 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5187
5188         * modules/bison-i18n (Depends-on): Add gettext.
5189
5190 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5191
5192         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
5193         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
5194         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
5195         also add missing comma that caused broken test.
5196         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
5197         stdlib.h, for `abort'.
5198         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
5199         variables.
5200         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
5201         include unistd.h if present, for `rmdir'.
5202         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
5203         variables.
5204         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
5205         in the process include standard headers for prototypes.
5206         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
5207         gets declared on GNU/Linux.
5208         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
5209         unistd.h, for `rmdir'.
5210         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
5211
5212         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
5213         always true.
5214         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
5215
5216         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
5217
5218 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5219
5220         * gnulib-tool (func_version): Create output all at once.  This
5221         may help avoid triggering unnecessary SIGPIPEs, and at any
5222         rate it doesn't hurt.
5223
5224 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5225             Bruno Haible  <bruno@clisp.org>
5226
5227         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
5228         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
5229         * m4/signed.m4 (bh_C_SIGNED): Likewise.
5230
5231         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
5232         (gl_FUNC_VASPRINTF): Invoke it.
5233
5234 2006-09-22  Bruno Haible  <bruno@clisp.org>
5235
5236         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
5237         getloadavg.c as first argument.
5238
5239 2006-09-22  Bruno Haible  <bruno@clisp.org>
5240
5241         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
5242         at the beginning of the gl_INIT macro.
5243         * modules/getloadavg (configure.ac): Pass $gl_source_base to
5244         gl_GETLOADAVG.
5245
5246 2006-09-22  Bruno Haible  <bruno@clisp.org>
5247
5248         * gnulib-tool (func_create_megatestdir): Don't include the config-h
5249         module.
5250         Suggested by Ralf Wildenhues.
5251
5252 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
5253
5254         Import this patch from libc:
5255
5256         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
5257
5258         * lib/regex_internal.c (re_string_reconstruct): Handle
5259         offset < pstr->valid_raw_len && pstr->offsets_needed case.
5260         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
5261         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
5262         re_string_context_at.
5263
5264         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
5265         now requires it.
5266         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
5267         gl_REGEX now does it for us.
5268         (gl_REGEX): Add test taken from
5269         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
5270
5271         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
5272         Check that large offsets work.  Modernize Autoconf usages.
5273         Prefer "yes" to mean a good thing rather than a bad.
5274         Don't put "#define mkstemp" in config.h, as this might interfere
5275         with standard system headers that "#define mkstemp mkstemp64".
5276
5277         * modules/mkstemp (Depends-on): Add extensions, so that
5278         mkstemp is visible on some platforms.
5279         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
5280         (Include): Change to "mkstemp.h" from <stdlib.h>.
5281         (Files): Add mkstemp.h.
5282
5283         * lib/mkstemp.h: New file, since some standard headers
5284         #define mkstemp.
5285         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
5286         Include "mkstemp.h".
5287         Make the _LIBC code resemble glibc original more,
5288         e.g., use K&R style.
5289         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
5290         (mkstemp): Remove, since mkstemp.h does this for us.
5291         * lib/stdlib--.h: Include mkstemp.h.
5292
5293         Import this patch from libc:
5294
5295         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
5296
5297         * lib/tempname.c (__gen_tempname): Change attempts_min
5298         into a macro.  Use preprocessor to decide how to initialize
5299         attempts [Coverity CID 67].
5300
5301 2006-09-20  Bruno Haible  <bruno@clisp.org>
5302
5303         * lib/mkdtemp.c: Import from libc.
5304         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
5305                 * sysdeps/posix/tempname.c (__gen_tempname): Change
5306                 attempts_min into a macro.  Use preprocessor to decide how to
5307                 initialize attempts [Coverity CID 67].
5308         2001-11-27  Paul Eggert  <eggert@twinsun.com>
5309                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
5310                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
5311
5312 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5313
5314         * gnulib-tool (func_exit): New function, to allow to pass the
5315         exit status portably through the trap.  Use everywhere.
5316         (--help, --version): Signal a write error.
5317         (trap): catch SIGPIPE, for write errors.
5318         Exit at the end of the trap, with the correct exit status.
5319
5320 2006-09-19  Karl Berry  <karl@gnu.org>
5321
5322         * doc/gnulib.texi: note about the license texinfo files.
5323
5324 2006-09-19  Eric Blake  <ebb9@byu.net>
5325
5326         * gnulib-tool: Avoid space-tab.
5327
5328 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
5329
5330         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
5331         that prevented coreutils 6.1 from building.  Problem reported
5332         by Petter Reinholdtsen.
5333
5334 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
5335
5336         * gnulib-tool (avoidlist): Fix typo that broke options like
5337         --avoid=lock that are used by coreutils bootstrap.
5338
5339 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
5340
5341         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
5342         more systematically.
5343
5344 2006-09-18  Jim Meyering  <jim@meyering.net>
5345
5346         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
5347
5348 2006-09-18  Bruno Haible  <bruno@clisp.org>
5349
5350         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
5351
5352 2006-09-18  Bruno Haible  <bruno@clisp.org>
5353
5354         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
5355         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
5356         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
5357         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
5358         * m4/gettext.m4: Require autoconf >= 2.52.
5359         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
5360         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
5361         of gl_cv_header_inttypes_h.
5362
5363 2006-09-18  Bruno Haible  <bruno@clisp.org>
5364
5365         * lib/javaversion.c: Include configmake.h.
5366
5367 2006-09-18  Bruno Haible  <bruno@clisp.org>
5368
5369         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
5370         avoid that the while loops be executed in a subshell.
5371
5372 2006-09-18  Bruno Haible  <bruno@clisp.org>
5373
5374         * MODULES.html.sh (func_module): Break long lines.
5375         Suggested by Bruce Korb <bkorb@gnu.org>.
5376
5377 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5378
5379         Speed up by a factor of 1.12.
5380         * gnulib-tool (nl): New variable.
5381         (func_import): Rewrite include directive extraction to only read each
5382         directive once.
5383
5384 2006-09-17  Bruno Haible  <bruno@clisp.org>
5385
5386         * modules/javaversion (Makefile.am): Remove DEFS setting.
5387         (Depends-on): Add configmake, for PKGDATADIR definition.
5388
5389 2006-09-17  Bruno Haible  <bruno@clisp.org>
5390
5391         * gnulib-tool (func_create_testdir): Rewrite all files at once.
5392
5393 2006-09-17  Bruno Haible  <bruno@clisp.org>
5394
5395         * gnulib-tool (func_append): New function, stolen from libtool.m4.
5396         (func_modules_transitive_closure, func_modules_add_dummy,
5397         func_modules_to_filelist, func_import, func_create_testdir,
5398         func_create_megatestdir, ...): Use it wherever possible.
5399         Suggested by Ralf Wildenhues.
5400
5401 2006-09-16  Karl Berry  <karl@gnu.org>
5402
5403         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
5404         to avoid sectioning errors.
5405         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
5406         [ifinfo]: blank line after @center-ed titles.
5407         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
5408         Spell FSF address consistently with others.
5409         (These changes approved by rms.)
5410
5411 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5412
5413         Speed up by a factor of 1.61.
5414         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
5415         already checked module names again.
5416
5417 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5418
5419         Speed up by a factor of 1.13.
5420         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
5421         for new_files, and the input to func_add_or_update.
5422
5423 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5424
5425         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
5426         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
5427
5428 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
5429
5430         * modules/mkancesdirs (Depends-on): Add fcntl.
5431         * modules/savewd: New file.
5432         * MODULES.html.sh (File system functions): Add savewd.
5433
5434         * modules/configmake (Makefile.am): Add support for the
5435         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
5436
5437 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
5438
5439         * m4/savewd.m4: New file.
5440
5441 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
5442
5443         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
5444         (dirchownmod): New arg FD.  All callers changed.
5445         Use FD rather than opening the directory ourself, as opening is
5446         now the caller's responsibility.
5447         * lib/dirchownmod.h: Likewise.
5448         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
5449         hosts that require <sys/types.h> before <sys/stat.h>.  Include
5450         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
5451         (test_dir): Remove.
5452         (mkancesdirs): Return length of prefix of FILE that has already
5453         been made, or -2 if there is a child doing the work.  Redo
5454         algorithm so that it is O(N) rather than O(N**2).  Optimize away
5455         ".", and treat ".." specially since it might stray back into
5456         already-created areas.  Use a subprocess if necessary.  New arg
5457         WD; all users changed.  MAKE_DIR function should now return 1
5458         if it creates a directory that is not readable.  Return -2 if
5459         a child process is spun off.
5460         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
5461         Adjust signature to match code.
5462         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
5463         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
5464         all users changed.
5465         * lib/savewd.c, lib/savewd.h: New files.
5466
5467 2006-09-15  Jim Meyering  <jim@meyering.net>
5468
5469         * modules/rename-dest-slash: New module.
5470         * MODULES.html.sh (posix_compat): Add it here.
5471
5472         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
5473
5474 2006-09-15  Jim Meyering  <jim@meyering.net>
5475
5476         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
5477         file.
5478
5479         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
5480
5481 2006-09-15  Jim Meyering  <jim@meyering.net>
5482
5483         * lib/rename-dest-slash.c (has_trailing_slash): Use
5484         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
5485         (rpl_rename_dest_slash): Perform the cheaper trailing slash
5486         test before testing whether SRC is a directory.
5487         Suggestions from Bruno Haible.
5488
5489         Avoid a warning about an unused variable.
5490         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
5491         into the #ifdef block where it's used.
5492
5493         * lib/rename-dest-slash.c: New file.
5494
5495 2006-09-14  Bruno Haible  <bruno@clisp.org>
5496
5497         * lib/allocsa.c: Include <config.h> unconditionally.
5498         * lib/asnprintf.c: Likewise.
5499         * lib/asprintf.c: Likewise.
5500         * lib/c-strcasecmp.c: Likewise.
5501         * lib/c-strcasestr.c: Likewise.
5502         * lib/c-strncasecmp.c: Likewise.
5503         * lib/c-strstr.c: Likewise.
5504         * lib/classpath.c: Likewise.
5505         * lib/clean-temp.c: Likewise.
5506         * lib/concatpath.c: Likewise.
5507         * lib/copy-file.c: Likewise.
5508         * lib/csharpcomp.c: Likewise.
5509         * lib/csharpexec.c: Likewise.
5510         * lib/execute.c: Likewise.
5511         * lib/fatal-signal.c: Likewise.
5512         * lib/findprog.c: Likewise.
5513         * lib/fwriteerror.c: Likewise.
5514         * lib/gl_array_list.c: Likewise.
5515         * lib/gl_array_oset.c: Likewise.
5516         * lib/gl_avltree_list.c: Likewise.
5517         * lib/gl_avltree_oset.c: Likewise.
5518         * lib/gl_avltreehash_list.c: Likewise.
5519         * lib/gl_carray_list.c: Likewise.
5520         * lib/gl_linked_list.c: Likewise.
5521         * lib/gl_linkedhash_list.c: Likewise.
5522         * lib/gl_list.c: Likewise.
5523         * lib/gl_oset.c: Likewise.
5524         * lib/gl_rbtree_list.c: Likewise.
5525         * lib/gl_rbtree_oset.c: Likewise.
5526         * lib/gl_rbtreehash_list.c: Likewise.
5527         * lib/imaxabs.c: Likewise.
5528         * lib/imaxdiv.c: Likewise.
5529         * lib/javacomp.c: Likewise.
5530         * lib/javaexec.c: Likewise.
5531         * lib/javaversion.c: Likewise.
5532         * lib/linebreak.c: Likewise.
5533         * lib/localcharset.c: Likewise.
5534         * lib/lock.c: Likewise.
5535         * lib/mbchar.c: Likewise.
5536         * lib/mbswidth.c: Likewise.
5537         * lib/mkdtemp.c: Likewise.
5538         * lib/pipe.c: Likewise.
5539         * lib/printf-args.c: Likewise.
5540         * lib/printf-parse.c: Likewise.
5541         * lib/progname.c: Likewise.
5542         * lib/progreloc.c: Likewise.
5543         * lib/readlink.c: Likewise.
5544         * lib/sh-quote.c: Likewise.
5545         * lib/stpcpy.c: Likewise.
5546         * lib/stpncpy.c: Likewise.
5547         * lib/strcasecmp.c: Likewise.
5548         * lib/strcasestr.c: Likewise.
5549         * lib/strcspn.c: Likewise.
5550         * lib/striconv.c: Likewise.
5551         * lib/strncasecmp.c: Likewise.
5552         * lib/strnlen1.c: Likewise.
5553         * lib/strstr.c: Likewise.
5554         * lib/strtok_r.c: Likewise.
5555         * lib/tls.c: Likewise.
5556         * lib/tmpdir.c: Likewise.
5557         * lib/unicodeio.c: Likewise.
5558         * lib/unsetenv.c: Likewise.
5559         * lib/vasnprintf.c: Likewise.
5560         * lib/vasprintf.c: Likewise.
5561         * lib/wait-process.c: Likewise.
5562         * lib/xallocsa.c: Likewise.
5563         * lib/xsetenv.c: Likewise.
5564         * lib/xstriconv.c: Likewise.
5565
5566 2006-09-13  Simon Josefsson  <jas@extundo.com>
5567
5568         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
5569         that internally, suggested by Ralf Wildenhues
5570         <Ralf.Wildenhues@gmx.de>.
5571
5572 2006-09-13  Simon Josefsson  <jas@extundo.com>
5573
5574         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
5575         @LIBOBJS@.
5576         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5577
5578 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
5579
5580         * lib/_fpending.c: Include <config.h> unconditionally, since we no
5581         longer worry about uses that don't define HAVE_CONFIG_H.
5582         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
5583         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
5584         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
5585         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
5586         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
5587         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
5588         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
5589         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
5590         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
5591         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
5592         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
5593         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
5594         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
5595         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
5596         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
5597         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
5598         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
5599         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
5600         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
5601         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
5602         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
5603         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
5604         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
5605         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
5606         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
5607         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
5608         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
5609         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
5610         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
5611         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
5612         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
5613         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
5614         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
5615         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
5616         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
5617         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
5618         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
5619         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
5620         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
5621         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
5622         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
5623         Likewise.
5624
5625 2006-09-13  Eric Blake  <ebb9@byu.net>
5626
5627         * lib/getopt.c: Fix typo in last commit.
5628
5629 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
5630
5631         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
5632         dgettext.
5633
5634 2006-09-12  Jim Meyering  <jim@meyering.net>
5635
5636         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
5637         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
5638         Reported by Nelson H. F. Beebe.
5639
5640 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
5641
5642         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
5643         program_invocation_name and program_invocation_short_name are
5644         initialized.
5645         * lib/argp-namefrob.h: Move declarations of program_invocation_name
5646         and program_invocation_short_name to argp.h, so they are visible
5647         to user programs.
5648         * lib/argp.h: Likewise
5649
5650 2006-09-10  Bruno Haible  <bruno@clisp.org>
5651
5652         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
5653         m4/inttypes_h.m4, m4/uintmax_t.m4.
5654
5655 2006-09-10  Bruno Haible  <bruno@clisp.org>
5656
5657         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
5658         gl_AC_TYPE_UINTMAX_T.
5659
5660 2006-09-10  Bruno Haible  <bruno@clisp.org>
5661
5662         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
5663
5664 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
5665
5666         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
5667         convention.  Text proposed by Bruno Haible.
5668         (struct argp_option): Document the use of N_() wrappers.
5669
5670         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
5671         '\v', and translate the two parts separately, instead of feeding
5672         the whole string to gettext.  This allows to exclude
5673         '\v' from the strings visible to the translator by writing doc
5674         strings as N_("..") "\v" N_("..").
5675
5676 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
5677
5678         * config/srclist.txt: Undo latest change; the bug was fixed.
5679
5680 2006-09-09  Bruno Haible  <bruno@clisp.org>
5681
5682         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
5683         assignments if building a library without libtool.
5684         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
5685         in func_emit_lib_Makefile_am.
5686         (func_import): When building a static library libfoo.a, arrange to
5687         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
5688         (func_create_testdir): Likewise.
5689         * modules/gc (configure.ac, Makefile.am): If building statically,
5690         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
5691         * modules/iconvme (configure.ac, Makefile.am): Likewise.
5692         * modules/striconv (configure.ac, Makefile.am): Likewise.
5693         Based on a suggestion by Ralf Wildenhues.
5694
5695 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5696
5697         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
5698         Check for unistd.h too, since Autoconf doesn't assume POSIX.
5699         Also:
5700
5701         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5702         Add year_2050_test to catch glibc bug 2821
5703         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
5704
5705         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5706         Prefer #ifdef to #if.
5707
5708         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
5709         Return from 'main' instead of calling 'exit'.
5710
5711 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5712
5713         * lib/mktime.c (guess_time_tm): Fix bug where mktime
5714         returned the maximum time_t value rather than (time_t) -1.
5715         Problem originally reported by William Bardwell
5716         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
5717
5718         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
5719         Moved to here ...
5720         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
5721         ... from here.
5722
5723 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5724
5725         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
5726         2821 is fixed.
5727
5728 2006-09-08  Jim Meyering  <jim@meyering.net>
5729
5730         Don't make generated files read-only.  That would bother too many
5731         people.  However, do retain the ability to work when targets are
5732         read-only: remove the destination and temporary files before writing
5733         them (when generated via sed or echo), or by using the -f option for
5734         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
5735         * modules/alloca-opt, modules/argz, modules/arpa_inet:
5736         * modules/byteswap, modules/configmake, modules/fcntl:
5737         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
5738         * modules/localcharset, modules/netinet_in, modules/poll:
5739         * modules/stdbool, modules/stdint, modules/sys_select:
5740         * modules/sys_socket, modules/sys_stat, modules/sysexits:
5741
5742 2006-09-08  Jim Meyering  <jim@meyering.net>
5743
5744         Avoid new build failure on FreeBSD 6.0.
5745         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
5746         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
5747         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
5748
5749 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5750
5751         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
5752
5753 2006-09-07  Jim Meyering  <jim@meyering.net>
5754
5755         Fix global typo in last change: use chmod u-w, not chmod u-x.
5756         Spotted by Paul Eggert and Bruce Korb.
5757         * modules/alloca-opt, modules/argz, modules/arpa_inet:
5758         * modules/byteswap, modules/configmake, modules/fcntl:
5759         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
5760         * modules/localcharset, modules/netinet_in, modules/poll:
5761         * modules/stdbool, modules/stdint, modules/sys_select:
5762         * modules/sys_socket, modules/sys_stat, modules/sysexits:
5763
5764 2006-09-06  Jim Meyering  <jim@meyering.net>
5765
5766         Make generated files be read-only.
5767         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
5768         Ensure that each generated file is now read-only.
5769         * modules/argz: Likewise.
5770         * modules/arpa_inet: Likewise.
5771         * modules/byteswap: Likewise.
5772         * modules/configmake: Likewise.
5773         * modules/fcntl: Likewise.
5774         * modules/fnmatch: Likewise.
5775         * modules/getopt: Likewise.
5776         * modules/glob: Likewise.
5777         * modules/inttypes: Likewise.
5778         * modules/netinet_in: Likewise.
5779         * modules/poll: Likewise.
5780         * modules/stdbool: Likewise.
5781         * modules/stdint: Likewise.
5782         * modules/sys_select: Likewise.
5783         * modules/sys_socket: Likewise.
5784         * modules/sys_stat: Likewise.
5785         * modules/sysexits: Likewise.
5786         * modules/localcharset: Same as above, but continue using temporary
5787         file named "t-$@" (why different?) rather than the "$@-t" used
5788         everywhere else.
5789
5790         * modules/sysexits (Makefile.am): Replace literal occurrences
5791         of "sysexit.h" more readable, and more consistent, "$@".
5792
5793 2006-09-06  Bruno Haible  <bruno@clisp.org>
5794
5795         * modules/striconv: New file.
5796         * modules/xstriconv: New file.
5797         * MODULES.html.sh (Internationalization functions): Add striconv,
5798         xstriconv.
5799
5800 2006-09-06  Bruno Haible  <bruno@clisp.org>
5801
5802         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
5803         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
5804         not using libtool correctly.
5805
5806 2006-09-06  Bruno Haible  <bruno@clisp.org>
5807
5808         * lib/striconv.h: New file.
5809         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
5810         iconvstring.c.
5811         * lib/xstriconv.h: New file.
5812         * lib/xstriconv.c: New file.
5813
5814 2006-09-06  Bruno Haible  <bruno@clisp.org>
5815
5816         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
5817         lib_..._LDFLAGS.
5818
5819 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5820
5821         * lib/argz_.h: Sync from Libtool.
5822
5823         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
5824                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5825
5826         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
5827
5828 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
5829
5830         * modules/trim: New file.
5831
5832 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
5833
5834         * lib/trim.h: New file.
5835         * lib/trim.c: New file.
5836
5837 2006-09-05  Bruno Haible  <bruno@clisp.org>
5838
5839         * MODULES.html.sh (String handling): Add trim.
5840
5841 2006-09-04  Karl Berry  <karl@gnu.org>
5842
5843         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
5844         until next release.
5845
5846 2006-09-03  Bruno Haible  <bruno@clisp.org>
5847
5848         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
5849         correctly.
5850
5851 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5852
5853         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
5854         not gl_GETLOADAVG.  Omit unneeded semicolons.
5855         Problems reported by Ralf Wildenhues in
5856         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
5857         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
5858         at the end, which is the usual gnulib style.
5859
5860         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
5861         of doing all the work ourselves.
5862         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
5863         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
5864
5865 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5866
5867         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
5868         Problem reported by Ralf Wildenhues in
5869         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
5870
5871         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
5872         HAVE_STRUCT_STATFS_F_FSTYPENAME.
5873
5874 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5875
5876         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
5877         yesterday's patch by changing test -n to test -z.
5878
5879 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5880
5881         * modules/getloadavg (Files): Add m4/getloadavg.m4.
5882         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
5883         the former is now obsolescent.
5884
5885         * modules/chdir-long (Depends-on): Add fcntl.
5886
5887 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5888
5889         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
5890         obsolescent, and programs should use gnulib instead.
5891         * m4/getloadavg.m4: New file, with contents taken from Autoconf
5892         but with prefixes changed.
5893
5894 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5895
5896         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
5897         or stdbool.h, because they might not exist while configuring.
5898
5899         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
5900         Don't include unistd.h or limits.h; not needed, since chdir-long.h
5901         does that for us.
5902         (O_DIRECTORY): Remove.
5903
5904 2006-08-31  Eric Blake  <ebb9@byu.net>
5905
5906         * gnulib-tool: Don't let emacs change spaces to TAB.
5907
5908 2006-08-31  Bruno Haible  <bruno@clisp.org>
5909
5910         * gnulib-tool: When calling func_import more than once, do it in a
5911         subshell.
5912         Reported by Eric Blake <ebb9@byu.net>.
5913
5914 2006-08-31  Bruno Haible  <bruno@clisp.org>
5915
5916         * gnulib-tool (nl): Remove variable.
5917         (sed_transform_lib_file): Use more robust test for config-h module.
5918         (func_import): Fix typo in 2006-08-25 patch.
5919
5920 2006-08-31  Bruno Haible  <bruno@clisp.org>
5921
5922         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
5923         specified, augment Makefile.am variables instead of assigning them.
5924
5925 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5926
5927         Work around a bug in both the Linux and SunOS 64-bit kernels:
5928         nanosleep mishandles sleeps for longer than 2**31 seconds.
5929         Problem reported by Frank v Waveren in
5930         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
5931         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
5932         Check for nanosleep bug.
5933         (LIB_NANOSLEEP): Append clock_gettime library if needed.
5934
5935 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5936
5937         Work around a bug in both the Linux and SunOS 64-bit kernels:
5938         nanosleep mishandles sleeps for longer than 2**31 seconds.
5939         Problem reported by Frank v Waveren in
5940         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
5941         * lib/nanosleep.c (BILLION): New constant.
5942         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
5943         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
5944         implementation.
5945
5946 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5947
5948         * modules/nanosleep (Depends-on): Add gettime.
5949
5950 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5951         and Simon Josefsson  <jas@extundo.com>
5952         and Oskar Liljeblad  <oskar@osk.mine.nu>
5953
5954         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
5955         * gnulib-tool (func_import): New license type 'unmodifiable license
5956         text'.
5957         * modules/fdl: Use it.  Longer description.
5958         * module/gpl, module/lgpl: New files.
5959
5960 2006-08-30  Jim Meyering  <jim@meyering.net>
5961
5962         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
5963         shadowing the parameter.
5964
5965 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5966
5967         Sync from Libtool:
5968
5969         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5970
5971         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
5972         sharing with gnulib.  Report by Eric Blake.
5973
5974 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5975
5976         * modules/isapipe: New file.
5977         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
5978
5979 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5980
5981         * modules/configmake (Makefile.am): Add a comment, and omit
5982         the CONFIGMAKE_ prefix from generated macro names.  Suggested
5983         by Bruno Haible.
5984
5985 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5986
5987         * m4/isapipe.m4: New file.
5988
5989 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5990
5991         * lib/isapipe.c, lib/isapipe.h: New files.
5992
5993 2006-08-29  Jim Meyering  <jim@meyering.net>
5994
5995         * modules/configmake (Makefile.am): Make configmake.h depend on
5996         Makefile.  Otherwise, a stale configmake.h could hang around.
5997
5998 2006-08-29  Eric Blake  <ebb9@byu.net>
5999
6000         * lib/error.c (error_at_line, print_errno_message): Match libc, after
6001         resolution of upstream bug 3044.
6002
6003 2006-08-29  Bruno Haible  <bruno@clisp.org>
6004
6005         * modules/localcharset (Depends-on): Add configmake.
6006         (Makefile.am): Remove setting of LIBDIR through DEFS.
6007
6008 2006-08-29  Bruno Haible  <bruno@clisp.org>
6009
6010         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
6011         defined.
6012
6013 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6014
6015         * modules/fcntl: New file.
6016         * modules/chdir-safer (Depends-on): Add fcntl.
6017         * modules/fts: Likewise.
6018         * modules/mkdir-p: Likewise.
6019
6020         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
6021         This undoes the most recent change, since we're now addressing the
6022         problem in a different way.
6023
6024         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
6025         into output, since the output might be called Makefile.am even
6026         if $makefile_name is something different.
6027         (func_import): Use $makefile_am rather than
6028         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
6029         empty.
6030
6031         * modules/inttypes (Files): Add m4/inttypes-h.m4.
6032
6033 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6034
6035         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
6036         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
6037         recent change to stdint.m4, since we're now addressing the problem in a
6038         different way.
6039
6040 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6041
6042         * m4/fcntl_h.m4: New file.
6043
6044 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6045
6046         * lib/fcntl_.h: New file.
6047         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
6048         the fcntl module.
6049         * lib/dirchownmod.c: Likewise.
6050         * lib/fts.c: Likewise.
6051
6052         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
6053         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
6054         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
6055         just before including <inttypes.h>, to avoid circular inclusion.
6056
6057 2006-08-28  Jim Meyering  <jim@meyering.net>
6058
6059         * doc/visibility.texi: Actually read and correct the grammar of the
6060         sentence affected by yesterday's change.
6061
6062 2006-08-28  Eric Blake  <ebb9@byu.net>
6063
6064         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
6065         needs wrapper.
6066
6067 2006-08-28  Eric Blake  <ebb9@byu.net>
6068
6069         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
6070
6071 2006-08-28  Eric Blake  <ebb9@byu.net>
6072
6073         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
6074
6075 2006-08-28  Bruno Haible  <bruno@clisp.org>
6076
6077         * modules/c-strstr: New file, from GNU gettext.
6078         * MODULES.html.sh (String handling): Add c-strstr.
6079
6080 2006-08-28  Bruno Haible  <bruno@clisp.org>
6081
6082         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
6083         macros.
6084         Reported by Eric Blake.
6085
6086 2006-08-28  Bruno Haible  <bruno@clisp.org>
6087
6088         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
6089         (VASNPRINTF): Return a string of length > INT_MAX without failing.
6090         * lib/vasprintf.c: Include errno.h, limits.h.
6091         (EOVERFLOW): New fallback definition.
6092         (vasprintf): Test here whether the string length is > INT_MAX.
6093         * lib/vsnprintf.c: Include errno.h, limits.h.
6094         (EOVERFLOW): New fallback definition.
6095         (vsnprintf): Fix bug when generated string was too long for the buffer.
6096         Test here whether the string length is > INT_MAX.
6097
6098 2006-08-28  Bruno Haible  <bruno@clisp.org>
6099
6100         * lib/inttypes_.h (SCNX*): Remove definitions.
6101         Reported by Eric Blake.
6102
6103 2006-08-28  Bruno Haible  <bruno@clisp.org>
6104
6105         * lib/c-strstr.h: New file, from GNU gettext.
6106         * lib/c-strstr.c: New file, from GNU gettext.
6107
6108 2006-08-28  Bruno Haible  <bruno@clisp.org>
6109
6110         * gnulib-tool: Reorder some statements.
6111
6112 2006-08-28  Bruno Haible  <bruno@clisp.org>
6113
6114         * gnulib-tool: New option --makefile-name.
6115         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
6116         $makefile_name.
6117         (func_import): Write $makefile_name to the cache file, and read it from
6118         there unless explicitly specified. Use $makefile_name as file name
6119         instead of Makefile.am. Adjust the recommendations accordingly.
6120
6121 2006-08-28  Bruno Haible  <bruno@clisp.org>
6122
6123         * gnulib-tool (func_verify_module): Check against misapplying patch.
6124
6125 2006-08-28  Bruno Haible  <bruno@clisp.org>
6126
6127         * gnulib-tool (func_relativize, func_relconcat): New functions.
6128         Give an error if --local-dir is given with --update.
6129         Remove trailing slashes from $local_gnulib_dir.
6130         (func_import): Store the relativized $local_gnulib_dir in
6131         gnulib-cache.m4, and read it from there if not specified explicitly.
6132
6133 2006-08-28  Bruno Haible  <bruno@clisp.org>
6134
6135         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
6136         is the current directory. Respect also $local_gnulib_dir.
6137
6138 2006-08-28  Bruno Haible  <bruno@clisp.org>
6139             Simon Josefsson  <jas@extundo.com>
6140
6141         BeOS portability.
6142         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
6143
6144 2006-08-27  Jim Meyering  <jim@meyering.net>
6145
6146         * doc/visibility.texi: Remove duplicate word: "pointer".
6147
6148 2006-08-26  Bruno Haible  <bruno@clisp.org>
6149
6150         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
6151         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
6152         (Makefile.am): Create inttypes.h from inttypes_.h.
6153         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
6154
6155         * modules/imaxabs: New file.
6156
6157         * modules/imaxdiv: New file.
6158
6159 2006-08-26  Bruno Haible  <bruno@clisp.org>
6160
6161         * m4/inttypes.m4: New file.
6162         * m4/_inttypes_h.m4: Remove file.
6163         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
6164         PRI_MACROS_BROKEN.
6165         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
6166
6167         * m4/imaxabs.m4: New file.
6168
6169         * m4/imaxdiv.m4: New file.
6170
6171 2006-08-26  Bruno Haible  <bruno@clisp.org>
6172
6173         * lib/inttypes_.h: New file.
6174         * lib/inttypes.h: Remove file.
6175         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
6176
6177         * lib/imaxabs.c: New file.
6178
6179         * lib/imaxdiv.c: New file.
6180
6181 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
6182
6183         New config-h module, so that "make" output needn't be cluttered
6184         by -DHAVE_CONFIG_H.
6185         * MODULES.html.sh (Support for building libraries and executables):
6186         Add config-h.
6187         * modules/config-h: New file.
6188         * gnulib-tool (nl, sed_transform_lib_file): New vars.
6189         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
6190         the config-h module is used.
6191
6192         New configmake module, so that "make" output needn't be cluttered
6193         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
6194         * MODULES.html.sh (Support for building libraries and executables):
6195         Add configmake.
6196         * modules/configmake: New file.
6197
6198 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
6199
6200         * m4/config-h.m4: New file.
6201
6202 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
6203
6204         * config/srclist.txt: Add elisp-comp.
6205
6206 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
6207
6208         * MODULES.html.sh (Support for building libraries and executables):
6209         Add elisp-comp.
6210         * build-aux/elisp-comp: New file.
6211         * modules/elisp-comp: New file.
6212
6213 2006-08-24  Bruno Haible  <bruno@clisp.org>
6214
6215         * gnulib-tool (func_create_testdir): Use non-default values of
6216         sourcebase and m4base.
6217
6218 2006-08-24  Bruno Haible  <bruno@clisp.org>
6219
6220         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
6221         HTML structure.
6222
6223 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
6224
6225         * modules/openat (Depends-on): Add lchown.
6226
6227 2006-08-23  Bruno Haible  <bruno@clisp.org>
6228
6229         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
6230         of gl_LOCK_EARLY instead of gl_LOCK.
6231
6232 2006-08-23  Bruno Haible  <bruno@clisp.org>
6233
6234         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
6235         on OSF/1 to no.
6236         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
6237
6238 2006-08-23  Bruno Haible  <bruno@clisp.org>
6239
6240         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
6241         as unusable.
6242
6243         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
6244         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
6245         (gl_LOCK): New macro.
6246
6247 2006-08-22  Simon Josefsson  <jas@extundo.com>
6248
6249         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
6250         to md5 module.
6251
6252 2006-08-22  Simon Josefsson  <jas@extundo.com>
6253
6254         * MODULES.html.sh: Add "Support for maintaining and release
6255         projects".
6256
6257         * build-aux/gnupload: New file, from coreutils.
6258
6259 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6260
6261         Avoid the need for AC_LIBSOURCES in m4 macros.
6262         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
6263         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
6264         * modules/check-version (EXTRA_DIST): Add check-version.h.
6265         * modules/crc (EXTRA_DIST): Add crc.h.
6266         * modules/des (EXTRA_DIST): Add des.h.
6267         * modules/gc (EXTRA_DIST): Add gc.h.
6268         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
6269         * modules/getline (EXTRA_DIST): Add getline.h.
6270         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
6271         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
6272         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
6273         * modules/md2 (EXTRA_DIST): Add md2.h.
6274         * modules/md4 (EXTRA_DIST): Add md4.h.
6275         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
6276         * modules/read-file (EXTRA_DIST): Add read-file.h.
6277         * modules/readline (EXTRA_DIST): Add readline.h.
6278         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
6279         rijndael-api-fst.h.
6280
6281 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6282
6283         * m4/rijndael.m4 (gl_ARCFOUR):
6284         * m4/arctwo.m4 (gl_ARCTWO):
6285         * m4/check-version.m4 (gl_CHECK_VERSION):
6286         * m4/crc.m4 (gl_CRC):
6287         * m4/des.m4 (gl_DES):
6288         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
6289         * m4/gc.m4 (gl_GC):
6290         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
6291         * m4/getline.m4 (gl_FUNC_GETLINE):
6292         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
6293         * m4/hmac-md5.m4 (gl_HMAC_MD5):
6294         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
6295         * m4/md2.m4 (gl_MD2):
6296         * m4/md4.m4 (gl_MD4):
6297         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
6298         * m4/read-file.m4 (gl_FUNC_READ_FILE):
6299         * m4/readline.m4 (gl_FUNC_READLINE):
6300         * m4/rijndael.m4 (gl_RIJNDAEL):
6301         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
6302         to get the necessary .h files and whatnot.
6303
6304 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6305
6306         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
6307         gnulib rather than the other way around.
6308         * config/srclistvars.sh (COREUTILS): Remove.
6309
6310 2006-08-22  Jim Meyering  <jim@meyering.net>
6311
6312         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
6313
6314         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
6315
6316 2006-08-22  Eric Blake  <ebb9@byu.net>
6317
6318         * modules/regexprops-generic: New file.
6319         * MODULES.html.sh (Support for building documentation): List it.
6320
6321 2006-08-22  Eric Blake  <ebb9@byu.net>
6322
6323         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
6324         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
6325         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
6326         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
6327
6328 2006-08-22  Bruno Haible  <bruno@clisp.org>
6329
6330         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
6331         and lib_LTLIBRARIES like the other lib_* variables.
6332
6333 2006-08-22  Bruno Haible  <bruno@clisp.org>
6334
6335         * build-aux/x-to-1.in: New file, from GNU gettext.
6336
6337 2006-08-22  Bruno Haible  <bruno@clisp.org>
6338
6339         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
6340         <utmpx.h> exists.
6341
6342 2006-08-22  Bruno Haible  <bruno@clisp.org>
6343
6344         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
6345         <utmpx.h> exists.
6346
6347 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6348
6349         BeOS portability.
6350         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
6351         exist.
6352         Problem reported by Bruno Haible.
6353
6354 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6355
6356         Avoid the need for AC_LIBSOURCES in m4 macros.
6357         * modules/acl (EXTRA_DIST): Add acl.h.
6358         * modules/argmatch (Files): Add m4/argmatch.m4.
6359         (configure.ac): Add gl_ARGMATCH.
6360         (EXTRA_DIST): Renamed from lib_SOURCES, for
6361         consistency with the other modules.  Remove argmatch.c.
6362         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
6363         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
6364         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
6365         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
6366         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
6367         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
6368         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
6369         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
6370         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
6371         * modules/closeout (EXTRA_DIST): Add closeout.h.
6372         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
6373         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
6374         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
6375         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
6376         dirname.h; remove basename.c and stripslash.c.
6377         * modules/exclude (EXTRA_DIST): Add exclude.h.
6378         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
6379         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
6380         * modules/file-type (EXTRA_DIST): Add file-type.h.
6381         * modules/filemode (EXTRA_DIST): Add filemode.h.
6382         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
6383         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
6384         * modules/fpending (EXTRA_DIST): Add __fpending.h.
6385         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
6386         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
6387         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
6388         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
6389         * modules/getdate (EXTRA_DIST): Add getdate.c.
6390         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
6391         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
6392         * modules/getpass (EXTRA_DIST): Add getpass.h.
6393         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
6394         * modules/group-member (EXTRA_DIST): Add group-member.h.
6395         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
6396         * modules/hash (EXTRA_DIST): Add hash.h.
6397         * modules/human (EXTRA_DIST): Add human.h.
6398         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
6399         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
6400         * modules/lchown (EXTRA_DIST): Add lchown.h.
6401         * modules/long-options (EXTRA_DIST): Add long-options.h.
6402         * modules/lstat (EXTRA_DIST): Add lstat.h.
6403         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
6404         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
6405         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
6406         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
6407         * modules/memxor (EXTRA_DIST): Add memxor.h.
6408         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
6409         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
6410         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
6411         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
6412         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
6413         * modules/physmem (EXTRA_DIST): Add physmem.h.
6414         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
6415         * modules/posixver (EXTRA_DIST): Add posixver.h.
6416         * modules/quote (EXTRA_DIST): Add quote.h.
6417         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
6418         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
6419         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
6420         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
6421         regex_internal.h regexec.c.
6422         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
6423         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
6424         * modules/same (EXTRA_DIST): Add same.h.
6425         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
6426         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
6427         * modules/savedir (EXTRA_DIST): Add savedir.h.
6428         * modules/sha1 (EXTRA_DIST): Add sha1.h.
6429         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
6430         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
6431         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
6432         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
6433         * modules/strdup (EXTRA_DIST): Add strdup.h.
6434         * modules/strftime (EXTRA_DIST): Add strftime.h.
6435         * modules/strndup (EXTRA_DIST): Add strndup.h.
6436         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
6437         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
6438         * modules/time_r (EXTRA_DIST): Add time_r.h.
6439         * modules/timespec (EXTRA_DIST): Add timespec.h.
6440         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
6441         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
6442         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
6443         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
6444         * modules/userspec (EXTRA_DIST): Add userspec.h.
6445         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
6446         * modules/utimens (EXTRA_DIST): Add utimens.h.
6447         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
6448         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
6449         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
6450         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
6451         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
6452         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
6453         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
6454         * modules/yesno (EXTRA_DIST): Add yesno.h.
6455
6456 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6457
6458         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
6459
6460         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
6461         * m4/dev-ino.m4, same-inode.m4: Remove.
6462
6463         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
6464         * m4/acl.m4 (AC_FUNC_ACL):
6465         * m4/backupfile.m4 (gl_BACKUPFILE):
6466         * m4/c-strtod.m4 (gl_C99_STRTOLD):
6467         * m4/canon-host.m4 (gl_CANON_HOST):
6468         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
6469         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
6470         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
6471         * m4/cloexec.m4 (gl_CLOEXEC):
6472         * m4/close-stream.m4 (gl_CLOSE_STREAM):
6473         * m4/closeout.m4 (gl_CLOSEOUT):
6474         * m4/dirfd.m4 (gl_FUNC_DIRFD):
6475         * m4/dirname.m4 (gl_DIRNAME):
6476         * m4/exclude.m4 (gl_EXCLUDE):
6477         * m4/exitfail.m4 (gl_EXITFAIL):
6478         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
6479         * m4/file-type.m4 (gl_FILE_TYPE):
6480         * m4/filemode.m4 (gl_FILEMODE):
6481         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
6482         * m4/fpending.m4 (gl_FUNC_FPENDING):
6483         * m4/fprintftime.m4 (gl_FPRINTFTIME):
6484         * m4/fts.m4 (gl_FUNC_FTS):
6485         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
6486         * m4/getdate.m4 (gl_GETDATE):
6487         * m4/gethrxtime.m4 (gl_GETHRXTIME):
6488         * m4/getpagesize.m4 (gl_GETPAGESIZE):
6489         * m4/getpass.m4 (gl_FUNC_GETPASS):
6490         * m4/gettime.m4 (gl_GETTIME):
6491         * m4/getugroups.m4 (gl_GETUGROUPS):
6492         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
6493         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
6494         * m4/hard-locale.m4 (gl_HARD_LOCALE):
6495         * m4/hash.m4 (gl_HASH):
6496         * m4/idcache.m4 (gl_IDCACHE):
6497         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
6498         * m4/lchown.m4 (gl_FUNC_LCHOWN):
6499         * m4/long-options.m4 (gl_LONG_OPTIONS):
6500         * m4/lstat.m4 (gl_FUNC_LSTAT):
6501         * m4/md5.m4 (gl_MD5):
6502         * m4/memcasecmp.m4 (gl_MEMCASECMP):
6503         * m4/memcoll.m4 (gl_MEMCOLL):
6504         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
6505         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
6506         * m4/memxor.m4 (gl_MEMXOR):
6507         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
6508         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
6509         * m4/modechange.m4 (gl_MODECHANGE):
6510         * m4/mountlist.m4 (gl_MOUNTLIST):
6511         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
6512         * m4/openat.m4 (gl_FUNC_OPENAT):
6513         * m4/pathmax.m4 (gl_PATHMAX):
6514         * m4/physmem.m4 (gl_PHYSMEM):
6515         * m4/posixtm.m4 (gl_POSIXTM):
6516         * m4/posixver.m4 (gl_POSIXVER):
6517         * m4/quote.m4 (gl_QUOTE):
6518         * m4/quotearg.m4 (gl_QUOTEARG):
6519         * m4/readtokens.m4 (gl_READTOKENS):
6520         * m4/readutmp.m4 (gl_READUTMP):
6521         * m4/regex.m4 (gl_REGEX):
6522         * m4/safe-read.m4 (gl_SAFE_READ):
6523         * m4/safe-write.m4 (gl_SAFE_WRITE):
6524         * m4/same.m4 (gl_SAME):
6525         * m4/save-cwd.m4 (gl_SAVE_CWD):
6526         * m4/savedir.m4 (gl_SAVEDIR):
6527         * m4/settime.m4 (gl_SETTIME):
6528         * m4/sha1.m4 (gl_SHA1):
6529         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
6530         * m4/stat-macros.m4 (gl_STAT_MACROS):
6531         * m4/stat-time.m4 (gl_STAT_TIME):
6532         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
6533         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
6534         * m4/strdup.m4 (gl_FUNC_STRDUP):
6535         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
6536         * m4/strndup.m4 (gl_FUNC_STRNDUP):
6537         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
6538         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
6539         * m4/time_r.m4 (gl_TIME_R):
6540         * m4/timespec.m4 (gl_TIMESPEC):
6541         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
6542         * m4/unlinkdir.m4 (gl_UNLINKDIR):
6543         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
6544         * m4/userspec.m4 (gl_USERSPEC):
6545         * m4/utimecmp.m4 (gl_UTIMECMP):
6546         * m4/utimens.m4 (gl_UTIMENS):
6547         * m4/xalloc.m4 (gl_XALLOC):
6548         * m4/xgetcwd.m4 (gl_XGETCWD):
6549         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
6550         * m4/xreadlink.m4 (gl_XREADLINK):
6551         * m4/xstrtod.m4 (gl_XSTRTOD):
6552         * m4/yesno.m4 (gl_YESNO):
6553         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
6554         to get the necessary .h files and whatnot.
6555
6556 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
6557             Bruno Haible  <bruno@clisp.org>
6558
6559         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
6560         /bin/sh understanding of '!' conditional negation.
6561
6562 2006-08-21  Jim Meyering  <jim@meyering.net>
6563
6564         * modules/openat (Depends-on): Really alphabetize.
6565
6566         * modules/acl (Depends-on): Add error and quote.
6567
6568         * check-module (find_included_lib_files): Add at-func.c to the
6569         ok-to-include-more-than-once white list.
6570
6571         * modules/openat (Depends-on): Add lstat.  Alphabetize.
6572
6573 2006-08-21  Bruno Haible  <bruno@clisp.org>
6574
6575         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6576         Emit a pkgdata_DATA variable only if some snippets add contents to it.
6577         Reported by Martin Lambers <marlam@marlam.de>.
6578
6579 2006-08-21  Bruno Haible  <bruno@clisp.org>
6580
6581         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
6582         specify an installation location, don't emit a noinst_LIBRARIES or
6583         noinst_LTLIBRARIES assignment.
6584
6585 2006-08-21  Bruno Haible  <bruno@clisp.org>
6586
6587         BeOS portability.
6588         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
6589         BeOS has mbrtowc() but no <wctype.h>.
6590
6591 2006-08-21  Bruno Haible  <bruno@clisp.org>
6592
6593         BeOS portability.
6594         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
6595         exist.
6596
6597 2006-08-21  Bruno Haible  <bruno@clisp.org>
6598
6599         BeOS portability.
6600         * lib/mbchar.h: Include <wctype.h> only if it exists.
6601
6602 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
6603
6604         Remove files that are no longer needed by their respective modules.
6605         * m4/obstack.m4: Remove.
6606         * m4/strerror_r.m4: Remove.
6607         * m4/uint32_t.m4: Remove.
6608         * m4/uintptr_t.m4: Remove.
6609         * m4/ullong_max.m4: Remove.
6610         * m4/xstrtoimax.m4: Remove.
6611         * m4/xstrtoumax.m4: Remove.
6612
6613         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
6614         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
6615         dependencies now capture this.
6616
6617         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
6618         Do not use AC_LIBSOURCES, since gnulib modules now do this.
6619         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
6620         * m4/human.m4 (gl_HUMAN): Likewise.
6621         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
6622         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
6623
6624         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
6625
6626         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
6627         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
6628         stdint.
6629         * m4/human.m4 (gl_HUMAN): Likewise.
6630         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
6631         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
6632         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
6633         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
6634         * m4/xstrtol (gl_XSTRTOL): Likewise.
6635
6636         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
6637         AC_TYPE_LONG_LONG_INT.
6638         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
6639         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
6640         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
6641         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
6642
6643         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
6644         on stdbool.
6645
6646         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
6647         (gl_PREREQ_XSTRTOUL): Remove.
6648
6649         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
6650
6651         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
6652         mode.
6653
6654 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
6655
6656         Add and change modules to make it easier for coreutils to use
6657         gnulib-tool.
6658         * modules/backupfile (Files): Remove m4/d-ino.m4.
6659         (Depends-on): Add d-ino.
6660         * modules/cycle-check (Depends-on): Add stdint.
6661         (lib_SOURCES): Add cycle-check.h.
6662         * modules/d-ino: New module.
6663         * modules/d-type: New module.
6664         * modules/error (Files): Remove m4/strerror_r.m4.
6665         * modules/filemode (Files): Add m4/st_dm_mode.m4.
6666         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
6667         m4/inttypes_h.m4, m4/uintmax_t.m4.
6668         (Depends-on): Add stdint.
6669         (lib_SOURCES): Add fsusage.h.
6670         * modules/getcwd (Files): Remove d-ino.m4.
6671         (Depends-on): Add d-ino.
6672         * modules/getndelim2 (Depends-on): Add stdint.
6673         * modules/glob (Files): Remove m4/d-type.m4.
6674         (Depends-on): Add d-type.
6675         * modules/host-os: New module.
6676         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
6677         m4/inttypes_h.m4, m4/uintmax_t.m4.
6678         * Depends-on: Add stdint.
6679         (lib_SOURCES): Add human.h.
6680         * modules/inttostr (Files): Remove m4/intmax_t.m4,
6681         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
6682         m4/uintmax_t.m4, m4/ulonglong.m4.
6683         (Depends-on): Add stdint.
6684         (EXTRA_DIST): Add inttostr.h.
6685         * modules/lchmod: New module.
6686         * modules/link-follow: New module.
6687         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
6688         (Depends-on): Add lchmod.
6689         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
6690         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
6691         (Depends-on): Add stdint.
6692         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
6693         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
6694         (Depends-on): Add stdint.
6695         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
6696         * modules/perl: New module.
6697         * modules/regex (Depends-on): Add stdint.
6698         * modules/rmdir-errno: New module.
6699         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
6700         m4/intmax_t.m4.
6701         (Depends-on): Add stdint.
6702         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
6703         m4/uintmax_t.m4.
6704         (Depends-on): Add stdint.
6705         * modules/unlink-busy: New module.
6706         * modules/utimecmp (Depends-on): Add stdint.
6707         * modules/uptime: New module.
6708         * modules/winsz-ioctl: New module.
6709         * modules/winsz-termios: New module.
6710         * modules/xnanosleep (Depends-on): Add nanosleep.
6711         * modules/ullong_max: Remove.
6712         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
6713         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
6714         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
6715         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
6716         (Depends-on): Add inttypes.
6717         (lib_SOURCES): Add xstrtol.h.
6718         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
6719         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
6720         * MODULES.html.sh: Move 'assert' into the assert section.
6721         Move 'dummy' into the linking section.
6722         Remove ullong_max.
6723         Add section for compatibility checks for POSIX:2001 functions,
6724         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
6725         winsz-ioctl, and winsz-termios into it.
6726         Add lchmod.
6727         Add top-level Misc section and put host-os, perl, and uptime
6728         into it.
6729
6730 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
6731
6732         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
6733         now assume the stdint module.  Do not include inttypes.h.
6734         * lib/fsusage.h: Likewise.
6735         * lib/getndelim2.c: Likewise.
6736         * lib/human.h: Likewise.
6737         * lib/inttostr.h: Likewise.
6738         * lib/obstack.c: Likewise.
6739         * lib/regex_internal.h: Likewise.
6740         * lib/tempname.c: Likewise.
6741         * lib/utimecmp.c: Likewise.
6742         * lib/xstrtol.h: Likewise.
6743
6744         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
6745
6746         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
6747         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
6748         * lib/xtime.h: Likewise.
6749
6750 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
6751
6752         * modules/openat (Files): Add lib/fchmodat.c.
6753         Fixes problem reported by Jay Youngman.
6754
6755 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
6756
6757         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
6758         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
6759
6760 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
6761             Bruno Haible  <bruno@clisp.org>
6762
6763         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
6764         and is a script that invokes bison. Tighten the code. Add comments.
6765
6766 2006-08-18  Jim Meyering  <jim@meyering.net>
6767
6768         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
6769         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
6770         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
6771         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
6772
6773 2006-08-18  Bruno Haible  <bruno@clisp.org>
6774
6775         * modules/bison-i18n: New file.
6776         * MODULES.html.sh (Internationalization functions): Add it.
6777
6778 2006-08-18  Bruno Haible  <bruno@clisp.org>
6779
6780         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
6781         sys/statvfs.h. When getmntinfo was found, check its declaration and
6782         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
6783
6784 2006-08-18  Bruno Haible  <bruno@clisp.org>
6785
6786         * m4/bison-i18n.m4: New file, from bison.
6787
6788 2006-08-18  Bruno Haible  <bruno@clisp.org>
6789
6790         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
6791         (ME_DUMMY): Treat "kernfs" as a dummy.
6792         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
6793
6794 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
6795
6796         Update from coreutils.
6797
6798         2006-08-15  Jim Meyering  <jim@meyering.net>
6799
6800         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
6801
6802         2006-01-17  Jim Meyering  <jim@meyering.net>
6803
6804         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
6805
6806         2006-01-11  Jim Meyering  <jim@meyering.net>
6807
6808         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
6809         Check for the lchmod function.
6810
6811 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
6812
6813         Update from coreutils.
6814
6815         * lib/__fpending.h: Add copyright notice.
6816         * lib/fprintftime.h: Likewise.
6817         * lib/savedir.c: Use (C) in copyright notice.
6818         * lib/savedir.h: Likewise.
6819
6820         2006-08-15  Jim Meyering  <jim@meyering.net>
6821
6822         * lib/at-func.c: New file, with the logic of all emulated at-functions.
6823         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
6824         in support of the EXPECTED_ERRNO macro.
6825         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
6826         definitions.  Instead, define the appropriate symbols and include
6827         "at-func.c".
6828         * lib/mkdirat.c (mkdirat): Likewise.
6829         * lib/fchmodat.c (fchmodat): Likewise.
6830         (ENOSYS): Remove definition.
6831         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
6832         it.  Don't include "unistd--.h" -- it wasn't ever used.
6833
6834         2006-01-17  Jim Meyering  <jim@meyering.net>
6835
6836         Rewrite fts.c not to change the current working directory,
6837         by using openat, fstatat, fdopendir, etc..
6838
6839         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
6840         (HAVE_OPENAT_SUPPORT): Define.
6841         [_LIBC] (fchdir): Don't undef or define; no longer used.
6842         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
6843         Now, this `function' always succeeds, and consumes its file descriptor
6844         parameter -- so callers must not close such FDs.  Update callers.
6845         (diropen_fd, opendirat, cwd_advance_fd): New functions.
6846         (diropen): Add parameter, SP.  Adjust all callers.
6847         Implement using diropen_fd, rather than open.
6848         (fts_open): Initialize new member, fts_cwd_fd.
6849         Remove fts_rft-setting code.
6850         (fts_close): Close fts_cwd_fd, if necessary.
6851         (__opendir2): Define in terms of opendir or opendirat,
6852         depending on whether the FST_NOCHDIR flag is set.
6853         (fts_build): Since fts_safe_changedir consumes its FD, and since
6854         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
6855         and close the dup'd file descriptor upon failure.
6856         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
6857         (fts_safe_changedir): Tweak semantics to reflect that this function
6858         now calls cwd_advance_fd and hence consumes its FD argument.
6859         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
6860         [struct FTS] (fts_rft): Remove now-unused member.
6861         [struct FTS] (fts_cycle.state): Improve comment.
6862
6863         * lib/openat.c (openat_needs_fchdir): New function.
6864         * lib/openat.h (openat_needs_fchdir): Declare it.
6865
6866 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
6867
6868         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
6869         Problem and fix reported by Pádraig Brady in
6870         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
6871
6872 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6873
6874         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
6875
6876 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6877
6878         * lib/memcoll.c (memcoll): Optimize for the common case where the
6879         arguments are bytewise equal.
6880
6881 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6882
6883         * doc/regexprops-generic.texi: Add a copyright notice.
6884
6885 2006-08-15  Bruno Haible  <bruno@clisp.org>
6886
6887         * modules/tmpdir (License): Change to LGPL.
6888
6889 2006-08-15  Bruno Haible  <bruno@clisp.org>
6890
6891         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
6892         module.
6893
6894 2006-08-14  Simon Josefsson  <jas@extundo.com>
6895
6896         * config/srclist.txt: Add gnupload.
6897
6898 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6899
6900         Change copyright notice from LGPL 2 to GPL 2, since that's the
6901         standard form used in the gnulib repository.
6902         * tests/test-lock.c: Likewise.
6903         * tests/test-stdint.c: Likewise.
6904         * tests/test-tls.c: Likewise.
6905
6906         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
6907         prelude-manager.  User shorter URLs for GNU projects, without '?'.
6908         Add copyright notice.
6909
6910         * check-module: Add copyright notice.  Output a copyright
6911         notice if "--version" is specified.
6912         * modules/COPYING: New file.
6913         * tests/test-getaddrinfo.c: Add copyright notice.
6914         * tests/test-verify.c: Likewise.
6915
6916 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6917
6918         Change copyright notice from LGPL 2 to GPL 2, since that's the
6919         standard form used in the gnulib repository.
6920         * lib/lock.c: LGPL -> GPL.
6921         * lib/lock.h: Likewise.
6922         * lib/strnlen1.c: Likewise.
6923         * lib/strnlen1.h: Likewise.
6924         * lib/tls.c: Likewise.
6925         * lib/tls.h: Likewise.
6926         * lib/tmpdir.c: Likewise.
6927
6928         * lib/TODO: Remove; this belongs only in coreutils.
6929
6930 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6931
6932         Add copyright notices to long-enough files that lack them, since
6933         otherwise the files aren't clearly free.  Use the same notice that
6934         getdate.texi already uses.
6935         * doc/alloca-opt.texi: Add copyright notice.
6936         * doc/alloca.texi: Likewise.
6937         * doc/ctime.texi: Likewise.
6938         * doc/functions.texi: Likewise.
6939         * doc/gcd.texi: Likewise.
6940         * doc/gnulib-tool.texi: Likewise.
6941         * doc/inet_ntoa.texi: Likewise.
6942         * doc/visibility.texi: Likewise.
6943
6944         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
6945         * doc/quote.texi: Add copyright notice.
6946
6947         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
6948         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
6949         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
6950         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
6951         is now obsolete, and give a pointer to the Sun list.
6952         Add copyright notice.
6953
6954 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6955
6956         * config/srclistvars.sh: Add copyright notice.
6957
6958 2006-08-14  Eric Blake  <ebb9@byu.net>
6959
6960         Import the following change from libc:
6961
6962         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
6963
6964         Upstream bug 2997.
6965         * lib/misc/error.c: Add space between program name and message if file
6966         name is missing.
6967
6968 2006-08-12  Karl Berry  <karl@gnu.org>
6969
6970         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
6971         remove, these originate in gnulib now.
6972
6973 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6974
6975         * doc/Makefile (standards.info standards.html standards.dvi):
6976         Also depend on make-stds.texi.
6977
6978 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
6979
6980         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
6981         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
6982
6983         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
6984         in wchar_t.  Problem reported by Eric Blake.
6985
6986         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
6987         LEN is smaller than SIZE.  Suggested by Bruno Haible.
6988         Also, help the compiler to keep LEN in a register.
6989
6990 2006-08-11  Eric Blake  <ebb9@byu.net>
6991
6992         * users.txt: Sort.  Add tar.
6993
6994 2006-08-11  Bruno Haible  <bruno@clisp.org>
6995
6996         * users.txt: New file.
6997
6998 2006-08-11  Bruno Haible  <bruno@clisp.org>
6999
7000         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
7001         before <wchar.h>. Needed for OSF/1 and BSD/OS.
7002
7003 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
7004
7005         * modules/snprintf (Depends-on): Remove minmax.
7006         (Maintainer): Add self and Bruno.
7007
7008 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
7009
7010         * lib/.cppi-disable: Add snprintf.h, socket_.h.
7011         * lib/snprintf.c: Include <errno.h> and <limits.h>.
7012         (EOVERFLOW): Define if the system does not.
7013         Do not include "minmax.h"; it wasn't used.
7014         (snprintf): Don't assume size_t promotes to an unsigned type.
7015         Fix bug when generated string was too long for the buffer: the
7016         buffer's contents are supposed to be the initial prefix of the
7017         output.  Don't assume vasnprintf returns EOVERFLOW if the size
7018         exceeds INT_MAX; do the check ourselves.
7019
7020         Import the following changes from libc:
7021
7022         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
7023
7024         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
7025         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
7026         set wc to the byte which couldn't be converted.
7027         (re_string_reconstruct): Don't clear valid_raw_len before calling
7028         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
7029         tip_context using re_string_context_at.
7030
7031         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
7032
7033         * lib/posix/regex.h: g++ still cannot handled [restrict].
7034
7035         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
7036
7037         * lib/posix/regex.h: Remove special handling for VMS.
7038
7039 2006-08-10  Jim Meyering  <jim@meyering.net>
7040
7041         * modules/same-inode: New module.
7042         * modules/dev-ino: New module.
7043         * modules/cycle-check: Depend on these modules, rather than simply
7044         including their .h files.
7045         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
7046         required via m4/cycle-check.m4.
7047         * modules/same: Depend on new same-inode module, rather than
7048         including same-inode.h.
7049         * modules/chdir-safer: New file.
7050
7051         * modules/chown (Depends-on): Add stat-macros.
7052
7053 2006-08-10  Jim Meyering  <jim@meyering.net>
7054
7055         * m4/cycle-check.m4: New file.
7056         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
7057         * m4/dev-ino.m4, m4/same-inode.m4: New files.
7058
7059 2006-08-10  Eric Blake  <ebb9@byu.net>
7060
7061         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
7062         in from original proposal.
7063
7064 2006-08-10  Eric Blake  <ebb9@byu.net>
7065         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7066
7067         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
7068         namespace.
7069
7070 2006-08-10  Bruno Haible  <bruno@clisp.org>
7071
7072         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
7073         as well.
7074
7075 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
7076
7077         Sync from coreutils.
7078
7079         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
7080
7081         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
7082         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
7083
7084 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
7085
7086         * modules/restrict: Remove; no longer needed now that we assume
7087         Autoconf 2.59 or later.
7088         * MODULES.html.sh: Remove 'restrict'.
7089         * modules/argp (Depends-on): Remove 'restrict'.
7090         * modules/base64 (Depends-on): Likewise.
7091         * modules/gc (Depends-on): Likewise.
7092         * modules/getaddrinfo (Depends-on): Likewise.
7093         * modules/glob (Depends-on): Likewise.
7094         * modules/inet_ntop (Depends-on): Likewise.
7095         * modules/inet_pton (Depends-on): Likewise.
7096         * modules/memxor (Depends-on): Likewise.
7097         * modules/regex (Depends-on): Likewise.
7098         * modules/strtok_r (Depends-on): Likewise.
7099         * modules/time_r (Depends-on): Likewise.
7100
7101 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
7102
7103         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
7104         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
7105         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
7106         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
7107         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
7108         * m4/memxor.m4 (gl_MEMXOR): Likewise.
7109         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
7110         gl_C_RESTRICT replaced by AC_C_RESTRICT.
7111
7112         Merge from coreutils.
7113         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
7114         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
7115         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
7116         * m4/time_r.m4 (gl_TIME_R): Likewise.
7117
7118 2006-08-09  Karl Berry  <karl@gnu.org>
7119
7120         * config/srclist.txt: no more gettext-tools, per Bruno.
7121
7122 2006-08-08  Eric Blake  <ebb9@byu.net>
7123
7124         * modules/verror: New module.
7125         * MODULES.html.sh: Document it.
7126
7127 2006-08-08  Eric Blake  <ebb9@byu.net>
7128
7129         * lib/verror.h, lib/verror.c: New files.
7130
7131 2006-08-08  Eric Blake  <ebb9@byu.net>
7132
7133         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
7134         verror_at_line output complies with GNU Coding Standards even when
7135         file is NULL.
7136
7137 2006-08-07  Bruno Haible  <bruno@clisp.org>
7138
7139         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
7140         versions of AIX.
7141         Reported by Ralf Wildenhues.
7142
7143 2006-08-07  Bruno Haible  <bruno@clisp.org>
7144
7145         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
7146         in an AC_DEFUN. Needed so that the autoconf snippets can use
7147         AC_REQUIRE.
7148
7149 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7150
7151         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7152         Initialize pkgdata_DATA.
7153         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
7154         overriding it.
7155
7156 2006-08-06  Eric Blake  <ebb9@byu.net>
7157
7158         * lib/error.h: Fold in some upstream changes from glibc.
7159         * lib/error.c: Likewise.
7160
7161 2006-08-04  Bruno Haible  <bruno@clisp.org>
7162
7163         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7164         Make the mostlyclean-local rule depend on mostlyclean-generic.
7165         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
7166
7167 2006-07-31  Bruno Haible  <bruno@clisp.org>
7168
7169         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
7170         <stdlib.h>, <string.h>.
7171
7172 2006-07-30  Bruno Haible  <bruno@clisp.org>
7173
7174         * modules/readlink (License): Change to LGPL.
7175
7176 2006-07-30  Bruno Haible  <bruno@clisp.org>
7177
7178         * modules/javaversion (Makefile.am): Distribute javaversion.java and
7179         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
7180         set PKGDATADIR to point to it.
7181
7182 2006-07-30  Bruno Haible  <bruno@clisp.org>
7183
7184         * modules/csharpexec (configure.ac): Comment out macro invocation.
7185         * modules/javaexec (configure.ac): Likewise.
7186         * modules/javacomp-script (configure.ac): Likewise.
7187
7188         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
7189
7190 2006-07-30  Bruno Haible  <bruno@clisp.org>
7191
7192         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
7193         linked-list.
7194
7195 2006-07-30  Bruno Haible  <bruno@clisp.org>
7196
7197         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
7198
7199 2006-07-30  Bruno Haible  <bruno@clisp.org>
7200
7201         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7202         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
7203         get removed.
7204
7205 2006-07-29  Bruno Haible  <bruno@clisp.org>
7206
7207         Make it possible for gnulib-tool to work with locally modified or
7208         augmented gnulib repositories.
7209         * gnulib-tool (func_usage): Document --local-dir option.
7210         (local_gnulib_dir): New variable.
7211         Handle --local-dir option.
7212         (func_lookup_file): New function.
7213         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
7214         (func_get_description, func_get_filelist, func_get_description,
7215         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
7216         func_get_automake_snippet, func_get_include_directive,
7217         func_get_license, func_get_maintainer): Use func_lookup_file.
7218         (func_import, func_create_testdir): Use func_lookup_file.
7219
7220 2006-07-29  Bruno Haible  <bruno@clisp.org>
7221
7222         * modules/setenv (Depends-on): Add unistd.
7223
7224 2006-07-29  Bruno Haible  <bruno@clisp.org>
7225
7226         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
7227
7228 2006-07-29  Bruno Haible  <bruno@clisp.org>
7229
7230         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
7231
7232 2006-07-29  Bruno Haible  <bruno@clisp.org>
7233
7234         * gnulib-tool (import, update): If there is no Makefile.am, look at
7235         aclocal.m4, instead of bailing out.
7236
7237 2006-07-29  Bruno Haible  <bruno@clisp.org>
7238
7239         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
7240         Categorize the options by when they are useful.
7241
7242 2006-07-29  Bruno Haible  <bruno@clisp.org>
7243
7244         * gnulib-tool (func_usage): Document option --no-libtool.
7245         Handle option --no-libtool.
7246         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
7247         for changed semantics of $libtool variable.
7248         (func_import): Likewise. If libtool is not used, show this through
7249         an option --no-libtool.
7250         (func_create_testdir): Update.
7251
7252 2006-07-29  Bruno Haible  <bruno@clisp.org>
7253
7254         * gnulib-tool (func_import): Extend error message about missing
7255         --doc-base.
7256
7257 2006-07-29  Bruno Haible  <bruno@clisp.org>
7258
7259         * gnulib-tool (func_import): Don't create the $docbase directory if
7260         there is no file to store there.
7261
7262 2006-07-29  Bruno Haible  <bruno@clisp.org>
7263
7264         * gnulib-tool (autoconf_minversion): If a --dir option is given and
7265         relevant, look for configure.ac there, not in the current directory.
7266         Also use a simple search for AC_PREREQ, not "autoconf --trace".
7267
7268 2006-07-29  Bruno Haible  <bruno@clisp.org>
7269
7270         * gnulib-tool (SORT): New variable.
7271         (func_usage): Undocument --assume-autoconf option.
7272         Remove --assume-autoconf option handling.
7273         (autoconf_minversion): Determine from the contents of configure.ac.
7274         (func_import): Remove autoconf_minversion handling.
7275         Suggested by Eric Blake.
7276
7277 2006-07-29  Bruno Haible  <bruno@clisp.org>
7278
7279         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
7280
7281 2006-07-29  Bruno Haible  <bruno@clisp.org>
7282
7283         * config/srclist.txt (*setenv.[ch]): Remove rules.
7284
7285 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7286
7287         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
7288
7289 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7290
7291         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
7292         arpa/inet.h.
7293
7294 2006-07-28  Simon Josefsson  <jas@extundo.com>
7295
7296         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
7297         * modules/inet_pton (Depends-on): Likewise.
7298
7299 2006-07-28  Simon Josefsson  <jas@extundo.com>
7300
7301         * m4/netinet_in_h.m4: New file.
7302
7303 2006-07-28  Simon Josefsson  <jas@extundo.com>
7304
7305         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
7306         #include's.
7307
7308 2006-07-28  Simon Josefsson  <jas@extundo.com>
7309
7310         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
7311         #include's.
7312
7313 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
7314
7315         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
7316         setgid on directories only if they set these bits.
7317         * lib/modechange.h: Remove obsolete comment about masks.
7318
7319 2006-07-28  Eric Blake  <ebb9@byu.net>
7320
7321         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
7322         macro expansion.
7323
7324 2006-07-28  Bruno Haible  <bruno@clisp.org>
7325
7326         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
7327
7328 2006-07-28  Bruno Haible  <bruno@clisp.org>
7329
7330         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
7331
7332 2006-07-28  Bruno Haible  <bruno@clisp.org>
7333
7334         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
7335         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
7336         Define fallbacks.
7337         Avoids link error on FreeBSD 4.x.
7338         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
7339
7340         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
7341         encoding.
7342         * lib/mbswidth.c (iswcntrl): Likewise.
7343
7344 2006-07-27  Bruno Haible  <bruno@clisp.org>
7345
7346         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
7347         test.
7348
7349 2006-07-27  Bruno Haible  <bruno@clisp.org>
7350
7351         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
7352         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
7353         defined.
7354
7355 2006-07-26  Eric Blake  <ebb9@byu.net>
7356
7357         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
7358
7359 2006-07-26  Eric Blake  <ebb9@byu.net>
7360
7361         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
7362         like mingw that lack mkstemp.
7363         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
7364         avoid compilation warning on mingw.
7365
7366 2006-07-26  Bruno Haible  <bruno@clisp.org>
7367
7368         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
7369         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
7370         INT_FAST*_MIN, INTPTR_MIN.
7371
7372 2006-07-25  Bruno Haible  <bruno@clisp.org>
7373
7374         * modules/version-etc (Depends-on): Add stdarg.
7375
7376 2006-07-25  Bruno Haible  <bruno@clisp.org>
7377
7378         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
7379         complex commands.
7380
7381 2006-07-25  Bruno Haible  <bruno@clisp.org>
7382
7383         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
7384         defined in <stdarg.h> or config.h.
7385
7386 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
7387
7388         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
7389         (gl_STDIO_SAFER): Remove.
7390
7391 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
7392
7393         * MODULES.html.sh (File stream based Input/Output):
7394         Add fopen-safer, tmpfile-safer; remove stdio-safer.
7395         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
7396         * modules/fopen-safer, modules/tmpfile-safer: New files.
7397         * modules/stdio-safer: Remove.
7398
7399 2006-07-24  Bruno Haible  <bruno@clisp.org>
7400
7401         * modules/tmpdir: New file.
7402         * MODULES.html.sh (File system functions): Add it.
7403
7404 2006-07-24  Bruno Haible  <bruno@clisp.org>
7405
7406         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
7407         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
7408
7409 2006-07-24  Bruno Haible  <bruno@clisp.org>
7410
7411         * modules/clean-temp: New file.
7412
7413 2006-07-24  Bruno Haible  <bruno@clisp.org>
7414
7415         * m4/tmpdir.m4: New file, from GNU gettext.
7416
7417 2006-07-24  Bruno Haible  <bruno@clisp.org>
7418
7419         * lib/tmpdir.h: New file, from GNU gettext.
7420         * lib/tmpdir.c: New file, from GNU gettext.
7421
7422 2006-07-24  Bruno Haible  <bruno@clisp.org>
7423
7424         * lib/clean-temp.h: New file, from GNU gettext.
7425         * lib/clean-temp.c: New file, from GNU gettext.
7426
7427 2006-07-23  Eric Blake  <ebb9@byu.net>
7428
7429         * modules/stdio-safer (Files): Add tmpfile-safer.c.
7430         (Depends-on): Add binary-io.
7431
7432 2006-07-23  Eric Blake  <ebb9@byu.net>
7433
7434         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
7435
7436 2006-07-23  Eric Blake  <ebb9@byu.net>
7437
7438         * lib/tmpfile-safer.c: New file.
7439         * lib/stdio-safer.h (fopen_safer): Add prototype.
7440         * lib/stdio--.h (tmpfile): Make safer.
7441
7442 2006-07-23  Bruno Haible  <bruno@clisp.org>
7443
7444         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
7445         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
7446         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
7447         gl_linked_remove_at): Use it.
7448
7449 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7450         and Simon Josefsson <jas@extundo.com>
7451
7452         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
7453
7454         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
7455
7456 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
7457
7458         * modules/close-stream: New file.
7459         * modules/closeout (Description): Make it clear that it exits
7460         with a diagnostic on error.
7461         (Depends-on): Add close-stream.  Remove fpending, stdbool.
7462         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
7463
7464 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
7465
7466         * m4/close-stream.m4: New file.
7467
7468 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
7469
7470         * lib/close-stream.c, lib/close-stream.h: New files.
7471
7472 2006-07-22  Bruno Haible  <bruno@clisp.org>
7473
7474         Merge from GNU gettext 0.15.
7475
7476         2006-05-01  Bruno Haible  <bruno@clisp.org>
7477
7478                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
7479
7480         2006-07-22  Bruno Haible  <bruno@clisp.org>
7481
7482                 * modules/javaversion: New file.
7483                 * MODULES.html.sh (Java): Add javaversion.
7484
7485         2006-03-12  Bruno Haible  <bruno@clisp.org>
7486
7487                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
7488
7489         2005-12-04  Bruno Haible  <bruno@clisp.org>
7490
7491                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
7492                 (untested).
7493
7494         2006-06-21  Bruno Haible  <bruno@clisp.org>
7495
7496                 Avoid warnings from recent versions of mcs.
7497                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
7498                 -o, -L, -r any more. Use options documented since mcs-1.0
7499                 instead. Similarly for -g.
7500
7501         2005-12-04  Bruno Haible  <bruno@clisp.org>
7502
7503                 * build-aux/csharpcomp.sh.in: Suffix for resources is
7504                 .resources, not .resource.
7505
7506         2005-07-09  Bruno Haible  <bruno@clisp.org>
7507
7508                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
7509                 add a .dll suffix.
7510                 Reported by Mark Junker <mjscod@gmx.de>.
7511
7512         2006-07-22  Bruno Haible  <bruno@clisp.org>
7513
7514                 * modules/gettext: Upgrade to gettext-0.15.
7515                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
7516                 m4/visibility.m4.
7517                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
7518
7519 2006-07-22  Bruno Haible  <bruno@clisp.org>
7520
7521         Merge from GNU gettext 0.15.
7522
7523         2006-03-25  Bruno Haible  <bruno@clisp.org>
7524
7525                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
7526
7527         2006-07-21  Bruno Haible  <bruno@clisp.org>
7528
7529                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
7530                 "1.1".
7531
7532         2006-05-09  Bruno Haible  <bruno@clisp.org>
7533
7534                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
7535                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
7536                 for the conftestver execution.
7537
7538         2006-05-01  Bruno Haible  <bruno@clisp.org>
7539
7540                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
7541                 optional target-version argument. Verify that the compiler
7542                 groks source of the specified source-version, or add -source
7543                 option as necessary. Verify that the compiler produces
7544                 bytecode in the specified target-version, or add -target and
7545                 -source options as necessary. Make the result of the test
7546                 available as variable CONF_JAVAC. Also log error output in
7547                 config.log.
7548
7549         2006-03-11  Bruno Haible  <bruno@clisp.org>
7550
7551                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
7552
7553         2006-05-09  Bruno Haible  <bruno@clisp.org>
7554
7555                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
7556                 CLASSPATH_SEPARATOR to a semicolon.
7557
7558         2006-03-12  Bruno Haible  <bruno@clisp.org>
7559
7560                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
7561                 available as variable CONF_JAVA, for subsequent autoconf
7562                 tests. Also log error output in config.log.
7563
7564         2006-07-19  Bruno Haible  <bruno@clisp.org>
7565
7566                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
7567                 that getline works on glibc2 systems. Needed to avoid trouble
7568                 in relocatable.c.
7569                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
7570
7571         2005-12-04  Bruno Haible  <bruno@clisp.org>
7572
7573                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
7574                 launcher (untested).
7575
7576         2005-12-04  Bruno Haible  <bruno@clisp.org>
7577
7578                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
7579
7580         2006-07-22  Bruno Haible  <bruno@clisp.org>
7581
7582                 * gettext.m4: Update from GNU gettext-0.15.
7583                 * nls.m4: Likewise.
7584                 * po.m4: Likewise.
7585                 * inttypes-pri.m4: Likewise.
7586                 * inttypes-h.m4: Renamed from inttypes.m4.
7587                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
7588
7589 2006-07-22  Bruno Haible  <bruno@clisp.org>
7590
7591         Merge from GNU gettext 0.15.
7592
7593         2005-07-05  Bruno Haible  <bruno@clisp.org>
7594
7595                 * printf-args.c (printf_fetchargs): Work around broken
7596                 definition of wint_t on mingw.
7597
7598         2005-02-12  Bruno Haible  <bruno@clisp.org>
7599
7600                 * xallocsa.h: Add extern "C" for C++.
7601
7602         2006-05-17  Bruno Haible  <bruno@clisp.org>
7603
7604                 Cygwin portability.
7605                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
7606
7607         2006-04-30  Bruno Haible  <bruno@clisp.org>
7608
7609                 * progreloc.c: Include <mach-o/dyld.h> if available.
7610                 (find_executable): Use _NSGetExecutablePath when possible.
7611
7612         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
7613
7614                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
7615                 function.
7616
7617         2005-12-29  Bruno Haible  <bruno@clisp.org>
7618
7619                 * progreloc.c (set_program_name_and_installdir): Fix
7620                 compilation error.
7621
7622         2005-12-04  Bruno Haible  <bruno@clisp.org>
7623
7624                 Cygwin portability.
7625                 * progreloc.c: Include <windows.h> also on Cygwin.
7626                 (find_executable): Add support for Cygwin.
7627                 (set_program_name_and_installdir): Handle also platforms with
7628                 nonempty EXEEXT.
7629
7630         2006-07-11  Bruno Haible  <bruno@clisp.org>
7631
7632                 * javacomp.c: Fix a comment.
7633                 Reported by Jim Meyering.
7634
7635         2006-04-30  Bruno Haible  <bruno@clisp.org>
7636
7637                 * javacomp.h (compile_java_class): Add source_version,
7638                 target_version arguments.
7639                 * javacomp.c: Rewritten to choose only a compiler that
7640                 respects the specified source_version and target_version.
7641
7642         2006-06-27  Bruno Haible  <bruno@clisp.org>
7643
7644                 Assume correct S_ISDIR macro.
7645                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
7646
7647         2006-07-22  Bruno Haible  <bruno@clisp.org>
7648
7649                 * javaversion.h: New file, from GNU gettext.
7650                 * javaversion.c: New file, from GNU gettext.
7651                 * javaversion.java: New file, from GNU gettext.
7652                 * javaversion.class: New file, from GNU gettext.
7653
7654         2006-05-17  Bruno Haible  <bruno@clisp.org>
7655
7656                 Cygwin portability.
7657                 * javaexec.c (execute_java_class): Test for jview program
7658                 also on Cygwin.
7659
7660         2006-04-09  Bruno Haible  <bruno@clisp.org>
7661
7662                 * fatal-signal.c: Don't include string.h.
7663                 (at_fatal_signal): Use a copying loop instead of memcpy.
7664
7665         2005-12-04  Bruno Haible  <bruno@clisp.org>
7666
7667                 * csharpexec.c: Add support for 'clix' launcher (untested).
7668                 (execute_csharp_using_sscli): New function.
7669                 (execute_csharp_program): Call it.
7670
7671         2006-06-21  Bruno Haible  <bruno@clisp.org>
7672
7673                 Avoid warnings from recent versions of mcs.
7674                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
7675                 -o, -L, -r any more. Use options documented since mcs-1.0
7676                 instead. Similarly for -g.
7677
7678         2005-07-09  Bruno Haible  <bruno@clisp.org>
7679
7680                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
7681                 add a .dll suffix.
7682                 Reported by Mark Junker <mjscod@gmx.de>.
7683
7684         2006-06-17  Bruno Haible  <bruno@clisp.org>
7685
7686                 * config.charset: Update for NetBSD 3.0.
7687
7688         2006-05-17  Bruno Haible  <bruno@clisp.org>
7689
7690                 Cygwin portability.
7691                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
7692
7693         2006-05-16  Bruno Haible  <bruno@clisp.org>
7694
7695                 * localcharset.c [CYGWIN]: Include <windows.h>.
7696                 (get_charset_aliases): For Cygwin, return the same CPxxx
7697                 aliases list as under WIN32.
7698                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
7699                 the environment variables. Fall back to GetACP().
7700
7701         2006-04-05  Bruno Haible  <bruno@clisp.org>
7702
7703                 * config.charset: Update Juan Manuel Guerrero's address.
7704
7705         2005-02-12  Bruno Haible  <bruno@clisp.org>
7706
7707                 * allocsa.h: Add extern "C" for C++.
7708
7709         2005-02-10  Bruno Haible  <bruno@clisp.org>
7710
7711                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
7712                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
7713
7714         2006-07-22  Bruno Haible  <bruno@clisp.org>
7715
7716                 * gettext.h: Update to GNU gettext-0.15.
7717
7718 2006-07-22  Bruno Haible  <bruno@clisp.org>
7719
7720         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
7721         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
7722         lib-prefix.m4, longdouble.m4, ssize_t.m4.
7723
7724 2006-07-21  Eric Blake  <ebb9@byu.net>
7725
7726         * modules/stdlib-safer: New file.
7727         * MODULES.html.sh (File stream based Input/Output): Add
7728         stdlib-safer.
7729
7730 2006-07-21  Eric Blake  <ebb9@byu.net>
7731
7732         * lib/stdlib-safer.h: New file from coreutils, required by
7733         stdlib--.h.
7734
7735 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
7736
7737         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
7738
7739 2006-07-20  Bruno Haible  <bruno@clisp.org>
7740
7741         * gnulib-tool: Recognize new option --assume-autoconf.
7742         (autoconf_minversion): New variable.
7743         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
7744
7745 2006-07-20  Bruno Haible  <bruno@clisp.org>
7746
7747         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
7748
7749 2006-07-19  Derek R. Price  <derek@ximbiot.com>
7750
7751         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
7752         Reindent and repaginate.
7753
7754 2006-07-19  Derek Price  <derek@ximbiot.com>
7755
7756         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
7757         Correct grammar.
7758
7759 2006-07-17  Bruno Haible  <bruno@clisp.org>
7760
7761         * modules/list: New file.
7762         * modules/array-list: New file.
7763         * modules/carray-list, modules/carray-list-tests: New files.
7764         * modules/linked-list, modules/linked-list-tests: New files.
7765         * modules/avltree-list, modules/avltree-list-tests: New files.
7766         * modules/rbtree-list, modules/rbtree-list-tests: New files.
7767         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
7768         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
7769         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
7770         * modules/oset: New file.
7771         * modules/array-oset: New file.
7772         * modules/avltree-oset, modules/avltree-oset-tests: New files.
7773         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
7774         * tests/test-carray_list.c: New file.
7775         * tests/test-linked_list.c: New file.
7776         * tests/test-avltree_list.c: New file.
7777         * tests/test-rbtree_list.c: New file.
7778         * tests/test-linkedhash_list.c: New file.
7779         * tests/test-avltreehash_list.c: New file.
7780         * tests/test-rbtreehash_list.c: New file.
7781         * tests/test-avltree_oset.c: New file.
7782         * tests/test-rbtree_oset.c: New file.
7783         * MODULES.html.sh (Container data structures): New section.
7784
7785 2006-07-17  Bruno Haible  <bruno@clisp.org>
7786
7787         * m4/gl_list.m4: New file.
7788
7789 2006-07-17  Bruno Haible  <bruno@clisp.org>
7790
7791         * lib/gl_list.h: New file.
7792         * lib/gl_list.c: New file.
7793         * lib/gl_array_list.h: New file.
7794         * lib/gl_array_list.c: New file.
7795         * lib/gl_carray_list.h: New file.
7796         * lib/gl_carray_list.c: New file.
7797         * lib/gl_linked_list.h: New file.
7798         * lib/gl_linked_list.c: New file.
7799         * lib/gl_anylinked_list1.h: New file.
7800         * lib/gl_anylinked_list2.h: New file.
7801         * lib/gl_avltree_list.h: New file.
7802         * lib/gl_avltree_list.c: New file.
7803         * lib/gl_anyavltree_list1.h: New file.
7804         * lib/gl_anyavltree_list2.h: New file.
7805         * lib/gl_rbtree_list.h: New file.
7806         * lib/gl_rbtree_list.c: New file.
7807         * lib/gl_anyrbtree_list1.h: New file.
7808         * lib/gl_anyrbtree_list2.h: New file.
7809         * lib/gl_anytree_list1.h: New file.
7810         * lib/gl_anytree_list2.h: New file.
7811         * lib/gl_linkedhash_list.h: New file.
7812         * lib/gl_linkedhash_list.c: New file.
7813         * lib/gl_anyhash_list1.h: New file.
7814         * lib/gl_anyhash_list2.h: New file.
7815         * lib/gl_avltreehash_list.h: New file.
7816         * lib/gl_avltreehash_list.c: New file.
7817         * lib/gl_rbtreehash_list.h: New file.
7818         * lib/gl_rbtreehash_list.c: New file.
7819         * lib/gl_anytreehash_list1.h: New file.
7820         * lib/gl_anytreehash_list2.h: New file.
7821
7822         * lib/gl_oset.h: New file.
7823         * lib/gl_oset.c: New file.
7824         * lib/gl_array_oset.h: New file.
7825         * lib/gl_array_oset.c: New file.
7826         * lib/gl_avltree_oset.h: New file.
7827         * lib/gl_avltree_oset.c: New file.
7828         * lib/gl_rbtree_oset.h: New file.
7829         * lib/gl_rbtree_oset.c: New file.
7830         * lib/gl_anytree_oset.h: New file.
7831
7832 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7833
7834         * m4/mkancesdirs.m4: New file.
7835         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
7836         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
7837         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
7838         it.
7839
7840 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7841
7842         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
7843         * lib/mkancesdirs.h: New files.
7844         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
7845         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
7846         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
7847         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
7848         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
7849         callers changed.  Revamp internals significantly, by not
7850         attempting to create directories that are temporarily more
7851         permissive than the final results.  Do not attempt to use
7852         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
7853         This removes some race conditions, fixes some bugs, and simplifies
7854         things.  Use new dirchownmod function to do owner and mode changes.
7855         * lib/mkdir-p.h: Likewise.
7856         * lib/modechange.c (octal_to_mode): New function.
7857         (struct mode_change): New member mentioned.
7858         (make_node_op_equals): New arg mentioned.  All callers changed.
7859         (mode_compile): Keep track of which mode bits the user has explicitly
7860         mentioned.
7861         (mode_adjust): New arg DIR, so that we implement the X op correctly.
7862         New arg PMODE_BITS, to keep track of which mode bits the user
7863         mentioned; it treats S_ISUID and S_ISGID speciall.
7864         All callers changed.
7865         * lib/modechange.h: Likewise.
7866
7867 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7868
7869         * MODULES.html.sh: Add mkancestors.
7870         * modules/mkancesdirs: New module.
7871         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
7872         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
7873         The chdir-safer and afs files are now orphans; I'll remove them
7874         unless someone speaks up.
7875         Add lib/dirchownmod.c, lib/dirchownmod.h.
7876         (Depends-on): Remove alloca, chown, save-cwd, dirname.
7877         Add lchown, mkancesdirs.
7878         (Maintainer): Add self.
7879
7880 2006-07-15  Karl Berry  <karl@gnu.org>
7881
7882         * gnulib-tool: help message wording/arrangement.
7883
7884 2006-07-14  Simon Josefsson  <jas@extundo.com>
7885
7886         * doc/gnulib.texi (Libtool and Windows): New section.
7887
7888 2006-07-12  Simon Josefsson  <jas@extundo.com>
7889
7890         * modules/gendocs (License): Fix license, approved by Karl.
7891
7892 2006-07-12  Eric Blake  <ebb9@byu.net>
7893
7894         * MODULES.html.sh: Add gendocs.
7895
7896 2006-07-11  Eric Blake  <ebb9@byu.net>
7897
7898         * modules/fdl: New module, to install doc/fdl.texi.
7899         * MODULES.html.sh: Add new section for documentation modules.
7900         * gnulib-tool: Avoid space-tab.
7901         (--doc-base): New option, to manage files from doc.
7902
7903 2006-07-11  Eric Blake  <ebb9@byu.net>
7904
7905         * m4/absolute-header.m4: Fix comments to match recent change.
7906
7907 2006-07-11  Eric Blake  <ebb9@byu.net>
7908
7909         * gnulib-tool: List --doc-base before --tests-base.
7910
7911 2006-07-11  Derek R. Price  <derek@ximbiot.com>
7912
7913         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
7914
7915 2006-07-11  Bruno Haible  <bruno@clisp.org>
7916
7917         * README: Mention where to put documentation.
7918
7919 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7920
7921         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
7922
7923 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
7924
7925         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
7926         to stdint.m4.
7927
7928 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
7929
7930         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
7931         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
7932         "no/such/file/stdint.h" when there is no such file, so that
7933         the resulting C code can be parsed by dodgy compilers.
7934         Problems reported by Bob Proulx.
7935
7936 2006-07-10  Derek R. Price  <derek@ximbiot.com>
7937
7938         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
7939         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
7940         macros into the GNU _D_EXACT_NAMLEN.
7941         * lib/savedir.c:  Likewise.
7942         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
7943
7944 2006-07-10  Derek R. Price  <derek@ximbiot.com>
7945         and Paul Eggert  <eggert@cs.ucla.edu>
7946
7947         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
7948         * m4/savedir.m4:
7949         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
7950         macros into the GNU _D_EXACT_NAMLEN.
7951
7952 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7953
7954         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
7955         around the absolute name, to work around a problem with the HP-UX
7956         11.23 native C compiler, reported by Bob Proulx.
7957
7958 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7959
7960         * doc/maintain.texi, make-stds.texi: Sync from
7961         <http://savannah.gnu.org/projects/gnustandards>.
7962
7963 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7964
7965         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
7966
7967 2006-07-09  Jim Meyering  <jim@meyering.net>
7968
7969         * m4/glob.m4: Remove a doubled word in a comment.
7970
7971 2006-07-09  Jim Meyering  <jim@meyering.net>
7972
7973         * lib/argp-pv.c: Remove a doubled word in a comment.
7974         * lib/check-version.c (check_version): Likewise.
7975         * lib/javacomp.c (compile_java_class): Likewise.
7976
7977 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
7978
7979         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
7980         for the benefit of people using Autoconf 2.60.  If you want to
7981         support older Autoconf versions you can copy m4/onceonly_2_57.m4
7982         (or m4/onceonly.m4, if pre-2.57) manually.
7983
7984 2006-07-08  Jim Meyering  <jim@meyering.net>
7985
7986         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
7987         comment.
7988         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
7989         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
7990         comment.
7991
7992 2006-07-08  Jim Meyering  <jim@meyering.net>
7993
7994         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
7995
7996 2006-07-07  Simon Josefsson  <jas@extundo.com>
7997
7998         * tests/test-crc.c: Change expected crc value, the test vector
7999         were probably computed using the old broken crc.c?
8000
8001 2006-07-06  Simon Josefsson  <jas@extundo.com>
8002
8003         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
8004         now the canonical place for the M4 file).
8005
8006         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
8007         from the sys_socket dependency now.
8008
8009         * modules/inet_pton (Files): Ditto.
8010
8011         * modules/inet_ntop (Files): Ditto.
8012
8013 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
8014
8015         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
8016         not gl_PREREQ_GETUSERSHELL.
8017
8018 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8019
8020         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
8021         with only one argument, for Autoconf 2.60.
8022         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
8023         expand to nothing, so add a shell command to avoid syntax error.
8024         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
8025
8026 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8027
8028         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
8029
8030 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
8031
8032         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
8033         no longer needed.  Check for isblank decl.
8034         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
8035         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
8036         of existence.
8037
8038 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
8039
8040         * lib/getloadavg.c: Use __VMS, not VMS.
8041         * lib/getopt.c: Likewise.
8042         * lib/getpagesize.h: Likewise.
8043         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
8044         and probably does not work.
8045
8046 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
8047
8048         * lib/.cppi-disable: Add wcwidth.
8049         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
8050         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
8051         (ISGRAPH): Remove.  All uses changed to isgraph.
8052         (FOLD) [!defined _LIBC]: Remove special case.
8053         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
8054         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
8055         HAVE_ISBLANK.
8056         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
8057         case.
8058
8059 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
8060
8061         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
8062         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
8063         brackets.  Other minor changes to suppress some compiler
8064         warnings.
8065
8066 2006-07-06  Derek R. Price  <derek@ximbiot.com>
8067         and Paul Eggert  <eggert@cs.ucla.edu>
8068
8069         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
8070         of invoking obsolescent AC_HEADER_DIRENT macro.
8071         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
8072         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
8073         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
8074         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
8075         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
8076         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
8077         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
8078         * m4/readdir.m4: Remove; no longer needed.
8079
8080 2006-07-06  Derek R. Price  <derek@ximbiot.com>
8081         and Paul Eggert  <eggert@cs.ucla.edu>
8082
8083         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
8084         Don't worry about this obsolete case any more.
8085         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
8086         directories.
8087         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
8088         worry about this obsolete case any more.
8089         * lib/fts.c: Likewise.
8090         * lib/getcwd.c: Likewise.
8091         * lib/glob.h: Likewise.
8092         * lib/savedir.c: Likewise.
8093
8094 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
8095
8096         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
8097         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
8098         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
8099         needed.
8100         All uses removed.
8101         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
8102         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
8103         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
8104         needed.
8105         * m4/getdate.m4 (gl_GETDATE): Likewise.
8106         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
8107         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
8108         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
8109         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
8110         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
8111         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
8112         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
8113         needed.
8114
8115 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
8116
8117         * lib/memcasecmp.c: Include <limits.h>.
8118         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
8119         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
8120         Don't assume isdigit succeeds only on '0' through '9'.
8121
8122 2006-07-05  Eric Blake  <ebb9@byu.net>
8123
8124         * modules/getaddrinfo (Depends-on): Add snprintf.
8125
8126 2006-07-05  Eric Blake  <ebb9@byu.net>
8127
8128         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
8129         to avoid 'header present but could not be compiled' on cygwin.
8130
8131 2006-07-05  Eric Blake  <ebb9@byu.net>
8132
8133         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
8134         missing from netdb.h.
8135         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
8136
8137 2006-07-05  Derek R. Price  <derek@ximbiot.com>
8138
8139         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
8140         no longer needed.
8141         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
8142         * m4/getdate.m4 (gl_GETDATE): Likewise.
8143         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
8144         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
8145         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
8146         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
8147         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
8148
8149 2006-07-05  Derek R. Price  <derek@ximbiot.com>
8150
8151         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
8152         All uses of is_space replaced by isspace.
8153         * lib/exit.h: Don't talk about STDC_HEADERS.
8154         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
8155         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
8156         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
8157         replaced by isprint etc.
8158         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
8159         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
8160         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
8161         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
8162         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
8163         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
8164
8165 2006-07-05  Bruno Haible  <bruno@clisp.org>
8166
8167         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
8168         the function exists, before testing against AIX.
8169         Reported by Martin Lambers <marlam@marlam.de>.
8170
8171 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
8172
8173         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
8174         From Mark D. Baushke.
8175
8176 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
8177
8178         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
8179         to the absolute name, not just one, to bypass Sun C 5.8's
8180         "warning: #include of /usr/include/... may be non-portable".
8181
8182 2006-07-04  Eric Blake  <ebb9@byu.net>
8183
8184         * modules/dirname-tests: New test module.
8185         * tests/test-dirname.c: New file, replacing dirname.c
8186         TEST_DIRNAME section that was recently deleted.
8187
8188 2006-07-04  Bruno Haible  <bruno@clisp.org>
8189
8190         Assume ANSI C header files and <ctype.h> functions.
8191         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
8192         (mbsnwidth): Use isprint, iscntrl instead.
8193
8194 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8195
8196         Merge from coreutils.
8197         * MODULES.html.sh: Add xstrtold.
8198         * modules/xstrtold: New file.
8199         * modules/cycle-check (Files): Add lib/same-inode.h.
8200         * modules/dirname (Files): Add m4/double-slash-root.m4.
8201         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
8202         * modules/mkdir-p (Files): Add lib/same-inode.h.
8203         * modules/same (Files): Add lib/same-inode.h.
8204
8205 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8206
8207         * m4/absolute-header.m4: Renamed from full-header-path.m4.
8208         This is to keep the terminology clean; POSIX talks about
8209         "absolute pathnames", not "full pathnames", but the GNU
8210         Coding Standards say to use "path" for something else;
8211         so use "absolute" to keep both sides happy.
8212         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
8213         Set gl_absolute_header, not gl_full_header_path.
8214         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
8215         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
8216         All uses changed.
8217
8218         Merge from coreutils.
8219
8220         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
8221
8222         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
8223         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
8224         want to require the building of c-strtod.o.
8225         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
8226         needs -lm directly.
8227         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
8228
8229         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
8230
8231         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
8232         --as-needed option if available.  Problem reported by Albert Chin in
8233         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
8234         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
8235         cc merely issues a bunch of annoying warnings for --as-needed
8236         (this problem was reported by Bob Proulx).  Also, try linking with
8237         -lm to detect a bug in binutils 2.16 (this problem was reported
8238         by Ralf Wildenhues).
8239
8240         2006-06-18  Jim Meyering  <jim@meyering.net>
8241
8242         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
8243         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
8244         macro.
8245         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
8246         also check for glibc-2.4's abort-inducing bug.
8247
8248         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
8249         Low-probability clean-up should be to use rmdir to get rid of
8250         the just-created directory, not unlink.
8251
8252         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
8253         configure fail, and request a bug report to inform us about it.
8254         Add a comment that, barring reports to the contrary, in 2007 we'll
8255         assume ftruncate is universally available.
8256
8257         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
8258
8259         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
8260
8261         2006-03-12  Jim Meyering  <jim@meyering.net>
8262
8263         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
8264         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
8265         * m4/same.m4 (gl_SAME): Likewise.
8266         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
8267
8268         2006-03-11  Eric Blake  <ebb9@byu.net>
8269
8270         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
8271         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
8272         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
8273         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
8274
8275 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8276
8277         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
8278         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
8279         reported by Mark D. Baushke, one in
8280         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
8281
8282         Merge from coreutils.
8283
8284         * lib/.cppi-disable: Add stdint_.h.
8285         * lib/.cvsignore: Add stdint.h.
8286
8287         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
8288
8289         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
8290         both double and long double versions.
8291         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
8292         * lib/xstrtold.c: New file.
8293         * lib/xstrtod.h (xstrtold): New decl.
8294
8295         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
8296
8297         * lib/filemode.c (setst): Remove.
8298         (strmode): Rewrite to avoid setst.  This makes the code shorter,
8299         (arguably) clearer, and the generated code is a bit smaller on my
8300         Debian GNU/Linux stable x86 host.
8301
8302         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
8303
8304         * lib/filemode.c: Include "filemode.h" first, to test the interface.
8305         Assume that filemode.h includes sys/types.h and sys/stat.h.
8306         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
8307         (ftypelet): Reorder to put common cases first, for efficiency.
8308         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
8309         to do 'M'.
8310         (strmode): Renamed from mode_string, and now stores 12 bytes instead
8311         of 10, for compatibility with FreeBSD.  All callers changed.
8312         (filemodestring): Now stores 12 bytes instead of 10, and sets file
8313         types that can't be deduced solely from st_mode.  First arg is now a
8314         const pointer.
8315         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
8316         (strmode): Renamed from mode_string.
8317         (filemodestring): New decl.
8318         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
8319         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
8320         needed.
8321         (S_ISPORT, S_ISWHT): New macros, if not already defined.
8322
8323         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
8324
8325         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
8326         fsusage.h now does that.  Include fsusage.h first, to test interface.
8327         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
8328         at most one method (the old code could have generated decls that
8329         didn't conform to C89, not that this was ever exercised).
8330         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
8331
8332         2006-03-19  Jim Meyering  <jim@meyering.net>
8333
8334         Work even in a chroot where d_ino values for entries in "/"
8335         don't match the stat.st_ino values for the same names.
8336         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
8337         number, iterate through all entries again, using lstat instead.
8338         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
8339         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
8340
8341         * lib/getcwd.c (__getcwd): Clarify a comment.
8342         Use memcpy in place of a call to strcpy.
8343
8344         2006-03-12  Jim Meyering  <jim@meyering.net>
8345
8346         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
8347         matches that of the current directory (which we're about to chdir ".."
8348         out of), then save the dev-ino of the parent, instead.
8349
8350         * lib/same-inode.h (SAME_INODE): New file/macro.
8351         * lib/chdir-safer.c (SAME_INODE): Remove definition.
8352         Include "same-inode.h", instead.
8353         * lib/same.c: Likewise.
8354         * lib/cycle-check.h: Include "same-inode.h".
8355         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
8356         * lib/cycle-check.c (SAME_INODE): Remove definition.
8357         * lib/root-dev-ino.h: Include "same-inode.h".
8358
8359         2006-03-11  Eric Blake  <ebb9@byu.net>
8360
8361         * lib/same.c (same_name): s/base_name/last_component/
8362         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
8363         * lib/filenamecat.c (file_name_concat): Likewise.
8364
8365         2006-03-11  Eric Blake  <ebb9@byu.net>,
8366                     Paul Eggert  <eggert@cs.ucla.edu>
8367
8368         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
8369         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
8370         drive prefix.
8371         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
8372         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
8373         (last_component): New method.
8374         * lib/dirname.c (dir_len): Determine when drive letters need a
8375         subsequent slash.  Preserve // when it is special.
8376         (dir_name): Don't append dot when drive letter is absolute.
8377         [TEST_DIRNAME]: Move into a full-blown gnulib test.
8378         * lib/basename.c (base_name): New semantics - malloc the result.
8379         Preserve // when it is special.  Preserve relative files that look
8380         like drive letters.
8381         (base_len): Preserve // when it is special.
8382         (last_component): New method, similar to old base_name semantics.
8383         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
8384         base_name.  Strip redundant slashes from ///.
8385
8386 2006-07-03  Jim Meyering  <jim@meyering.net>
8387
8388         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
8389         macro is used before the first cycle_check call.
8390
8391 2006-07-03  Eric Blake  <ebb9@byu.net>
8392
8393         * modules/dirname (Depends-on): Add xstrndup.
8394
8395 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
8396
8397         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
8398         test cases, so that config.log is a bit easier to follow.
8399
8400 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
8401
8402         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
8403         both are 64 bits, since this seems to be the tradition, and this
8404         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
8405         we ever run into a host that prefers long long to long in this
8406         case, we'll need another configure-time test.  Problem reported by
8407         Jim Meyering.
8408
8409 2006-07-02  Eric Blake  <ebb9@byu.net>
8410
8411         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
8412
8413 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
8414
8415         * modules/inttypes (Depends-on): No longer depends on stdint.
8416         * modules/stdint (Description): Say more about assumptions.
8417         Say that the fast types might differ.  Say macros are used.
8418         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
8419         (Makefile.am): Revise list of substituted symbols to match
8420         new stdint.m4.
8421         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
8422         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
8423         * tests/test-stdint.c (verify_same_types)
8424         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
8425         the code conforms to C99/C89.
8426         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
8427         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
8428
8429 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
8430
8431         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
8432         but fix a bug, by requiring at least 64 bits.
8433         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
8434         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
8435         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
8436         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
8437
8438         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
8439         changes.  Make 2.59 a prerequisite.  Check and substitute for
8440         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
8441         inttypes.h.  Do not use special include files; just use the
8442         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
8443         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
8444         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
8445         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
8446         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
8447         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
8448         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
8449         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
8450         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
8451         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
8452         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
8453         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
8454         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
8455         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
8456         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
8457         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
8458         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
8459         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
8460         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
8461         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
8462         WINT_MAX.  Check for C99 conformance more strictly, by detecting
8463         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
8464         not check for things that C99 does not require, e.g., int8_t.  If
8465         a test isn't needed unless <stdint.h> isn't working, and is
8466         unlikely to be needed for any other reason, then don't do it
8467         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
8468         size_t, since we assume C89 freestanding at least.  Do not check
8469         for sig_atomic_t, wchar_t, or wint_t, since the code now does
8470         the right thing even if the types are not defined.  Instead use:
8471         (gl_STDINT_TYPE_PROPERTIES): New macro.
8472         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
8473         testing whether <sys/types.h> clashes, as Autoconf does this for
8474         us now.  All uses removed.
8475         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
8476         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
8477         (gl_CHECK_TYPE_SAME):
8478         Remove; no longer needed.
8479         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
8480         exists, since we'll return 0 anyway in that case.
8481         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
8482
8483 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
8484
8485         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
8486         possible collision with system files.
8487         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
8488         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
8489         WCHAR_MIN and WCHAR_MAX in this case.
8490         (<stddef.h>): Do not include; no longer needed.
8491         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
8492         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
8493         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
8494         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
8495         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
8496         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
8497         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
8498         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
8499         !defined(__c99))]: Include in this case too, since it's harmless
8500         now.
8501         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
8502         dangerous to do so.
8503         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
8504         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
8505         (_STDINT_MIN, _STDINT_MAX): New macros.
8506         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
8507         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
8508         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
8509         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
8510         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
8511         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
8512         macros, not typedefs; this simplifies things quite a bit.
8513         Use long int for all types narrower than int64_t.
8514         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
8515         Define in terms of long long int or int64_t or long int,
8516         not int64_t or int32_t.  This saves some compile-time testing.
8517         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
8518         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
8519         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
8520         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
8521         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
8522         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
8523         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
8524         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
8525         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
8526         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
8527         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
8528         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
8529         undef any previous version and define our own version, for
8530         simplicity and consistency with the new macros for types.
8531         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
8532         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
8533         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
8534         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
8535         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
8536         @WINT_T_SUFFIX@ to keep things simple here.
8537         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
8538         Simplify by assuming typical 8/16/32/64 host, since we're
8539         already doing that elsewhere anyway.
8540         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
8541         and assume long long int is 64 bits if available.  This
8542         speeds up 'configure'.
8543
8544 2006-07-01  Eric Blake  <ebb9@byu.net>
8545
8546         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
8547         Reported by Andreas Buening.
8548
8549 2006-07-01  Eric Blake  <ebb9@byu.net>
8550
8551         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
8552
8553 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
8554
8555         * lib/getaddrinfo.c: fixed typo
8556
8557 2006-06-29  Jim Meyering  <jim@meyering.net>
8558
8559         * modules/strftime (Maintainer): Add my name, since with the
8560         FPRINTFTIME changes strftime.c has forked from glibc.
8561
8562 2006-06-29  Eric Blake  <ebb9@byu.net>
8563
8564         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
8565
8566 2006-06-29  Eric Blake  <ebb9@byu.net>
8567
8568         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
8569
8570 2006-06-29  Eric Blake  <ebb9@byu.net>
8571
8572         * lib/stat_.h: New file.
8573
8574 2006-06-29  Eric Blake  <ebb9@byu.net>
8575
8576         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
8577         unused static function.
8578
8579 2006-06-29  Eric Blake  <ebb9@byu.net>
8580
8581         * doc/functions.texi (Function Portability): Document missing lstat
8582         on mingw.
8583
8584 2006-06-29  Eric Blake  <ebb9@byu.net>
8585
8586         * MODULES.html.sh: Add sys_stat.
8587         * modules/sys_stat: New module.
8588         * modules/mkstemp (Depends-on): Add sys_stat.
8589
8590 2006-06-29  Derek R. Price  <derek@ximbiot.com>
8591
8592         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
8593
8594 2006-06-29  Derek R. Price  <derek@ximbiot.com>
8595
8596         * m4/c-bs-a.m4: Removed.
8597
8598 2006-06-29  Derek R. Price  <derek@ximbiot.com>
8599
8600         * lib/strftime.c: Assume strftime() exists.
8601
8602 2006-06-29  Derek Price  <derek@ximbiot.com>
8603
8604         * modules/c-bs-a: Removed - \a is C89.
8605         * MODULES.html.sh: Remove c-bs-a.
8606
8607 2006-06-29  Bruno Haible  <bruno@clisp.org>
8608
8609         * modules/wcwidth (License): Change to LGPL.
8610
8611 2006-06-28  Simon Josefsson  <jas@extundo.com>
8612
8613         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
8614         on _WIN32.
8615
8616         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
8617         getnameinfo.
8618
8619 2006-06-28  Simon Josefsson  <jas@extundo.com>
8620
8621         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
8622
8623 2006-06-28  Simon Josefsson  <jas@extundo.com>
8624
8625         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
8626         functions there.  It will succeed on Windows XP, but on Windows
8627         2000 and (presumably) earlier, it will fail, and use the internal
8628         re-implementation.
8629         (use_win32_p): New function.
8630         (getaddrinfo): Use strtoul on servname, to support numeric ports.
8631         Support AI_NUMERICSERV to disable getservbyname.
8632         (getnameinfo): New function, only supports
8633         NI_NUMERICHOST|NI_NUMERICSERV for now.
8634
8635         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
8636         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
8637         getnameinfo.
8638
8639 2006-06-28  Eric Blake  <ebb9@byu.net>
8640
8641         * modules/wcwidth: New file.
8642         * modules/mbchar (Depends-on): Add wcwidth.
8643         * modules/mbswidth (Depends-on): Add wcwidth.
8644         * MODULES.html.sh: Add wcwidth.
8645
8646 2006-06-28  Eric Blake  <ebb9@byu.net>
8647
8648         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
8649         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
8650
8651 2006-06-28  Eric Blake  <ebb9@byu.net>
8652
8653         * lib/xvasprintf.h: Fix comments.
8654
8655 2006-06-28  Eric Blake  <ebb9@byu.net>
8656
8657         * lib/mbchar.h (wcwidth): Include wcwidth.h.
8658         * lib/mbswidth.c (wcwidth): Move from here...
8659         * lib/wcwidth.h: ...to this new file.
8660
8661 2006-06-28  Derek R. Price  <derek@ximbiot.com>
8662
8663         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
8664
8665         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
8666         it's obsolete.
8667         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
8668
8669 2006-06-28  Derek R. Price  <derek@ximbiot.com>
8670
8671         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
8672         Autoconf 2.60 says this stuff was obsolete.
8673
8674 2006-06-28  Bruno Haible  <bruno@clisp.org>
8675
8676         * modules/wcwidth (Files): Add m4/wchar_t.m4.
8677
8678 2006-06-28  Bruno Haible  <bruno@clisp.org>
8679
8680         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
8681         gt_TYPE_WCHAR_T.
8682
8683 2006-06-28  Bruno Haible  <bruno@clisp.org>
8684
8685         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
8686         declaration for wcwidth.
8687         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
8688
8689 2006-06-28  Bruno Haible  <bruno@clisp.org>
8690
8691         * lib/mkdtemp.c [MINGW]: Include <io.h>.
8692         (mkdir): Define using _mkdir.
8693
8694 2006-06-28  Bruno Haible  <bruno@clisp.org>
8695
8696         * lib/getaddrinfo.h: Fix POSIX URL.
8697         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
8698         _WIN32.
8699         (use_win32_p): Make static.
8700         (getaddrinfo): Reject service name if it is empty or does not consist
8701         solely of decimal digits, or if its value is > 65535.
8702         (getnameinfo): Remove useless casts.
8703
8704 2006-06-27  Simon Josefsson  <jas@extundo.com>
8705
8706         * modules/sys_select: New file, suggested by Bruno Haible, Paul
8707         Eggert and Martin Lambers.
8708
8709 2006-06-27  Simon Josefsson  <jas@extundo.com>
8710
8711         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
8712         Eggert and Martin Lambers.
8713
8714 2006-06-27  Bruno Haible  <bruno@clisp.org>
8715
8716         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
8717         result to 0, not to empty.
8718         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
8719
8720 2006-06-27  Bruno Haible  <bruno@clisp.org>
8721
8722         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
8723
8724 2006-06-26  Simon Josefsson  <jas@extundo.com>
8725
8726         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
8727         present.
8728
8729 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
8730
8731         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
8732         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
8733         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
8734
8735 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
8736
8737         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
8738
8739 2006-06-26  Bruno Haible  <bruno@clisp.org>
8740
8741         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
8742
8743 2006-06-26  Bruno Haible  <bruno@clisp.org>
8744
8745         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
8746
8747 2006-06-26  Bruno Haible  <bruno@clisp.org>
8748
8749         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
8750         SGI C compiler in pre-C99 mode.
8751         Suggested by Mark D. Baushke and Larry Jones.
8752
8753 2006-06-26  Bruno Haible  <bruno@clisp.org>
8754
8755         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
8756         WCHAR_MAX.
8757         Reported by Mark D. Baushke and Larry Jones.
8758
8759 2006-06-26  Bruno Haible  <bruno@clisp.org>
8760
8761         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
8762         in pre-C99 mode.
8763         Suggested by Mark D. Baushke and Larry Jones.
8764
8765 2006-06-23  Simon Josefsson  <jas@extundo.com>
8766             Bruno Haible  <bruno@clisp.org>
8767
8768         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
8769         Emit mostlyclean-local rule.
8770         (func_emit_tests_Makefile_am): Likewise.
8771         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
8772
8773 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
8774
8775         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
8776
8777 2006-06-23  Bruno Haible  <bruno@clisp.org>
8778
8779         * tests/test-stdint.c: Update to match ISO C 99 Technical
8780         Corrigendum 1.
8781
8782 2006-06-23  Bruno Haible  <bruno@clisp.org>
8783
8784         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
8785
8786 2006-06-23  Bruno Haible  <bruno@clisp.org>
8787
8788         * lib/stdint_.h: Treat IRIX like OpenBSD.
8789
8790 2006-06-23  Bruno Haible  <bruno@clisp.org>
8791
8792         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
8793         ISO C 99 Technical Corrigendum 1.
8794
8795 2006-06-22  Simon Josefsson  <jas@extundo.com>
8796
8797         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
8798         MinGW.
8799
8800 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
8801
8802         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
8803         needed.  Some compiler complained about some of them.  Problem reported
8804         by Larry Jones in
8805         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
8806
8807 2006-06-21  Simon Josefsson  <jas@extundo.com>
8808
8809         * tests/test-getaddrinfo.c: New file.
8810
8811         * modules/getaddrinfo-tests: New file.
8812
8813         * MODULES.html.sh: Add inet_pton.
8814
8815         * modules/inet_pton: New file.
8816
8817 2006-06-21  Simon Josefsson  <jas@extundo.com>
8818
8819         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
8820         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
8821         of using the (limited) gnulib implementation on Windows XP.
8822
8823         * m4/inet_pton.m4: New file.
8824
8825 2006-06-21  Simon Josefsson  <jas@extundo.com>
8826
8827         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
8828         variable.
8829
8830         * lib/socket_.h: Don't define WINVER.
8831
8832         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
8833         slightly modified to work in gnulib.
8834
8835 2006-06-21  Simon Josefsson  <jas@extundo.com>
8836
8837         * doc/gnulib.texi (Windows sockets): Add.
8838
8839 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
8840
8841         * lib/read-file.c (fread_file): Start with buffer allocation of
8842         0 bytes rather than 1 byte; this simplifies the code.
8843         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
8844         code to free buffer and save/restore errno.
8845         (internal_read_file): Remove unused local.
8846
8847 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
8848
8849         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
8850         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
8851         Problem reported by Denis Excoffier in
8852         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
8853
8854 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8855
8856         * modules/sys_socket, modules/socklen: Include sys/types since
8857         FreeBSD 4.x's sys/socket.h needs it.
8858
8859 2006-06-19  Simon Josefsson  <jas@extundo.com>
8860
8861         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
8862
8863 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
8864
8865         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
8866
8867 2006-06-19  Bruno Haible  <bruno@clisp.org>
8868
8869         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
8870         and FULL_PATH_INTTYPES_H in angle brackets.
8871         Reported by Mark D. Baushke <mdb@gnu.org>.
8872
8873 2006-06-17  Eric Blake  <ebb9@byu.net>
8874
8875         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
8876         errno.
8877
8878 2006-06-17  Bruno Haible  <bruno@clisp.org>
8879
8880         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
8881         <sys/inttypes.h>.
8882
8883 2006-06-17  Bruno Haible  <bruno@clisp.org>
8884
8885         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
8886         whether errno is declared. Assume <errno.h> declares errno.
8887
8888 2006-06-17  Bruno Haible  <bruno@clisp.org>
8889
8890         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
8891
8892 2006-06-17  Bruno Haible  <bruno@clisp.org>
8893
8894         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
8895         problem on Solaris 2.5.1.
8896
8897 2006-06-16  Eric Blake  <ebb9@byu.net>
8898
8899         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
8900         * lib/unicodeio.c [!defined errno]: Likewise.
8901         * lib/strtol.c [!defined errno]: Likewise.
8902         * lib/strtod.c [!defined errno]: Likewise.
8903
8904 2006-06-15  Eric Blake  <ebb9@byu.net>
8905
8906         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
8907
8908 2006-06-15  Eric Blake  <ebb9@byu.net>
8909
8910         * config/srclist.txt (ssize_t.m4): Lose sync.
8911
8912 2006-06-15  Bruno Haible  <bruno@clisp.org>
8913
8914         * modules/stdint (Files): Include m4/full-header-path.m4,
8915         m4/size_max.m4, m4/wchar_t.m4.
8916         (Makefile.am): Many more substitutions.
8917         * modules/stdint-tests: New file.
8918         * tests/test-stdint.c: New file.
8919
8920 2006-06-15  Bruno Haible  <bruno@clisp.org>
8921
8922         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
8923         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
8924         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
8925         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
8926         gl_CHECK_TYPE_SAME): New macros.
8927
8928 2006-06-15  Bruno Haible  <bruno@clisp.org>
8929
8930         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
8931
8932 2006-06-15  Bruno Haible  <bruno@clisp.org>
8933
8934         * lib/stdint_.h: Rewritten to be fully auto-configured.
8935         Fixes bug on HP-UX/IA64.
8936
8937 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
8938
8939         * lib/getdate.y (__attribute__): Don't define if already defined.
8940         Problem reported by Larry Jones.
8941         * lib/utimens.c (__attribute__): Likewise.
8942
8943 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
8944
8945         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
8946         reported by Andreas Schwab.
8947
8948 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8949             Bruno Haible  <bruno@clisp.org>
8950
8951         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
8952         check for the declaration of strnlen and a run test that exposes the
8953         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
8954         rpl_strndup.
8955
8956 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8957             Bruno Haible  <bruno@clisp.org>
8958
8959         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
8960
8961 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8962
8963         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
8964         compile test, for Tru64 4.0D.
8965
8966 2006-05-28  Karl Berry  <karl@gnu.org>
8967
8968         * config/srclist.txt (printf-args.c): lose sync.
8969
8970 2006-05-26  Martin Lambers  <marlam@marlam.de>
8971
8972         * lib/getpass.c: Updates the test for the native W32 API, and adds
8973         missing includes, thus fixing compilation warnings.
8974
8975 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
8976
8977         * lib/exclude.c (exclude_fnmatch): New function.
8978         (excluded_file_name): Call exclude_fnmatch.
8979         * lib/exclude.h (excluded_file_name): New prototype
8980
8981 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
8982
8983         * lib/tempname.c (small_open, large_open): New macros.
8984         (__open, __open64) [!_LIBC]: Remove.
8985         (__gen_tempname): Use small_open and large_open instead of __open
8986         and __open64.  This fixes a portability bug on HP-UX 11.11i
8987         reported by Simon Wing-Tang in
8988         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
8989
8990 2006-05-24  Bruno Haible  <bruno@clisp.org>
8991
8992         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
8993         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
8994         Reported by Thorsten Maerz <torte@netztorte.de> via
8995         Aaron Stone <aaron@serendipity.cx>.
8996
8997 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
8998
8999         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
9000         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
9001         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
9002         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
9003         not really conditional on the cache.
9004         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
9005
9006 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
9007
9008         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
9009         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
9010         (my_usleep): Don't mishandle maximum value.
9011
9012 2006-05-19  Jim Meyering  <jim@meyering.net>
9013
9014         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
9015
9016 2006-05-17  Bruno Haible  <bruno@clisp.org>
9017
9018         Cygwin portability.
9019         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
9020
9021 2006-05-17  Bruno Haible  <bruno@clisp.org>
9022
9023         * lib/stdint_.h: Fix recognition of Cygwin.
9024
9025 2006-05-15  Bruno Haible  <bruno@clisp.org>
9026
9027         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
9028         on libtool patch by Ralf Wildenhues.
9029
9030 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
9031
9032         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
9033         test for C99 conformance; (bool) 0.5 is an integer constant
9034         expression, but (bool) -0.5 is not.  Problem reported by Fedor
9035         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
9036
9037 2006-05-11  Simon Josefsson  <jas@extundo.com>
9038
9039         * m4/xvasprintf.m4: Fix obvious typo.
9040
9041 2006-05-11  Jim Meyering  <jim@meyering.net>
9042
9043         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
9044         James Lemley.
9045
9046 2006-05-10  Simon Josefsson  <jas@extundo.com>
9047
9048         * lib/md4.c: Typo fix, update copyright years.
9049         (K1, K2): Don't use L because it turn computations into 64-bit on
9050         64-bit platforms.
9051
9052 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
9053
9054         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
9055         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
9056         unwanted sign propagation, e.g., on hosts with 64-bit int.
9057         There still are some problems with reeelly weird theoretical hosts
9058         (e.g., 33-bit int) but it's not worth worrying about now.
9059         * lib/sha1.c (rol): Likewise.
9060         (K1, K2, K3, K4): Remove unnecessary L suffix.
9061
9062 2006-05-10  Bruno Haible  <bruno@clisp.org>
9063
9064         * lib/des.c: Cast to avoid warnings.
9065
9066 2006-05-09  Bruno Haible  <bruno@clisp.org>
9067
9068         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
9069         (Depends-on): Depend also on xsize, stdarg.
9070         (configure.ac): Add gl_XVASPRINTF.
9071
9072 2006-05-09  Bruno Haible  <bruno@clisp.org>
9073
9074         * m4/xvasprintf.m4: New file.
9075
9076 2006-05-09  Bruno Haible  <bruno@clisp.org>
9077
9078         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
9079         (EOVERFLOW): Define fallback value.
9080         (xstrcat): New function.
9081         (xvasprintf): Recognize the special case of a string concatenation.
9082
9083 2006-05-08  Eric Blake  <ebb9@byu.net>
9084
9085         * gnulib-tool (func_version): Base copyright year on CVS date.
9086         (func_emit_copyright_notice): New function.
9087         (func_emit_lib_Makefile_am): Use it.
9088         (func_emit_tests_Makefile_am): Likewise.
9089         (func_import): Likewise.
9090
9091 2006-05-08  Bruno Haible  <bruno@clisp.org>
9092
9093         * modules/stdarg: New file.
9094         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
9095
9096 2006-05-08  Bruno Haible  <bruno@clisp.org>
9097
9098         * m4/stdarg.m4: New file, from GNU gettext.
9099
9100 2006-05-08  Bruno Haible  <bruno@clisp.org>
9101
9102         * config/srclist.txt (build-aux/config.rpath): different from latest
9103         release.
9104
9105 2006-05-08  Bruno Haible  <bruno@clisp.org>
9106
9107         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
9108
9109 2006-05-05  Jim Meyering  <jim@meyering.net>
9110
9111         * m4/warning.m4: New file, derived from bison's file by the same name.
9112
9113 2006-05-03  Bruno Haible  <bruno@clisp.org>
9114
9115         * lib/stdint_.h: Shorter URL.
9116         * lib/inttypes.h: Likewise.
9117
9118 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
9119
9120         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
9121
9122 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
9123
9124         * lib/verify.h: Document the internals better.  Most of this change
9125         was written by Bruno Haible.
9126
9127 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
9128
9129         * doc/verify.texi: New file, partly based on a proposal by
9130         Bruno Haible.
9131
9132 2006-05-02  Bruno Haible  <bruno@clisp.org>
9133
9134         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
9135         test from here...
9136         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
9137
9138 2006-04-29  Bruno Haible  <bruno@clisp.org>
9139
9140         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
9141         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
9142
9143 2006-04-29  Bruno Haible  <bruno@clisp.org>
9144
9145         * gnulib-tool: Make --update option actually work.
9146
9147 2006-04-29  Bruno Haible  <bruno@clisp.org>
9148
9149         * doc/gcd.texi: New file.
9150         * doc/gnulib.texi: Include it.
9151
9152 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
9153
9154         * lib/getdate.y (get_date): When adding relative date, start with the
9155         initial time, not with the result of the first mktime call.
9156
9157 2006-04-25  Bruno Haible  <bruno@clisp.org>
9158
9159         * gnulib-tool (func_import): Output the include directives in three
9160         blocks, sorted separately.
9161         Reported by Ben Pfaff <blp@cs.stanford.edu>.
9162
9163 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
9164
9165         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
9166         to define main with arguments, for C++.  Reported by Eric Blake.
9167         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
9168         Prefer 'int main ()' to 'int main (void)', for C++.
9169         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
9170         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
9171         for 'main', for C99 and C++.
9172
9173 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
9174
9175         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
9176         Don't assume that exit status -1 is valid.
9177         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
9178         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
9179         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
9180         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
9181         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
9182         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
9183         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
9184         functions can be used without declaring them, or that you can
9185         exit with status -1.
9186         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
9187
9188 2006-04-24  Karl Berry  <karl@gnu.org>
9189
9190         * config/srclist.txt (longdouble.m4): sync lost.
9191
9192 2006-04-24  Eric Blake  <ebb9@byu.net>
9193
9194         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
9195
9196 2006-04-24  Bruno Haible  <bruno@clisp.org>
9197
9198         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
9199         poll() implementation in AIX.
9200         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9201
9202 2006-04-24  Bruno Haible  <bruno@clisp.org>
9203
9204         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
9205         assigned exactly once.
9206
9207 2006-04-23  Claudio Fontana  <claudio@gnu.org>
9208             Bruno Haible  <bruno@clisp.org>
9209
9210         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
9211         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
9212         for AM_CPPFLAGS.
9213
9214 2006-04-23  Bruno Haible  <bruno@clisp.org>
9215
9216         * modules/copy-file: Depend on unistd.
9217         * modules/execute: Likewise.
9218         * modules/fatal-signal: Likewise.
9219         * modules/findprog: Likewise.
9220         * modules/mkdtemp : Likewise.
9221         * modules/pipe: Likewise.
9222         * modules/wait-process: Likewise.
9223
9224 2006-04-23  Bruno Haible  <bruno@clisp.org>
9225
9226         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
9227         condition was already detected.
9228         Reported by Ben Pfaff <blp@cs.stanford.edu>.
9229
9230 2006-04-23  Bruno Haible  <bruno@clisp.org>
9231
9232         * lib/copy-file.c: Include <unistd.h> unconditionally.
9233         * lib/execute.c: Likewise.
9234         * lib/fatal-signal.c: Likewise.
9235         * lib/findprog.c: Likewise.
9236         * lib/mkdtemp.c: Likewise.
9237         * lib/pipe.h: Likewise.
9238         * lib/pipe.c: Likewise.
9239         * lib/wait-process.h: Likewise.
9240
9241 2006-04-23  Bruno Haible  <bruno@clisp.org>
9242
9243         * gnulib-tool (func_usage): Fix --import description. Document
9244         --update.
9245         (func_import): Create temporary file in a temporary directory, if
9246         --dry-run is specified. Silence errors from 'grep' when there are no
9247         m4 files in $m4dir.
9248         (func_create_testdir): Silence errors from 'grep' when there are no
9249         m4 files in $m4dir.
9250         Reported by Karl Berry <karl@freefriends.org>.
9251
9252 2006-04-20  Bruno Haible  <bruno@clisp.org>
9253
9254         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
9255         one argument, so that the code will be portable to Autoconf 2.60.
9256         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
9257         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
9258         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
9259
9260 2006-04-19  Derek Price  <derek@ximbiot.com>
9261             Eric Blake  <ebb9@byu.net>
9262
9263         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
9264         rather than "/full/path.h".  Update comment to match.  Shorten &
9265         generalize m4_translit call via AS_TR_CPP.
9266
9267 2006-04-19  Derek Price  <derek@ximbiot.com>
9268             Eric Blake  <ebb9@byu.net>
9269
9270         * lib/inttypes.h: Correct grammar in comment.
9271
9272 2006-04-18  Derek Price  <derek@ximbiot.com>
9273             Paul Eggert  <eggert@cs.ucla.edu>
9274
9275         * modules/inttypes: New file.
9276         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
9277
9278 2006-04-18  Derek Price  <derek@ximbiot.com>
9279             Paul Eggert  <eggert@cs.ucla.edu>
9280
9281         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
9282         New files.
9283
9284 2006-04-18  Derek Price  <derek@ximbiot.com>
9285             Paul Eggert  <eggert@cs.ucla.edu>
9286
9287         * lib/inttypes.h: New file.
9288         * lib/strtoimax.c: Assume <inttypes.h>.
9289
9290 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
9291
9292         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
9293         isn't mounted.  Problem reported by Kir Kolyshkin.
9294
9295 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
9296
9297         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
9298         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
9299         Derek R. Price.
9300         * lib/regex.h (RE_DUP_MAX): Update comment to match current
9301         implementation.
9302
9303 2006-04-12  Eric Blake  <ebb9@byu.net>
9304
9305         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
9306         is now done automatically by the corresponding Autoconf macro.
9307
9308 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
9309
9310         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
9311         time_r.h.
9312
9313 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9314
9315         Merge regex changes from libc, removing some of our
9316         POSIX-conformance changes that were rejected and redoing them in a
9317         less-intrusive way.
9318
9319         * lib/regcomp.c (re_compile_internal, init_dfa):
9320         Length arg is now size_t, not Idx.  All uses changed.
9321         (peek_token): Forward decl now says internal_function.
9322         (__re_error_msgid, __re_error_msgid_idx):
9323         Now static rather than extern with attribute_hidden.
9324         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
9325         For some reason libc prefers K&R style defns for external functions.
9326         (regerror) [!defined _LIBC]: Likewise.
9327         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
9328         (seek_collating_symbol_entry, lookup_collation_sequence_value):
9329         (build_range_exp, build_collating_symbol):
9330         Use K&R-style defn.
9331         (re_compile_fastmap): Use '\0' to memset, not 0.
9332         (utf8_sb_map): Make the calculations more obvious.
9333         (init_dfa, parse_bracket_exp, build_charclass_op):
9334         Call calloc and cast result, as glibc does.
9335         (init_word_char, fetch_token, peek_token, peek_token_bracket):
9336         (build_range_exp, build_collating_symbol):
9337         Now internal functions.
9338
9339         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
9340
9341         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
9342         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
9343         Don't depend on VMS; depend on __VMS instead, for POSIX
9344         namespace cleanness.
9345         (regoff_t): Define to ssize_t, not long int.
9346
9347         Remove the REG_ macros named below.  Instead, make the old names
9348         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
9349         __USE_GNU_REGEX.
9350         (REG_BACKSLASH_ESCAPE_IN_LISTS):
9351         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
9352         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
9353         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
9354         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
9355         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
9356         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
9357         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
9358         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
9359         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
9360         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
9361         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
9362         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
9363         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
9364         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
9365         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
9366         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
9367         (REG_NREGS):
9368         Remove.  All uses replaced by the old RE_* names.
9369         (RE_BACKSLASH_ESCAPE_IN_LISTS):
9370         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
9371         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
9372         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
9373         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
9374         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
9375         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
9376         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
9377         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
9378         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
9379         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
9380         Don't bother having these macros be independent of each others'
9381         values, since they no longer exist in the POSIX name space.
9382
9383         Rename the following member names back to their old names,
9384         unless !__USE_GNU_REGEX.  All uses changed back.
9385         (buffer): Renamed from re_buffer.
9386         (allocated): Renamed from re_allocated.
9387         (used): Renamed from re_used.
9388         (syntax): Renamed from re_syntax.
9389         (fastmap): Renamed from re_fastmap.
9390         (translate): Renamed from re_translate.
9391         (can_be_null): Renamed from re_can_be_null.
9392         (regs_allocated): Renamed from re_regs_allocated.
9393         (fastmap_accurate): Renamed from re_fastmap_accurate.
9394         (no_sub): Renamed from re_no_sub.
9395         (not_bol): Renamed from re_not_bol.
9396         (not_eol): Renamed from re_not_eol.
9397         (newline_anchor): Renamed from re_newline_anchor.
9398         (num_regs): Renamed from rm_num_regs.
9399         (start): Renamed from rm_start.
9400         (end): Renamed from rm_end.
9401
9402         (free_state): Move up a bit.
9403
9404         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
9405         #define to be empty.
9406         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
9407         when that is what is intended.
9408         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
9409         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
9410         (MAX): New macro.
9411         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
9412         All uses changed back to re_malloc, etc.  It's now the caller's
9413         responsibility to check for overflow; all callers changed.
9414         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
9415         (re_x2nrealloc): Remove.
9416         (free_state): Remove decl.
9417
9418         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
9419         (re_set_registers, re_exec):
9420         Use K&R-style defn.
9421
9422         2006-01-31  Roland McGrath  <roland@redhat.com>
9423
9424         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
9425         Reported by Mike Frysinger <vapier@gentoo.org>.
9426
9427         2006-01-15  Andreas Jaeger  <aj@suse.de>
9428
9429         [BZ #1950]
9430         * lib/regex_internal.c (re_string_reconstruct): Adjust for
9431         build_wcs_upper_buffer change.
9432         (build_wcs_upper_buffer): Change return type.
9433
9434         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
9435
9436         * lib/regex_internal.h: Include <stdint.h> if available.
9437
9438         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
9439
9440         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
9441
9442         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
9443
9444         * lib/regcomp.c: Adjust for changed secondary hash function.
9445
9446         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
9447
9448         * lib/regex.h: Pretty printing.
9449         Clean up namespace a bit.
9450
9451         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
9452
9453         * lib/regexec.c (update_cur_sifted_state, check_arrival,
9454         check_arrival_add_next_nodes): Avoid using uninitialized variable.
9455
9456         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
9457                     Ulrich Drepper  <drepper@redhat.com>
9458
9459         [BZ #1302]
9460         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
9461         changed.
9462         (bitset_word_t): Renamed from bitset_word.  All uses changed.
9463
9464         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
9465
9466         [BZ #281]
9467         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
9468         * lib/regcomp.c: Remove unnecessary uses of
9469         unsigned RE_TRANSLATE_TYPE.
9470         * lib/regex_internal.h: Likewise.
9471         * lib/regex_internal.c: Likewise.
9472         * lib/regexec.c: Likewise.
9473         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
9474
9475         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
9476
9477         * lib/regexec.c (find_recover_state): Remove unnecessary
9478         initialization.
9479         (transit_state_bkref): Make DFA a const pointer.
9480         (get_subexp): Likewise.
9481         (check_arrival): Likewise.
9482         (update_cur_sifted_state): Likewise.
9483         (re_search_internal): Likewise.
9484         (prune_impossible_nodes): Likewise.
9485         (acquire_init_state_context): Likewise.
9486         (proceed_next_node): Likewise.
9487         (set_regs): Likewise.
9488         (free_fail_stack_return): Likewise.
9489         (check_arrival_expand_ecl): Mark DFA parameter as const.
9490         (check_arrival_expand_ecl_sub): Likewise.
9491         (check_subexp_limits): Likewise.
9492         (sub_epsilon_src_nodes):  Likewise.
9493         (add_epsilon_src_nodes):  Likewise.
9494         (merge_state_array): Likewise.
9495         (update_regs): Likewise.
9496         (build_trtable): Likewise.
9497         (sift_states_backward): Mark MCTX parameter as const.
9498         (build_sifted_states): Likewise.
9499         (update_cur_sifted_state): Likewise.
9500         (sift_states_mkref): Likewise.
9501         (check_arrival_expand_ecl): Mark eclosure as const.
9502         (check_dst_limits_calc_pos_1): Likewise.
9503         * lib/regex_internal.h (re_match_context_t): Make dfa a const
9504         pointer.
9505
9506         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
9507
9508         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
9509         (transit_state_sb): Likewise.
9510         (transit_state_mb): Likewise.
9511         (sift_states_iter_mb): Likewise.
9512         (check_arrival_add_next_nodes): Likewise.
9513         (check_node_accept_bytes): Change first parameter to pointer-to-const.
9514         [_LIBC] (re_search_2_stub): Use mempcpy.
9515
9516         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
9517         mbrtowc for very simple UTF-8 case.
9518
9519         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
9520         a pointer-to-const.
9521         (re_acquire_state_context): Likewise.
9522         * lib/regex_internal.h: Adjust prototypes.
9523
9524         * lib/regex.c: Prevent using C++ compilers.
9525
9526         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
9527         (re_acquire_state_context): Likewise.
9528
9529 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9530
9531         * modules/regex (Depends-on): Add ssize_t.
9532
9533 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9534
9535         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
9536         translation table.
9537
9538 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9539
9540         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
9541
9542 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
9543             Bruno Haible  <bruno@clisp.org>
9544
9545         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
9546         <sys/types.h> and <inttypes.h>.
9547
9548 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9549
9550         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
9551         `__error_t_defined', so argp.h will not typedef the former.
9552
9553 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
9554
9555         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
9556         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
9557         glibc names.  Even if glibc is changed to conform to POSIX, the
9558         traditional names will be available anyway, since regex depends on
9559         the extensions module.  Also, fix a longstanding typo in the
9560         implementation of Spencer ERE test #75 from grep 2.3.  Problems
9561         reported by Emanuele Giaquinta.  Also, change sense of cached
9562         variable, so that the message makes sense.
9563
9564 2006-03-24  Simon Josefsson  <jas@extundo.com>
9565
9566         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
9567         including some doc fixes.
9568         (base64_encode_alloc): Fix +1 bug on allocation failures.
9569
9570 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9571
9572         * lib/base64.c (base64_encode): Do not read past end of array with
9573         unsanitized input on systems with CHAR_BIT > 8.
9574
9575 2006-03-24  Eric Blake  <ebb9@byu.net>
9576
9577         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
9578
9579 2006-03-22  Karl Berry  <karl@gnu.org>
9580
9581         * config/srclist.txt (*setenv.[ch]): get from coreutils.
9582         * config/srclistvars.sh (COREUTILS): new var.
9583
9584 2006-03-17  Jim Meyering  <jim@meyering.net>
9585
9586         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
9587         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
9588
9589 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
9590
9591         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
9592         no longer needs it.  Instead, check that regoff_t is as least
9593         as wide as ptrdiff_t.
9594
9595         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
9596         so that our regex.h stays compatible with the installed regex.
9597         This is helpful for installers who configure --without-included-regex.
9598         Problem reported by Emanuele Giaquinta.
9599
9600 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
9601
9602         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
9603         Typedef to long int, not to off_, as POSIX will likely change
9604         in that direction.
9605
9606 2006-03-15  Eric Blake  <ebb9@byu.net>
9607
9608         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
9609
9610 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
9611
9612         * lib/argp-help.c (validate_uparams): Fix typo
9613         * lib/argp-parse.c (argp_default_options): Consistently begin help
9614         messages with a lowercase letter.
9615
9616 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
9617
9618         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
9619         overrun buffers and shouldn't be used (much as gets shouldn't be
9620         used).
9621         * lib/time_r.c (asctime_r, ctime_r): Likewise.
9622
9623 2006-03-08  Simon Josefsson  <jas@extundo.com>
9624
9625         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
9626         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9627
9628 2006-03-08  Simon Josefsson  <jas@extundo.com>
9629
9630         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
9631         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9632
9633 2006-03-08  Simon Josefsson  <jas@extundo.com>
9634
9635         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
9636         signal that configure disabled the device.
9637
9638 2006-03-08  Simon Josefsson  <jas@extundo.com>
9639
9640         * build-aux/maint.mk: Fix refresh-po, to handle no translated
9641         languages.
9642
9643 2006-03-07  Simon Josefsson  <jas@extundo.com>
9644
9645         * modules/getopt (Depends-on): Add unistd.
9646
9647         * modules/unistd: New file.
9648
9649 2006-03-07  Simon Josefsson  <jas@extundo.com>
9650
9651         * modules/gc-random: New file.
9652
9653 2006-03-07  Simon Josefsson  <jas@extundo.com>
9654
9655         * m4/unistd_h.m4: New file.
9656
9657 2006-03-07  Simon Josefsson  <jas@extundo.com>
9658
9659         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
9660         test to be side-effect free by storing the result in the cache
9661         variable gl_cv_lib_readline, and moving the assignment of
9662         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
9663         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9664
9665 2006-03-07  Simon Josefsson  <jas@extundo.com>
9666
9667         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
9668         error on missing devices (the functions will return an error).
9669
9670         * m4/gc.m4: Move random stuff to gc-random.m4
9671
9672 2006-03-07  Simon Josefsson  <jas@extundo.com>
9673
9674         * lib/unistd_.h: New file.
9675
9676 2006-03-07  Simon Josefsson  <jas@extundo.com>
9677
9678         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
9679
9680 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9681
9682         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
9683         Problem reported by Juan Manuel Guerrero.
9684
9685 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9686
9687         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
9688         the unistd module.
9689         * lib/getlogin_r.c: Likewise.
9690         * lib/getlogin_r.h: Likewise.
9691         * lib/glob.c: Likewise.
9692         * lib/pagealign_alloc.c: Likewise.
9693         * lib/unistd_.h: Remove; no longer needed.
9694
9695 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9696
9697         * MODULES.html.sh (Support for systems lacking POSIX:2001):
9698         Add unistd.
9699         * modules/c-stack (Depends-on): Add unistd.
9700         * modules/getlogin_r: Likewise.
9701         * modules/glob: Likewise.
9702         * modules/pagealign_alloc: Likewise.
9703         * modules/unistd (Files): Remove lib/unistd_.h.
9704         (EXTRA_DIST): Remove.
9705         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
9706         need unistd_.h.
9707         (MOSTLYCLEANFILES): Remove unistd.h-t.
9708
9709 2006-03-03  Simon Josefsson  <jas@extundo.com>
9710
9711         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
9712
9713 2006-03-03  Simon Josefsson  <jas@extundo.com>
9714
9715         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
9716         libidn and bison.
9717
9718 2006-03-03  Simon Josefsson  <jas@extundo.com>
9719
9720         * build-aux/maint.mk: Add indent target.
9721
9722 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
9723
9724         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
9725         our replacement poll.h in any case, to avoid a differing
9726         declaration from a system header.  Seen on AIX.
9727
9728 2006-03-01  Simon Josefsson  <jas@extundo.com>
9729
9730         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
9731         <kasal@ucw.cz>.
9732
9733 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
9734
9735         * modules/gettime (Depends-on): Add extensions module.
9736         * modules/nanosleep (Depends-on): Likewise.
9737         * modules/settime (Depends-on): Likewise.
9738
9739 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
9740
9741         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
9742         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
9743         pedantically.
9744         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
9745         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
9746
9747         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
9748         not "==".  Reported by Ralf Wildenhues.
9749
9750 2006-03-01  Karl Berry  <karl@gnu.org>
9751
9752         * doc/Copyright/request-*: new files, synced from gnuorg.
9753
9754 2006-03-01  Karl Berry  <karl@gnu.org>
9755
9756         * config/srclist.txt (Copyright/*): new entries.
9757
9758 2006-02-28  Simon Josefsson  <jas@extundo.com>
9759
9760         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
9761
9762 2006-02-27  Simon Josefsson  <jas@extundo.com>
9763
9764         * lib/base64.h: Indent #define's.  From Jim Meyering
9765         <jim@meyering.net>.
9766
9767 2006-02-27  Jim Meyering  <jim@meyering.net>
9768
9769         Revert the change of 2006-02-24, so these files can continue
9770         to be sync'd from gettext.
9771         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
9772         of `config.h'.
9773
9774 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
9775
9776         * modules/intprops: New file.
9777         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
9778         Add intprops.
9779         * modules/getloadavg (Files): Remove lib/intprops.h.
9780         (Depends-on): Add intprops.
9781         * modules/human: Likewise.
9782         * modules/inttostr: Likewise.
9783         * modules/openat: Likewise.
9784         * modules/sig2str: Likewise.
9785         * modules/userspec: Likewise.
9786         * modules/utimecmp: Likewise.
9787         * modules/xnanosleep: Likewise.
9788         * modules/xstrtol: Likewise.
9789
9790 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
9791
9792         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
9793         * modules/lock-tests (TESTS): Use $(EXEEXT).
9794         * modules/tls-tests: Likewise.
9795         * modules/argp-tests: Likewise.
9796         (check_PROGRAMS): New var, replacing...
9797         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
9798
9799 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9800
9801         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
9802         `config.h'.
9803
9804 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
9805
9806         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
9807
9808 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9809
9810         Sync from coreutils.
9811         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
9812         gl_CHDIR_SAFER.
9813
9814 2006-02-22  Jim Meyering  <jim@meyering.net>
9815
9816         Sync from coreutils.
9817         * m4/chdir-safer.m4: New file.
9818
9819 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
9820
9821         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
9822         AT_FDCWD exceeds INT_MAX.
9823         * lib/openat.h (AT_FDCWD): Likewise.
9824
9825 2006-02-17  Eric Blake  <address@hidden>
9826
9827         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
9828
9829 2006-02-16  Simon Josefsson  <jas@extundo.com>
9830
9831         * modules/getaddrinfo (Depends-on): Add sys_socket.
9832
9833 2006-02-15  Simon Josefsson  <jas@extundo.com>
9834
9835         * build-aux/maint.mk: Add dsyntax-check rule.
9836
9837 2006-02-15  Eric Blake  <ebb9@byu.net>
9838
9839         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
9840         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
9841         'present but cannot compile' warnings on cygwin.
9842         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
9843         use ws2tcpip.h if sys/socket.h works.
9844         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
9845         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
9846
9847 2006-02-14  Simon Josefsson  <jas@extundo.com>
9848
9849         * modules/maintainer-makefile (Files): Rename.
9850
9851         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
9852         and (the local) Makefile.cfg to maint-cfg.mk.
9853
9854         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
9855         to the latter.
9856
9857         * modules/maintainer-makefile: New module.
9858
9859         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
9860         severaly stripped to make it possible to build it up from scratch
9861         with reliable tests.
9862
9863         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
9864         fixes to permit overriding the default actions when configure and
9865         makefile are not available.
9866
9867 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
9868
9869         Sync from coreutils.
9870         * modules/lstat (Depends-on): Don't depend on xalloc.
9871         (License): Change from GPL to LGPL, since this is now simply a
9872         replacement for a libc function.
9873
9874 2006-02-14  Jim Meyering  <jim@meyering.net>
9875
9876         Sync from coreutils.
9877
9878         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
9879         failure on deficient systems, and simplify gnulib lgpl dependencies.
9880         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
9881         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
9882
9883         * lib/xalloc-die.c: Remove unused definition of N_.
9884
9885 2006-02-14  Jim Meyering  <jim@meyering.net>
9886
9887         Sync from coreutils.
9888         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
9889         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
9890         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
9891         double-quote uses of that variable, to accommodate the rare case in
9892         which getmntent is available in none of the libraries checked.  This
9893         happens at least on FreeBSD 5.0.
9894
9895 2006-02-13  Simon Josefsson  <jas@extundo.com>
9896
9897         * gnulib-tool (Usage): Fix --import, from
9898         karl@freefriends.org (Karl Berry).
9899
9900 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
9901
9902         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
9903
9904 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
9905
9906         * lib/argp-namefrob.h: Restore changes accidentally lost during the
9907         "autoupdate" on 2005-12-12.
9908
9909 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
9910
9911         * modules/closeout (Depends-on): Remove atexit.
9912
9913 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
9914
9915         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
9916         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
9917
9918 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
9919
9920         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
9921         __EXTENSIONS__ if this causes compilation to fail.  Problem
9922         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
9923         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
9924
9925 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
9926
9927         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
9928         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
9929         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
9930         All uses changed.
9931
9932 2006-01-26  Simon Josefsson  <jas@extundo.com>
9933
9934         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
9935         prototype is visible on mingw32.
9936
9937         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
9938         for mingw32.
9939
9940         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
9941         mingw32).
9942
9943 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
9944
9945         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
9946         attempt to open for write; this always fails, at least on POSIX
9947         hosts.  This reinstates the 2006-01-09 change, which was
9948         inadvertently removed.
9949
9950 2006-01-26  Bruno Haible  <bruno@clisp.org>
9951
9952         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
9953         Reported by Paul Eggert.
9954
9955 2006-01-26  Bruno Haible  <bruno@clisp.org>
9956             Paul Eggert  <eggert@cs.ucla.edu>
9957
9958         * lib/stdbool_.h (_Bool)
9959         [(! (defined __cplusplus || defined __BEOS__)
9960           && !defined __GNUC__
9961           && !(defined __HP_cc || defined __xlc__
9962                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
9963                || defined __sgi))]:
9964         #define to signed char in these cases too; this simplifies
9965         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
9966         etc., separately) and makes it more conservative.
9967
9968 2006-01-25  Simon Josefsson  <jas@extundo.com>
9969
9970         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
9971         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
9972         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
9973
9974 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
9975
9976         * lib/argp-namefrob.h: Bugfix. Remove stray #
9977
9978 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
9979
9980         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
9981         so that we test the test.
9982         Check for yet another HP-UX cc bug involving *bool |= bool.
9983
9984 2006-01-25  Karl Berry  <karl@gnu.org>
9985
9986         * config/srclist.txt (vasnprintf.c): sync lost.
9987
9988 2006-01-25  Jim Meyering  <jim@meyering.net>
9989
9990         Sync from the stable (b5) branch of coreutils:
9991
9992         * lib/fts.c (fts_children): Don't let close() clobber errno from
9993         failed fchdir().
9994
9995         * lib/fts.c (fts_stat): When following a symlink-to-directory,
9996         don't necessarily interpret stat-fails+lstat-succeeds as indicating
9997         a dangling symlink.  That can also happen at least for ELOOP.
9998         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
9999         FYI, this bug predates the inclusion of fts.c in coreutils.
10000
10001         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
10002         in their own block, so pre-c99 compilers don't object.
10003
10004         Avoid the double-free (first in fts_read, second in fts_close) that
10005         would occur when an `active' directory is made inaccessible (e.g.,
10006         via chmod a-x) during a traversal.
10007         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
10008         before returning.  Reproduce this failure by
10009         mkdir -p a/b; cd a; chmod a-x . b
10010         Reported by Stavros Passas.
10011
10012 2006-01-25  Jim Meyering  <jim@meyering.net>
10013
10014         * lib/fileblocks.c: Remove more useless parentheses.
10015         * lib/readutmp.h: Likewise.
10016
10017 2006-01-25  Bruno Haible  <bruno@clisp.org>
10018
10019         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
10020         warnings.
10021         Reported by Paul Eggert.
10022
10023 2006-01-25  Bruno Haible  <bruno@clisp.org>
10024
10025         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
10026         rid of a trap command. For Solaris sh.
10027         Reported by Mark D. Baushke <mdb@gnu.org>.
10028
10029 2006-01-24  Simon Josefsson  <jas@extundo.com>
10030
10031         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
10032         Bruno.
10033
10034 2006-01-24  Karl Berry  <karl@gnu.org>
10035
10036         * config/srclist.txt (argp-namefrob.h): sync lost.
10037
10038 2006-01-24  Jim Meyering  <jim@meyering.net>
10039
10040         * modules/openat (Files): Add lib/intprops.h.
10041         From Mark D. Baushke.
10042
10043 2006-01-24  Jim Meyering  <jim@meyering.net>
10044
10045         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
10046         Reported by Mark D. Baushke.
10047
10048 2006-01-24  Jim Meyering  <jim@meyering.net>
10049
10050         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
10051
10052 2006-01-24  Bruno Haible  <bruno@clisp.org>
10053
10054         * modules/strnlen (Maintainer): Change from glibc to all.
10055
10056 2006-01-24  Bruno Haible  <bruno@clisp.org>
10057
10058         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
10059         Patch by Paul Eggert.
10060
10061 2006-01-24  Bruno Haible  <bruno@clisp.org>
10062
10063         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
10064         already has it.
10065         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
10066         2005-11-26.
10067
10068         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
10069         'signed char' to avoid problems with the built-in _Bool type.
10070         Reported by Paul Eggert on 2005-11-26.
10071
10072 2006-01-24  Bruno Haible  <bruno@clisp.org>
10073
10074         * gnulib-tool (func_import): Avoid constructing complicated sed
10075         expressions inside backquote.
10076         Report and solution by Mark D. Baushke <mdb@gnu.org>.
10077
10078 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
10079
10080         These changes imported from libc.
10081         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
10082         test and two separate function calls.
10083         * lib/strndup.c (__strndup): Add libc_hidden_def.
10084
10085 2006-01-23  Simon Josefsson  <jas@extundo.com>
10086
10087         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
10088         Remove the test_*_SOURCES variable: automake infers it by default.
10089         * modules/tls-tests: Likewise.
10090
10091 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10092
10093         Work around porting bugs reported by Dieter in
10094         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
10095         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
10096         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
10097         Include "getopt.h" first, to check interface.
10098         (getenv): Declare only if defined HAVE_DECL_GETENV &&
10099         !HAVE_DECL_GETENV.
10100         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
10101         (__strndup): Revert to K&R-style function dfns, the glibc style.
10102         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
10103         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
10104         Include strnlen.h first, to get prototype properly.
10105         (strnlen): Renamed from __strnlen.
10106         Remove weak alias.
10107
10108 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10109
10110         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
10111
10112 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10113
10114         * config/srclist.txt: Adjust to reflect glibc reorganization.
10115         This affects only comments.
10116
10117 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
10118
10119          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
10120          Reported by Bruce Korb <bkorb@gnu.org>.
10121
10122 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
10123
10124         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
10125         to pacify gcc -Wswitch-default.
10126
10127 2006-01-22  Bruno Haible  <bruno@clisp.org>
10128
10129         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
10130         temporary buffer for sprintf, take into account the precision also
10131         for 'd', 'i', 'u', 'o', 'x', 'X'.
10132
10133 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
10134
10135         * modules/argp-tests: New module
10136         * tests/test-argp.c: New file
10137         * tests/test-argp-2.sh: New file
10138
10139 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
10140
10141         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
10142         (__argp_base_name): Removed
10143         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
10144         typo.
10145         (__argp_base_name): Provide macro definition or extern declaration
10146         depending on the configuration
10147
10148 2006-01-20  Simon Josefsson  <jas@extundo.com>
10149
10150         * modules/inet_ntop (Depends-on): Depend on sys_socket.
10151
10152 2006-01-20  Simon Josefsson  <jas@extundo.com>
10153
10154         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
10155
10156 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
10157
10158         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
10159         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
10160         Suggested by Bruno Haible.
10161
10162 2006-01-20  Karl Berry  <karl@gnu.org>
10163
10164         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
10165         until changes propagate, I guess.
10166
10167 2006-01-19  Simon Josefsson  <jas@extundo.com>
10168
10169         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
10170
10171 2006-01-19  Simon Josefsson  <jas@extundo.com>
10172
10173         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
10174
10175 2006-01-19  Simon Josefsson  <jas@extundo.com>
10176
10177         * gnulib-tool: Set check_PROGRAMS.
10178
10179         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
10180         modules/des-tests, modules/gc-arcfour-tests,
10181         modules/gc-arctwo-tests, modules/gc-des-tests,
10182         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
10183         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
10184         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
10185         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
10186         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
10187         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
10188         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
10189         test_*_SOURCES.
10190
10191 2006-01-18  Simon Josefsson  <jas@extundo.com>
10192
10193         * modules/socklen (Depends-on): Depend on sys_socket.
10194
10195 2006-01-18  Simon Josefsson  <jas@extundo.com>
10196
10197         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
10198         modules/des-tests, modules/gc-arcfour-tests,
10199         modules/gc-arctwo-tests, modules/gc-des-tests,
10200         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
10201         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
10202         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
10203         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
10204         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
10205         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
10206         $(EXEEXT) to automake TESTS variable, for mingw32.
10207
10208 2006-01-17  Simon Josefsson  <jas@extundo.com>
10209
10210         * modules/socklen (Include): Need sys/socket.h.
10211
10212 2006-01-17  Bruno Haible  <bruno@clisp.org>
10213
10214         * modules/ssize_t (Include): Add <sys/types.h>.
10215
10216 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
10217
10218         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
10219         it's not portable and it doesn't work with cross-compiles.
10220         Problem reported by Bruno Haible.  Fix missing-$ typo in
10221         'test "gl_cv_ignore_unused_libraries" ...' that prevented
10222         -zignore from being used with Sun's C compiler.
10223
10224 2006-01-12  Simon Josefsson  <jas@extundo.com>
10225
10226         * lib/base64.c: Fix warning, reported by Bruno Haible
10227         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
10228
10229 2006-01-12  Bruno Haible  <bruno@clisp.org>
10230
10231         * modules/ldd: New file.
10232         * build-aux/ldd.sh.in: New file.
10233         * MODULES.html.sh (Support for building libraries and executables): Add
10234         ldd.
10235
10236 2006-01-12  Bruno Haible  <bruno@clisp.org>
10237
10238         * m4/ldd.m4: New file.
10239
10240 2006-01-12  Bruno Haible  <bruno@clisp.org>
10241
10242         * gnulib-tool (func_import, func_create_testdir): Don't go into an
10243         endless loop while replacing $auxdir with build-aux.
10244
10245 2006-01-11  Simon Josefsson  <jas@extundo.com>
10246
10247         * lib/stdint_.h (SIZE_MAX): Add missing (.
10248
10249 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
10250
10251         Sync from coreutils.
10252         * lib/md5.c: Fix commentary typos.
10253         (alignof, UNALIGNED_P): No need for a GCC-specific version.
10254         * lib/md5.h (__attribute__): Remove; unused.
10255         * lib/sha1.c: Fix commentary to match md5 better.
10256         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
10257         so that we don't need to worry about alignment.  All uses changed.
10258         This merges the 2005-10-28 md5 change into sha1.
10259
10260 2006-01-11  Jim Meyering  <jim@meyering.net>
10261
10262         Sync from coreutils.
10263         * lib/md5.c (OP): Fix spacing.
10264
10265 2006-01-11  Bruno Haible  <bruno@clisp.org>
10266
10267         Ensure automatic ordering between gl_LOCK and gl_ARGP.
10268         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
10269         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
10270
10271 2006-01-11  Bruno Haible  <bruno@clisp.org>
10272
10273         Ensure automatic ordering between gl_LOCK and gl_ARGP.
10274         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
10275         the "early" section as well.
10276
10277 2006-01-11  Bruno Haible  <bruno@clisp.org>
10278
10279         Avoid "ar: no archive members specified" error on MacOS X.
10280         * gnulib-tool (func_modules_add_dummy): New function.
10281         (func_import, func_create_testdir): Invoke it.
10282
10283 2006-01-11  Bruno Haible  <bruno@clisp.org>
10284
10285         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
10286         with $auxdir in AC_CONFIG_FILES statements.
10287
10288 2006-01-11  Bruno Haible  <bruno@clisp.org>
10289
10290         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
10291         Initialize also noinst_HEADERS to empty.
10292
10293 2006-01-11  Bruno Haible  <bruno@clisp.org>
10294
10295         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
10296         variables.
10297         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
10298         autoreconf.
10299
10300 2006-01-11  Bruno Haible  <bruno@clisp.org>
10301
10302         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
10303         overridable by the user.
10304         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10305
10306 2006-01-10  Simon Josefsson  <jas@extundo.com>
10307
10308         * modules/sys_socket: New file.
10309
10310 2006-01-10  Simon Josefsson  <jas@extundo.com>
10311
10312         * m4/sys_socket_h.m4: New file.
10313
10314 2006-01-10  Simon Josefsson  <jas@extundo.com>
10315
10316         * lib/socket_.h: New file.
10317
10318 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10319
10320         * modules/readutmp (Maintainer): Add myself.
10321
10322 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10323
10324         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
10325         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
10326         People who are still concerned with buggy memcmp implementations
10327         can invoke gl_FUNC_MEMCMP themselves.
10328
10329 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10330
10331         * lib/regex_internal.h (BITSET_WORD_BITS):
10332         Work around a bug in 64-bit PGC (before version 6.1-2), where the
10333         preprocessor mishandles large unsigned values as if they were signed.
10334         Problem reported by Claudio Fontana in
10335         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
10336
10337 2006-01-10  Jim Meyering  <jim@meyering.net>
10338
10339         Avoid the double-free (first in fts_read, second in fts_close) that
10340         would occur when an `active' directory is made inaccessible (e.g.,
10341         via chmod a-x) during a traversal.
10342         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
10343         before returning.  Reproduce this failure by
10344         mkdir -p a/b; cd a; chmod a-x . b
10345         Reported by Stavros Passas.
10346
10347         Sync from coreutils.
10348         * lib/sha1.c: Tweak grammar in a comment.
10349
10350 2006-01-10  Jim Meyering  <jim@meyering.net>
10351
10352         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
10353         Patch by Joerg Sonnenberger.
10354
10355 2006-01-10  Bruno Haible  <bruno@clisp.org>
10356
10357         * modules/readutmp: Depend on module free.
10358         * modules/strtok_r: Depend on module restrict.
10359
10360 2006-01-10  Bruno Haible  <bruno@clisp.org>
10361
10362         * modules/gettext (configure.ac): Add an invocation of
10363         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
10364
10365 2006-01-10  Bruno Haible  <bruno@clisp.org>
10366
10367         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
10368         Reported by Werner Lemberg <wl@gnu.org>.
10369
10370 2006-01-10  Bruno Haible  <bruno@clisp.org>
10371
10372         * lib/localcharset.c: Update from GNU gettext.
10373
10374 2006-01-10  Bruno Haible  <bruno@clisp.org>
10375
10376         * lib/argp.h (__const): Remove macro. Use const instead.
10377         * lib/argp-fmtstream.h (__const): Likewise.
10378         * lib/glob_.h (__const): Remove macro.
10379         * lib/glob-libc.h: Use const instead of __const.
10380
10381 2006-01-10  Bruno Haible  <bruno@clisp.org>
10382
10383         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
10384         variable.
10385         Needed to avoid an automake error regarding the 'gettext' module.
10386
10387 2006-01-09  Simon Josefsson  <jas@extundo.com>
10388
10389         * modules/inet_ntop (Depends-on): Add restrict.
10390
10391 2006-01-09  Simon Josefsson  <jas@extundo.com>
10392
10393         * modules/gc-rijndael-tests (License): Put under LGPL.
10394
10395         * modules/gc-des-tests (License): Likewise.
10396
10397         * modules/gc-arcfour-tests (License): Likewise.
10398
10399         * modules/gc-arctwo-tests (License): Likewise.
10400
10401         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
10402
10403         * modules/gc-hmac-sha1-tests (Files): Likewise.
10404
10405         * modules/gc-hmac-md5-tests (License): Likewise.
10406
10407         * modules/gc-sha1-tests (License): Likewise.
10408
10409         * modules/gc-md5-tests (License): Likewise.
10410
10411         * modules/gc-md4-tests (License): Likewise.
10412
10413         * modules/gc-md2-tests (License): Likewise.
10414
10415         * modules/gc-tests (License): Likewise.
10416
10417         * modules/des-tests (License): Likewise.
10418
10419         * modules/md4-tests (License): Likewise.
10420
10421         * modules/md2-tests (License): Likewise.
10422
10423 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10424
10425         Sync from coreutils:
10426
10427         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
10428         * modules/lib-ignore: New file.
10429         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
10430         chdir-safer.m4, lchmod.m4.
10431         * modules/openat: Add mkdirat.c, openat-priv.h.
10432
10433 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10434
10435         Sync from coreutils.
10436         * m4/lib-ignore.m4: New file.
10437         * m4/lchmod.m4: New file.
10438
10439 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10440
10441         Sync from coreutils.
10442         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
10443         for write access: POSIX says that must fail.
10444         * lib/fts.c (diropen): Likewise.
10445         * lib/save-cwd.c (save_cwd): Likewise.
10446         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
10447         well, for minor improvements on hosts that lack O_DIRECTORY.
10448         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
10449         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
10450         Fall back on chown if open failed with EACCES.
10451
10452         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
10453         Report an error at compile-time if only a 1-second nominal clock
10454         resolution is found.
10455
10456         * lib/lchmod.h: New file.
10457         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
10458         (make_dir_parents): Use lchown rather than chown, and
10459         lchmod rather than chmod.
10460
10461         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
10462         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
10463         "proc" reported by n0dalus.
10464
10465         * lib/mountlist.c: Include <limits.h>.
10466         (dev_from_mount_options)
10467         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
10468         New function.  It no longer assumes "dev=" has the System V meaning
10469         on Linux (since it doesn't).  It also parses "dev=" more carefully.
10470         (read_file_system_list)
10471         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
10472         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
10473         dev= in that case.
10474
10475         * lib/posixtm.h (PDS_PRE_2000): New macro.
10476         * lib/posixtm.c (year): Arg is now syntax_bits rather than
10477         allow_century.  All usages changed.  Reject dates outside the range
10478         1969-1999 if PDS_PRE_2000 is used.
10479
10480 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10481
10482         Sync from coreutils.
10483         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
10484         (Time of day items): Mention the possibility of leap seconds.
10485         Problem reported by Dr. David Alan Gilbert.
10486
10487 2006-01-09  Jim Meyering  <jim@meyering.net>
10488
10489         Sync from coreutils.
10490
10491         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
10492
10493         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
10494
10495         * lib/modechange.c (mode_compile): Reject an invalid mode string
10496         that starts with an octal digit.  From Andreas Gruenbacher.
10497
10498         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
10499         and dup to open_safer and dup_safer, respectively.
10500         (openat_permissive): Fix typo in comment.
10501
10502         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
10503         "gettext.h"; either no longer needed or are guaranteed by openat.h.
10504         (_): Remove; no longer needed.
10505         (openat): Renamed from rpl_openat; no need for rpl_openat
10506         since openat.h renames openat for us.
10507         Replace most of the body with a call to openat_permissive,
10508         to avoid duplicate code.
10509         Port to (probably hypothetical) environments were mode_t is
10510         wider than int.
10511         (openat_permissive): Require mode arg, so that we can check
10512         types better.  Put it just after flags.  Change cwd failure
10513         indicator from pointer-to-bool to pointer-to-errno-value.
10514         All callers changed.
10515         Invoke openat_save_fail and/or openat_restore_fail if
10516         cwd_errno is null, so that openat can call us.
10517         (openat_permissive, fdopendir, fstatat, unlinkat):
10518         Simplify errno handling to avoid some duplicate code,
10519         as it's OK to set errno on success.
10520         * lib/openat.h: Revamp code so that function macros depend on
10521         __OPENAT_PREFIX only, not also on AT_FDCWD.
10522         (openat_ro): Remove.  Caller changed to use openat_permissive.
10523         (openat_permissive): Now a macro, if not a function.
10524         (openat_restore_fail, openat_save_fail): Now always functions,
10525         since mkdirat needs them even if __OPENAT_PREFIX is defined.
10526
10527         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
10528         and openat.c.
10529         * lib/mkdirat.c: Include openat-priv.h.
10530         Remove definitions of macros defined therein.
10531         * lib/openat.c: Likewise.
10532
10533         * lib/mkdirat.c (mkdirat): New file and function.
10534         * lib/openat.h (mkdirat): Declare.
10535
10536         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
10537
10538         * lib/openat.h (openat_permissive): Declare.
10539         (openat_ro): Define.
10540
10541         * lib/openat.c (EXPECTED_ERRNO): New macro.
10542         (openat_permissive): New function -- used in remove.c rewrite.
10543         (all functions): Set errno just before returning, only if there
10544         was an actual failure.
10545         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
10546
10547         Emulate openat-family functions using Linux's procfs, if possible.
10548         Idea and some code based on Ulrich Drepper's glibc changes.
10549
10550         * lib/openat.c: (BUILD_PROC_NAME): New macro.
10551         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
10552         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
10553         before falling back on save_cwd and restore_cwd.
10554         (fdopendir, fstatat, unlinkat): Likewise.
10555
10556         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
10557         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
10558
10559         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
10560         as second argument to va_arg.  Otherwise, some versions of gcc
10561         warn that `if this code is reached, the program will abort'.
10562
10563 2006-01-09  Jim Meyering  <jim@meyering.net>
10564
10565         Sync from coreutils.
10566         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
10567         Require openat-priv.h.
10568
10569 2006-01-09  Bruno Haible  <bruno@clisp.org>
10570
10571         * modules/strnlen (Include): Use strnlen.h.
10572
10573 2006-01-09  Bruno Haible  <bruno@clisp.org>
10574
10575         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
10576
10577 2006-01-09  Bruno Haible  <bruno@clisp.org>
10578
10579         * lib/sysexit_.h (EX_OK): New macro.
10580         Suggested by Martin Lambers <marlam@marlam.de>.
10581
10582 2006-01-09  Bruno Haible  <bruno@clisp.org>
10583
10584         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
10585         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
10586
10587 2006-01-09  Bruno Haible  <bruno@clisp.org>
10588
10589         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
10590         numbers.
10591
10592 2006-01-09  Bruno Haible  <bruno@clisp.org>
10593
10594         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
10595         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
10596         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
10597         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
10598
10599 2006-01-09  Bruno Haible  <bruno@clisp.org>
10600
10601         * build-aux/javacomp.sh.in: New file, moved from lib/.
10602         * modules/javacomp-script (Files): Update.
10603         (configure.ac): Add AC_CONFIG_FILES invocation.
10604         (EXTRA_DIST): Remove variable.
10605
10606         * build-aux/javaexec.sh.in: New file, moved from lib/.
10607         * modules/javaexec (Files): Update.
10608         (configure.ac): Add AC_CONFIG_FILES invocation.
10609         (EXTRA_DIST): Remove javaexec.sh.in.
10610
10611         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
10612         * modules/csharpcomp-script (Files): Update.
10613         (configure.ac): Add AC_CONFIG_FILES invocation.
10614         (EXTRA_DIST): Remove variable.
10615
10616         * build-aux/csharpexec.sh.in: New file, moved from lib/.
10617         * modules/csharpexec (Files): Update.
10618         (configure.ac): Add AC_CONFIG_FILES invocation.
10619         (EXTRA_DIST): Remove csharpexec.sh.in.
10620
10621 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
10622
10623         Sync from coreutils.
10624
10625         Add POSIX ACL support
10626         * lib/acl.h (copy_acl, set_acl): Add declarations.
10627         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
10628         systems other than Linux.
10629         (chmod_or_fchmod): New function: use fchmod when possible,
10630         and chmod otherwise.
10631         (file_has_acl): Add a POSIX ACL implementation, with a
10632         Linux-specific subcase.
10633         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
10634         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
10635         acls are unsupported.
10636         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
10637         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
10638         are unsupported.
10639
10640 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
10641
10642         Sync from coreutils.
10643         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
10644
10645 2006-01-07  Bruno Haible  <bruno@clisp.org>
10646
10647         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
10648         gl_EARLY.
10649
10650 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
10651
10652         * lib/strftime.c (tzname): Don't declare if it is already #defined.
10653         Problem reported for Mingw by Mark Junker.
10654
10655 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
10656
10657         * README: Gnulib normally doesn't generate a tarball.
10658
10659 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
10660
10661         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
10662         long int, not int, for nanosecond counts, so that people who are
10663         used to POSIX struct timespec won't be surprised.  Reported by Jim
10664         Meyering.
10665
10666 2005-12-28  Bruno Haible  <bruno@clisp.org>
10667
10668         * build-aux/config.rpath: Update from GNU gettext.
10669
10670 2005-12-16  Jim Meyering  <jim@meyering.net>
10671
10672         * modules/fprintftime: New module.
10673         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
10674
10675 2005-12-16  Jim Meyering  <jim@meyering.net>
10676
10677         * m4/fprintftime.m4: New file.
10678
10679 2005-12-16  Jim Meyering  <jim@meyering.net>
10680
10681         * lib/fprintftime.c, lib/fprintftime.h: New files.
10682
10683 2005-12-15  Simon Josefsson  <jas@extundo.com>
10684
10685         * modules/socklen (configure.ac): Fix M4 macro name, to align with
10686         new m4/socklen.m4.
10687
10688 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
10689
10690         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
10691         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
10692
10693 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
10694
10695         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
10696         * lib/argp-help.c (fill_in_uparams): Check if the constructed
10697         struct uparams is valid. Fall back to the default values if it is
10698         not.
10699
10700 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10701
10702         * modules/argp (Files): Add argp-pin.c
10703         (Depends-on): dirname
10704         (lib_SOURCES): Add argp-pin.c
10705
10706 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10707
10708         * m4/argp.m4:  Check if program_invocation_name and
10709         program_invocation_short_name are declared and define appropriate
10710         macros if they are not.
10711
10712 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10713
10714         * lib/argp-help.c (__argp_base_name): New function
10715         (__argp_short_program_name): Rewrite using __argp_base_name
10716         * lib/argp-namefrob.h: Define program_invocation_name and
10717         program_invocation_short_name if requested
10718         (__argp_base_name): Add prototype
10719         * lib/argp-parse.c (argp_def): Use gettext wrappers
10720         (argp_default_parser): Use __argp_base_name
10721         * lib/argp-pin.c: New file. Defines program_invocation_name and
10722         program_invocation_short_name on systems that lack them.
10723
10724 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
10725
10726         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
10727         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
10728         porting problem reported by Georg Schwarz in
10729         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
10730
10731 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
10732
10733         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
10734         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
10735         porting problem reported by Georg Schwarz in
10736         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
10737
10738 2005-12-05  Bruno Haible  <bruno@clisp.org>
10739
10740         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
10741         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
10742         Reported by Mark Junker <mjscod@gmx.de>.
10743
10744 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
10745
10746         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
10747         Use implementation from Albert Chin, with some
10748         comments/corrections by Stepan Kasal and myself.
10749
10750 2005-12-02  Bruno Haible  <bruno@clisp.org>
10751
10752         * gnulib-tool (func_import): Accept GPLed build tool modules when
10753         --lgpl is given.
10754         * modules/csharpcomp-script: New file.
10755         * modules/csharpcomp: Depend on it.
10756         * modules/javacomp-script: New file.
10757         * modules/javacomp: Depend on it.
10758         Suggested by Simon Josefsson.
10759
10760 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
10761
10762         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
10763         statement, to work around an HP-UX 10.20 compiler bug reported by
10764         Peter O'Gorman.
10765
10766 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
10767
10768         * modules/savedir (Depends-on): Add openat.
10769
10770 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
10771
10772         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
10773         (uintmax_t) [defined uintmax_t]: Do not declare.
10774         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
10775         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
10776         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
10777         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
10778         sake of portability to weird hosts that C allows (though we don't
10779         know of any practical examples).
10780
10781         * lib/savedir.h (fdsavedir): New decl.
10782         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
10783         contains most of the former guts of savedir.
10784         (savedir): Use savedirstream.
10785         Include "openat.h".
10786
10787 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
10788
10789         * modules/obstack (Files): Add m4/ulonglong.m4.
10790         Problem reported by Davide Angelocola.
10791
10792 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
10793
10794         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
10795         coreutils no longer futzes with rounding modes.
10796
10797 2005-11-14  Jim Meyering  <jim@meyering.net>
10798
10799         * lib/mkstemp-safer.c: Include <config.h>, required for possible
10800         replacement of mkstemp.
10801
10802 2005-11-10  Simon Josefsson  <jas@extundo.com>
10803
10804         * lib/readline.c: Remove EOL.
10805
10806 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10807
10808         * modules/gethrxtime (Depends-on): Add gettime.
10809
10810 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10811
10812         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
10813         or gettimeofday; no longer needed.
10814
10815 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10816
10817         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
10818         time business.
10819         (gethrxtime) [! (HAVE_NANOUPTIME
10820         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
10821         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
10822         our own approximation.
10823
10824 2005-11-08  Eric Blake  <ebb9@byu.net>
10825
10826         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
10827
10828 2005-11-08  Eric Blake  <ebb9@byu.net>
10829
10830         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
10831
10832 2005-11-04  Bruno Haible  <bruno@clisp.org>
10833
10834         * gnulib-tool: Implement --update mode.
10835
10836 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
10837
10838         Fix porting problem reported by Theodoros V. Kalamatianos.
10839         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
10840         Don't assume that futimes failing means we must fail.
10841
10842 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
10843
10844         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
10845         variables to suggest the intended function of the PATH_MAX check.
10846
10847 2005-10-30  Kean Johnston  <jkj@sco.com>
10848
10849         Trivial changes to support SCO systems.
10850         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
10851         as PATH_MAX.
10852         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
10853         where __ptr is null when no I/O is pending.
10854
10855 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
10856
10857         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
10858         leave errno alone.  Problem reported by Dmitry V. Levin.
10859
10860 2005-10-28  Simon Josefsson  <jas@extundo.com>
10861
10862         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
10863         Test more.
10864
10865         * tests/test-gc-md2.c, tests/test-md2.c: New files.
10866
10867         * modules/md2, modules/md2-tests: New files.
10868
10869 2005-10-28  Simon Josefsson  <jas@extundo.com>
10870
10871         * m4/inet_ntop.m4: More tests.
10872
10873         * m4/gc-md2.m4, md2.m4: New file.
10874
10875 2005-10-28  Simon Josefsson  <jas@extundo.com>
10876
10877         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
10878         "restrict" keywords, as per POSIX.  Protect the function
10879         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
10880         Don't use K&R prototypes.  Check the sprintf return values.
10881         Re-define EAFNOSUPPORT if not present.  Indent.
10882
10883         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
10884         suggested by Bruno Haible <bruno@clisp.org>.
10885
10886         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
10887
10888         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
10889
10890         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
10891         libgcrypt).
10892
10893         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
10894
10895         * lib/md2.h, lib/md2.c: New files.
10896
10897 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
10898
10899         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
10900         errno alone.  Problem reported by Frederic Jolliton.
10901
10902 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
10903
10904         * modules/verify (License): Change from GPL to LGPL.  This is a
10905         tiny module and there are apparently near-equivalents that are
10906         under the BSD license.
10907
10908 2005-10-24  Simon Josefsson  <jas@extundo.com>
10909
10910         * modules/sha1: Relicense to LGPL.
10911
10912 2005-10-24  Simon Josefsson  <jas@extundo.com>
10913
10914         * lib/md4.h: Shrink buffer size, now that we changed the type.
10915
10916 2005-10-23  Simon Josefsson  <jas@extundo.com>
10917
10918         * gnulib-tool (func_import): Fix --tests-base.
10919
10920 2005-10-22  Simon Josefsson  <jas@extundo.com>
10921
10922         * modules/arcfour (Depends-on): Need stdint.
10923
10924 2005-10-22  Simon Josefsson  <jas@extundo.com>
10925
10926         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
10927         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
10928
10929 2005-10-22  Simon Josefsson  <jas@extundo.com>
10930
10931         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
10932         suggested by Bruno Haible <bruno@clisp.org>.
10933
10934 2005-10-22  Simon Josefsson  <jas@extundo.com>
10935
10936         * lib/crc.h: Include stddef.h, for size_t.
10937
10938 2005-10-22  Simon Josefsson  <jas@extundo.com>
10939
10940         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
10941         arcfour_context struct (simplify test vector testing in GNU
10942         Shishi).
10943
10944 2005-10-21  Simon Josefsson  <jas@extundo.com>
10945
10946         * modules/des, modules/des-tests: New files.
10947
10948         * modules/gc-des, modules/gc-des-tests: New files.
10949
10950         * tests/test-des.c, tests/test-gc-des.c: New file.
10951
10952 2005-10-21  Simon Josefsson  <jas@extundo.com>
10953
10954         * modules/arctwo, modules/arctwo-tests: New files.
10955
10956         * tests/test-arctwo.c: New file.
10957
10958         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
10959
10960         * tests/test-gc-arctwo.c: New file.
10961
10962 2005-10-21  Simon Josefsson  <jas@extundo.com>
10963
10964         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
10965         Bruno Haible <bruno@clisp.org>.
10966
10967         * m4/gc-des.m4: New file.
10968
10969 2005-10-21  Simon Josefsson  <jas@extundo.com>
10970
10971         * m4/arctwo.m4: New file.
10972
10973         * m4/gc-arctwo.m4: New file.
10974
10975 2005-10-21  Simon Josefsson  <jas@extundo.com>
10976
10977         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
10978         block.
10979
10980 2005-10-21  Simon Josefsson  <jas@extundo.com>
10981
10982         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
10983         <bruno@clisp.org>.
10984
10985         * lib/hmac-sha1.c (hmac_sha1): Likewise.
10986
10987         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
10988         Bruno Haible <bruno@clisp.org>.
10989
10990         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
10991         <bruno@clisp.org>.
10992
10993 2005-10-21  Simon Josefsson  <jas@extundo.com>
10994
10995         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
10996
10997 2005-10-21  Simon Josefsson  <jas@extundo.com>
10998
10999         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
11000
11001 2005-10-21  Simon Josefsson  <jas@extundo.com>
11002
11003         * lib/des.h, lib/des.c: New files.
11004
11005         * lib/gc-gnulib.c: Support DES.c
11006
11007 2005-10-21  Simon Josefsson  <jas@extundo.com>
11008
11009         * lib/arctwo.h, lib/arctwo.c: New files.
11010
11011         * lib/gc-gnulib.c: Support ARCTWO.
11012
11013 2005-10-21  Simon Josefsson  <jas@extundo.com>
11014
11015         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
11016         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11017
11018 2005-10-21  Simon Josefsson  <jas@extundo.com>
11019
11020         * gnulib-tool (func_import, func_create_testdir): Define automake
11021         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
11022         Makefile.am snippet),
11023         suggested by Bruno Haible <bruno@clisp.org>.
11024
11025         * modules/gc (Makefile.am): Use it.
11026
11027 2005-10-21  Bruno Haible  <bruno@clisp.org>
11028
11029         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
11030         patch.
11031
11032 2005-10-19  Simon Josefsson  <jas@extundo.com>
11033
11034         * tests/test-gc-rijndael.c: New file.
11035
11036         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
11037
11038 2005-10-19  Simon Josefsson  <jas@extundo.com>
11039
11040         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
11041         interface too.
11042
11043 2005-10-19  Simon Josefsson  <jas@extundo.com>
11044
11045         * tests/test-gc-arcfour.c: New file.
11046
11047         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
11048
11049 2005-10-19  Simon Josefsson  <jas@extundo.com>
11050
11051         * modules/gc-md4, modules/gc-md4-tests: New file.
11052
11053         * tests/test-gc-md4.c: New file.
11054
11055 2005-10-19  Simon Josefsson  <jas@extundo.com>
11056
11057         * m4/gc-md4.m4: New file.
11058
11059 2005-10-19  Simon Josefsson  <jas@extundo.com>
11060
11061         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
11062         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
11063         <kasal@ucw.cz>.
11064
11065 2005-10-19  Simon Josefsson  <jas@extundo.com>
11066
11067         * m4/gc-arcfour.m4: New file.
11068
11069         * m4/gc-rijndael.m4: New file.
11070
11071 2005-10-19  Simon Josefsson  <jas@extundo.com>
11072
11073         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
11074
11075 2005-10-19  Simon Josefsson  <jas@extundo.com>
11076
11077         * lib/gc-gnulib.c: Support ARCFOUR.
11078
11079 2005-10-19  Simon Josefsson  <jas@extundo.com>
11080
11081         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
11082         support.
11083
11084         * lib/gc.h: Add ECB enum type.
11085
11086         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
11087
11088 2005-10-18  Simon Josefsson  <jas@extundo.com>
11089
11090         * tests/test-md5.c: New file.
11091
11092         * modules/md5-tests: New file.
11093
11094 2005-10-18  Simon Josefsson  <jas@extundo.com>
11095
11096         * tests/test-md4.c: New file.
11097
11098         * modules/md4, modules/md4-tests: New files.
11099
11100 2005-10-18  Simon Josefsson  <jas@extundo.com>
11101
11102         * m4/md4.m4: New file.
11103
11104 2005-10-18  Simon Josefsson  <jas@extundo.com>
11105
11106         * lib/md4.h, lib/md4.c: New files, based on md5.?.
11107
11108 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
11109
11110         * gnulib-tool (func_create_testdir): Omit the second check whether
11111         BUILT_SOURCES in nonempty.
11112
11113 2005-10-17  Simon Josefsson  <jas@extundo.com>
11114
11115         * tests/test-rijndael.c: New file.
11116
11117 2005-10-17  Simon Josefsson  <jas@extundo.com>
11118
11119         * modules/sha1: Depend on stdint instead of md5.
11120
11121         * modules/md5: Depend on stdint, remove uint32_t.
11122
11123 2005-10-17  Simon Josefsson  <jas@extundo.com>
11124
11125         * modules/gc-sha1-tests: New file.
11126
11127         * tests/test-gc-sha1.c: New file.
11128
11129 2005-10-17  Simon Josefsson  <jas@extundo.com>
11130
11131         * m4/md5.m4: Remove call to uint32_t.m4.
11132
11133 2005-10-17  Simon Josefsson  <jas@extundo.com>
11134
11135         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
11136
11137         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
11138         md5.h.
11139
11140         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
11141
11142         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
11143
11144 2005-10-17  Simon Josefsson  <jas@extundo.com>
11145
11146         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
11147
11148 2005-10-17  Simon Josefsson  <jas@extundo.com>
11149
11150         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
11151
11152 2005-10-17  Simon Josefsson  <jas@extundo.com>
11153
11154         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
11155
11156         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
11157
11158 2005-10-17  Bruno Haible  <bruno@clisp.org>
11159
11160         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
11161         that it can also be used in a test.
11162
11163 2005-10-16  Bruno Haible  <bruno@clisp.org>
11164
11165         * gnulib-tool (func_emit_tests_Makefile_am): Also define
11166         TESTS_ENVIRONMENT, so that individual tests can augment it.
11167
11168         * gnulib-tool (func_create_testdir): Use an intermediate target for
11169         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
11170         macros, like $(ALLOCA_H), which cannot be passed through the command
11171         line.
11172
11173 2005-10-15  Simon Josefsson  <jas@extundo.com>
11174
11175         * modules/rijndael-tests: New file.
11176
11177         * modules/rijndael: New file.
11178
11179 2005-10-15  Simon Josefsson  <jas@extundo.com>
11180
11181         * m4/rijndael.m4: New file.
11182
11183 2005-10-15  Simon Josefsson  <jas@extundo.com>
11184
11185         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
11186
11187         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
11188
11189 2005-10-14  Simon Josefsson  <jas@extundo.com>
11190
11191         * tests/test-arcfour.c: New file.
11192
11193         * modules/arcfour, modules/arcfour-tests: New files.
11194
11195 2005-10-14  Simon Josefsson  <jas@extundo.com>
11196
11197         * m4/arcfour.m4: New file.
11198
11199 2005-10-14  Simon Josefsson  <jas@extundo.com>
11200
11201         * lib/arcfour.h, lib/arcfour.c: New files.
11202
11203 2005-10-14  Roland McGrath  <roland@redhat.com>
11204
11205         Import from libc.  [BZ #1331]
11206         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
11207         macro argument.
11208         Reported by Matej Vela <vela@debian.org>.
11209
11210 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
11211
11212         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
11213         include <wchar.h>; no longer needed.
11214
11215 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
11216
11217         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
11218
11219 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
11220         and  Ulrich Drepper  <drepper@redhat.com>
11221
11222         Import from libc.
11223         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
11224         instead of inline stream orientation test and two separate
11225         function calls.  Pay no attention to USE_IN_LIBIO.
11226
11227 2005-10-13  Simon Josefsson  <jas@extundo.com>
11228
11229         * modules/gc-hmac-md5-tests: New file.
11230
11231         * tests/test-gc-hmac-sha1.c: New file.
11232
11233         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
11234
11235         * modules/gc-hmac-md5-tests: New file.
11236
11237         * tests/test-gc-md5.c: New file.
11238
11239         * modules/gc-md5-tests: New file.
11240
11241 2005-10-13  Simon Josefsson  <jas@extundo.com>
11242
11243         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
11244         Move memory allocation outside of loop.
11245
11246 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
11247
11248         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
11249         intermediate directory is in a read-only file system.  Problem
11250         reported by Eric Blake.
11251
11252 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
11253
11254         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
11255
11256 2005-10-12  Simon Josefsson  <jas@extundo.com>
11257
11258         * tests/test-hmac-sha1.c: New file.
11259
11260         * modules/hmac-sha1-tests: New file.
11261
11262         * modules/hmac-sha1: New file.
11263
11264 2005-10-12  Simon Josefsson  <jas@extundo.com>
11265
11266         * modules/gc-sha1: New file.
11267
11268 2005-10-12  Simon Josefsson  <jas@extundo.com>
11269
11270         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
11271
11272         * tests/test-gc-pbkdf2-sha1.c: New file.
11273
11274 2005-10-12  Simon Josefsson  <jas@extundo.com>
11275
11276         * modules/gc-md5, modules/gc-hmac-md5: New files.
11277
11278         * modules/gc (Files): Remove md5, memxor and hmac files.
11279
11280 2005-10-12  Simon Josefsson  <jas@extundo.com>
11281
11282         * m4/gc-pbkdf2-sha1.m4: New file.
11283
11284         * m4/gc-hmac-sha1.m4: New file.
11285
11286         * m4/gc-sha1: New file.
11287
11288         * m4/hmac-sha1.m4: New file.
11289
11290 2005-10-12  Simon Josefsson  <jas@extundo.com>
11291
11292         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
11293
11294         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
11295
11296 2005-10-12  Simon Josefsson  <jas@extundo.com>
11297
11298         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
11299         suggested by Bruno Haible <bruno@clisp.org>.
11300
11301 2005-10-12  Simon Josefsson  <jas@extundo.com>
11302
11303         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
11304
11305 2005-10-12  Simon Josefsson  <jas@extundo.com>
11306
11307         * lib/gc-pbkdf2-sha1.c: New file.
11308
11309         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
11310
11311 2005-10-12  Simon Josefsson  <jas@extundo.com>
11312
11313         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
11314
11315         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
11316
11317 2005-10-12  Simon Josefsson  <jas@extundo.com>
11318
11319         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
11320         GC_USE_HMAC_MD5, respectively.
11321
11322         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
11323         (gc_md5): Fix typo.
11324
11325         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
11326
11327         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
11328
11329         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
11330
11331 2005-10-12  Bruno Haible  <bruno@clisp.org>
11332
11333         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
11334         Reported by Stepan Kasal <kasal@ucw.cz>.
11335
11336 2005-10-11  Simon Josefsson  <jas@extundo.com>
11337
11338         * tests/test-crc.c: New file.
11339
11340         * modules/crc, modules/crc-tests: New files.
11341
11342 2005-10-11  Simon Josefsson  <jas@extundo.com>
11343
11344         * m4/crc.m4: New file.
11345
11346 2005-10-11  Simon Josefsson  <jas@extundo.com>
11347
11348         * lib/gc.h: Add gc_hash and gc_hash_buffer.
11349
11350         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
11351
11352         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
11353
11354 2005-10-11  Simon Josefsson  <jas@extundo.com>
11355
11356         * lib/crc.h, lib/crc.c: New files.
11357
11358         * lib/gc.h (gc_hash_buffer): Add doc.
11359
11360 2005-10-11  Bruno Haible  <bruno@clisp.org>
11361
11362         * modules/c-strcasestr: New file.
11363         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
11364
11365 2005-10-11  Bruno Haible  <bruno@clisp.org>
11366
11367         * modules/c-strcase: New file.
11368         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
11369
11370 2005-10-11  Bruno Haible  <bruno@clisp.org>
11371
11372         * lib/strcasecmp.c: Include limits.h.
11373         (strcasecmp): Avoid integer overflow on exotic platforms.
11374         * lib/strncasecmp.c: Include limits.h.
11375         (strncasecmp): Avoid integer overflow on exotic platforms.
11376         Reported by Paul Eggert.
11377
11378 2005-10-11  Bruno Haible  <bruno@clisp.org>
11379
11380         * lib/c-strcasestr.h: New file, from GNU gettext.
11381         * lib/c-strcasestr.c: New file, from GNU gettext.
11382
11383 2005-10-11  Bruno Haible  <bruno@clisp.org>
11384
11385         * lib/c-strcase.h: New file, from GNU gettext.
11386         * lib/c-strcasecmp.c: New file, from GNU gettext.
11387         * lib/c-strncasecmp.c: New file, from GNU gettext.
11388
11389 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
11390
11391         * modules/mempcpy (License): GPL -> LGPL.
11392         * modules/strchrnul (License): Likewise.
11393         * modules/sysexits (License): Likewise.
11394
11395 2005-10-08  Simon Josefsson  <jas@extundo.com>
11396
11397         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
11398
11399 2005-10-07  Simon Josefsson  <jas@extundo.com>
11400
11401         * m4/memxor.m4: Remove gl_C_RESTRICT call.
11402
11403 2005-10-06  Simon Josefsson  <jas@extundo.com>
11404
11405         * tests/test-hmac-md5.c: New file.
11406
11407         * modules/hmac-md5-tests: New file.
11408
11409         * modules/hmac-md5: New file.
11410
11411 2005-10-06  Simon Josefsson  <jas@extundo.com>
11412
11413         * m4/hmac-md5.m4: New file.
11414
11415         * m4/memxor.m4: Require gl_C_RESTRICT.
11416
11417 2005-10-06  Simon Josefsson  <jas@extundo.com>
11418
11419         * lib/memxor.c (memxor): Avoid casts and warnings.
11420
11421 2005-10-06  Simon Josefsson  <jas@extundo.com>
11422
11423         * lib/hmac-md5.c: New file.
11424
11425         * lib/hmac.h: New file.
11426
11427 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
11428
11429         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
11430         promotes to int, not unsigned int, to catch the AIX 5.3
11431         compiler bug.
11432
11433 2005-10-05  Simon Josefsson  <jas@extundo.com>
11434
11435         * modules/memxor: New file.
11436
11437         * modules/iconv (Files): Move config.rpath to havelib, it is used
11438         there.
11439
11440         * modules/havelib (Files): Add config.rpath.
11441
11442 2005-10-05  Simon Josefsson  <jas@extundo.com>
11443
11444         * m4/memxor.m4: New file.
11445
11446 2005-10-05  Simon Josefsson  <jas@extundo.com>
11447
11448         * lib/memxor.c (memxor): Fix compiler error.
11449
11450         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
11451         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
11452
11453         * lib/memxor.h, lib/memxor.c: New files.
11454
11455         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
11456         we assume all systems have it, suggested by Jim Meyering
11457         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
11458         any systems lack sys/socket.h; mingw32 is known to lack it, but we
11459         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
11460         same reasons.
11461
11462 2005-10-05  Simon Josefsson  <jas@extundo.com>
11463
11464         * config/srclist.txt: Add glibc bug 1423 for md5.h.
11465
11466 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
11467
11468         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
11469         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
11470         needed, since the source code now assumes these .h files.
11471
11472 2005-10-05  Derek Price  <derek@ximbiot.com>
11473
11474         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
11475
11476 2005-10-05  Bruno Haible  <bruno@clisp.org>
11477
11478         * modules/stdint (License): Change to LGPL.
11479
11480 2005-10-04  Simon Josefsson  <jas@extundo.com>
11481
11482         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
11483         D. Baushke" <mdb@gnu.org>.
11484
11485 2005-10-04  Bruno Haible  <bruno@clisp.org>
11486
11487         * lib/verify.h (verify_true): Provide alternative definition for C++.
11488
11489 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
11490
11491         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
11492         (SSIZE_MAX): New macro, if not already defined.
11493         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
11494         than 2 GiB.
11495
11496 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
11497
11498         Sync from coreutils.
11499         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
11500         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
11501         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
11502         ULLONG_MAX doesn't work with 2.7.2.1.
11503
11504 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
11505
11506         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
11507         From Ben Pfaff.
11508
11509         * modules/exclude (Depends-on): Depend on verify.
11510         * modules/strtoimax (Depends-on): Likewise.
11511         * modules/utimecmp (Depends-on): Likewise.
11512
11513 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
11514
11515         * lib/exclude.c: Include verify.h.
11516         (verify): Remove.  All callers changed to use verify.h's version.
11517         * lib/strtoimax.c: Likewise.
11518         * lib/utimecmp.c: Likewis.e
11519
11520         Sync from coreutils.
11521         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
11522         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
11523         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
11524         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
11525         bother returning ENOSYS if settimeofday or stime fails; just let
11526         them return whatever errno they want to return.
11527         * lib/utimens.c: Include unistd.h, for dup2.
11528         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
11529         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
11530
11531 2005-10-02  Jim Meyering  <jim@meyering.net>
11532
11533         Sync from coreutils.
11534         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
11535         from glibc-2.2.5 that fails for read-only files.
11536
11537 2005-10-02  Jim Meyering  <jim@meyering.net>
11538
11539         Sync from coreutils.
11540         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
11541         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
11542         `#if HAVE_CONFIG_H'.
11543         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
11544         Remove AT_FDCWD test.
11545         Do not consume the fd unless successful.
11546         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
11547         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
11548         block, so that we don't even try to compile it if settimeofday is
11549         available.  This works around a compilation failure on OSF1 V5.1,
11550         due to stime requiring a `long int*' while tv_sec is `int'.
11551
11552 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
11553
11554         Sync from coreutils.
11555         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
11556         against `yes', rather than just testing for nonempty.
11557
11558 2005-10-01  Simon Josefsson  <jas@extundo.com>
11559
11560         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
11561         and Darwin.
11562
11563         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
11564         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
11565         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
11566         freeaddrinfo and gai_strerror are declared by the POSIX headers.
11567         Check if struct addrinfo is declared.
11568
11569 2005-10-01  Simon Josefsson  <jas@extundo.com>
11570
11571         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
11572         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
11573         AI_* and EAI_* definitions.  Protect function declarations.
11574
11575 2005-10-01  Jim Meyering  <jim@meyering.net>
11576
11577         Sync from coreutils.
11578
11579         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
11580         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
11581         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
11582         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
11583         in the inet and nsl libraries.  Required on Solaris 5.7.
11584
11585 2005-10-01  Jim Meyering  <jim@meyering.net>
11586
11587         Sync from coreutils.
11588         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
11589         in the inet and nsl libraries.  Required on Solaris 5.7.
11590
11591 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
11592
11593         * lib/getdelim.c (getdelim): Remove unused variables.
11594
11595 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
11596
11597         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
11598         so that the code works even with ancient cpp.  Portability problem
11599         with GCC 2.7.2.1 reported by Thomas M.Ott.
11600
11601 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
11602
11603         * modules/regex (Depends-on): Add strcase.
11604
11605         * modules/gethostname (Licence): Change from GPL to LGPL, since
11606         gethostname.c is a trivial implementation of a standard library
11607         function.
11608         * modules/poll (License): Change from GPL to LGPL, since it's
11609         derived from LGPL code.
11610
11611 2005-09-27  Jim Meyering  <jim@meyering.net>
11612
11613         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
11614         HAVE_CONFIG_H.
11615
11616         * lib/intprops.h (signed_type_or_expr__): Define.
11617         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
11618         for unsigned types.
11619
11620 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
11621
11622         * lib/verify.h (verify_expr): Remove, replacing with:
11623         (verify_true): New macro that returns true instead of void.
11624         (verify_type__): Remove.
11625         (verify): Use verify_true rather than verify_type__.
11626
11627 2005-09-26  Bruno Haible  <bruno@clisp.org>
11628
11629         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
11630         is necessary.
11631         (lib_SOURCES): Remove mbchar.c.
11632         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
11633         (Files): Add m4/mbrtowc.m4.
11634         * modules/mbiter: Likewise.
11635         * modules/mbuiter: Likewise.
11636
11637 2005-09-26  Bruno Haible  <bruno@clisp.org>
11638
11639         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
11640         compile mbchar.c if they are not both present.
11641         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
11642         * m4/mbiter.m4 (gl_MBITER): Likewise.
11643         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
11644         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
11645         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
11646
11647 2005-09-25  Jim Meyering  <jim@meyering.net>
11648
11649         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
11650         also uses socklen_t.
11651
11652 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
11653
11654         * lib/utimens.c (ENOSYS): Define if not already defined.
11655         (futimens): Support having a null PATH if the file descriptor
11656         is nonnegative.
11657
11658         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
11659         Remove.
11660         (__attribute): Define to empty unless GCC 3.1 or later.
11661         This works around a core dump on OpenBSD 3.4, which has GCC
11662         2.95.3, which dumps core when given __attribute__(()).  It also
11663         simplifies other tests, since we really don't want to bother with
11664         worrying about which ancient version of GCC supported what.
11665         Original problem reported by Yoann Vandoorselaere, with part of
11666         the fix suggested by Derek Price.
11667
11668 2005-09-24  Jim Meyering  <jim@meyering.net>
11669
11670         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
11671         so we can once again use a positive bitfield width of 1 -- now we
11672         don't have to explain why we were using a bitfield width of 2.
11673
11674 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
11675
11676         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
11677         and similarly for the other external symbols.  Problem reported
11678         by James Gallager.
11679
11680         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
11681         bug reported by Jim Meyering.
11682
11683         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
11684         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
11685         not needed, since socklen is a prerequisite module.
11686
11687 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
11688
11689         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
11690         Problem reported by Eric Blake.
11691         (getaddrinfo): Initialize se so that it's not garbage.
11692         Redo internal storage allocation so that it doesn't make unportable
11693         assumptions about alignment.
11694         Fix a memory leak.
11695
11696         * lib/utimens.c (futimens): Use futimesat if available.
11697         Prefer it to futimes since it doesn't have the futimes bug.
11698
11699         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
11700         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
11701         Instead, declare a function that returns a pointer to an array,
11702         and use verify_type__ to declare the size of the array.
11703         Problem and germ of a solution reported by Bruno Haible.
11704         (verify_type__): Use 2, not 1, for bitfield size, to avoid
11705         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
11706
11707 2005-09-23  Jim Meyering  <jim@meyering.net>
11708
11709         Sync from coreutils.
11710         Correct build failure (socklen_t not defined) on at least
11711         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
11712         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
11713
11714 2005-09-23  Jim Meyering  <jim@meyering.net>
11715
11716         * modules/getaddrinfo (Depends-on): Add socklen.
11717
11718 2005-09-23  Bruno Haible  <bruno@clisp.org>
11719
11720         * tests/test-verify.c: New file.
11721
11722 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11723
11724         Sync from coreutils.
11725
11726         * modules/argmatch (Depends-on): Add verify.
11727         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
11728         unistd-safer.
11729         * modules/save-cwd (Depends-on): Likewise.
11730
11731         * modules/openat (Files): Add lib/openat-die.c.
11732         (Depends-on): Remove error, exitfail.
11733         Add dirname.
11734
11735         * modules/verify: New file.
11736         * MODULES.html.sh (Diagnostics <assert.h>): New section,
11737         with "verify" module.
11738
11739 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11740
11741         Sync from coreutils.
11742
11743         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
11744         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
11745         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
11746         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
11747         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
11748         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
11749         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
11750         Don't bother checking for string.h, stdlib.h, unistd.h.
11751         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
11752         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
11753         module's job.
11754         * m4/jm-macros.m4 (gl_MACROS): Likewise.
11755         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
11756
11757         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
11758         (gl_GETDATE): Use it.
11759
11760         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
11761
11762 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11763
11764         Sync from coreutils.
11765
11766         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
11767         stat-time.h.
11768         * lib/argmatch.h: Include verify.h
11769         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
11770         (ARGMATCH_ASSERT): Remove; unused.
11771         * lib/canonicalize.c: Assume STDC_HEADERS.
11772         * lib/exclude.c: Include "strcase.h".
11773         * lib/regex_internal.h [!defined _LIBC]: Likewise.
11774         * lib/getusershell.c: Include stdio--.h rather than stdio.h
11775         and stdio-safer.h.
11776         (getusershell): Call fopen, not fopen_safer.
11777         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
11778         Do not include unistd-safer.h.
11779         (save_cwd): Don't call fd_safer; no longer needed
11780         now that we include fcntl--.h.
11781
11782         * lib/getdate.y (relative_time): New type.
11783         (RELATIVE_TIME_0): New constant.
11784         (parser_control): Use relative_time instead of doing it ourselves.
11785         (%union): Add new relative_time rel member.
11786         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
11787         Now typeless.
11788         (relunit, relunit_snumber): Now of type rel.
11789         (zone, rel, relunit, get_date): Adjust to above changes.
11790
11791         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
11792         Do not include unistd-safer.h.
11793         (getloadavg): Don't call fd_safer; no longer needed
11794         now that we include fcntl--.h.
11795
11796         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
11797         (make_dir_parents): Treat ENOSYS like EEXIST.
11798
11799         Improve quality of diagnostics on restore_cwd failure.
11800         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
11801         (make_dir_parents): Last arg is now int * (for errno), not bool *.
11802         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
11803         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
11804         each time through the loop.  Do not diagnose restore_cwd failure;
11805         that is the caller's job (and perhaps the caller does not care).
11806
11807         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
11808         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
11809         If the file already exists but is not a directory, don't bother
11810         to try to make its parents.
11811         Close potential file descriptor leak if we can't chdir("/") (!).
11812         Don't always return true if chdir($PWD) fails; return true only
11813         if the requested action was done successfully (except for the
11814         chdir($PWD)).
11815         Don't log final directory unless we actually made it.
11816         Refactor to avoid duplicate code to fix up permissions.
11817         Don't attempt to fix up parent permissions if chdir($PWD) fails.
11818
11819         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
11820         to make it a bit faster and (I hope) clearer.
11821         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
11822         Fix bug in formats like %2N.
11823
11824         * lib/verify.h: New file.
11825
11826 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11827
11828         Sync from coreutils.
11829         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
11830
11831 2005-09-22  Jim Meyering  <jim@meyering.net>
11832
11833         Sync from coreutils.
11834
11835         * m4/lstat.m4 (gl_FUNC_LSTAT):
11836         Use AC_LIBSOURCES to require lstat.c and lstat.h.
11837         Remove obsolete comment.
11838         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
11839         * m4/xstrtod.m4: Likewise.
11840
11841         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
11842
11843 2005-09-22  Jim Meyering  <jim@meyering.net>
11844
11845         Sync from coreutils.
11846
11847         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
11848
11849         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
11850         the .tm_year member, since otherwise gcc-4.0 would now warn about
11851         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
11852
11853         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
11854         order to avoid an unsuppressible warning from gcc on 64-bit systems.
11855
11856         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
11857         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
11858         when run in a time zone for which daylight savings time is in effect
11859         for the starting date.
11860
11861         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
11862         stop us from restricting permissions of just-created absolute-named
11863         directories.
11864         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
11865         to restore initial working directory.
11866         * lib/mkdir-p.c (make_dir_parents): New parameter:
11867         different_working_dir, to tell caller if/when we change the working
11868         directory and are unable to return to the initial one.
11869         * lib/mkdir-p.h (make_dir_parents): Update prototype.
11870         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
11871         `return false'.  This fixes a bug introduced on 2004-07-30.
11872
11873         * lib/openat.c (fdopendir): Be sure to close the supplied
11874         file descriptor before returning.  This makes our replacement
11875         implementation a little closer to Solaris's, where fdopendir
11876         ties the file descriptor to the returned DIR* pointer.
11877         * lib/openat.c (unlinkat): New function.
11878         * lib/openat.h (unlinkat): Add prototype.
11879         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
11880         (openat_restore_fail): Rename from openat_restore_die.
11881         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
11882
11883         Provide an alternative to exiting immediately upon save_cwd or
11884         restore_cwd failure.  Now, an application can arrange e.g.,
11885         to perform a longjump in that case.
11886         * lib/openat.c: Include dirname.h.
11887         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
11888         (rpl_openat, fdopendir, fstatat): Call openat_save_die
11889         and openat_restore_die rather than calling error directly.
11890         Don't include "error.h" or "exitfail.h"; they're no longer needed.
11891
11892         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
11893         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
11894         define.
11895
11896         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
11897         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
11898                             int utc, int nanoseconds);
11899         Background:
11900         date should not have to allocate a megabyte of virtual memory to
11901         handle a format argument like +%1048575T.  When implemented with
11902         strftime, it must allocate such a buffer, use strftime to fill it
11903         in, print it, then free it.
11904         With fprintftime, it simply prints everything and exits.
11905         With no need for memory allocation, that's one fewer way to fail.
11906         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
11907         optional field width, not before, so we accept %9:z, not %:9z.
11908         (my_strftime): Be sure to use L_('x') for literals.
11909
11910         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
11911         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
11912         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
11913         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
11914         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
11915         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
11916         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
11917         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
11918         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
11919         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
11920         * lib/xgethostname.c, lib/xreadlink.c:
11921         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
11922
11923         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
11924         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
11925         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
11926         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
11927         and don't include <sys/file.h>).
11928
11929 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
11930
11931         Sync from coreutils.
11932
11933         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
11934         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
11935         [!LDAV_DONE]: Avoid unused variable warning.
11936
11937 2005-09-21  Bruno Haible  <bruno@clisp.org>
11938
11939         * lib/unicodeio.h (unicode_to_mb): New declaration.
11940
11941 2005-09-20  Derek Price  <derek@ximbiot.com>
11942
11943         * lib/getaddrinfo.c: Don't include <netdb.h> included from
11944         getaddrinfo.h.
11945
11946 2005-09-20  Bruno Haible  <bruno@clisp.org>
11947
11948         * gnulib-tool: Remove trailing slashes from the values specified for
11949         --source-base, --m4-base, --tests-base, --aux-dir.
11950         Suggested by Simon Josefsson <jas@extundo.com>.
11951
11952 2005-09-20  Bruno Haible  <bruno@clisp.org>
11953
11954         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
11955         func_modules_to_filelist, func_import, func_create_testdir): Make all
11956         sorting results locale-independent, so that gnulib-cache.m4 doesn't
11957         change when gnulib-tool is invoked in a different locale.
11958
11959 2005-09-19  Simon Josefsson  <jas@extundo.com>
11960
11961         * m4/socklen.m4: Fix typo.
11962
11963 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11964
11965         Use a consistent style for including <config.h>.
11966         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
11967         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
11968         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
11969         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
11970         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
11971         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
11972         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
11973         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
11974         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
11975         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
11976         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
11977         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
11978         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
11979         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
11980         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
11981         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
11982         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
11983         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
11984         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
11985         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
11986         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
11987         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
11988         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
11989         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
11990         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
11991         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
11992         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
11993         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
11994         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
11995         lib/xstrtoumax.c, lib/yesno.c:
11996         Standardize inclusion of config.h.
11997         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
11998         lib/inttostr.h:  Removed inclusion of config.h from header files.
11999         * lib/inttostr.c:  Adjusted in-tree users.
12000         * lib/timespec.h: Remove superfluous warning to include config.h.
12001         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
12002         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
12003         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
12004         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
12005         config.h with HAVE_CONFIG_H.
12006
12007 2005-09-19  Jim Meyering  <jim@meyering.net>
12008
12009         * modules/pathmax (License): Change to LGPL.
12010
12011 2005-09-19  Derek Price  <derek@ximbiot.com>
12012
12013         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
12014
12015 2005-09-19  Bruno Haible  <bruno@clisp.org>
12016
12017         * gnulib-tool (import): Provide default for --tests-base.
12018
12019 2005-09-19  Bruno Haible  <bruno@clisp.org>
12020
12021         * doc/quote.texi: New file, extracted from gnulib.texi.
12022         * doc/ctime.texi: New file, extracted from gnulib.texi.
12023         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
12024         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
12025         * doc/gnulib.texi: Include them.
12026
12027 2005-09-18  Bruno Haible  <bruno@clisp.org>
12028
12029         Portability fix.
12030         * gnulib-tool (func_readlink): New function.
12031         (func_ln_if_changed): Use it.
12032
12033 2005-09-18  Bruno Haible  <bruno@clisp.org>
12034
12035         * gnulib-tool: Support --with-tests also with --import.
12036         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
12037         (func_import): Use variables $testsbase and $inctests. Emit a
12038         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
12039         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
12040         SUBDIRS += $testsdir.
12041         (func_create_testdir): Update.
12042
12043 2005-09-18  Bruno Haible  <bruno@clisp.org>
12044
12045         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
12046         instead of $dry_run.
12047         (func_cp_if_changed, func_mv_if_changed): Remove functions.
12048         (func_ln_if_changed): Don't handle dry-run here.
12049         (func_import): In dry-run mode, detect more precisely which actions
12050         would be performed, and don't use "...ing" verbs.
12051
12052 2005-09-18  Bruno Haible  <bruno@clisp.org>
12053
12054         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
12055         (func_import): Use join on two temporary files instead of three nested
12056         loops, in order to determine which files are new or old.
12057
12058 2005-09-18  Bruno Haible  <bruno@clisp.org>
12059
12060         * gnulib-tool (func_import): Comment out code that spits out the
12061         new files with --dry-run.
12062
12063 2005-09-18  Bruno Haible  <bruno@clisp.org>
12064
12065         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
12066
12067 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
12068
12069         * lib/stat-time.h: New file.
12070         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
12071         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
12072         in a different way.
12073         (timespec_cmp): New function.
12074         * lib/utimecmp.c: Include stat-time.h.
12075         (SYSCALL_RESOLUTION): Depend on whether various struct stat
12076         members exist, not on the obsolescent ST_MTIM_NSEC.
12077         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
12078
12079 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
12080
12081         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
12082
12083 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
12084
12085         * MODULES.html.sh (File system functions): Add stat-time.
12086         * modules/stat-time: New file.
12087         * modules/timespec (Files): Remove m4/st_mtim.m4; this
12088         is now done in a different way, by the stat-time module.
12089         * modules/utimecmp (Depends-on): Add stat-time.
12090
12091 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
12092
12093         * m4/st_mtim.m4: Remove.  Superseded by...
12094         * m4/stat-time.m4: New file.
12095         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
12096         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
12097
12098 2005-09-15  Derek Price  <derek@ximbiot.com>
12099
12100         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
12101
12102 2005-09-15  Derek Price  <derek@ximbiot.com>
12103
12104         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
12105         * lib/regex_internal.c: Ditto, using this...
12106         (__GNUC_PREREQ): ...new macro.
12107         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
12108         using...
12109         (__GNUC_PREREQ): ...this new macro.
12110
12111         * lib/strstr.h: Include string.h. Define strstr as a macro here.
12112
12113 2005-09-15  Derek Price  <derek@ximbiot.com>
12114             Paul Eggert  <eggert@cs.ucla.edu>
12115
12116         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
12117         changes, consolidating in...
12118         * lib/regex_internal.h: ...this file.
12119
12120 2005-09-13  Jim Meyering  <jim@meyering.net>
12121
12122         * lib/canon-host.c: Filter through gnu indent and reword comments
12123         slightly.
12124         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
12125
12126 2005-09-13  Derek Price  <derek@ximbiot.com>
12127
12128         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
12129         failure.
12130         Reported by Jim Meyering  <jim@meyering.net>.
12131
12132 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
12133
12134         * lib/base64.c: Typo.
12135         (base64_encode): Put b64str in initialized data section.
12136
12137 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
12138
12139         Merge glibc and coreutils changes into gnulib, plus a few
12140         extra fixes.
12141         * lib/md5.c: Use #error rather than a string.
12142         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
12143         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
12144         (__attribute__): Define to empty for non recent-GCC.
12145         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
12146         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
12147         Renamed from their non-__ counterparts, with new macros replacing
12148         them if not _LIBC.  Add __THROW attribute.
12149         (rol): Remove.
12150         (struct md5_ctx): Align buffer if using GCC.
12151         * lib/sha1.h (struct sha1_ctx): Likewise.
12152         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
12153         The old name was backwards.
12154         (NOTSWAP): Remove; not used.
12155         (rol): New macro, moved here from md5.h.
12156         (sha1_process_block): Remove a FIXME that doesn't make sense.
12157
12158 2005-09-12  Derek Price  <derek@ximbiot.com>
12159
12160         Return usable errors from canon-host.
12161         * lib/canon-host.h: New file.
12162         * lib/canon-host.c (canon_host): Wrap...
12163         (canon_host_r): ...this new function, which now relies exclusively on
12164         getaddrinfo.
12165         (ch_strerror): New function.
12166         (last_cherror): New global.
12167         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
12168         interface.
12169         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
12170         void *.
12171         (freeaddrinfo): Free ai->ai_canonname when set.
12172
12173 2005-09-12  Derek Price  <derek@ximbiot.com>
12174
12175         Make canon-host require getaddrinfo.
12176         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
12177         AC_LIBSOURCE canon-host.h.  Call...
12178         (gl_PREREQ_CANON_HOST): ...this new function, which requires
12179         gl_GETADDRINFO.
12180         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
12181
12182 2005-09-12  Derek Price  <derek@ximbiot.com>
12183
12184         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
12185         LGPL.
12186         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
12187
12188 2005-09-12  Derek Price  <derek@ximbiot.com>
12189
12190         * lib/gai_strerror.c: Include config.h when available.  Include
12191         getaddrinfo.h before other headers to test interface.
12192         Reported by Larry Jones <lawrence.jones@ugs.com>.
12193
12194 2005-09-12  Derek Price  <derek@ximbiot.com>
12195             Paul Eggert  <eggert@cs.ucla.edu>
12196
12197         * modules/glob (Files): Add glob-libc.h.
12198
12199 2005-09-12  Derek Price  <derek@ximbiot.com>
12200             Paul Eggert  <eggert@cs.ucla.edu>
12201
12202         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
12203         glob_.h, glob-libc.h.
12204         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
12205
12206 2005-09-12  Derek Price  <derek@ximbiot.com>
12207             Paul Eggert  <eggert@cs.ucla.edu>
12208
12209         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
12210         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
12211         protecting things that should be done only in gnulib contexts.
12212         * lib/glob_.h: New file, containing only the glob things needed for
12213         gnulib.
12214         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
12215         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
12216         (glob, globfree, glob_pattern_p): Now defined simply in terms of
12217         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
12218         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
12219         and to respect the namespace rules better.
12220
12221 2005-09-08  Simon Josefsson  <jas@extundo.com>
12222
12223         * modules/socklen: New file.
12224
12225 2005-09-08  Simon Josefsson  <jas@extundo.com>
12226
12227         * m4/socklen.m4: New file.
12228
12229 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12230
12231         * modules/utimens (Files): Add m4/utimbuf.m4, since
12232         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
12233         Reported by Sergey Poznyakoff.
12234
12235 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12236
12237         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
12238         definitions, since that's the preferred style in glibc.
12239         Fix a minor spacing issue, and update copyright notice to match
12240         glibc's.
12241
12242 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12243
12244         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
12245
12246 2005-09-06  Simon Josefsson  <jas@extundo.com>
12247
12248         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
12249         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
12250
12251 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
12252
12253         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
12254         warning.
12255
12256 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
12257
12258         * config/srclist.txt: Add glibc bug 1302.
12259
12260 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
12261
12262         Change bitset word type from unsigned int to unsigned long int,
12263         as this has better performance on typical 64-bit hosts.
12264         Port bitset code to hosts with unusual word sizes.
12265         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
12266         (build_collating_symbol):
12267         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
12268         argument is a bitset.  This is merely a style issue, but it makes
12269         it clearer that an entire array is expected.
12270         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
12271         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
12272         Port to the case where bitset_word is not the same as unsigned int.
12273         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
12274         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
12275         Likewise.
12276         * lib/regexec.c (check_dst_limits_calc_pos_1,
12277         check_subexp_matching_top):
12278         (build_trtable, group_nodes_into_DFAstates):
12279         Likewise.
12280         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
12281         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
12282         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
12283         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
12284         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
12285         * lib/regcomp.c (optimize_subexps, lower_subexp):
12286         Work even if bitset_word has holes in its bitwise representation.
12287         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
12288         * lib/regexec.c (check_dst_limits_calc_pos_1,
12289         check_subexp_matching_top):
12290         Likewise.
12291         * lib/regex_internal.c (re_string_reconstruct):
12292         Don't assume UCHAR_MAX == 255.
12293         * lib/regex_internal.h (bitset_set_all): Likewise.
12294         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
12295         All uses changed.
12296         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
12297         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
12298         All uses changed.
12299         (BITSET_WORD_MAX): New macro.
12300         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
12301         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
12302         (bitset_empty, bitset_copy):
12303         Prefer sizeof (bitset) to multiplying it out ourselves.
12304         (bitset_not_merge): Remove; unused.
12305         (bitset_contain): Return bool, not unsigned int with one bit on.
12306         All callers changed.
12307         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
12308         alignment than re_node_set; do this by defining a new internal
12309         type struct dests_alloc and using it to allocate memory.
12310
12311 2005-09-05  Bruno Haible  <bruno@clisp.org>
12312
12313         * gnulib-tool (func_import): Fix comparison in handling of symbolic
12314         links.
12315
12316 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
12317
12318         * modules/size_max (Makefile.am): Add size_max.h
12319
12320 2005-09-04  Derek Price  <derek@ximbiot.com>
12321
12322         * gnulib-tool (func_import): Fix reversed $symbolic logic.
12323
12324 2005-09-03  Simon Josefsson  <jas@extundo.com>
12325
12326         * gnulib-tool: Fix typo.
12327
12328 2005-09-03  Simon Josefsson  <jas@extundo.com>
12329
12330         * config/srclist.txt: Add glibc bug 1293.
12331
12332 2005-09-03  Derek Price  <derek@ximbiot.com>
12333
12334         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
12335         From Larry Jones <lawrence.jones@ugs.com>.
12336
12337 2005-09-02  Simon Josefsson  <jas@extundo.com>
12338
12339         * modules/socklen: New file.
12340
12341 2005-09-02  Simon Josefsson  <jas@extundo.com>
12342
12343         * modules/havelib: New module.
12344
12345         * modules/gettext, modules/iconv, modules/lock, modules/readline:
12346         Use havelib.
12347
12348 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
12349
12350         Check for arithmetic overflow when calculating sizes, to prevent
12351         some buffer-overflow issues.  These patches are conservative, in the
12352         sense that when I couldn't determine whether an overflow was possible,
12353         I inserted a run-time check.
12354         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
12355         macros.
12356         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
12357         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
12358         (re_xnrealloc, re_x2nrealloc): New inline functions.
12359         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
12360         parse_bracket_exp):
12361         (build_equiv_class, build_charclass): Check for arithmetic overflow
12362         in size expression calculations.
12363         * lib/regex_internal.c (re_string_realloc_buffers):
12364         (build_wcs_upper_buffer, re_node_set_add_intersect):
12365         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
12366         (re_dfa_add_node, register_state): Likewise.
12367         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
12368         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
12369         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
12370         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
12371
12372 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
12373
12374         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
12375         m4/ulonglong.m4.  Problem reported by Martin Lambers.
12376
12377 2005-09-02  Bruno Haible  <bruno@clisp.org>
12378
12379         Support for lib vs. lib64 distinction on biarch platforms.
12380         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
12381         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
12382         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
12383
12384 2005-09-02  Bruno Haible  <bruno@clisp.org>
12385
12386         * gnulib-tool (import): In the other first-use case, provide defaults
12387         as well.
12388
12389 2005-09-02  Bruno Haible  <bruno@clisp.org>
12390
12391         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
12392         patches not yet found in the latest gettext release.
12393
12394 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
12395
12396         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
12397         to avoid a collision with bits/local_lim.h in glibc.
12398         All uses changed.  Problem reported by Dmitry V. Levin in
12399         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
12400
12401         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
12402         bugs in int versus size_t comparisons.
12403         (re_string_context_at): Fix bug where the code assumed that
12404         Idx is signed.
12405
12406         Use bool where appropriate.
12407         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
12408         All callers changed.
12409         (calc_eclosure_iter): Likewise, for ROOT arg.
12410         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
12411         (build_charclass_op): Likewise, for NON_MATCH arg.
12412         * lib/regex_internal.c (re_string_allocate, re_string_construct):
12413         (re_string_construct_common): Likewise, for ICASE arg.
12414         * lib/regexec.c (re_search_2_stub, re_search_stub):
12415         Likewise, for RET_LEN arg.
12416         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
12417         (set_regs): Likewise, for FL_BACKTRACK arg.
12418         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
12419         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
12420         (calc_eclosure_iter, parse_bracket_exp):
12421         Use bool for internal variables that are booleans.
12422         * lib/regexec.c (re_search_internal, check_matching,
12423         proceed_next_node):
12424         (set_regs, build_sifted_states, sift_states_bkref):
12425         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
12426         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
12427         (find_collation_sequence_value):
12428         Likewise.
12429         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
12430         (re_node_set_compare):
12431         Return bool, not int. All callers changed.
12432         * lib/regexec.c (check_halt_node_context, check_dst_limits):
12433         (build_trtable, check_node_accept): Likewise.
12434         * lib/regex_internal.h: Include stdbool.h.
12435
12436         Fix bugs uncovered when converting to bool.
12437         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
12438         failure instead of charging ahead blindly.
12439         * lib/regex_internal.c (register_state): Likewise.
12440         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
12441         for freeing internal storage.
12442         (group_nodes_into_DFA_states): Use unsigned int, not int, for
12443         bitset pieces used as boolean, to avoid undefined behavior
12444         on hosts that do int overflow checking.
12445
12446 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
12447
12448         * config/srclist.txt: Add glibc bugs 1285-1287.
12449
12450 2005-09-01  Jim Meyering  <jim@meyering.net>
12451
12452         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
12453         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
12454         Require gl_STAT_MACROS, too.
12455
12456 2005-09-01  Bruno Haible  <bruno@clisp.org>
12457
12458         * gnulib-tool (import): In the first-use case, provide defaults.
12459
12460 2005-09-01  Bruno Haible  <bruno@clisp.org>
12461
12462         * gnulib-tool (func_import): Remove the .tmp files.
12463
12464 2005-09-01  Bruno Haible  <bruno@clisp.org>
12465
12466         * gnulib-tool (func_import): Fix handling of symbolic links.
12467
12468 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12469
12470         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
12471         old glibc regex code mishandles strings longer than 2**31 bytes.
12472         This patch fixes this when the regex code is used in gnulib
12473         (i.e., outside glibc).
12474
12475         This patch should not affect the use of the regex code inside
12476         glibc.  No doubt this problem also needs to be handled for glibc
12477         as well, but the result will be an incompatible change to the
12478         glibc ABI, and the old ABI will have to be supported too.  That
12479         can be the the subject for another patch.
12480
12481         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
12482         governing whether the rest of this patch is active.  By default,
12483         the macro is disabled and the patch has no effect.
12484         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
12485         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
12486         (struct re_pattern_buffer, re_search, re_search_2, re_match):
12487         (re_match_2, re_set_registers): Use the new types.
12488         * lib/regex_internal.h (Idx, re_hashval_t): New types.
12489         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
12490         New macros.
12491         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
12492         (re_string_context_at, bin_tree_t, re_dfastate_t):
12493         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
12494         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
12495         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
12496         (re_string_char_size_at, re_string_wchar_at):
12497         (re_string_elem_size_at):
12498         Use the new types and macros to port to 64-bit hosts.
12499         Use unsigned types for internal values, so that the code
12500         mostly works even for arrays larger than SSIZE_MAX.
12501         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
12502         (search_duplicated_node, calc_eclosure_iter, fetch_number):
12503         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
12504         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
12505         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
12506         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
12507         (calc_inveclosure, parse_dup_op, build_range_exp):
12508         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
12509         (fetch_number, create_token_tree, mark_opt_subexp):
12510         Likewise.
12511         * lib/regex_internal.c (re_string_construct_common,
12512         create_ci_newstate):
12513         (create_cd_newstate, re_string_allocate, re_string_construct):
12514         (re_string_realloc_buffers, build_wcs_upper_buffer):
12515         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
12516         (re_string_reconstruct, re_string_peek_byte_case):
12517         (re_string_fetch_byte_case, re_string_context_at):
12518         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
12519         (re_node_set_init_copy, re_node_set_add_intersect):
12520         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
12521         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
12522         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
12523         (re_acquire_state, re_acquire_state_context, register_state):
12524         Likewise.
12525         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
12526         search_cur_bkref_entry):
12527         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
12528         (re_search_internal, re_search_2_stub, re_search_stub)
12529         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
12530         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
12531         (update_cur_sifted_state, check_dst_limits):
12532         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
12533         (check_subexp_limits, sift_states_bkref, merge_state_array):
12534         (check_subexp_matching_top, get_subexp, get_subexp_sub):
12535         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
12536         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
12537         (expand_bkref_cache, check_node_accept_bytes):
12538         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
12539         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
12540         (acquire_init_state_context, check_halt_node_context):
12541         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
12542         (sift_states_backward, clean_state_log_if_needed):
12543         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
12544         (find_recover_state, transit_state_sb, transit_state_mb):
12545         (transit_state_bkref, build_trtable, match_ctx_clean):
12546         Likewise.
12547         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
12548         to work around an assumption that REG_MISSING is negative.
12549
12550         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
12551         (seek_collating_symbol_entry) [defined _LIBC]:
12552         (lookup_collation_sequence_value) [defined _LIBC]:
12553         (build_range_exp, build_collating_symbol) [defined _LIBC]:
12554         Use prototypes rather than old-style function definitions.
12555         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
12556         (transit_state_sb) [0]:
12557         (find_collation_sequence_value) [defined _LIBC]: Likewise.
12558
12559         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
12560         rm_eo.
12561
12562         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
12563         (optimize_subexps, lower_subexp):
12564         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
12565         since the signed shift might overflow.  Use 1u<<31 instead.
12566         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
12567         Likewise.
12568         * lib/regexec.c (check_dst_limits_calc_pos_1,
12569         check_subexp_matching_top): Likewise.
12570
12571         * lib/regcomp.c (optimize_subexps, lower_subexp):
12572         Use CHAR_BIT rather than 8, for clarity.
12573         * lib/regexec.c (check_dst_limits_calc_pos_1):
12574         (check_subexp_matching_top): Likewise.
12575         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
12576         have to worry about portability issues when shifting it left.
12577         Remove no-longer-needed test for table_size > 0.
12578         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
12579         in a word, as the resulting behavior is undefined.
12580         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
12581         in one case, a <= should have been an <, and in another case the
12582         whole test was missing.
12583         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
12584         the standard name CHAR_BIT.
12585         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
12586         this is not true on one's complement and signed-magnitude hosts.
12587
12588         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
12589         next_last_offset.
12590         (struct re_dfa_t): Remove unused member states_alloc.
12591         * lib/regcomp.c (init_dfa): Don't initialize unused members.
12592
12593 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12594
12595         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
12596         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
12597         and large-file glibc and in 32-bit large-file Solaris.
12598
12599 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12600
12601         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
12602         lengths fit in regoff_t; this isn't true if regoff_t is the same
12603         width as size_t.
12604         * lib/regex.c (re_search_internal): 5th arg is LAST_START
12605         (= START + RANGE) instead of RANGE.  This avoids overflow
12606         problems when regoff_t is the same width as size_t.
12607         All callers changed.
12608         (re_search_2_stub): Check for overflow when adding the
12609         sizes of the two strings.
12610         (re_search_stub): Check for overflow when adding START
12611         to RANGE; if it occurs, substitute the extreme value.
12612
12613 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12614
12615         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
12616
12617 2005-08-31  Jim Meyering  <jim@meyering.net>
12618
12619         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
12620         a pointer-to-const.
12621         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
12622         (register_state): Likewise.
12623         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
12624         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
12625         (group_nodes_into_DFAstates): Likewise.
12626
12627 2005-08-31  Jim Meyering  <jim@meyering.net>
12628
12629         * check-module: Add a FIXME comment.
12630
12631 2005-08-31  Eric Blake  <ebb9@byu.net>
12632
12633         * modules/unistd-safer (Files): Add unistd--.h.
12634         * modules/stdio-safer (Files): Add stdio--.h.
12635
12636 2005-08-31  Derek Price  <derek@ximbiot.com>
12637
12638         * lib/getdelim.c (getdelim): Return EOF on EOF.
12639         Reported by Larry Jones <lawrence.jones@ugs.com>.
12640
12641 2005-08-31  Bruno Haible  <bruno@clisp.org>
12642
12643         Avoid unnecessary diffs in the generated lib/Makefile.am.
12644         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
12645         the generated files.
12646         (func_import): Don't set cmd.
12647
12648 2005-08-31  Bruno Haible  <bruno@clisp.org>
12649
12650         * lib/strstr.c: Include <stddef.h>, for NULL.
12651         * lib/strcasestr.c: Likewise.
12652         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
12653
12654 2005-08-31  Bruno Haible  <bruno@clisp.org>
12655
12656         * gnulib-tool: New option --macro-prefix.
12657         (func_import): Use macro_prefix.
12658         (import): Handle option --macro-prefix.
12659
12660 2005-08-31  Bruno Haible  <bruno@clisp.org>
12661
12662         * gnulib-tool (import): Rename most ac_* variables to cached_*.
12663         Also use new variables cached_lgpl, cached_libtool.
12664
12665 2005-08-31  Bruno Haible  <bruno@clisp.org>
12666
12667         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
12668         always instantiating them.
12669
12670 2005-08-31  Bruno Haible  <bruno@clisp.org>
12671
12672         * gnulib-tool (func_import): Read the previous cached settings
12673         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
12674         earlier added by gnulib but are now dropped. Warn when a gnulib file
12675         overwrites a non-gnulib file.
12676
12677 2005-08-31  Bruno Haible  <bruno@clisp.org>
12678
12679         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
12680         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
12681         projects that don't keep autogenerated files in CVS. Put into
12682         actioncmd only the specified modules, not the transitive closure.
12683
12684 2005-08-31  Bruno Haible  <bruno@clisp.org>
12685
12686         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
12687         Create directories that shall be filled.
12688         (import): Don't look for gl_* macros in configure.ac. Recurse across
12689         all directories containing a gnulib-cache.m4 files, if meaningful.
12690
12691 2005-08-31  Bruno Haible  <bruno@clisp.org>
12692
12693         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
12694         (import): Set seen_libtool when we see gl_LIBTOOL.
12695
12696 2005-08-31  Bruno Haible  <bruno@clisp.org>
12697
12698         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
12699         declaration macro definitions from generated gnulib.m4.
12700
12701 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
12702
12703         * lib/iconvme.h: Add prototype for iconv_alloc.
12704
12705 2005-08-29  Simon Josefsson  <jas@extundo.com>
12706
12707         * lib/iconvme.c: Fix errno.
12708
12709 2005-08-29  Bruno Haible  <bruno@clisp.org>
12710
12711         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
12712         that it works when the directory contains spaces.
12713
12714 2005-08-29  Bruno Haible  <bruno@clisp.org>
12715
12716         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
12717
12718 2005-08-29  Bruno Haible  <bruno@clisp.org>
12719
12720         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
12721         Emit more advice.
12722
12723 2005-08-29  Bruno Haible  <bruno@clisp.org>
12724         and Stepan Kasal  <kasal@ucw.cz>
12725
12726         * check-module: If more parameters are given, check each of them
12727         separately; add more exceptions, as noted by Jim Meyering.
12728         (check_module): New procedure.
12729         (%exempt_header): Now contains all exceptions.
12730
12731 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
12732
12733         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
12734
12735 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
12736
12737         * lib/iconvme.c: Split iconv_string into iconv_alloc.
12738
12739 2005-08-28  Bruno Haible  <bruno@clisp.org>
12740
12741         * m4/gnulib-tool.m4: New file.
12742
12743 2005-08-27  Jim Meyering  <jim@meyering.net>
12744
12745         * modules/unistd-safer (Files): Add pipe-safer.c.
12746         * modules/fcntl-safer (Files): Add creat-safer.c.
12747
12748 2005-08-27  Jim Meyering  <jim@meyering.net>
12749
12750         * m4/stdlib-safer.m4: New file.  From coreutils.
12751         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
12752         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
12753         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
12754         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
12755         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
12756
12757 2005-08-27  Jim Meyering  <jim@meyering.net>
12758
12759         * lib/fopen-safer.c: Merge minor changes from coreutils.
12760         * lib/dup-safer.c: Likewise.
12761         * lib/fd-safer.c: Likewise.
12762
12763         Merge from coreutils.
12764         * lib/stdio--.h: New file.
12765         * lib/stdlib--.h: New file.
12766         * lib/mkstemp-safer.c: New file.
12767
12768         GNU tar needs these.
12769         * lib/pipe-safer.c: New file.
12770         * lib/creat-safer.c: New file.
12771         * lib/fcntl--.h (creat): Define to creat_safer.
12772         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
12773         * lib/unistd--.h (pipe): Define to pipe_safer.
12774         * lib/unistd-safer.h: Declare pipe_safer.
12775
12776 2005-08-26  Simon Josefsson  <jas@extundo.com>
12777
12778         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
12779         Haible <bruno@clisp.org>.
12780
12781 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
12782
12783         * lib/regex_internal.h: Remove all references to
12784         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
12785         or better.
12786         (bitset_not, bitset_merge, bitset_not_merge):
12787         (bitset_mask, re_string_allocate, re_string_construct):
12788         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
12789         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
12790         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
12791         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
12792         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
12793         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
12794         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
12795         (re_acquire_state_context):
12796         Remove unnecessary forward decls.
12797         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
12798         Put __attribute at function definition,
12799         now that the function decl has been removed.
12800         * lib/regex_internal.c (re_string_peek_byte_case):
12801         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
12802         Likewise.
12803
12804 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
12805
12806         * m4/regex.m4: Add AC_PREREQ(2.50).
12807         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
12808
12809 2005-08-25  Simon Josefsson  <jas@extundo.com>
12810
12811         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
12812         __fsetlocking.
12813
12814 2005-08-25  Simon Josefsson  <jas@extundo.com>
12815
12816         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
12817         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
12818         GLIBC specific code.
12819
12820 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12821
12822         Make regex safe for g++.  This fixes one real bug (an "err"
12823         that should have been "*err").  g++ problem reported by
12824         Sam Steingold.
12825         * lib/regex_internal.h (re_calloc): New macro, consistent with
12826         re_malloc etc.  All callers of calloc changed to use re_calloc.
12827         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
12828         not int.  All callers changed.
12829         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
12830         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
12831         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
12832         (find_recover_state): Change "err" to "*err"; this fixes what
12833         appears to be a real bug.
12834         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
12835         versus int.
12836
12837 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12838
12839         * modules/regex (Depends-on): Add malloc, since the code
12840         assumes that !malloc(0) means failure.
12841
12842 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12843
12844         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
12845
12846         alloca modernization/simplification for regex.
12847         * lib/regex.c: Remove portability cruft for alloca.  This no longer
12848         needs to be at the start of the file, and can be moved into
12849         regex_internal.h and simplified.
12850         * lib/regex_internal.h: Include <alloca.h>.
12851         (__libc_use_alloca) [!defined _LIBC]: New macro.
12852         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
12853         now works outside glibc.
12854
12855 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12856
12857         * config/srclist.txt: Add glibc bugs 1241, 1245.
12858
12859 2005-08-25  Jim Meyering  <jim@meyering.net>
12860
12861         * lib/open-safer.c: Include <config.h>.
12862         Otherwise, we'd lose LARGEFILE support in any file using
12863         e.g. "fcntl--.h"
12864
12865 2005-08-25  Bruno Haible  <bruno@clisp.org>
12866
12867         * m4/minmax.m4: Require autoconf 2.52.
12868         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
12869         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
12870         alternatives of translit over the alphabet.
12871         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
12872
12873 2005-08-24  Simon Josefsson  <jas@extundo.com>
12874
12875         * tests/test-getpass.c: New file.
12876
12877 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12878
12879         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
12880         for GNU regex features.
12881
12882 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12883
12884         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
12885         * lib/regex.h (regerror): Likewise.
12886
12887         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
12888         requires this.  (The code never needed it.)
12889
12890         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
12891         All uses of recently-renamed identifiers changed to use the new,
12892         POSIX-compliant names.  The code will build and run just fine
12893         without these changes, but it's better to eat our own dog food
12894         and use the standard-conforming names.
12895
12896         * lib/regex.h: Fix a multitude of POSIX name space violations.
12897         These changes have an effect only for programs that define
12898         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
12899         do not change anything for programs compiled in the normal way.
12900         Also, there is no effect on the ABI.
12901
12902         (_REGEX_SOURCE): New macro.
12903         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
12904         defined and _GNU_SOURCE is not; this fixes a name space violation.
12905
12906         Rename the following macros to obey POSIX requirements.
12907         The old names are still visible as macros if _REGEX_SOURCE is defined.
12908         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
12909         RE_BACKSLASH_ESCAPE_IN_LISTS.
12910         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
12911         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
12912         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
12913         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
12914         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
12915         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
12916         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
12917         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
12918         (REG_INTERVALS): renamed from RE_INTERVALS.
12919         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
12920         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
12921         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
12922         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
12923         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
12924         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
12925         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
12926         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
12927         RE_UNMATCHED_RIGHT_PAREN_ORD.
12928         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
12929         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
12930         (REG_DEBUG): renamed from RE_DEBUG.
12931         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
12932         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
12933         unusual, since we can't clash with the POSIX REG_ICASE.
12934         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
12935         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
12936         (REG_NO_SUB): renamed from RE_NO_SUB.
12937         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
12938         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
12939         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
12940         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
12941         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
12942         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
12943         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
12944         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
12945         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
12946         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
12947         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
12948         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
12949         RE_SYNTAX_POSIX_MINIMAL_BASIC.
12950         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
12951         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
12952         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
12953         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
12954         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
12955         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
12956         (REG_FIXED): Renamed from REGS_FIXED.
12957         (REG_NREGS): Renamed from RE_NREGS.
12958
12959         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
12960         of other REG_* macros, since POSIX says the user is allowed to
12961         #undef these macros selectively.
12962
12963         (reg_errcode_t): Update comment stating what other tables need
12964         to be consistent.
12965
12966         Rename the following enum values to obey POSIX requirements.
12967         The old names are still visible as macros.
12968         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
12969         is not defined, since GNU is supposed to be a superset of POSIX as
12970         much as possible, and since we want reg_errcode_t to be a signed
12971         type for implementation consistency.
12972         (_REG_NOERROR): Renamed from REG_NOERROR.
12973         (_REG_NOMATCH): Renamed from REG_NOMATCH.
12974         (_REG_BADPAT): Renamed from REG_BADPAT.
12975         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
12976         (_REG_ECTYPE): Renamed from REG_ECTYPE.
12977         (_REG_EESCAPE): Renamed from REG_EESCAPE.
12978         (_REG_ESUBREG): Renamed from REG_ESUBREG.
12979         (_REG_EBRACK): Renamed from REG_EBRACK.
12980         (_REG_EPAREN): Renamed from REG_EPAREN.
12981         (_REG_EBRACE): Renamed from REG_EBRACE.
12982         (_REG_BADBR): Renamed from REG_BADBR.
12983         (_REG_ERANGE): Renamed from REG_ERANGE.
12984         (_REG_ESPACE): Renamed from REG_ESPACE.
12985         (_REG_BADRPT): Renamed from REG_BADRPT.
12986         (_REG_EEND): Renamed from REG_EEND.
12987         (_REG_ESIZE): Renamed from REG_ESIZE.
12988         (_REG_ERPAREN): Renamed from REG_ERPAREN.
12989         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
12990         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
12991         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
12992         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
12993
12994         (_REG_RE_NAME, _REG_RM_NAME): New macros.
12995         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
12996         changed.  But support the old name if the new one is not defined
12997         and if _REGEX_SOURCE.
12998
12999         Change the following member names in struct re_pattern_buffer.
13000         The old names are still supported if !_REGEX_SOURCE.
13001         The new names are always supported, regardless of _REGEX_SOURCE.
13002         (re_buffer): Renamed from buffer.
13003         (re_allocated): Renamed from allocated.
13004         (re_used): Renamed from used.
13005         (re_syntax): Renamed from syntax.
13006         (re_fastmap): Renamed from fastmap.
13007         (re_translate): Renamed from translate.
13008         (re_can_be_null): Renamed from can_be_null.
13009         (re_regs_allocated): Renamed from regs_allocated.
13010         (re_fastmap_accurate): Renamed from fastmap_accurate.
13011         (re_no_sub): Renamed from no_sub.
13012         (re_not_bol): Renamed from not_bol.
13013         (re_not_eol): Renamed from not_eol.
13014         (re_newline_anchor): Renamed from newline_anchor.
13015
13016         Change the following member names in struct re_registers.
13017         The old names are still supported if !_REGEX_SOURCE.
13018         The new names are always supported, regardless of _REGEX_SOURCE.
13019         (rm_num_regs): Renamed from num_regs.
13020         (rm_start): Renamed from start.
13021         (rm_end): Renamed from end.
13022
13023         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
13024         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
13025         Prepend __ to parameter names.
13026
13027         Undo yesterday's changes.
13028
13029 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
13030
13031         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
13032         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
13033         lib/regex.c.
13034
13035 2005-08-24  Jim Meyering  <jim@meyering.net>
13036
13037         Sync from coreutils.
13038         * m4/fcntl-safer.m4: New file.
13039
13040         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
13041         and object files for this module.
13042
13043 2005-08-24  Jim Meyering  <jim@meyering.net>
13044
13045         Sync from coreutils.
13046         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
13047
13048 2005-08-24  Jim Meyering  <jim@meyering.net>
13049
13050         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
13051         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
13052
13053 2005-08-24  Jim Meyering  <jim@meyering.net>
13054
13055         * modules/fcntl-safer: New module.
13056         * modules/fts (Depends-on): Add fcntl-safer.
13057         * MODULES.html.sh (File descriptor based Input/Output):
13058         Add fcntl-safer.
13059
13060 2005-08-24  Bruno Haible  <bruno@clisp.org>
13061
13062         Support for unit test modules.
13063         * modules/README: Mention tests modules.
13064         * modules/TEMPLATE-TESTS: New file.
13065         * gnulib-tool: New options --extract-tests-module, --with-tests and
13066         --tests-base (unused for the moment).
13067         (testsbase, inctests): New variables.
13068         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
13069         (func_verify_module): Exclude TEMPLATE-TESTS.
13070         (func_verify_nontests_module, func_verify_tests_module): New functions.
13071         (func_get_dependencies): Add implicit dependency for tests modules.
13072         (func_get_tests_module): New function.
13073         (func_modules_transitive_closure): When --with-tests was specified,
13074         include the unit tests as well, unless explicitly avoided.
13075         (func_emit_lib_Makefile_am): Ignore the tests modules here.
13076         (func_emit_tests_Makefile_am): New function.
13077         (func_create_testdir): When --with-tests was specified, emit a
13078         tests/ directory.
13079         * MODULES.html.sh (Future developments): Update.
13080
13081 2005-08-24  Bruno Haible  <bruno@clisp.org>
13082
13083         * modules/tls-tests: New file.
13084         * tests/test-tls.c: New file, from GNU gettext.
13085
13086 2005-08-24  Bruno Haible  <bruno@clisp.org>
13087
13088         * modules/lock-tests: New file.
13089         * tests/test-lock.c: New file, from GNU gettext.
13090
13091 2005-08-24  Bruno Haible  <bruno@clisp.org>
13092
13093         * lib/lock.h: Add multiple inclusion guard.
13094         * lib/tls.h: Add multiple inclusion guard.
13095
13096 2005-08-24  Bruno Haible  <bruno@clisp.org>
13097
13098         * gnulib-tool: Add support for the --aux-dir option to
13099         --create-testdir, --create-megatestdir, --test, --megatest.
13100         (func_create_testdir, func_create_megatestdir): Optionally emit a
13101         AC_CONFIG_AUX_DIR directive.
13102         (create-testdir, create-megatestdir, test, megatest): Provide a
13103         default value for $auxdir.
13104
13105 2005-08-24  Bruno Haible  <bruno@clisp.org>
13106
13107         * gnulib-tool (import): Use compound statement instead of subshell
13108         where possible.
13109
13110 2005-08-24  Bruno Haible  <bruno@clisp.org>
13111
13112         * gnulib-tool (import): Change --aux-dir default to "build-aux".
13113
13114 2005-08-24  Bruno Haible  <bruno@clisp.org>
13115
13116         * gnulib-tool (func_version): Update.
13117
13118 2005-08-24  Bruno Haible  <bruno@clisp.org>
13119
13120         * gnulib-tool (func_import, func_create_testdir,
13121         func_create_megatestdir): Quote all autoconf macro arguments.
13122
13123 2005-08-24  Bruno Haible  <bruno@clisp.org>
13124
13125         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
13126         option --force, because --force causes the aclocal.m4 of each
13127         subdirectory to be newer than the corresponding config.h.in.
13128
13129 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
13130
13131         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
13132         All contents moved to gl_REGEX.
13133         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
13134         assume that it does.
13135
13136 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
13137
13138         * lib/regex.h (REG_NOSYS)
13139         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
13140         Define, since POSIX requires it as of 2001.
13141         (_REG_ENOSYS)
13142         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
13143         New private symbol, used to keep the enum signed in all cases.
13144         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
13145         Youngman in
13146         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
13147
13148         * lib/regex_internal.c (re_string_skip_chars, register_state):
13149         (calc_state_hash):
13150         Remove forward decls; no longer needed now that we use prototypes.
13151         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
13152         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
13153         (clean_state_log_if_needed): Likewise.
13154
13155 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
13156
13157         * config/srclist.txt: Add glibc bugs 1231-1233.
13158
13159 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13160
13161         Fix problems reported by Sam Steingold in
13162         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
13163         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
13164         assumed that reg_errcode_t is a signed type, which is not
13165         necessarily true if _XOPEN_SOURCE is not defined.
13166         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
13167         since some compilers warn about it otherwise.
13168
13169 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13170
13171         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
13172         (init_word_char, create_initial_state, duplicate_node_closure):
13173         (fetch_token, peek_token_bracket, build_range_exp):
13174         (build_collating_symbol): Remove forward decls; no longer needed
13175         now that we use prototypes.
13176
13177         * lib/regcomp.c:
13178         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
13179         (re_compile_fastmap_iter, regcomp, regerror, regfree):
13180         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
13181         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
13182         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
13183         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
13184         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
13185         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
13186         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
13187         (build_range_exp, build_collating_symbol, parse_bracket_exp):
13188         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
13189         (build_charclass, build_charclass_op, fetch_number, create_tree):
13190         (create_token_tree, mark_opt_subexp, duplicate_tree):
13191         Use prototypes rather than old-style definitions.
13192
13193         * lib/regex_internal.c:
13194         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
13195         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
13196         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
13197         (re_string_reconstruct, re_string_peek_byte_case):
13198         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
13199         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
13200         (re_node_set_init_copy, re_node_set_add_intersect):
13201         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
13202         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
13203         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
13204         (re_acquire_state, re_acquire_state_context, register_state):
13205         (create_ci_newstate, create_cd_newstate, free_state):
13206         Likewise.
13207         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
13208         re_search_2):
13209         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
13210         (re_search_internal, prune_impossible_nodes):
13211         (acquire_init_state_context, check_matching, static):
13212         (check_halt_node_context, check_halt_state_context, proceed_next_node):
13213         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
13214         (update_regs, sift_states_backward, build_sifted_states):
13215         (clean_state_log_if_needed, merge_state_array):
13216         (update_cur_sifted_state, add_epsilon_src_nodes):
13217         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
13218         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
13219         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
13220         (find_recover_state, check_subexp_matching_top, transit_state_mb):
13221         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
13222         (check_arrival, check_arrival_add_next_nodes):
13223         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
13224         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
13225         (check_node_accept_bytes, check_node_accept, extend_buffers):
13226         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
13227         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
13228         (sift_ctx_init):
13229         Likewise.
13230
13231         * lib/regex_internal.h:
13232         (re_string_allocate, re_string_construct, re_string_reconstruct):
13233         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
13234         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
13235         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
13236         (re_string_context_at, re_string_peek_byte_case):
13237         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
13238         is defined, since we now use prototypes always.
13239
13240         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
13241         C89 or better.  All uses removed.
13242
13243 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13244
13245         * config/srclist.txt: Add glibc bugs 1220-1227.
13246
13247 2005-08-20  Jim Meyering  <jim@meyering.net>
13248
13249         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
13250         of unused local, dfa.
13251
13252 2005-08-20  Bruno Haible  <bruno@clisp.org>
13253
13254         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
13255
13256 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13257
13258         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
13259         (re_node_set_insert_last, re_dfa_add_node):
13260         Rename local variables to avoid GCC shadowing warnings.
13261
13262 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13263
13264         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
13265         [defined lint]: Suppress bogus uninitialized-variable warnings.
13266
13267         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
13268         and let the caller return REG_ESPACE if out of space.  This
13269         removes an uninitialied-variable warning with GCC 4.0.1, and also
13270         avoids taking the address of a local variable.  All callers
13271         changed.
13272
13273 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13274
13275         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
13276         $LIBCSRC/posix/regexec.c.
13277         Add glibc bug 1217 for regcomp.c.
13278
13279 2005-08-19  Jim Meyering  <jim@meyering.net>
13280
13281         * lib/regexec.c (proceed_next_node): Redo local variables to
13282         avoid GCC shadowing warnings.
13283
13284 2005-08-18  Bruno Haible  <bruno@clisp.org>
13285
13286         * lib/strstr.c (strstr): Fix return value in multibyte case.
13287         * lib/strcasestr.c (strcasestr): Likewise.
13288
13289 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
13290
13291         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
13292
13293 2005-08-17  Jim Meyering  <jim@meyering.net>
13294
13295         Make the %s format (seconds since the epoch) work for a negative
13296         number and when used with a zero-padded field width, e.g. %015s.
13297
13298         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
13299         label so that it precedes the code to set `digits'.  Otherwise,
13300         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
13301         print `00-22'.  Now, it prints `-0022', as it should.
13302
13303 2005-08-17  Bruno Haible  <bruno@clisp.org>
13304
13305         * modules/strstr (Files): Add m4/mbrtowc.m4.
13306         (Depends-on): Add mbuiter.
13307
13308 2005-08-17  Bruno Haible  <bruno@clisp.org>
13309
13310         * modules/strcasestr: New file.
13311         * MODULES.html.sh (String handling, based on ANSI C 89): Add
13312         strcasestr.
13313
13314 2005-08-17  Bruno Haible  <bruno@clisp.org>
13315
13316         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
13317
13318 2005-08-17  Bruno Haible  <bruno@clisp.org>
13319
13320         * modules/mbuiter: New file.
13321         * MODULES.html.sh (Extended multibyte and wide character utilities):
13322         Add mbuiter.
13323
13324 2005-08-17  Bruno Haible  <bruno@clisp.org>
13325
13326         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
13327         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
13328
13329 2005-08-17  Bruno Haible  <bruno@clisp.org>
13330
13331         * m4/strcasestr.m4: New file.
13332
13333 2005-08-17  Bruno Haible  <bruno@clisp.org>
13334
13335         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
13336         * lib/strstr.c: Completely rewritten, with multibyte locale support.
13337
13338 2005-08-17  Bruno Haible  <bruno@clisp.org>
13339
13340         * lib/strcasestr.h: New file.
13341         * lib/strcasestr.c: New file.
13342
13343 2005-08-17  Bruno Haible  <bruno@clisp.org>
13344
13345         * lib/strcasecmp.c: Use mbuiter.h.
13346
13347 2005-08-17  Bruno Haible  <bruno@clisp.org>
13348
13349         * lib/mbuiter.h: New file.
13350
13351 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
13352
13353         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
13354         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
13355         and gl_GETOPT are both invoked via different paths (as happens
13356         with GNU tar CVS because it uses both argp and getopt), the former
13357         wins.
13358
13359 2005-08-16  Bruno Haible  <bruno@clisp.org>
13360
13361         * modules/tls: New file.
13362         * MODULES.html.sh (Multithreading): Add tls.
13363
13364 2005-08-16  Bruno Haible  <bruno@clisp.org>
13365
13366         * modules/strnlen1: New file.
13367         * MODULES.html.sh (String handling): Add strnlen1.
13368
13369 2005-08-16  Bruno Haible  <bruno@clisp.org>
13370
13371         * modules/strcase (Files): Add m4/mbrtowc.m4.
13372         (Depends-on): Add strnlen1, mbchar.
13373
13374 2005-08-16  Bruno Haible  <bruno@clisp.org>
13375
13376         * modules/mbiter: New file.
13377         * MODULES.html.sh (Extended multibyte and wide character utilities):
13378         Add mbiter.
13379
13380 2005-08-16  Bruno Haible  <bruno@clisp.org>
13381
13382         * modules/mbfile: New file.
13383         * MODULES.html.sh (Extended multibyte and wide character utilities):
13384         Add mbfile.
13385
13386 2005-08-16  Bruno Haible  <bruno@clisp.org>
13387
13388         * modules/mbchar: New file.
13389         * MODULES.html.sh (Extended multibyte and wide character utilities):
13390         New section.
13391
13392 2005-08-16  Bruno Haible  <bruno@clisp.org>
13393
13394         * m4/tls.m4: New file, from GNU gettext.
13395
13396 2005-08-16  Bruno Haible  <bruno@clisp.org>
13397
13398         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
13399         always.
13400         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
13401
13402 2005-08-16  Bruno Haible  <bruno@clisp.org>
13403
13404         * m4/mbiter.m4: New file.
13405
13406 2005-08-16  Bruno Haible  <bruno@clisp.org>
13407
13408         * m4/mbfile.m4: New file.
13409
13410 2005-08-16  Bruno Haible  <bruno@clisp.org>
13411
13412         * m4/mbchar.m4: New file.
13413
13414 2005-08-16  Bruno Haible  <bruno@clisp.org>
13415
13416         * lib/tls.h: New file, from GNU gettext.
13417         * lib/tls.c: New file, from GNU gettext.
13418
13419 2005-08-16  Bruno Haible  <bruno@clisp.org>
13420
13421         * lib/strnlen1.h: New file.
13422         * lib/strnlen1.c: New file.
13423
13424 2005-08-16  Bruno Haible  <bruno@clisp.org>
13425
13426         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
13427         (mbi_init): Update.
13428         (mbi_avail, mbi_advance): Let the iteration end before the terminating
13429         NUL byte, not after it.
13430
13431 2005-08-16  Bruno Haible  <bruno@clisp.org>
13432
13433         * lib/strcase.h (strcasecmp): Add note in comments.
13434         * lib/strncasecmp.c: Use code from strcasecmp.c.
13435         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
13436         (strcasecmp): Work correctly in multibyte locales.
13437
13438 2005-08-16  Bruno Haible  <bruno@clisp.org>
13439
13440         * lib/mbiter.h: New file.
13441
13442 2005-08-16  Bruno Haible  <bruno@clisp.org>
13443
13444         * lib/mbfile.h: New file.
13445
13446 2005-08-16  Bruno Haible  <bruno@clisp.org>
13447
13448         * lib/mbchar.h: New file.
13449         * lib/mbchar.c: New file.
13450
13451 2005-08-16  Bruno Haible  <bruno@clisp.org>
13452
13453         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
13454         the valid ones. Makes the comparison operations transitive:
13455         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
13456         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
13457
13458 2005-08-15  Simon Josefsson  <jas@extundo.com>
13459
13460         * modules/ssize_t (License): Change to 'unlimited'.
13461
13462         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
13463
13464 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
13465
13466         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
13467         Add comments for each pending glibc patch.
13468
13469 2005-08-15  Bruno Haible  <bruno@clisp.org>
13470
13471         * lib/regex.h (__restrict_arr): Don't define to __restrict if
13472         __cplusplus is defined.
13473
13474 2005-08-14  Jim Meyering  <jim@meyering.net>
13475
13476         Sync from coreutils.
13477
13478         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
13479         Use the hash-table-based cycle-detection code not just when
13480         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
13481         Reported by James Youngman in
13482         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
13483         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
13484         FTS_TIGHT_CYCLE_CHECK.
13485         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
13486         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
13487         once again.
13488         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
13489         * lib/fts.c (fd_safer): Remove decl.
13490         Include fcntl--.h rather than unistd-safer.h
13491         (fts_safe_changedir): Don't call fd_safer; no longer needed
13492         now that we include fcntl--.h.
13493
13494 2005-08-12  Simon Josefsson  <jas@extundo.com>
13495
13496         * modules/getndelim2: Use ssize_t module.
13497         * modules/getnline: Likewise.
13498         * modules/safe-read: Likewise.
13499         * modules/xreadlink: Likewise.
13500
13501         * modules/ssize_t: New file.
13502
13503 2005-08-12  Simon Josefsson  <jas@extundo.com>
13504
13505         * m4/readline.m4: Look for termcap, curses or ncurses if required.
13506
13507 2005-08-12  Simon Josefsson  <jas@extundo.com>
13508
13509         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13510         ssize_t.
13511
13512 2005-08-12  Simon Josefsson  <jas@extundo.com>
13513
13514         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
13515         readline, getdelim and check_version.
13516         (Support for systems lacking ISO C 99: Sizes of integer types):
13517         Add size_max.
13518
13519 2005-08-12  Bruno Haible  <bruno@clisp.org>
13520
13521         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
13522
13523 2005-08-11  Simon Josefsson  <jas@extundo.com>
13524
13525         * modules/readline: New file.
13526
13527         * modules/strnlen (Files): Add strnlen.h.
13528
13529 2005-08-11  Simon Josefsson  <jas@extundo.com>
13530
13531         * m4/readline.m4: New file.
13532
13533 2005-08-11  Simon Josefsson  <jas@extundo.com>
13534
13535         * lib/readline.h, readline.c: New file.
13536
13537 2005-08-11  Simon Josefsson  <jas@extundo.com>
13538
13539         * doc/gnulib.texi (Initial import, Finishing touches): Mention
13540         gl_AVOID.
13541
13542 2005-08-11  Bruno Haible  <bruno@clisp.org>
13543
13544         * lib/strnlen.h (strnlen): Change parameter name to match comment.
13545
13546 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
13547
13548         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
13549
13550 2005-08-10  Simon Josefsson  <jas@extundo.com>
13551
13552         * tests/test-iconvme.c: New file.
13553
13554 2005-08-10  Simon Josefsson  <jas@extundo.com>
13555
13556         * m4/strnlen.m4: New file.
13557
13558         * m4/strndup.m4: Don't check for strnlen declaration, done in
13559         strnlen.m4.
13560
13561 2005-08-10  Simon Josefsson  <jas@extundo.com>
13562
13563         * lib/strndup.c: Use strnlen.h.
13564
13565         * lib/strnlen.h: New file.
13566
13567 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
13568
13569         * README: Typos.
13570
13571 2005-08-02  Simon Josefsson  <jas@extundo.com>
13572
13573         * modules/readline: New file.
13574
13575 2005-08-02  Simon Josefsson  <jas@extundo.com>
13576
13577         * modules/getdelim: New file.
13578
13579         * modules/getline: Rewrite, don't use getndelim2.
13580
13581 2005-08-02  Simon Josefsson  <jas@extundo.com>
13582
13583         * m4/getline.m4: Separate out getdelim stuff into separate module.
13584
13585         * m4/getdelim.m4: New file.
13586
13587 2005-08-02  Simon Josefsson  <jas@extundo.com>
13588
13589         * lib/getline.h, getline.c: Rewrite.
13590
13591         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
13592
13593 2005-07-31  Bruno Haible  <bruno@clisp.org>
13594
13595         * lib/lock.h (gl_lock_initializer): New macro.
13596         (gl_lock_define_initialized): Use it.
13597         (gl_rwlock_initializer): New macro.
13598         (gl_rwlock_define_initialized): Use it.
13599         (gl_recursive_lock_initializer): New macro.
13600         (gl_recursive_lock_define_initialized): Use it.
13601
13602 2005-07-30  Karl Berry  <karl@gnu.org>
13603
13604         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
13605         Report from Ben Pfaff, regarding getopt.
13606
13607 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
13608
13609         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
13610         normal way.
13611         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
13612         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
13613         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
13614         (gl_GETOPT): Use the new macros.  Most of the implementation
13615         is moved to the new macros.  This is for programs like Emacs
13616         that don't want all the functionality of gl_GETOPT.
13617
13618 2005-07-26  Bruno Haible  <bruno@clisp.org>
13619
13620         * m4/lock.m4: Update from GNU gettext.
13621
13622 2005-07-26  Bruno Haible  <bruno@clisp.org>
13623
13624         * lib/lock.h: Update from GNU gettext.
13625         * lib/lock.c: Update from GNU gettext.
13626
13627 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
13628
13629         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
13630         obsolescent AC_TRY_RUN.  Include the default includes files, for
13631         'exit'.
13632
13633 2005-07-24  Bruno Haible  <bruno@clisp.org>
13634
13635         * modules/visibility: New file.
13636         * MODULES.html.sh (Misc): Add visibility.
13637
13638 2005-07-24  Bruno Haible  <bruno@clisp.org>
13639
13640         * m4/visibility.m4: New file.
13641
13642 2005-07-24  Bruno Haible  <bruno@clisp.org>
13643
13644         * doc/visibility.texi: New file.
13645
13646 2005-07-22  Bruno Haible  <bruno@clisp.org>
13647
13648         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
13649         $(ALLOCA_H), redundant through BUILT_SOURCES.
13650         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
13651         redundant through BUILT_SOURCES.
13652         * modules/byteswap (Makefile.am): Remove explicit dependency on
13653         $(BYTESWAP_H), redundant through BUILT_SOURCES.
13654         * modules/fnmatch (Makefile.am): Remove explicit dependency on
13655         $(FNMATCH_H), redundant through BUILT_SOURCES.
13656         * modules/getopt (Makefile.am): Remove explicit dependency on
13657         $(GETOPT_H), redundant through BUILT_SOURCES.
13658         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
13659         redundant through BUILT_SOURCES.
13660         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
13661         redundant through BUILT_SOURCES.
13662         * modules/stdbool (Makefile.am): Remove explicit dependency on
13663         $(STDBOOL_H), redundant through BUILT_SOURCES.
13664         * modules/stdint (Makefile.am): Remove explicit dependency on
13665         $(STDINT_H), redundant through BUILT_SOURCES.
13666         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
13667         Remove explicit dependency on $(SYSEXITS_H).
13668         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
13669
13670 2005-07-18  Simon Josefsson  <jas@extundo.com>
13671
13672         * lib/check-version.c (check_version): Accept identical versions too.
13673
13674 2005-07-18  Bruno Haible  <bruno@clisp.org>
13675
13676         * modules/lock: New file.
13677         * MODULES.html.sh (Multithreading): New section.
13678
13679 2005-07-18  Bruno Haible  <bruno@clisp.org>
13680
13681         * m4/lock.m4: New file, from GNU gettext.
13682
13683 2005-07-18  Bruno Haible  <bruno@clisp.org>
13684
13685         * lib/lock.h: New file, from GNU gettext.
13686         * lib/lock.c: New file, from GNU gettext.
13687
13688 2005-07-18  Bruno Haible  <bruno@clisp.org>
13689
13690         * lib/lock.h (gl_once_t): New type.
13691         (gl_once_define, gl_once): New macros.
13692         * lib/lock.c (fresh_once): New variable.
13693         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
13694         functions.
13695
13696 2005-07-16  Simon Josefsson  <jas@extundo.com>
13697
13698         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
13699         workaround, suggested by Bruno.
13700
13701 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
13702
13703         * modules/xalloc (Depends-on): Add xalloc-die.
13704         * modules/xvasprintf (Depends-on): Add xalloc-die.
13705
13706 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
13707
13708         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
13709         with a minor change.
13710
13711 2005-07-15  Bruno Haible  <bruno@clisp.org>
13712
13713         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
13714         When using lib/poll.c, define poll as rpl_poll.
13715
13716 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
13717
13718         * modules/argp (Depends-on): Remove unlocked-io.
13719
13720 2005-07-14  Derek Price  <derek@ximbiot.com>
13721
13722         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
13723         for glob symlink bug.
13724
13725 2005-07-14  Bruno Haible  <bruno@clisp.org>
13726
13727         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
13728         Instead, test for *_unlocked function declarations directly.
13729
13730 2005-07-11  Simon Josefsson  <jas@extundo.com>
13731
13732         * modules/size_max: New file.
13733
13734         * modules/xsize: Depend on size_max module for size_max.m4.
13735
13736 2005-07-11  Simon Josefsson  <jas@extundo.com>
13737
13738         * lib/size_max.h: New file.
13739
13740 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
13741
13742         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
13743         copyright symbol and the year.
13744         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
13745         (version_etc_va): Use parameterized copyright notice.
13746         Reword to conform to the current GNU coding standards.
13747
13748 2005-07-11  Karl Berry  <karl@gnu.org>
13749
13750         * doc/gnulib.texi (Quoting): new node.
13751         (Initial import): more info, from Patrice.
13752
13753 2005-07-11  Bruno Haible  <bruno@clisp.org>
13754
13755         * gnulib-tool (func_usage): Document option --avoid.
13756         (Command line options): Handle --avoid.
13757         (func_acceptable): New function.
13758         (func_modules_transitive_closure): Use it.
13759
13760 2005-07-11  Bruno Haible  <bruno@clisp.org>
13761
13762         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
13763         Reported by Jim Meyering.
13764
13765 2005-07-10  Bruno Haible  <bruno@clisp.org>
13766
13767         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
13768         Needed when size_t is smaller than 'unsigned int'.
13769         Reported by Paul Eggert.
13770
13771 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13772
13773         * modules/argp (Depends-on): Add unlocked-io
13774
13775 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13776
13777         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
13778         block of defines.
13779
13780 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
13781
13782         * config/srclist.txt: Comment out regcomp.c, since we have a porting
13783         fix now.
13784
13785 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
13786         and Paul Eggert  <eggert@cs.ucla.edu>
13787
13788         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
13789         in wint_t, not wchar_t.  Remove now-unnecessary cast.
13790
13791 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13792
13793         * modules/regex (Files): Add lib/regex_internal.c,
13794         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
13795         (Depends-on): Add extensions.
13796         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
13797
13798 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13799
13800         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
13801         pathconf.
13802         * m4/same.m4 (gl_SAME): Likewise.
13803         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
13804
13805         * m4/regex.m4: Adjust to new libc regex implementation.
13806         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
13807         all the .c and .h parts of (the new) regex.
13808         Quote the m4 stuff better.
13809         Check for RE_ICASE bug of old gnulib.
13810         Check for REG_STARTEND of recent libc.
13811         Rename local variables from jm_* to gl_*.
13812         Quote operand of "test -f".
13813         Say "recent enough" version of libc, not "version 2".
13814         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
13815         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
13816         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
13817         Remove check for btowc, isascii.
13818         Require AM_LANGINFO_CODESET.
13819
13820 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13821
13822         * lib/regex.c, regex.h: Sync from libc.
13823         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
13824         * lib/regexec.c:
13825         New files, synced from libc, except that regex_internal.h
13826         currently has a small porting fix.
13827
13828 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13829
13830         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
13831         regex_internal.c, regexec.c.
13832         Add regex_internal.h too, but as a comment, since the libc version
13833         is currently broken in gnulib mode.
13834
13835 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
13836
13837         Support programs like Emacs that use gnulib but not gettext.
13838         * MODULES.html.sh (Internationalization functions): Add gettext-h.
13839         * modules/gettext-h: New file.
13840         * modules/gettext (Files): Remove lib/gettext.h.
13841         (Depends-on): Add gettext-h.
13842         (Makefile.am): Remove lib_SOURCES.
13843         * modules/argmatch, modules/c-stack, modules/closeout:
13844         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
13845         * modules/execute, modules/file-type, modules/getaddrinfo:
13846         * modules/getopt, modules/human, modules/javacomp:
13847         * modules/javaexec, modules/mkdir-p, modules/obstack:
13848         * modules/openat, modules/pagealign_alloc, modules/pipe:
13849         * modules/quotearg, modules/regex, modules/rpmatch:
13850         * modules/unicodeio, modules/userspec, modules/version-etc:
13851         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
13852         * modules/xsetenv:
13853         Depend on gettext-h, not gettext.
13854
13855 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
13856
13857         * gnulib-tool (func_import): Add support for 'public domain' license.
13858         * modules/alloca, modules/atexit, modules/memmove:
13859         Now public domain, not GPL.
13860         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
13861         * modules/realloc, modules/strerror, modules/strtod:
13862         Now LGPL, not GPL.
13863
13864 2005-07-05  Bruno Haible  <bruno@clisp.org>
13865
13866         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
13867         autoconf CVS. Needed for mingw.
13868
13869 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13870
13871         Remove the dependency of the strftime module on the tzset module.
13872         * modules/strftime (Depends-on): Remove dependency on tzset.
13873
13874 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13875
13876         Remove the dependency of the strftime module on the tzset module.
13877         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
13878         gl_FUNC_TZSET_CLOBBER.
13879
13880 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13881
13882         Remove the dependency of the strftime module on the tzset module.
13883         * lib/strftime.c (my_strftime)
13884         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
13885         Copy the input structure, to work around some of the bug with
13886         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
13887         Solaris releases, you should also use the tzset module, but we won't
13888         require it as a dependency any more since we don't want LGPLed code
13889         to depend on GPLed code.
13890
13891 2005-07-02  Jim Meyering  <jim@meyering.net>
13892
13893         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
13894         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
13895         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
13896         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
13897
13898 2005-07-02  Jim Meyering  <jim@meyering.net>
13899
13900         * lib/backupfile.c (backup_args): Change a `0' to NULL.
13901
13902 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13903
13904         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
13905         declares only 'struct timespec;' (!).
13906
13907 2005-07-01  Jim Meyering  <jim@meyering.net>
13908
13909         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
13910         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
13911         * lib/save-cwd.c, tempname.c:
13912         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
13913         and don't include <sys/file.h>).
13914
13915 2005-06-29  Jim Meyering  <jim@meyering.net>
13916
13917         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
13918         type name.  Use the variable name instead.
13919         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
13920         Likewise.
13921
13922 2005-06-28  Simon Josefsson  <jas@extundo.com>
13923
13924         * modules/check-version (Files): Add check-version.m4.
13925
13926 2005-06-28  Simon Josefsson  <jas@extundo.com>
13927
13928         * m4/check-version.m4: New file, suggested by Jim Meyering
13929         <jim@meyering.net>.
13930
13931 2005-06-28  Simon Josefsson  <jas@extundo.com>
13932
13933         * lib/check-version.h, lib/check-version.c: New files.
13934
13935 2005-06-28  Simon Josefsson  <jas@extundo.com>
13936
13937         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
13938         collision with global variable.  Better indentation.  Don't
13939         increment buffer pointer beyond buffer end.  Based on comments
13940         from Paul Eggert <eggert@cs.ucla.edu>.
13941
13942         * lib/base64.h: Indent.
13943
13944 2005-06-28  Simon Josefsson  <jas@extundo.com>
13945
13946         * doc/gnulib.texi (Library version handling): New section.
13947
13948 2005-06-28  Jim Meyering  <jim@meyering.net>
13949
13950         * check-module (find_included_lib_files): Hard-code another
13951         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
13952         but modules/fts-lgpl (correctly) does not list those files.
13953
13954         * modules/canonicalize (Files): Add lib/pathmax.h.
13955
13956 2005-06-25  Simon Josefsson  <jas@extundo.com>
13957
13958         * modules/check-version: New file.
13959
13960 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
13961
13962         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
13963         initializer of struct addrinfo, as an indication that we don't
13964         care how many members the structure has.
13965
13966 2005-06-24  Derek Price  <derek@ximbiot.com>
13967         and Bruno Haible  <bruno@clisp.org>
13968
13969         Remove stat module & update lstat.
13970         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
13971         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
13972         * m4/stat.m4: Remove this file.
13973
13974 2005-06-24  Derek Price  <derek@ximbiot.com>
13975         and Bruno Haible  <bruno@clisp.org>
13976
13977         Remove stat module & update lstat.
13978         * lib/stat.c: Remove this file...
13979         (slash_aware_lstat): ...moving this content and its support...
13980         * lib/lstat.c (rpl_lstat): ...into here.
13981         * lib/lstat.h: New file.
13982
13983 2005-06-24  Derek Price  <derek@ximbiot.com>
13984         and Bruno Haible  <bruno@clisp.org>
13985
13986         Remove stat module & update lstat.
13987         * config/srclist.txt (libc sources): Remove stat.
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         * MODULES.html.sh (stat): Remove.
13994         * MODULES.html: Regenerated.
13995         * modules/lstat (Description): Correct function name.
13996         (Files): Add "lstat.h".
13997         (Depends-on): Remove stat, add xalloc, stat-macros.
13998         * modules/stat: Remove this file.
13999         (Include): Add "lstat.h", remove <sys/stat.h>.
14000
14001 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
14002
14003         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
14004         (ranged_convert): Don't save conversion in a temporary struct.
14005         This causes a warning with GCC 4.0.0, and anyway in the typical
14006         case it's not worth the extra 100 bytes or so of code.
14007         (ranged_convert, __mktime_internal): When calling a function via a
14008         pointer P, use P () rather than (*P) (), as we now assume C89 or
14009         better.
14010
14011 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14012
14013         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
14014         "who -r" failed to give output.  Problem reported by Tim Waugh.
14015
14016         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
14017         (xcalloc): Use it to avoid needless tests.
14018         Problem reported by Jim Meyering.
14019
14020 2005-06-20  Derek Price  <derek@ximbiot.com>
14021
14022         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
14023         unnecessary for Autoconfs > 2.59c.
14024
14025 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14026
14027         * lib/argp.h (__option_is_short): Check upper limit of
14028         __key. Isprint() requires its argument to have the value
14029         of an unsigned char or EOF.
14030
14031 2005-06-16  Jim Meyering  <jim@meyering.net>
14032
14033         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
14034         when either N or S is zero.
14035
14036 2005-06-16  Derek Price  <derek@ximbiot.com>
14037
14038         * m4/bison.m4: Declare YACC & YFLAGS precious.
14039
14040 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
14041
14042         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
14043         multibyte string or pattern, fall back on unibyte matching.
14044         Problem reported by James Youngman.
14045
14046 2005-06-08  Bruno Haible  <bruno@clisp.org>
14047
14048         * modules/csharpcomp: New file.
14049         * MODULES.html.sh (C#): Add csharpcomp.
14050
14051 2005-06-08  Bruno Haible  <bruno@clisp.org>
14052
14053         * m4/csharpcomp.m4: New file, from GNU gettext.
14054
14055 2005-06-08  Bruno Haible  <bruno@clisp.org>
14056
14057         * lib/csharpcomp.h: New file, from GNU gettext.
14058         * lib/csharpcomp.c: New file, from GNU gettext.
14059         * lib/csharpcomp.sh.in: New file, from GNU gettext.
14060
14061 2005-06-08  Bruno Haible  <bruno@clisp.org>
14062
14063         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
14064         warning on mingw.
14065
14066 2005-06-07  Derek Price  <derek@ximbiot.com>
14067
14068         Sync from CVS.
14069         * lib/glob_.h: Indent nested #ifdef.
14070
14071 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
14072
14073         Sync from coreutils.
14074         Use "file name" when talking about file names, instead of "filename"
14075         or "path", as per the GNU coding standards.
14076         * lib/mkdir-p.c: Renamed from makepath.c.
14077         (make_dir_parents): Renamed from make_path.  All callers changed.
14078         * lib/mkdir-p.h: Likewise.  All includers changed.
14079         * lib/filenamecat.c: Renamed from path-concat.c.
14080         (file_name_concat): Renamed from path_concat.  All callers changed.
14081         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
14082         * lib/filenamecat.h: Likewise.  All includers changed.
14083         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
14084         in comments or local variable names.
14085         * lib/basename.c: Likewise.
14086         * lib/canonicalize.c, canonicalize.h: Likewise.
14087         * lib/dirname.c, dirname.h: Likewise.
14088         * lib/euidaccess.c: Likewise.
14089         * lib/exclude.c: Likewise
14090         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
14091         * lib/fsusage.c, fsuage.h: Likewise.
14092         * lib/fts.c, fts_.h: Likewise.
14093         * lib/getcwd.c: Likewise.
14094         * lib/getloadavg.c: Likewise.
14095         * lib/mkstemp.c: Likewise.
14096         * lib/mountlist.c, mountlist.h: Likewise.
14097         * lib/openat.c, openat.h: Likewise.
14098         * lib/readlink-stub.c: Likewise.
14099         * lib/readutmp.c, readutmp.h: Likewise.
14100         * lib/rename.c: Likewise.
14101         * lib/rmdir.c: Likewise.
14102         * lib/same.c: Likewise.
14103         * lib/savedir.c: Likewise.
14104         * lib/stripslash.c: Likewise.
14105         * lib/tempname.c: Likewise.
14106         * lib/xreadlink.c: Likewise.
14107         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
14108         All uses changed.
14109         * lib/exclude.h: Likewise.
14110
14111         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
14112         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
14113         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
14114         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
14115         * lib/pathmax.h: Include <limits.h> unconditionally, since other
14116         files have been getting away with it for years (MORE/BSD 4.3
14117         is extinct now).
14118         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
14119         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
14120
14121         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
14122         Define to 256, not 255, as per modern POSIX.
14123
14124 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
14125
14126         Sync from coreutils.
14127         Use "file name" when talking about file names, instead of "filename"
14128         or "path", as per the GNU coding standards.
14129         * MODULES.html.sh: mkdir-p renamed from makepath.
14130         filenamecat renamed from path-concat.
14131         * modules/filenamecat: Renamed from modules/path-concat.
14132         (Files): filenamecat.h and filenamecat.c renamed from
14133         path-concat.h and path-concat.c.
14134         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
14135         (Include): filenamecat.h, not path-concat.h.
14136         * modules/mkdir-p: Renamed from modules/makepath.
14137         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
14138         makepath.c.
14139         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
14140         (Include): mkdir-p.h, not makepath.h.
14141
14142 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
14143
14144         Sync from coreutils.
14145         * m4/mkdir-p.m4: Renamed from makepath.m4.
14146         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
14147         Rename files from makepath.c to mkdir-p.c, and from
14148         makepath.h to mkdir-p.h.
14149         * m4/filenamecat.m4: Renamed from path-concat.m4.
14150         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
14151         Rename files from path-concat.c to filenamecat.c,
14152         and from path-concat.h to filenamecat.h.
14153         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
14154         "file name" in local variables or comments.
14155         * m4/rename.m4: Likewise.
14156
14157 2005-06-01  Bruno Haible  <bruno@clisp.org>
14158
14159         * modules/csharpexec: New file.
14160         * MODULES.html.sh (C#): New section.
14161
14162 2005-06-01  Bruno Haible  <bruno@clisp.org>
14163
14164         * m4/csharp.m4: New file, from GNU gettext.
14165         * m4/csharpexec.m4: New file, from GNU gettext.
14166
14167 2005-06-01  Bruno Haible  <bruno@clisp.org>
14168
14169         * lib/csharpexec.h: New file, from GNU gettext.
14170         * lib/csharpexec.c: New file, from GNU gettext.
14171         * lib/csharpexec.sh.in: New file, from GNU gettext.
14172
14173 2005-05-31  Derek Price  <derek@ximbiot.com>
14174             Paul Eggert  <eggert@cs.ucla.edu>
14175
14176         Sync from cvs.
14177         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
14178
14179 2005-05-31  Derek Price  <derek@ximbiot.com>
14180             Paul Eggert  <eggert@cs.ucla.edu>
14181
14182         Sync from cvs.
14183         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
14184
14185 2005-05-29  Derek Price  <derek@ximbiot.com>
14186
14187         * config/srclist.txt (glob_.h, glob.c): Add these files.
14188
14189 2005-05-29  Derek Price  <derek@ximbiot.com>
14190
14191         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
14192         * modules/glob: New file.
14193         * modules/getlogin_r: Add link to POSIX spec in description.
14194
14195 2005-05-29  Derek Price  <derek@ximbiot.com>
14196             Paul Eggert  <eggert@cs.ucla.edu>
14197
14198         * m4/glob.m4: New file.
14199
14200 2005-05-29  Derek Price  <derek@ximbiot.com>
14201             Paul Eggert  <eggert@cs.ucla.edu>
14202
14203         * lib/glob_.h, lib/glob.c: New files.
14204
14205 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14206
14207         * modules/fts (Files): Remove m4/inttypes-pri.m4.
14208         * modules/fts-lgpl (Depends-on): Remove gettext.
14209
14210 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14211
14212         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
14213         and don't require gt_INTTYPES_PRI.
14214
14215 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14216
14217         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
14218
14219         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
14220         the configuration hassle isn't worth it.
14221         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
14222         (LONGEST_MODIFIER, PRIuMAX): Remove.
14223
14224 2005-05-27  Bruno Haible  <bruno@clisp.org>
14225
14226         * lib/getlogin_r.h: Remove second include of <stddef.h>.
14227
14228 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
14229
14230         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
14231         _POSIX_PTHREAD_SEMANTICS for Solaris.
14232
14233 2005-05-25  Derek Price  <derek@ximbiot.com>
14234
14235         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
14236
14237 2005-05-25  Derek Price  <derek@ximbiot.com>
14238             Paul Eggert  <eggert@cs.ucla.edu>
14239
14240         * modules/getlogin_r, m4/getlogin_r.m4: New files.
14241         * lib/getlogin_r.c, getlogin_r.h: New files.
14242
14243 2005-05-25  Bruno Haible  <bruno@clisp.org>
14244             Derek Price  <derek@ximbiot.com>
14245
14246         * lib/getlogin_r.h: Simplify API documentation.
14247
14248 2005-05-23  Derek Price  <derek@ximbiot.com>
14249
14250         * modules/minmax (Files): Add m4/minmax.m4.
14251         (configure.ac): Add gl_MINMAX.
14252
14253 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
14254
14255         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
14256         so that unistd-safer.h (GPL'ed code) need not be included.
14257
14258 2005-05-22  Bruno Haible  <bruno@clisp.org>
14259
14260         * m4/minmax.m4: New file.
14261         Based on a patch by Derek Price <derek@ximbiot.com>.
14262
14263 2005-05-22  Bruno Haible  <bruno@clisp.org>
14264
14265         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
14266         (INT64_MIN): Fix definition.
14267         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
14268
14269         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
14270         NEED_SIGNED_INT_TYPES.
14271
14272         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
14273         HAVE_SYSTEM_INTTYPES.
14274
14275 2005-05-22  Bruno Haible  <bruno@clisp.org>
14276
14277         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
14278         Also include <sys/param.h> if it defines MIN, MAX.
14279         Based on a patch by Derek Price <derek@ximbiot.com>.
14280
14281 2005-05-21  Jim Meyering  <jim@meyering.net>
14282
14283         * modules/fts (Files): Add m4/inttypes-pri.m4.
14284         (Depends-on): Add lstat and remove gettext.  Alphabetize.
14285
14286 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14287
14288         New fts module.
14289         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
14290         (setup_dir, free_dir): New functions.
14291         (enter_dir, leave_dir): Define trivial
14292         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
14293         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
14294         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
14295         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
14296         Move to fts-cycle.c.
14297         (fts_open): Use setup_dir.
14298         (fts_close): Use free_dir.
14299         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
14300         This adds a label and some gotos, but the alternatives were messier.
14301         Check for memory allocation failure when entering a dir.
14302         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
14303         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
14304         (FTS): New member fts_cycle, that is a union that contains the
14305         old active_dir_ht and cycle_state.  All uses changed to mention
14306         fts_cycle.ht and fts_cycle.state.
14307         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
14308         fts.c, with the following changes:
14309         (setup_dir, free_dir): New functions.
14310         (enter_dir): Now returns bool.  Return true if successful, false
14311         if memory exhausted.  All callers changed.
14312         Do not bother partly cleaning up on
14313         memory allocation failure; that is free_dir's job.
14314         However, free ad if hash_insert fails, to avoid memory leak.
14315         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
14316         fts->fts_options to see which union member to use.
14317
14318 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14319
14320         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
14321         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
14322
14323 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14324
14325         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
14326
14327 2005-05-20  Jim Meyering  <jim@meyering.net>
14328
14329         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
14330         Now a macro, to pacify GCC.
14331
14332 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
14333
14334         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
14335         of -1.
14336
14337 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
14338
14339         * lib/chown.c (rpl_chown): Return -1 on failure.
14340
14341 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
14342
14343         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
14344         Don't check for stddef.h.
14345         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
14346         don't use its results.
14347         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
14348         since we include them unconditionally.  Don't require
14349         AM_STDBOOL_H, since stdbool is a prerequisite.
14350         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
14351         since we assume C89 or better.
14352         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
14353         as we don't use their results.
14354         Don't check for fchdir, memmove, memset, strrchr, as we use
14355         them unconditionally.
14356         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
14357         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
14358
14359 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
14360
14361         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
14362         Include <stddef.h> unconditionally, since we assume C89 now.
14363         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
14364         * lib/fts.c: Include fts_.h first, to check interface.
14365         Do not include intprops.h; no longer needed.
14366         Include cycle-check.h and hash.h, since fts_.h no longer does.
14367         Remove unnecessary casts of closedir to void.
14368         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
14369         decide whether to decrement nlinks.
14370         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
14371         (FTS): Use struct hash_table * instead of Hash_table, so that
14372         we no longer need to include hash.h here.
14373
14374 2005-05-18  Jim Meyering  <jim@meyering.net>
14375
14376         * modules/dirfd (License): Change to LGPL.  Most of the code
14377         is already in the public domain.
14378
14379 2005-05-18  Jim Meyering  <jim@meyering.net>
14380
14381         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
14382         Reported by Yoann Vandoorselaere.
14383
14384 2005-05-17  Jim Meyering  <jim@meyering.net>
14385
14386         * m4/fts.m4: New file, from coreutils.
14387
14388 2005-05-17  Jim Meyering  <jim@meyering.net>
14389
14390         * lib/fts.c, lib/fts_.h: New files, from coreutils.
14391
14392 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14393
14394         Sync from coreutils.
14395         * m4/unlinkdir.m4: New file.
14396
14397 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14398
14399         Sync from coreutils.
14400         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
14401         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
14402         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
14403         White space changes only.
14404         * lib/makepath.c (make_path): Port to hosts where leading "//" is
14405         special.
14406         * lib/yesno.c: Include getline.h, not ctype.h.
14407         (yesno): Don't remove leading white space; POSIX doesn't allow it.
14408         Use getline to remove arbitrary restriction on response length.
14409
14410 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14411
14412         * config/srclist-update: Spell out "Street" in FSF postal
14413         mail address; this is the style the FSF seems to prefer.
14414
14415         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
14416         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
14417         this updates FSF postal mail address.
14418
14419         Sync from coreutils.
14420         * modules/unlinkdir: New file.
14421         * modules/yesno (Depends-on): Add getline.
14422         * MODULES.html.sh (File system functions): Add unlinkdir.
14423
14424 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14425
14426         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
14427         lib/strsep.h:
14428         Change the initial comment to refer to GPL, not LGPL.
14429         gnulib-tool will change it to LGPL as needed.
14430
14431         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
14432         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
14433         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
14434         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
14435         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
14436         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
14437         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
14438         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
14439         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
14440         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
14441         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
14442         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
14443         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
14444         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
14445         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
14446         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
14447         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
14448         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
14449         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
14450         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
14451         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
14452         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
14453         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
14454         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
14455         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
14456         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
14457         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
14458         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
14459         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
14460         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
14461         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
14462         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
14463         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
14464         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
14465         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
14466         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
14467         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
14468         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
14469         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
14470         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
14471         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
14472         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
14473         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
14474         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
14475         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
14476         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
14477         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
14478         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
14479         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
14480         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
14481         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
14482         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
14483         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
14484         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
14485         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
14486         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
14487         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
14488         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
14489         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
14490         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
14491         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
14492         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
14493         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
14494         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
14495         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
14496         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
14497         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
14498         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
14499         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
14500         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
14501         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
14502         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
14503         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
14504         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
14505         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
14506         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
14507         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
14508         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
14509         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
14510         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
14511         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
14512         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
14513         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
14514         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
14515         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
14516         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
14517         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
14518         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
14519         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
14520         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
14521         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
14522         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
14523         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
14524         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
14525         lib/yesno.c, lib/yesno.h:
14526         Update FSF postal mail address.
14527
14528 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14529
14530         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
14531         tests/test-memmem.c, tests/test-stpncpy.c:
14532         Update FSF postal mail address.
14533
14534 2005-05-13  Bruno Haible  <bruno@clisp.org>
14535
14536         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
14537         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
14538         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
14539         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
14540         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
14541         Add support for 64-bit integers in the MSVC compiler.
14542
14543 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14544
14545         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
14546
14547 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
14548
14549         * gnulib-tool (func_import): Sort and uniquify recommended includes.
14550
14551 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
14552
14553         * doc/getdate.texi (General date syntax): Don't say that date
14554         date --iso-8601=ns generates acceptable dates; it doesn't yet.
14555         Problem reported by Nic Ferrier.
14556
14557 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14558
14559         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
14560         specified in ai_socktype. Fix invalid ai_protocol
14561         check. ai_protocol is usually set to 0 or depending on
14562         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
14563         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
14564         ai_socktype / ai_protocol in the returned addrinfo structure.
14565
14566 2005-05-10  Simon Josefsson  <jas@extundo.com>
14567
14568         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
14569         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
14570
14571 2005-05-10  Karl Berry  <karl@gnu.org>
14572
14573         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
14574         (from http://www.gnu.org/licenses).
14575         * doc/COPYING.LIB: also rename to COPYING.LESSER.
14576         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
14577         fdl.texi suffices.
14578
14579 2005-05-10  Karl Berry  <karl@gnu.org>
14580
14581         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
14582         (COPYING.DOC): remove.
14583
14584         * config/srclist-update: new FSF address.
14585
14586 2005-05-10  Derek Price  <derek@ximbiot.com>
14587
14588         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
14589         possible.
14590
14591 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14592             Bruno Haible  <bruno@clisp.org>
14593
14594         * modules/inet_ntop: New file.
14595         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14596         inet_ntop.
14597
14598 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14599             Bruno Haible  <bruno@clisp.org>
14600
14601         * m4/inet_ntop.m4: New file.
14602
14603 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14604             Bruno Haible  <bruno@clisp.org>
14605
14606         * lib/inet_ntop.h: New file.
14607         * lib/inet_ntop.c: New file, from glibc with modifications.
14608
14609 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
14610
14611         * modules/time_r (License): Change to LGPL.
14612         * modules/extensions (License): Change to LGPL.  Actually,
14613         the license is more permissive than that, but currently gnulib-tool
14614         doesn't know how to handle more-permissive licenses.
14615
14616         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
14617         Problem reported by Dave Love.
14618
14619 2005-05-08  Jim Meyering  <jim@meyering.net>
14620
14621         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
14622         blank.
14623
14624 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
14625
14626         * modules/argmatch (Depends-on): Add stdbool.
14627         * modules/backupfile (Depends-on): Likewise.
14628         * modules/chdir-long (Depends-on): Likewise.
14629         * modules/closeout (Depends-on): Likewise.
14630         * modules/cycle-check (Depends-on): Likewise.
14631         * modules/dirname (Depends-on): Likewise.
14632         * modules/fnmatch (Depends-on): Likewise.
14633         * modules/fsusage (Depends-on): Likewise.
14634         * modules/fwriteerror (Depends-on): Likewise.
14635         * modules/getcwd (Depends-on): Likewise.
14636         * modules/getloadavg (Depends-on): Likewise.
14637         * modules/hard-locale (Depends-on): Likewise.
14638         * modules/makepath (Depends-on): Likewise.
14639         * modules/mountlist (Depends-on): Likewise.
14640         * modules/nanosleep (Depends-on): Likewise.
14641         * modules/posixtm (Depends-on): Likewise.
14642         * modules/quotearg (Depends-on): Likewise.
14643         * modules/readtokens (Depends-on): Likewise.
14644         * modules/readtokens0 (Depends-on): Likewise.
14645         * modules/readutmp (Depends-on): Likewise.
14646         * modules/save-cwd (Depends-on): Likewise.
14647         * modules/strftime (Depends-on): Likewise.
14648         * modules/userspec (Depends-on): Likewise.
14649         * modules/utimecmp (Depends-on): Likewise.
14650         * modules/xgetcwd (Depends-on): Likewise.
14651         * modules/xnanosleep (Depends-on): Likewise.
14652         * modules/xstrtod (Depends-on): Likewise.
14653         * modules/yesno (Depends-on): Likewise.
14654
14655 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
14656
14657         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
14658         needless checks.
14659
14660 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14661
14662         Merge from coreutils.  Among other things,
14663         add bulletproofing for cases where stdin, stdout, or stderr are closed.
14664         * lib/fd-safer.c: New file.
14665         * lib/fcntl-safer.h, open-safer.c: Remove.
14666         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
14667         * lib/dup-safer.c: Include unistd-safer.h first.
14668         Don't include errno.h.
14669         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
14670         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
14671         * lib/file-type.c: Rely on file-type.h change.
14672         * lib/getloadavg.c: Include unistd-safer.h.
14673         (getloadavg): Use safer open.
14674         * lib/getusershell.c: Include "stdio-safer.h".
14675         (getusershell): Use safer fopen.
14676         * lib/long-options.c (long_options): Use NULL rather than 0.
14677         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
14678         'free'.
14679         * lib/modechange.c: Likewise.
14680         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
14681         (MODE_DONE): New constant.
14682         (struct mode_change): Remove 'next' member.
14683         (make_node_op_equals): New function; like the old one of the
14684         same name, except it allocates an array.
14685         (mode_compile, mode_create_from_ref): Use it.
14686         (mode_compile): Allocate result as an array, not a linked list.
14687         Parse octal string ourself, so that we catch mistakes like "+0".
14688         (mode_adjust): Arg is an array, not a linked list.
14689         * lib/modechange.c: Include stat-macros.h, xalloc.h.
14690         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
14691         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
14692         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
14693         Remove.  This is now stat-macros.h's job.
14694         (talloc): Remove.  All callers replaced by xalloc, so that
14695         our invokers don't have to worry about reporting memory failures.
14696         (make_node_op_equals): Remove.
14697         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
14698         New constants.
14699         (struct mode_change): Moved here from modechange.h.
14700         (mode_append_entry): Remove.
14701         (mode_compile): Remove MASKED_OPS arg, since it encouraged
14702         apps to have incorrect behavior.  Use simpler algorithm for head
14703         and tail.  Don't futz with umask; that's now the job of mode_adjust.
14704         Detect more invalid usages rather than having somewhat-random behavior.
14705         Don't insert an "a=" action, as that leads to incorrect behavior.
14706         (mode_compile, mode_create_from_ref): Return NULL on error instead
14707         of an enum, since now there's only one way to have an error.  All
14708         callers changed.
14709         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
14710         at the correct time.  Simplify calculation of "+u" and its ilk.
14711         Don't mishandle "+X".
14712         (mode_free): Remove "register" and localize decls.
14713         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
14714         (struct mode_change): Move to modechange.c; callers don't
14715         need to see this stuff.
14716         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
14717         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
14718         (mode_change, mode_adjust): Reflect the new signatures noted above.
14719         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
14720         that might redefine system include files.
14721         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
14722         (my_usleep): Use NULL rather than (void *) 0.
14723         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
14724         Use siginterrupt to specify that system calls should be interrupted.
14725         (rpl_nanosleep): Move initialization of suspended closer to call of
14726         my_usleep.
14727         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
14728         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
14729         (desirable_utmp_entry): New function.
14730         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
14731         using x2nrealloc, to simplify logic.
14732         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
14733         size calculation.  Do not assume utmp file is a regular file.
14734         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
14735         (READ_UTMP_CHECK_PIDS): New constant.
14736         * lib/save-cwd.c: Include unistd-safer.h.
14737         (save_cwd): Use fd_safer.
14738         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
14739         [!_LIBC] Include "stat-macros.h" instead.
14740         * lib/unistd-safer.h (fd_safer): New decl.
14741
14742 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14743
14744         * modules/getloadavg (Depends-on): Add unistd-safer.
14745         * modules/getusershell (Depends-on): Add stdio-safer.
14746         * modules/lstat (Depends-on): Remove xalloc.
14747         * modules/mkstemp (Depends-on): Add stat-macros.
14748         * modules/modechange (Depends-on): Remove xstrtol.
14749         Add stat-macros, xalloc.
14750         * modules/save-cwd (Depends-on): Add unistd-safer.
14751         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
14752         * modules/unistd-safer (Files): Add lib/fd-safer.c
14753         (Makefile.am): Remove lib_SOURCES.
14754
14755         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
14756         Remove fcntl-safer; unistd-safer supersedes it.
14757
14758 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14759
14760         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
14761         AC_HEADER_STAT.
14762         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
14763         (gl_PREREQ_CHOWN): Remove.
14764         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
14765         it.  Don't require AC_HEADER_STAT.
14766         (gl_PREREQ_LSTAT): Remove.
14767         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
14768         Don't require AC_HEADER_STAT.
14769         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
14770         (gl_PREREQ_RMDIR): Remove.
14771         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
14772         mention stat-macros.h or AC_HEADER_STAT, since we'll make
14773         the stat-macros module a prerequisite.
14774         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
14775         * m4/filemode.m4 (gl_FILEMODE): Likewise.
14776         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
14777         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
14778         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
14779         variable names.
14780         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
14781         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
14782         variable prefixes.
14783         * m4/fcntl-safer.m4: Remove.
14784         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
14785         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
14786         Invoke gl_PREREQ_FD_SAFER.
14787         (gl_PREREQ_FD_SAFER): New macro.
14788         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
14789         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
14790         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
14791         Remove duplicate call to AC_LIBOBJ(readutmp).
14792         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
14793
14794         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
14795         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
14796
14797 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14798
14799         * MODULES.html.sh (Misc): Add byteswap.
14800
14801 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14802
14803         * modules/getcwd (Depends-on): Add extensions.
14804         * modules/openat (Depends-on): Likewise.
14805
14806 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14807
14808         * modules/byteswap: New file.
14809
14810 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14811
14812         * m4/byteswap.m4: New file.
14813
14814 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14815
14816         * lib/byteswap_.h: New file.
14817
14818 2005-04-25  Karl Berry  <karl@gnu.org>
14819
14820         * m4/gettext.m4: Update from GNU gettext 0.14.4.
14821
14822 2005-04-25  Albert Chin  <china@thewrittenword.com>
14823
14824         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
14825         Toolkit C bug.
14826
14827 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
14828
14829         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
14830         (func_ln_if_changed) Remove forcibly for no error message
14831         in case file does not exist.
14832
14833 2005-04-19  Simon Josefsson  <jas@extundo.com>
14834
14835         * gnulib-tool (Options): Make --symlink mean --symbolic.
14836
14837 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
14838
14839         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
14840
14841 2005-04-16  Simon Josefsson  <jas@extundo.com>
14842
14843         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
14844
14845 2005-04-15  Simon Josefsson  <jas@extundo.com>
14846
14847         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
14848
14849 2005-04-15  Simon Josefsson  <jas@extundo.com>
14850
14851         * gnulib-tool: Rename --symlink to --symbolic.
14852
14853 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
14854
14855         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
14856         symbolic links to files instead of copying/moving.  Add --aux-dir,
14857         specifying directory relative --dir where auxiliary build tools
14858         are placed.
14859
14860 2005-04-14  Bruno Haible  <bruno@clisp.org>
14861
14862         * modules/allocsa (License): Change to LGPL.
14863         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
14864
14865 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
14866
14867         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
14868         that "UTC +1 second" continues to work.  Problem reported
14869         by Dmitry V. Levin.
14870         (relunit_snumber): New rule.
14871         (relunit): Use it.
14872
14873 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
14874
14875         * lib/getdate.y (universal_time_zone_table): New constant.
14876         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
14877         universal_time_zone_table.
14878         (lookup_zone): Prefer universal_time_zone_table to
14879         local_time_zone_table, so that "GMT" time stamps are allowed in
14880         London during the summer.  Problem reported by Ian Abbott.
14881
14882 2005-04-12  Jim Meyering  <jim@meyering.net>
14883
14884         * lib/human.c (humblock): Set *options even when returning due to
14885         xstrtoumax conversion failure.  Thanks to a used-uninitialized
14886         warning from gcc-4.
14887
14888 2005-04-09  Jim Meyering  <jim@meyering.net>
14889
14890         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
14891         -Wuninitialized: initialize tm0.tm_year.
14892
14893 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
14894
14895         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
14896         count, since there's no maximum.  All uses changed.
14897         Add member dsts_seen.
14898         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
14899         not being INT_MAX.
14900         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
14901         Use pc_rels_seen to decide whther a date is absolute.
14902
14903         * lib/getdate.y (number): Don't overwrite year.
14904         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
14905         check.
14906
14907 2005-04-02  Simon Josefsson  <jas@extundo.com>
14908
14909         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
14910         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
14911
14912 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
14913
14914         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
14915         where no absolute path name can be longer than PATH_MAX.
14916
14917 2005-03-27  Jim Meyering  <jim@meyering.net>
14918
14919         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
14920
14921 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
14922
14923         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
14924         "one's complement" -> "ones' complement" in comment, as per Knuth.
14925         "value of type" -> "type or expression" in comment.
14926         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
14927
14928 2005-03-26  Jim Meyering  <jim@meyering.net>
14929
14930         Comment nits.
14931         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
14932         Correct typos: s/or/of/.
14933
14934 2005-03-26  Jim Meyering  <jim@meyering.net>
14935
14936         * modules/check-include-files: Move to ../ and rename to...
14937         * check-module: ...this.
14938
14939 2005-03-25  Jim Meyering  <jim@meyering.net>
14940
14941         * modules/xvasprintf (Files): Add xalloc.h.
14942
14943 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
14944
14945         * modules/gettext (Files): config/config.rpath ->
14946         build-aux/config.rpath
14947         * modules/iconv (Files): Likewise.
14948         Problem reported by Oskar Liljeblad.
14949
14950 2005-03-23  Jim Meyering  <jim@meyering.net>
14951
14952         * modules/check-include-files: New script to check for
14953         missing dependencies, multiple includes, etc.
14954
14955         * modules/c-strtold (Depends-on): Add xalloc.
14956         * modules/c-strtod (Depends-on): Add xalloc.
14957         * modules/hash (Depends-on): Add xalloc.
14958         (Files): Remove lib/xalloc.h.
14959
14960         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
14961         * modules/userspec (Files): Add lib/inttostr.h.
14962
14963 2005-03-23  Jim Meyering  <jim@meyering.net>
14964
14965         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
14966
14967 2005-03-22  Jim Meyering  <jim@meyering.net>
14968
14969         * modules/stat-macros: New module.
14970         * modules/canonicalize, modules/euidaccess, modules/file-type,
14971         * modules/filemode, modules/lchown, modules/makepath,
14972         * modules/rmdir, modules/stat: Depend on new stat-macros module
14973         rather than listing lib/stat-macros.h manually.
14974         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
14975
14976 2005-03-22  Jim Meyering  <jim@meyering.net>
14977
14978         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
14979
14980 2005-03-22  Bruno Haible  <bruno@clisp.org>
14981
14982         * config/srclist.txt: Replace target directory 'config' with
14983         'build-aux'.
14984         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
14985         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
14986         ../build-aux/.
14987
14988 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
14989
14990         * modules/chdir-long (Depends-on): Add mempcpy.
14991
14992         * modules/acl, modules/backupfile, modules/c-strtod,
14993         modules/c-strtold, modules/canon-host, modules/canonicalize,
14994         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
14995         modules/exclude, modules/exitfail, modules/file-type,
14996         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
14997         modules/getdate, modules/getline, modules/getpagesize,
14998         modules/getpass, modules/getugroups, modules/group-member,
14999         modules/hard-locale, modules/hash, modules/human, modules/idcache,
15000         modules/inttostr, modules/long-options, modules/makepath,
15001         modules/md5, modules/memcasecmp, modules/memcoll,
15002         modules/modechange, modules/mountlist, modules/path-concat,
15003         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
15004         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
15005         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
15006         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
15007         modules/strftime, modules/strndup, modules/strverscmp,
15008         modules/timespec, modules/unlocked-io, modules/userspec,
15009         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
15010         modules/yesno:
15011         Remove lib_SOURCES line from Makefile.am section, as this is now
15012         done automatically by the corresponding Autoconf macro.
15013
15014 2005-03-21  Jim Meyering  <jim@meyering.net>
15015
15016         Changes imported from coreutils.
15017
15018         * lib/cycle-check.c: Don't include xalloc.h.
15019
15020         * lib/path-concat.c: Don't include assert.h.
15021         (path_concat): Remove assertion that would have triggered
15022         for ABASE starting with more than one slash.
15023         Reported by Andreas Schwab.
15024
15025         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
15026         properly when ABASE is an absolute file name.
15027         Correct the description of this function.
15028         Include <assert.h>.
15029         Add an assertion and a test driver.
15030         This fixes a bug introduced on 2004-07-02.
15031         Andreas Schwab reported the resulting failure of cp --parents:
15032         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
15033
15034 2005-03-21  Jim Meyering  <jim@meyering.net>
15035
15036         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
15037         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
15038
15039 2005-03-21  Jim Meyering  <jim@meyering.net>
15040         and  Paul Eggert  <eggert@cs.ucla.edu>
15041
15042         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
15043         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
15044         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
15045         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
15046         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
15047         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
15048         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
15049         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
15050         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
15051         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
15052         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
15053         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
15054         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
15055         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
15056         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
15057         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
15058         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
15059         for these modules.
15060
15061 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
15062
15063         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
15064         (which shouldn't happen), generate nothing instead of returning 0
15065         immediately, so that nstrftime (NULL, ...) doesn't return 0.
15066
15067 2005-03-16  Bruno Haible  <bruno@clisp.org>
15068
15069         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
15070         HAVE_LONGLONG_64BIT.
15071
15072 2005-03-16  Bruno Haible  <bruno@clisp.org>
15073
15074         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
15075         HAVE_LONGLONG_64BIT.
15076
15077 2005-03-16  Bruno Haible  <bruno@clisp.org>
15078
15079         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
15080         HAVE_LONGLONG_64BIT.
15081
15082 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
15083
15084         * lib/strftime.c (my_strftime): Prepend space to format so that we can
15085         reliably distinguish strftime failure from empty output on POSIX
15086         hosts.
15087
15088 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
15089
15090         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
15091         (iconv_string): Don't guess a size-zero buffer, as that might cause
15092         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
15093         result would be 'too large', where 'too large' is (heuristically)
15094         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
15095         overflow concerns.  This will prevent some unwanted malloc failures
15096         when the inputs are very large.
15097
15098 2005-03-15  Karl Berry  <karl@gnu.org>
15099
15100         * config/srclist.txt (config.rpath): from gettext.
15101         * config/config.rpath: update.
15102
15103 2005-03-15  Bruno Haible  <bruno@clisp.org>
15104
15105         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
15106         to 'negate'.
15107
15108         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
15109         variable.
15110
15111         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
15112         results.
15113
15114 2005-03-14  Simon Josefsson  <jas@extundo.com>
15115
15116         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
15117         <fx@gnu.org>.
15118
15119 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
15120
15121         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
15122         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
15123         intprops.h.
15124         * lib/strtol.c: Likewise.
15125
15126 2005-03-14  Jim Meyering  <jim@meyering.net>
15127
15128         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
15129         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
15130         to be nonzero so that we (and caller) can detect the difference
15131         between a valid zero-length expansion and an error return, even
15132         when the underlying strftime fails before writing anything into
15133         that location.
15134
15135 2005-03-14  Bruno Haible  <bruno@clisp.org>
15136
15137         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
15138         Update from GNU gettext 0.14.3.
15139
15140 2005-03-10  Jim Meyering  <jim@meyering.net>
15141
15142         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
15143
15144 2005-03-10  Jim Meyering  <jim@meyering.net>
15145
15146         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
15147         so that this module works on systems without fchdir.
15148
15149 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
15150
15151         Factor int-properties macros into a single file, except for
15152         glibc-related files.
15153         * lib/intprops.h: New file.
15154         * lib/getloadavg.c: Include it instead of limits.h.
15155         (INT_STRLEN_BOUND): Remove.
15156         * lib/human.c: Include intprops.h.
15157         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
15158         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
15159         302/1000.
15160         * lib/inttostr.h: Include intprops.h instead of limits.h.
15161         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
15162         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
15163         for consistency with intprops.h.
15164         (time_t_is_integer, twos_complement_arithmetic): Use them.
15165         * lib/sig2str.h: Include <signal.h>, intprops.h.
15166         (INT_STRLEN_BOUND): Remove.
15167         * lib/strftime.c (TYPE_SIGNED): Remove.
15168         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
15169         * lib/strtol.c: Adjust comments to match intprops.h.
15170         * lib/userspec.c: Include intprops.h.
15171         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
15172         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
15173         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
15174         instead of rolling our own expressions.
15175         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
15176
15177         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
15178         instead of int.
15179         (my_strftime): Do not mishandle years close to INT_MAX, by doing
15180         the right thing even if adding 1900 would overflow.  Similarly
15181         for tm_mon + 1 and tm_yday + 1.
15182         Make %Y always equivalent to %C%y, and similarly for %G and %g.
15183         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
15184         (DO_SIGNED_NUMBER): New macro.
15185         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
15186
15187 2005-03-07  Bruno Haible  <bruno@clisp.org>
15188
15189         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
15190
15191 2005-03-07  Bruno Haible  <bruno@clisp.org>
15192
15193         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
15194
15195 2005-03-04  Derek R. Price  <derek@ximbiot.com>
15196
15197         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
15198         (func_import): Only replace files via --import when they have actually
15199         changed.
15200
15201 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15202
15203         * m4/mmap-anon.m4: New file.
15204         * m4/pagealign_alloc.m4: New file.
15205
15206 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15207             Bruno Haible  <bruno@clisp.org>
15208
15209         * modules/pagealign_alloc: New file.
15210         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
15211
15212 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15213             Bruno Haible  <bruno@clisp.org>
15214
15215         * lib/pagealign_alloc.h: New file.
15216         * lib/pagealign_alloc.c: New file.
15217
15218 2005-03-03  Bruno Haible  <bruno@clisp.org>
15219
15220         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
15221         Use an all-permissive copyright notice, recommended by RMS.
15222
15223 2005-03-02  Bruno Haible  <bruno@clisp.org>
15224
15225         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
15226         of AIX, the replacement has to be done only after <string.h> is
15227         included, therefore not in config.h. stpncpy.h does the replacement,
15228         and stpncpy.c uses it.
15229
15230 2005-03-02  Bruno Haible  <bruno@clisp.org>
15231
15232         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
15233         stpncpy.c uses it.
15234
15235 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15236
15237         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
15238         The workaround isn't strictly needed for POSIX conformance, and
15239         it's too much of a pain to configure and maintain.  We'll ask
15240         people to fix their kernels instead.
15241         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
15242         (NANOSLEEP_BUG_WORKAROUND): Remove.
15243         (xnanosleep): Remove the workaround.
15244
15245 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15246
15247         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
15248         Reported by Derek Price.
15249         (Include): Add "timespec.h".
15250
15251         * modules/xnanosleep (Depends-on): Remove gethrxtime.
15252
15253 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15254
15255         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
15256         to detect nanosleep bug.
15257
15258 2005-03-01  Bruno Haible  <bruno@clisp.org>
15259
15260         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
15261
15262 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
15263
15264         * modules/gethrxtime: New file.
15265         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
15266         (Depends-on): Add gethrxtime.
15267         (configure.ac): Add gl_XNANOSLEEP.
15268         (Makefile.am): Remove lib_SOURCES line.
15269
15270 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
15271
15272         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
15273         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
15274
15275 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
15276
15277         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
15278         * lib/timespec.h (gettime): Return void, since it always
15279         succeeds now.  All uses changed.
15280         * lib/gettime.c (gettime) Likewise.
15281         [HAVE_NANOTIME]: Prefer nanotime.
15282         Assume gettimeofday succeeds, as POSIX requires.
15283         Assime time () succeeds, since other code already does.
15284         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
15285         (timespec_subtract): Remove.
15286         (NANOSLEEP_BUG_WORKAROUND): New constant.
15287         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
15288         things considerably.  Use it only on GNU/Linux hosts, since the
15289         workaround shouldn't be needed elsewhere.
15290
15291 2005-02-24  Bruno Haible  <bruno@clisp.org>
15292
15293         * modules/gettext (Files): Add m4/glibc2.m4.
15294
15295 2005-02-24  Bruno Haible  <bruno@clisp.org>
15296
15297         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
15298         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
15299         * m4/progtest.m4:
15300         Update from GNU gettext 0.14.2.
15301         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
15302
15303 2005-02-24  Bruno Haible  <bruno@clisp.org>
15304
15305         * lib/localcharset.c: Update from GNU gettext 0.14.2.
15306         * lib/config.charset: Update from GNU gettext 0.14.2.
15307
15308 2005-02-24  Bruno Haible  <bruno@clisp.org>
15309
15310         * lib/gettext.h: Update from GNU gettext 0.14.2.
15311
15312 2005-02-23  Simon Josefsson  <jas@extundo.com>
15313
15314         * m4/iconvme.m4: New file.
15315
15316 2005-02-23  Jim Meyering  <jim@meyering.net>
15317
15318         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
15319         change.
15320         Thanks to Bruno Haible for catching it.
15321
15322 2005-02-22  Simon Josefsson  <jas@extundo.com>
15323
15324         * modules/iconvme: New file.
15325
15326         * MODULES.html.sh: Add iconvme.
15327
15328 2005-02-22  Simon Josefsson  <jas@extundo.com>
15329
15330         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
15331
15332 2005-02-22  Simon Josefsson  <jas@extundo.com>
15333
15334         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
15335
15336 2005-02-22  Jim Meyering  <jim@meyering.net>
15337
15338         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
15339         s/ifndef/ifdef/.
15340
15341 2005-02-20  Neil Conway  <neilc@samurai.com>
15342
15343         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
15344         returned by OSX/Darwin if the specified buffer is not large
15345         enough for the hostname.
15346
15347 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15348
15349         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
15350         pass it to _help, otherwise the latter coredumps trying to
15351         dereference state.root_argp.
15352
15353 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15354
15355         * modules/chdir-long (Depends-on): Add memrchr.
15356         * modules/memrchr (Files): Add lib/memrchr.h.
15357         (Include): "memrchr.h".
15358
15359 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15360
15361         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
15362
15363 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15364
15365         * lib/memrchr.h: New file.
15366         * lib/chdir-long.c: Include it.
15367         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
15368         Don't bother including stddef.h.
15369
15370 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
15371
15372         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
15373         inclusion.
15374         Include <sys/types.h>, for dev_t.
15375         (ME_DUMMY, ME_REMOTE): Move from here....
15376         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
15377         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
15378         Dmitry V. Levin.
15379         Include mountlist.h first, to test the interface.
15380
15381 2005-01-29  Bruno Haible  <bruno@clisp.org>
15382
15383         * lib/progname.c (program_name): Initialize.
15384         Needed when linking statically on MacOS X.
15385
15386 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
15387
15388         Sync from coreutils.
15389         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
15390         (Depends-on): Add c-strtod.
15391         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
15392
15393 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
15394
15395         Sync from coreutils.
15396         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
15397
15398         Remove files that are specific to coreutils.
15399         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
15400
15401 2005-01-28  Bruno Haible  <bruno@clisp.org>
15402
15403         * modules/javacomp: New file.
15404         * MODULES.html.sh (Java): Add javacomp.
15405
15406 2005-01-28  Bruno Haible  <bruno@clisp.org>
15407
15408         * m4/javacomp.m4: New file, from GNU gettext.
15409
15410 2005-01-28  Bruno Haible  <bruno@clisp.org>
15411
15412         * lib/javacomp.sh.in: New file, from GNU gettext.
15413         * lib/javacomp.h: New file, from GNU gettext.
15414         * lib/javacomp.c: New file, from GNU gettext.
15415
15416 2005-01-26  Simon Josefsson  <jas@extundo.com>
15417
15418         * lib/gai_strerror.c: Use GPL in header.
15419
15420 2005-01-26  Bruno Haible  <bruno@clisp.org>
15421
15422         * modules/javaexec: New file.
15423         * MODULES.html.sh (Java): Add javaexec.
15424
15425 2005-01-26  Bruno Haible  <bruno@clisp.org>
15426
15427         * m4/javaexec.m4: New file, from GNU gettext.
15428
15429 2005-01-26  Bruno Haible  <bruno@clisp.org>
15430
15431         * lib/javaexec.sh.in: New file, from GNU gettext.
15432         * lib/javaexec.h: New file, from GNU gettext.
15433         * lib/javaexec.c: New file, from GNU gettext.
15434
15435 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15436
15437         * modules/lchown (Depends-on): Remove lchown.h
15438
15439 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15440
15441         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
15442         must be defined if the header file was not found, in order
15443         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
15444
15445 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15446
15447         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
15448         initializers for struct pentry_state.
15449         (__argp_error): Check return value of __asprintf
15450         (__argp_failure): Translate error message
15451
15452         * lib/argp-parse.c: Removed braces around the expansion of N_()
15453
15454 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
15455
15456         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
15457         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
15458         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
15459         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
15460         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
15461         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
15462         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
15463         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
15464         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
15465         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
15466         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
15467         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
15468         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
15469         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
15470         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
15471         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
15472         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
15473         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
15474         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
15475         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
15476         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
15477         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
15478         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
15479         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
15480         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
15481         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
15482         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
15483         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
15484         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
15485         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
15486         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
15487         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
15488         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
15489         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
15490         xstrtol.m4, xstrtoumax.m4, yesno.m4:
15491         Use an all-permissive copyright notice, recommended by RMS.
15492
15493 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
15494
15495         * modules/chdir-long (Depends-on): Remove mempcpy.
15496
15497 2005-01-21  Jim Meyering  <jim@meyering.net>
15498
15499         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
15500         same value as for Solaris 9.
15501
15502         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
15503         component length.  This included changing the parameter to be
15504         of type `char *' rather than `char const *'.
15505         * lib/chdir-long.h (chdir_long): Update prototype.
15506
15507         * lib/openat.c (fdopendir, fstatat): New functions.
15508         * lib/openat.h: Include headers required for use of DIR and struct
15509         stat.
15510         [AT_SYMLINK_NOFOLLOW]: Define.
15511         (fdopendir, fstatat): Add prototypes.
15512
15513 2005-01-21  Bruno Haible  <bruno@clisp.org>
15514
15515         * modules/classpath: New file.
15516         * MODULES.html.sh (Java): Add classpath.
15517
15518 2005-01-21  Bruno Haible  <bruno@clisp.org>
15519
15520         * lib/classpath.h: New file, from GNU gettext.
15521         * lib/classpath.c: New file, from GNU gettext.
15522
15523 2005-01-20  Simon Josefsson  <jas@extundo.com>
15524
15525         * modules/version-etc-fsf: New file.
15526
15527 2005-01-20  Simon Josefsson  <jas@extundo.com>
15528
15529         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
15530         * lib/version-etc.c: Remove version_etc_copyright.
15531         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
15532         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
15533
15534 2005-01-20  Simon Josefsson  <jas@extundo.com>
15535
15536         * lib/base64.h (isbase64): Add.
15537
15538         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
15539         using a unsigned prototype, don't inline.
15540         (base64_decode): Use it.
15541
15542 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15543
15544         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
15545         it.
15546
15547 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15548
15549         * lib/save-cwd.c (save_cwd): Remove code to support the case
15550         where fchdir is missing or flaky.
15551
15552 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15553
15554         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
15555
15556 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
15557
15558         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
15559         AC_LIBSOURCES now does this.
15560         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
15561         with new ullong_max module.
15562
15563 2005-01-19  Bruno Haible  <bruno@clisp.org>
15564
15565         * modules/sh-quote: New file.
15566         * MODULES.html.sh (Executing programs): Add sh-quote.
15567
15568 2005-01-19  Bruno Haible  <bruno@clisp.org>
15569
15570         * lib/sh-quote.h: New file, from GNU gettext.
15571         * lib/sh-quote.c: New file, from GNU gettext.
15572
15573 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
15574
15575         Merge from coreutils.
15576         * m4/ullong_max.m4: New file.
15577         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
15578         (gl_MACROS): Assume localeconv exists.
15579
15580 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
15581
15582         Merge changes from coreutils, as described below in several
15583         changelogs dated today.
15584
15585         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
15586         (O_DIRECTORY): Remove; not needed here, since "." must be
15587         a directory.  All uses removed.
15588         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
15589         universal on Suns, and we also need to test for IRIX.
15590         Revamp code to use 'if' rather than '#if'.
15591         Avoid unnecessary comparison of cwd->desc to 0.
15592
15593         * lib/utimens.c (futimens): Robustify the previous patch, by checking
15594         for known valid error numbers rather than observed invalid ones.
15595
15596 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
15597
15598         * modules/ullong_max: New file.
15599
15600         * modules/chdir-long, modules/openat: New files.
15601         * modules/save-cwd (Depends-on): Depend on chdir-long.
15602         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
15603
15604 2005-01-18  Jim Meyering  <jim@meyering.net>
15605
15606         Merge from coreutils.
15607         * m4/chdir-long.m4, m4/openat.m4: New files.
15608         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
15609         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
15610         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
15611         is sane and DOES follow symlinks.  Besides, testing 20 different
15612         systems found no broken chown implementations.
15613         Prompted by a change in rsync's copy of this macro.
15614         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
15615
15616         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
15617
15618         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
15619         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
15620         NULL-means-set-to-current-time semantics.
15621         Remove temporary file immediately, rather than waiting
15622         for configure's at-exit trap code to do it.
15623
15624 2005-01-18  Jim Meyering  <jim@meyering.net>
15625
15626         * lib/version-etc.c (version_etc_copyright): Update copyright date.
15627
15628         * lib/utimens.c (futimens): Account for the fact that futimes
15629         can also fail with errno == ENOSYS or errno == ENOENT.
15630         Patch from Dmitry V. Levin.
15631
15632         Change the name of the robust chdir function from chdir to chdir_long.
15633         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
15634         (restore_cwd): Use chdir_long, not chdir.
15635         * lib/chdir-long.c: Renamed from chdir.c.
15636         * lib/chdir-long.h: Renamed from chdir.h.
15637         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
15638         Hurd.
15639
15640 2005-01-18  Bruno Haible  <bruno@clisp.org>
15641
15642         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
15643         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
15644         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
15645         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
15646         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
15647         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
15648         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
15649         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
15650         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
15651         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
15652         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
15653         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
15654         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
15655         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
15656         Use an all-permissive copyright notice, recommended by RMS.
15657
15658 2005-01-18  Bob Proulx  <bob@proulx.com>
15659
15660         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
15661         simplify offsetof() macro construct to avoid compile failure with
15662         native HP-UX 11.0 ANSI C compiler.
15663
15664 2005-01-17  Bruno Haible  <bruno@clisp.org>
15665
15666         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
15667         redundant because stpncpy.m4 takes care of it.
15668
15669 2005-01-17  Bruno Haible  <bruno@clisp.org>
15670
15671         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
15672
15673 2005-01-17  Bruno Haible  <bruno@clisp.org>
15674
15675         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
15676         used.
15677
15678 2005-01-17  Bruno Haible  <bruno@clisp.org>
15679
15680         * lib/fwriteerror.h (fwriteerror): Change specification to include
15681         fclose.
15682         * lib/fwriteerror.c: Include <stdbool.h>.
15683         (fwriteerror): At the end, close the file stream. Record whether
15684         stdout was already closed.
15685
15686 2005-01-17  Bruno Haible  <bruno@clisp.org>
15687
15688         * lib/execute.c (environ): Declare if needed.
15689         * lib/pipe.c (environ): Likewise.
15690         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
15691
15692 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15693
15694         * modules/argp: Depend on vsnprintf
15695
15696 2005-01-10  Jim Meyering  <jim@meyering.net>
15697
15698         * modules/closeout (Depends-on): Add atexit.
15699
15700 2005-01-06  Bruno Haible  <bruno@clisp.org>
15701
15702         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
15703
15704 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
15705
15706         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
15707         definitions to be after all include files, to avoid collisions.
15708         Problem reported by Bob Proulx.
15709
15710 2005-01-04  Jim Meyering  <jim@meyering.net>
15711
15712         Changes imported from coreutils.
15713         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
15714         as the mkstemp template, use a temporary directory and an
15715         8.3-friendly template to avoid trouble on systems like DJGPP.
15716         Reported by Juan M. Guerrero via Stepan Kasal.
15717         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
15718         close. Remove the temporary directory right away, rather than waiting
15719         for configure's at-exit trap code to do it.
15720         Suggestion from Stepan Kasal.
15721
15722 2005-01-01  Simon Josefsson  <jas@extundo.com>
15723
15724         * gnulib-tool: Print #include directives when --import'ing.
15725
15726 2004-12-28  Simon Josefsson  <jas@extundo.com>
15727
15728         * tests/test-base64.c: Include required header files.  Remove
15729         unused variables.
15730
15731 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
15732
15733         * modules/error (Depends-on): Remove gettext.
15734
15735 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
15736
15737         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
15738         not needed.  This removes a dependency on the gettext module.
15739         [defined _LIBC]: Do not include <libintl.h>; not needed.
15740
15741 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
15742
15743         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
15744         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
15745
15746 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
15747
15748         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
15749         HAVE_DECL_STRTOLD.
15750
15751 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15752
15753         * modules/getdate (Depends-on): Remove alloca-opt.
15754
15755 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15756
15757         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
15758
15759 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15760
15761         * lib/argp-parse.c: Include <stddef.h>.
15762         (alignof, alignto): New macros.
15763         (parser_init): Don't assume that void * is aligned sufficiently
15764         for struct option.
15765
15766         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
15767         need to extend the stack.
15768         (YYINITDEPTH): New macro, so that the initial stack isn't overly
15769         large.
15770
15771 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15772
15773         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
15774
15775 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
15776
15777         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
15778         (2004-10-24) change.  Apparently this was a false alarm.
15779
15780         * modules/getdate: Depend on alloca-opt, not alloca.
15781
15782 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
15783
15784         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
15785         Remove now-obsolete comment about AIX.
15786         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
15787         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
15788         (YYMAXDEPTH): New macro.
15789
15790 2004-12-18  Simon Josefsson  <jas@extundo.com>
15791
15792         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
15793
15794 2004-12-18  Bruno Haible  <bruno@clisp.org>
15795
15796         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
15797
15798 2004-12-18  Bruno Haible  <bruno@clisp.org>
15799
15800         * lib/fatal-signal.c (fatal_signals): Make non-const.
15801         (init_fatal_signals): New function.
15802         (uninstall_handlers, install_handlers): Ignore signals that were set to
15803         SIG_IGN.
15804         (at_fatal_signal): Call init_fatal_signals.
15805         (init_fatal_signal_set): Likewise. Ignore signals that were set to
15806         SIG_IGN.
15807         Reported by Paul Eggert.
15808
15809 2004-12-18  Bruno Haible  <bruno@clisp.org>
15810
15811         * doc/alloca.texi: New file.
15812         * doc/alloca-opt.texi: New file.
15813
15814 2004-12-17  Jim Meyering  <jim@meyering.net>
15815
15816         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
15817         Otherwise, install-sh could exit with improper exit status when
15818         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
15819
15820 2004-12-16  Simon Josefsson  <jas@extundo.com>
15821
15822         * tests/test-base64.c: Add license.
15823
15824 2004-12-15  Stepan Kasal  <address@hidden>
15825
15826         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
15827
15828 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
15829
15830         * modules/getcwd (Files): Add m4/d-ino.m4.
15831         Suggested by Mark D. Baushke.
15832
15833 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
15834
15835         * lib/getdate.y (textint): New member "negative".
15836         (time_zone_hhmm): New function.
15837         Expect 14 shift-reduce conflicts, not 13.
15838         (o_colon_minutes): New rule.
15839         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
15840         (yylex): Set the "negative" member of signed numbers.
15841
15842 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
15843
15844         * doc/getdate.texi (Time of day items, Time zone items):
15845         Describe new formats +00:00, UTC+00:00.
15846
15847 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
15848
15849         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
15850         spurious "-l"s.  Problem reported by Stepan Kasal.
15851
15852 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
15853
15854         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
15855         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
15856
15857 2004-12-04  Simon Josefsson  <jas@extundo.com>
15858
15859         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
15860         Vandoorselaere <yoann@prelude-ids.org>.
15861
15862 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15863
15864         Changes imported from coreutils.
15865         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
15866         exist.
15867         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
15868
15869 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15870
15871         Changes imported from coreutils.
15872         * lib/hard-locale.c: Assume <locale.h> exists.
15873         Include "strdup.h".
15874         (GLIBC_VERSION): New macro.
15875         (hard_locale): Assume setlocale exists.
15876         Rewrite to avoid #ifdef.
15877         Use strdup rather than malloc + strcpy.
15878         * lib/human.c: Assume <locale.h> exists.
15879         (human_readable): Assume localeconv exists.
15880
15881 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15882
15883         * modules/hard-locale (Depends-on): Add strdup.
15884
15885 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
15886
15887         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
15888         convert T2, not T.  (Imported from libc.)
15889
15890 2004-11-30  Simon Josefsson  <jas@extundo.com>
15891
15892         * modules/restrict (License): Change to LGPL.
15893
15894 2004-11-30  Simon Josefsson  <jas@extundo.com>
15895
15896         * m4/restrict.m4: Add copyright and copying conditions.
15897
15898 2004-11-30  Simon Josefsson  <jas@extundo.com>
15899
15900         * m4/base64.m4: New file.
15901
15902 2004-11-30  Simon Josefsson  <jas@extundo.com>
15903
15904         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
15905         base64.
15906
15907         * tests/test-base64.c: New file.
15908
15909         * modules/base64: New file.
15910
15911 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
15912
15913         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
15914         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
15915
15916         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
15917
15918 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
15919
15920         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
15921         (__getcwd.c): Don't restore errno; glibc doesn't.
15922         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
15923         first, falling back to our code only if its results look suspicious.
15924         Ensure that the resulting buffer is only as large as necessary.
15925
15926         * lib/readutmp.c: Include readutmp.h first.
15927         Include <errno.h>, since readutmp.h no longer does that.
15928         * lib/readutmp.h: Don't include <errno.h>,
15929         <sys/param.h>, <time.h>; not needed to establish interface.
15930         (errno): Remove decl.
15931         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
15932         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
15933         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
15934
15935 2004-11-28  Simon Josefsson  <jas@extundo.com>
15936
15937         * lib/base64.h, base64.c: New file.
15938
15939 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
15940
15941         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
15942
15943 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
15944
15945         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
15946         (Depends-on): Remove pathmax, same.  Add mempcpy.
15947         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
15948         (Makefile.am): Append getcwd.h to lib_SOURCES.
15949         (Include): Add getcwd.h.
15950         (Maintainer): Change from Jim Meyering to "all, glibc",
15951         since getdate now uses intended-for-glibc code.
15952         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
15953         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
15954
15955 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
15956
15957         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
15958         HP's ANSI C compiler.
15959         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
15960         Declaring int functions causes warnings on some modern systems and
15961         shouldn't be needed to compile on ancient ones.
15962         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
15963         defined.
15964
15965         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
15966         with the following changes.
15967         (__set_errno): Parenthesize properly.
15968         Include <stdbool.h>.
15969         (MIN, MAX, MATCHING_INO): New macros.
15970         (__getcwd): Define with prototype, not K&R form.
15971         Use heuristics to allocate default buffer on stack if possible.
15972         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
15973         behavior, and to avoid the PATH_MAX limit when computing
15974         ../../../../...
15975         Use MATCHING_INO to compare inode number to file.
15976         Check for arithmetic overflow in size calculations.
15977         Fix bug in reallocation of dot array that caused getcwd to fail
15978         on directories nested deeper than 75.
15979         Be more careful about saving errno on error.
15980         Do not use realloc; use only free+malloc, as this is a bit
15981         more flexible and avoids a needless copy operation.
15982         Do not inspect st_dev and st_ino for symbolic links; POSIX
15983         doesn't specify the latter.
15984         Check for closedir errors.
15985         Avoid needless casts.
15986         Use "#ifdef weak_alias" around weak_alias, to be like other
15987         glibc code.
15988         The following changes to getcwd.c have effect only when used in
15989         gnulib; they have no effect inside glibc proper.
15990         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
15991         as alloca isn't used.
15992         (alloca, __alloca): Likewise.
15993         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
15994         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
15995         unconditionally, as gnulib assumes C89 or better.
15996         Do not include <sys/param.h>.
15997         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
15998         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
15999         better.
16000         (NULL) [!defined NULL]: Remove; we assume C89 or better.
16001         Include <dirent.h> in a way that is compatible with modern Autoconf.
16002         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
16003         New macros, if not already defined.
16004         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
16005         Use "_LIBC", not "defined _LIBC", for consistency.
16006         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
16007         a mempcpy module.
16008         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
16009         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
16010         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
16011         credit only to Jim Meyering and adjust the copyright dates.
16012         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
16013         <stdlib.h>, <unistd.h>, "pathmax.h".
16014         Instead, include "xgetcwd.h" (first) and "getcwd.h".
16015         (INITIAL_BUFFER_SIZE): Remove.
16016         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
16017
16018 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
16019
16020         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
16021         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
16022         Use the _ONCE methods, for efficiency.
16023         Check for fcntl.h.  In test program, include <errno.h>
16024         and <fcntl.h> if available.  Remove old K&R cruft from
16025         test program.  Check for common errors in GNU/Linux,
16026         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
16027         don't do AC_LIBOBJ, as that's getcwd.m4's job.
16028         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
16029         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
16030         name accordingly.
16031         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
16032         accommodate new getcwd.c.
16033         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
16034         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
16035         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
16036         that's all we need now.
16037
16038 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16039
16040         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
16041         argp-parse.c depends on getopt internals, that means we should
16042         always use our getopt, to be on the safe side.
16043         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
16044         order not to spoil the result of an eventual previous invocation
16045         of gl_GETOPT_SUBSTITUTE.
16046
16047 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16048
16049         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
16050         redefinition warnings. To avoid them, include the defines
16051         in `#if !defined __need_getopt ... #endif'. The only place
16052         where __getopt_argv_const is used is in definitions
16053         of getopt_long and getopt_long_only below, which are as well
16054         protected by `#ifndef __need_getopt'.
16055         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
16056         __need_getopt after including <stdio.h> and <unistd.h> These
16057         headers might have defined it.
16058
16059 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
16060
16061         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
16062
16063 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
16064
16065         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
16066         (futimens): New function, which uses futimes if available.
16067         (futimens, utimens): Support timespec==NULL, with same semantics
16068         as utime and utimens.
16069         * lib/utimens.h (futimens): New decl.
16070
16071 2004-11-23  Jim Meyering  <jim@meyering.net>
16072
16073         * lib/getopt_.h: Remove trailing blanks.
16074
16075 2004-11-23  Jim Meyering  <jim@meyering.net>
16076
16077         * lib/__fpending.c: Add comment.
16078
16079 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
16080
16081         * modules/canonicalize (Depends-on): Add xreadlink.
16082         Problem reported by James Youngman.
16083
16084 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
16085
16086         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
16087         New macros.
16088         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
16089         optopt): Use them instead of invoking ## directly; otherwise, the
16090         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
16091
16092 2004-11-19  Bruno Haible  <bruno@clisp.org>
16093
16094         * lib/strtok_r.c: Move comments from here...
16095         * lib/strtok_r.h: ... to here.
16096
16097 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
16098
16099         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
16100         implementations that mishandle size_t overflow.
16101
16102 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
16103
16104         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
16105         might fail.  Problem reported by Yoann Vandoorselaere.
16106         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
16107         implementations that mishandle size_t overflow.
16108
16109 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16110
16111         * modules/canon-host (Depends-on): Add strdup.
16112
16113 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16114
16115         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
16116
16117 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16118
16119         * lib/canon-host.c: Include "strdup.h".
16120         (canon_host): Use getaddrinfo if available, so that IPv6 works.
16121         Use strdup instead of malloc/strcpy to duplicate strings.
16122
16123         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
16124         (human_space_before_unit): New constant.
16125         * lib/human.c (human_readable): Support it.
16126
16127         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
16128         (xgetcwd): Set errno correctly when failing.
16129         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
16130         the failure is actually due to a PATH_MAX problem.
16131
16132         Further getopt changes to make it more likely that glibc will
16133         buy the changes back.
16134         * lib/getopt.c (POSIXLY_CORRECT): New constant.
16135         (getopt): Use it, so to preserve glibc semantic
16136         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
16137         when compiling for libc.
16138         * lib/getopt_.h (__getopt_argv_const): Bring it back.
16139         (getopt_long, getopt_long_only): Use it.
16140
16141         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
16142         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
16143         (getopt): Argv is now char * const *, as per standard.
16144         (_getopt_internal_r, _getopt_internal): Argv is now char **,
16145         not char *__getopt_argv_const *.
16146         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
16147         _getopt_long_only_r): Likewise.
16148         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
16149         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
16150         _getopt_long_r, _getopt_long_only_r): Likewise.
16151         * lib/getopt_.h (__getopt_argv_const): Remove.
16152         (getopt): Argv is now char * const *, as per standard.
16153
16154         * lib/getdate.y (tORDINAL): New token.
16155         (day, relunit): Allow it for relative times.
16156         (relative_time_table): Use tORDINAL for ordinals.
16157
16158 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16159
16160         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
16161         Document that "second" isn't allowed as an ordinal number.
16162
16163 2004-11-16  Jim Meyering  <jim@meyering.net>
16164
16165         * modules/closeout (Depends-on): Add fpending.
16166
16167 2004-11-15  Jim Meyering  <jim@meyering.net>
16168
16169         * lib/closeout.c: Include "__fpending.h" once again.
16170         Include <stdbool.h>.
16171         (close_stdout): Don't fail just because stdout was closed initially,
16172         since some programs don't write to stdout in the normal course of
16173         operation (other than --version and --help), and we don't want this
16174         function to make e.g. `touch file >&-' fail.
16175         But do fail if it was closed and someone has tried to write to it.
16176         E.g., `printf foo >&-' must fail.
16177
16178 2004-11-13  Jim Meyering  <jim@meyering.net>
16179
16180         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
16181
16182 2004-11-12  Simon Josefsson  <jas@extundo.com>
16183
16184         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
16185         small doc fix is still pending.
16186
16187 2004-11-11  Simon Josefsson  <jas@extundo.com>
16188
16189         * modules/strtok_r: New file.
16190
16191         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16192         strtok_r.
16193
16194 2004-11-11  Simon Josefsson  <jas@extundo.com>
16195
16196         * m4/strtok_r.m4: New file.
16197
16198         * m4/getopt.m4: Replace opterr.
16199
16200 2004-11-11  Simon Josefsson  <jas@extundo.com>
16201
16202         * lib/strtok_r.h, strtok_r.c: New file.
16203
16204 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
16205
16206         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
16207         of replacing opterr, getopt, etc.  This should handle the
16208         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
16209
16210 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
16211
16212         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
16213         we can stop lying to compilers about the constness of argv when we
16214         are compiled outside glibc.
16215         (getopt, getopt_long, getopt_long_only): Use it.
16216         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
16217         _getopt_internal, getopt): Likewise.
16218         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
16219         _getopt_long_only_r): Likewise.
16220         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
16221         _getopt_long_r, _getopt_long_only_r): Likewise.
16222
16223         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
16224         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
16225         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
16226         the other external symbols.
16227         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
16228         declaration, since the above renaming now works around collisions.
16229
16230 2004-11-11  Jim Meyering  <jim@meyering.net>
16231
16232         * lib/linebreak.c: Remove trailing blanks.
16233         * lib/alloca_.h: Likewise.
16234         * lib/acosl.c: Likewise.
16235         * lib/euidaccess.c: Likewise.
16236         * lib/allocsa.h: Likewise.
16237
16238 2004-11-10  Simon Josefsson  <jas@extundo.com>
16239
16240         * m4/getaddrinfo.m4: New file.
16241
16242 2004-11-10  Simon Josefsson  <jas@extundo.com>
16243
16244         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
16245
16246 2004-11-10  Simon Josefsson  <jas@extundo.com>
16247
16248         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16249         getaddrinfo.
16250
16251         * modules/getaddrinfo: New file.
16252
16253 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16254
16255         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
16256
16257 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16258
16259         * lib/mktime.c (SHR): New macro, which is a portable
16260         substitute for >> that should work even on Crays.
16261         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
16262         Problem reported by Mark D. Baushke in
16263         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
16264         * lib/getdate.y (SHR): Likewise.
16265         (tm_diff): Use it.
16266         * lib/strftime.c (SHR): Likewise.
16267         (tm_diff): Use it.
16268         * lib/quotearg.c (struct quoting_options): Use unsigned int for
16269         quote_these_too, so that right shifts are well defined.  All uses
16270         changed.
16271
16272 2004-11-10  Jim Meyering  <jim@meyering.net>
16273
16274         Ensure that no close failure goes unreported.
16275         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
16276         return early when it seems there's nothing to flush.
16277         Don't include __fpending.h.
16278
16279 2004-11-10  Jim Meyering  <jim@meyering.net>
16280
16281         * modules/closeout (Depends-on): Remove fpending.
16282
16283 2004-11-10  Jim Meyering  <jim@meyering.net>
16284
16285         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
16286
16287 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
16288
16289         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
16290         gl_FUNC_STRFTIME.
16291         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
16292         and AC_REQUIRE when possible, to avoid duplicate checks.
16293         Check for <wchar.h>.
16294
16295 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
16296
16297         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
16298
16299 2004-11-09  Bruno Haible  <bruno@clisp.org>
16300
16301         * m4/sockpfaf.m4: New file.
16302
16303 2004-11-05  Bruno Haible  <bruno@clisp.org>
16304
16305         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
16306         Reported by Mark D. Baushke <mdb@cvshome.org>.
16307
16308 2004-11-04  Bruno Haible  <bruno@clisp.org>
16309
16310         2004-09-11  Bruno Haible  <bruno@clisp.org>
16311                 * allocsa.valgrind: New file.
16312         2004-02-06  Bruno Haible  <bruno@clisp.org>
16313                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
16314                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
16315                 Reported by Christopher Seip <chris.seip@hp.com>.
16316
16317 2004-11-04  Bruno Haible  <bruno@clisp.org>
16318
16319         * modules/allocsa (Files): Add lib/allocsa.valgrind.
16320         (Makefile.am): Distribute it.
16321
16322 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
16323
16324         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
16325         with errno == ERANGE if the buffer is too small.
16326         Problem reported by Mark D. Baushke.
16327
16328 2004-11-03  Albert Chin  <china@thewrittenword.com>
16329             Paul Eggert  <eggert@cs.ucla.edu>
16330
16331         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
16332         equivalent, substitute $ac_type for equivalent type rather than
16333         blindly using uint32_t *always* which won't work if uint32_t is not
16334         available.  Define _UINT32_T to work around typedef of uint32_t if
16335         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
16336         2.5.1.
16337
16338 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16339
16340         * m4/jm-macros.m4: Sync from coreutils.
16341         (gl_MACROS): Check for mbrlen, for pathchk.
16342         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
16343
16344 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16345
16346         * lib/xreadlink.c (MAXSIZE): New macro.
16347         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
16348         size does not exceed MAXSIZE.  Avoid cast.
16349         As suggested by Mark D. Baushke in
16350         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
16351         if readlink fails with buffer size just under MAXSIZE, try again
16352         with MAXSIZE.
16353
16354 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16355
16356         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
16357
16358 2004-11-02  Derek R. Price  <derek@ximbiot.com>
16359         and  Paul Eggert  <eggert@cs.ucla.edu>
16360
16361         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
16362         (get_date): Overparenthesize to avoid GCC warning.
16363
16364 2004-11-02  Bruno Haible  <bruno@clisp.org>
16365
16366         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
16367         returns void.
16368
16369 2004-11-02  Bruno Haible  <bruno@clisp.org>
16370
16371         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
16372         function returns void.
16373
16374 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
16375
16376         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
16377         fflush_unlocked, flockfile, funlockfile, funlockfile,
16378         fputs_unlocked, putc_unlocked.
16379
16380 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
16381
16382         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
16383         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
16384         already declared.
16385
16386 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16387
16388         * modules/getdate (Files): Add doc/getdate.texi.
16389         (Depends-on): Add setenv, xalloc.
16390
16391 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16392
16393         * lib/getdate.y: Add support for TZ="foo" within a date string.
16394         Fix some bugs near time_t boundaries.  Reject dates with
16395         out-of-range components, e.g., "Sept 31".
16396         Include <stdlib.h>, "setenv.h", "xalloc.h".
16397         (ISDIGIT_LOCALE): Remove; unused.
16398         Note that the TZ and time functions used here are not reentrant.
16399         (mktime_ok, get_tz): New functions.
16400         (TZBUFSIZE): New constant.
16401         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
16402         This requires that we sometimes generate our own TZ="XXX..." setting.
16403
16404 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16405
16406         * doc/getdate.texi: New file, from coreutils with modifications for
16407         the new TZ parsing.
16408
16409 2004-10-27  Derek R. Price  <derek@ximbiot.com>
16410
16411         * lib/mktime.c (not_equal_tm): Remove redundant check.
16412
16413 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
16414
16415         * modules/regex (lib_SOURCES): Add regex.c.
16416         Reported by James Youngman in
16417         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
16418
16419 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
16420
16421         * lib/getdate.y: Use Bison 1.875 features, and some minor
16422         code cleanups.  This change does not affect semantics.
16423         Don't include <stdlib.h>; no longer needed.
16424         Don't include unlocked-io.h; only the "#if TEST" code uses
16425         stdio, and performance isn't crucial there.
16426         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
16427         Bison 1.875 features as described below.
16428         All uses of "PC." replaced by "pc->".
16429         (YYSTYPE): Add a forward declaration.
16430         (yylex, yyerror): Use full prototypes in forward decls.
16431         Use "%pure-parser" rather than obsolescent "%pure_parser".
16432         Use %parse-param and %lex-param instead of obsolescent
16433         YYPARSE_PARAM and YYLEX_PARAM.
16434         (meridian_table, month_and_day_table, time_units_table,
16435         relative_time_table, time_zone_table, military_table,
16436         lookup_zone, lookup_word, get_date):
16437         Use NULL instead of 0 where appropriate.
16438         (to_hour): Avoid abort (), to avoid a dependency on
16439         stdlib.h.
16440         (yyerror, yylex): Now accepts parser_control * arg.
16441         (main) [TEST]: Use '\0' rather than 0 for char.
16442
16443 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
16444
16445         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
16446
16447 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
16448
16449         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
16450         It's now the caller's responsibility to handle the case where
16451         !HAVE_GETPAGESIZE && !defined getpagesize.
16452
16453         * lib/mktime.c (leapyear): Arg is long int, not int.
16454
16455 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
16456
16457         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
16458
16459 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
16460
16461         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
16462         missing.  Problem reported by James Youngman.
16463
16464 2004-10-16  Simon Josefsson  <jas@extundo.com>
16465
16466         * gnulib-tool: Fix comments.  Fix parse problem.
16467         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
16468
16469 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
16470
16471         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
16472         implementation of getopt_long.  Problem reported by Alexander Taler in:
16473         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
16474
16475 2004-10-15  Bruno Haible  <bruno@clisp.org>
16476
16477         * gnulib-tool: Untabify. Initialize supplied_libname.
16478         (func_usage): More homogenous output.
16479         (func_modules_transitive_closure, func_modules_to_filelist,
16480         func_emit_lib_Makefile_am): New functions.
16481         (func_import): New function, extracted from big case statement. Use
16482         func_get_license, func_modules_transitive_closure,
16483         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
16484         opt_lgpl. Don't use test -a, as it's not portable.
16485         (func_create_testdir): Use func_modules_transitive_closure,
16486         func_modules_to_filelist, func_emit_lib_Makefile_am.
16487
16488 2004-10-15  Bruno Haible  <bruno@clisp.org>
16489
16490         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
16491
16492 2004-10-15  Bruno Haible  <bruno@clisp.org>
16493
16494         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
16495         the portions belonging to each module.
16496         Suggested by Derek Robert Price <derek@ximbiot.com>.
16497
16498 2004-10-12  Simon Josefsson  <jas@extundo.com>
16499
16500         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
16501         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
16502         to real functions.
16503
16504 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16505
16506         * modules/vsnprintf: New file.
16507
16508 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16509
16510         * m4/vsnprintf.m4: New file.
16511
16512 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16513
16514         * lib/vsnprintf.h: New file.
16515         * lib/vsnprintf.c: New file.
16516
16517 2004-10-11  Bruno Haible  <bruno@clisp.org>
16518
16519         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
16520         vsnprintf.
16521
16522 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
16523
16524         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
16525
16526 2004-10-07  Bruno Haible  <bruno@clisp.org>
16527
16528         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
16529         fits into the provided buffer.
16530
16531 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
16532
16533         * lib/diacrit.c, diacrit.h: Add GPL notice.
16534
16535         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
16536         notice.
16537         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
16538         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
16539         This avoids a potential constant-folding bug.
16540
16541 2004-10-05  Bruno Haible  <bruno@clisp.org>
16542
16543         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
16544         for the declaration of strsep.
16545
16546 2004-10-05  Bruno Haible  <bruno@clisp.org>
16547
16548         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
16549
16550 2004-10-04  Simon Josefsson  <jas@extundo.com>
16551
16552         * modules/memmem: New file.
16553         * tests/test-memmem.c: New file.
16554         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
16555
16556 2004-10-04  Simon Josefsson  <jas@extundo.com>
16557
16558         * m4/memmem.m4: New file.
16559
16560 2004-10-04  Simon Josefsson  <jas@extundo.com>
16561
16562         * lib/memmem.h: New file.
16563         * lib/memmem.c: New file, taken from glibc.
16564
16565 2004-10-04  Simon Josefsson  <jas@extundo.com>
16566
16567         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
16568         '#ifdef USE_UNLOCKED_IO'.
16569
16570 2004-10-04  Simon Josefsson  <jas@extundo.com>
16571
16572         * config/srclist.txt: Add memmem from glibc.
16573
16574 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16575
16576         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
16577
16578         * modules/argmatch, modules/argp, modules/closeout, modules/error,
16579         modules/exclude, modules/getdate, modules/getline,
16580         modules/getndelim2, modules/getpass, modules/getpass-gnu,
16581         modules/getusershell, modules/linebuffer, modules/md5,
16582         modules/mountlist, modules/posixtm, modules/readtokens,
16583         modules/readutmp, modules/regex, modules/sha1,
16584         modules/version-etc, modules/yesno:
16585         Remove dependency on unlocked-io.
16586
16587 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16588
16589         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
16590
16591         * m4/unlocked-io.m4: Add copyright notice.
16592         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
16593
16594 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16595
16596         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
16597         * lib/xmalloc.c (xmemdup): Likewise.
16598         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
16599         XFREE): Remove these long-obsolescent macros.
16600         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
16601         * lib/xstrdup.c: Remove.
16602
16603         * lib/regex.c (re_comp): Cast gettext return value to char *,
16604         Problem reported by Martin Neitzel via Mark D. Baushke.
16605
16606 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16607
16608         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
16609         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
16610         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
16611         regex.c, sha1.c, version-etc.c, yesno.c:
16612         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
16613         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
16614         the includer's responsibility.
16615
16616         Sync from coreutils.
16617
16618         * lib/modechange.c (mode_compile): Don't decrement a pointer that
16619         points to the start of a string, as the C Standard says the
16620         resulting behavior is undefined.
16621
16622         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
16623         simple -> simple_backups, numbered_existing ->
16624         numbered_existing_backups, numbered -> numbered_backups
16625         to avoid shadowing problems.  All uses changed.
16626         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
16627         * lib/backupfile.c (check_extension, numbered_backup):
16628         Rename locals to avoid shadowing 'basename'.
16629         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
16630         once.
16631
16632         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
16633         * lib/.cvsignore: Add getopt.h.
16634
16635 2004-10-04  Bruno Haible  <bruno@clisp.org>
16636
16637         * modules/README: New file.
16638         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
16639         not a module.
16640
16641 2004-10-02  Jim Meyering  <jim@meyering.net>
16642
16643         * lib/dirfd.h, getpagesize.h: Add copyright notice.
16644
16645 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16646
16647         * modules/strsep: New file.
16648
16649 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16650
16651         * m4/strsep.m4: New file.
16652
16653 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16654
16655         * lib/strsep.h: New file.
16656         * lib/strsep.c: New file.
16657
16658 2004-10-01  Simon Josefsson  <jas@extundo.com>
16659
16660         * lib/snprintf.c (snprintf): Handle size==0.
16661
16662 2004-10-01  Simon Josefsson  <jas@extundo.com>
16663             Bruno Haible  <bruno@clisp.org>
16664
16665         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
16666         (snprintf): Declare 'args'.
16667
16668 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
16669
16670         * lib/snprintf.c: Remove comments as to why each header is needed.
16671
16672 2004-10-01  Bruno Haible  <bruno@clisp.org>
16673
16674         * MODULES.html.sh: Add strsep.
16675
16676 2004-09-30  Simon Josefsson  <jas@extundo.com>
16677
16678         * modules/snprintf: New file.
16679
16680 2004-09-30  Simon Josefsson  <jas@extundo.com>
16681
16682         * m4/snprintf.m4: New file.
16683
16684 2004-09-30  Simon Josefsson  <jas@extundo.com>
16685
16686         * lib/snprintf.h, lib/snprintf.c: New files.
16687
16688 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16689
16690         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
16691         (hol_entry_help): Never translate an empty string.
16692         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
16693         * lib/argp.h (OPTION_NO_TRANS): New option.
16694
16695 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16696
16697         * modules/argp (Maintainer): Replace Simon Josefsson
16698         by Sergey Poznyakoff.
16699
16700 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16701
16702         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
16703         changes merged back into glibc.
16704
16705 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16706
16707         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
16708
16709 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
16710
16711         * lib/xvasprintf.c: Include xalloc.h.
16712         (xvasprintf): Use xalloc_die, not xmalloc_die.
16713
16714 2004-09-29  Bruno Haible  <bruno@clisp.org>
16715
16716         * modules/alloca-opt: New file, derived from modules/alloca.
16717         * modules/allocsa: Depend on alloca-opt instead of alloca.
16718         * modules/setenv: Likewise.
16719         * modules/vasnprintf: Likewise.
16720         * MODULES.html.sh: Add alloca-opt.
16721
16722 2004-09-28  Simon Josefsson  <jas@extundo.com>
16723
16724         * gnulib-tool: New parameter --lgpl, to asseert that modules are
16725         LGPL, and to replace license template from GPL to LGPL.
16726
16727 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
16728
16729         * modules/dummy: Change license to LGPL.
16730
16731 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
16732
16733         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
16734
16735 2004-09-24  Simon Josefsson  <jas@extundo.com>
16736
16737         * modules/minmax (License): Change from GPL to LGPL.
16738
16739 2004-09-23  Simon Josefsson  <jas@extundo.com>
16740
16741         * gnulib-tool (--import): Typo.
16742
16743 2004-09-23  Simon Josefsson  <jas@extundo.com>
16744
16745         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
16746
16747 2004-09-22  Bruno Haible  <bruno@clisp.org>
16748
16749         * modules/*: Add 'License' field.
16750         * gnulib-tool: Accept --extract-license option.
16751         (func_get_license): New function.
16752
16753 2004-09-21  Bruno Haible  <bruno@clisp.org>
16754
16755         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
16756         Reported by Simon Josefsson.
16757
16758 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
16759
16760         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
16761         gl_AC_TYPE_LONG_LONG.
16762
16763 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
16764
16765         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
16766
16767 2004-09-18  Simon Josefsson  <jas@extundo.com>
16768         and  Paul Eggert  <eggert@cs.ucla.edu>
16769
16770         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
16771         calls with autoreconf.  Define GL_LIB.
16772
16773 2004-09-14  Karl Berry  <karl@gnu.org>
16774
16775         * config/srclist.txt: unsync setenv.c, sigh.
16776
16777 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
16778
16779         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
16780         Problem reported by Bruno Haible in:
16781         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
16782
16783 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
16784
16785         * config/srclist.txt: Comment out argp-pvh.c.
16786
16787 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
16788
16789         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
16790         in case some system header has #define'd it.  Problem reported by
16791         Soeren D. Schulze in
16792         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
16793
16794 2004-09-09  Karl Berry  <karl@gnu.org>
16795
16796         * regex.[ch]: delete from the root.  These were supposed to be
16797                 synced with emacs cvs, but this has not happened for about
16798                 a year, and anyway nothing else uses emacs regex.[ch].
16799                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
16800                 lib/regex[.ch] is untouched.
16801
16802 2004-09-09  Bruno Haible  <bruno@clisp.org>
16803
16804         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
16805
16806 2004-09-09  Bruno Haible  <bruno@clisp.org>
16807
16808         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
16809         modifications.
16810         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
16811
16812 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
16813
16814         * modules/xvasprintf: New file.
16815         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
16816
16817 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
16818
16819         * lib/xvasprintf.h: New file.
16820         * lib/xvasprintf.c: New file.
16821         * lib/xasprintf.c: New file.
16822
16823 2004-09-08  Bruno Haible  <bruno@clisp.org>
16824
16825         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
16826
16827 2004-09-08  Bruno Haible  <bruno@clisp.org>
16828
16829         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
16830         length is > INT_MAX.
16831         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
16832         more.
16833
16834 2004-09-08  Bruno Haible  <bruno@clisp.org>
16835
16836         * lib/stdint_.h: New file, taken from GNU clisp.
16837
16838 2004-09-08  Bruno Haible  <bruno@clisp.org>
16839             Oskar Liljeblad  <oskar@osk.mine.nu>
16840
16841         * modules/stdint: New file.
16842         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
16843
16844 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16845
16846         Import from coreutils.
16847         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
16848         strings on unbounded length.  alloca's performance benefits aren't
16849         that important here.
16850         (V_STRDUP): Remove.
16851         (parse_with_separator): New function, with most of the internals
16852         of the old parse_user_spec.  Allow user to omit both user and group,
16853         for compatibility with FreeBSD.
16854         Clone only the user name, not the entire spec.
16855         Do not set *uid, *gid unless entirely successful.
16856         Avoid memory leak in some failing cases.
16857         Fix regression for USER.GROUP reported by Dmitry V. Levin in
16858         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
16859         (parse_user_spec): Rewrite to use parse_with_separator.
16860
16861 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16862
16863         * modules/userspec: Don't depend on alloca.
16864
16865 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16866
16867         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
16868
16869 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
16870
16871         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
16872         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
16873         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
16874
16875 2004-08-16  Simon Josefsson  <jas@extundo.com>
16876
16877         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
16878         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
16879         Add --dry-run for --import.
16880         Let user provided command line parameters override configure.ac
16881         settings.
16882
16883 2004-08-12  Simon Josefsson  <jas@extundo.com>
16884
16885         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
16886         as discussed with Paul Eggert in threads rooted at
16887         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
16888         and
16889         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
16890         Before, the test was empty, and relied on ELIDE_CODE in source
16891         code.)
16892         (gl_PREREQ_GETOPT): New macro.
16893         (gl_GETOPT): Use them.
16894
16895 2004-08-12  Simon Josefsson  <jas@extundo.com>
16896
16897         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
16898         * lib/getopt_.h: Renamed from getopt.h.
16899
16900 2004-08-12  Simon Josefsson  <jas@extundo.com>
16901
16902         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
16903         Change default library name from libfoo to libgnu.
16904         Now, if you have a configure.ac that says:
16905                 gl_SOURCE_BASE(gl)
16906                 gl_M4_BASE(gl/m4)
16907                 gl_MODULES(error getopt etcetera)
16908                 gl_INIT
16909         you can import all you need by running:
16910                 ../gnulib/gnulib-tool --import
16911
16912         * modules/getopt (Files): Rename getopt.h to getopt_.h.
16913         (Makefile.am): Rewrite, use logic from argz.
16914         (Include): Use <getopt.h> instead of "getopt.h".
16915
16916 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16917
16918         * modules/argp (Files): Add m4/unlocked-io.m4.
16919         (Depends-on): Add extensions.
16920
16921 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16922
16923         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
16924         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
16925         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
16926         Check for program_invocation_name, program_invocation_short_name,
16927         flockfile, funlockfile, features.h, _getopt_long_only_r.
16928
16929 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16930
16931         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
16932         its complicated substitute.
16933         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
16934         and program_invocation_name.
16935         (__argp_basename) [!_LIBC]: Remove; the only use was
16936         replaced by its body.
16937         (__argp_short_program_name): Change condition from
16938         !defined __argp_short_program_name to
16939         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
16940         to match argp-namefrob.h.
16941         (__argp_failure): Don't assume strerror_r returns char *.
16942         * lib/argp-parse.c (N_): Define unconditionally.
16943         (argp_default_options): Fill out initializers with 0 to avoid
16944         gcc warnings.
16945
16946 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16947
16948         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
16949         getopt1.c.
16950
16951 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16952
16953         Merge from coreutils.
16954
16955         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
16956
16957         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
16958         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
16959
16960 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16961
16962         Merge from coreutils.
16963
16964         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
16965         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
16966         for Reliant Unix 5.43.
16967
16968         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
16969         (union fooround): Use uintmax_t, not long int.
16970         The rest is a merge from libc:
16971         [defined _LIBC]: Include <shlib-compat.h>.
16972         (_obstack) [defined _LIBC]: Remove after 2.3.4.
16973
16974         * lib/settime.c (settime): Recode to avoid warning with
16975         Sun Forte C 6U2.
16976
16977         * lib/strverscmp.c: Convert to UTF-8.
16978
16979 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16980
16981         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
16982         m4/uintmax_t.m4.
16983
16984 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
16985
16986         * modules/xalloc-die: New file.
16987         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
16988
16989         * modules/md5 (Files): Add m4/uint32_t.m4.
16990         * modules/sha1: Renamed from modules/sha.
16991         (Files):
16992         Rename lib/sha.h to lib/sha1.h.
16993         Rename lib/sha.c to lib/sha1.c.
16994         Rename m4/sha.m4 to m4/sha1.m4.
16995         (lib_SOURCES): Likewise.
16996         (configure.ac): Rename gl_SHA to gl_SHA1.
16997         (Include): sha.h -> sha1.h.
16998
16999 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
17000
17001         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
17002         * m4/sha1.m4: Renamed from sha.m4.
17003         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
17004
17005 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
17006
17007         * lib/obstack.h (obstack_empty_p):
17008         Don't assume that chunk->contents is suitably aligned.
17009         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
17010         Likewise. Problem reported by Benno in
17011         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
17012
17013         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
17014         readable.  This could be improved further but it'd take some work.
17015
17016 2004-08-08  Simon Josefsson  <jas@extundo.com>
17017
17018         * modules/xgethostname (Depends-on): Remove exit and error (not
17019         used).
17020
17021         * modules/getpass-gnu: Add getpass.h.
17022         (Depends-on): Add stdbool.
17023         * modules/getpass: Add getpass.h.
17024
17025 2004-08-08  Simon Josefsson  <jas@extundo.com>
17026
17027         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
17028         Check getpass declaration.
17029
17030 2004-08-08  Simon Josefsson  <jas@extundo.com>
17031
17032         * lib/xgethostname.c: Don't include error.h (not used).
17033
17034         * lib/getpass.h: Add.
17035         * lib/getpass.c: Include getpass.h first.
17036
17037 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
17038
17039         * lib/xalloc-die.c: New file.
17040         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
17041         All uses removed.
17042         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
17043         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
17044         xalloc-die.c.
17045         (_, N_, xalloc_die): Move to xalloc-die.c.
17046         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
17047         so that we needn't mess with xalloc_msg_memory_exhausted.
17048
17049         * lib/sha1.h: Renamed from sha.h.
17050         (SHA1_H): Renamed from _SHA_H.
17051         (sha1_ctx): Renamed from sha_ctx.
17052         (sha1_init_ctx): Renamed from sha_init_ctx.
17053         (sha1_process_block): Renamed from sha_process_block.
17054         (sha1_process_bytes): Renamed from sha_process_bytes.
17055         (sha1_finish_ctx): Renamed from sha_finish_ctx.
17056         (sha1_read_ctx): Renamed from sha_read_ctx.
17057         (sha1_stream): Renamed from sha_stream.
17058         (sha1_buffer): Renamed from sha_buffer.
17059         * lib/sha1.c: Likewise; renamed from sha.c.
17060         Do not include <sys/types.h>.
17061         Include <stddef.h> rather than <stdlib.h>.
17062
17063 2004-08-08  Bruno Haible  <bruno@clisp.org>
17064
17065         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
17066         FILESYSTEM_PREFIX_LEN.
17067         * lib/progreloc.c: Likewise.
17068         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
17069
17070 2004-08-06  Simon Josefsson  <jas@extundo.com>
17071
17072         * modules/progname (Depends-on): Don't depend on stdbool.
17073
17074 2004-08-06  Simon Josefsson  <jas@extundo.com>
17075
17076         * modules/getsubopt: New file.
17077         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
17078         getsubopt.
17079
17080 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
17081
17082         More merge from coreutils.
17083
17084         * m4/utimens.m4, m4/utimecmp.m4: New files.
17085         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
17086         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
17087         prereq.m4, sha.m4: Import changes from coreutils.
17088
17089 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
17090
17091         More merge from coreutils.
17092         * modules/raise, modules/readtokens0, modules/utimens:
17093         * modules/utimecmp, module/xnanosleep: New files.
17094         * modules/strftime: Add lib/strftime.h.
17095         Change include from <time.h> to "strftime.h".
17096         * modules/yesno: Add lib/yesno.h.
17097         * modules/backupfile: Remove lib/addext.c.
17098         * modules/euidaccess: Add stat-macros.h.
17099         * modules/canonicalize, modules/euidaccess,
17100         modules/filemode, modules/lchown, modules/makepath,
17101         modules/rmdir, modules/stat: Likewise.
17102
17103 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
17104
17105         Merge from tar.
17106         * lib/argp-help.c (make_hol, hol_append): Don't assume that
17107         SIZE_MAX is a valid preprocessor constant.
17108         (__argp_basename): Change from "#ifndef _LIBC"
17109         to "#ifndef __argp_short_program_name", so that
17110         we don't compile these functions for tar.
17111
17112         More merges from coreutils.
17113         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
17114         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
17115         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
17116         * lib/addext.c: Remove; no longer needed.
17117         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
17118         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
17119         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
17120         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
17121         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
17122         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
17123         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
17124         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
17125         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
17126         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
17127         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
17128         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
17129         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
17130         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
17131         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
17132         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
17133         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
17134         Import changes from coreutils.
17135
17136 2004-08-05  Simon Josefsson  <jas@extundo.com>
17137
17138         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
17139
17140 2004-08-05  Simon Josefsson  <jas@extundo.com>
17141
17142         * m4/getsubopt.m4: New file.
17143
17144 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17145
17146         Merge from coreutils.
17147
17148         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
17149         * m4/getcwd-path-max.m4: New files.
17150
17151         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
17152         FILESYSTEM_PREFIX_LEN ->
17153         FILE_SYSTEM_PREFIX_LEN.
17154         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
17155         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
17156         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
17157         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
17158
17159         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
17160         prerequisite modules now handle the DOS stuff.
17161         Don't check for unistd.h.
17162
17163 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17164
17165         Merge from coreutils.
17166
17167         * lib/.gdb-history: Remove; this doesn't belong here.
17168
17169         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
17170         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
17171         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
17172         * lib/getcwd.c: New files.
17173
17174         * lib/dirname.h: Include <stdbool.h>.
17175         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
17176         for consistency with POSIX terminology.  All uses changed.
17177         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
17178         (strip_trailing_slashes): Use bool for booleans.
17179         * lib/stripslash.c (strip_trailing_slashes): Likewise.
17180
17181         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
17182         sometimes returns a positive errno value even when it succeeds.
17183         (print_errno_message) [!LIBC]: Fall back on strerror if
17184         __strerror_r fails.
17185
17186         * lib/path-concat.c (mempcpy): Don't define if a system header defines
17187         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
17188         (longest_relative_suffix): New function.
17189         (path_concat): Use it.  Assume first argument is not NULL.
17190         Port to DOS.  Omit redundant separators.
17191         Report an error instead of returning NULL.
17192         Use mempcpy instead of memcpy.
17193         (xpath_concat): Remove: not declared or used.
17194
17195         * lib/same.h: Include <stdbool.h>
17196         (same_name): Return bool, not int.
17197         * lib/same.c (same_name): Likewise.
17198         (errno): Don't declare; we assume C89 or better now.
17199
17200         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
17201         if not already defined.
17202
17203         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
17204         * lib/dup-safer.c (errno): Likewise.
17205
17206 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17207
17208         Merge from coreutils.
17209         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
17210         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
17211         * modules/path-concat: Don't depend on strdup.
17212
17213 2004-08-03  Simon Josefsson  <jas@extundo.com>
17214
17215         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
17216         * lib/progname.h: Don't include stdbool.h.
17217
17218 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17219
17220         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
17221         * MODULES.html.sh (func_all_modules): Remove fatal.
17222
17223 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17224
17225         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
17226
17227 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17228
17229         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
17230         working.
17231
17232 2004-08-02  Simon Josefsson  <jas@extundo.com>
17233
17234         * lib/getsubopt.h: New file, with comments from Bruno Haible.
17235         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
17236         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
17237
17238 2004-08-01  Simon Josefsson  <jas@extundo.com>
17239
17240         * lib/xgetdomainname.c: Include stdlib.h, for free().
17241
17242 2004-07-19  Bruno Haible  <bruno@clisp.org>
17243
17244         * MODULES.html.sh (func_all_modules): Add dummy.
17245
17246 2004-07-16  Simon Josefsson  <jas@extundo.com>
17247
17248         * modules/dummy: New file.
17249
17250 2004-07-16  Simon Josefsson  <jas@extundo.com>
17251
17252         * lib/dummy.c: New file.
17253
17254 2004-07-16  Bruno Haible  <bruno@clisp.org>
17255
17256         * lib/backupfile.h: Add extern "C" for C++.
17257         * lib/closeout.h: Likewise.
17258         * lib/copy-file.h: Likewise.
17259         * lib/findprog.h: Likewise.
17260         * lib/full-write.h: Likewise.
17261         * lib/pathname.h: Likewise.
17262         * lib/progname.h: Likewise.
17263         * lib/stpcpy.h: Likewise.
17264         * lib/stpncpy.h: Likewise.
17265         * lib/strcase.h: Likewise.
17266         * lib/strstr.h: Likewise.
17267         * lib/xalloc.h: Likewise.
17268
17269         * lib/mbswidth.h: Add extern "C" for C++.
17270         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
17271
17272 2004-07-13  Robert Millan  <robertmh@gnu.org>
17273
17274         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
17275
17276 2004-07-09  Simon Josefsson  <jas@extundo.com>
17277
17278         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
17279         failed without this.)
17280
17281 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
17282
17283         * modules/chown (Files): Add lib/fchown-stub.c, since
17284         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
17285
17286 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
17287
17288         * lib/fchown-stub.c: New file.
17289
17290 2004-06-24  Jim Meyering  <jim@meyering.net>
17291
17292         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
17293
17294 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17295
17296         * modules/argz: Omit "#include".
17297
17298         * MODULES.html.sh (func_all_modules): Add calloc, to match
17299         2004-06-01 addition of calloc module.
17300
17301 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17302
17303         * m4/argz.m4: New file, which is autoupdated from libtool.
17304
17305 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17306
17307         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
17308         libtool.
17309
17310 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17311
17312         * config/srclist-update: Don't insist on "USA." before the
17313         close-comment, as libtool omits the period and puts the */ on a
17314         separate line.
17315         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
17316         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
17317
17318 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
17319
17320         * modules/argz: New file.
17321         * MODULES.html.sh (func_all_modules): Add argz.
17322
17323 2004-06-12  Jim Meyering  <jim@meyering.net>
17324         and  Paul Eggert  <eggert@cs.ucla.edu>
17325
17326         * modules/hash (Files): Add lib/xalloc.h.
17327         * modules/pipe (Depends-on): Add wait-process.
17328         * modules/stat (Depends-on): Add xalloc.
17329         * modules/userspec (Files): Add lib/userspec.h.
17330         * modules/xstrto
17331
17332         Upgrade from gettext-0.13.
17333         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
17334         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
17335         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
17336
17337 2004-06-10  Jim Meyering  <jim@meyering.net>
17338
17339         * lib/calloc.c: New file.
17340
17341 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
17342
17343         * lib/getdate.y (yylex): Allow space between sign and number.
17344         Problem reported by Dan Jacobson.
17345
17346 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
17347
17348         Merge from coreutils CVS.
17349
17350         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
17351         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
17352         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
17353         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
17354         xstrtol.m4: Fix copyright date and/or serial number.
17355
17356         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
17357         See if we need an fchown replacement.
17358         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
17359         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
17360         and use the replacement function if we detect either defect.
17361
17362         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
17363         gl_UTIMECMP.
17364
17365 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
17366         and  Jim Meyering  <jim@meyering.net>
17367
17368         Merge from coreutils CVS.
17369
17370         * lib/stat-macros.h: New file, with contents from file-type.h
17371         and coreutils' system.h.
17372         * lib/file-type.c: Include "stat-macros.h".
17373         * lib/file-type.h (file_type): Move all macro definitions to new file,
17374         stat-macros.h.
17375
17376         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
17377         Wrap old code with this conditional.
17378         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
17379         function that does not dereference symlinks.
17380         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
17381
17382         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
17383         dependency problems.
17384         (xreadlink): Accept new arg SIZE, for efficiency.
17385         All decls and uses changed.
17386         * lib/xreadlink.h: Include <stddef.h>, for size_t.
17387
17388         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
17389         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
17390
17391         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
17392         sysexits.h.
17393
17394 2004-06-01  Jim Meyering  <jim@meyering.net>
17395
17396         * m4/calloc.m4: New file.
17397
17398 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
17399
17400         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
17401         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
17402         Also, fix a typo in a diagnostic.
17403
17404 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
17405
17406         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
17407         or AC_FUNC_REALLOC.
17408
17409 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
17410
17411         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
17412         macros to be defined.
17413         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
17414         the allocator returns NULL because the requested size is zero.
17415
17416 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
17417
17418         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
17419         var.  Add comment explaining why libc still defines it.  This
17420         merges the following patch from glibc:
17421         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
17422
17423 2004-05-20  Andreas Schwab  <schwab@suse.de>
17424
17425         * m4/free.m4: Replace free if it not known to work, not the other
17426         way round.
17427
17428 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
17429
17430         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
17431         present in glibc since revision 1.1 of this file.
17432         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
17433         obstack_alignment_mask, obstack_alloc, obstack_base,
17434         obstack_blank, obstack_blank_fast, obstack_chunk_size,
17435         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
17436         obstack_grow0, obstack_init, obstack_int_grow,
17437         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
17438         obstack_next_free, obstack_object_size, obstack_ptr_grow,
17439         obstack_ptr_grow_fast, obstack_room): Remove declarations of
17440         nonexistent functions.
17441
17442 2004-05-18  Karl Berry  <karl@gnu.org>
17443
17444         * config/srclist.txt: break link for vasnprintf.c.
17445
17446 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
17447
17448         Port obstack to the AS/400, where pointers are 16 bytes wide and
17449         you cannot cast an integer to a valid pointer.  This patch is
17450         currently waiting to be integrated into glibc; see
17451         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
17452
17453         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
17454         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
17455         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
17456         (struct obstack): temp member is now a union of a pointer and
17457         an integer, instead of an integer.  All integer uses changed.
17458         This does not affect the physical layout of struct obstack,
17459         except on hosts (like the AS/400) where the size or alignment of
17460         void * is greater than that of ptrdiff_t.
17461         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
17462         __STDC__)]: Store temporary in pointer member of union, not
17463         integer member.
17464         * lib/obstack.c: Include <stddef.h>, for offsetof.
17465         (struct fooalign): Remove; it doesn't need a name.
17466         (union fooround): Change double to long double, and add void *.
17467         (DEFAULT_ALIGNMENT): Use offsetof to compute.
17468         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
17469         not a macro.  Hence the values are always int; so remove all
17470         casts-to-int in uses.
17471
17472 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
17473
17474         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
17475         we can get this patch merged into glibc.
17476
17477 2004-05-17  Derek R. Price  <derek@ximbiot.com>
17478             Paul Eggert  <eggert@cs.ucla.edu>
17479
17480         * m4/argp: Depend on alloca.
17481
17482 2004-05-17  Derek R. Price  <derek@ximbiot.com>
17483             Paul Eggert  <eggert@cs.ucla.edu>
17484
17485         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
17486         freecoding.
17487
17488 2004-05-17  Bruno Haible  <bruno@clisp.org>
17489
17490         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
17491         precision that consists of a '.' followed by an empty digit string.
17492         Patch by Tor Lillqvist <tml@iki.fi>.
17493
17494 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
17495
17496         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
17497         for backward compatibility with older code.  We need our own
17498         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
17499         it under some other name, and our alloca.h will define it.
17500
17501 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
17502             Derek Price  <derek@ximbiot.com>
17503
17504         * lib/alloca.c: Include <alloca.h>, to get our interface.
17505         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
17506         include <alloca.h> first.  Use C89 prototype for alloca; this
17507         requires including <stddef.h> for size_t.  Use extern "C" if C++.
17508         Use #elif for simplicity, since we can assume C89 now.
17509         Don't try to source the system alloca.h since it will not be found
17510         and to prevent recursively including its replacement.
17511         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
17512         * lib/regex.c: Likewise.
17513
17514 2004-05-16  Derek Price  <derek@ximbiot.com>
17515             Paul Eggert  <eggert@cs.ucla.edu>
17516
17517         getline cleanup.  This changes the getndelim2 API: both order of
17518         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
17519         no delimiter).
17520
17521         * lib/getline.c: Don't include stddef.h or stdio.h, since our
17522         interface does that.
17523         (getline): Always use getdelim, so that we don't have two
17524         copies of this code.
17525         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
17526         if available.
17527         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
17528         (GETNDELIM2_MAXIMUM): New macro.
17529         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
17530         instead of the old practice of delim2==0.  All callers changed.
17531         Return -1 on overflow, instead of returning junk.
17532         Do not set *linesize unless allocation succeeds.
17533         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
17534         that we include sys/types.h.
17535         * lib/getnline.h: Likewise.
17536         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
17537         (getndelim2): Reorder arguments.
17538         * lib/getnline.c (getnline, getndelim):
17539         Don't discard the NMAX argument.
17540         (getnline): Invoke getndelim, to avoid code duplication.
17541         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
17542         of (size_t) -1 by callers of the getnline family.
17543
17544 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
17545
17546         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
17547         Check for gettimeofday.
17548         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
17549         Check for settimeofday, stime.
17550
17551 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
17552
17553         * lib/nanosleep.c (suspended): Change its type from int to
17554         sig_atomic_t volatile.
17555         (first_call): Make it private to rpl_nanosleep, and have it
17556         be zero initially as that's a bit faster.
17557         (my_usleep): Round up fractional times instead of truncating them,
17558         as this is the usual meaning for 'sleep'.
17559
17560         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
17561         doesn't work.
17562         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
17563         (ENOSYS): Define if not defined.
17564         (settime): Fall back on stime if it exists and settimeofday fails.
17565         But don't bother with fallbacks if a method fails with errno == EPERM.
17566
17567 2004-05-11  Jim Meyering  <jim@meyering.net>
17568
17569         Prior to this change, the save_cwd caller required read access to the
17570         current directory on most systems (ones with the fchdir function).
17571
17572         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
17573         fails, try write-only, and finally, resort to using xgetcwd.
17574
17575 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
17576
17577         * lib/obstack.c, obstack.h: Import changes from libc.
17578
17579 2004-04-28  Bruno Haible  <bruno@clisp.org>
17580
17581         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
17582         also implicitly appends .exe to executables.
17583         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
17584         accepts Windows pathnames.
17585         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
17586         Treat Cygwin like Windows, since it now accepts Windows pathnames.
17587         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
17588         Treat Cygwin like Windows, since it now accepts Windows pathnames.
17589         Reported by Derek Robert Price <derek@ximbiot.com>.
17590
17591 2004-04-21  Karl Berry  <karl@gnu.org>
17592
17593         * config/srclist.txt (localcharset.c): break sync.
17594
17595 2004-04-20  Paul Eggert  <eggert@twinsun.com>
17596
17597         * m4/host-os.m4: Add a copyright notice.
17598
17599 2004-04-20  Jim Meyering  <jim@meyering.net>
17600
17601         Change UTILS_ to gl_ in AC_DEFINE'd names.
17602         Change utils_- and jm_-prefixed variables, too.
17603         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
17604         UTILS_FUNC_MKDIR_TRAILING_SLASH.
17605         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
17606
17607         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
17608         Don't emit trailing blanks.
17609         Also rename jm_-prefixed variables to have gl_ prefix.
17610
17611         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
17612         Also rename jm_-prefixed variables to have gl_ prefix.
17613
17614         * m4/jm-macros.m4: Reflect the renamings.
17615         * m4/prereq.m4: Likewise.
17616
17617 2004-04-20  Jim Meyering  <jim@meyering.net>
17618
17619         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
17620         memory.
17621
17622 2004-04-20  Jim Meyering  <jim@meyering.net>
17623             Bruno Haible  <bruno@clisp.org>
17624
17625         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
17626         memory when realloc fails.
17627
17628 2004-04-19  Jim Meyering  <jim@meyering.net>
17629
17630         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
17631         now that readutmp.c may call `free (0)'.
17632
17633 2004-04-19  Bruno Haible  <bruno@clisp.org>
17634
17635         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
17636         * m4/inttypes_h.m4: Likewise.
17637         * m4/stdint_h.m4: Likewise.
17638         * m4/intmax_t.m4: Likewise.
17639         * m4/uintmax_t.m4: Likewise.
17640
17641 2004-04-18  Jim Meyering  <jim@meyering.net>
17642
17643         * m4/prereq.m4: Don't forbid jm_ prefix.
17644
17645         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
17646         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
17647         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
17648         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
17649         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
17650         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
17651         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
17652         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
17653         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
17654         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
17655         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
17656         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
17657         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
17658         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
17659         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
17660         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
17661         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
17662         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
17663         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
17664
17665 2004-04-18  Jim Meyering  <jim@meyering.net>
17666
17667         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
17668         failure, don't leak memory and do call END_UTMP_ENT.
17669
17670 2004-04-16  Jim Meyering  <jim@meyering.net>
17671
17672         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
17673         coreutils' stat program.
17674         (gl_PREREQ): Don't require jm_PREREQ_STAT.
17675
17676 2004-04-11  Paul Eggert  <eggert@twinsun.com>
17677
17678         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
17679         C89.
17680         (CHAR_BIT): Remove, since we assume C89.
17681         Include <stdint.h> if available, as per current Autoconf CVS advice.
17682
17683 2004-03-31  Jim Meyering  <jim@meyering.net>
17684
17685         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
17686         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
17687         * m4/xalloc.m4: Likewise.
17688
17689 2004-03-30  Paul Eggert  <eggert@twinsun.com>
17690
17691         Merge from coreutils.
17692
17693         * m4/inttostr.m4: New file.
17694         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
17695         Require AM_STDBOOL_H and gl_TIMESPEC instead.
17696         Require gl_CLOCK_TIME.
17697         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
17698
17699 2004-03-30  Paul Eggert  <eggert@twinsun.com>
17700
17701         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
17702         not bool, to be more consistent with Unix conventions.
17703         Suggested by Bruno Haible.
17704
17705         Merge from coreutils.
17706
17707         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
17708         * lib/umaxtostr.c: New files.
17709
17710         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
17711         the usual <time.h> dance.
17712         (get_date): Change signature to support fractional time stamps.
17713         All callers changed.
17714         * lib/getdate.y: Include "getdate.h" first, as we can now
17715         assume C89 and don't need to worry about 'const'.
17716         Similarly, include "unlocked-io.h" near start, not in middle.
17717         Include <limits.h>.
17718         (textint.value): Use long int rather than int.
17719         (textint.digits): Use size_t rather than int.
17720         (BILLION, LOG10_BILLION): New constants.
17721         (parser_control): New member rel_ns.  Members day_ordinal,
17722         time_zone, month, day, hour, minutes, rel_year, rel_month,
17723         rel_day, rel_hour, rel_minutes, rel_seconds
17724         are now long int, not int.  Member seconds is now struct timespec,
17725         not int.  New member timespec_seen.  Members dates_seen, days_seen,
17726         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
17727         not int.
17728         (%union.intval): Now long int, not int.
17729         New member timespec.
17730         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
17731         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
17732         (spec): Now is a timespec or an item list.
17733         (timespec, items): New nonterminals.
17734         (time, rel, relunit, number, get_date):
17735         Add support for fractional seconds.
17736         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
17737         (gmtime, localtime, mktime): Remove decls; not needed with C89.
17738         (to_hour): First arg is now long int, not int.
17739         (to_year): Returns long int, not int.
17740         Don't treat year -70 like 70.
17741         (tm_diff): Returns long int, not int.
17742         (lookup_word): Use bool instead of int when appropriate.
17743         (yylex): Use size_t for count, not int.
17744         Detect overflow when parsing large integer constants.
17745         Add support for fractions.
17746         (get_date): Make pointers 'const' if possible.
17747         Use more-portable code to detect integer overflow.
17748         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
17749         Don't use ctime; it's not reliable if the year has >4 digits.
17750
17751         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
17752         This is for compatibility with BSD.
17753
17754         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
17755         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
17756         From coreutils' system.h.
17757
17758         * lib/userspec.c: Don't include "posixver.h".
17759         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
17760         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
17761         compatible extension.  Simplify code by removing a boolean int
17762         that was always nonzero if a string was nonnull.
17763
17764 2004-03-30  Jim Meyering  <jim@meyering.net>
17765
17766         Merge from coreutils.
17767
17768         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
17769         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
17770         on some systems one must include <grp.h> before it.
17771         Reported by Christian Krackowizer.
17772
17773 2004-03-30  Jim Meyering  <jim@meyering.net>
17774
17775         Merge from coreutils.
17776
17777         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
17778
17779         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
17780         an empty input stream.
17781
17782         * lib/readtokens.c: Include <stdbool.h>.
17783         (readtoken): Use `size_t' rather than int/long.
17784         All callers adjusted.
17785         Use `bool' rather than `int' where appropriate.
17786         Use memset rather than an explicit loop.
17787         Use x2nrealloc rather than xrealloc.
17788         Allow the use of `\0' as a delimiter.
17789         (readtokens): Likewise.
17790         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
17791
17792 2004-03-30  Jim Meyering  <jim@meyering.net>
17793
17794         * m4/realloc.m4: Remove file, since now it does no more than
17795         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
17796         the `configure.ac' section of module/realloc.
17797         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
17798
17799 2004-03-30  Bruno Haible  <bruno@clisp.org>
17800
17801         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
17802         nonnull.
17803
17804 2004-03-29  Paul Eggert  <eggert@twinsun.com>
17805
17806         Merge changes to getloadavg.c from coreutils and Emacs.
17807
17808         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
17809         Define to an expression, not to the empty string.
17810         Include cloexec.h and xalloc.h.
17811         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
17812         Use set_cloexec_flag rather than rolling our own.
17813         * lib/cloexec.c, lib/cloexec.h: New files.
17814
17815 2004-03-29  Paul Eggert  <eggert@twinsun.com>
17816
17817         * m4/cloexec.m4: New file.
17818
17819 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17820
17821         * lib/getopt.h: Sync with libc CVS.
17822
17823 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17824             Bruno Haible  <bruno@clisp.org>
17825
17826         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
17827         mbswidth.
17828
17829 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17830             Bruno Haible  <bruno@clisp.org>
17831
17832         * lib/mbswidth.h: Include <wchar.h> only if
17833         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
17834         <wchar.h>.
17835         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
17836
17837 2004-03-09  Paul Eggert  <eggert@twinsun.com>
17838
17839         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
17840         Sync with libc CVS.
17841         * lib/getopt_int.h: New file, also synced from libc.
17842
17843 2004-03-09  Paul Eggert  <eggert@twinsun.com>
17844
17845         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
17846         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
17847         Bring back getopt.c, getopt.h, getopt1.c.
17848
17849 2004-03-07  Paul Eggert  <eggert@twinsun.com>
17850
17851         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
17852         All uses changed.  Check for sa_sigaction member; this fixes
17853         a bug first reported by Jason Andrade in
17854         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
17855
17856 2004-03-07  Paul Eggert  <eggert@twinsun.com>
17857
17858         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
17859         '#if' expressions.  Unlike the code it replaces, it does not
17860         depend on (defined _SC_PAGESIZE).  However, it does depend on
17861         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
17862         first reported by Jason Andrade in
17863         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
17864
17865 2004-02-25  Simon Josefsson  <jas@extundo.com>
17866
17867         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
17868
17869 2004-02-25  Simon Josefsson  <jas@extundo.com>
17870
17871         * lib/strdup.h: New file.
17872         * lib/strdup.c: Include it.
17873         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
17874         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
17875
17876 2004-02-23  Karl Berry  <karl@gnu.org>
17877
17878         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
17879         (from fencepost.gnu.org:/gd/gnuorg).
17880
17881 2004-02-23  Karl Berry  <karl@gnu.org>
17882
17883         * config/srclistvars.sh (GNUORG) [karl]: redefine.
17884         * config/srclist.txt: add maintain/standards documents.
17885
17886 2004-02-18  Bruno Haible  <bruno@clisp.org>
17887
17888         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
17889         Reported by Derek Robert Price <derek@ximbiot.com>.
17890
17891 2004-02-16  Karl Berry  <karl@gnu.org>
17892
17893         * config/mkinstalldirs, install-sh: update from automake.
17894
17895 2004-02-06  Karl Berry  <karl@gnu.org>
17896
17897         * m4/po.m4: update from gettext 0.14.1.
17898
17899 2004-02-06  Karl Berry  <karl@gnu.org>
17900
17901         * lib/config.charset: update from gettext 0.14.1.
17902
17903 2004-02-05  Paul Eggert  <eggert@twinsun.com>
17904
17905         Add comments and code, prompted by suggestions from Bruno Haible
17906         for sh-quote.
17907         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
17908         describing the enum quoting_style values.
17909         * lib/quotearg.c (quotearg_alloc): New function.
17910         (quotearg_buffer_restyled): Treat lone { and } as special.
17911         Treat = as special.  Work around bug with older shells
17912         that "see" a '\' that is really the 2nd byte of a multibyte char.
17913         Quote empty string with shell_quoting_style.
17914
17915 2004-02-03  Bruno Haible  <bruno@clisp.org>
17916
17917         * m4/pipe.m4: New file, from GNU gettext.
17918
17919 2004-02-03  Bruno Haible  <bruno@clisp.org>
17920
17921         * lib/pipe.h: New file, from GNU gettext.
17922         * lib/pipe.c: New file, from GNU gettext.
17923
17924 2004-01-27  Bruno Haible  <bruno@clisp.org>
17925
17926         * m4/execute.m4: New file, from GNU gettext.
17927
17928 2004-01-27  Bruno Haible  <bruno@clisp.org>
17929
17930         * lib/execute.h: New file, from GNU gettext.
17931         * lib/execute.c: New file, from GNU gettext.
17932         * lib/w32spawn.h: New file, from GNU gettext.
17933
17934 2004-01-24  Paul Eggert  <eggert@twinsun.com>
17935
17936         Merge from diffutils.
17937
17938         * lib/file-type.c (file_type): Add typed memory objects.
17939         * lib/file-type.h (S_TYPEISTMO): New macro.
17940
17941         * lib/c-stack.h (c_stack_action): Remove argv argument.
17942         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
17943         (die): Don't calculate message unless segv_action returns.
17944         (get_stack_location, min_address_from_argv, max_address_from_argv,
17945         volatile stack_base, volatile_stack_size): Remove.
17946         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
17947         that every segmentation violation is a stack overflow.  (Ouch!)
17948         See Debian bug 136249 (still outstanding) for more info about why
17949         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
17950
17951 2004-01-24  Paul Eggert  <eggert@twinsun.com>
17952
17953         Exit-status fix from coreutils.
17954
17955         Use exit_failure consistently in place of EXIT_FAILURE,
17956         so that program exit statuses are consistent on failure.
17957
17958         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
17959         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
17960         * lib/argmatch.h: Comment fix to match the above.
17961         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
17962         Now a macro referring to exit_failure, instead of a separate
17963         variable.  Include "exitfail.h" to get it.
17964         * lib/xstrtol.h: Include "exitfail.h".
17965         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
17966
17967         * lib/long-options.c (parse_long_options): Use prototype
17968         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
17969         for clarity.
17970
17971 2004-01-21  Jim Meyering  <jim@meyering.net>
17972
17973         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
17974         so as not to conflict with a different-sized __mktime_internal
17975         function in GNU libc.
17976         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
17977         Problem building statically-linked `ls' reported by Michael Brunnbauer.
17978
17979 2004-01-20  Karl Berry  <karl@gnu.org>
17980
17981         * config/config.guess: update from config.
17982
17983         * config/srclistvars.sh: GNUWWWLICENSES for karl.
17984
17985 2004-01-20  Bruno Haible  <bruno@clisp.org>
17986
17987         Safer stack allocation.
17988         * lib/setenv.c: Include allocsa.h.
17989         (alloca): Remove fallback definition.
17990         (freea): Remove macro.
17991         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
17992         instead of freea.
17993
17994 2004-01-20  Bruno Haible  <bruno@clisp.org>
17995
17996         * m4/eealloc.m4: New file, from GNU gettext.
17997
17998 2004-01-20  Bruno Haible  <bruno@clisp.org>
17999
18000         * m4/allocsa.m4: New file, from GNU gettext.
18001
18002 2004-01-20  Bruno Haible  <bruno@clisp.org>
18003
18004         * lib/xallocsa.h: New file, from GNU gettext.
18005         * lib/xallocsa.c: New file, from GNU gettext.
18006
18007 2004-01-20  Bruno Haible  <bruno@clisp.org>
18008
18009         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
18010
18011 2004-01-20  Bruno Haible  <bruno@clisp.org>
18012
18013         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
18014         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
18015         specially.
18016
18017 2004-01-20  Bruno Haible  <bruno@clisp.org>
18018
18019         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
18020         patch.
18021
18022 2004-01-20  Bruno Haible  <bruno@clisp.org>
18023
18024         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
18025
18026 2004-01-20  Bruno Haible  <bruno@clisp.org>
18027
18028         * lib/eealloc.h: New file.
18029
18030 2004-01-20  Bruno Haible  <bruno@clisp.org>
18031
18032         * lib/binary-io.h: Avoid warnings on Cygwin.
18033
18034 2004-01-20  Bruno Haible  <bruno@clisp.org>
18035
18036         * lib/allocsa.h: New file, from GNU gettext.
18037         * lib/allocsa.c: New file, from GNU gettext.
18038
18039 2004-01-18  Karl Berry  <karl@gnu.org>
18040
18041         * doc/gpl.texi, doc/lgpl.texi: new files.
18042
18043 2004-01-18  Karl Berry  <karl@gnu.org>
18044
18045         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
18046         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
18047
18048 2004-01-15  Paul Eggert  <eggert@twinsun.com>
18049
18050         Merge from coreutils.
18051
18052         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
18053         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
18054         (gl_DEFAULT_POSIX2_VERSION): Move
18055         the documentation from 'configure' into 'config.hin',
18056         so that 'configure --help' isn't burdened by it and
18057         we don't have to worry about its formatting there.
18058         Reword the documentation so that it's more succinct
18059         and can be run together into a single paragraph.
18060         * m4/same.m4 (gl_SAME): Check for pathconf.
18061
18062 2004-01-15  Paul Eggert  <eggert@twinsun.com>
18063
18064         Merge from coreutils.
18065
18066         * lib/posixver.c: Include posixver.h.
18067
18068         * lib/same.c: Include <stdbool.h>, <limits.h>.
18069         (_POSIX_NAME_MAX): Define if not defined.
18070         (MIN): New macro.
18071         (same_name): If file names are silently truncated, report
18072         that the file names are the same if they are the same after
18073         the silent truncation.
18074
18075         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
18076         conversion function.
18077         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
18078         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
18079         longer needed.
18080
18081 2004-01-15  Jim Meyering  <jim@meyering.net>
18082
18083         Merge from coreutils.
18084
18085         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
18086         if no library is required.
18087         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
18088         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
18089         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
18090         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
18091         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
18092         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
18093         value, $ac_cv_search_crypt, if it's "none required".
18094         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
18095         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
18096         not gl_FUNC_GETLOADAVG.
18097         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
18098         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
18099
18100 2004-01-15  Jim Meyering  <jim@meyering.net>
18101
18102         Merge from coreutils.
18103
18104         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
18105         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
18106         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
18107
18108         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
18109         optional configure-time default.
18110
18111         * lib/version-etc.c (version_etc_copyright): Update copyright date.
18112
18113         * lib/xreadlink.c (xreadlink): Correct outdated comment.
18114
18115 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
18116
18117         Merge from coreutils.
18118
18119         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
18120         value, $ac_cv_search_nanosleep, if it's "none required".
18121
18122 2004-01-14  Paul Eggert  <eggert@twinsun.com>
18123
18124         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
18125         with like-named macro in fnmatch.c.
18126         (EXT): Use an internal constant instead.
18127
18128         Merge fnmatch patches from glibc.
18129         * lib/fnmatch.c (mbsinit): Remove define.
18130         Add libc_hidden_ver (__fnmatch, fnmatch).
18131         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
18132         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
18133
18134 2004-01-14  Karl Berry  <karl@gnu.org>
18135
18136         * config/install-sh: update from automake.
18137
18138 2004-01-13  Karl Berry  <karl@gnu.org>
18139
18140         * config/install-sh: update from automake.
18141
18142 2004-01-09  Karl Berry  <karl@gnu.org>
18143
18144         * config/install-sh: update from automake.
18145
18146 2004-01-05  Karl Berry  <karl@gnu.org>
18147
18148         * config/config.{sub,guess}: update from config.
18149
18150 2003-12-31  Karl Berry  <karl@gnu.org>
18151
18152         * config/depcomp: update from automake.
18153
18154 2003-12-14  Karl Berry  <karl@gnu.org>
18155
18156         * lib/config.charset: update from gettext-runtime.
18157
18158 2003-12-03  Paul Eggert  <eggert@twinsun.com>
18159
18160         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
18161         Bug reported by Alfred M. Szmidt.
18162
18163 2003-12-03  Bruno Haible  <bruno@clisp.org>
18164
18165         * m4/gettext.m4: Upgrade from gettext-0.13.
18166         * m4/po.m4: Upgrade from gettext-0.13.
18167         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
18168         * m4/intmax.m4: New file, from gettext-0.13.
18169         * m4/printf-posix.m4: New file, from gettext-0.13.
18170
18171 2003-11-29  Karl Berry  <karl@gnu.org>
18172
18173         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
18174
18175 2003-11-25  Paul Eggert  <eggert@twinsun.com>
18176             Bruno Haible  <bruno@clisp.org>
18177
18178         * lib/printf-parse.h: Don't include sys/types.h.
18179         (ARG_NONE): New macro.
18180         (char_directive): Change type of *arg_index fields to size_t.
18181         * lib/printf-parse.c: Don't include sys/types.h.
18182         (SSIZE_MAX): Remove macro.
18183         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
18184         Remove unnecessary overflow check.
18185         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
18186         fields.
18187
18188 2003-11-25  Bruno Haible  <bruno@clisp.org>
18189
18190         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
18191
18192 2003-11-25  Bruno Haible  <bruno@clisp.org>
18193
18194         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
18195         gt_TYPE_SSIZE_T.
18196
18197 2003-11-24  Paul Eggert  <eggert@twinsun.com>
18198
18199         * modules/alloca: Remove dependency on xalloc.
18200
18201 2003-11-24  Paul Eggert  <eggert@twinsun.com>
18202
18203         * lib/alloca.c: Remove dependency on xalloc module.
18204         (xalloc_die): Remove.
18205         (memory_full) [!defined emacs]: New macro.
18206         [!defined emacs]: Don't include xalloc.h.
18207         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
18208         address arithmetic overflows.  Change datatypes a bit to avoid
18209         unnecessary casts.
18210
18211 2003-11-22  Jim Meyering  <jim@meyering.net>
18212
18213         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
18214         s/size/size_t/.
18215
18216 2003-11-21  Karl Berry  <karl@gnu.org>
18217
18218         * config/config.{sub,guess}: update from config.
18219
18220 2003-11-18  Karl Berry  <karl@gnu.org>
18221
18222         * config/config.{sub,guess}: update from config.
18223
18224         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
18225
18226 2003-11-17  Paul Eggert  <eggert@twinsun.com>
18227
18228         * README: Mention that S+T cannot overflow if S is the size of
18229         an existing object and T is sufficiently small.
18230
18231 2003-11-17  Jim Meyering  <jim@meyering.net>
18232
18233         On systems without utime and without a utimes function capable of
18234         dealing with a NULL struct utimbuf* argument, this utime replacement
18235         could -- in unusual circumstances -- leak a file descriptor.
18236         * lib/utime.c: Include <unistd.h> and <errno.h>.
18237         (utime_null): Be sure to close `fd' and to preserve errno.
18238         Reported by Geoff Collyer via Arnold Robbins.
18239
18240 2003-11-17  Bruno Haible  <bruno@clisp.org>
18241
18242         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
18243         (Depends-on): Add xsize.
18244
18245 2003-11-17  Bruno Haible  <bruno@clisp.org>
18246
18247         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
18248
18249 2003-11-17  Bruno Haible  <bruno@clisp.org>
18250
18251         * lib/vasnprintf.c (alloca): Remove fallback definition.
18252         (freea): Remove definition.
18253         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
18254         Reported by Paul Eggert.
18255
18256 2003-11-16  Paul Eggert  <eggert@twinsun.com>
18257             Bruno Haible  <bruno@clisp.org>
18258
18259         Protect against address arithmetic overflow.
18260         * lib/printf-args.h: Include stddef.h.
18261         (arguments): Change type of field 'count' to size_t.
18262         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
18263         'unsigned int' where appropriate.
18264         * lib/printf-parse.h: Include sys/types.h.
18265         (char_directive): Change type of *arg_index fields to ssize_t.
18266         (char_directives): Change type of fields 'count', max_*_length to
18267         size_t.
18268         * lib/printf-parse.c: Include sys/types.h and xsize.h.
18269         (SSIZE_MAX): Define fallback value.
18270         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
18271         instead of 'int' where appropriate. Check a_allocated, d_allocated
18272         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
18273         * lib/vasnprintf.c: Include xsize.h.
18274         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
18275         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
18276         overflow. Avoid wraparound when converting a width or precision from
18277         decimal to binary.
18278
18279 2003-11-16  Bruno Haible  <bruno@clisp.org>
18280
18281         Update from GNU gettext.
18282         * lib/printf-parse.c: Generalize to it can be compiled for wide
18283         strings.
18284         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
18285         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
18286         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
18287         SNPRINTF): New macros.
18288         Don't include <alloca.h> if the file is used inside libintl.
18289         (local_wcslen): New function, for Solaris 2.5.1.
18290         (VASNPRINTF): Use it instead of wcslen.
18291
18292 2003-11-16  Bruno Haible  <bruno@clisp.org>
18293
18294         * lib/xsize.h (xmax): New function.
18295         (xsum, xsum3, xsum4): Declare as "pure" functions.
18296
18297 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18298
18299         * modules/xalloc (Files): Undo latest change, since xalloc.h
18300         no longer needs SIZE_MAX or PTRDIFF_MAX.
18301
18302 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18303
18304         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
18305         gl_PTRDIFF_MAX.
18306
18307 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18308
18309         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
18310         "return", to pacify some unknown compiler.  Problem reported
18311         by Joerg Schilling.
18312
18313 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18314
18315         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
18316         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
18317         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
18318         heuristic is just as accurate as far as we know, and it removes a
18319         dependency on size_max.m4 and ptrdiff_max.m4.
18320
18321 2003-11-11  Bruno Haible  <bruno@clisp.org>
18322
18323         * modules/xsize (Files): Add m4/size_max.m4.
18324         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
18325
18326 2003-11-11  Bruno Haible  <bruno@clisp.org>
18327
18328         * m4/size_max.m4: New file.
18329         * m4/ptrdiff_max.m4: New file.
18330         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
18331         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
18332         (gl_XALLOC): Invoke it.
18333
18334 2003-11-11  Bruno Haible  <bruno@clisp.org>
18335
18336         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
18337         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
18338         defined.
18339
18340 2003-11-10  Paul Eggert  <eggert@twinsun.com>
18341
18342         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
18343         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
18344         rejected some allocations of exactly SIZE_MAX - 2 bytes.
18345         From Bruno Haible.
18346         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
18347         not (size_t) -1, since it's defined here.
18348
18349 2003-11-09  Karl Berry  <karl@gnu.org>
18350
18351         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
18352
18353 2003-11-06  Paul Eggert  <eggert@twinsun.com>
18354
18355         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
18356         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
18357         Reject sizes of exactly SIZE_MAX bytes.
18358         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
18359         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
18360
18361 2003-11-05  Bruno Haible  <bruno@clisp.org>
18362
18363         * lib/xsize.h: Include limits.h, to avoid a possible collision with
18364         SIZE_MAX defined in <limits.h> on Solaris.
18365
18366 2003-11-04  Jim Meyering  <jim@meyering.net>
18367
18368         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
18369         variable names, rather than @VAR@.
18370         * modules/poll: Likewise.
18371
18372 2003-11-04  Bruno Haible  <bruno@clisp.org>
18373
18374         * modules/xsize: New file.
18375         * modules/linebreak: Depend on xsize.
18376         * MODULES.html.sh (func_all_modules): Add xsize.
18377
18378 2003-11-04  Bruno Haible  <bruno@clisp.org>
18379
18380         * m4/xsize.m4: New file.
18381
18382 2003-11-04  Bruno Haible  <bruno@clisp.org>
18383
18384         * lib/xsize.h: New file.
18385         * lib/linebreak.c: Include xsize.h.
18386         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
18387         argument for overflow.
18388         Suggested by Paul Eggert.
18389
18390 2003-11-03  Karl Berry  <karl@gnu.org>
18391
18392         * config/config.{guess,sub}: update from config.
18393
18394 2003-11-03  Jim Meyering  <jim@meyering.net>
18395
18396         * modules/userspec (lib_SOURCES): Add userspec.h.
18397         (Include): Add "userspec.h".
18398         Improve description.
18399
18400 2003-11-03  Jim Meyering  <jim@meyering.net>
18401
18402         * lib/userspec.c: Include "userspec.h".
18403         * lib/userspec.h: New file.
18404
18405 2003-11-03  Bruno Haible  <bruno@clisp.org>
18406
18407         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
18408
18409 2003-11-03  Bruno Haible  <bruno@clisp.org>
18410
18411         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
18412         available, to avoid (extremely rare) race condition.
18413         Suggested by Paul Eggert.
18414
18415 2003-11-02  Karl Berry  <karl@gnu.org>
18416
18417         * config/srclist.txt (vasprintf.c): sync broken, sigh.
18418
18419 2003-10-31  Paul Eggert  <eggert@twinsun.com>
18420
18421         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
18422         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
18423         (read_filesystem_list): Set and use me_type_malloced.
18424         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
18425         whatever the type happens to be), for brevity and consistency.
18426         Check for size calculation overflow on Alphas running OSF/1.
18427
18428 2003-10-31  Jim Meyering  <jim@meyering.net>
18429
18430         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
18431
18432         * lib/linebuffer.c: Include <string.h> for declaration of memset.
18433
18434 2003-10-30  Paul Eggert  <eggert@twinsun.com>
18435             Bruno Haible  <bruno@clisp.org>
18436
18437         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
18438         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
18439
18440 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
18441
18442         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
18443         netbsd*-gnu*.  Suggested by Robert Millan.
18444
18445 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18446
18447         * modules/group-member: Depend on stdbool.
18448
18449 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18450
18451         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
18452
18453 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18454
18455         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
18456         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
18457         after the 'gnu' in these cases.  This fixes some bugs in the
18458         previous change, and is based on suggestions by Robert Millan.
18459
18460 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18461
18462         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
18463         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
18464         no longer needed.
18465         * lib/quotearg.c (quotearg_n_options): Use it.
18466         * lib/group-member.c: Include <stdbool.h>.
18467         (free_group_info): Arg is now const *; don't free arg.
18468         (get_group_info): Now returns bool and accepts struct group_info *,
18469         rather than returning a malloc'ed struct group_info *.
18470         All uses changed.  Check for overflow in internal size calculation.
18471
18472         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
18473         rather than xmalloc/xrealloc.
18474         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
18475         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
18476         conformance bug: the old code used a pointer after freeing the
18477         storage that it addressed.
18478         * lib/hash.c (hash_initialize): Simplify the code by using
18479         xalloc_oversized rather than doing it by hand.
18480         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
18481         the buffer preserved.  Use free and xmalloc instead.
18482         * lib/quotearg.c (quotearg_n_options): Likewise.
18483         Use a simpler test for size overflow.  Don't use xalloc_oversized
18484         because unsigned int might be wider than size_t (!); this suggests
18485         that we should switch from unsigned int to size_t for slot numbers.
18486
18487 2003-10-28  Paul Eggert  <eggert@twinsun.com>
18488
18489         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
18490         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
18491         NetBSD kernels.  Requested by Richard Stallman.
18492
18493 2003-10-27  Paul Eggert  <eggert@twinsun.com>
18494
18495         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
18496         to allocate the returned structure.  Do not allocate a subarray,
18497         as x2nrealloc will do that.
18498         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
18499         instead of xnrealloc.
18500         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
18501
18502 2003-10-27  Bruno Haible  <bruno@clisp.org>
18503
18504         * lib/stdbool_.h: Better support for BeOS.
18505
18506 2003-10-26  Paul Eggert  <eggert@twinsun.com>
18507
18508         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
18509         now uses inline.
18510
18511 2003-10-26  Paul Eggert  <eggert@twinsun.com>
18512
18513         * lib/xalloc.h (xalloc_oversized): New static inline function, for
18514         callers that want to do their own size-overflow checking.  Include
18515         <stdbool.h>, since xalloc_oversized returns bool.
18516         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
18517         to use xalloc_oversized.
18518
18519         Add two functions x2realloc, x2nrealloc, for programs that grow
18520         arrays dynamically by doubling their sizes.
18521         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
18522         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
18523         New functions.
18524
18525         Port to C99 semantics for 'inline' of external functions.
18526         Bug reported by Bruno Haible.
18527         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
18528         with the old contents of xnmalloc.
18529         (xnmalloc, xmalloc): Use it.
18530         (xnrealloc_inline): New static inline function,
18531         with the old contents of xnrealloc.
18532         (xnrealloc, xrealloc): Use it.
18533
18534         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
18535         that.
18536
18537 2003-10-26  Karl Berry  <karl@gnu.org>
18538
18539         * config/srclist.txt (COPYING.DOC): no longer available from
18540         /gd/gnuorg; don't know where the ultimate source is.
18541
18542 2003-10-25  Paul Eggert  <eggert@twinsun.com>
18543
18544         Fix several address-calculation bugs in the hash modules,
18545         plus some minor code cleanup.
18546
18547         * lib/hash.h: Include <stdbool.h>, for bool.
18548         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
18549         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
18550         hash_get_n_entries, hash_get_max_bucket_length,
18551         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
18552         hash_rehash): Use size_t rather than unsigned.
18553         * lib/hash.c (struct hash_table, hash_get_n_buckets,
18554         hash_get_n_buckets_used, hash_get_n_entries,
18555         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
18556         hash_get_entries, hash_do_for_each, hash_string, is_prime,
18557         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
18558         Likewise.
18559         (SIZE_MAX): Define if not defined.
18560         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
18561         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
18562         hash_print):
18563         Use const * when possible.
18564         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
18565         (check_tuning): Fix bug: if tuning parameters were very close to
18566         0 or 1, rounding errors could have caused subscript violations.
18567         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
18568         (hash_initialize): Add 'fail:' label
18569         to free table and return NULL, and use it to simplify code.
18570         Use calloc rather than clearing the storage ourself.
18571         (hash_initialize, hash_rehash): Check for arithmetic overflow in
18572         buffer size calculations.
18573         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
18574         Include <stddef.h>, for size_t.
18575         * lib/hash-pjw.c (hash_pjw): Likewise.
18576         Switch to method described by Bruno Haible.
18577         Include <limits.h>, for CHAR_BIT.
18578         (SIZE_BITS): New macro.
18579
18580 2003-10-23  Paul Eggert  <eggert@twinsun.com>
18581
18582         * m4/getline.m4 (AM_FUNC_GETLINE):
18583         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
18584         hosts.  Problem reported by Derek Robert Price in
18585         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
18586         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
18587         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
18588
18589 2003-10-21  Paul Eggert  <eggert@twinsun.com>
18590
18591         * lib/getndelim2.c (getndelim2): When size calculation overflows,
18592         ceiling the allocation at NMAX bytes rather than silently
18593         discarding input bytes before NMAX is reached.  This makes
18594         a difference only if NMAX exceeds SIZE_MAX / 2.
18595
18596         * lib/obstack.c: Merge from glibc.
18597         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
18598         Add libc_hidden_def (_obstack_newchunk).
18599         (_obstack_free) [! defined _LIBC]: Remove.
18600         [defined _LIBC]: Make a strong alias from obstack_free, rather than
18601         a clone of the function body.
18602         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
18603         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
18604
18605         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
18606         glibc.
18607         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
18608         arg to memcpy.
18609
18610         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
18611         (obstack_ptr_grow_fast, obstack_int_grow_fast):
18612         Don't use lvalue casts, as GCC plans to remove support for them
18613         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
18614         was also present in the non-GCC version, indicating that this
18615         code had always been buggy and had never been widely used.
18616         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
18617         Use the fast variant of each macro, rather than copying the
18618         definiens of the fast variant; that way, we'll be more likely to
18619         catch future bugs in the fast variants.
18620
18621 2003-10-20  Bruno Haible  <bruno@clisp.org>
18622
18623         * modules/wait-process: New file.
18624         * MODULES.html.sh (func_all_modules): Add wait-process.
18625
18626 2003-10-20  Bruno Haible  <bruno@clisp.org>
18627
18628         * m4/wait-process.m4: New file.
18629
18630 2003-10-20  Bruno Haible  <bruno@clisp.org>
18631
18632         * lib/wait-process.h: New file, from GNU gettext.
18633         * lib/wait-process.c: New file, from GNU gettext.
18634
18635 2003-10-19  Jim Meyering  <jim@meyering.net>
18636
18637         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
18638         HPUX 10.20.
18639
18640 2003-10-18  Karl Berry  <karl@gnu.org>
18641
18642         * config/config.guess: update from config.
18643
18644 2003-10-16  Paul Eggert  <eggert@twinsun.com>
18645
18646         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
18647         (getgroups): First arg is int, not size_t.
18648         Don't let 'free' mangle errno.
18649
18650 2003-10-16  Paul Eggert  <eggert@twinsun.com>
18651
18652         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
18653
18654 2003-10-16  Karl Berry  <karl@gnu.org>
18655
18656         * config/config.{guess,sub}: update from config.
18657
18658 2003-10-16  Jim Meyering  <jim@meyering.net>
18659
18660         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
18661         memcpy.
18662
18663 2003-10-15  Paul Eggert  <eggert@twinsun.com>
18664
18665         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
18666         (SIZE_MAX): Remove.
18667         (new_exclude, add_exclude_file): Initial size no longer needs to
18668         be a power of 2.
18669         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
18670         our own address arithmetic overflow checking.
18671
18672         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
18673         (fnmatch): Do not alloca more than 2000 wide characters;
18674         instead, use malloc for large buffers.
18675         Check for address arithmetic overflow, and return -1
18676         with errno set to ENOMEM in that case.
18677         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
18678         (NEW_PATTERN): Do not alloca more than 8000 bytes;
18679         instead, return -1.  Check for address arithmetic overflow.
18680
18681 2003-10-14  Paul Eggert  <eggert@twinsun.com>
18682
18683         Handle invalid suffixes and overflow independently, so that
18684         callers can treat them independently as needed.  Fix some bugs in
18685         suffix handling, e.g., "100k@" was not diagnosed as an invalid
18686         suffix for a human-readable blocksize.  The major caller-visible
18687         change is the addition of a new
18688         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
18689         that both overflow and suffix chars were found.
18690
18691         * lib/human.c (humblock): Don't check separately for invalid suffix
18692         char; that is xstrtoumax's job (now that its bug is fixed).
18693         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
18694         INTMAX_MAX]: New macros.
18695         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
18696         TYPE_MAXIMUM): New macros.
18697         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
18698         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
18699         if overflow occurs, as it's what __strtol does and it's more useful
18700         in practice.
18701         (__xstrtol): If __strtol reports some error other than ERANGE,
18702         reflect it to the caller as LONGINT_INVALID.  If it reports
18703         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
18704         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
18705         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
18706         value.
18707         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
18708         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
18709         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
18710         [defined UINTMAX_MAX]: New macros.
18711
18712 2003-10-14  Bruno Haible  <bruno@clisp.org>
18713
18714         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
18715
18716 2003-10-14  Bruno Haible  <bruno@clisp.org>
18717
18718         * m4/sig_atomic_t: New file, from GNU gettext.
18719         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
18720
18721 2003-10-14  Bruno Haible  <bruno@clisp.org>
18722
18723         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
18724         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
18725         Also use volatile where needed.
18726
18727 2003-10-12  Paul Eggert  <eggert@twinsun.com>
18728
18729         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
18730         Change maintainer from Bruno Haible to 'all'.
18731
18732 2003-10-12  Paul Eggert  <eggert@twinsun.com>
18733
18734         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
18735
18736 2003-10-12  Paul Eggert  <eggert@twinsun.com>
18737
18738         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
18739         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
18740         and define in terms of the other primitives.
18741         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
18742         (SIZE_MAX): Define if not already defined.
18743         (array_size_overflow): New function.
18744         (xalloc_die): Abort instead of exiting if 'error' returns.
18745         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
18746         (xmalloc, xrealloc): Use them.
18747         (xcalloc): Check for address arithmetic overflow.
18748         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
18749         a bit faster than strcpy.
18750
18751 2003-10-10  Simon Josefsson  <jas@extundo.com>
18752
18753         * modules/argp (Depends-on): Add restrict and strcase.
18754
18755 2003-10-10  Simon Josefsson  <jas@extundo.com>
18756
18757         * m4/argp.m4: Add AC_C_INLINE.
18758
18759 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18760
18761         Merge getpass from libc, plus a few fixes.
18762
18763         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
18764         Include <stdbool.h>.
18765         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
18766         __fsetlocking to empty.
18767         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
18768         do include <bits/libc-lock.h>.
18769         Do not include <fcntl.h>; not needed.
18770         [_LIBC]: Include <wchar.h>.
18771         (NOTCANCEL_MODE): New macro.
18772         (flockfile, funlockfile) [_LIBC]: New macros.
18773         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
18774         [!_LIBC]: New macros.
18775         (call_fclose): New function.
18776         (getpass): Use it.  Save tty stream separately; this simplifies the
18777         code and makes it more reliable if stdin happens to equal stdout.
18778         Invoke __fsetlocking on tty.
18779         Handle thread cancellation if needed.
18780         Namespace cleanup (use __tcgetattr, __getline).
18781         Use bool for Booleans.
18782         [USE_IN_LIBIO]: Handle wide streams.
18783         [!_LIBC]: Unconditionally do the fseek, since we don't know what
18784         stream might go where.
18785
18786         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
18787         doesn't have to include <stdio.h> before us.
18788         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
18789         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
18790         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
18791         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
18792         if not declared, so that we can use getpass.c code from libc without
18793         rewriting it.
18794         (flockfile, ftrylockfile, funlockfile): New macros.
18795
18796 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18797
18798         * modules/getpass: Depend on stdbool.
18799
18800 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18801
18802         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
18803
18804 2003-10-07  Karl Berry  <karl@gnu.org>
18805
18806         * config/config.{guess,sub}: update from config.
18807
18808 2003-10-06  Jim Meyering  <jim@meyering.net>
18809             Bruno Haible  <bruno@clisp.org>
18810
18811         This lets translators provide better translations for the
18812         "Written by ..." part of --version output.
18813         * lib/version-etc.h: Include stdarg.h.
18814         (version_etc_copyright): Declare as readonly.
18815         (version_etc): Make this function variadic with a NULL-terminated list
18816         of author name strings.
18817         (version_etc_va): New declaration.
18818         * lib/version-etc.c: Include stdarg.h, stdlib.h.
18819         (version_etc_copyright): Declare as readonly.
18820         (version_etc_va): New function. Provide a different translatable string
18821         for each possible number of authors < 10. Abbreviate when there are 10
18822         authors or more.
18823         (version_etc): Make this function variadic. Call version_etc_va.
18824         Suggestion from Gary V. Vaughan.
18825
18826         * lib/long-options.h (parse_long_options): Change prototype: the
18827         authors string is moved to the end and becomes variadic.
18828         * lib/long-options.c: Include stdarg.h.
18829         (parse_long_options): Make this function variadic, too.
18830         Call version_etc_va, not version_etc.
18831
18832 2003-10-06  Bruno Haible  <bruno@clisp.org>
18833
18834         * modules/version-etc-2: Remove file.
18835         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
18836
18837 2003-10-06  Bruno Haible  <bruno@clisp.org>
18838
18839         * modules/fatal-signal: New file.
18840         * MODULES.html.sh (func_all_modules): Add fatal-signal.
18841
18842 2003-10-06  Bruno Haible  <bruno@clisp.org>
18843
18844         * m4/fatal-signal.m4: New file.
18845         * m4/signalblocking.m4: New file, from GNU gettext.
18846
18847 2003-10-06  Bruno Haible  <bruno@clisp.org>
18848
18849         * lib/version-etc-2.h: Remove file.
18850         * lib/version-etc-2.c: Remove file.
18851
18852 2003-10-06  Bruno Haible  <bruno@clisp.org>
18853
18854         * lib/fatal-signal.h: New file, from GNU gettext.
18855         * lib/fatal-signal.c: New file, from GNU gettext.
18856
18857 2003-10-05  Paul Eggert  <eggert@twinsun.com>
18858
18859         * README: Rework advice for preventing empty .o files.
18860         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
18861         not <sys/types.h>.
18862
18863 2003-10-04  Karl Berry  <karl@gnu.org>
18864
18865         * lib/argp*: update from libc.
18866
18867 2003-10-04  Karl Berry  <karl@gnu.org>
18868
18869         * config/config.{guess,sub}: update from config.
18870
18871 2003-10-02  Bruno Haible  <bruno@clisp.org>
18872
18873         * modules/lchown (Include): Add lchown.h.
18874         * modules/time_r (Include): Use "..." syntax.
18875         * modules/xgetdomainname (Include): Add xgetdomainname.h.
18876
18877 2003-10-01  Simon Josefsson  <jas@extundo.com>
18878
18879         * MODULES.html.sh (func_all_modules): Move gethostname from section
18880         'based on' to section 'lacking' POSIX:2001.
18881
18882 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
18883
18884         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
18885         to output mode on the same stream.
18886
18887 2003-09-29  Paul Eggert  <eggert@twinsun.com>
18888
18889         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
18890         Fix arg typo in previous patch.
18891
18892 2003-09-28  Jim Meyering  <jim@meyering.net>
18893
18894         * lib/error.c: Correct cpp indentation.
18895
18896 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18897
18898         * modules/free: New file.
18899
18900 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18901
18902         * m4/free.m4: New file.
18903
18904 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18905
18906         * lib/minmax.h (MIN, MAX)
18907         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
18908         Omit the special code that used __typeof__, since we worry that
18909         it could be more trouble than it's worth.  See:
18910         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
18911         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
18912
18913         * lib/free.c: New file.
18914
18915 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
18916
18917         Trivial fixes to Makefile.am parts of module listings.
18918         * modules/strstr: Append strstr.h to lib_SOURCES.
18919         * modules/strcase: Likewise, for strcase.h.
18920
18921 2003-09-27  Karl Berry  <karl@gnu.org>
18922
18923         * config/mkinstalldirs: update from automake.
18924
18925 2003-09-26  Paul Eggert  <eggert@twinsun.com>
18926
18927         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
18928         (error_tail): Do not loop, reallocating temporary buffer, since
18929         the output cannot contain more wide characters than the input
18930         contains bytes, the size must be big enough already.  This avoids
18931         one potential size overflow calculation.  Check for size overflow
18932         when calculating temporary buffer size.  Free temporary buffer
18933         when done, if it was allocated with malloc; this plugs a memory
18934         leak.  Remove casts from void * to pointers, that are no longer
18935         needed now that we're assuming C89 or better.
18936
18937         Merge error changes from glibc.
18938
18939         * lib/error.c, error.h: Update copyright notice header to match glibc.
18940         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
18941         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
18942         Disable cancellation while printing error.
18943         * lib/error.h: Prepend __ to parameter names.
18944
18945 2003-09-26  Jim Meyering  <jim@meyering.net>
18946
18947         * lib/error.c (error_tail): Move some declarations
18948         into inner scope where the local variables are used.
18949
18950 2003-09-26  Bruno Haible  <bruno@clisp.org>
18951
18952         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
18953         stpncpy().
18954         Don't define stpncpy through config.h; it's now done through stpncpy.h.
18955
18956 2003-09-26  Bruno Haible  <bruno@clisp.org>
18957
18958         * lib/stpncpy.h (gnu_stpncpy): New declaration.
18959         (stpncpy): Define as alias for gnu_stpncpy.
18960         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
18961
18962 2003-09-25  Simon Josefsson  <jas@extundo.com>
18963
18964         * lib/xgetdomainname.h: New file.
18965         * lib/xgetdomainname.c: New file.
18966
18967 2003-09-25  Simon Josefsson  <jas@extundo.com>
18968             Bruno Haible  <bruno@clisp.org>
18969
18970         * modules/getdomainname: New file.
18971         * modules/xgetdomainname: New file.
18972         * MODULES.html.sh (func_all_modules): Add getdomainname,
18973         xgetdomainname.
18974
18975 2003-09-25  Simon Josefsson  <jas@extundo.com>
18976             Bruno Haible  <bruno@clisp.org>
18977
18978         * m4/getdomainname.m4: New file.
18979
18980 2003-09-25  Simon Josefsson  <jas@extundo.com>
18981             Bruno Haible  <bruno@clisp.org>
18982
18983         * lib/getdomainname.h: New file.
18984         * lib/getdomainname.c: New file.
18985
18986 2003-09-25  Karl Berry  <karl@gnu.org>
18987
18988         * lib/argp-fmtstream.c, argp-help.c: update from libc.
18989
18990 2003-09-25  Karl Berry  <karl@gnu.org>
18991
18992         * config/install-sh: update from automake.
18993
18994 2003-09-25  Bruno Haible  <bruno@clisp.org>
18995
18996         * modules/version-etc-2: New file, from modules/version-etc with
18997         modifications.
18998         * MODULES.html.sh (func_all_modules): Add version-etc-2.
18999
19000 2003-09-25  Bruno Haible  <bruno@clisp.org>
19001
19002         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
19003         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
19004
19005 2003-09-24  Simon Josefsson  <jas@extundo.com>
19006
19007         * modules/xgethostname: Add xgethostname.h.
19008
19009 2003-09-24  Paul Eggert  <eggert@twinsun.com>
19010
19011         * lib/linebuffer.c (freebuffer): Don't free the argument, just
19012         the buffer associated with the argument.  Bug reported by
19013         Simon Josefsson.
19014
19015 2003-09-24  Paul Eggert  <eggert@twinsun.com>
19016
19017         * README: Document assumptions that 'int' is at least 32 bits
19018         wide, that integer arithmetic is 2's complement without overflow,
19019         that there are no holes in integer values, that adding sizes of
19020         two nonoverlapping objects can't overflow, and that all-bits-zero
19021         yields scalar zero.  Fix spelling and capitalization typos.
19022
19023 2003-09-19  Karl Berry  <karl@gnu.org>
19024
19025         * lib/argp.h: update from libc.
19026
19027 2003-09-17  Paul Eggert  <eggert@twinsun.com>
19028
19029         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
19030         to avoid spurious warnings like "AC_RUN_IFELSE was called before
19031         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
19032
19033 2003-09-17  Paul Eggert  <eggert@twinsun.com>
19034
19035         * gnulib-tool: Use "test -h", not "test -L", for portability
19036         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
19037         (tags_regexp): Remove, since \| doesn't conform to POSIX.
19038         (sed_extract_prog): Issue s commands one-by-one, rather than
19039         using \| in one s command.
19040
19041 2003-09-16  Paul Eggert  <eggert@twinsun.com>
19042
19043         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
19044         input error, instead of returning NULL the next time we are called
19045         (and therefore losing track of errno).
19046
19047 2003-09-16  Bruno Haible  <bruno@clisp.org>
19048
19049         * gnulib-tool (func_create_testdir): Warn about duplicated
19050         dependencies.
19051
19052 2003-09-15  Paul Eggert  <eggert@twinsun.com>
19053
19054         * modules/argmatch, modules/fatal, modules/obstack,
19055         modules/xalloc, modules/xgethostname: Sort dependencies by
19056         importance, not alphabetically.
19057
19058 2003-09-15  Paul Eggert  <eggert@twinsun.com>
19059
19060         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
19061         fails, so that the caller gets the proper errno.
19062
19063         * lib/readutmp.c (read_utmp): Likewise.
19064         Check for fstat error.  Close stream and free storage
19065         when failing.
19066
19067 2003-09-14  Karl Berry  <karl@gnu.org>
19068
19069         * config/srclist.txt (strdup.c): disable for c89 changes.
19070
19071 2003-09-14  Jim Meyering  <jim@meyering.net>
19072
19073         * lib/getloadavg.c: Correct cpp indentation.
19074         * lib/strdup.c: Likewise.
19075         * lib/vasnprintf.c: Likewise.
19076
19077 2003-09-14  Bruno Haible  <bruno@clisp.org>
19078
19079         * modules/fwriteerror: New file.
19080         * MODULES.html.sh (func_all_modules): Add fwriteerror.
19081
19082 2003-09-14  Bruno Haible  <bruno@clisp.org>
19083
19084         * lib/fwriteerror.h: New file.
19085         * lib/fwriteerror.c: New file.
19086
19087 2003-09-12  Paul Eggert  <eggert@twinsun.com>
19088
19089         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
19090         modules/xgethostname, modules/xalloc: Depend on exit.
19091
19092 2003-09-12  Paul Eggert  <eggert@twinsun.com>
19093
19094         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
19095
19096         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
19097         and AC_MINIX, too, so that their extensions are available.
19098
19099         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
19100         This macro has been superseded by gl_BACKUPFILE.
19101
19102         More patches to assume C89 or better.
19103
19104         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
19105
19106         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
19107         unconditionally.
19108         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
19109         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
19110         Include <string.h>, <stdlib.h> unconditionally.
19111         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
19112         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
19113         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
19114         headers or for string.h.
19115         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
19116         or strtoul.
19117
19118         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
19119         headers.
19120         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
19121         * m4/userspec.m4 (gl_USERSPEC): Likewise.
19122         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
19123         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
19124         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
19125         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
19126         memcpy, memset.
19127         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
19128         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
19129         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
19130         strtol.
19131         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
19132         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
19133         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
19134         strtoul.
19135
19136 2003-09-12  Paul Eggert  <eggert@twinsun.com>
19137
19138         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
19139         * lib/obstack.c [!defined _LIBC]: Likewise.
19140         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
19141         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
19142         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
19143
19144         More changes to assume C89 or better.
19145
19146         * lib/error.c (error_tail): Assume vprintf.
19147
19148         * lib/argmatch.c (getenv): Remove decl.
19149         * lib/progreloc.c (get_full_program_name): Define via prototype.
19150         * lib/setenv.c (clearenv): Likewise.
19151         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
19152         needed.
19153         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
19154         (malloc, memcpy): Remove decls.
19155         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
19156         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
19157         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
19158         (memcpy): Remove macro.
19159         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
19160         (__P): Remove.  All uses removed.
19161         (PTR): Remove.  All uses changed to void *.
19162         (CHAR_BIT, NULL): Remove.
19163         (spaces, zeros, memset_space, memset_zero)
19164         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
19165         Remove.
19166         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
19167         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
19168         Define with prototype.
19169         Remove now-unnecessary prototype decl.
19170         (extra_args_spec): Assume ANSI C.  All uses changed.
19171         (extra_args_spec_iso): Remove.
19172         (my_strftime, emacs_strftimeu): Define via prototype.
19173         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
19174         unconditionally.
19175         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
19176         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
19177         (strtoul, strtol): Remove decls.
19178         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
19179         LONG_MAX): Remove.
19180         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
19181         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
19182         (LOCALE_PARAM_PROTO): New macro.
19183         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
19184         (INTERNAL (strtol), strtol): Define with a prototype.
19185         (PARAMS): Remove.  All uses removed.
19186         * lib/tempname.c: Include <string.h> unconditionally.
19187         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
19188         * lib/xgethostname.c (main): Define with a prototype.
19189         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
19190         Include <stdlib.h> unconditionally.
19191         (calloc, malloc, realloc, free): Remove decls.
19192         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
19193         Include <stdlib.h> unconditionally.  Sort include file names.
19194         (strtod): Remove.
19195         (xstrtod): Define with a prototype.
19196         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
19197         (strtol, strtoul): Remove decls.
19198
19199 2003-09-11  Paul Eggert  <eggert@twinsun.com>
19200
19201         More patches to assume C89 or better.
19202         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
19203         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
19204         string.h, memchr, STDC_HEADERS.
19205
19206 2003-09-11  Paul Eggert  <eggert@twinsun.com>
19207
19208         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
19209         Include <stdlib.h>, <string.h> unconditionally.
19210         Remove now-unnecessary cast to char *.
19211         * lib/strnlen.c: Include <string.h> unconditionally.
19212         * lib/yesno.c (yesno): Define with a prototype.
19213
19214 2003-09-11  Bruno Haible  <bruno@clisp.org>
19215
19216         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
19217
19218 2003-09-10  Jim Meyering  <jim@meyering.net>
19219
19220         * lib/error.c: Correct indentation of cpp directives.
19221
19222 2003-09-10  Bruno Haible  <bruno@clisp.org>
19223
19224         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
19225         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
19226         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
19227         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
19228         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
19229         <stdlib.h> and <string.h> checks.
19230         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
19231         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
19232
19233 2003-09-10  Bruno Haible  <bruno@clisp.org>
19234
19235         * lib/strcspn.c: Include <string.h> unconditionally.
19236         * lib/strpbrk.c: Include <string.h> unconditionally.
19237         * lib/strstr.c: Include <string.h> unconditionally.
19238         * lib/unicodeio.c: Include <string.h> unconditionally.
19239         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
19240         * lib/unsetenv.c: Likewise.
19241         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
19242         * lib/yesno.c: Include <stdlib.h> unconditionally.
19243         (rpmatch): Add prototype.
19244
19245 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19246
19247         More patches to assume C89 or better.
19248         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
19249         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
19250         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
19251         or for string.h.
19252         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
19253         stdlib.h.
19254         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
19255         C headers.
19256         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
19257         string.h.
19258         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
19259         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
19260         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
19261         or for string.h.
19262         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
19263         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
19264         C headers.
19265         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
19266         memcpy.
19267         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
19268         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
19269         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
19270         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
19271         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
19272         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
19273         string.h, free.
19274         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
19275         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
19276         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
19277         C headers, or for string.h.
19278         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
19279         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
19280         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
19281         headers, memory.h, stdlib.h, string.h, strings.h.
19282         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
19283         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
19284         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
19285         strchr.
19286         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
19287         headers, memory.h, string.h.
19288         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
19289         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
19290         free.
19291         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
19292         headers.
19293         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
19294         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
19295         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
19296         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
19297         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
19298
19299 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19300
19301         More K&R removal.
19302
19303         * lib/acosl.c (main): Use a prototype.
19304         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
19305         tanl.c: Likewise.
19306
19307         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
19308
19309         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
19310         (getopt, etopt_long, getopt_long_only, _getopt_internal)
19311         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
19312         with a prototype.
19313         * lib/getopt.c (const): Remove macro.
19314         Include <string.h> unconditionally.
19315         (my_index): Remove; all uses changed to strchr.
19316         (strlen): Remove decl.
19317         (exchange): Remove forward decl; no longer needed.
19318         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
19319         Define with prototype.
19320         * lib/getopt1.c (const): Remove macro.
19321         (getopt_long, getopt_long_only, main): Define with prototype.
19322
19323         * lib/getugroups.c: Include <string.h> unconditionally.
19324
19325         * lib/getusershell.c: Include <stdlib.h> unconditionally.
19326         (getusershell, setusershell, endusershell, readname, main):
19327         Define with prototypes.
19328
19329         * lib/group-member.c: Include group-member.h first.
19330         Include <stdlib.h> unconditionally.
19331
19332         * lib/hard-locale.c: Include hard-locale.h first.
19333         Include <stdlib.h>, <string.h> unconditionally.
19334
19335         * lib/hash.c (free, malloc): Remove decls.
19336         Include <stdlib.h> unconditionally.
19337
19338         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
19339         (getenv): Do not declare.
19340
19341         * lib/idcache.c: Include <string.h> unconditionally.
19342
19343         * lib/long-options.c: Include long-options.h first, to test interface.
19344         Include <stdlib.h> unconditionally.
19345
19346         * lib/makepath.c: Include makepath.h first, to test interface.
19347         Include <stdlib.h> and <string.h> unconditionally.
19348
19349         * lib/linebuffer.c: Include <stdlib.h>.
19350         (free): Remove decl.
19351
19352         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
19353         stddef.h. rpl_malloc returns void *, not char *.
19354         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
19355         prototype.
19356
19357         * lib/md5.h: Include <limits.h> unconditionally.
19358         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
19359         (__P): Remove; all uses removed.
19360         * lib/md5.c: Include "md5.h" first.
19361         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
19362         md5_buffer, md5_process_bytes, md5_process_block):
19363         Define with prototypes.
19364         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
19365         * lib/sha.c: Include "sha.h" first.
19366         Include <stdlib.h>, <string.h> unconditionally.
19367
19368         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
19369         * lib/memcmp.c (__ptr_t): Likewise.
19370         * lib/memrchr.c (__ptr_t): Likewise.
19371         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
19372         Include <string.h> unconditionally.
19373         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
19374         * lib/memchr.c: Include <stdlib.h> unconditionally.
19375         * lib/memchr.c (LONG_MAX): Remove.
19376         * lib/memrchr.c (LONG_MAX): Likewise.
19377         * lib/memchr.c (__memchr): Define via a prototype.
19378         * lib/memrchr.c (__memrchr): Likewise.
19379         * lib/memcmp.c (__P): Remove, and remove all uses.
19380         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
19381         Remove forward decls; no longer needed.
19382         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
19383         Use types required by C89 in prototype.
19384
19385         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
19386         * lib/savedir.c: Likewise.
19387         * lib/mkdir.c (free): Remove decl.
19388         * lib/rmdir.c (rmdir): Define with a prototype.
19389         * lib/savedir.c: Include savedir.h first, to test interface.
19390
19391         * lib/mktime.c (STDC_HEADERS): Remove.
19392         Include <stdlib.h>, <string.h> unconditionally.
19393
19394         * lib/modechange.c: Include <stdlib.h> unconditionally.
19395         (malloc): Remove decl.
19396
19397         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
19398         (free): Remove decl.
19399
19400         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
19401         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
19402         (This type really should be intptr_t, but that's a C99ism.)
19403         (_obstack_memcpy): Remove: all uses changed to memcpy.
19404         Include <string.h> unconditionally.
19405         (struct obstack): Assume __STDC__ for types of members
19406         chunkfun, freefun, extra_arg.
19407         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
19408         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
19409         obstack_begin, obstack_specify_allocation,
19410         obstack_specify_allocation_with_arg, obstack_chunkfun,
19411         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
19412         Remove unprototyped decls and the macros that use them.
19413         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
19414         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
19415         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
19416         (defined __STDC__ && __STDC__)]:
19417         Remove nonprototyped code.
19418         Include <stdlib.h> unconditionally.
19419         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
19420         _obstack_allocated_p, _obstack_free, obstack_free,
19421         _obstack_memory_used, print_and_abort):
19422         Define using prototypes.
19423         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
19424         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
19425         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
19426         obstack_next_free, obstack_object_size, obstack_room) [0]:
19427         Remove unused, unprototyped code.
19428
19429         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
19430
19431         * lib/physmem.c (physmem_total, physmem_available, main): Define
19432         with prototypes.
19433
19434         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
19435         (main): Define with a prototype.
19436
19437         * lib/posixver.c (getenv): Remove decl.
19438
19439         * lib/putenv.c (malloc): Returns void *, not char *.
19440         Include <string.h> unconditionally.
19441         (strchr, memcpy, NULL): Do not define.
19442
19443         * lib/readtokens.c: Include readtokens.h first, to test interface.
19444         Include <stdlib.h>, <string.h> unconditionally.
19445         (init_tokenbuffer): Define with a prototype.
19446
19447         * lib/regex.c (PARAMS): Remove.  All uses removed.
19448         All uses of _RE_ARGS removed, too.
19449         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
19450         unconditionally.
19451         (bzero): Assume memset exists.
19452         (memcmp, memcpy, NULL): Remove.
19453         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
19454         char, or assignments to local vars of type signed char.
19455         (init_syntax_once, PREFIX(extract_number_and_incr),
19456         PREFIX(print_partial_compiled_pattern),
19457         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
19458         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
19459         PREFIX(regex_grow_registers), PREFIX(regex_compile),
19460         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
19461         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
19462         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
19463         wcs_compile_range, byte_compile_range, truncate_wchar,
19464         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
19465         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
19466         count_mbs_length, wcs_re_match_2_internal,
19467         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
19468         PREFIX(alt_match_null_string_p),
19469         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
19470         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
19471         regfree, PREFIX(extract_number)): Define with prototype.  Remove
19472         now-unnecessary declaration, if any.
19473         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
19474         regcomp, regexec):
19475         Remove now-unnecessary casts among pointer types.
19476         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
19477
19478         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
19479         (free): Remove decl.
19480
19481         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
19482
19483         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
19484         (free): Remove decl.
19485
19486         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
19487         * lib/xgetcwd.c: Likewise.
19488
19489         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
19490         (free): Remove decl.
19491
19492         * lib/strchrnul.c (strchrnul): Define with a prototype.
19493         Fix bug: c_in was not converted to char before searching.
19494
19495         The following changes are not K&R related:
19496
19497         * lib/group-member.h: Include <sys/types.h>, so that this file is
19498         self-contained.
19499         * lib/makepath.h: Likewise.
19500
19501         * lib/getusershell.c (readname, default_index, line_size, readname):
19502         Use size_t, not int, for sizes.
19503         (readname): If the size overflows, report an error instead of
19504         looping forever.
19505
19506 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19507
19508         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
19509         libc.
19510
19511 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19512
19513         * README: New section: portability guidelines.
19514
19515 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
19516
19517         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
19518         C89 spec.
19519
19520 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
19521
19522         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
19523
19524 2003-09-08  Paul Eggert  <eggert@twinsun.com>
19525
19526         Assume C89 or better; remove K&R cruft.
19527         A few of these changes were first proposed by Derek Robert Price
19528         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
19529
19530         * lib/addext.c: Include <string.h> unconditionally.
19531         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
19532         Don't declare getenv or malloc.
19533
19534         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
19535         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
19536         (NULL): Remove.
19537         (find_stack_direction, alloca): Use prototypes.
19538
19539         * lib/atexit.c (atexit): Define using a prototype.
19540
19541         * lib/basename.c, dirname.c, stripslash.c:
19542         Include <string.h> unconditionally.
19543
19544         * lib/bcopy.c: Include <stddef.h>.
19545         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
19546
19547         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
19548
19549         * lib/error.h (error, error_at_line, error_print_progname)
19550         [! (defined (__STDC__) && __STDC__)]: Remove decls.
19551         * lib/error.c: Include error.h first, to check interface.
19552         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
19553         (VA_START): Remove; all uses changeed to va_start.
19554         (exit, strerror): Remove decls.
19555         (error_print_progname): Prototype uncondionally.
19556         Don't include <errno.h>; no longer needed.
19557         (private_strerror): Remove.
19558         (error_tail): Always define.
19559         (error, error_at_line): Assume C89 or better; always use prototypes.
19560         * lib/fatal.c: Include "fatal.h" first, to test interface.
19561         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
19562         (VA_START): Remove; all uses changed to va_start.
19563         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
19564         this case.
19565         (exit): Remove decl.
19566         (fatal): Prototype unconditionally.  Assume va_start works.
19567         Abort at end, to pacify gcc.
19568
19569         * lib/euidaccess.c (main): Define with a prototype.
19570
19571         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
19572
19573         * lib/exitfail.c: Include <stdlib.h> unconditionally.
19574
19575         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
19576         prototypes.
19577         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
19578         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
19579         (getenv): Remove decl.
19580         (fnmatch): Define using a prototype.
19581         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
19582         (FCT): Define using a prototype.
19583
19584         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
19585
19586         * lib/gethostname.c: Include <stddef.h>.
19587         (gethostname): Define with prototype.  Length is size_t, not int.
19588
19589 2003-09-08  Paul Eggert  <eggert@twinsun.com>
19590
19591         Assume C89 or better; remove K&R cruft.
19592         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
19593         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
19594         string.h, getenv, malloc.
19595         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
19596         headers.
19597         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
19598         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
19599         do not check for strerror.
19600         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
19601         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
19602         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
19603         do not check for doprnt or vprintf.
19604         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
19605         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
19606
19607 2003-09-08  Paul Eggert  <eggert@twinsun.com>
19608
19609         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
19610         getversion.c should have been removed then, but was accidentally
19611         preserved.
19612
19613         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
19614         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
19615
19616 2003-09-08  Karl Berry  <karl@gnu.org>
19617
19618         * config/config.sub, config.guess, srclistvars.sh: update from savannah
19619                 config, forget about prep.
19620
19621         * config/depcomp, missing: update from automake.
19622
19623 2003-09-07  Paul Eggert  <eggert@twinsun.com>
19624
19625         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
19626         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
19627
19628 2003-09-07  Paul Eggert  <eggert@twinsun.com>
19629
19630         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
19631         copy_tm_result.  Bug reported by Simon Josefsson in
19632         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
19633
19634 2003-09-06  Paul Eggert  <eggert@twinsun.com>
19635
19636         * m4/time_r.m4: New file.
19637         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
19638         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
19639         is. Check for timegm declaration.
19640         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
19641         Do not check for gmtime_r.
19642         Replace mktime if __mktime_internal does not exist and if mktime
19643         hasn't been replaced already.
19644
19645 2003-09-06  Paul Eggert  <eggert@twinsun.com>
19646
19647         * lib/time_r.c, lib/time_r.h: New files.
19648
19649         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
19650         __localtime_r.
19651         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
19652         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
19653
19654         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
19655         __gmtime_r.
19656         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
19657         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
19658         Include <time_r.h>.
19659
19660         * lib/timegm.c: Switch to glibc implementation, with the following
19661         changes:
19662         [defined HAVE_CONFIG_H]: Include <config.h>.
19663         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
19664         (__mktime_internal) [!defined _LIBC]: New decl.
19665         (__gmtime_r) [!defined _LIBC]: New macro and function.
19666         (timegm): Use a prototype, since gnulib assumes C89.
19667         Do not bother declaring tmp to be const, as it's not really usefu.
19668         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
19669         (timegm): Declare only if HAVE_DECL_TIMEGM.
19670
19671 2003-09-06  Paul Eggert  <eggert@twinsun.com>
19672
19673         * MODULES.html.sh (func_all_modules): Add time_r.
19674         * modules/time_r: New file.
19675         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
19676         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
19677
19678 2003-09-03  Paul Eggert  <eggert@twinsun.com>
19679
19680         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
19681         Bug reported by Lute Kamstra in
19682         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
19683
19684         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
19685         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
19686         course with correspondingly smaller numbers for tomorrow and
19687         yesterday.  From Tadayoshi Funaba.  Originally installed into
19688         sh-utils on 1999-08-07, but the patch got lost (I guess during the
19689         coreutils merge?).
19690
19691 2003-08-31  Simon Josefsson  <jas@extundo.com>
19692
19693         * modules/timegm: New file.
19694         * MODULES.html.sh (func_all_modules): Add timegm.
19695
19696 2003-08-31  Simon Josefsson  <jas@extundo.com>
19697
19698         * m4/timegm.m4: New file.
19699
19700 2003-08-31  Simon Josefsson  <jas@extundo.com>
19701
19702         * lib/timegm.h: New file.
19703         * lib/timegm.c: New file.  Based on
19704         wget-1.8.2/src/http.c:mktime_from_utc.
19705
19706 2003-08-31  Karl Berry  <karl@gnu.org>
19707
19708         * lib/argp.h: update from libc.
19709
19710 2003-08-28  Bruno Haible  <bruno@clisp.org>
19711
19712         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
19713         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
19714         followed by '#define fnmatch fnmatch_posix' gives an error.
19715
19716 2003-08-28  Bruno Haible  <bruno@clisp.org>
19717
19718         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
19719         warning on QNX, which defines O_BINARY to 000000.
19720
19721 2003-08-27  Jim Meyering  <jim@meyering.net>
19722
19723         * m4/mkstemp.m4: Require that the system mkstemp be able to create
19724         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
19725         would fail after 32.  Reported by Danny Levinson.  Details here:
19726         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
19727
19728 2003-08-24  Bruno Haible  <bruno@clisp.org>
19729
19730         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
19731         MSVC7 <stdio.h> is included later.
19732
19733 2003-08-22  Simon Josefsson  <jas@extundo.com>
19734
19735         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
19736
19737 2003-08-20  Karl Berry  <karl@gnu.org>
19738
19739         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
19740
19741 2003-08-20  Bruno Haible  <bruno@clisp.org>
19742
19743         * modules/progname: New file.
19744         * MODULES.html.sh (func_all_modules): Add progname.
19745
19746 2003-08-20  Bruno Haible  <bruno@clisp.org>
19747
19748         * lib/progname.h: New file, from GNU gettext.
19749         * lib/progname.c: New file, from GNU gettext.
19750         * lib/progreloc.c: New file, from GNU gettext.
19751
19752 2003-08-19  Jim Meyering  <jim@meyering.net>
19753
19754         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
19755         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
19756
19757 2003-08-19  Bruno Haible  <bruno@clisp.org>
19758
19759         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
19760         more.
19761
19762 2003-08-19  Bruno Haible  <bruno@clisp.org>
19763
19764         * lib/xstrdup.c: Assume <string.h> exists.
19765
19766 2003-08-18  Paul Eggert  <eggert@twinsun.com>
19767
19768         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
19769         in makefile rules.
19770
19771 2003-08-18  Jim Meyering  <jim@meyering.net>
19772
19773         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
19774         * m4/lib-ld.m4: Likewise.
19775
19776 2003-08-18  Jim Meyering  <jim@meyering.net>
19777
19778         * lib/setenv.h: Indent nested cpp directive.
19779         * lib/vasnprintf.c: Remove trailing blanks.
19780
19781 2003-08-17  Simon Josefsson  <jas@extundo.com>
19782
19783         * modules/xstrndup: New file.
19784         * MODULES.html.sh (func_all_modules): Add xstrndup.
19785
19786 2003-08-17  Simon Josefsson  <jas@extundo.com>
19787
19788         * modules/argp: Fix autoconf macro name. Add more dependencies.
19789
19790 2003-08-17  Simon Josefsson  <jas@extundo.com>
19791
19792         * m4/xstrndup.m4: New file.
19793
19794 2003-08-17  Simon Josefsson  <jas@extundo.com>
19795
19796         * m4/argp.m4: New file.
19797
19798 2003-08-17  Simon Josefsson  <jas@extundo.com>
19799             Bruno Haible  <bruno@clisp.org>
19800
19801         * lib/xstrndup.h: New file.
19802         * lib/xstrndup.c: New file.
19803
19804 2003-08-17  Bruno Haible  <bruno@clisp.org>
19805
19806         * modules/strndup (Files, Include): Add lib/strndup.h.
19807
19808 2003-08-17  Bruno Haible  <bruno@clisp.org>
19809
19810         * modules/euidaccess (Files): Add lib/euidaccess.h.
19811
19812 2003-08-17  Bruno Haible  <bruno@clisp.org>
19813
19814         * lib/strndup.h: New file.
19815
19816 2003-08-17  Bruno Haible  <bruno@clisp.org>
19817
19818         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
19819         like AC_GNU_SOURCE.
19820         * modules/extensions (configure.ac): Comment out the invocation of
19821         gl_USE_SYSTEM_EXTENSIONS.
19822
19823 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19824
19825         Merges from coreutils, etc.
19826         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
19827         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
19828         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
19829         fixing a typo.
19830         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
19831         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
19832
19833 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19834
19835         Document merge from coreutils.
19836         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
19837         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
19838         * modules/utime: Add m4/utimes-null.m4.
19839
19840 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19841
19842         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
19843         space, undoing this 2003-08-12 change:
19844         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
19845
19846 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19847
19848         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
19849         strtoul.c from libc, undoing this 2003-08-12 change:
19850         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
19851
19852 2003-08-16  Jim Meyering  <jim@meyering.net>
19853
19854         Merges from coreutils.
19855         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
19856         prefix.  Adjust cache variables similarly.  Create 500 rather than
19857         just 300 files, to exercise bug on Darwin6.5, too.
19858         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
19859         $missing_dir.
19860         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
19861         AM_SYS_POSIX_TERMIOS.
19862         Reported by mkc@mathdogs.com.
19863         Also change use of $am_cv_sys_posix_termios
19864         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
19865         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
19866         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
19867         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
19868         in /proc/mounts until it finds one with matching device number.  This
19869         is unnecessary when the FILE argument *is* a mount point.  No stat call
19870         is necessary in that case.  So, disable the statvfs-testing code on
19871         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
19872         as RedHat bug# 84846.
19873         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
19874         to 1MB, so as not to render systems with no stack size limit (e.g.,
19875         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
19876         Include <unistd.h>.  On some systems,
19877         it is required for the definition of _SC_PAGESIZE.
19878
19879 2003-08-16  Jim Meyering  <jim@meyering.net>
19880
19881         Merge from coreutils.
19882         * lib/xstrtoimax.c: #else #if -> #elif.
19883         * lib/xstrtoumax.c: Likewise.
19884
19885 2003-08-16  Jim Meyering  <jim@meyering.net>
19886
19887         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
19888         * m4/utimes.m4: Removed.
19889         * m4/utimes-null.m4: Renamed from utimes.m4.
19890
19891         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
19892         to 1MB, so as not to render systems with no stack size limit (e.g.,
19893         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
19894         Include <unistd.h>.  On some systems,
19895         it is required for the definition of _SC_PAGESIZE.
19896
19897 2003-08-16  Jim Meyering  <jim@meyering.net>
19898         and Paul Eggert  <eggert@cs.ucla.edu>
19899
19900         Merges from coreutils, etc.
19901
19902         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
19903         using the latest version from cvs.  This avoids problems with #line
19904         directives using a vendor (Sun) compiler.
19905         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
19906         Don't set GETGROUPS_LIB here; now it's
19907         done via getgroups.m4's wrapper function.
19908         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
19909         rather than just in sh-util/configure.in, so that the
19910         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
19911         same.
19912         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
19913         AC_FUNC_GETLOADAVG where to find getloadavg.c.
19914         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
19915         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
19916         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
19917         Remove code that is now done by the newly-required macros.
19918         Append $(EXEEXT) to DF_PROG.
19919         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
19920         Do not invoke or require the following here,
19921         since prereq.m4 or some gnulib .m4 now does this for us:
19922         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
19923         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
19924         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
19925         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
19926         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
19927         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
19928         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
19929         AC_FUNC_OBSTACK.
19930         Do not replace the following functions, as this is now the job
19931         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
19932         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
19933         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
19934         atexit getpass, strdup, getpagesize.
19935         Replace 'raise'.
19936         Do not check for the following functions, as this is now the job
19937         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
19938         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
19939         setregid.
19940         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
19941         Check for sys/sysctl.h.
19942         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
19943         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
19944         of checking for ssize_t ourselves.
19945
19946         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
19947         Require every macro that gnulib/modules/* suggests for us.
19948         (jm_PREREQ_ADDEXT): New macro.
19949         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
19950         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
19951
19952         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
19953         (gl_PHYSMEM): Use it.
19954         Also check for `table' function.
19955         Check for new headers and functions.
19956         Add check for sys/sysmp.h.
19957         With suggestions from Kaveh Ghazi.
19958         Ignore headers that are present but cannot be compiled.  This
19959         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
19960         C 5.4.
19961
19962 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19963
19964         Document merge from coreutils.
19965         * modules/userspec: Depend on posixver.
19966         * modules/strftime: Depend on tzset.
19967
19968 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19969
19970         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
19971         rather than tab, after '#' in shell-script copyright notices.
19972         Suggested by Bruno Haible.
19973
19974 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19975
19976         * config/srclist-update: Use three spaces, rather than tab, after '#'
19977         in shell-script copyright notices.  Suggested by Bruno Haible.
19978         Remove unnecessary parenthesization in regular expression.
19979
19980 2003-08-15  Jim Meyering  <jim@meyering.net>
19981
19982         Merge from coreutils.
19983         * lib/xgethostname.c: Include <stdlib.h>.
19984         (xghostname): Don't exit for anything other than memory-related
19985         failure; just return NULL.
19986         * lib/userspec.c: Include "posixver.h".
19987         (parse_user_spec): Accept `.' as a separator only
19988         in pre-POSIX-200112 mode.
19989         * lib/strtoimax.c: Use #elif rather than #else #if.
19990         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
19991         Remove function, now that we can rely on a working tzset function.
19992         [!_LIBC]: Ensure that the required autoconf test has been run.
19993         [!defined _NL_CURRENT && HAVE_STRFTIME]:
19994         Use underlying_strftime for %r.
19995         * lib/sha.c: Merge in some clean-up and optimization changes from
19996         glibc.
19997         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
19998         Ensure that it is a multiple of 64.
19999         Rearrange loop exit tests so as to avoid performing an
20000         additional fread after encountering an error or EOF.
20001         * lib/realloc.c: Update copyright date.
20002
20003 2003-08-15  Jim Meyering  <jim@meyering.net>
20004         and Paul Eggert  <eggert@twinsun.com>
20005
20006         Merge from coreutils.
20007         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
20008         member but strut utmpx does not.  Needed for AIX 4.3.3.
20009         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
20010
20011 2003-08-15  Jim Meyering  <jim@meyering.net>
20012         and Paul Eggert  <eggert@cs.ucla.edu>
20013
20014         Merges from coreutils, etc.
20015         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
20016         Require gl_FUNC_TZSET_CLOBBER.
20017         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
20018         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
20019         members.
20020
20021 2003-08-14  Paul Eggert  <eggert@twinsun.com>
20022
20023         Help the merge from coreutils.
20024         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
20025         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
20026         * m4/tzset.m4: Use it too.
20027
20028 2003-08-14  Paul Eggert  <eggert@twinsun.com>
20029
20030         * modules/tzset: New file.
20031
20032 2003-08-14  Jim Meyering  <jim@meyering.net>
20033
20034         Merges from coreutils.
20035         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
20036         variable names, rather than @FNMATCH_H@.
20037         * modules/alloca: Likewise for $(ALLOCA_H).
20038
20039         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
20040         the three copies of the literal target, `fnmatch.h'.
20041         * modules/alloca (alloca.h): Likewise.
20042
20043 2003-08-14  Jim Meyering  <jim@meyering.net>
20044
20045         Merge from coreutils.
20046         * m4/tzset.m4: New file.
20047         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
20048         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
20049         otherwise, AIX 5.1 systems would end up using the latter.
20050         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
20051         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
20052         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
20053         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
20054
20055 2003-08-14  Jim Meyering  <jim@meyering.net>
20056
20057         Merge from coreutils.
20058         * lib/obstack.h: Whitespace changes.
20059         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
20060         and xcalloc return values.
20061         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
20062         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
20063         hang on OSF/1 5.1 for DIR on both local and remote file systems.
20064         Reported by (and fix confirmed by) Nelson H. F. Beebe.
20065         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
20066         error from mntctl.
20067         Use mntctl's return value to drive the entry-processing loop, since
20068         we can't rely on the value of the vmt_length member in the last
20069         entry.  On some systems doing so could result in exhausting
20070         virtual memory.  Based in part on a patch from Mike Jetzer.
20071
20072 2003-08-14  Jim Meyering  <jim@meyering.net>
20073         and Paul Eggert  <eggert@twinsun.com>
20074
20075         Merges from coreutils, plus other fixes.
20076         * lib/physmem.c: Merge in portability changes from gcc/libiberty
20077         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
20078         for credits and details.  Thanks to Kaveh Ghazi for helping
20079         to keep these files in sync.
20080         (ARRAY_SIZE): Define it.
20081         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
20082         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
20083         (memcasecmp): Don't assume size_t fits in unsigned int.
20084         Remove casts and duplicate code.
20085         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
20086         (memcpy): Remove definition.
20087         Merge in some clean-up and optimization changes from glibc.
20088         [BLOCKSIZE]: Move definition to top of file.
20089         Ensure that it is a multiple of 64.
20090         Rearrange loop exit tests so as to avoid performing an
20091         additional fread after encountering an error or EOF.
20092         * lib/md5.h (md5_uintptr): Define.
20093         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
20094         return to the initial working directory.  Preserve errno
20095         for caller.
20096         * lib/idcache.c: Include "xalloc.h".
20097         (xmalloc, xrealloc): Remove decls.
20098         (getuser): Remove casts no longer required in C89.
20099         * lib/human.c: Include stdio.h, for sprintf.
20100         * lib/group-member.c: Include "xalloc.h".
20101         (xmalloc, xrealloc): Remove decls.
20102         (get_group_info): Remove casts no longer required in C89.
20103         * lib/getusershell.c (readname): Remove casts no longer required in
20104         C89.
20105         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
20106         * lib/getline.c: Whitespace fix, from coreutils.
20107
20108 2003-08-13  Paul Eggert  <eggert@twinsun.com>
20109
20110         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
20111         Check for isascii.
20112
20113         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
20114         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
20115         Undo previous (whitespace-only) change.
20116
20117 2003-08-13  Paul Eggert  <eggert@twinsun.com>
20118
20119         * lib/exclude.c: Include <ctype.h>
20120         (IN_CTYPE_DOMAIN): New macro.
20121         (is_space): New fn.
20122         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
20123         and empty lines.
20124
20125         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
20126         Undo previous (whitespace-only) change.
20127
20128 2003-08-13  Paul Eggert  <eggert@twinsun.com>
20129
20130         * config/srclist-update: Change update back to the old behavior,
20131         leaving whitespace alone.  Use one 'sed' command rather than a
20132         pipeline.
20133         (fixlicense): Now a variable, not a function.
20134         (remove_trailing_blanks): Remove.
20135         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
20136         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
20137         Undo previous (whitespace-only) change.
20138
20139 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20140
20141         Merge from coreutils.
20142         * modules/euidaccess: Add lib_SOURCES, include for new
20143         file euidaccess.h
20144
20145 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20146
20147         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
20148         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
20149         Normalize leading white space and remove trailing white space.
20150
20151         Merge from coreutils
20152         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
20153
20154         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
20155         0.12.1.  These files are now being upgraded automatically by
20156         ../config/srclist-update.
20157
20158 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20159
20160         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
20161         Normalize leading white space and remove trailing white space.
20162         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
20163         notice, as per ../config/srclist-update.
20164
20165         Merge from coreutils.
20166         * lib/euidaccess.h: New file.
20167         * lib/euidaccess.c: Include it.
20168         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
20169         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
20170         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
20171
20172 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20173
20174         * config/srclist-update: Add copyright notice.
20175         (remove_id_lines, remove_trailing_blanks): New constants.
20176         (fixfile): Use them to normalize spacing a bit in copied files.
20177         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
20178         Normalize leading white space and remove trailing white space.
20179
20180         * config/texinfo.tex: Sync with texinfo.
20181
20182         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
20183         strtoul.c from libc, to merge coreutils whitespace changes.
20184
20185         * config/srclist.txt: Get the following m4 files from gettext:
20186         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
20187         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
20188         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
20189         wint_t.m4.
20190
20191 2003-08-12  Karl Berry  <karl@gnu.org>
20192
20193         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
20194         been made.
20195
20196 2003-08-11  Paul Eggert  <eggert@twinsun.com>
20197
20198         * modules/gnu-source, m4/gnu-source.m4:
20199         Remove; we're assuming Autoconf 2.54 or later now.
20200         Suggested by Bruno Haible.
20201         * MODULES.html.sh (func_all_modules): Remove gnu-source.
20202
20203 2003-08-11  Bruno Haible  <bruno@clisp.org>
20204
20205         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
20206
20207 2003-08-11  Bruno Haible  <bruno@clisp.org>
20208
20209         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
20210         (vasnprintf): Use it instead of wcslen.
20211
20212 2003-08-11  Bruno Haible  <bruno@clisp.org>
20213
20214         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
20215         value to ensure that _Bool promotes to int. Use #define for _Bool when
20216         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
20217
20218 2003-08-10  Karl Berry  <karl@gnu.org>
20219
20220         * lib/regex.h: update from libc (whitespace fix).
20221
20222 2003-08-09  Paul Eggert  <eggert@twinsun.com>
20223
20224         Merge some files from coreutils.  These changes were
20225         originally made by Jim Meyering.
20226         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
20227         many older Unixes require this.
20228         * lib/alloca.c (alloca): Remove cast to argument of free;
20229         no longer needed in C89.
20230         * lib/alloca_.h, regex.h: Fix white space to match
20231         what GNU indent does.
20232
20233 2003-08-09  Paul Eggert  <eggert@twinsun.com>
20234
20235         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
20236         apparently Emacs's Unicode mode got confused before my 2003-08-05
20237         checkin.
20238
20239 2003-08-08  Paul Eggert  <eggert@twinsun.com>
20240
20241         * m4/extensions.m4: New file.
20242         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
20243         Require gl_USE_SYSTEM_EXTENSIONS.
20244         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
20245         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
20246
20247 2003-08-08  Paul Eggert  <eggert@twinsun.com>
20248
20249         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
20250         * modules/extensions, modules/gnu-source: New files.
20251         * modules/timespec, modules/unlocked-io: Depend on extensions.
20252
20253 2003-08-07  Paul Eggert  <eggert@twinsun.com>
20254
20255         * modules/restrict: New file.
20256         * MODULES.html.sh (func_all_modules): Add restrict.
20257         * modules/regex: Depend on restrict.
20258
20259 2003-08-07  Paul Eggert  <eggert@twinsun.com>
20260
20261         * m4/restrict.m4: New file.
20262         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
20263
20264 2003-08-07  Bruno Haible  <bruno@clisp.org>
20265
20266         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
20267         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
20268
20269 2003-08-07  Bruno Haible  <bruno@clisp.org>
20270
20271         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
20272         makes the module 'getndelim2' compatible with the module 'getline'.
20273
20274 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20275
20276         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
20277         byte with "\201" to avoid glitches when editing that source file
20278         with multi-gnome-terminal.
20279
20280 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20281
20282         * lib/bumpalloc.h: Remove.
20283
20284 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20285
20286         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
20287         * modules/bumpalloc: Remove.
20288
20289 2003-08-04  Paul Eggert  <eggert@twinsun.com>
20290
20291         * lib/getloadavg.c: Change copyright notice and spacing to conform to
20292         GNU coding style.
20293
20294         Merge from coreutils.
20295         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
20296         1. From glibc.
20297         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
20298         from Karl Berry, implemented by Jim Meyering.
20299         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
20300         from Dmitry V. Levin.
20301         Remove anachronistic cast of xrealloc.
20302         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
20303         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
20304         type. Otherwise, it wouldn't compile with at least /bin/cc on
20305         ymp-cray-unicos9.0.2.X.
20306         Combine two mostly-identical uses of alloca into one.
20307         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
20308
20309 2003-08-04  Dave Love  <d.love@dl.ac.uk>
20310
20311         [From Emacs.]
20312
20313         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
20314         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
20315         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
20316         obsolete NLIST_NAME_UNION.
20317         [__GNU__]: Undef BSD and FSCALE.
20318         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
20319
20320 2003-08-03  Paul Eggert  <eggert@twinsun.com>
20321
20322         * lib/stdbool_.h (_Bool): Make it signed char, instead of
20323         an enum type, so that it's guaranteed to promote to int.  See:
20324         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
20325
20326 2003-08-03  Karl Berry  <karl@gnu.org>
20327
20328         * config/depcomp: update from automake.
20329
20330 2003-07-31  Paul Eggert  <eggert@twinsun.com>
20331
20332         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
20333         (strerror): Don't assume that a printable int fits in 14 bytes.
20334
20335 2003-07-31  Bruno Haible  <bruno@clisp.org>
20336
20337         * modules/getpass-gnu: New file.
20338         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
20339
20340 2003-07-31  Bruno Haible  <bruno@clisp.org>
20341
20342         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
20343
20344 2003-07-24  Karl Berry  <karl@gnu.org>
20345
20346         * config/missing: update from automake.
20347
20348 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
20349             Bruno Haible  <bruno@clisp.org>
20350
20351         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
20352         * lib/getline.c (getline, getdelim): Likewise.
20353         Remove _GNU_SOURCE define; now it's defined in config.h through
20354         m4/getline.m4.
20355
20356 2003-07-23  Karl Berry  <karl@gnu.org>
20357
20358         * config/config.sub: update from prep.
20359
20360 2003-07-22  Paul Eggert  <eggert@twinsun.com>
20361
20362         * modules/xalloc (Depends-on): Add exitfail.
20363         * modules/xmemcoll: Likewise.
20364
20365 2003-07-22  Paul Eggert  <eggert@twinsun.com>
20366
20367         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
20368         over-parenthesization in macros.
20369
20370         Sync with coreutils.
20371
20372         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
20373         required by C99.
20374
20375         Use `exit_failure' for xalloc and xmemcoll instead of their own
20376         private exit-failure variables.
20377         * lib/xalloc.h (xalloc_exit_failure): Remove.
20378         * lib/xmalloc.c: Likewise.  Include exitfail.h.
20379         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
20380         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
20381         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
20382         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
20383
20384 2003-07-20  Jim Meyering  <jim@meyering.net>
20385
20386         * modules/closeout (Depends-on): Add exitfail.
20387         Suggestion from Bruno Haible.
20388
20389 2003-07-19  Karl Berry  <karl@gnu.org>
20390
20391         * config/config.sub: update from prep.
20392
20393 2003-07-18  Paul Eggert  <eggert@twinsun.com>
20394
20395         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
20396         Remove.
20397         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
20398         to test that it can stand by itself.  Include "exitfail.h".
20399         Clients should set exit_failure instead.
20400         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
20401
20402 2003-07-18  Bruno Haible  <bruno@clisp.org>
20403
20404         * modules/getndelim2: New file.
20405         * modules/getline: Share files with module getndelim2.
20406         * modules/getnline: Depend on getndelim2 instead of sharing files with
20407         it. Add getnline.c to lib_SOURCES.
20408         * MODULES.html.sh (func_all_modules): Add getndelim2.
20409
20410 2003-07-18  Bruno Haible  <bruno@clisp.org>
20411
20412         * m4/getndelim2.m4: New file.
20413         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
20414         invoke gl_PREREQ_GETNDELIM2.
20415         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
20416         gl_PREREQ_GETNDELIM2.
20417         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
20418         gl_GETNDELIM2.
20419
20420 2003-07-18  Bruno Haible  <bruno@clisp.org>
20421
20422         * lib/getndelim2.h: New file.
20423         * lib/getndelim2.c: Make into a module of its own. Include config.h,
20424         getndelim2.h.
20425         (getndelim2): Make non-static. Change return type to ssize_t.
20426         * lib/getline.h: Change argument names.
20427         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
20428         * lib/getnline.c: Include getndelim2.h.
20429
20430 2003-07-18  Andreas Schwab  <schwab@suse.de>
20431
20432         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
20433
20434 2003-07-17  Karl Berry  <karl@gnu.org>
20435
20436         * config/config.sub: update from prep.
20437
20438 2003-07-17  Bruno Haible  <bruno@clisp.org>
20439
20440         * modules/getnline: New file.
20441         * modules/getline: Add lib/getndelim2.c to source file list.
20442         * MODULES.html.sh (func_all_modules): Add getnline.
20443
20444 2003-07-17  Bruno Haible  <bruno@clisp.org>
20445
20446         * m4/getnline.m4: New file.
20447
20448 2003-07-17  Bruno Haible  <bruno@clisp.org>
20449
20450         * m4/Makefile.am.in: Remove file.
20451         * m4/Makefile.am: Remove file.
20452         * m4/Makefile.in: Remove file.
20453
20454 2003-07-17  Bruno Haible  <bruno@clisp.org>
20455
20456         * lib/getnline.h: New file.
20457         * lib/getnline.c: New file.
20458         * lib/getndelim2.c: New file, extracted from getline.c.
20459         (getndelim2): Renamed from getdelim2, with added nmax argument.
20460         * lib/getline.c: Include getndelim2.c.
20461         (getdelim2): Moved out to getndelim2.c.
20462         (getline, getdelim): Update.
20463
20464 2003-07-17  Bruno Haible  <bruno@clisp.org>
20465
20466         * lib/Makefile.am: Remove file.
20467         * lib/Makefile.in: Remove file.
20468
20469 2003-07-17  Bruno Haible  <bruno@clisp.org>
20470
20471         * configure.in: Remove file.
20472         * Makefile.in: Remove file.
20473
20474 2003-07-17  Bruno Haible  <bruno@clisp.org>
20475
20476         * MODULES.html.sh: Put the </BODY> right before </HTML>.
20477
20478 2003-07-16  Karl Berry  <karl@gnu.org>
20479
20480         * config/srclist-update: was running fixlicense twice, which caused
20481                 texinfo.tex to be nullified for some reason.  Simplify,
20482                 $gplsrc is no longer needed as far as I can see?
20483
20484 2003-07-16  Jim Meyering  <jim@meyering.net>
20485
20486         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
20487
20488 2003-07-15  Paul Eggert  <eggert@twinsun.com>
20489
20490         * config/srclist.txt: Get the following files from gettext-runtime/intl
20491         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
20492         ref-del.sin.  From Bruno Haible.
20493         * config/srclist-update (fixfile): Change grep pattern again, since the
20494         previous fix didn't work (there was another trailing $).  Use
20495         '[$]' to escape the $s.
20496
20497 2003-07-15  Karl Berry  <karl@gnu.org>
20498
20499         * lib/vasnprintf.c: update from gettext.
20500
20501 2003-07-15  Karl Berry  <karl@gnu.org>
20502
20503         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
20504         gets expanded when surrounded by '$'.
20505
20506 2003-07-15  Jim Meyering  <jim@meyering.net>
20507
20508         * modules/save-cwd: Don't depend on error.  From Derek Price.
20509
20510 2003-07-15  Jim Meyering  <jim@meyering.net>
20511
20512         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
20513
20514 2003-07-14  Simon Josefsson  <jas@extundo.com>
20515
20516         * modules/mempcpy: New file.
20517         * MODULES.html.sh (func_all_modules): Add mempcpy.
20518
20519 2003-07-14  Simon Josefsson  <jas@extundo.com>
20520
20521         * m4/mempcpy.m4: New file.
20522
20523 2003-07-14  Simon Josefsson  <jas@extundo.com>
20524
20525         * lib/mempcpy.h: New file.
20526         * lib/mempcpy.c: New file.
20527
20528 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20529
20530         * modules/getdate, modules/posixtm: Depend on mktime.
20531
20532 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20533
20534         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
20535         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
20536         unicodeio.c, unicodeio.h, unlocked-io.h:
20537         Switch from LGPL to GPL.
20538
20539 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20540
20541         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
20542         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
20543         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
20544         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
20545         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
20546         updated automatically by ../config/srclist-update.  This changes
20547         their license from LPGL to GPL.
20548
20549 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20550
20551         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
20552         assumed to refer to the root of the most recent stable gettext version.
20553         * config/srclistvars.sh: Add defaults for eggert.
20554         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
20555         Match "This program" as well as "The program".  This is needed
20556         for gettext.
20557
20558 2003-07-14  Jim Meyering  <jim@meyering.net>
20559
20560         Don't emit diagnostics.  Let callers do that.
20561         * lib/save-cwd.c: Don't include "error.h".
20562         (save_cwd): Don't call error.  Ensure that errno is valid
20563         when returning nonzero.
20564
20565         * lib/save-cwd.h (restore_cwd): Update prototype.
20566         * lib/save-cwd.c (restore_cwd): Remove two parameters.
20567         Simplify.  Don't call error upon failure.  Let callers do that.
20568         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
20569         when auditing is enabled.  But don't bother updating the #if.
20570
20571 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
20572
20573         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
20574         it breaks C++ compilation.
20575         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
20576
20577 2003-07-10  Simon Josefsson  <jas@extundo.com>
20578
20579         * modules/strchrnul (Makefile.am): Add strchrnul.h.
20580
20581 2003-07-10  Jim Meyering  <jim@meyering.net>
20582
20583         * m4/clock_time.m4: Remove trailing blank.
20584         * m4/intmax_t.m4: Likewise.
20585
20586 2003-07-10  Jim Meyering  <jim@meyering.net>
20587
20588         * lib/vasnprintf.c: Remove trailing blanks.
20589         Make cpp indentation consistent.
20590
20591 2003-07-09  Paul Eggert  <eggert@twinsun.com>
20592
20593         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
20594         posixver.c, strftime.c, strnlen.c, strverscmp.c:
20595         Switch from LGPL to GPL.
20596
20597 2003-07-09  Paul Eggert  <eggert@twinsun.com>
20598
20599         * config/srclist.txt: Sort sublists.  Add
20600         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
20601         that differ from gnulib for one reason or another; we'd like this list
20602         to be smaller but for now let's document what we have.
20603
20604 2003-07-08  Paul Eggert  <eggert@twinsun.com>
20605
20606         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
20607         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
20608         and sweeter "eval x=$x".
20609         * config/srclist.txt: Get lib/argp* from glibc.
20610
20611 2003-07-07  Paul Eggert  <eggert@twinsun.com>
20612
20613         * lib/mktime.c: Fix some boundary cases and remove need for floating
20614         point.
20615
20616         Issue a compile-time diagnostic if time_t is floating point, or if
20617         two's complement arithmetic is not in effect, or if arithmetic
20618         right shift does not propagate the sign.  These assumptions were
20619         all in the original code but they weren't checked.
20620
20621         (TIME_T_MIDPOINT, verify): New macros.
20622         (__isleap): Remove; it has integer overflow problems.
20623         (leapyear): New function, without those problems.
20624         (ydhms_tm_diff): Remove; splitting into two parts.
20625         (ydhms_diff): New function, containing the arithmetic part of
20626         the old ydhms_tm_diff function.  Issue a compile-time
20627         diagnostic if we are not using C99 integer division.
20628         Avoid casts when possible.
20629         (guess_time_tm): New function, containing the checking part of
20630         the old ydhms_tm_diff function.  Return the new value, rather than
20631         the difference between it and the old.  Accept a new argument T
20632         so that *T specifies the old value.  Check for overflow in the result.
20633
20634         (__mktime_internal): Use a time_t offset, not a long int offset.
20635         This undoes the 2003-06-04 change, which is no longer needed now
20636         that we have better overflow checking.
20637         (localtime_offset): Likewise.
20638
20639         (__mktime_internal): Avoid harmful overflow on hosts where time_t
20640         and long are 64-bit but int is only 32-bit.
20641         (ydhms_diff): Use long int to store year1 and yday1.
20642         Issue a compile-time diagnostic if long int is not wide enough.
20643
20644         (__mktime_internal): Use long int to store adjusted year and yday.
20645         Use plain C rather than preprocessor commands, if that doesn't
20646         affect efficiency.
20647         Check for overflow (and try to repair) after each probe
20648         rather than checking only at the very end.  This avoids some bugs
20649         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
20650         does not equal GMT offset at maximum time).
20651         Use integer to check for overflow rather than floating point; this
20652         is more portable to non-IEEE hosts, and is a tad faster.
20653         When we detect that we are oscillating between two values,
20654         don't check whether tm_isdst has the requested value, since
20655         we already know the answer.  When tm_isdst has the wrong value,
20656         use a different heuristic to find the right one, based on the
20657         extreme values actually observed in practice in tz2003a,
20658         rather than the (overly optimistic) "previous 3 calendar quarters".
20659
20660         (not_equal_tm, print_tm, check_result): Use "const T" rather than
20661         "T const" to accommodate glibc style.
20662         (check_result): Use less-confusing report format.  "long" -> "long int.
20663         (main): Likewise.
20664         Don't loop if the iteration overflows time_t.
20665         Allow a negative step in the iteration.
20666
20667 2003-07-06  Karl Berry  <karl@gnu.org>
20668
20669         * config/depcomp: update from automake.
20670         * config/config.sub: update from prep.
20671
20672 2003-07-03  Karl Berry  <karl@gnu.org>
20673
20674         * config/config.guess: update from prep.
20675
20676 2003-07-01  Paul Eggert  <eggert@twinsun.com>
20677
20678         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
20679         xreadlink.c now includes it unconditionally.
20680
20681 2003-07-01  Paul Eggert  <eggert@twinsun.com>
20682
20683         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
20684         having it depend on HAVE_SYS_TYPES_H.
20685
20686 2003-07-01  Bruno Haible  <bruno@clisp.org>
20687
20688         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
20689         <sys/types.h> should be sufficient.
20690         Reported by Paul Eggert.
20691
20692 2003-06-26  Karl Berry  <karl@gnu.org>
20693
20694         * config/depcomp: update from automake.
20695
20696 2003-06-26  Bruno Haible  <bruno@clisp.org>
20697
20698         * modules/human: Depend on module stdbool.
20699
20700 2003-06-25  Bruno Haible  <bruno@clisp.org>
20701
20702         * modules/readlink: New file.
20703         * modules/xreadlink: Depend on it.
20704         * MODULES.html.sh (func_all_modules): Add readlink.
20705
20706 2003-06-25  Bruno Haible  <bruno@clisp.org>
20707
20708         * m4/readlink.m4: New file.
20709
20710 2003-06-25  Bruno Haible  <bruno@clisp.org>
20711
20712         * lib/readlink.c: New file.
20713
20714 2003-06-22  Karl Berry  <karl@gnu.org>
20715
20716         * config/srclist.txt: update mkinstalldirs from automake.
20717         * config/mkinstalldirs: update.
20718
20719 2003-06-22  Bruno Haible  <bruno@clisp.org>
20720
20721         Portability to mingw32.
20722         * m4/ssize_t.m4: New file, from GNU gettext.
20723         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
20724         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
20725
20726 2003-06-22  Bruno Haible  <bruno@clisp.org>
20727
20728         * modules/safe-read: Add m4/ssize_t.m4.
20729         * modules/xreadlink: Add m4/ssize_t.m4.
20730
20731 2003-06-20  Bruno Haible  <bruno@clisp.org>
20732
20733         Assume C89, so PARAMS isn't needed.
20734         * lib/unicodeio.h (PARAMS): Remove.
20735         * lib/unicodeio.c: Don't use PARAMS.
20736
20737 2003-06-18  Karl Berry  <karl@gnu.org>
20738
20739         * config/config.{guess,sub}: update from prep.
20740
20741 2003-06-18  Jim Meyering  <jim@meyering.net>
20742
20743         Merge changes from coreutils.
20744         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
20745         Remove explicit declarations of xmalloc and realloc.
20746         Include xalloc.h.
20747         (read_utmp): Remove anachronistic cast of xmalloc.
20748
20749 2003-06-17  Paul Eggert  <eggert@twinsun.com>
20750
20751         Assume C89, so PARAMS isn't needed.
20752         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
20753         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
20754         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
20755         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
20756         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
20757         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
20758         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
20759         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
20760         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
20761         lib/xstrtod.h, lib/xstrtol.h: Likewise.
20762         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
20763         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
20764         no longer needed. Anyway, config.h should always be included before any
20765         other file.
20766
20767 2003-06-11  Simon Josefsson  <jas@extundo.com>
20768
20769         * modules/sysexits: New file.
20770         * MODULES.html.sh (func_all_modules): Add sysexits.
20771
20772 2003-06-11  Simon Josefsson  <jas@extundo.com>
20773
20774         * lib/sysexit_.h: New file.
20775
20776 2003-06-11  Derek Price  <derek@ximbiot.com>
20777
20778         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
20779         necessary.
20780
20781 2003-06-11  Bruno Haible  <bruno@clisp.org>
20782
20783         * m4/sysexits.m4: New file.
20784
20785 2003-06-10  Simon Josefsson  <jas@extundo.com>
20786
20787         * lib/argp.h: New file, from glibc.
20788         * lib/argp-ba.c: New file, from glibc.
20789         * lib/argp-eexst.c: New file, from glibc.
20790         * lib/argp-fmtstream.c: New file, from glibc.
20791         * lib/argp-fmtstream.h: New file, from glibc.
20792         * lib/argp-fs-xinl.c: New file, from glibc.
20793         * lib/argp-help.c: New file, from glibc.
20794         * lib/argp-namefrob.h: New file, from glibc.
20795         * lib/argp-parse.c: New file, from glibc.
20796         * lib/argp-pv.c: New file, from glibc.
20797         * lib/argp-pvh.c: New file, from glibc.
20798         * lib/argp-xinl.c: New file, from glibc.
20799
20800 2003-06-10  Simon Josefsson  <jas@extundo.com>
20801
20802         * modules/strchrnul: New file.
20803
20804 2003-06-10  Simon Josefsson  <jas@extundo.com>
20805
20806         * modules/argp: New file.
20807
20808 2003-06-10  Simon Josefsson  <jas@extundo.com>
20809
20810         * m4/strchrnul.m4: New file.
20811
20812 2003-06-10  Simon Josefsson  <jas@extundo.com>
20813
20814         * lib/strchrnul.h: New file.
20815         * lib/strchrnul.c: New file.
20816
20817 2003-06-10  Bruno Haible  <bruno@clisp.org>
20818
20819         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
20820
20821 2003-06-07  Karl Berry  <karl@gnu.org>
20822
20823         * config/config.{guess,sub}: update from prep.
20824
20825 2003-06-07  Jim Meyering  <jim@meyering.net>
20826
20827         * modules/strtod: Use $(...) notation, not @...@ for
20828         AC_REPLACE'd variables.
20829         * modules/localcharset: Likewise.
20830
20831 2003-06-07  Jim Meyering  <jim@meyering.net>
20832
20833         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
20834         in place of my name in the copyright comment.
20835         Remove definition and uses of __P.
20836
20837         From coreutils.
20838         * lib/stat.c: Don't declare xmalloc explicitly.
20839         Instead, include "xalloc.h".
20840         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
20841         xrealloc, and xcalloc return values.
20842         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
20843         Improve comment.
20844         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
20845
20846 2003-06-07  Bruno Haible  <bruno@clisp.org>
20847
20848         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
20849         avoid AC_CONFIG_LINKS.
20850         * modules/fnmatch (Makefile.am): Use explicit creation rule for
20851         fnmatch.h, to avoid AC_CONFIG_LINKS.
20852         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
20853
20854 2003-06-07  Bruno Haible  <bruno@clisp.org>
20855
20856         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
20857         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
20858         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
20859         directory.
20860         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
20861         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
20862         directory.
20863
20864 2003-06-06  Jim Meyering  <jim@meyering.net>
20865
20866         Merge from coreutils.
20867         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
20868         Consolidate declarations and initializations of *_base* locals.
20869
20870         Merge from coreutils.
20871         This avoids a core dump on systems without GNU putenv,
20872         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
20873         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
20874         (unsetenv): New static function, from GNU libc.
20875         (rpl_putenv): Use it.
20876
20877         * lib/modechange.c: Remove trailing blanks.
20878
20879         Merge from coreutils.
20880         * lib/fsusage.c: Remove declaration of statfs.
20881         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
20882
20883         * lib/posixtm.c: Include <stdbool.h> unconditionally.
20884
20885 2003-06-06  Jim Meyering  <jim@meyering.net>
20886
20887         * lib/stdbool_.h: Renamed from stdbool.h.in.
20888
20889 2003-06-06  Jim Meyering  <jim@meyering.net>
20890             Bruno Haible  <bruno@clisp.org>
20891
20892         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
20893         Adjust Makefile.am snippet not to redirect directly to target.
20894         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
20895
20896 2003-06-05  Paul Eggert  <eggert@twinsun.com>
20897
20898         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
20899         mismatch, look in future quarters as well as past.  This fixes a
20900         bug when processing fall-backwards gaps immediately after a long
20901         period of daylight-saving time.
20902
20903         * lib/mktime.c: Assume freestanding C89 or better.
20904         (HAVE_LIMITS_H): Remove.  Assume it's 1.
20905         (__P): Remove; not used.
20906         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
20907         (mktime, not_equal_tm, print_tm, check_result,
20908         main): Use prototypes.  Use const * where appropriate.
20909         (main): Fix typo in testing code that uncovered by above changes.
20910         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
20911
20912 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20913
20914         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
20915         locale.h, localeconv.  This merges changes from coreutils.
20916
20917         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
20918         It can be removed after the next Autoconf is released.
20919         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
20920         needed.
20921
20922 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20923
20924         * lib/mktime.c: Fix Debian bug 177940
20925         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
20926         (localtime_offset): Now long int, not time_t, because we want it
20927         to be guaranteed to be signed.  All uses changed.
20928         (__mktime_internal): If overflow would occur when adding offset,
20929         don't add it.
20930
20931         Merge 'human' changes from coreutils.  Rewrite to support
20932         locale-specific notations like thousands separators.
20933         * lib/human.c: Simplify authorship notice.
20934         Include human.h immediately after config.h.
20935         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
20936         <limits.h>: Do not include, since human.h does.
20937         (SIZE_MAX, UINTMAX_MAX): New macros.
20938         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
20939         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
20940         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
20941         (power_letter): Renamed from suffixes.
20942         (generate_suffix_backwards): Remove.
20943         (adjust_value): Now takes int style (because of human.h changes)
20944         and long double value (for greater precision on some platforms).
20945         (group_number): New function.
20946         (human_readable): Use it.  Use integer options, not enum.
20947         Put the options before the sizes in the arg list.
20948         Support all the new options.
20949         The old human_readable function has been removed;
20950         use inttostr.h instead.
20951         (human_readable, default_block_size, humblock):
20952         Use uintmax_t, not int, for block sizes.
20953         (human_readable_inexact, block_size_types): Remove.
20954         (block_size_opts): New constant.
20955         (human_options): Renamed from human_block_size, with new signature
20956         that allows block sizes up to UINTMAX_MAX.  All callers changed.
20957         * lib/human.h: Add copyright and authorship notice.
20958         Include <limits.h> and <stdbool.h> unconditionally.
20959         (PARAMS): Remove.  All uses removed.
20960         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
20961         (enum human_inexact_style): Remove tag; now a nameless enum.
20962         (human_floor, human_ceiling, human_round_to_even): Now have
20963         values 2, 0, 1 rather than -1, 1, 0.
20964         (human_group_digits, human_suppress_point_zero, human_autoscale,
20965         human_base_1024, human_SI, human_B): New constants.
20966         (human_readable_inexact, human_block_size): Remove.
20967         (human_readable): Size args are now uintmax_t, not int.
20968         (human_options): New decl.
20969
20970         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
20971         unnecessary now that we assume C89 or better.  This change
20972         imported from coreutils.
20973
20974         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
20975         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
20976         in the 2003-05-30 sync from glibc.
20977
20978         .h files should stand alone, but we shouldn't include <sys/types.h>
20979         if we can get away with just <stddef.h>.
20980
20981         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
20982         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
20983         rather than <sys/types.h>, as we merely need size_t.
20984         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
20985         to get size_t.
20986         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
20987         Include <stdio.h>, to get FILE.
20988         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
20989         memcasecmp.h has included <stddef.h> and all we need is size_t.
20990         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
20991         our interface, instead of including <sys/types.h>
20992
20993 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20994
20995         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
20996         now, as glibc mktime is buggy on non-glibc systems.
20997
20998 2003-06-03  Karl Berry  <karl@gnu.org>
20999
21000         * config/config.sub: update from prep.
21001
21002 2003-06-02  Paul Eggert  <eggert@twinsun.com>
21003
21004         [from coreutils]
21005         Fix some minor time-related bugs with POSIX time arguments.
21006         Some valid time stamps were being rejected (notably -1, and
21007         time stamps before 1900 on 64-bit hosts).  And some invalid
21008         time stamps were being accepted, e.g. September 31.
21009
21010         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
21011         that we can return (time_t) -1 successfully.
21012         * lib/posixtm.c: Likewise.
21013         [HAVE_STDBOOL_H]: Include <stdbool.h>.
21014         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
21015         (t): Remove static var.
21016         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
21017         of static var.  All uses changed.
21018         (year): Do not reject years before 1900; they can occur with
21019         64-bit time_t.
21020         (posix_time_parse): Do not check for out-of-range components;
21021         that is now the caller's responsibility, since our checks were
21022         only approximations.
21023         (posixtime): Use mktime to check for out-of-range components,
21024         since it knows them exactly.
21025         If mktime returns (time_t) -1, check whether an error actually occurred
21026         by invoking localtime on -1.
21027         (main) [TEST_POSIXTIME]: Check for input data errors, and report
21028         posixtime failures better.
21029         Improve the test data (in comments only).
21030
21031 2003-06-02  Karl Berry  <karl@gnu.org>
21032
21033         * config/mkinstalldirs (version): new variable.
21034         (--version): new option.
21035         (usage): improve message.
21036
21037 2003-05-30  Karl Berry  <karl@gnu.org>
21038
21039         * lib/mktime.c: update from libc.
21040
21041 2003-05-30  Bruno Haible  <bruno@clisp.org>
21042
21043         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
21044         * config/config.rpath: Upgrade to gettext-0.12.1.
21045
21046 2003-05-30  Bruno Haible  <bruno@clisp.org>
21047
21048         * m4/gettext.m4: Upgrade to gettext-0.12.1.
21049         * m4/nls.m4: New file, from gettext-0.12.1.
21050         * m4/po.m4: New file, from gettext-0.12.1.
21051         * m4/progtest.m4: Upgrade to gettext-0.12.1.
21052
21053 2003-05-30  Bruno Haible  <bruno@clisp.org>
21054
21055         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
21056         * lib/localcharset.h: Likewise.
21057         * lib/localcharset.c: Likewise.
21058
21059 2003-05-29  Karl Berry  <karl@gnu.org>
21060
21061         * config/config.rpath: update from gettext.
21062
21063 2003-05-28  Paul Eggert  <eggert@twinsun.com>
21064
21065         Assume the headers required for C89 freestanding compilers.
21066         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
21067         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
21068         * m4/human.m4 (gl_HUMAN): Likewise.
21069         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
21070         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
21071         * m4/userspec.m4 (gl_USERSPEC): Likewise.
21072         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
21073         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
21074         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
21075
21076 2003-05-28  Paul Eggert  <eggert@twinsun.com>
21077
21078         Assume the headers required for C89 freestanding compilers.
21079         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
21080         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
21081         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
21082         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
21083         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
21084         define, since <limits.h> is guaranteed to do that.
21085         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
21086         * lib/exclude.c: Include <stdbool.h> unconditionally.
21087         * lib/tempname.c: Include <stddef.h> unconditionally.
21088         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
21089         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
21090         <stddef.h> does that.
21091         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
21092         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
21093         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
21094         needed.
21095         * lib/xstrtol.c: Likewise.
21096         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
21097         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
21098
21099         * lib/addext.c (addext): Use assignment rather than cast, to avoid
21100         warnings on some platforms.
21101
21102         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
21103         arbitrarily.
21104
21105 2003-05-26  Jim Meyering  <jim@meyering.net>
21106
21107         Merge in a change from coreutils:
21108         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
21109         that is guaranteed to be `no'.  Use `no_such_member' to indicate
21110         that condition, rather than `-1' which is slightly misleading.
21111         Change the name of the cache variable to have the gl_ prefix.
21112         Prompted by a patch from Richard Dawe for DJGPP.
21113
21114 2003-05-24  Karl Berry  <karl@gnu.org>
21115
21116         * config/config.guess: update from prep.
21117
21118 2003-05-22  Karl Berry  <karl@gnu.org>
21119
21120         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
21121
21122 2003-05-20  Karl Berry  <karl@gnu.org>
21123
21124         * config/config.guess: update from prep.
21125
21126 2003-05-18  Karl Berry  <karl@gnu.org>
21127
21128         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
21129         might actually be set by the user.
21130
21131         * config/depcomp, install-sh, mdate-sh: update from automake.
21132
21133 2003-05-17  Bruno Haible  <bruno@clisp.org>
21134
21135         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
21136         invalid expansion for AC_EGREP_CPP.
21137         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
21138         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
21139         Suggested by Akim Demaille <akim@epita.fr> in
21140         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
21141
21142 2003-05-12  Jim Meyering  <jim@meyering.net>
21143
21144         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
21145         the space-padded-by-default conversion specifiers, %e, %k, %l.
21146
21147 2003-05-12  Bruno Haible  <bruno@clisp.org>
21148
21149         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
21150         the string is longer than 4 KB.
21151
21152 2003-05-11  Karl Berry  <karl@gnu.org>
21153
21154         * config/config.{guess,sub}: update from prep.
21155
21156 2003-05-09  Bruno Haible  <bruno@clisp.org>
21157
21158         * modules/error: Add m4/strerror_r.m4 to file list.
21159
21160 2003-05-03  Bruno Haible  <bruno@clisp.org>
21161
21162         Upgrade to Unicode-4.0.
21163         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
21164         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
21165         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
21166         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
21167         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
21168         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
21169         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
21170         Change width of U+E0100..U+E01EF from 1 to 0.
21171
21172 2003-04-25  Jim Meyering  <jim@meyering.net>
21173
21174         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
21175         of type size_t, not int.
21176
21177 2003-04-25  Bruno Haible  <bruno@clisp.org>
21178
21179         * lib/copy-file.c: Include <stddef.h>, for size_t.
21180
21181 2003-04-21  Paul Eggert  <eggert@twinsun.com>
21182
21183         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
21184         code which expansion is under static control.  Patch imported from
21185         Akim Demaille's patch to Bison; see
21186         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
21187
21188 2003-04-14  Bruno Haible  <bruno@clisp.org>
21189
21190         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
21191
21192 2003-04-11  Jim Meyering  <jim@meyering.net>
21193
21194         Merge changes from Coreutils.
21195
21196         2003-03-22  Jim Meyering  <jim@meyering.net>
21197
21198         * lib/strftime.c (widen): Cast alloca return value to proper type.
21199
21200         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
21201
21202         From GNU libc.
21203         * lib/strftime.c (my_strftime): Handle very large width
21204         specifications for numeric values correctly.  Improve checks for
21205         overflow.
21206
21207         2003-01-19  Jim Meyering  <jim@meyering.net>
21208
21209         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
21210         definitions.
21211         (nl_get_alt_digit) [! defined my_strftime]: Define.
21212         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
21213         _nl_get_alt_digit and _nl_get_walt_digit.
21214
21215         * lib/strftime.c (my_strftime): Merge in locale-related changes from
21216         libc. These changes have no effect outside of _LIBC.
21217
21218 2003-04-10  Bruno Haible  <bruno@clisp.org>
21219
21220         * modules/findprog: New file.
21221         * MODULES.html.sh (func_all_modules): Add it.
21222
21223 2003-04-10  Bruno Haible  <bruno@clisp.org>
21224
21225         * m4/findprog.m4: New file.
21226         * m4/eaccess.m4: New file.
21227
21228 2003-04-10  Bruno Haible  <bruno@clisp.org>
21229
21230         * lib/findprog.h: New file, from GNU gettext.
21231         * lib/findprog.c: New file, from GNU gettext.
21232
21233 2003-04-05  Jim Meyering  <jim@meyering.net>
21234
21235         Merge changes from Coreutils.
21236
21237         * lib/exclude.h (PARAMS): Remove definition and uses.
21238         * lib/exclude.c: Remove uses of `PARAMS'.
21239
21240         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
21241         Add test-cases for DOS filenames. Declare program_name.
21242         (main): Set up program_name.  Patch by Rich Dawe.
21243
21244         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
21245         error from mntctl.
21246         Use mntctl's return value to drive the entry-processing loop, since
21247         we can't rely on the value of the vmt_length member in the last
21248         entry.  On some systems doing so could result in exhausting
21249         virtual memory.  Based in part on a patch from Mike Jetzer.
21250
21251 2003-04-04  Bruno Haible  <bruno@clisp.org>
21252
21253         * modules/linebreak: New file.
21254         * MODULES.html.sh (func_all_modules): Add it.
21255
21256 2003-04-04  Bruno Haible  <bruno@clisp.org>
21257
21258         * m4/linebreak.m4: New file.
21259
21260 2003-04-04  Bruno Haible  <bruno@clisp.org>
21261
21262         * lib/linebreak.h: New file, from GNU gettext.
21263         * lib/linebreak.c: New file, from GNU gettext with slight
21264         modifications.
21265         * lib/lbrkprop.h: New file, from GNU gettext.
21266
21267 2003-04-03  Bruno Haible  <bruno@clisp.org>
21268
21269         * modules/utf8-ucs4: New file.
21270         * modules/utf16-ucs4: New file.
21271         * modules/ucs4-utf8: New file.
21272         * modules/ucs4-utf16: New file.
21273         * MODULES.html.sh (func_all_modules): Add them.
21274
21275 2003-04-03  Bruno Haible  <bruno@clisp.org>
21276
21277         * m4/utf-ucs4.m4: New file.
21278         * m4/ucs4-utf.m4: New file.
21279
21280 2003-04-03  Bruno Haible  <bruno@clisp.org>
21281
21282         * lib/utf8-ucs4.h: New file, from GNU gettext.
21283         * lib/utf16-ucs4.h: New file, from GNU gettext.
21284         * lib/ucs4-utf8.h: New file, from GNU gettext.
21285         * lib/ucs4-utf16.h: New file, from GNU gettext.
21286
21287 2003-04-02  Bruno Haible  <bruno@clisp.org>
21288
21289         * modules/binary-io: New file.
21290         * MODULES.html.sh (func_all_modules): Add it.
21291
21292 2003-04-02  Bruno Haible  <bruno@clisp.org>
21293
21294         * lib/binary-io.h: New file, from GNU gettext.
21295
21296 2003-04-01  Bruno Haible  <bruno@clisp.org>
21297
21298         * modules/pathname: New file.
21299         * MODULES.html.sh (func_all_modules): Add it.
21300
21301 2003-04-01  Bruno Haible  <bruno@clisp.org>
21302
21303         * lib/pathname.h: New file, from GNU gettext.
21304         * lib/concatpath.c: New file, from GNU gettext.
21305
21306 2003-03-30  Bruno Haible  <bruno@clisp.org>
21307
21308         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
21309
21310 2003-03-30  Bruno Haible  <bruno@clisp.org>
21311
21312         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
21313         function chown() doesn't exist.
21314
21315 2003-03-28  Bruno Haible  <bruno@clisp.org>
21316
21317         * modules/copy-file: New file.
21318         * MODULES.html.sh (func_all_modules): Add it.
21319
21320 2003-03-28  Bruno Haible  <bruno@clisp.org>
21321
21322         * m4/copy-file.m4: New file.
21323
21324 2003-03-28  Bruno Haible  <bruno@clisp.org>
21325
21326         * lib/copy-file.h: New file, from GNU gettext.
21327         * lib/copy-file.c: New file, from GNU gettext.
21328
21329 2003-03-18  Jim Meyering  <jim@meyering.net>
21330
21331         * lib/quote.c (quote_n): Fix typo in comment.
21332
21333 2003-03-18  Bruno Haible  <bruno@clisp.org>
21334
21335         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
21336         checking.
21337         * m4/onceonly_2_57.m4: Likewise.
21338
21339 2003-03-17  Bruno Haible  <bruno@clisp.org>
21340
21341         * m4/onceonly.m4: Require autoconf 2.54 or newer.
21342         (m4_quote): Remove macro.
21343         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
21344
21345 2003-03-14  Jim Meyering  <jim@meyering.net>
21346
21347         Merge changes from Coreutils.
21348         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
21349         to be const, in order to avoid warnings.
21350         (obstack_room): Likewise.
21351         (obstack_empty_p): Likewise.
21352
21353 2003-03-14  Bruno Haible  <bruno@clisp.org>
21354
21355         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
21356         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
21357
21358 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21359
21360         Merge changes from Bison.
21361         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
21362         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
21363         when compiling Bison 1.875's `bitset bset = obstack_alloc
21364         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
21365         * lib/hash.c: Include <stdbool.h> unconditionally.
21366
21367 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21368
21369         * m4/onceonly.m4 (m4_quote): New macro.
21370         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
21371         Quote AC_FOREACH variable-expansions properly.
21372
21373 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21374
21375         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
21376
21377 2003-03-09  Paul Eggert  <eggert@twinsun.com>
21378
21379         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
21380         Reported by Bruce Becker; see:
21381         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
21382
21383 2003-03-03  Paul Eggert  <eggert@twinsun.com>
21384             Bruno Haible  <bruno@clisp.org>
21385
21386         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
21387         Reported by John Hughes, see
21388         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
21389
21390 2003-02-20  Bruno Haible  <bruno@clisp.org>
21391
21392         * MODULES.html.sh (func_all_modules): Add poll.
21393
21394 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
21395
21396         * modules/poll: New file.
21397
21398 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
21399
21400         * lib/poll_.h: New file.
21401         * lib/poll.c: New file.
21402
21403 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
21404
21405         * m4/poll.m4: New file.
21406
21407 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
21408
21409         * modules/mathl: New file.
21410
21411 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
21412
21413         * lib/mathl.h: New file.
21414         * lib/acosl.c: New file.
21415         * lib/asinl.c: New file.
21416         * lib/atanl.c: New file.
21417         * lib/ceill.c: New file.
21418         * lib/cosl.c: New file.
21419         * lib/expl.c: New file.
21420         * lib/floorl.c: New file.
21421         * lib/frexpl.c: New file.
21422         * lib/ldexpl.c: New file.
21423         * lib/logl.c: New file.
21424         * lib/sincosl.c: New file.
21425         * lib/sinl.c: New file.
21426         * lib/sqrtl.c: New file.
21427         * lib/tanl.c: New file.
21428         * lib/trigl.c: New file.
21429         * lib/trigl.h: New file.
21430
21431 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
21432
21433         * m4/mathl.m4: New file.
21434
21435 2003-02-18  Bruno Haible  <bruno@clisp.org>
21436
21437         * MODULES.html.sh (func_all_modules): Add mathl.
21438
21439 2003-02-17  Bruno Haible  <bruno@clisp.org>
21440
21441         * modules/mkdtemp: New module.
21442         * MODULES.html.sh (func_all_modules): Add it.
21443
21444 2003-02-17  Bruno Haible  <bruno@clisp.org>
21445
21446         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
21447
21448 2003-02-17  Bruno Haible  <bruno@clisp.org>
21449
21450         * lib/mkdtemp.h: New file, from GNU gettext.
21451         * lib/mkdtemp.c: New file, from GNU gettext.
21452
21453 2003-02-02  Jim Meyering  <jim@meyering.net>
21454
21455         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
21456         e.g. glibc-2.2.93.
21457
21458 2003-01-31  Bruno Haible  <bruno@clisp.org>
21459
21460         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
21461         'rpl_rename'.
21462         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
21463         'rpl_strnlen'.
21464         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
21465         'rpl_strtod'.
21466         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
21467         'rpl_utime'.
21468
21469 2003-01-31  Bruno Haible  <bruno@clisp.org>
21470
21471         * lib/rename.c: #undef rename before defining rpl_rename.
21472         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
21473
21474 2003-01-30  Bruno Haible  <bruno@clisp.org>
21475
21476         * modules/vasnprintf, modules/vasprintf: New modules.
21477         * MODULES.html.sh (func_all_modules): Add them.
21478
21479 2003-01-30  Bruno Haible  <bruno@clisp.org>
21480
21481         * m4/signed.m4: New file, from GNU gettext.
21482         * m4/longdouble.m4: New file, from GNU gettext.
21483         * m4/wchar_t.m4: New file, from GNU gettext.
21484         * m4/wint_t.m4: New file, from GNU gettext.
21485         * m4/vasnprintf.m4: New file.
21486         * m4/vasprintf.m4: New file.
21487
21488 2003-01-30  Bruno Haible  <bruno@clisp.org>
21489
21490         * lib/printf-args.h: New file, from GNU gettext.
21491         * lib/printf-args.c: New file, from GNU gettext.
21492         * lib/printf-parse.h: New file, from GNU gettext.
21493         * lib/printf-parse.c: New file, from GNU gettext.
21494         * lib/vasnprintf.h: New file, from GNU gettext.
21495         * lib/vasnprintf.c: New file, from GNU gettext.
21496         * lib/asnprintf.c: New file, from GNU gettext.
21497         * lib/vasprintf.h: New file, from GNU gettext with modifications.
21498         * lib/vasprintf.c: New file, from GNU gettext.
21499         * lib/asprintf.c: New file, from GNU gettext.
21500
21501 2003-01-29  Bruno Haible  <bruno@clisp.org>
21502
21503         * modules/stpncpy: New module.
21504         * MODULES.html.sh (func_all_modules): Add it.
21505
21506 2003-01-29  Bruno Haible  <bruno@clisp.org>
21507
21508         * m4/stpncpy.m4: New file.
21509
21510 2003-01-29  Bruno Haible  <bruno@clisp.org>
21511
21512         * lib/stpncpy.h: New file, from GNU gettext with modifications.
21513         * lib/stpncpy.c: New file, from GNU gettext with modifications.
21514
21515 2003-01-28  Bruno Haible  <bruno@clisp.org>
21516
21517         * modules/c-ctype: New module.
21518         * MODULES.html.sh (func_all_modules): Add it.
21519
21520 2003-01-28  Bruno Haible  <bruno@clisp.org>
21521
21522         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
21523         Paul Eggert.
21524         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
21525         Paul Eggert.
21526
21527 2003-01-27  Bruno Haible  <bruno@clisp.org>
21528
21529         * modules/xsetenv: New module.
21530         * MODULES.html.sh (func_all_modules): Add it.
21531
21532 2003-01-27  Bruno Haible  <bruno@clisp.org>
21533
21534         * lib/xsetenv.h: New file, from GNU gettext.
21535         * lib/xsetenv.c: New file, from GNU gettext.
21536
21537 2003-01-23  Jim Meyering  <jim@meyering.net>
21538
21539         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
21540         from working on systems without dirfd (at least Irix and OSF1/Tru64).
21541
21542 2003-01-23  Bruno Haible  <bruno@clisp.org>
21543
21544         * modules/minmax: New module.
21545         * MODULES.html.sh (func_all_modules): Add it.
21546
21547 2003-01-23  Bruno Haible  <bruno@clisp.org>
21548
21549         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
21550         Eggert.
21551
21552 2003-01-22  Bruno Haible  <bruno@clisp.org>
21553
21554         * modules/exit: New module.
21555         * MODULES.html.sh (func_all_modules): Add it.
21556
21557 2003-01-22  Bruno Haible  <bruno@clisp.org>
21558
21559         * lib/exit.h: New file, from GNU gettext.
21560
21561 2003-01-19  Bruno Haible  <bruno@clisp.org>
21562
21563         * gnulib-tool: Recognize option --extract-maintainer.
21564         (func_get_maintainer): New function.
21565         * modules/*: Add Maintainer entry.
21566
21567 2003-01-16  Jim Meyering  <jim@meyering.net>
21568
21569         * m4/regex.m4: The `regex' struct is both input and output.
21570         Initialize it before each use.  Patch by Tim Waugh.
21571
21572 2003-01-16  Bruno Haible  <bruno@clisp.org>
21573
21574         * MODULES.html.sh: Add a table of contents. Add the module name as
21575         leftmost column. Add hyperlinks.
21576
21577 2003-01-15  Bruno Haible  <bruno@clisp.org>
21578
21579         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
21580
21581 2003-01-15  Bruno Haible  <bruno@clisp.org>
21582
21583         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
21584         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
21585         suffix.
21586
21587 2003-01-15  Bruno Haible  <bruno@clisp.org>
21588
21589         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
21590
21591 2003-01-15  Bruno Haible  <bruno@clisp.org>
21592
21593         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
21594         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
21595
21596 2003-01-14  Jim Meyering  <jim@meyering.net>
21597
21598         * lib/same.c (same_name): Tweak a comment.
21599
21600 2003-01-14  Bruno Haible  <bruno@clisp.org>
21601
21602         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
21603         when a string comparison is sufficient.
21604
21605 2003-01-14  Bruno Haible  <bruno@clisp.org>
21606
21607         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
21608         'unsigned int'.
21609
21610 2003-01-14  Bruno Haible  <bruno@clisp.org>
21611
21612         * lib/hash-pjw.c: Add comment about low quality of this function.
21613
21614 2003-01-13  Bruno Haible  <bruno@clisp.org>
21615
21616         * modules/stpcpy: Distribute lib/stpcpy.h.
21617         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
21618
21619 2003-01-13  Bruno Haible  <bruno@clisp.org>
21620
21621         * modules/*: Add a description.
21622         * modules/strpbrk: Fix Makefile.am snippet.
21623         * modules/strtoimax: Fix dependencies.
21624         * modules/strtoumax: Likewise.
21625
21626 2003-01-13  Bruno Haible  <bruno@clisp.org>
21627
21628         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
21629         * modules/alloca (Makefile.am): All object files depend on alloca.h.
21630         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
21631
21632 2003-01-13  Bruno Haible  <bruno@clisp.org>
21633
21634         * gnulib-tool (func_create_testdir): Store config/* files in the main
21635         directory.
21636         * config.rpath: Move to ...
21637         * config/config.rpath: ... here.
21638         * modules/gettext: Contains config/config.rpath, not config.rpath.
21639         * modules/iconv: Likewise.
21640
21641 2003-01-12  Paul Eggert  <eggert@twinsun.com>
21642
21643         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
21644         to avoid collisions with libcurses and libreadline.
21645
21646         * m4/getstr.m4: Remove.
21647         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
21648
21649 2003-01-12  Paul Eggert  <eggert@twinsun.com>
21650
21651         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
21652         to avoid collisions with libcurses and libreadline.
21653
21654         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
21655         * lib/getstr.h, getstr.c: Remove.
21656         * lib/getline.c: Include "getline.h", to check interface.
21657         Move body of old getstr.c here: this defines MIN_CHUNK and
21658         declares getdelim2, which is renamed from getstr.
21659         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
21660
21661         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
21662         All uses changed.
21663         * lib/linebuffer.h: Likewise.
21664         (readline): Remove backward-compatibility macro.
21665
21666 2003-01-12  Paul Eggert  <eggert@twinsun.com>
21667
21668         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
21669         to avoid collisions with libcurses and libreadline.
21670         * getstr: Remove.
21671         * MODULES.html.sh: Remove getstr.
21672         * modules/getline: Depend on unlocked-io, not getstr.
21673
21674 2003-01-12  Jim Meyering  <jim@meyering.net>
21675
21676         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
21677
21678 2003-01-10  Bruno Haible  <bruno@clisp.org>
21679
21680         * modules/alloca: Change Makefile.am requirements. Simplify Include
21681         requirements. Add lib/alloca_.h to file list.
21682
21683 2003-01-10  Bruno Haible  <bruno@clisp.org>
21684
21685         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
21686
21687 2003-01-10  Bruno Haible  <bruno@clisp.org>
21688
21689         * lib/alloca_.h: New file.
21690         * lib/getdate.y: Unconditionally include alloca.h.
21691         * lib/makepath.c: Likewise.
21692         * lib/setenv.c: Likewise.
21693         * lib/userspec.c: Likewise.
21694
21695 2003-01-09  Karl Berry  <karl@gnu.org>
21696
21697         * MODULES.html.sh: include `dirname $0` in PATH, to find
21698         gnulib-tool.
21699
21700 2003-01-09  Bruno Haible  <bruno@clisp.org>
21701
21702         * modules/stdbool: Change configure.ac, Makefile.am requirements.
21703         Simplify Include requirements. Add lib/stdbool.h.in to file list.
21704
21705 2003-01-09  Bruno Haible  <bruno@clisp.org>
21706
21707         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
21708
21709 2003-01-09  Bruno Haible  <bruno@clisp.org>
21710
21711         * lib/stdbool.h.in: New file.
21712
21713 2003-01-09  Bruno Haible  <bruno@clisp.org>
21714
21715         * gnulib-tool (func_all_modules): Ignore files ending in ~.
21716         * MODULES.html.sh: Likewise.
21717
21718 2003-01-08  Jim Meyering  <jim@meyering.net>
21719
21720         * lib/full-write.c: Undefine and define-away `const' after inclusion
21721         of errno.h, not before.  Suggestion from Bruno Haible.
21722
21723 2003-01-08  Bruno Haible  <bruno@clisp.org>
21724
21725         * modules/full-read: Depend on full-write.
21726
21727 2003-01-08  Bruno Haible  <bruno@clisp.org>
21728
21729         * lib/safe-read.c: Include specification header first, to ensure its
21730         selfcontainedness.
21731         * lib/full-write.c: Likewise.
21732
21733 2003-01-07  Jim Meyering  <jim@meyering.net>
21734
21735         * lib/full-write.c: Rework so that it may serve to define full_read,
21736         too.
21737         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
21738
21739 2003-01-07  Bruno Haible  <bruno@clisp.org>
21740
21741         * lib/strtoimax.c: Include <stdint.h> as an alternative to
21742         <inttypes.h>.
21743         * lib/xstrtol.h: Likewise.
21744         * lib/xstrtoimax.c: Likewise.
21745         * lib/xstrtoumax.c: Likewise.
21746         * lib/human.h: Likewise.
21747
21748         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
21749         on systems that have <inttypes.h> but not <stdint.h>.
21750
21751 2003-01-07  Bruno Haible  <bruno@clisp.org>
21752
21753         * MODULES.html.sh: Add copyright notice.
21754         (missed_files): Omit CVS directory entries.
21755         (func_module): Make it work with sed-3.02.
21756         * MODULES.txt: Remove file.
21757
21758 2003-01-06  Jim Meyering  <jim@meyering.net>
21759
21760         * lib/version-etc.c: Update year in translatable copyright string.
21761
21762 2003-01-03  Karl Berry  <karl@gnu.org>
21763
21764         * config/config.{guess,sub}: update from prep.
21765
21766 2003-01-02  Karl Berry  <karl@gnu.org>
21767
21768         * doc/COPYING.DOC: belatedly updated to 1.2.
21769
21770 2003-01-01  Karl Berry  <karl@gnu.org>
21771
21772         * gnulib-tool (func_verify_module): report module name $module in
21773         error message, not $1.
21774         * gnulib-tool (create-testdir): don't complain if destdir couldn't
21775         be created, only if it doesn't exist.
21776         * gnulib-tool (last_checkin_date): don't expand the $Date here.
21777
21778 2002-12-31  Paul Eggert  <eggert@twinsun.com>
21779
21780         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
21781
21782 2002-12-31  Paul Eggert  <eggert@twinsun.com>
21783
21784         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
21785         memcmp if strcoll doesn't work.
21786
21787 2002-12-31  Bruno Haible  <bruno@clisp.org>
21788
21789         * lib/utime.c (utime_null): No need to call ftruncate if the file was
21790         nonempty.
21791
21792 2002-12-31  Bruno Haible  <bruno@clisp.org>
21793
21794         * lib/memcoll.c (STRCOLL): New macro.
21795         (memcoll): Use it.
21796
21797 2002-12-31  Bruno Haible  <bruno@clisp.org>
21798
21799         * lib/localcharset.h: New file.
21800         * lib/localcharset.c: Include it.
21801         * lib/unicodeio.c: Likewise.
21802
21803 2002-12-31  Bruno Haible  <bruno@clisp.org>
21804
21805         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
21806         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
21807
21808 2002-12-31  Bruno Haible  <bruno@clisp.org>
21809
21810         * lib/getline.h: Include <stddef.h>, for size_t.
21811
21812         * lib/unicodeio.h: Include <stddef.h>, for size_t.
21813         * lib/unicodeio.c: Don't include <stddef.h>.
21814
21815 2002-12-31  Bruno Haible  <bruno@clisp.org>
21816
21817         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
21818         HAVE_TM_ZONE.
21819
21820 2002-12-24  Karl Berry  <karl@gnu.org>
21821
21822         * config/config.guess: update from prep.
21823
21824 2002-12-24  Bruno Haible  <bruno@clisp.org>
21825
21826         General infrasructure.
21827         * m4/README: Rewritten.
21828         * m4/onceonly.m4: New file.
21829         * m4/onceonly_2_57.m4: New file.
21830
21831         Module atexit.
21832         * m4/atexit.m4: New file.
21833
21834         Module strtod.
21835         * m4/strtod.m4: New file.
21836
21837         Module strtol.
21838         * m4/strtol.m4: New file.
21839
21840         Module strtoul.
21841         * m4/strtoul.m4: New file.
21842
21843         Module memchr.
21844         * m4/memchr.m4: New file.
21845
21846         Module memcmp.
21847         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
21848         (jm_FUNC_MEMCMP): Invoke it.
21849
21850         Module memcpy.
21851         * m4/memcpy.m4: New file.
21852
21853         Module memmove.
21854         * m4/memmove.m4: New file.
21855
21856         Module memset.
21857         * m4/memset.m4: New file.
21858
21859         Module strcspn.
21860         * m4/strcspn.m4: New file.
21861
21862         Module strpbrk.
21863         * m4/strpbrk.m4: New file.
21864
21865         Module strstr.
21866         * m4/strstr.m4: New file.
21867
21868         Module strerror.
21869         * m4/strerror.m4: New file.
21870
21871         Module mktime.
21872         * m4/mktime.m4: Renamed from jm-mktime.m4.
21873         (gl_PREREQ_MKTIME): New macro.
21874         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
21875
21876         Module malloc.
21877         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
21878         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
21879         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
21880
21881         Module realloc.
21882         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
21883         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
21884         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
21885
21886         Module strftime.
21887         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
21888         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
21889         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
21890         gl_TM_GMTOFF.
21891         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
21892
21893         Module xalloc.
21894         * m4/xalloc.m4: New file.
21895
21896         Module alloca.
21897         * m4/alloca.m4: New file.
21898
21899         Module putenv.
21900         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
21901         (jm_FUNC_PUTENV): Invoke it.
21902
21903         Module setenv.
21904         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
21905         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
21906         when invoked twice.
21907         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
21908         gt_FUNC_SETENV.
21909
21910         Module memrchr.
21911         * m4/memrchr.m4: New file.
21912
21913         Module stpcpy.
21914         * m4/stpcpy.m4: New file.
21915
21916         Module strcase.
21917         * m4/strcase.m4: New file.
21918
21919         Module strdup.
21920         * m4/strdup.m4: New file.
21921
21922         Module strnlen.
21923         * m4/strnlen.m4: New file.
21924
21925         Module strndup.
21926         * m4/strndup.m4: New file.
21927
21928         Module xstrtod.
21929         * m4/xstrtod.m4: New file.
21930
21931         Module xstrtol.
21932         * m4/xstrtol.m4: New file.
21933
21934         Module getdate.
21935         * m4/getdate.m4: New file.
21936
21937         Module unlocked-io.
21938         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
21939         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
21940         * m4/jm-glibc-io.m4n: Remove file.
21941
21942         Module long-options.
21943         * m4/long-options.m4: New file.
21944
21945         Module md5.
21946         * m4/md5.m4: New file.
21947
21948         Module sha.
21949         * m4/sha.m4: New file.
21950
21951         Module getstr.
21952         * m4/getstr.m4: New file.
21953
21954         Module getline.
21955         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
21956         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
21957         <sys/types.h>, for size_t. Use the function name gnu_getline, not
21958         simply getline. Infoke gl_PREREQ_GETLINE.
21959
21960         Module obstack.
21961         * m4/obstack.m4: New file.
21962
21963         Module hash.
21964         * m4/hash.m4: New file.
21965
21966         Module readtokens.
21967         * m4/readtokens.m4: New file.
21968
21969         Module strverscmp.
21970         * m4/strverscmp.m4: New file.
21971
21972         Module stdbool.
21973         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
21974         OSF/1.
21975
21976         Module strtoll.
21977         * m4/strtoll.m4: New file.
21978
21979         Module strtoull.
21980         * m4/strtoull.m4: New file.
21981
21982         Module strtoimax.
21983         * m4/strtoimax.m4: New file.
21984
21985         Module strtoumax.
21986         * m4/strtoumax.m4: New file.
21987
21988         Module xstrtoimax.
21989         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
21990         jm_AC_PREREQ_XSTRTOIMAX.
21991         Moved the strtol prerequisites to strtol.m4.
21992         Moved the strtoll prerequisites to strtoll.m4.
21993         Moved the strtoimax prerequisites to strtoimax.m4.
21994
21995         Module xstrtoumax.
21996         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
21997         jm_AC_PREREQ_XSTRTOUMAX.
21998         Moved the strtoul prerequisites to strtoul.m4.
21999         Moved the strtoull prerequisites to strtoull.m4.
22000         Moved the strtoumax prerequisites to strtoumax.m4.
22001
22002         Module chown.
22003         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
22004         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
22005
22006         Module dup2.
22007         * m4/dup2.m4: New file.
22008
22009         Module ftruncate.
22010         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
22011         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
22012
22013         Module getgroups.
22014         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
22015         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
22016
22017         Module gettimeofday.
22018         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
22019         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
22020         gl_PREREQ_GETTIMEOFDAY.
22021
22022         Module mkdir.
22023         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
22024         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
22025
22026         Module mkstemp.
22027         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
22028         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
22029         jm_AC_TYPE_UINTMAX_T.
22030         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
22031
22032         Module stat.
22033         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
22034         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
22035
22036         Module lstat.
22037         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
22038         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
22039
22040         Module timespec.
22041         * m4/timespec.m4 (gl_TIMESPEC): New macro.
22042         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
22043         * m4/st_mtim.m4: Indentation.
22044
22045         Module nanosleep.
22046         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
22047         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
22048         gl_PREREQ_NANOSLEEP.
22049
22050         Module regex.
22051         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
22052         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
22053         (gl_REGEX): New macro.
22054
22055         Module rename.
22056         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
22057         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
22058
22059         Module rmdir.
22060         * m4/rmdir.m4: New file.
22061
22062         Module utime.
22063         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
22064         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
22065         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
22066
22067         Module dirname.
22068         * m4/dirname.m4: New file.
22069
22070         Module getopt.
22071         * m4/getopt.m4: New file.
22072
22073         Module unistd-safer.
22074         * m4/unistd-safer.m4: New file.
22075
22076         Module fnmatch.
22077         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
22078         declaration.
22079         (gl_PREREQ_FNMATCH_EXTRA): New macro.
22080         (gl_FUNC_FNMATCH_POSIX): New macro.
22081         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
22082         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
22083         simply fnmatch.
22084
22085         Module exclude.
22086         * m4/exclude.m4: New file.
22087
22088         Module human.
22089         * m4/human.m4: New file.
22090
22091         Module acl.
22092         * m4/acl.m4: Nop.
22093
22094         Module backupfile.
22095         * m4/backupfile.m4: New file.
22096         * m4/d-ino.m4: Indentation.
22097
22098         Module fsusage.
22099         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
22100         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
22101         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
22102
22103         Module dirfd.
22104         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
22105         requirements.
22106
22107         Module euidaccess.
22108         * m4/euidaccess.m4: New file.
22109
22110         Module file-type.
22111         * m4/file-type.m4: New file.
22112
22113         Module fileblocks.
22114         * m4/fileblocks.m4: New file.
22115
22116         Module filemode.
22117         * m4/filemode.m4: New file.
22118
22119         Module isdir.
22120         * m4/isdir.m4: New file.
22121
22122         Module lchown.
22123         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
22124         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
22125
22126         Module makepath.
22127         * m4/makepath.m4: New file.
22128
22129         Module modechange.
22130         * m4/modechange.m4: New file.
22131
22132         Module mountlist.
22133         * m4/mountlist.m4: New file.
22134         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
22135         Indentation.
22136
22137         Module path-concat.
22138         * m4/path-concat.m4: New file.
22139
22140         Module pathmax.
22141         * m4/pathmax.m4: New file.
22142
22143         Module same.
22144         * m4/same.m4: New file.
22145
22146         Module save-cwd.
22147         * m4/save-cwd.m4: New file.
22148
22149         Module savedir.
22150         * m4/savedir.m4: New file.
22151
22152         Module xgetcwd.
22153         * m4/xgetcwd.m4: New file.
22154         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
22155
22156         Module xreadlink.
22157         * m4/xreadlink.m4: New file.
22158
22159         Module safe-read.
22160         * m4/safe-read.m4: New file.
22161
22162         Module safe-write.
22163         * m4/safe-write.m4: New file.
22164
22165         Module closeout.
22166         * m4/closeout.m4: New file.
22167
22168         Module stdio-safer.
22169         * m4/stdio-safer.m4: New file.
22170
22171         Module getpass.
22172         * m4/getpass.m4: New file.
22173
22174         Module getugroups.
22175         * m4/getugroups.m4: New file.
22176
22177         Module group-member.
22178         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
22179         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
22180
22181         Module idcache.
22182         * m4/idcache.m4: New file.
22183
22184         Module userspec.
22185         * m4/userspec.m4: New file.
22186
22187         Module gettime.
22188         * m4/clock_time.m4: New file.
22189         * m4/gettime.m4: New file.
22190
22191         Module settime.
22192         * m4/settime.m4: New file.
22193
22194         Module posixtm.
22195         * m4/posixtm.m4: New file.
22196
22197         Module gethostname.
22198         * m4/gethostname.m4: New file.
22199
22200         Module canon-host.
22201         * m4/canon-host.m4: New file.
22202
22203         Module gettext.
22204         * m4/codeset.m4: New file, from gettext-0.11.5.
22205         * m4/gettext.m4: New file, from gettext-0.11.5.
22206         * m4/glibc21.m4: New file, from gettext-0.11.5.
22207         * m4/iconv.m4: New file, from gettext-0.11.5.
22208         * m4/intdiv0.m4: New file, from gettext-0.11.5.
22209         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
22210         * m4/inttypes.m4: New file, from gettext-0.11.5.
22211         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
22212         * m4/isc-posix.m4: New file, from gettext-0.11.5.
22213         * m4/lcmessage.m4: New file, from gettext-0.11.5.
22214         * m4/lib-ld.m4: New file, from gettext-0.11.5.
22215         * m4/lib-link.m4: New file, from gettext-0.11.5.
22216         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
22217         * m4/progtest.m4: New file, from gettext-0.11.5.
22218         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
22219         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
22220         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
22221
22222         Module localcharset.
22223         * m4/localcharset.m4: New file.
22224
22225         Module hard-locale.
22226         * m4/hard-locale.m4: New file.
22227
22228         Module mbswidth.
22229         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
22230         onceonly macros.
22231         * m4/mbrtowc.m4: Add comment.
22232
22233         Module memcasecmp.
22234         * m4/memcasecmp.m4: New file.
22235
22236         Module memcoll.
22237         * m4/memcoll.m4: New file.
22238
22239         Module unicodeio.
22240         * m4/unicodeio.m4: New file.
22241
22242         Module rpmatch.
22243         * m4/rpmatch.m4: New file.
22244
22245         Module yesno.
22246         * m4/yesno.m4: New file.
22247
22248         Module exitfail.
22249         * m4/exitfail.m4: New file.
22250
22251         Module c-stack.
22252         * m4/c-stack.m4 (gl_C_STACK): New macro.
22253         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
22254
22255         Module error.
22256         * m4/error.m4 (gl_ERROR): New macro.
22257         (jm_PREREQ_ERROR): Use onceonly macros.
22258
22259         Module fatal.
22260         * m4/fatal.m4: New file.
22261
22262         Module getloadavg.
22263         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
22264         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
22265
22266         Module getpagesize.
22267         * m4/getpagesize.m4: New file.
22268
22269         Module getusershell.
22270         * m4/getusershell.m4: New file.
22271
22272         Module physmem.
22273         * m4/physmem.m4: New file.
22274
22275         Module posixver.
22276         * m4/posixver.m4: New file.
22277
22278         Module quotearg.
22279         * m4/quotearg.m4: New file.
22280
22281         Module quote.
22282         * m4/quote.m4: New file.
22283
22284         Module readutmp.
22285         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
22286
22287         Module sig2str.
22288         * m4/sig2str.m4: New file.
22289
22290         Other.
22291         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
22292         ulonglong.m4.
22293         * m4/intmax_t.m4: New file.
22294         * m4/d-type.m4: Indentation.
22295         * m4/jm-macros.m4: Update.
22296         * m4/prereq.m4 (jm_PREREQ): Update.
22297         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
22298         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
22299         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
22300         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
22301         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
22302         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
22303         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
22304         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
22305         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
22306         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
22307         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
22308         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
22309         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
22310         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
22311         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
22312         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
22313         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
22314         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
22315         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
22316
22317 2002-12-24  Bruno Haible  <bruno@clisp.org>
22318
22319         * MODULES.txt: Update according to m4/ changes.
22320
22321         Module gettext.
22322         * config.rpath: New file, from gettext-0.11.5.
22323
22324         * modules/*: New module descriptions.
22325         * gnulib-tool: New file.
22326         * MODULES.html.sh: New file.
22327
22328 2002-12-21  Karl Berry  <karl@gnu.org>
22329
22330         * doc/fdl.texi: update to version 1.2.
22331
22332 2002-12-19  Karl Berry  <karl@gnu.org>
22333
22334         * config/config.guess: update from prep.
22335
22336 2002-12-18  Bruno Haible  <bruno@clisp.org>
22337
22338         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
22339         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
22340
22341 2002-12-17  Bruno Haible  <bruno@clisp.org>
22342
22343         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
22344         stdlib.h, string.h.
22345
22346 2002-12-17  Bruno Haible  <bruno@clisp.org>
22347
22348         * lib/canon-host.c (strdup): Remove unused declaration.
22349
22350         * lib/fsusage.c: Include full_read.h.
22351         (get_fs_usage): Use full_read instead of safe_read.
22352
22353         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
22354
22355 2002-12-12  Karl Berry  <karl@gnu.org>
22356
22357         * config/config.guess: update from prep.
22358
22359 2002-12-11  Bruno Haible  <bruno@clisp.org>
22360
22361         * m4/setenv.m4: New file, from gettext-0.11.5.
22362
22363 2002-12-11  Bruno Haible  <bruno@clisp.org>
22364
22365         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
22366         not unsetenv().
22367         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
22368         modifications:
22369
22370         2002-12-11  Bruno Haible  <bruno@clisp.org>
22371
22372                 * setenv.c (alloca): Fall back to malloc.
22373                 (freea): New macro.
22374                 (setenv): Use freea() to free memory allocated with alloca().
22375
22376         2002-11-13  Bruno Haible  <bruno@clisp.org>
22377
22378                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
22379                 function declarations.
22380                 * unsetenv.c (unsetenv): Likewise.
22381
22382         2002-03-04  Bruno Haible  <bruno@clisp.org>
22383
22384                 Portability to AIX 4.3.3.
22385                 * unsetenv.c: New file, extracted from setenv.c.
22386                 * setenv.c: Move the unsetenv() function to unsetenv.c.
22387
22388         2001-12-20  Bruno Haible  <bruno@clisp.org>
22389
22390                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
22391                 use malloc instead. For SunOS 4.
22392
22393         2001-12-11  Bruno Haible  <bruno@clisp.org>
22394
22395                 * setenv.c: Declare alloca.
22396                 (compar_fn_t): New typedef.
22397                 (KNOWN_VALUE, STORE_VALUE): Use it.
22398
22399         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
22400         setenv.h.
22401
22402 2002-12-10  Paul Eggert  <eggert@twinsun.com>
22403
22404         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
22405         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
22406         Choose values that are less likely to collide with system fnmatch
22407         options.
22408         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
22409         defined (e.g., a pure POSIX system).
22410         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
22411         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
22412
22413 2002-12-06  Paul Eggert  <eggert@twinsun.com>
22414
22415         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
22416         a pain in practice to deal with generated m4 files.  This change
22417         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
22418
22419         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
22420         and jm-glibc-io.m4, as they are no longer a special case.
22421         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
22422         kludge and the auto-generation stuff.  Check only whether the
22423         functions are declared, not whether they exist, since older hosts
22424         that don't declare the functions can't use the optimization anyway.
22425
22426 2002-12-06  Jim Meyering  <jim@meyering.net>
22427
22428         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
22429
22430         Merge in changes from libc's misc/error.c, in preparation
22431         for the merge of gnulib's changes back into libc.
22432
22433         * lib/error.c (_): Define only if not already defined.
22434         Move definition to follow all #include directives.
22435         Include unlocked-io.h only if !_LIBC.
22436         [_LIBC]: Include <libio/libioP.h>.
22437         [USE_IN_LIBIO]: Include <libio/iolibio.h>
22438         (fflush): Tweak definition to use INTUSE.
22439         (putc): Define.
22440
22441 2002-12-05  Paul Eggert  <eggert@twinsun.com>
22442
22443         * lib/alloca.c [defined emacs]: Include "lisp.h".
22444         (xalloc_die) [defined emacs]: New macro.
22445         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
22446         [! defined emacs]: Include <xalloc.h>.
22447         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
22448         (pointer): Typedef to POINTER_TYPE *.
22449         (malloc): Remove decl; we now always use xmalloc.
22450         (alloca): Use old-style definition, since Emacs needs this.
22451         Check for arithmetic overflow when computing combined size.
22452
22453 2002-12-04  Paul Eggert  <eggert@twinsun.com>
22454
22455         Do not generate unlocked-io.h automatically, since it's easier to
22456         maintain it by hand.
22457
22458         * lib/unlocked-io.h: New file, from GNU diffutils,
22459         but with proper copyright notice and attribution.
22460         * lib/gen-uio: Remove.
22461         * lib/Makefile.am: Add copyright notice.
22462         (libfetish_a_SOURCES): Add unlocked-io.h.
22463         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
22464         (DISTCLEANFILES, io_functions): Remove macros.
22465         (EXTRA_DIST): Remove gen_uio.
22466         (unlocked-io.h): Remove rule.
22467
22468 2002-12-04  Jim Meyering  <jim@meyering.net>
22469
22470         Reflect the fact that stat.c and lstat.c are no longer generated.
22471         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
22472         (DISTCLEANFILES): Likewise.
22473         (EXTRA_DIST): Likewise.
22474         (all_local): Don't depend on stat.c or lstat.c.
22475         (stat.c, lstat.c): Remove rules.
22476         (EXTRA_DIST): Remove xstat.in.
22477
22478         * lib/xstat.in: Remove file.  Contents moved into stat.c.
22479         * lib/stat.c: New file.  Contents mostly from xstat.in.
22480         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
22481         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
22482
22483         * lib/safe-read.c: Rework so that it may serve to define safe_write,
22484         too.
22485         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
22486
22487 2002-12-03  Jim Meyering  <jim@meyering.net>
22488
22489         * lib/safe-read.c, safe-write.c: Change variable names and comments,
22490         but not semantics, to minimize the differences between these two files.
22491         (safe_read): Change comment to mention SAFE_READ_ERROR.
22492
22493         * lib/safe-read.c (IS_EINTR): Define.
22494         (safe_read): Use IS_EINTR in place of in-function cpp directives.
22495
22496 2002-12-02  Jim Meyering  <jim@meyering.net>
22497
22498         * lib/safe-read.c (EINTR): Define.
22499         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
22500         (INT_MAX): Provide fallback.
22501         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
22502
22503         * lib/safe-read.h (SAFE_READ_ERROR): Define.
22504
22505 2002-12-02  Bruno Haible  <bruno@clisp.org>
22506
22507         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
22508         Define, taken from safe-read.c.
22509         (INT_MAX): Provide fallback.
22510         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
22511         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
22512
22513         * lib/safe-read.c (EINTR): Remove definition.
22514         (safe_read): Don't use EINTR if it is absent.
22515
22516 2002-12-01  Jim Meyering  <jim@meyering.net>
22517
22518         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
22519         zero.
22520         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
22521
22522 2002-11-27  Paul Eggert  <eggert@twinsun.com>
22523
22524         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
22525         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
22526         with `if (! (value < limit)) abort ();', for readability.
22527
22528 2002-11-26  Karl Berry  <karl@gnu.org>
22529
22530         * lib/strdup.c: copy from libc again, with jim's ok.
22531         * lib/.cppi-disable: re-add strdup.c
22532
22533 2002-11-25  Karl Berry  <karl@gnu.org>
22534
22535         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
22536         instead of "strtol.c".
22537
22538 2002-11-25  Karl Berry  <karl@gnu.org>
22539
22540         * config/install-sh: update from automake for variable quoting, $0 in
22541         error msgs, etc.
22542
22543         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
22544         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
22545         entry.
22546
22547 2002-11-25  Jim Meyering  <jim@meyering.net>
22548
22549         * lib/mktime.c: Sync from libc, now that it has the latest fix.
22550
22551 2002-11-24  Karl Berry  <karl@gnu.org>
22552
22553         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
22554         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
22555
22556 2002-11-24  Jim Meyering  <jim@meyering.net>
22557
22558         Update from coreutils:
22559
22560         * lib/mktime.c: Merge in changes from libc.
22561
22562         Avoid a link-time failure on some Linux systems.
22563         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
22564         (otherwise).
22565         (__mon_yday): Declare with the STATIC attribute.
22566         (__mktime_internal): Likewise.
22567         Based on a report from Greg Schafer.
22568
22569 2002-11-23  Jim Meyering  <jim@meyering.net>
22570
22571         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
22572         Use `unsigned', not `int', as type of index.
22573
22574         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
22575
22576         * lib/fsusage.c: Remove unneeded parentheses around operands of
22577         `defined'.
22578
22579 2002-11-22  Paul Eggert  <eggert@twinsun.com>
22580
22581         * lib/quotearg.h: Allow multiple inclusion by surrounding with
22582         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
22583         so that we can be included first.
22584         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
22585         * lib/quotearg.c: Include quotearg.h immediately after config.h.
22586         No need to include stddef.h or sys/types.h any more.
22587         Surround local include files with "", not "<>".
22588         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
22589         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
22590         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
22591         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
22592         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
22593         (ISPRINT): Remove; no longer needed now that we assume C89.
22594
22595         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
22596         Preserve errno.
22597
22598         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
22599         quotearg_char): Use SIZE_MAX rather than
22600         (size_t) -1 when we are talking about "infinity".
22601
22602         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
22603
22604 2002-11-22  Paul Eggert  <eggert@twinsun.com>
22605
22606         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
22607         hint that one should use `if (! x) abort ();' rather than `assert
22608         (x);', and anyway it's one less thing to worry about configuring.
22609         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
22610         hash_rehash, hash_insert): Use abort rather than assert.
22611
22612 2002-11-22  Bruno Haible  <bruno@clisp.org>
22613
22614         * lib/safe-read.h: Assume C89. Add comments.
22615         (safe_read): Change return type to size_t.
22616         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
22617         byte counts > SSIZE_MAX correctly.
22618         * lib/safe-write.h: New file.
22619         * lib/safe-write.c: New file.
22620         * lib/full-read.h: New file.
22621         * lib/full-read.c: New file.
22622         * lib/full-write.h: Assume C89. Add comments.
22623         * lib/full-write.c: Include safe-write.h.
22624         (full_write): Rewritten to use safe_write.
22625         Suggested by Jim Meyering and Paul Eggert.
22626
22627 2002-11-21  Jim Meyering  <jim@meyering.net>
22628
22629         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
22630
22631         Merge in changes from the coreutils.
22632
22633         2002-09-25  Paul Eggert  <eggert@twinsun.com>
22634         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
22635         <stdint.h>.
22636         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
22637         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
22638         int.  Work more efficiently if X is the same width as uintmax_t.
22639         Do not compare X to -1, to avoid bogus compiler warning.
22640         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
22641         Don't assume that f_frsize and f_bsize are the same type.
22642
22643         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
22644         warning on FreeBSD.
22645
22646         * lib/makepath.c (make_path): Restore umask *before* creating the final
22647         component.
22648         (make_path): Minor reformatting.
22649
22650         * lib/xmalloc.c: Adjust to work with new autoconf macros,
22651         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
22652         HAVE_MALLOC/HAVE_REALLOC.
22653
22654         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
22655         dummy ones.  At least on GNU/Linux systems, `auto' means something
22656         else.
22657         From Michael Stone.
22658
22659 2002-11-21  Bruno Haible  <bruno@clisp.org>
22660
22661         Remove case insensitive option matching.
22662         * lib/argmatch.h (argcasematch): Remove declaration.
22663         (ARGCASEMATCH): Remove macro.
22664         (__xargmatch_internal): Remove case_sensitive argument.
22665         (XARGMATCH): Update.
22666         (XARGCASEMATCH): Remove macro.
22667         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
22668         case_sensitive argument.
22669         (argcasematch): Remove function.
22670         (__xargmatch_internal): Remove case_sensitive argument.
22671         (main): Use XARGMATCH instead of XARGCASEMATCH.
22672
22673         * lib/xmalloc.c: Change compile-time error message. Add comment about
22674         required autoconf version.
22675
22676 2002-11-20  Paul Eggert  <eggert@twinsun.com>
22677
22678         Merge argmatch cleanups from Bison.  Assume C89.
22679
22680         * lib/argmatch.c: Include config.h here, not in argmatch.h.
22681         Include stdlib.h, for EXIT_FAILURE.
22682         Always include <string.h>, since we assume C89.
22683         (EXIT_FAILURE): Remove pre-C89 bug workaround.
22684         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
22685         Include <stddef.h> instead, since it's all we need for size_t.
22686         (PARAMS): Remove.  All uses removed.
22687         (ARRAY_CARDINALITY): Do not bother to #undef.
22688         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
22689         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
22690         Remove unnecessary parentheses.
22691         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
22692         Insert necessary parentheses.
22693         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
22694         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
22695
22696 2002-11-19  Bruno Haible  <bruno@clisp.org>
22697
22698         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
22699         * lib/mbswidth.h: Include <stddef.h>, for size_t.
22700
22701         * lib/mbswidth.h (PARAMS): Remove macro.
22702         (mbswidth, mbsnwidth): Use ANSI C function declarations.
22703         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
22704
22705         * lib/gcd.h (PARAMS): Remove macro.
22706         (gcd): Use ANSI C function declarations.
22707         * lib/gcd.c (gcd): Likewise.
22708
22709 2002-11-15  Bruno Haible  <bruno@clisp.org>
22710
22711         * lib/strcspn.c: Include <stddef.h>.
22712         (strcspn): Use ANSI C function declaration. Change return type to
22713         size_t. Use NULL.
22714         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
22715         (strpbrk): Use NULL.
22716         * lib/strpbrk.h (PARAMS): Remove macro.
22717         (strpbrk): Use ANSI C function declaration.
22718         * lib/strstr.c: Don't include <sys/types.h>.
22719         * lib/strstr.h (PARAMS): Remove macro.
22720         (strstr): Use ANSI C function declarations.
22721
22722 2002-11-14  Karl Berry  <karl@gnu.org>
22723
22724         * config/mkinstalldirs: `do' on separate line, instead of
22725         `for var; do'.
22726
22727 2002-11-06  Bruno Haible  <bruno@clisp.org>
22728
22729         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
22730         * lib/gcd.c (gcd): Likewise.
22731
22732 2002-11-05  Bruno Haible  <bruno@clisp.org>
22733
22734         * lib/gcd.h: New file, from gettext-0.11.5.
22735         * lib/gcd.c: New file, from gettext-0.11.5.
22736
22737 2002-11-05  Bruno Haible  <bruno@clisp.org>
22738
22739         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22740         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22741         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22742         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22743
22744         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
22745         <libintl.h>.
22746         * lib/makepath.c: Include gettext.h instead of <locale.h> and
22747         <libintl.h>.
22748
22749         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
22750         * lib/human.c: Include gettext.h instead of <libintl.h>.
22751         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
22752         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
22753         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
22754         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
22755         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
22756         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
22757         (textdomain): Remove definition.
22758         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
22759
22760         * lib/long-options.c: Remove include of <libintl.h> and definition of
22761         _.
22762         * lib/same.c: Remove include of <libintl.h> and definition of _.
22763
22764 2002-11-04  Owen Taylor  <otaylor@redhat.com>
22765
22766         * lib/config.charset: A few additions for Solaris.
22767
22768 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
22769
22770         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
22771         * lib/localcharset.c (locale_charset): Declare as extern "C".
22772
22773 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
22774
22775         * lib/config.charset: msdos in uk_UA uses CP1125.
22776
22777 2002-11-04  Bruno Haible  <bruno@clisp.org>
22778
22779         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
22780         * lib/strcase.h: New file, from GNU gettext-0.11.5.
22781         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
22782         * lib/strstr.h: New file, from GNU gettext-0.11.5.
22783         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
22784
22785 2002-11-04  Bruno Haible  <bruno@clisp.org>
22786
22787         * lib/localcharset.c (locale_charset): Don't return an empty string.
22788
22789 2002-11-04  Bruno Haible  <bruno@clisp.org>
22790
22791         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
22792         aliases.
22793
22794 2002-11-04  Bruno Haible  <bruno@clisp.org>
22795
22796         * lib/config.charset: Update for newest glibc. Add canonical names
22797         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
22798
22799 2002-11-04  Bruno Haible  <bruno@clisp.org>
22800
22801         * lib/config.charset: Add support for NetBSD.
22802
22803 2002-11-04  Bruno Haible  <bruno@clisp.org>
22804
22805         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
22806
22807 2002-11-01  Bruno Haible  <bruno@clisp.org>
22808
22809         * configure.in: Add AC_CONFIG_AUX_DIR call.
22810         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
22811         test/Makefile.
22812         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
22813
22814 2002-09-28  Karl Berry  <karl@gnu.org>
22815
22816         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
22817         installed automake until the next release, since changes have been
22818         made.
22819
22820 2002-09-25  Karl Berry  <karl@gnu.org>
22821
22822         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
22823         * lib/getopt*: copy from libc/posix.
22824         * lib/gettext.h: copy from gettext.
22825         * lib/.cppi-disable: add strdup.c, gettext.h.
22826
22827 2002-09-25  Karl Berry  <karl@gnu.org>
22828
22829         * config/srclist.txt: enable gettext.h check.
22830         * config/config.{guess,sub}: update from prep.
22831         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
22832                 from automake 1.6.3.
22833         See srclist*.
22834
22835 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
22836
22837         * regex.c (PATFETCH): Remove the translating fetch.
22838         (PATFETCH_RAW): Rename to PATFETCH.
22839         (set_image_of_range): New fun.
22840         (SET_RANGE_TABLE_WORK_AREA): Use it.
22841         (regex_compile): Don't translate the pattern chars so eagerly.
22842         Only do it when inserting an `exactn' bytecode or when handling
22843         a char-range.
22844         (mutually_exclusive_p): Avoid empty statement.
22845
22846 2002-07-06  Jim Meyering  <meyering@lucent.com>
22847
22848         * m4/README: Don't mention Makefile.am.in.
22849         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
22850
22851 2002-07-01  Jim Meyering  <meyering@lucent.com>
22852
22853         * lib/c-stack.c: Include sys/time.h.
22854         From Volker Borchert.
22855
22856 2002-06-26  Paul Eggert  <eggert@twinsun.com>
22857
22858         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
22859
22860 2002-06-26  Paul Eggert  <eggert@twinsun.com>
22861
22862         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
22863         New macro.  Use it uniformly instead of
22864         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
22865         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
22866         reported by Vin Shelton.
22867
22868 2002-06-22  Paul Eggert  <eggert@twinsun.com>
22869
22870         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
22871         Do not assume SA_SIGINFO behavior.
22872         Bug reported by Jim Meyering on NetBSD 1.5.2.
22873
22874 2002-06-22  Jim Meyering  <meyering@lucent.com>
22875
22876         * m4/c-stack.m4: New file, from diffutils-2.8.2.
22877         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
22878
22879         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
22880         now that configure.ac uses AC_GNU_SOURCE.
22881         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
22882         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
22883
22884         Update to latest tools.  Suggestions from Paul Eggert.
22885         * m4/stdbool.m4: New file, from diffutils-2.8.2.
22886         * m4/gnu-source.m4: Update from diffutils-2.8.2.
22887         * m4/fnmatch.m4: Likewise.
22888         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
22889         to AC_HEADER_STDBOOL
22890
22891 2002-06-22  Jim Meyering  <meyering@lucent.com>
22892
22893         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
22894         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
22895
22896 2002-06-22  Jim Meyering  <meyering@lucent.com>
22897
22898         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
22899
22900         * lib/exitfail.c, exitfail.h: Likewise.
22901         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
22902
22903         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
22904         of fnmatch.h.
22905         (EXTRA_DIST): Add fnmatch_loop.c.
22906         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
22907
22908         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
22909         * lib/fnmatch.c: Update from diffutils-2.8.2.
22910         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
22911         * lib/fnmatch.h: Remove file.
22912
22913 2002-06-21  Jim Meyering  <meyering@lucent.com>
22914
22915         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
22916         * m4/mbrtowc.m4: Likewise.
22917
22918         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
22919         * m4/mbswidth.m4: Reflect name change:
22920         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
22921         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
22922
22923         * m4/lib-link.m4: Update from gettext-0.11.2.
22924         * m4/gettext.m4: Likewise.
22925
22926         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
22927         From Alfred M. Szmidt.
22928
22929 2002-06-18  Paul Eggert  <eggert@twinsun.com>
22930
22931         * lib/file-type.h: Report an error if neither S_ISREG nor
22932         S_IFREG is defined, instead of using a test specific to glibc
22933         2.2.  This should be safe, since POSIX requires S_ISREG and
22934         Unix Version 7 had S_IFREG.  We don't need to check for
22935         <sys/types.h> since we don't use any symbols that it defines.
22936
22937 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
22938
22939         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
22940         $@-t, so that each temporary file name is unique and valid in the first
22941         8 characters, for operation under DOS.
22942
22943 2002-06-15  Paul Eggert  <eggert@twinsun.com>
22944
22945         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
22946
22947 2002-06-15  Jim Meyering  <meyering@lucent.com>
22948
22949         Work even with DJGPP 2.03, which lacks support for symlinks.
22950         From Richard Dawe.
22951         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
22952         is defined.
22953         * lib/lchown.c (S_ISLNK): Likewise.
22954
22955 2002-06-15  Jim Meyering  <meyering@lucent.com>
22956
22957         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
22958         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
22959         have been included before this file.
22960
22961 2002-06-14  Jim Meyering  <meyering@lucent.com>
22962
22963         * lib/file-type.h: Use the version from diffutils-2.8.2.
22964         * lib/file-type.c: Likewise.
22965
22966 2002-06-07  Jim Meyering  <meyering@lucent.com>
22967
22968         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
22969         They're needed at least for NetBSD 1.5.2.
22970         ($statxfs_includes): Include those same headers.
22971         ($statxfs_includes): Include sys/vfs.h if available.
22972         ($statxfs_includes): Likewise for sys/statvfs.h.
22973         Check for the following members in both structs statfs and statvfs:
22974         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
22975
22976 2002-06-01  Jim Meyering  <meyering@lucent.com>
22977
22978         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
22979         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
22980
22981 2002-05-28  Jim Meyering  <meyering@lucent.com>
22982
22983         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
22984         Reported by Volker Borchert.
22985
22986 2002-05-27  Jim Meyering  <meyering@lucent.com>
22987
22988         Fix a problem seen only on nonconforming systems whereby ls.c's
22989         use of localtime, and then of gettimeofday would cause trouble:
22990         the localtime call used to initialize rpl_gettimeofday's save
22991         mechanism would clobber ls's current local time information so
22992         that in any long listing the first file would always be listed
22993         with date 1970-01-01.  Analysis by Volker Borchert.
22994
22995         * lib/gettimeofday.c (localtime): Undefine.
22996         (rpl_localtime): New function.
22997
22998 2002-05-27  Jim Meyering  <meyering@lucent.com>
22999
23000         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
23001         localtime.
23002
23003         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
23004         use the replacement function; it wouldn't resolve at link time.
23005         Reported by Volker Borchert.
23006
23007 2002-05-22  Jim Meyering  <meyering@lucent.com>
23008
23009         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
23010         file-type.h.
23011         * lib/file-type.h: New file.
23012         * lib/file-type.c (file_type): New file/function.  Extracted from
23013         diffutils.
23014
23015 2002-04-30  Jim Meyering  <meyering@lucent.com>
23016
23017         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
23018
23019 2002-04-29  Paul Eggert  <eggert@twinsun.com>
23020
23021         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
23022
23023 2002-04-29  Paul Eggert  <eggert@twinsun.com>
23024
23025         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
23026         Do not check for alloca.h (no longer used) or stdbool.h (was never
23027         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
23028
23029 2002-04-29  Paul Eggert  <eggert@twinsun.com>
23030
23031         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
23032
23033 2002-04-29  Jim Meyering  <meyering@lucent.com>
23034
23035         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
23036         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
23037         Use AC_FUNC_STRNLEN here instead.
23038
23039         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
23040         With autoconf-2.53a, it's part of AC_PROG_CC.
23041
23042 2002-04-28  Paul Eggert  <eggert@twinsun.com>
23043
23044         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
23045         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
23046
23047 2002-04-28  Paul Eggert  <eggert@twinsun.com>
23048
23049         * lib/sig2str.h, lib/sig2str.c: New files.
23050         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
23051
23052 2002-04-28  Paul Eggert  <eggert@twinsun.com>
23053
23054         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
23055         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
23056         of 127, since 64 is the largest conceivable number for ancient
23057         nonstandard hosts.
23058         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
23059
23060 2002-04-28  Jim Meyering  <meyering@lucent.com>
23061
23062         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
23063
23064 2002-04-24  Jim Meyering  <meyering@lucent.com>
23065
23066         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
23067         (jm_PREREQ): Use it.
23068
23069         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
23070         mach/mach.h fcntl.h.
23071         Check for this function: setlocale.
23072
23073 2002-04-24  Jim Meyering  <meyering@lucent.com>
23074
23075         * lib/gettext.h: New file, from Gettext.
23076         * lib/Makefile.am (INCLUDES): Remove -I../intl.
23077         (libfetish_a_SOURCES): Add gettext.h.
23078
23079 2002-04-16  Jim Meyering  <meyering@lucent.com>
23080
23081         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
23082         ut_pid, ut_id, ut_exit.
23083
23084 2002-04-16  Jim Meyering  <meyering@lucent.com>
23085
23086         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
23087         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
23088         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
23089
23090 2002-04-12  Jim Meyering  <meyering@lucent.com>
23091
23092         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
23093         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
23094         existence of the getmntinfo function.  Needed for Darwin 5.3.
23095
23096         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
23097         This is necessary at least on Darwin 5.3.
23098
23099         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
23100         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
23101         strnlen.o in the library, and that makes some versions of ranlib
23102         object.
23103
23104 2002-04-12  Jim Meyering  <meyering@lucent.com>
23105
23106         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
23107
23108 2002-04-09  Jim Meyering  <meyering@lucent.com>
23109
23110         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
23111         to be more precise.  Rather than saying we're checking whether the
23112         function `works', say what we're testing.
23113         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
23114         Reported by Bruno Haible.
23115
23116 2002-03-10  Jim Meyering  <meyering@lucent.com>
23117
23118         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
23119         Suggestion from Santiago Vila.
23120
23121 2002-03-08  Jim Meyering  <meyering@lucent.com>
23122
23123         * lib/rename.c: Mention that this wrapper is needed also on
23124         mips-dec-ultrix4.4 systems.
23125
23126 2002-03-02  Jim Meyering  <meyering@lucent.com>
23127
23128         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
23129         not HAVE_CLOCK_SETTIME.
23130
23131 2002-02-27  Paul Eggert  <eggert@twinsun.com>
23132
23133         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
23134         Check for clock_settime.
23135
23136 2002-02-27  Paul Eggert  <eggert@twinsun.com>
23137
23138         * lib/nanosleep.h: Rename to....
23139         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
23140
23141         * lib/gettime.c: New file.
23142         * lib/settime.c: New file.
23143         * lib/stime.c: Remove.
23144
23145         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
23146         timespec.h.  Remove nanosleep.h.
23147
23148 2002-02-25  Paul Eggert  <eggert@twinsun.com>
23149
23150         * m4/acl.m4: New file.
23151         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
23152         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
23153
23154 2002-02-25  Paul Eggert  <eggert@twinsun.com>
23155
23156         * lib/acl.c, lib/acl.h: New files.
23157         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
23158
23159 2002-02-24  Jim Meyering  <meyering@lucent.com>
23160
23161         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
23162         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
23163         cause trouble.  Reported by Nelson Beebe.
23164
23165 2002-02-23  Paul Eggert  <eggert@twinsun.com>
23166
23167         * lib/path-concat.c (xpath_concat): Reorder code to pacify
23168         compilers that don't know that xalloc_die never returns.
23169
23170 2002-02-20  Jim Meyering  <meyering@lucent.com>
23171
23172         * lib/getdate.c: Regenerate using bison-1.33.
23173
23174 2002-02-17  Jim Meyering  <meyering@lucent.com>
23175
23176         * config/config.guess (main): Don't use `head -1'; it's no longer
23177         portable. Use `sed 1q' instead.
23178
23179 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
23180
23181         * m4/codeset.m4: Upgrade to gettext-0.11.
23182         * m4/gettext.m4: Upgrade to gettext-0.11.
23183         * m4/glibc21.m4: Upgrade to gettext-0.11.
23184         * m4/iconv.m4: Upgrade to gettext-0.11.
23185         * m4/isc-posix.m4: Upgrade to gettext-0.11.
23186         * m4/lcmessage.m4: Upgrade to gettext-0.11.
23187         * m4/lib-ld.m4: New file, from gettext-0.11.
23188         * m4/lib-link.m4: New file, from gettext-0.11.
23189         * m4/lib-prefix.m4: New file, from gettext-0.11.
23190         * m4/progtest.m4: Upgrade to gettext-0.11.
23191
23192 2002-02-15  Paul Eggert  <eggert@twinsun.com>
23193
23194         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
23195         (jm_PREREQ): Use it.
23196
23197 2002-02-15  Paul Eggert  <eggert@twinsun.com>
23198
23199         * lib/posixver.c, lib/posixver.h: New files.
23200         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
23201
23202 2002-02-02  Paul Eggert  <eggert@twinsun.com>
23203             Bruno Haible  <bruno@clisp.org>
23204
23205         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
23206         (fwrite_success_callback): New declaration.
23207         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
23208         print_unicode_char. Call failure callback instead of error.
23209         (fwrite_success_callback): New function.
23210         (exit_failure_callback): New function.
23211         (fallback_failure_callback): New function.
23212         (print_unicode_char): Call unicode_to_mb.
23213
23214 2002-01-26  Jim Meyering  <meyering@lucent.com>
23215
23216         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
23217         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
23218
23219 2002-01-26  Jim Meyering  <meyering@lucent.com>
23220
23221         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
23222
23223 2002-01-22  Paul Eggert  <eggert@twinsun.com>
23224
23225         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
23226
23227 2002-01-22  Jim Meyering  <meyering@lucent.com>
23228
23229         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
23230         Otherwise, some versions of automake would omit the rule that makes
23231         Makefile from Makefile.in.
23232
23233 2002-01-21  Paul Eggert  <eggert@twinsun.com>
23234
23235         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
23236         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
23237         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
23238         (memcoll): Set errno to zero if there is no error.
23239
23240         * lib/quotearg.c (quotearg_buffer_restyled):
23241         Fix bug with quoting buffers containing NUL when backslashing escapes.
23242         This bug was exposed by the other changes in this patch.
23243         (quotearg_n_options): New arg ARGSIZE.
23244         All callers changed.
23245         (quoting_options_from_style): New function.
23246         (quotearg_n_style): Use it.
23247         (quotearg_n_style_mem): New function.
23248
23249         * lib/quotearg.h (quotearg_n_style_mem): New function.
23250
23251 2002-01-19  Jim Meyering  <meyering@lucent.com>
23252
23253         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
23254         Remove useless quotes: DF_PROG="df".
23255         * m4/strnlen.m4: New file.
23256
23257 2002-01-16  Paul Eggert  <eggert@twinsun.com>
23258
23259         * lib/backupfile.c (ISDIGIT): Comment fix.
23260         * lib/getdate.y (ISDIGIT): Likewise.
23261         * lib/posixtm.c (ISDIGIT, year): Likewise.
23262         * lib/strverscmp.c (ISDIGIT): Likewise.
23263         * lib/userspec.c (ISDIGIT): Likewise.
23264
23265 2002-01-16  Jim Meyering  <meyering@lucent.com>
23266
23267         * lib/getdate.y: Add three semicolons, each just before a closing
23268         brace. Bison (as of version 1.31) no longer papers over that mistake.
23269
23270 2002-01-05  Jim Meyering  <meyering@lucent.com>
23271
23272         * lib/version-etc.c (version_etc_copyright): Update copyright year.
23273
23274 2001-12-19  Paul Eggert  <eggert@twinsun.com>
23275
23276         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
23277         not silently exit merely because the output buffer happens to
23278         have nothing pending.
23279
23280 2001-12-18  Paul Eggert  <eggert@twinsun.com>
23281
23282         See the big note in ../ChangeLog.
23283         * lib/human.c (suffixes): Prefer K to k for 1024.
23284         (generate_suffix_backwards): New function.
23285         (human_readable_inexact): Use it.
23286         * lib/xstrtol.c (__xstrtol): If there is no number but there
23287         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
23288         Accept 'K' as well as 'k'.
23289
23290 2001-12-15  Jim Meyering  <meyering@lucent.com>
23291
23292         * lib/regex.h (__restrict_arr): Update from libc.
23293
23294         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
23295         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
23296         (STREQ): Define.
23297
23298 2001-12-14  Jim Meyering  <meyering@lucent.com>
23299
23300         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
23301         Suggestion from Bruno Haible.
23302
23303 2001-12-10  Jim Meyering  <meyering@lucent.com>
23304
23305         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
23306         xrealloc, Instead, include "xalloc.h".
23307         (initbuffer): Don't cast xmalloc return value to char*.
23308         (readline): Reword comment.
23309         Don't cast xrealloc return value to char*
23310         Return NULL, not 0.
23311
23312 2001-12-09  Jim Meyering  <meyering@lucent.com>
23313
23314         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
23315         about `signed and unsigned type in conditional expression'.
23316         * lib/posixtm.c (posix_time_parse): Likewise.
23317
23318         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
23319
23320         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
23321         to avoid a pedantic warning.
23322
23323         * lib/getstr.c: Don't include assert.h.
23324         (getstr): Remove warning-evoking assertions.
23325         Return -1 if offset parameter is out of bounds.
23326         Change the type of a local from int to size_t.
23327
23328         * lib/strftime.c (my_strftime_localtime_r): Include this function
23329         definition in the `#if ! HAVE_TM_GMTOFF' block.
23330
23331         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
23332         Include xalloc.h instead.
23333
23334 2001-12-02  Jim Meyering  <meyering@lucent.com>
23335
23336         * lib/tempname.c: Don't declare getenv, thus reverting the change of
23337         2001-11-18.  It's no longer necessary, now that stdlib.h is always
23338         included.
23339
23340         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
23341         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
23342
23343 2001-11-30  Akim Demaille  <akim@epita.fr>
23344
23345         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
23346         before being defined.
23347
23348 2001-11-27  Paul Eggert  <eggert@twinsun.com>
23349
23350         * lib/quotearg.h (quotearg_n, quotearg_n_style):
23351         First arg is int, not unsigned.
23352         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
23353         (SIZE_MAX, UINT_MAX): New macros.
23354         (quotearg_n_options): Abort if N is negative.
23355         Avoid overflow check on hosts where size_t is 64 bits and int
23356         is 32 bits, as overflow is impossible there.
23357         Fix off-by-one typo that caused unnecessary reallocation.
23358
23359 2001-11-27  Jim Meyering  <meyering@lucent.com>
23360
23361         * lib/tempname.c: Merge with version from libc.
23362         * lib/regex.c: Likewise.
23363
23364         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
23365         systems for which STDC_HEADERS is 0, it was not included, resulting in
23366         a warning about an integer-to-pointer conversion problem with getenv.
23367         Reported by Volker Borchert.
23368
23369 2001-11-26  Jim Meyering  <meyering@lucent.com>
23370
23371         * lib/gtod.h: Remove file.
23372         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
23373         * lib/gettimeofday.c: Don't include gtod.h.
23374         (GTOD_init): Remove function.
23375         (rpl_gettimeofday): Do its job here instead, rather than aborting.
23376         Suggestion from Volker Borchert.
23377
23378 2001-11-23  Jim Meyering  <meyering@lucent.com>
23379
23380         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
23381         it.
23382         * lib/hash.c (struct hash_table): Define it here instead.
23383
23384 2001-11-22  Jim Meyering  <meyering@lucent.com>
23385
23386         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
23387
23388 2001-11-20  Jim Meyering  <meyering@lucent.com>
23389
23390         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
23391         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
23392
23393 2001-11-19  Jim Meyering  <meyering@lucent.com>
23394
23395         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
23396         directory.  Use "conftestXXXXXX" as the template.
23397         Suggestion from Paul Eggert.
23398
23399         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
23400         immediately, so the test doesn't mistakenly hit the max-open-files
23401         limit.
23402
23403 2001-11-18  Paul Eggert  <eggert@twinsun.com>
23404
23405         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
23406         (TEMPORARIES): New macro.
23407         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
23408         removes an artificial limitation (e.g. HP-UX 10.20, where
23409         TMP_MAX is 17576).
23410
23411 2001-11-18  Jim Meyering  <meyering@lucent.com>
23412
23413         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
23414
23415 2001-11-18  Jim Meyering  <meyering@lucent.com>
23416
23417         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
23418         on SunOS 4.
23419
23420         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
23421         files will be created before anything else.
23422
23423 2001-11-17  Paul Eggert  <eggert@twinsun.com>
23424
23425         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
23426         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
23427
23428 2001-11-17  Jim Meyering  <meyering@lucent.com>
23429
23430         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
23431         Prompted by a report from Bob Proulx.
23432
23433         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
23434         Instead, require UTILS_FUNC_MKSTEMP.
23435
23436 2001-11-17  Jim Meyering  <meyering@lucent.com>
23437
23438         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
23439         Now, that's done as part of AC_FUNC_STRTOD.
23440
23441 2001-11-17  Jim Meyering  <meyering@lucent.com>
23442
23443         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
23444         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
23445         rather than group writable.  Patch by Juan F. Codagnone.
23446
23447         * lib/readtokens.c: Remove explicit declarations of xmalloc and
23448         xrealloc, Instead, include "xalloc.h".
23449
23450         * lib/mountlist.c: Include unlocked-io.h after all system headers.
23451         Remove explicit declarations of xmalloc, xrealloc,
23452         and xstrdup.  Instead, include "xalloc.h".
23453
23454         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
23455         unlocked-io.h.
23456         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
23457         Likewise.
23458         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
23459
23460         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
23461         Reported by Padraig Brady.
23462
23463         * lib/mkstemp.c: #undef mkstemp.
23464         Include config.h.
23465         (rpl_mkstemp): Rename from mkstemp.
23466         Protoize.
23467
23468 2001-11-16  Jim Meyering  <meyering@lucent.com>
23469
23470         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
23471         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
23472         determine the amount of total physical memory, use pstat_getstatic.
23473         HPUX-11 doesn't define _SC_PHYS_PAGES.
23474         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
23475         If sysconf couldn't be used to determine the amount of available
23476         physical memory, use both pstat_getstatic and pstat_getdynamic.
23477         Based on a patch from Bob Proulx.
23478
23479 2001-11-10  Jim Meyering  <meyering@lucent.com>
23480
23481         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
23482         (jm_PREREQ): Use it.
23483
23484 2001-11-09  Jim Meyering  <meyering@lucent.com>
23485
23486         * m4/jm-macros.m4: Require autoconf-2.52f.
23487         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
23488         Use these AC_-prefixed names, not the AM_-prefixed ones.
23489
23490         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
23491
23492 2001-11-05  Jim Meyering  <meyering@lucent.com>
23493
23494         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
23495
23496 2001-11-04  Jim Meyering  <meyering@lucent.com>
23497
23498         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
23499         $DEFS.
23500
23501 2001-11-03  Jim Meyering  <meyering@lucent.com>
23502
23503         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
23504         of AC_DEFUN.
23505
23506         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
23507         know the name of the variable in the macro definition.
23508
23509 2001-11-03  Jim Meyering  <meyering@lucent.com>
23510
23511         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
23512         in argmatch_to_argument call.
23513
23514         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
23515         argument.
23516
23517         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
23518         e.g., a fault due to an attempt to free a NULL pointer.
23519
23520 2001-11-01  Jim Meyering  <meyering@lucent.com>
23521
23522         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
23523         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
23524
23525 2001-11-01  Jim Meyering  <meyering@lucent.com>
23526
23527         * lib/dirfd.c, lib/dirfd.h: New files.
23528         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
23529
23530         * lib/hash.c (hash_print) [TESTING]: Clean up.
23531
23532 2001-10-22  Paul Eggert  <eggert@twinsun.com>
23533
23534         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
23535         to avoid a warning if -Wall.
23536
23537 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
23538
23539         * README: New file
23540         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
23541         (per RMS's instructions, this is now the canonical source)
23542         * lgpl/, gpl/: New directories.
23543
23544 2001-10-21  Paul Eggert  <eggert@twinsun.com>
23545
23546         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
23547
23548 2001-10-21  Jim Meyering  <meyering@lucent.com>
23549
23550         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
23551         this code would end up calling gettext even in packages built
23552         with --disable-nls.
23553         * lib/getopt.c (_): Likewise.
23554         * lib/regex.c (_): Likewise.
23555
23556 2001-10-20  Paul Eggert  <eggert@twinsun.com>
23557
23558         * m4/error.m4 (jm_PREREQ_ERROR):
23559         Do not invoke AC_CHECK_FUNCS with strerror_r, as
23560         AC_FUNC_STRERROR_R does that.
23561         Check for strerror declaration.
23562
23563         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
23564         are supposed to have them these days.
23565         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
23566         Merge changes from latest Autoconf CVS.
23567         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
23568         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
23569         POSIX decided to standardize on the int flavor of strerror_r.
23570
23571 2001-10-20  Paul Eggert  <eggert@twinsun.com>
23572
23573         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
23574         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
23575         Use strerror_r that is only a macro, even if it is not a function.
23576         (strerror): Check for HAVE_DECL_STRERROR before declaring.
23577         (private_strerror): Use prototypes, not old-style function definition.
23578         (print_errno_message): New function.
23579         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
23580         char*-flavored one.
23581         (error_tail, error, error_at_line): Use it.
23582
23583 2001-10-11  Jim Meyering  <meyering@lucent.com>
23584
23585         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
23586         and quote_n (1, ... to avoid clobbering a buffer.
23587
23588 2001-10-05  Jim Meyering  <meyering@lucent.com>
23589
23590         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
23591         hash-pjw.h.
23592         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
23593         * lib/hash-pjw.h: New file.
23594
23595 2001-09-30  Jim Meyering  <meyering@lucent.com>
23596
23597         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
23598         `struct fsstat' has the `f_fstypename' member.
23599         Use that to define FS_TYPE, which is now used to make
23600         the getfsstat link test tighter.
23601
23602 2001-09-30  Jim Meyering  <meyering@lucent.com>
23603
23604         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
23605         Include <sys/ucred.h>, for Apple Darwin.
23606         Include sys/mount.h and sys/fs_types.h only if available.
23607         (FS_TYPE): Define.
23608         (read_filesystem_list): Use FS_TYPE.
23609
23610 2001-09-29  Paul Eggert  <eggert@twinsun.com>
23611
23612         * lib/exclude.c (excluded_filename): 0 -> false, since it's
23613         a boolean context.
23614
23615 2001-09-29  Jim Meyering  <meyering@lucent.com>
23616
23617         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
23618         [one-argument getmntent function]): Include stdio.h before mntent.h.
23619         SunOS 4.1.x needs it for the declaration of `FILE'.
23620         Patch by Volker Borchert.
23621
23622         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
23623         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
23624         sys/fs_types.h, and make the link-test for getfsstat guard #include
23625         directives with appropriate #if HAVE_*_H tests so that we can
23626         detect getfsstat on Apple Darwin1.3.7 systems.
23627         Reported by Nelson Beebe.
23628         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
23629
23630 2001-09-28  Paul Eggert  <eggert@twinsun.com>
23631
23632         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
23633         #defines strtoimax.  Also treat the other strto* functions
23634         like strtoimax.
23635
23636         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
23637         Check for strtoul and strtoumax,
23638         as those declarations are made even in the signed case.
23639         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
23640         Likewise, for strtol and strtoimax.
23641
23642 2001-09-28  Paul Eggert  <eggert@twinsun.com>
23643
23644         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
23645         #defines strtoimax.  Also treat the other strto* functions
23646         like strtoimax.
23647
23648         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
23649         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
23650         (strtoimax, strtoumax): Do not declare if already defined as a macro.
23651
23652 2001-09-26  Jim Meyering  <meyering@lucent.com>
23653
23654         Most macros in unlocked-io.h had the wrong number of arguments.
23655         * lib/gen-uio: New script.
23656         (USE_UNLOCKED_IO): Define to 1 if not already defined.
23657         * lib/unlocked-io.hin: Remove file.
23658         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
23659         rather than trying to embed it here.
23660         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
23661         Reported by Padraig Brady.
23662
23663 2001-09-25  Volker Borchert  <bt@teknon.de>
23664
23665         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
23666         `result'.
23667
23668 2001-09-24  Jim Meyering  <meyering@lucent.com>
23669
23670         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
23671
23672 2001-09-23  Jim Meyering  <meyering@lucent.com>
23673
23674         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
23675         instead of the mere test for existence of mntent.h.  The latter
23676         would get a false-positive on AIX 3.4 systems.
23677         In the outer getmntent if-block, don't die if neither of the getmntent
23678         tests succeeds.  Instead, just fall through and continue with the
23679         remaining tests.
23680
23681 2001-09-23  Jim Meyering  <meyering@lucent.com>
23682
23683         * lib/mountlist.c: Remove useless parentheses in #if directives.
23684         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
23685         the deprecated MOUNTED symbol is no longer defined in mntent.h.
23686
23687 2001-09-22  Jim Meyering  <meyering@lucent.com>
23688
23689         * m4/gettext.m4: New file.  From gettext.
23690         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
23691         * m4/progtest.m4: Likewise
23692         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
23693         * m4/glibc21.m4: Likewise.
23694
23695         * m4/libintl.m4: Remove.  No longer used.
23696
23697 2001-09-22  Jim Meyering  <meyering@lucent.com>
23698
23699         * lib/localcharset.c: Update from latest gettext.
23700         * lib/config.charset: Likewise.
23701
23702 2001-09-20  Jim Meyering  <meyering@lucent.com>
23703
23704         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
23705         strtoimax.
23706         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
23707         strtoumax.
23708
23709 2001-09-20  Jim Meyering  <meyering@lucent.com>
23710
23711         * lib/xstrtol.c (strtoimax): Guard declaration with
23712         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
23713         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
23714         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
23715         (strtoumax): Likewise, for completeness (it wasn't necessary).
23716
23717 2001-09-17  Paul Eggert  <eggert@twinsun.com>
23718
23719         * lib/strtoimax.c (HAVE_LONG_LONG):
23720         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
23721         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
23722         to work around bug in IBM C compiler.
23723
23724 2001-09-17  Jim Meyering  <meyering@lucent.com>
23725
23726         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
23727         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
23728         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
23729         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
23730         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
23731         whenever the right hand side need not be expanded by the shell.
23732
23733 2001-09-16  Paul Eggert  <eggert@twinsun.com>
23734
23735         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
23736         library.  It's not correct, as some older glibcs are buggy.
23737         fnmatch wasn't fixed until glibc 2.2.
23738
23739         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
23740         special shell magic here.
23741
23742 2001-09-16  Jim Meyering  <meyering@lucent.com>
23743
23744         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
23745         * m4/jm-macros.m4: Require it.
23746
23747 2001-09-16  Jim Meyering  <meyering@lucent.com>
23748
23749         * lib/mkdir.c: New file.
23750
23751 2001-09-15  Jim Meyering  <meyering@lucent.com>
23752
23753         * m4/jm-macros.m4: Check for help2man.
23754
23755 2001-09-11  Jim Meyering  <meyering@lucent.com>
23756
23757         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
23758         The body, by Paul Eggert, was moved here from configure.in.
23759         * m4/jm-macros.m4: Require UTILS_HOST_OS.
23760
23761 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23762
23763         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
23764         (jm_PREREQ): Use it.
23765
23766 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23767
23768         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
23769         Use ssize_t, not int, to store result of readlink.
23770         Check for ssize_t overflow as well as size_t overflow,
23771         as POSIX says the result of readlink is implementation-defined
23772         when ssize_t overflows.
23773         Remove unnecessary cast to char*.
23774         Use free+malloc instead of realloc, as the storage doesn't need
23775         to be preserved and it's clearer and can be more efficient that way.
23776         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
23777         * lib/xreadlink.h (xreadlink): Update prototype.
23778
23779 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23780
23781         * lib/xgetcwd.c: Revert some of the previous change; intead,
23782         fix the HAVE_GETCWD_NULL code to behave more like the
23783         !HAVE_GETCWD_NULL code used to.
23784
23785         Include "xalloc.h".
23786         (xgetcwd): Do not return NULL when memory is exhausted; instead,
23787         invoke xalloc_die.
23788
23789 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23790
23791         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
23792         sys/param.h, as pathmax.h includes them.
23793
23794 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23795
23796         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
23797         (jm_PREREQ_XGETCWD): New macro.
23798
23799         * m4/getcwd.m4: New file.
23800
23801 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23802
23803         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
23804         like the HAVE_GETCWD_NULL code.
23805         Include pathmax.h if not HAVE_GETCWD.
23806         Do not include xalloc.h.
23807         (INITIAL_BUFFER_SIZE): New symbol.
23808         Do not use xmalloc / xrealloc, since the caller is responsible for
23809         handling errors.  Preserve errno around `free' during failure.
23810         Do not overrun buffer when using getwd.
23811
23812 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23813
23814         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
23815         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
23816         getcwd (NULL, 0).
23817
23818 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23819
23820         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
23821         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
23822         spotted by Jim Meyering.
23823
23824 2001-09-03  Jim Meyering  <meyering@lucent.com>
23825
23826         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
23827         failure.
23828
23829 2001-09-02  Jim Meyering  <meyering@lucent.com>
23830
23831         * lib/error.c: Update from GNU libc.
23832
23833 2001-09-01  Jim Meyering  <meyering@lucent.com>
23834
23835         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
23836         Used by df.
23837
23838 2001-09-01  Jim Meyering  <meyering@lucent.com>
23839
23840         * lib/xreadlink.c: New file.
23841         * lib/xreadlink.h: New file.
23842         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
23843         xreadlink.h.
23844
23845         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
23846         doesn't conflict with sparc Solaris 7's definition in
23847         /usr/include/sys/int_types.h.
23848
23849         * lib/exclude.c: Use `""', not `<>' to #include non-system header
23850         files.
23851         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
23852         and strncasecmp as r-values.  Unixware didn't have declarations.
23853
23854 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23855
23856         * lib/xstrtol.h: Add copyright notice.
23857         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
23858         LONGINT_INVALID_SUFFIX_CHAR.
23859
23860 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23861
23862         * lib/xstrtol.c (strtoimax): New decl.
23863
23864 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23865
23866         * lib/xgetcwd.c: Don't include pathmax.h.
23867         Include stdlib.h and unistd.h if available.
23868         Include xalloc.h.
23869         (xmalloc, xstrdup, free): Remove decls.
23870         (xgetcwd): Don't assume sizes fit in unsigned.
23871         Check for overflow when computing sizes.
23872         Simplify reallocation code.
23873
23874 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23875
23876         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
23877         a directory's st_size can have an arbitrary value, so the old
23878         usage could waste an arbitrary amount of memory.  All uses
23879         changed.
23880         * lib/savedir.h: Update prototype.
23881
23882 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23883
23884         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
23885
23886         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
23887         old strtoimax.c.
23888
23889         Also, make the following further changes to make this file's
23890         configuration more similar to that of strtol.c:
23891         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
23892         (strtoumax, uintmax_t, strtoull, strtol): Remove.
23893         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
23894         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
23895         changed to signed values.
23896
23897         And make the following changes as well:
23898         Fix copyright notice, as 1999 was missing.
23899         (verify): New macro.
23900         (strtoimax): Check sizes at compile-time, not run-time.
23901         Prefer strtol to strtoll if both work.
23902         (main): Remove; it was not that useful and was a pain to maintain.
23903
23904         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
23905
23906 2001-08-31  Jim Meyering  <meyering@lucent.com>
23907
23908         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
23909         Use an initial, malloc'd, buffer of length 128 rather than
23910         a statically allocated one of length 1024.
23911
23912 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23913
23914         Simplify code, partly by assuming autoconf 2.52 semantics.
23915
23916         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
23917
23918         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
23919         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
23920         All uses removed.
23921         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
23922         Move AC_REQUIRE to next-to-top level, to avoid confusion.
23923         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
23924         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
23925         jm_AC_HEADER_INTTYPES_H.
23926         * m4/jm-macros.m4 (jm_MACROS): Likewise.
23927
23928         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
23929
23930         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
23931         Quote first arg of AC_DEFUN.
23932         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
23933         since they are needed to parse the include file even if we need
23934         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
23935         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
23936         but with opposite signedness.
23937
23938 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23939
23940         Merge 'exclude' changes from tar 1.13.22.
23941         This fixes one or two unlikely storage allocation overflow bugs,
23942         but doesn't change user-visible behavior otherwise.
23943
23944 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23945
23946         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
23947         (jm_PREREQ_EXCLUDE): New macro.
23948
23949 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23950
23951         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
23952         tm to be declared.
23953
23954 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23955
23956         * lib/hash.c: Remove '2001' from copyright notice.
23957
23958 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23959
23960         * lib/full-write.h: New file.
23961         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
23962         * lib/full-write.c: Correct credits, as cccp.c no longer
23963         exists and anyway it was so heavily changed from the old cccp
23964         code as to be unrecognizable.  Include full-write.h.
23965         (full_write) Return size_t, with short writes meaning failure.
23966         All callers changed.  This fixes a bug with large buffers
23967         on 64-bit hosts.
23968         * lib/utime.c: Include full-write.h.
23969
23970 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23971
23972         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
23973         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
23974         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
23975         Include if available.
23976         (<xalloc.h>): Include
23977         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
23978         (verify): New macro.  Use it to verify that EXCLUDE macros do not
23979         collide with FNM macros.
23980         (struct patopts): New struct.
23981         (struct exclude): Use it, as exclude patterns now come with options.
23982         (new_exclude): Support above changes.
23983         (new_exclude, add_exclude_file):
23984         Initial size must now be a power of two to simplify overflow checking.
23985         (free_exclude, fnmatch_no_wildcards): New function.
23986         (excluded_filename): No longer requires options arg, as the options
23987         are determined by add_exclude.  Now returns bool, not int.
23988         (excluded_filename, add_exclude):
23989         Add support for the fancy new exclusion options.
23990         (add_exclude, add_exclude_file): Now takes int options arg.
23991         Check for arithmetic overflow when computing sizes.
23992         (add_exclude_file): xrealloc might modify errno, so don't
23993         realloc until after errno might be used.
23994
23995         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
23996         New macros.
23997         (free_exclude): New decl.
23998         (add_exclude, add_exclude_file): Now takes int options arg.
23999         (excluded_filename): No longer requires options arg, as the options
24000         are determined by add_exclude.  Now returns bool, not int.
24001
24002 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24003
24004         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
24005
24006 2001-08-27  Jim Meyering  <meyering@lucent.com>
24007
24008         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
24009
24010         * lib/version-etc.c (N_): Remove definition.
24011         Revert most of last change.
24012         Instead, simply don't mark the `Copyright...' string for translation.
24013         Based on advice from Paul Eggert.
24014
24015         * lib/strtoxmax.c: Tweak comment.
24016
24017 2001-08-26  Jim Meyering  <meyering@lucent.com>
24018
24019         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
24020
24021         * m4/xstrtoimax.m4: New file.
24022         * m4/xstrtoumax.m4: Add comments explaining why we
24023         AC_REPLACE_FUNCS(strtol).
24024
24025 2001-08-26  Jim Meyering  <meyering@lucent.com>
24026
24027         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
24028         of copyright with `%s' so translators don't get an untranslated
24029         message in 2002.
24030         (COPYRIGHT_YEAR): Define.
24031         (version_etc): Use fprintf rather than fputs.
24032         Suggestion from Ulrich Drepper.
24033
24034         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
24035
24036         * lib/strtoll.c: New file, from GNU libc.
24037         * lib/xstrtoimax.c: New file.
24038
24039         * lib/xstrtol.h: Add xstrtoimax.
24040         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
24041         * lib/strtoimax.c: New file.  Likewise, but first define
24042         STRTOUXMAX_SIGNED.
24043
24044         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
24045         ...
24046         * lib/strtoxmax.c: ... then renamed to this.
24047
24048 2001-08-18  Paul Eggert  <eggert@twinsun.com>
24049
24050         * m4/inttypes.m4: Add AC_PREREQ(2.13).
24051         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
24052         (jm_AC_TYPE_INTMAX_T): New macro.
24053         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
24054
24055         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
24056
24057         * m4/longlong.m4: Renamed from ulonglong.m4.
24058         * m4/inttypes.m4: Renamed from inttypes_h.m4.
24059         * m4/uintmax_t.m4: Removed.
24060
24061 2001-08-13  Paul Eggert  <eggert@twinsun.com>
24062
24063         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
24064         Port to Solaris 8, where 'sed' requires a space after the 'r'
24065         command, and where sh dislikes "$/".  Clean up the spacing a bit.
24066         Redirect output to $tmp just once.
24067
24068 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
24069
24070         * lib/addext.c (<errno.h>): Include.
24071         (errno): Declare if not defined.
24072         (addext): Work correctly when pathconf returns -1 and leaves
24073         errno alone because there is no limit.  Also, work even if
24074         pathconf returns a value greater than SIZE_MAX.
24075
24076 2001-08-12  Jim Meyering  <meyering@lucent.com>
24077
24078         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
24079         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
24080         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
24081         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
24082         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
24083         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
24084         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
24085         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
24086         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
24087         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
24088         utime.m4, utimes.m4, xstrtoumax.m4:
24089         Quote the first argument in each use of AC_DEFUN.
24090
24091 2001-08-12  Jim Meyering  <meyering@lucent.com>
24092
24093         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
24094         Simply `return getcwd (NULL, 0);'.
24095         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
24096         Use 1300 as initial value for length, not PATH_MAX.
24097
24098         * lib/pathmax.h: Clean up cpp syntax.
24099
24100 2001-08-12  Jim Meyering  <meyering@lucent.com>
24101
24102         * lib/gettimeofday.c: New file.
24103         * lib/gtod.h: New file.
24104         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
24105
24106 2001-08-05  Jim Meyering  <meyering@lucent.com>
24107
24108         * m4/jm-macros.m4: Require autoconf-2.52.
24109
24110 2001-08-04  Jim Meyering  <meyering@lucent.com>
24111
24112         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
24113         stmt, to get in sync with glibc.
24114
24115 2001-08-03  Paul Eggert  <eggert@twinsun.com>
24116
24117         The following changes are from gettext 0.10.39 as maintained by
24118         Bruno Haible.
24119
24120         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
24121         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
24122         with inverted sense.  All uses changed.
24123
24124         * lib/mbswidth.c: Don't include <limits.h>.
24125         Include <stdlib.h> and <string.h> unconditionally.
24126         (iswcntrl, mbsinit, ISCNTRL): New macros.
24127         (mbsnwidth): Use K&R style function declarations.
24128         Don't bother checking for MB_LEN_MAX == 1, since the compiler
24129         can optimize it when MB_CUR_MAX == 1.
24130         The width of control characters is zero, not 1.
24131
24132 2001-08-03  Paul Eggert  <eggert@twinsun.com>
24133
24134         The following changes are from gettext 0.10.39 as maintained by
24135         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
24136
24137         * m4/codeset.m4: Upgrade to serial AM1.
24138         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
24139         all uses changed.  Quote first arg of AC_DEFUN.
24140         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
24141
24142         * m4/iconv.m4: Upgrade to serial AM2.
24143         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
24144         Add --with-libconv-prefix.
24145         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
24146         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
24147         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
24148         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
24149         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
24150
24151         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
24152         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
24153         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
24154         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
24155         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
24156         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
24157         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
24158         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
24159         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
24160
24161         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
24162         string.h any more.
24163
24164         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
24165         not the default value.
24166
24167         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
24168         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
24169         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
24170         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
24171         Also check for iswcntrl, used for wcwidth fallback.
24172         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
24173         to Autoconf 2.13.
24174
24175 2001-08-03  Jim Meyering  <meyering@lucent.com>
24176
24177         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
24178         as it was in the original.  Reported by Paul Eggert.
24179
24180 2001-07-16  Jim Meyering  <meyering@lucent.com>
24181
24182         * m4/gettimeofday.m4: New file.
24183         Prompted by a report from Bernhard Baehr.
24184
24185 2001-07-15  Jim Meyering  <meyering@lucent.com>
24186
24187         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
24188         stuff. Now it's in ../Makefile.cfg.
24189
24190 2001-07-15  Jim Meyering  <meyering@lucent.com>
24191
24192         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
24193         (BUILT_SOURCES): Add unlocked-io.h.
24194         (io_functions): Define.
24195         (unlocked-io.h): New rule.
24196         (DISTCLEANFILES): Add unlocked-io.h.
24197         (all-local): Depend on unlocked-io.h, to ensure it is created.
24198
24199         * lib/unlocked-io.hin: New file
24200
24201         * lib/regex.c: Update from glibc.
24202
24203 2001-07-05  Jim Meyering  <meyering@lucent.com>
24204
24205         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
24206         recommendation.
24207         (libfetish_a_SOURCES): Put all .h files here instead.
24208         Remove a thus-exposed (better checks in automake) duplicate and
24209         two unnecessary .h files.
24210
24211 2001-07-04  Jim Meyering  <meyering@lucent.com>
24212
24213         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
24214         that generates jm-glibc-io.m4 so that it doesn't trigger any make
24215         distcheck failure.
24216
24217 2001-07-02  Jim Meyering  <meyering@lucent.com>
24218
24219         The following changes were prompted by suggestions from Bruno Haible.
24220
24221         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
24222         is now generated.
24223         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
24224         definition of EXTRA_DIST.
24225         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
24226         ensure that the generated file is created/updated whenever the list
24227         of $(unlocked_functions) is changed.
24228         (jm-glibc-io.m4): New rule.
24229         (unlocked-io.h): New rule -- currently unused.
24230
24231 2001-06-24  Jim Meyering  <meyering@lucent.com>
24232
24233         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
24234         unmatched right bracket, rather than kludging it with an extra,
24235         falsely-matching quote in a comment.  Patch by Akim Demaille.
24236
24237 2001-06-11  Jim Meyering  <meyering@lucent.com>
24238
24239         * lib/regex.c: Update from GNU libc.
24240
24241 2001-05-27  Jim Meyering  <meyering@lucent.com>
24242
24243         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
24244         Check for ut_type in struct utmp.
24245
24246 2001-05-27  Jim Meyering  <meyering@lucent.com>
24247
24248         * lib/readutmp.h (UT_TYPE): Define.
24249
24250 2001-05-24  Jim Meyering  <meyering@lucent.com>
24251
24252         * lib/argmatch.c: Include "quote.h".
24253         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
24254         quote function.  Reported by Göran Uddeborg.
24255
24256 2001-05-22  Jim Meyering  <meyering@lucent.com>
24257
24258         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
24259         now that we use the package-supplied version unconditionally.
24260         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
24261
24262 2001-05-21  Jim Meyering  <meyering@lucent.com>
24263
24264         * m4/regex.m4: Change a couple backticks to single quotes to avoid
24265         shell syntax errors.
24266
24267 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
24268
24269         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
24270
24271 2001-05-20  Paul Eggert  <eggert@twinsun.com>
24272
24273         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
24274         Don't bother to check library strftime, since
24275         we'll be using our own my_strftime function anyway.
24276         Define my_strftime instead of strftime.
24277
24278 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
24279
24280         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
24281         which is not yet declared.
24282
24283 2001-05-15  Jim Meyering  <meyering@lucent.com>
24284
24285         * m4/regex.m4: Use proper quoting so brackets appear in the test
24286         program.
24287         Reported by, and with help from, Bruno Haible.
24288
24289 2001-05-13  Jim Meyering  <meyering@lucent.com>
24290
24291         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
24292         undefined.
24293
24294 2001-05-11  Paul Eggert  <eggert@twinsun.com>
24295
24296         dirname code cleanup.  base_name now behaves more compatibly
24297         with POSIX basename when given file names that have trailing
24298         slashes, and similarly for dir_name.  Add new primitives
24299         base_len and dir_len.  Put the directory-name-related decls
24300         into dirname.h.
24301
24302         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
24303         * lib/backupfile.c (base_name): Likewise.
24304         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
24305         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
24306         * lib/makepath.c (strip_trailing_slashes): Likewise.
24307         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
24308         ISSLASH): Likewise.
24309         * lib/rename.c (strip_trailing_slashes): Likewise.
24310         * lib/same.c (base_name): Likewise.
24311         * lib/stripslash.c (ISSLASH): Likewise.
24312
24313         * lib/addext.c: Include <dirname.h> after size_t is defined.
24314         * lib/backupfile.c: Likewise.
24315
24316         * lib/addext.c (addext): Use base_len to trim redundant
24317         trailing slashes instead of doing it ourselves.
24318         But do not trim the last slash if it is not redundant.
24319
24320         * lib/backupfile.c (find_backup_file_name,
24321         max_backup_version): Use base_len instead of rolling it ourselves.
24322         Handle the case of "" and (on DOS) "C:" correctly.
24323
24324         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
24325         needed. Include <string.h>, <dirname.h>.
24326         (base_name): Allow file names ending in slashes, other than names
24327         that are all slashes.  In this case, return the basename followed
24328         by the slashes.  This is more general, and can be used in places
24329         where the original base_name purposely had an assertion failure.
24330         (base_len): New function.
24331
24332         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
24333         Do not include <assert.h>; no longer needed.
24334         Include xalloc.h.
24335         (memrchr): Remove decl.
24336         (dir_name_r): Remove.
24337         (dir_len): Renamed from dirlen.  All callers changed.
24338         Rewrite in terms of base_name, for simplicity and consistency.
24339         (dir_name): Never return NULL.  All callers changed.
24340         Do not include <stdlib.h> in test program; no longer needed.
24341         return 0; is fine for test program.
24342
24343         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
24344         New macros.
24345         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
24346
24347         * lib/path-concat.c (path_concat): Use base_len to compute
24348         base length, not strlen; this means we cannot rely on memcpy
24349         to null-terminate.
24350
24351         * lib/same.c (STREQ): Remove.
24352         (same_name): Handle the case where the basename ends in trailing '/'.
24353
24354         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
24355         a slash was stripped.  Do not strip the last slash after a
24356         file system prefix.
24357
24358 2001-05-11  Paul Eggert  <eggert@twinsun.com>
24359
24360         * lib/Makefile.am (libfetish_a_SOURCES):
24361         Add strftime.c, since we now compile it on all hosts.
24362
24363         * lib/strftime.c (my_strftime):
24364         Define to nstrftime if emacs, but only if my_strftime is not defined.
24365         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
24366         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
24367         Add one more extra argument: a nanoseconds value.
24368         All uses changed.
24369         (ns): New macro.
24370         (my_strftime function): Add %N format.
24371         (emacs_strftimeu): Renamed from emacs_strftime,
24372         with extra ut argument.
24373
24374 2001-05-09  Paul Eggert  <eggert@twinsun.com>
24375
24376         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
24377
24378 2001-04-21  Jim Meyering  <meyering@lucent.com>
24379
24380         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
24381         doesn't interfere.
24382
24383 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
24384
24385         * m4/ftruncate.m4: Check for chsize.
24386         Link with ftruncate.o unconditionally if ftruncate is missing.
24387         This was required when cross-compiling to i586-mingw32msvc.
24388
24389 2001-04-08  Jim Meyering  <meyering@lucent.com>
24390
24391         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
24392         recomputed; that's necessary when the offset spans a DST transition.
24393         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
24394
24395 2001-04-02  Jim Meyering  <meyering@lucent.com>
24396
24397         * lib/regex.h, regex.c: Update from GNU libc.
24398
24399 2001-03-24  Jim Meyering  <meyering@lucent.com>
24400
24401         * m4/jm-macros.m4: Require autoconf-2.49d.
24402
24403 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
24404
24405         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
24406
24407 2001-03-19  Paul Eggert  <eggert@twinsun.com>
24408
24409         * lib/version-etc.c (version_etc_copyright): Update to 2001.
24410
24411 2001-03-17  Jim Meyering  <meyering@lucent.com>
24412
24413         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
24414         now that the version in autoconf is equivalent.
24415         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
24416
24417         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
24418         Suggestion from Akim Demaille.
24419
24420         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
24421         (jm_PREREQ_TEMPNAME): New function.
24422
24423 2001-03-16  Paul Eggert  <eggert@twinsun.com>
24424
24425         * lib/tempname.c (uint64_t): Define to uintmax_t if
24426         not defined, and if UINT64_MAX is not defined.
24427         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
24428         Reported by John David Anglin.
24429
24430 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
24431
24432         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
24433         resolve alias if codeset is empty.
24434         * lib/config.charset (BeOS): Use wildcard syntax.
24435
24436 2001-03-13  Jim Meyering  <meyering@lucent.com>
24437
24438         * lib/path-concat.c (path_concat)
24439         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
24440         concatenating e.g., `C:' and `foo'.
24441         From Bruno Haible.
24442
24443 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
24444
24445         * lib/localcharset.c (locale_charset): Don't use
24446         setlocale(LC_CTYPE,NULL). Don't return NULL.
24447         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
24448
24449 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
24450
24451         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
24452         support for DOS/DJGPP.
24453
24454 2001-03-01  Paul Eggert  <eggert@twinsun.com>
24455
24456         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
24457         lacks mkstemp.  Compile our own tempname.c if we compile our own
24458         mkstemp.c, as mkstemp relies on tempname.
24459
24460 2001-03-01  Jim Meyering  <meyering@lucent.com>
24461
24462         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
24463         AH_VERBATIM really does output its argument verbatim.
24464
24465 2001-02-28  Paul Eggert  <eggert@twinsun.com>
24466
24467         * lib/Makefile.am (libfetish_a_SOURCES):
24468         Add dup-safer.c, fopen-safer.c.
24469         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
24470
24471         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
24472         * lib/unistd-safer.h: New files.
24473
24474 2001-02-25  Paul Eggert  <eggert@twinsun.com>
24475
24476         The mkstemp replacement is taken from glibc 2.2.2, with some
24477         portability fixes for use outside glibc, as follows:
24478
24479         * lib/tempname.c (struct_stat64): New macro.
24480         (direxists, __gen_tempname): Use it.
24481         This avoids a portability problem with Solaris 8.
24482
24483         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
24484         (<stddef.h>, <stdint.h>, <string.h>):
24485         Include only if STDC_HEADERS || _LIBC.
24486         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
24487         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
24488         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
24489         (__set_errno): Define this macro if <errno.h> doesn't.
24490         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
24491         Define these macros if <stdio.h> doesn't.
24492         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
24493         Define these macros if <sys/stat.h>
24494         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
24495         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
24496         __xstat64): Define if not _LIBC.
24497         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
24498         (__gen_tempname): Invoke gettimeofday only if
24499         HAVE_GETTIMEOFDAY || _LIBC;
24500         otherwise, fall back on plain "time".
24501         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
24502
24503         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
24504
24505         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
24506
24507 2001-02-18  Paul Eggert  <eggert@twinsun.com>
24508
24509         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
24510
24511 2001-02-17  Paul Eggert  <eggert@twinsun.com>
24512
24513         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
24514         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
24515         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
24516         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
24517
24518 2001-02-17  Paul Eggert  <eggert@twinsun.com>
24519
24520         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
24521         Remove workaround macros for hosts that have mbrtowc but not
24522         mbstate_t, as we now insist on proper declarations for both
24523         before using mbrtowc.
24524
24525 2001-02-17  Jim Meyering  <meyering@lucent.com>
24526
24527         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
24528         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
24529         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
24530         UnixWare 7.1.1.
24531
24532         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
24533         rather than AC_CACHE_VAL.
24534
24535 2001-02-17  Jim Meyering  <meyering@lucent.com>
24536
24537         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
24538         around included file name.
24539
24540         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
24541
24542         * lib/strftime.c: Update from GNU libc (the only changes were to
24543         comments).
24544
24545 2001-02-17  Jim Meyering  <meyering@lucent.com>
24546
24547         * lib/regex.c: Update from libc.
24548
24549 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
24550
24551         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
24552         clash.
24553
24554 2001-02-16  Paul Eggert  <eggert@twinsun.com>
24555
24556         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
24557         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
24558         Reported by Mark Hounschell via Paul Eggert.
24559
24560 2001-02-07  Jim Meyering  <meyering@lucent.com>
24561
24562         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
24563
24564 2001-02-05  Jim Meyering  <meyering@lucent.com>
24565
24566         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
24567         it includes the patch required for `large file' support with at least
24568         HP-UX's 10.20 /bin/cc.
24569
24570 2001-02-03  Jim Meyering  <meyering@lucent.com>
24571
24572         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
24573         AS_IF, now that it works once again (mysteriously).
24574         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
24575
24576 2001-01-30  Jim Meyering  <meyering@lucent.com>
24577
24578         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
24579         * m4/chown.m4: Rename conftestchown to conftest.chown.
24580         * m4/rename.m4: s/conftestdir/conftest.d1/ and
24581         s/conftestdir2/conftest.d2/.
24582         * m4/utimes.m4: s/conftestdata/conftest.data/
24583         Inspired by Pavel Roskin's change in autoconf.
24584
24585 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
24586
24587         * lib/config.charset: Update for FreeBSD 4.2.
24588
24589 2001-01-27  Jim Meyering  <meyering@lucent.com>
24590
24591         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
24592         a use of AS_IF.
24593         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
24594
24595 2001-01-26  Jim Meyering  <meyering@lucent.com>
24596
24597         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
24598         quotearg.c includes it.
24599
24600 2001-01-26  Jim Meyering  <meyering@lucent.com>
24601
24602         * lib/quotearg.c: Include stddef.h.
24603         * lib/quote.c: Include stddef.h.
24604         Reported by Axel Kittenberger.
24605
24606         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
24607         line in double quotes so that it evokes a better diagnostic.
24608         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
24609         Reported by Axel Kittenberger.
24610
24611 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
24612
24613         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
24614         as if it was a `charset'.
24615
24616 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
24617
24618         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
24619         has const.
24620
24621 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
24622
24623         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
24624         to avoid a warning.  Add back 'const' to inptr.
24625
24626 2001-01-20  Jim Meyering  <meyering@lucent.com>
24627
24628         Be sure that headers are checked before used in code compiled
24629         for the type checks.
24630         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
24631         In place of that, invoke jm_CHECK_ALL_TYPES.
24632         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
24633         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
24634         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
24635         The check for ssize_t was mistakenly run before the test for unistd.h.
24636
24637         The configure-time check for stdbool.h was missing.
24638         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
24639         (jm_PREREQ_HASH): New function.
24640
24641 2001-01-17  Jim Meyering  <meyering@lucent.com>
24642
24643         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
24644         for autoconf-2.49c.
24645         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
24646
24647 2001-01-16  Jim Meyering  <meyering@lucent.com>
24648
24649         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
24650         From Bruno Haible.
24651
24652 2001-01-14  Jim Meyering  <meyering@lucent.com>
24653
24654         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
24655         foo and bar.  Create conftestdir/ in the script, not in the C code.
24656         Remove directories in the script, not in the C code.
24657         Remove conftestdir{,2} before trying to create the directory.
24658         Make the entire configure script fail if the mkdir fails.
24659
24660 2001-01-14  Jim Meyering  <meyering@lucent.com>
24661
24662         * lib/rename.c: New file.  From Volker Borchert.
24663         Include stdlib.h, string.h or strings.h, and xalloc.h.
24664         Use strip_trailing_slashes rather than open-coding it.
24665
24666 2001-01-03  Paul Eggert  <eggert@twinsun.com>
24667
24668         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
24669
24670 2001-01-03  Jim Meyering  <meyering@lucent.com>
24671
24672         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
24673         of local `inptr' to avoid warning with some system declarations of
24674         iconv.
24675
24676 2001-01-02  Volker Borchert  <bt@teknon.de>
24677
24678         * m4/rename.m4: New file.
24679         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
24680
24681 2001-01-01  Jim Meyering  <meyering@lucent.com>
24682
24683         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
24684         even on systems with utmpx.h.  It's necessary for the declaration of
24685         utmp's ut_user member.  Reported by Andreas Jaeger.
24686
24687         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
24688         available. They are required for the declarations of getgrgid and
24689         getpwuid resp.
24690         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
24691         Reported by Andreas Jaeger.
24692
24693 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
24694
24695         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
24696         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
24697         so `make install' also works in VPATH builds.
24698
24699 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
24700
24701         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
24702         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
24703         can be used in subdirectories.
24704
24705 2000-12-29  Paul Eggert  <eggert@twinsun.com>
24706
24707         * lib/modechange.c: Do not assume that mode_t uses the
24708         traditional octal encoding.  E.g. "chmod 1 FOO" should set
24709         the other-execute bit of FOO even if S_IXOTH != 1.
24710
24711         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
24712         WOTH, XOTH, ALLM): New macros.
24713         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
24714          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
24715         Use them.
24716         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
24717         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
24718         (mode_compile):
24719         No need to use uintmax_t; unsigned long is long enough.
24720         Don't bother to get suffix since we don't use it.
24721
24722 2000-12-26  Jim Meyering  <meyering@lucent.com>
24723
24724         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
24725         better with autoheader.
24726
24727 2000-12-24  Jim Meyering  <meyering@lucent.com>
24728
24729         * lib/hash.c (is_prime): Return explicit boolean values.
24730         (hash_get_first): Return NULL to appease Irix5.6's 89.
24731         Reported by Nelson Beebe.
24732
24733 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
24734
24735         * lib/localcharset.c (locale_charset): Add support for Win32.
24736
24737 2000-12-18  Paul Eggert  <eggert@twinsun.com>
24738
24739         * lib/physmem.h, lib/physmem.c: New files.
24740
24741         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
24742         (noinst_HEADERS): Add physmem.h.
24743
24744         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
24745         't' for compatibility with Solaris 8 sort.
24746
24747 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
24748
24749         * lib/config.charset: Add support for BeOS.
24750
24751 2000-12-17  Jim Meyering  <meyering@lucent.com>
24752
24753         * m4/dos.m4 (jm_AC_DOS): New file and macro.
24754         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
24755
24756 2000-12-16  Jim Meyering  <meyering@lucent.com>
24757
24758         This bug had a serious impact on chown: `chown N:M FILE' (for integer
24759         N and M) would have treated it like `chown N:N FILE'.
24760
24761         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
24762
24763 2000-12-16  Jim Meyering  <meyering@lucent.com>
24764
24765         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
24766         SHELLS_FILE to a file name that's useful on djgpp systems.
24767         Include stdlib.h.
24768         (ADDITIONAL_DEFAULT_SHELLS): Define.
24769         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
24770         Based mostly on a patch from Prashant TR.
24771
24772 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
24773
24774         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
24775         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
24776         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
24777
24778 2000-12-08  Andreas Schwab  <schwab@suse.de>
24779
24780         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
24781         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
24782
24783 2000-12-07  Jim Meyering  <meyering@lucent.com>
24784
24785         * lib/stripslash.c (ISSLASH): Define.
24786         (strip_trailing_slashes): Use ISSLASH rather than comparing against
24787         `/'.
24788         From Prashant TR.
24789
24790         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
24791         (dir_name_r): Declare this function as static.
24792         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
24793         manifest itself on a name containing a mix of slashes and
24794         backslashes.
24795         Make this function work with names starting with a DOS-style
24796         drive letter and colon prefix.
24797         (dir_name): Append `.' if necessary.
24798         Based mostly on patches from Prashant TR and Eli Zaretskii.
24799
24800         * lib/dirname.h (dir_name_r): Remove prototype.
24801
24802 2000-12-06  Paul Eggert  <eggert@twinsun.com>
24803
24804         * m4/off_t-format.m4: Remove this file.
24805         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
24806
24807 2000-12-06  Jim Meyering  <meyering@lucent.com>
24808
24809         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
24810         replacement strtoull, we may well need the replacement strtoul, too.
24811         Check for declarations of strtoul and strtoull.
24812         Check for strtol.  Mainly as a cue to cause automake to include
24813         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
24814         Check for limits.h -- strtol.c needs it.
24815
24816 2000-12-05  Jim Meyering  <meyering@lucent.com>
24817
24818         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
24819
24820 2000-12-04  Jim Meyering  <meyering@lucent.com>
24821
24822         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
24823         Also include memory.h, stdlib.h, unistd.h if appropriate.
24824         Reported by Andreas Jaeger (conflicting declaration of malloc).
24825
24826 2000-12-02  Jim Meyering  <meyering@lucent.com>
24827
24828         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
24829         * m4/jm-macros.m4 (jm_MACROS): require it.
24830
24831 2000-12-02  Jim Meyering  <meyering@lucent.com>
24832
24833         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
24834
24835 2000-12-01  Paul Eggert  <eggert@twinsun.com>
24836
24837         * lib/memrchr.c: Include <config.h> before any system include file.
24838
24839 2000-11-30  Jim Meyering  <meyering@lucent.com>
24840
24841         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
24842
24843 2000-11-30  Jim Meyering  <meyering@lucent.com>
24844
24845         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
24846
24847 2000-11-29  Paul Eggert  <eggert@twinsun.com>
24848
24849         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
24850
24851 2000-11-26  Jim Meyering  <meyering@lucent.com>
24852
24853         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
24854
24855 2000-11-22  Paul Eggert  <eggert@twinsun.com>
24856
24857         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
24858         size of (size_t) -1; it's not portable.
24859
24860 2000-11-17  Jim Meyering  <meyering@lucent.com>
24861
24862         * lib/strstr.c: Update from GNU libc.
24863
24864 2000-11-17  Akim Demaille  <akim@epita.fr>
24865
24866         * lib/obstack.h: Formatting changes.
24867         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
24868         prevent type checking.
24869         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
24870         cast the value to (void *): assigning a `foo *' to a `void *'
24871         variable is valid.
24872         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
24873
24874 2000-11-16  Jim Meyering  <meyering@lucent.com>
24875
24876         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
24877
24878 2000-11-11  Jim Meyering  <meyering@lucent.com>
24879
24880         * lib/error.c: Add a couple #includes, merging from GNU libc version.
24881
24882 2000-11-10  Jim Meyering  <meyering@lucent.com>
24883
24884         * lib/obstack.h: Update from GNU libc.
24885         * lib/obstack.c: Likewise.
24886
24887 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
24888
24889         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
24890
24891 2000-11-06  Paul Eggert  <eggert@twinsun.com>
24892
24893         * lib/getusershell.c (setusershell): Use rewind rather than
24894         fseek/fseeko, to avoid configuration hassles with fseeko.
24895         Don't bother opening SHELLS_FILE if shellstream is NULL;
24896         it's not necessary.
24897
24898 2000-11-05  Jim Meyering  <meyering@lucent.com>
24899
24900         * lib/makepath.h (make_dir): Declare.
24901         * lib/makepath.c (make_dir): Remove `static' attribute.
24902         Tweak a comment.
24903
24904 2000-11-04  Jim Meyering  <meyering@lucent.com>
24905
24906         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
24907
24908 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
24909
24910         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
24911         last one in a bucket, advance to the next bucket.
24912
24913 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
24914
24915         * lib/fnmatch.c: Do not comment out all the code if we are using
24916         the GNU C library, because in some cases we are replacing buggy
24917         code in the GNU C library itself.
24918
24919 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
24920
24921         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
24922         (regex_compile): Catch bogus \(\1\).
24923
24924 2000-10-30  Paul Eggert  <eggert@twinsun.com>
24925
24926         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
24927         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
24928         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
24929
24930 2000-10-30  Paul Eggert  <eggert@twinsun.com>
24931
24932         * lib/error.h, getline.h, modechange.h:
24933         Remove "2000" from Copyright line, as the file hasn't been
24934         changed this year other than in the copyright notice.
24935
24936         * lib/xalloc.h: Add "2000" to Copyright line, as this file
24937         was changed this year.
24938
24939 2000-10-29  Jim Meyering  <meyering@lucent.com>
24940
24941         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
24942         renaming.
24943         * m4/ls-mntd-fs.m4: Likewise
24944
24945 2000-10-29  Jim Meyering  <meyering@lucent.com>
24946
24947         * lib/xstat.in: Fix grammar in comment.
24948
24949 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
24950
24951         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
24952         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
24953         doesn't define __restrict_arr.
24954
24955 2000-10-28  Jim Meyering  <meyering@lucent.com>
24956
24957         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
24958         (jm_PREREQ_MEMCHR): New function.
24959
24960 2000-10-28  Jim Meyering  <meyering@lucent.com>
24961
24962         * lib/memchr.c: Update from libc.
24963         Adjust for portability:
24964         [HAVE_STDLIB_H]: Include stdlib.h.
24965         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
24966         Undef __memchr, too.
24967         [!weak_alias]: Define __memchr to memchr.
24968
24969         * lib/regex.c: Update from libc.
24970         * lib/regex.h: Likewise.
24971         * lib/getopt1.c: Likewise.
24972         * lib/memcmp.c: Likewise.
24973
24974         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
24975         Avoid using fseek, when possible -- it's broken by design.
24976         Patch by Ulrich Drepper.
24977
24978 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
24979
24980         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
24981         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
24982         Giving in to popular pressure to shut up the compiler with casts.
24983
24984 2000-10-26  Jim Meyering  <meyering@lucent.com>
24985
24986         * lib/strftime.c: Update from libc.
24987
24988 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
24989
24990         * regex.c: More `unsigned char' -> `re_char' changes.
24991         Also change several `int' into `re_wchar_t'.
24992         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
24993         (PUSH_FAILURE_POINTER): Don't cast any more.
24994         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
24995         We want GCC to complain, since this piece of code makes
24996         re_match non-reentrant, which *should* be fixed.
24997         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
24998         (EXTEND_BUFFER): Use RETALLOC.
24999         (SET_LIST_BIT): Don't cast.
25000         (re_wchar_t): New type.
25001         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
25002         that those two functions will always properly return.
25003         (IMMEDIATE_QUIT_CHECK): Cast to void.
25004         (analyse_first): Use recursion rather than an explicit stack.
25005         (re_compile_fastmap): Can't fail anymore.
25006         (re_search_2): Don't check re_compile_fastmap for failure.
25007         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
25008         Now also sets the new value (passed in a new argument).
25009         (re_match_2_internal): Use it.
25010         Also, use a new var `reg' of type size_t when looping through regs
25011         rather than reuse the inappropriate `mcnt'.
25012
25013 2000-10-25  Jim Meyering  <meyering@lucent.com>
25014
25015         * lib/obstack.c: Update from libc.
25016
25017 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
25018
25019         * regex.c (regex_compile): Change the way of handling a range from
25020         a char less than 256 to a char not less than 256.
25021
25022 2000-10-24  Andrew Innes  <andrewi@gnu.org>
25023
25024         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
25025         NT-Emacs only.
25026         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
25027         so that re_search functions only quit when callers expect them to.
25028
25029 2000-10-23  Jim Meyering  <meyering@lucent.com>
25030
25031         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
25032         wrong.  That set_locale call must not have any side effects.
25033         From Paul Eggert.
25034
25035 2000-10-22  Jim Meyering  <meyering@lucent.com>
25036
25037         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
25038         [CYCLIC]: Remove now-unused definition.
25039
25040         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
25041         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
25042         Suggestion from Ulrich Drepper.
25043
25044 2000-10-21  Jim Meyering  <meyering@lucent.com>
25045
25046         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
25047         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
25048         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
25049
25050 2000-10-21  Jim Meyering  <meyering@lucent.com>
25051
25052         * lib/dirname.c (memrchr): Declare if necessary.
25053         (dir_name): Remove the restriction that there be no
25054         trailing slashes.  Now, this code skips past them, effectively
25055         ignoring them.
25056         [TEST_DIRNAME] (main): New unit tests.
25057
25058         * lib/memrchr.c: New file from GNU libc.
25059         Undef __memrchr, too.
25060         [!weak_alias]: Define __memrchr to memrchr.
25061         Guard weak_alias use with `#ifdef weak_alias'.
25062
25063 2000-10-21  Jim Meyering  <meyering@lucent.com>
25064
25065         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
25066         (dir_name): Use dir_name_r.
25067         * lib/dirname.h (dir_name_r): Declare it.
25068
25069 2000-10-17  Jim Meyering  <meyering@lucent.com>
25070
25071         * lib/quote.h (PARAMS): Define and use.
25072         Reported by Akim Demaille.
25073
25074         * lib/getopt.c: Update from libc.
25075
25076 2000-10-16  Jim Meyering  <meyering@lucent.com>
25077
25078         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
25079         setlocale.
25080         From Jan Fedak.
25081
25082 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
25083
25084         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
25085
25086 2000-09-25  Jim Meyering  <meyering@lucent.com>
25087
25088         * lib/md5.h (rol): Define (from GnuPG).
25089
25090         * lib/sha.c: Give credit (GnuPG) where due.
25091         (M): Use rol rather than open-coding it.
25092         Add a FIXME comment.
25093
25094 2000-09-21  Jim Meyering  <meyering@lucent.com>
25095
25096         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
25097         Reported by Michael Stone.
25098
25099 2000-09-20  Jim Meyering  <meyering@lucent.com>
25100
25101         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
25102         (noinst_HEADERS): Add sha.h.
25103         Based on code from Scott G. Miller and from GnuPG.
25104
25105 2000-09-18  Jim Meyering  <meyering@lucent.com>
25106
25107         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
25108         LIBS. Otherwise, everyone ends up linking with -lelf for some
25109         configurations.
25110         Reported by Mike Stone.
25111
25112 2000-09-15  Jim Meyering  <meyering@lucent.com>
25113
25114         * lib/regex.c: Update from libc.
25115
25116 2000-09-10  Jim Meyering  <meyering@lucent.com>
25117
25118         * lib/getopt.c (_getopt_internal): Update from glibc.
25119
25120 2000-09-09  Jim Meyering  <meyering@lucent.com>
25121
25122         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
25123         think it should be used as a general replacement for isascii.
25124         * lib/fnmatch.c: Likewise.
25125         * lib/mbswidth.c: Likewise
25126         * lib/regex.c: Likewise.
25127
25128         Don't use atoi.
25129         * lib/userspec.c: Include sys/param.h and limits.h.
25130         Include xstrtol.h.
25131         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
25132         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
25133         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
25134         UID, GID.  Check range.
25135
25136 2000-09-06  Jim Meyering  <meyering@lucent.com>
25137
25138         * lib/getopt.c (_getopt_internal): Update from glibc.
25139
25140 2000-08-30  Jim Meyering  <meyering@lucent.com>
25141
25142         * lib/strftime.c: Merge in changes from GNU libc.
25143
25144 2000-08-26  Jim Meyering  <meyering@lucent.com>
25145
25146         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
25147         * m4/fpending.m4: New file.
25148
25149 2000-08-26  Jim Meyering  <meyering@lucent.com>
25150
25151         * lib/closeout.c: Include "__fpending.h".
25152         (close_stdout_status): Return right away if there's nothing to flush.
25153
25154         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
25155         * lib/__fpending.c: New file.
25156         * lib/__fpending.h: New file.
25157
25158 2000-08-20  Jim Meyering  <meyering@lucent.com>
25159
25160         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
25161         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
25162         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
25163
25164 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
25165
25166         Improve fileutils installation on systems where running
25167         programs (like install) can't be unlinked.
25168         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
25169         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
25170
25171 2000-08-07  Paul Eggert  <eggert@twinsun.com>
25172
25173         Standardize on "memory exhausted" instead of "Memory exhausted"
25174         or "virtual memory exhausted".
25175         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
25176         "virtual memory exhausted".
25177         * lib/same.c (same_name): Invoke xalloc_die instead of printing
25178         our own message.
25179         * lib/userspec.c (parse_user_spec): Likewise.
25180         * lib/bumpalloc.h: comment fix
25181         * lib/same.c, userspec.c: Include xalloc.h.
25182
25183         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
25184         not char *const and pointing to a constant array.
25185         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
25186         (xrealloc): Comment fix.
25187
25188         * lib/userspec.c (parse_user_spec):
25189         Don't translate a message until just before returning,
25190         to avoid unnecessary translation.
25191
25192 2000-08-07  Jim Meyering  <meyering@lucent.com>
25193
25194         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
25195         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
25196         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
25197         getgroups.c, gethostname.c, getopt.h, group-member.c,
25198         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
25199         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
25200         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
25201         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
25202         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
25203         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
25204         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
25205         yesno.c: Back out Copyright date changes for each file with no change
25206         this year.  This eases coordination with other programs using the same
25207         source code modules.  From Paul Eggert.
25208
25209 2000-08-06  Paul Eggert  <eggert@twinsun.com>
25210
25211         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
25212         not char, for compatibility with glibc 2.1.3 strftime.c.
25213
25214 2000-08-03  Greg McGary  <greg@mcgary.org>
25215
25216         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
25217         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
25218         (EXTEND_BUFFER): Use them.
25219
25220 2000-08-01  Jim Meyering  <meyering@lucent.com>
25221
25222         * lib/dirname.c (ISSLASH): Define.
25223         (BACKSLASH_IS_PATH_SEPARATOR): Define.
25224         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
25225         both `\' and `/' may be use as path separators.
25226         Based on a patch from Prashant TR.
25227
25228 2000-07-31  Paul Eggert  <eggert@twinsun.com>
25229
25230         * lib/quotearg.c (quotearg_n_options): Don't make the initial
25231         slot vector a constant, since it might get modified.
25232
25233 2000-07-31  Jim Meyering  <meyering@lucent.com>
25234
25235         * lib/xmalloc.c: Use `virtual memory exhausted', not
25236         `Memory exhausted'.
25237         * lib/obstack.c (print_and_abort): Likewise.
25238
25239 2000-07-30  Paul Eggert  <eggert@twinsun.com>
25240
25241         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
25242         buffer, so that the caller can always quote one small
25243         component of a "memory exhausted" message in slot 0.
25244         From a suggestion by Jim Meyering.
25245
25246 2000-07-30  Jim Meyering  <meyering@lucent.com>
25247
25248         * lib/makepath.c (make_path): Quote the other instance, too.
25249
25250         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
25251         (STATIC_BUF_SIZE): Define.
25252         (quotearg_n_options): Use only statically allocated storage when
25253         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
25254         than STATIC_BUF_SIZE.
25255
25256 2000-07-29  Jim Meyering  <meyering@lucent.com>
25257
25258         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
25259         * lib/dirname.c (dir_name): Likewise.
25260
25261         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
25262         `/'.
25263
25264         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
25265         (dir_name): Assert that there are no trailing slashes.
25266
25267 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
25268
25269         * lib/mbswidth.h (mbswidth): Add a flags argument.
25270         (mbswidth): New declaration.
25271         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
25272         * lib/mbswidth.c (mbswidth): Add a flags argument.
25273         (mbsnwidth): New function.
25274
25275 2000-07-24  Jim Meyering  <meyering@lucent.com>
25276
25277         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
25278
25279 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25280
25281         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
25282
25283 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25284
25285         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
25286         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
25287         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
25288         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
25289         invoke multibyte primitives.
25290
25291 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25292
25293         * lib/quotearg.c:
25294         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
25295         so that mbstate_t is always defined.
25296
25297         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
25298         be 1 in at least one GCC installation, and this configuration
25299         error is likely to be common.  Ignoring MB_LEN_MAX hurts
25300         performance on hosts that have mbrtowc but have only unibyte
25301         locales, but I assume these hosts are rare.
25302
25303 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25304
25305         * lib/mbswidth.c (_XOPEN_SOURCE):
25306         Don't define; this causes problems on Solaris 7.
25307         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
25308
25309 2000-07-23  Jim Meyering  <meyering@lucent.com>
25310
25311         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
25312         too: getgrgid, getpwuid, getuid.
25313
25314 2000-07-23  Jim Meyering  <meyering@lucent.com>
25315
25316         * lib/basename.c (base_name): Add an assertion.
25317
25318 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
25319
25320         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
25321         shadow its mbsinit function.
25322
25323 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
25324
25325         * lib/mbswidth.h: New file.
25326         * lib/mbswidth.c: New file.
25327         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
25328         (noinst_HEADERS): Add mbswidth.h.
25329
25330 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
25331
25332         * lib/config.charset: Add support for FreeBSD. Improve support for
25333         HP-UX and IRIX 6.
25334
25335 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
25336
25337         * m4/mbswidth.m4: New file.
25338         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
25339
25340 2000-07-15  Jim Meyering  <meyering@lucent.com>
25341
25342         * lib/makepath.c: Include quote.h.
25343         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
25344         corresponding argument in a `quote (...)' call.
25345         Give better diagnostics.
25346
25347         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
25348         (noinst_HEADERS): Add quote.h.
25349
25350         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
25351         from tar's src/misc.c.
25352         * lib/quote.h: New file.  Prototypes for same.
25353
25354 2000-07-14  Paul Eggert  <eggert@twinsun.com>
25355
25356         From a suggestion by Bruno Haible.
25357         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
25358         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
25359         to decide whether to define the BeOS workaround macro;
25360         this adjusts to the change to AC_MBSTATE_T.
25361
25362 2000-07-14  Jim Meyering  <meyering@lucent.com>
25363
25364         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
25365         jm_AC_TYPE_UINTMAX_T.
25366
25367 2000-07-13  Paul Eggert  <eggert@twinsun.com>
25368
25369         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
25370
25371         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
25372         quotearg_buffer_restyled): Add support for
25373         clocale_quoting_style.  Undo previous change to
25374         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
25375         and "{RIGHT QUOTATION MARK}" msgids.
25376
25377 2000-07-10  Paul Eggert  <eggert@twinsun.com>
25378
25379         From a suggestion by Bruno Haible.
25380         * m4/mbstate_t.m4 (AC_MBSTATE_T):
25381         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
25382         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
25383         and mbstate_t, to a single-part test that simply defines mbstate_t.
25384         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
25385         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
25386
25387 2000-07-10  Jim Meyering  <meyering@lucent.com>
25388
25389         * m4/strerror_r.m4: Mirror the correction made in autoconf.
25390
25391         * m4/gnu-source.m4: Output to confdefs.h directly.
25392         Suggestion from Akim Demaille.
25393
25394 2000-07-09  Paul Eggert  <eggert@twinsun.com>
25395
25396         The old behavior of quoting `like this' doesn't look good with
25397         newer, ISO-style fonts.  See:
25398         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
25399
25400         Instead, quote "like this" by default.  Let the translator
25401         tailor the locale-specific quoting behavior by providing
25402         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
25403
25404         * lib/quotearg.c (N_): New macro.
25405         (gettext_default): New function.
25406         (quotearg_buffer_restyled): Use
25407         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
25408         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
25409
25410 2000-07-09  Jim Meyering  <meyering@lucent.com>
25411
25412         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
25413         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
25414
25415         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
25416         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
25417
25418 2000-07-09  Jim Meyering  <meyering@lucent.com>
25419
25420         * lib/Most files: Update copyright dates to include 2000.
25421
25422 2000-07-08  Jim Meyering  <meyering@lucent.com>
25423
25424         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
25425         if not defined.
25426         (xgethostname): Remove now-unnecessary #ifdef.
25427         Move declaration of `err' into loop where it's used.
25428
25429 2000-07-05  Paul Eggert  <eggert@twinsun.com>
25430         and Bruno Haible  <haible@clisp.cons.org>
25431
25432         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
25433         only if the test for an object-type mbstate_t fails.  This
25434         prevents us from mistakenly reporting that mbstate_t is a
25435         system object type after we "#define mbstate_t int" to work
25436         around its lack.
25437
25438 2000-07-05  Paul Eggert  <eggert@twinsun.com>
25439         and Bruno Haible  <haible@clisp.cons.org>
25440
25441         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
25442
25443 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
25444
25445         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
25446         to strerror_r.
25447         Include <ctype.h> for use of isalpha.
25448
25449 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
25450
25451         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
25452         by allocating a larger buffer. Test the gethostname return value for
25453         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
25454         returns an error and ENAMETOOLONG isn't defined.
25455
25456 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
25457
25458         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
25459         dimension.
25460
25461 2000-07-04  Jim Meyering  <meyering@lucent.com>
25462
25463         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
25464         of the deprecated AC_CHECKING.
25465
25466 2000-07-04  Jim Meyering  <meyering@lucent.com>
25467
25468         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
25469         Reported by Bruno Haible.
25470
25471 2000-07-04  Jim Meyering  <meyering@lucent.com>
25472
25473         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
25474         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
25475         lacks mbrtowc.
25476
25477 2000-07-03  Paul Eggert  <eggert@twinsun.com>
25478
25479         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
25480         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
25481
25482 2000-07-03  Paul Eggert  <eggert@twinsun.com>
25483         and Bruno Haible  <haible@clisp.cons.org>
25484
25485         * lib/quotearg.c (mbrtowc):
25486         Assign to *pwc, and return 1 only if result is nonzero.
25487         (iswprint): Use ISPRINT when substituting our own mbrtowc.
25488
25489 2000-07-03  Jim Meyering  <meyering@lucent.com>
25490
25491         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
25492
25493 2000-07-03  Jim Meyering  <meyering@lucent.com>
25494
25495         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
25496         This is necessary to get a definition of e.g., UTMP_FILE on
25497         HP-UX 10.20.
25498         From Bob Proulx.
25499
25500 2000-07-02  Jim Meyering  <meyering@lucent.com>
25501
25502         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
25503
25504         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
25505         AC_LIBOBJ(function_name).
25506         * m4/chown.m4: Likewise.
25507         * m4/fnmatch.m4: Likewise.
25508         * m4/ftruncate.m4: Likewise.
25509         * m4/getgroups.m4: Likewise.
25510         * m4/getline.m4: Likewise.
25511         * m4/group-member.m4: Likewise.
25512         * m4/jm-macros.m4: Likewise.
25513         * m4/lstat.m4: Likewise.
25514         * m4/malloc.m4: Likewise.
25515         * m4/memcmp.m4: Likewise.
25516         * m4/nanosleep.m4: Likewise.
25517         * m4/putenv.m4: Likewise.
25518         * m4/realloc.m4: Likewise.
25519         * m4/regex.m4: Likewise.
25520         * m4/stat.m4: Likewise.
25521         * m4/strftime.m4: Likewise.
25522
25523 2000-07-02  Jim Meyering  <meyering@lucent.com>
25524
25525         * lib/quotearg.c (mbstate_t): Don't define here.
25526
25527 2000-07-02  Jim Meyering  <meyering@lucent.com>
25528
25529         * lib/nanosleep.c (SIGCONT): Define if not already defined.
25530
25531 2000-07-01  Jim Meyering  <meyering@lucent.com>
25532
25533         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
25534
25535 2000-07-01  Jim Meyering  <meyering@lucent.com>
25536
25537         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
25538         problem.
25539
25540 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
25541
25542         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
25543         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
25544
25545 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
25546
25547         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
25548         per change in ../m4/ls-mntd-fs.m4.
25549         (read_filesystem_list): Ignore symbolic links.
25550
25551 2000-06-29  Jim Meyering  <meyering@lucent.com>
25552
25553         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
25554         for declaration of strcmp.
25555
25556         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
25557
25558         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
25559         Avoid warning by casting result to `char *' to remove `const'.
25560
25561 2000-06-28  Jim Meyering  <meyering@lucent.com>
25562
25563         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
25564         included by quotearg.c, for which we perform this test.  From
25565         Bruno Haible.
25566
25567 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
25568
25569         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
25570         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
25571         <utmpx.h> exists, put readutmp.o into LIBOBJS.
25572
25573 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
25574
25575         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
25576
25577 2000-06-26  Paul Eggert  <eggert@twinsun.com>
25578
25579         savedir now sets errno on failure and invokes xmalloc to get memory.
25580         Fix a couple of other minor bugs while we're at it.
25581
25582         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
25583         (NAMLEN): Remove macro.
25584         (malloc, realloc): Remove decls.
25585         (stpcpy): Likewise.
25586         ("xalloc.h"): Include.
25587         (NAME_SIZE_DEFAULT): New macro.
25588         (savedir): Use xmalloc / xrealloc to allocate memory.
25589         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
25590         Skip "" directory entries.
25591         Use strlen to calculate directory entry length, since the old method
25592         is rarely used these days and isn't worth supporting.
25593         Don't use a pointer after freeing it.
25594         Check for integer overflow when calculating allocation size.
25595         Use memcpy to copy entries, instead of stpcpy.
25596         Set errno properly when returning NULL.
25597         Check for readdir error.
25598
25599 2000-06-26  Jim Meyering  <meyering@lucent.com>
25600
25601         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
25602
25603 2000-06-25  Jim Meyering  <meyering@lucent.com>
25604
25605         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
25606         Linux header bug when _XOPEN_SOURCE is defined to 500.
25607
25608 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
25609
25610         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
25611         deficiency.
25612
25613 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
25614
25615         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
25616         Include xalloc.h.
25617         Don't include <stdlib.h>.  Don't declare malloc, realloc.
25618
25619 2000-06-24  Jim Meyering  <meyering@lucent.com>
25620
25621         * m4/strerror_r.m4: Revive this file -- to try out an experimental
25622         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
25623         for which strerror does return char*, but which lacks a conveniently
25624         accessible declaration of the function.  If the compile-test says
25625         strerror_r doesn't work, then resort to a `run'-test that works on
25626         BeOS and segfaults on DEC Unix.
25627
25628 2000-06-24  Jim Meyering  <meyering@lucent.com>
25629
25630         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
25631
25632 2000-06-23  Paul Eggert  <eggert@twinsun.com>
25633
25634         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
25635         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
25636
25637 2000-06-23  Paul Eggert  <eggert@twinsun.com>
25638
25639         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
25640         (mbrtowc, mbstate_t): Define substitutes if
25641         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
25642         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
25643         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
25644
25645 2000-06-23  Jim Meyering  <meyering@lucent.com>
25646
25647         * m4/afs.m4: Add missing AC_MSG_RESULT.
25648         Reported by Bruno Haible.
25649
25650         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
25651         Suggestion from Bruno Haible.
25652
25653 2000-06-23  Jim Meyering  <meyering@lucent.com>
25654
25655         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
25656
25657 2000-06-21  Jim Meyering  <meyering@lucent.com>
25658
25659         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
25660
25661 2000-06-21  Jim Meyering  <meyering@lucent.com>
25662
25663         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
25664         (noinst_HEADERS): Add getstr.h.
25665
25666         * lib/getline.c (getstr): Move into a separate file.
25667         * lib/getstr.c (getstr): New file, extracted from getline.c, with
25668         the following changes: new parameter, delim2; both delim[12]
25669         parameters have type `int', not `char'.  The latter would lose
25670         with 8-bit delimiters.
25671         * lib/getstr.h: New file.
25672
25673 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
25674
25675         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
25676         than 1024, return a memory chunk of least possible size, instead
25677         of size PATH_MAX + 2. In the loop, increment the size proportionally.
25678         Use free/xmalloc instead of xrealloc to avoid copying for very long
25679         paths.
25680
25681 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
25682
25683         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
25684         the empty string.
25685
25686 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
25687
25688         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
25689         address, not strdup.  Include <stdlib.h> and don't declare free().
25690
25691 2000-06-19  Jim Meyering  <meyering@lucent.com>
25692
25693         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
25694
25695 2000-06-18  Jim Meyering  <meyering@lucent.com>
25696
25697         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
25698
25699         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
25700         `checking whether...' message to be consistent with that of the
25701         lstat test.
25702
25703 2000-06-18  Jim Meyering  <meyering@lucent.com>
25704
25705         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
25706         Besides, these days every porting target provides a mkdir function.
25707
25708         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
25709         needed. (this snippet comes from src/system.h).
25710
25711 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
25712
25713         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
25714
25715 2000-06-15  Paul Eggert  <eggert@twinsun.com>
25716
25717         * lib/human.c (adjust_value): New function.
25718         (human_readable_inexact): Apply rounding style even when
25719         printing approximate values.
25720
25721 2000-06-14  Paul Eggert  <eggert@twinsun.com>
25722
25723         * lib/human.c (human_readable_inexact): Allow an input block
25724         size that is not a multiple of the output block size, and vice versa.
25725         Reported by Piergiorgio Sartor.
25726
25727 2000-06-14  Paul Eggert  <eggert@twinsun.com>
25728
25729         * lib/getdate.y (get_date): Apply relative times after time
25730         zone indicator, not before.  Reported by Todd A. Jacobs.
25731
25732 2000-06-13  Jim Meyering  <meyering@lucent.com>
25733
25734         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
25735
25736         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
25737
25738 2000-06-12  Paul Eggert  <eggert@twinsun.com>
25739
25740         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
25741
25742 2000-06-12  Jim Meyering  <meyering@lucent.com>
25743
25744         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
25745         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
25746         optional argument.
25747         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
25748         the optional argument, `lib'.
25749
25750 2000-06-08  Jim Meyering  <meyering@lucent.com>
25751
25752         * m4/largefile.m4: Remove file (now that it's part of autoconf).
25753
25754 2000-06-04  Paul Eggert  <eggert@twinsun.com>